/* 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 { ClientCapabilitiesDtoDeviceProfile } from './ClientCapabilitiesDtoDeviceProfile';
import {
    ClientCapabilitiesDtoDeviceProfileFromJSON,
    ClientCapabilitiesDtoDeviceProfileFromJSONTyped,
    ClientCapabilitiesDtoDeviceProfileToJSON,
} from './ClientCapabilitiesDtoDeviceProfile';
import type { GeneralCommandType } from './GeneralCommandType';
import {
    GeneralCommandTypeFromJSON,
    GeneralCommandTypeFromJSONTyped,
    GeneralCommandTypeToJSON,
} from './GeneralCommandType';

/**
 * Client capabilities dto.
 * @export
 * @interface PostFullCapabilitiesRequest
 */
export interface PostFullCapabilitiesRequest {
    /**
     * Gets or sets the list of playable media types.
     * @type {Array<string>}
     * @memberof PostFullCapabilitiesRequest
     */
    playableMediaTypes?: Array<string>;
    /**
     * Gets or sets the list of supported commands.
     * @type {Array<GeneralCommandType>}
     * @memberof PostFullCapabilitiesRequest
     */
    supportedCommands?: Array<GeneralCommandType>;
    /**
     * Gets or sets a value indicating whether session supports media control.
     * @type {boolean}
     * @memberof PostFullCapabilitiesRequest
     */
    supportsMediaControl?: boolean;
    /**
     * Gets or sets a value indicating whether session supports content uploading.
     * @type {boolean}
     * @memberof PostFullCapabilitiesRequest
     */
    supportsContentUploading?: boolean;
    /**
     * Gets or sets the message callback url.
     * @type {string}
     * @memberof PostFullCapabilitiesRequest
     */
    messageCallbackUrl?: string | null;
    /**
     * Gets or sets a value indicating whether session supports a persistent identifier.
     * @type {boolean}
     * @memberof PostFullCapabilitiesRequest
     */
    supportsPersistentIdentifier?: boolean;
    /**
     * Gets or sets a value indicating whether session supports sync.
     * @type {boolean}
     * @memberof PostFullCapabilitiesRequest
     */
    supportsSync?: boolean;
    /**
     * 
     * @type {ClientCapabilitiesDtoDeviceProfile}
     * @memberof PostFullCapabilitiesRequest
     */
    deviceProfile?: ClientCapabilitiesDtoDeviceProfile | null;
    /**
     * Gets or sets the app store url.
     * @type {string}
     * @memberof PostFullCapabilitiesRequest
     */
    appStoreUrl?: string | null;
    /**
     * Gets or sets the icon url.
     * @type {string}
     * @memberof PostFullCapabilitiesRequest
     */
    iconUrl?: string | null;
}

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

    return isInstance;
}

export function PostFullCapabilitiesRequestFromJSON(json: any): PostFullCapabilitiesRequest {
    return PostFullCapabilitiesRequestFromJSONTyped(json, false);
}

export function PostFullCapabilitiesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostFullCapabilitiesRequest {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'playableMediaTypes': !exists(json, 'PlayableMediaTypes') ? undefined : json['PlayableMediaTypes'],
        'supportedCommands': !exists(json, 'SupportedCommands') ? undefined : ((json['SupportedCommands'] as Array<any>).map(GeneralCommandTypeFromJSON)),
        'supportsMediaControl': !exists(json, 'SupportsMediaControl') ? undefined : json['SupportsMediaControl'],
        'supportsContentUploading': !exists(json, 'SupportsContentUploading') ? undefined : json['SupportsContentUploading'],
        'messageCallbackUrl': !exists(json, 'MessageCallbackUrl') ? undefined : json['MessageCallbackUrl'],
        'supportsPersistentIdentifier': !exists(json, 'SupportsPersistentIdentifier') ? undefined : json['SupportsPersistentIdentifier'],
        'supportsSync': !exists(json, 'SupportsSync') ? undefined : json['SupportsSync'],
        'deviceProfile': !exists(json, 'DeviceProfile') ? undefined : ClientCapabilitiesDtoDeviceProfileFromJSON(json['DeviceProfile']),
        'appStoreUrl': !exists(json, 'AppStoreUrl') ? undefined : json['AppStoreUrl'],
        'iconUrl': !exists(json, 'IconUrl') ? undefined : json['IconUrl'],
    };
}

export function PostFullCapabilitiesRequestToJSON(value?: PostFullCapabilitiesRequest | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'PlayableMediaTypes': value.playableMediaTypes,
        'SupportedCommands': value.supportedCommands === undefined ? undefined : ((value.supportedCommands as Array<any>).map(GeneralCommandTypeToJSON)),
        'SupportsMediaControl': value.supportsMediaControl,
        'SupportsContentUploading': value.supportsContentUploading,
        'MessageCallbackUrl': value.messageCallbackUrl,
        'SupportsPersistentIdentifier': value.supportsPersistentIdentifier,
        'SupportsSync': value.supportsSync,
        'DeviceProfile': ClientCapabilitiesDtoDeviceProfileToJSON(value.deviceProfile),
        'AppStoreUrl': value.appStoreUrl,
        'IconUrl': value.iconUrl,
    };
}

