/* 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 { ImageOption } from './ImageOption';
import {
    ImageOptionFromJSON,
    ImageOptionFromJSONTyped,
    ImageOptionToJSON,
} from './ImageOption';

/**
 * 
 * @export
 * @interface TypeOptions
 */
export interface TypeOptions {
    /**
     * 
     * @type {string}
     * @memberof TypeOptions
     */
    type?: string | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof TypeOptions
     */
    metadataFetchers?: Array<string> | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof TypeOptions
     */
    metadataFetcherOrder?: Array<string> | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof TypeOptions
     */
    imageFetchers?: Array<string> | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof TypeOptions
     */
    imageFetcherOrder?: Array<string> | null;
    /**
     * 
     * @type {Array<ImageOption>}
     * @memberof TypeOptions
     */
    imageOptions?: Array<ImageOption> | null;
}

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

    return isInstance;
}

export function TypeOptionsFromJSON(json: any): TypeOptions {
    return TypeOptionsFromJSONTyped(json, false);
}

export function TypeOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeOptions {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'type': !exists(json, 'Type') ? undefined : json['Type'],
        'metadataFetchers': !exists(json, 'MetadataFetchers') ? undefined : json['MetadataFetchers'],
        'metadataFetcherOrder': !exists(json, 'MetadataFetcherOrder') ? undefined : json['MetadataFetcherOrder'],
        'imageFetchers': !exists(json, 'ImageFetchers') ? undefined : json['ImageFetchers'],
        'imageFetcherOrder': !exists(json, 'ImageFetcherOrder') ? undefined : json['ImageFetcherOrder'],
        'imageOptions': !exists(json, 'ImageOptions') ? undefined : (json['ImageOptions'] === null ? null : (json['ImageOptions'] as Array<any>).map(ImageOptionFromJSON)),
    };
}

export function TypeOptionsToJSON(value?: TypeOptions | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Type': value.type,
        'MetadataFetchers': value.metadataFetchers,
        'MetadataFetcherOrder': value.metadataFetcherOrder,
        'ImageFetchers': value.imageFetchers,
        'ImageFetcherOrder': value.imageFetcherOrder,
        'ImageOptions': value.imageOptions === undefined ? undefined : (value.imageOptions === null ? null : (value.imageOptions as Array<any>).map(ImageOptionToJSON)),
    };
}

