177 lines
5.2 KiB
TypeScript
177 lines
5.2 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 { SongInfo } from './SongInfo';
|
||
|
import {
|
||
|
SongInfoFromJSON,
|
||
|
SongInfoFromJSONTyped,
|
||
|
SongInfoToJSON,
|
||
|
} from './SongInfo';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @export
|
||
|
* @interface AlbumInfo
|
||
|
*/
|
||
|
export interface AlbumInfo {
|
||
|
/**
|
||
|
* Gets or sets the name.
|
||
|
* @type {string}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
name?: string | null;
|
||
|
/**
|
||
|
* Gets or sets the original title.
|
||
|
* @type {string}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
originalTitle?: string | null;
|
||
|
/**
|
||
|
* Gets or sets the path.
|
||
|
* @type {string}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
path?: string | null;
|
||
|
/**
|
||
|
* Gets or sets the metadata language.
|
||
|
* @type {string}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
metadataLanguage?: string | null;
|
||
|
/**
|
||
|
* Gets or sets the metadata country code.
|
||
|
* @type {string}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
metadataCountryCode?: string | null;
|
||
|
/**
|
||
|
* Gets or sets the provider ids.
|
||
|
* @type {{ [key: string]: string; }}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
providerIds?: { [key: string]: string; } | null;
|
||
|
/**
|
||
|
* Gets or sets the year.
|
||
|
* @type {number}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
year?: number | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
indexNumber?: number | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {number}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
parentIndexNumber?: number | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {Date}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
premiereDate?: Date | null;
|
||
|
/**
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
isAutomated?: boolean;
|
||
|
/**
|
||
|
* Gets or sets the album artist.
|
||
|
* @type {Array<string>}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
albumArtists?: Array<string>;
|
||
|
/**
|
||
|
* Gets or sets the artist provider ids.
|
||
|
* @type {{ [key: string]: string; }}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
artistProviderIds?: { [key: string]: string; };
|
||
|
/**
|
||
|
*
|
||
|
* @type {Array<SongInfo>}
|
||
|
* @memberof AlbumInfo
|
||
|
*/
|
||
|
songInfos?: Array<SongInfo>;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check if a given object implements the AlbumInfo interface.
|
||
|
*/
|
||
|
export function instanceOfAlbumInfo(value: object): boolean {
|
||
|
let isInstance = true;
|
||
|
|
||
|
return isInstance;
|
||
|
}
|
||
|
|
||
|
export function AlbumInfoFromJSON(json: any): AlbumInfo {
|
||
|
return AlbumInfoFromJSONTyped(json, false);
|
||
|
}
|
||
|
|
||
|
export function AlbumInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlbumInfo {
|
||
|
if ((json === undefined) || (json === null)) {
|
||
|
return json;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'name': !exists(json, 'Name') ? undefined : json['Name'],
|
||
|
'originalTitle': !exists(json, 'OriginalTitle') ? undefined : json['OriginalTitle'],
|
||
|
'path': !exists(json, 'Path') ? undefined : json['Path'],
|
||
|
'metadataLanguage': !exists(json, 'MetadataLanguage') ? undefined : json['MetadataLanguage'],
|
||
|
'metadataCountryCode': !exists(json, 'MetadataCountryCode') ? undefined : json['MetadataCountryCode'],
|
||
|
'providerIds': !exists(json, 'ProviderIds') ? undefined : json['ProviderIds'],
|
||
|
'year': !exists(json, 'Year') ? undefined : json['Year'],
|
||
|
'indexNumber': !exists(json, 'IndexNumber') ? undefined : json['IndexNumber'],
|
||
|
'parentIndexNumber': !exists(json, 'ParentIndexNumber') ? undefined : json['ParentIndexNumber'],
|
||
|
'premiereDate': !exists(json, 'PremiereDate') ? undefined : (json['PremiereDate'] === null ? null : new Date(json['PremiereDate'])),
|
||
|
'isAutomated': !exists(json, 'IsAutomated') ? undefined : json['IsAutomated'],
|
||
|
'albumArtists': !exists(json, 'AlbumArtists') ? undefined : json['AlbumArtists'],
|
||
|
'artistProviderIds': !exists(json, 'ArtistProviderIds') ? undefined : json['ArtistProviderIds'],
|
||
|
'songInfos': !exists(json, 'SongInfos') ? undefined : ((json['SongInfos'] as Array<any>).map(SongInfoFromJSON)),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function AlbumInfoToJSON(value?: AlbumInfo | null): any {
|
||
|
if (value === undefined) {
|
||
|
return undefined;
|
||
|
}
|
||
|
if (value === null) {
|
||
|
return null;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'Name': value.name,
|
||
|
'OriginalTitle': value.originalTitle,
|
||
|
'Path': value.path,
|
||
|
'MetadataLanguage': value.metadataLanguage,
|
||
|
'MetadataCountryCode': value.metadataCountryCode,
|
||
|
'ProviderIds': value.providerIds,
|
||
|
'Year': value.year,
|
||
|
'IndexNumber': value.indexNumber,
|
||
|
'ParentIndexNumber': value.parentIndexNumber,
|
||
|
'PremiereDate': value.premiereDate === undefined ? undefined : (value.premiereDate === null ? null : value.premiereDate.toISOString()),
|
||
|
'IsAutomated': value.isAutomated,
|
||
|
'AlbumArtists': value.albumArtists,
|
||
|
'ArtistProviderIds': value.artistProviderIds,
|
||
|
'SongInfos': value.songInfos === undefined ? undefined : ((value.songInfos as Array<any>).map(SongInfoToJSON)),
|
||
|
};
|
||
|
}
|
||
|
|