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

145 lines
4.0 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 { DeviceInfoCapabilities } from './DeviceInfoCapabilities';
import {
DeviceInfoCapabilitiesFromJSON,
DeviceInfoCapabilitiesFromJSONTyped,
DeviceInfoCapabilitiesToJSON,
} from './DeviceInfoCapabilities';
/**
*
* @export
* @interface DeviceInfo
*/
export interface DeviceInfo {
/**
*
* @type {string}
* @memberof DeviceInfo
*/
name?: string | null;
/**
* Gets or sets the access token.
* @type {string}
* @memberof DeviceInfo
*/
accessToken?: string | null;
/**
* Gets or sets the identifier.
* @type {string}
* @memberof DeviceInfo
*/
id?: string | null;
/**
* Gets or sets the last name of the user.
* @type {string}
* @memberof DeviceInfo
*/
lastUserName?: string | null;
/**
* Gets or sets the name of the application.
* @type {string}
* @memberof DeviceInfo
*/
appName?: string | null;
/**
* Gets or sets the application version.
* @type {string}
* @memberof DeviceInfo
*/
appVersion?: string | null;
/**
* Gets or sets the last user identifier.
* @type {string}
* @memberof DeviceInfo
*/
lastUserId?: string;
/**
* Gets or sets the date last modified.
* @type {Date}
* @memberof DeviceInfo
*/
dateLastActivity?: Date;
/**
*
* @type {DeviceInfoCapabilities}
* @memberof DeviceInfo
*/
capabilities?: DeviceInfoCapabilities | null;
/**
*
* @type {string}
* @memberof DeviceInfo
*/
iconUrl?: string | null;
}
/**
* Check if a given object implements the DeviceInfo interface.
*/
export function instanceOfDeviceInfo(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function DeviceInfoFromJSON(json: any): DeviceInfo {
return DeviceInfoFromJSONTyped(json, false);
}
export function DeviceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceInfo {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': !exists(json, 'Name') ? undefined : json['Name'],
'accessToken': !exists(json, 'AccessToken') ? undefined : json['AccessToken'],
'id': !exists(json, 'Id') ? undefined : json['Id'],
'lastUserName': !exists(json, 'LastUserName') ? undefined : json['LastUserName'],
'appName': !exists(json, 'AppName') ? undefined : json['AppName'],
'appVersion': !exists(json, 'AppVersion') ? undefined : json['AppVersion'],
'lastUserId': !exists(json, 'LastUserId') ? undefined : json['LastUserId'],
'dateLastActivity': !exists(json, 'DateLastActivity') ? undefined : (new Date(json['DateLastActivity'])),
'capabilities': !exists(json, 'Capabilities') ? undefined : DeviceInfoCapabilitiesFromJSON(json['Capabilities']),
'iconUrl': !exists(json, 'IconUrl') ? undefined : json['IconUrl'],
};
}
export function DeviceInfoToJSON(value?: DeviceInfo | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Name': value.name,
'AccessToken': value.accessToken,
'Id': value.id,
'LastUserName': value.lastUserName,
'AppName': value.appName,
'AppVersion': value.appVersion,
'LastUserId': value.lastUserId,
'DateLastActivity': value.dateLastActivity === undefined ? undefined : (value.dateLastActivity.toISOString()),
'Capabilities': DeviceInfoCapabilitiesToJSON(value.capabilities),
'IconUrl': value.iconUrl,
};
}