/* tslint:disable */ /* eslint-disable */ /** * Jellyfin API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 10.8.9 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { UserDtoConfiguration } from './UserDtoConfiguration'; import { UserDtoConfigurationFromJSON, UserDtoConfigurationFromJSONTyped, UserDtoConfigurationToJSON, } from './UserDtoConfiguration'; import type { UserDtoPolicy } from './UserDtoPolicy'; import { UserDtoPolicyFromJSON, UserDtoPolicyFromJSONTyped, UserDtoPolicyToJSON, } from './UserDtoPolicy'; /** * Class UserDto. * @export * @interface UserDto */ export interface UserDto { /** * Gets or sets the name. * @type {string} * @memberof UserDto */ name?: string | null; /** * Gets or sets the server identifier. * @type {string} * @memberof UserDto */ serverId?: string | null; /** * Gets or sets the name of the server. * This is not used by the server and is for client-side usage only. * @type {string} * @memberof UserDto */ serverName?: string | null; /** * Gets or sets the id. * @type {string} * @memberof UserDto */ id?: string; /** * Gets or sets the primary image tag. * @type {string} * @memberof UserDto */ primaryImageTag?: string | null; /** * Gets or sets a value indicating whether this instance has password. * @type {boolean} * @memberof UserDto */ hasPassword?: boolean; /** * Gets or sets a value indicating whether this instance has configured password. * @type {boolean} * @memberof UserDto */ hasConfiguredPassword?: boolean; /** * Gets or sets a value indicating whether this instance has configured easy password. * @type {boolean} * @memberof UserDto */ hasConfiguredEasyPassword?: boolean; /** * Gets or sets whether async login is enabled or not. * @type {boolean} * @memberof UserDto */ enableAutoLogin?: boolean | null; /** * Gets or sets the last login date. * @type {Date} * @memberof UserDto */ lastLoginDate?: Date | null; /** * Gets or sets the last activity date. * @type {Date} * @memberof UserDto */ lastActivityDate?: Date | null; /** * * @type {UserDtoConfiguration} * @memberof UserDto */ _configuration?: UserDtoConfiguration | null; /** * * @type {UserDtoPolicy} * @memberof UserDto */ policy?: UserDtoPolicy | null; /** * Gets or sets the primary image aspect ratio. * @type {number} * @memberof UserDto */ primaryImageAspectRatio?: number | null; } /** * Check if a given object implements the UserDto interface. */ export function instanceOfUserDto(value: object): boolean { let isInstance = true; return isInstance; } export function UserDtoFromJSON(json: any): UserDto { return UserDtoFromJSONTyped(json, false); } export function UserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDto { if ((json === undefined) || (json === null)) { return json; } return { 'name': !exists(json, 'Name') ? undefined : json['Name'], 'serverId': !exists(json, 'ServerId') ? undefined : json['ServerId'], 'serverName': !exists(json, 'ServerName') ? undefined : json['ServerName'], 'id': !exists(json, 'Id') ? undefined : json['Id'], 'primaryImageTag': !exists(json, 'PrimaryImageTag') ? undefined : json['PrimaryImageTag'], 'hasPassword': !exists(json, 'HasPassword') ? undefined : json['HasPassword'], 'hasConfiguredPassword': !exists(json, 'HasConfiguredPassword') ? undefined : json['HasConfiguredPassword'], 'hasConfiguredEasyPassword': !exists(json, 'HasConfiguredEasyPassword') ? undefined : json['HasConfiguredEasyPassword'], 'enableAutoLogin': !exists(json, 'EnableAutoLogin') ? undefined : json['EnableAutoLogin'], 'lastLoginDate': !exists(json, 'LastLoginDate') ? undefined : (json['LastLoginDate'] === null ? null : new Date(json['LastLoginDate'])), 'lastActivityDate': !exists(json, 'LastActivityDate') ? undefined : (json['LastActivityDate'] === null ? null : new Date(json['LastActivityDate'])), '_configuration': !exists(json, 'Configuration') ? undefined : UserDtoConfigurationFromJSON(json['Configuration']), 'policy': !exists(json, 'Policy') ? undefined : UserDtoPolicyFromJSON(json['Policy']), 'primaryImageAspectRatio': !exists(json, 'PrimaryImageAspectRatio') ? undefined : json['PrimaryImageAspectRatio'], }; } export function UserDtoToJSON(value?: UserDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'Name': value.name, 'ServerId': value.serverId, 'ServerName': value.serverName, 'Id': value.id, 'PrimaryImageTag': value.primaryImageTag, 'HasPassword': value.hasPassword, 'HasConfiguredPassword': value.hasConfiguredPassword, 'HasConfiguredEasyPassword': value.hasConfiguredEasyPassword, 'EnableAutoLogin': value.enableAutoLogin, 'LastLoginDate': value.lastLoginDate === undefined ? undefined : (value.lastLoginDate === null ? null : value.lastLoginDate.toISOString()), 'LastActivityDate': value.lastActivityDate === undefined ? undefined : (value.lastActivityDate === null ? null : value.lastActivityDate.toISOString()), 'Configuration': UserDtoConfigurationToJSON(value._configuration), 'Policy': UserDtoPolicyToJSON(value.policy), 'PrimaryImageAspectRatio': value.primaryImageAspectRatio, }; }