/* 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';
/**
 * 
 * @export
 * @interface SongInfo
 */
export interface SongInfo {
    /**
     * Gets or sets the name.
     * @type {string}
     * @memberof SongInfo
     */
    name?: string | null;
    /**
     * Gets or sets the original title.
     * @type {string}
     * @memberof SongInfo
     */
    originalTitle?: string | null;
    /**
     * Gets or sets the path.
     * @type {string}
     * @memberof SongInfo
     */
    path?: string | null;
    /**
     * Gets or sets the metadata language.
     * @type {string}
     * @memberof SongInfo
     */
    metadataLanguage?: string | null;
    /**
     * Gets or sets the metadata country code.
     * @type {string}
     * @memberof SongInfo
     */
    metadataCountryCode?: string | null;
    /**
     * Gets or sets the provider ids.
     * @type {{ [key: string]: string; }}
     * @memberof SongInfo
     */
    providerIds?: { [key: string]: string; } | null;
    /**
     * Gets or sets the year.
     * @type {number}
     * @memberof SongInfo
     */
    year?: number | null;
    /**
     * 
     * @type {number}
     * @memberof SongInfo
     */
    indexNumber?: number | null;
    /**
     * 
     * @type {number}
     * @memberof SongInfo
     */
    parentIndexNumber?: number | null;
    /**
     * 
     * @type {Date}
     * @memberof SongInfo
     */
    premiereDate?: Date | null;
    /**
     * 
     * @type {boolean}
     * @memberof SongInfo
     */
    isAutomated?: boolean;
    /**
     * 
     * @type {Array<string>}
     * @memberof SongInfo
     */
    albumArtists?: Array<string> | null;
    /**
     * 
     * @type {string}
     * @memberof SongInfo
     */
    album?: string | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof SongInfo
     */
    artists?: Array<string> | null;
}

/**
 * Check if a given object implements the SongInfo interface.
 */
export function instanceOfSongInfo(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function SongInfoFromJSON(json: any): SongInfo {
    return SongInfoFromJSONTyped(json, false);
}

export function SongInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SongInfo {
    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'],
        'album': !exists(json, 'Album') ? undefined : json['Album'],
        'artists': !exists(json, 'Artists') ? undefined : json['Artists'],
    };
}

export function SongInfoToJSON(value?: SongInfo | 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,
        'Album': value.album,
        'Artists': value.artists,
    };
}

