jellyfin-discord-bot/server/jellyfin/models/AuthenticationResultUser.ts

184 lines
6.4 KiB
TypeScript
Raw Permalink Normal View History

2023-05-04 23:34:53 +02:00
/* 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 AuthenticationResultUser
*/
export interface AuthenticationResultUser {
/**
* Gets or sets the name.
* @type {string}
* @memberof AuthenticationResultUser
*/
name?: string | null;
/**
* Gets or sets the server identifier.
* @type {string}
* @memberof AuthenticationResultUser
*/
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 AuthenticationResultUser
*/
serverName?: string | null;
/**
* Gets or sets the id.
* @type {string}
* @memberof AuthenticationResultUser
*/
id?: string;
/**
* Gets or sets the primary image tag.
* @type {string}
* @memberof AuthenticationResultUser
*/
primaryImageTag?: string | null;
/**
* Gets or sets a value indicating whether this instance has password.
* @type {boolean}
* @memberof AuthenticationResultUser
*/
hasPassword?: boolean;
/**
* Gets or sets a value indicating whether this instance has configured password.
* @type {boolean}
* @memberof AuthenticationResultUser
*/
hasConfiguredPassword?: boolean;
/**
* Gets or sets a value indicating whether this instance has configured easy password.
* @type {boolean}
* @memberof AuthenticationResultUser
*/
hasConfiguredEasyPassword?: boolean;
/**
* Gets or sets whether async login is enabled or not.
* @type {boolean}
* @memberof AuthenticationResultUser
*/
enableAutoLogin?: boolean | null;
/**
* Gets or sets the last login date.
* @type {Date}
* @memberof AuthenticationResultUser
*/
lastLoginDate?: Date | null;
/**
* Gets or sets the last activity date.
* @type {Date}
* @memberof AuthenticationResultUser
*/
lastActivityDate?: Date | null;
/**
*
* @type {UserDtoConfiguration}
* @memberof AuthenticationResultUser
*/
_configuration?: UserDtoConfiguration | null;
/**
*
* @type {UserDtoPolicy}
* @memberof AuthenticationResultUser
*/
policy?: UserDtoPolicy | null;
/**
* Gets or sets the primary image aspect ratio.
* @type {number}
* @memberof AuthenticationResultUser
*/
primaryImageAspectRatio?: number | null;
}
/**
* Check if a given object implements the AuthenticationResultUser interface.
*/
export function instanceOfAuthenticationResultUser(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function AuthenticationResultUserFromJSON(json: any): AuthenticationResultUser {
return AuthenticationResultUserFromJSONTyped(json, false);
}
export function AuthenticationResultUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticationResultUser {
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 AuthenticationResultUserToJSON(value?: AuthenticationResultUser | 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,
};
}