/* 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 { ExternalIdMediaType } from './ExternalIdMediaType';
import {
    ExternalIdMediaTypeFromJSON,
    ExternalIdMediaTypeFromJSONTyped,
    ExternalIdMediaTypeToJSON,
} from './ExternalIdMediaType';

/**
 * Represents the external id information for serialization to the client.
 * @export
 * @interface ExternalIdInfo
 */
export interface ExternalIdInfo {
    /**
     * Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
     * @type {string}
     * @memberof ExternalIdInfo
     */
    name?: string;
    /**
     * Gets or sets the unique key for this id. This key should be unique across all providers.
     * @type {string}
     * @memberof ExternalIdInfo
     */
    key?: string;
    /**
     * 
     * @type {ExternalIdMediaType}
     * @memberof ExternalIdInfo
     */
    type?: ExternalIdMediaType | null;
    /**
     * Gets or sets the URL format string.
     * @type {string}
     * @memberof ExternalIdInfo
     */
    urlFormatString?: string | null;
}

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

    return isInstance;
}

export function ExternalIdInfoFromJSON(json: any): ExternalIdInfo {
    return ExternalIdInfoFromJSONTyped(json, false);
}

export function ExternalIdInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExternalIdInfo {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'name': !exists(json, 'Name') ? undefined : json['Name'],
        'key': !exists(json, 'Key') ? undefined : json['Key'],
        'type': !exists(json, 'Type') ? undefined : ExternalIdMediaTypeFromJSON(json['Type']),
        'urlFormatString': !exists(json, 'UrlFormatString') ? undefined : json['UrlFormatString'],
    };
}

export function ExternalIdInfoToJSON(value?: ExternalIdInfo | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Name': value.name,
        'Key': value.key,
        'Type': ExternalIdMediaTypeToJSON(value.type),
        'UrlFormatString': value.urlFormatString,
    };
}

