151 lines
4.0 KiB
TypeScript
151 lines
4.0 KiB
TypeScript
|
/* 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 { MediaUrl } from './MediaUrl';
|
||
|
import {
|
||
|
MediaUrlFromJSON,
|
||
|
MediaUrlFromJSONTyped,
|
||
|
MediaUrlToJSON,
|
||
|
} from './MediaUrl';
|
||
|
|
||
|
/**
|
||
|
* Class BaseItem.
|
||
|
* @export
|
||
|
* @interface BaseItem
|
||
|
*/
|
||
|
export interface BaseItem {
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
size?: number | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {string}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
container?: string | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
readonly isHD?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
isShortcut?: boolean;
|
||
|
/**
|
||
|
*
|
||
|
* @type {string}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
shortcutPath?: string | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
width?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
height?: number;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<string>}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
extraIds?: Array<string> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Date}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
dateLastSaved?: Date;
|
||
|
/**
|
||
|
* Gets or sets the remote trailers.
|
||
|
* @type {Array<MediaUrl>}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
remoteTrailers?: Array<MediaUrl> | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof BaseItem
|
||
|
*/
|
||
|
readonly supportsExternalTransfer?: boolean;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check if a given object implements the BaseItem interface.
|
||
|
*/
|
||
|
export function instanceOfBaseItem(value: object): boolean {
|
||
|
let isInstance = true;
|
||
|
|
||
|
return isInstance;
|
||
|
}
|
||
|
|
||
|
export function BaseItemFromJSON(json: any): BaseItem {
|
||
|
return BaseItemFromJSONTyped(json, false);
|
||
|
}
|
||
|
|
||
|
export function BaseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BaseItem {
|
||
|
if ((json === undefined) || (json === null)) {
|
||
|
return json;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'size': !exists(json, 'Size') ? undefined : json['Size'],
|
||
|
'container': !exists(json, 'Container') ? undefined : json['Container'],
|
||
|
'isHD': !exists(json, 'IsHD') ? undefined : json['IsHD'],
|
||
|
'isShortcut': !exists(json, 'IsShortcut') ? undefined : json['IsShortcut'],
|
||
|
'shortcutPath': !exists(json, 'ShortcutPath') ? undefined : json['ShortcutPath'],
|
||
|
'width': !exists(json, 'Width') ? undefined : json['Width'],
|
||
|
'height': !exists(json, 'Height') ? undefined : json['Height'],
|
||
|
'extraIds': !exists(json, 'ExtraIds') ? undefined : json['ExtraIds'],
|
||
|
'dateLastSaved': !exists(json, 'DateLastSaved') ? undefined : (new Date(json['DateLastSaved'])),
|
||
|
'remoteTrailers': !exists(json, 'RemoteTrailers') ? undefined : (json['RemoteTrailers'] === null ? null : (json['RemoteTrailers'] as Array<any>).map(MediaUrlFromJSON)),
|
||
|
'supportsExternalTransfer': !exists(json, 'SupportsExternalTransfer') ? undefined : json['SupportsExternalTransfer'],
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function BaseItemToJSON(value?: BaseItem | null): any {
|
||
|
if (value === undefined) {
|
||
|
return undefined;
|
||
|
}
|
||
|
if (value === null) {
|
||
|
return null;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'Size': value.size,
|
||
|
'Container': value.container,
|
||
|
'IsShortcut': value.isShortcut,
|
||
|
'ShortcutPath': value.shortcutPath,
|
||
|
'Width': value.width,
|
||
|
'Height': value.height,
|
||
|
'ExtraIds': value.extraIds,
|
||
|
'DateLastSaved': value.dateLastSaved === undefined ? undefined : (value.dateLastSaved.toISOString()),
|
||
|
'RemoteTrailers': value.remoteTrailers === undefined ? undefined : (value.remoteTrailers === null ? null : (value.remoteTrailers as Array<any>).map(MediaUrlToJSON)),
|
||
|
};
|
||
|
}
|
||
|
|