/* 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 { SubtitlePlaybackMode } from './SubtitlePlaybackMode';
import {
    SubtitlePlaybackModeFromJSON,
    SubtitlePlaybackModeFromJSONTyped,
    SubtitlePlaybackModeToJSON,
} from './SubtitlePlaybackMode';

/**
 * Gets or sets the configuration.
 * @export
 * @interface UserDtoConfiguration
 */
export interface UserDtoConfiguration {
    /**
     * Gets or sets the audio language preference.
     * @type {string}
     * @memberof UserDtoConfiguration
     */
    audioLanguagePreference?: string | null;
    /**
     * Gets or sets a value indicating whether [play default audio track].
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    playDefaultAudioTrack?: boolean;
    /**
     * Gets or sets the subtitle language preference.
     * @type {string}
     * @memberof UserDtoConfiguration
     */
    subtitleLanguagePreference?: string | null;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    displayMissingEpisodes?: boolean;
    /**
     * 
     * @type {Array<string>}
     * @memberof UserDtoConfiguration
     */
    groupedFolders?: Array<string>;
    /**
     * 
     * @type {SubtitlePlaybackMode}
     * @memberof UserDtoConfiguration
     */
    subtitleMode?: SubtitlePlaybackMode;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    displayCollectionsView?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    enableLocalPassword?: boolean;
    /**
     * 
     * @type {Array<string>}
     * @memberof UserDtoConfiguration
     */
    orderedViews?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof UserDtoConfiguration
     */
    latestItemsExcludes?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof UserDtoConfiguration
     */
    myMediaExcludes?: Array<string>;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    hidePlayedInLatest?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    rememberAudioSelections?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    rememberSubtitleSelections?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UserDtoConfiguration
     */
    enableNextEpisodeAutoPlay?: boolean;
}

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

    return isInstance;
}

export function UserDtoConfigurationFromJSON(json: any): UserDtoConfiguration {
    return UserDtoConfigurationFromJSONTyped(json, false);
}

export function UserDtoConfigurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDtoConfiguration {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'audioLanguagePreference': !exists(json, 'AudioLanguagePreference') ? undefined : json['AudioLanguagePreference'],
        'playDefaultAudioTrack': !exists(json, 'PlayDefaultAudioTrack') ? undefined : json['PlayDefaultAudioTrack'],
        'subtitleLanguagePreference': !exists(json, 'SubtitleLanguagePreference') ? undefined : json['SubtitleLanguagePreference'],
        'displayMissingEpisodes': !exists(json, 'DisplayMissingEpisodes') ? undefined : json['DisplayMissingEpisodes'],
        'groupedFolders': !exists(json, 'GroupedFolders') ? undefined : json['GroupedFolders'],
        'subtitleMode': !exists(json, 'SubtitleMode') ? undefined : SubtitlePlaybackModeFromJSON(json['SubtitleMode']),
        'displayCollectionsView': !exists(json, 'DisplayCollectionsView') ? undefined : json['DisplayCollectionsView'],
        'enableLocalPassword': !exists(json, 'EnableLocalPassword') ? undefined : json['EnableLocalPassword'],
        'orderedViews': !exists(json, 'OrderedViews') ? undefined : json['OrderedViews'],
        'latestItemsExcludes': !exists(json, 'LatestItemsExcludes') ? undefined : json['LatestItemsExcludes'],
        'myMediaExcludes': !exists(json, 'MyMediaExcludes') ? undefined : json['MyMediaExcludes'],
        'hidePlayedInLatest': !exists(json, 'HidePlayedInLatest') ? undefined : json['HidePlayedInLatest'],
        'rememberAudioSelections': !exists(json, 'RememberAudioSelections') ? undefined : json['RememberAudioSelections'],
        'rememberSubtitleSelections': !exists(json, 'RememberSubtitleSelections') ? undefined : json['RememberSubtitleSelections'],
        'enableNextEpisodeAutoPlay': !exists(json, 'EnableNextEpisodeAutoPlay') ? undefined : json['EnableNextEpisodeAutoPlay'],
    };
}

export function UserDtoConfigurationToJSON(value?: UserDtoConfiguration | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'AudioLanguagePreference': value.audioLanguagePreference,
        'PlayDefaultAudioTrack': value.playDefaultAudioTrack,
        'SubtitleLanguagePreference': value.subtitleLanguagePreference,
        'DisplayMissingEpisodes': value.displayMissingEpisodes,
        'GroupedFolders': value.groupedFolders,
        'SubtitleMode': SubtitlePlaybackModeToJSON(value.subtitleMode),
        'DisplayCollectionsView': value.displayCollectionsView,
        'EnableLocalPassword': value.enableLocalPassword,
        'OrderedViews': value.orderedViews,
        'LatestItemsExcludes': value.latestItemsExcludes,
        'MyMediaExcludes': value.myMediaExcludes,
        'HidePlayedInLatest': value.hidePlayedInLatest,
        'RememberAudioSelections': value.rememberAudioSelections,
        'RememberSubtitleSelections': value.rememberSubtitleSelections,
        'EnableNextEpisodeAutoPlay': value.enableNextEpisodeAutoPlay,
    };
}

