/* 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 { ScrollDirection } from './ScrollDirection';
import {
    ScrollDirectionFromJSON,
    ScrollDirectionFromJSONTyped,
    ScrollDirectionToJSON,
} from './ScrollDirection';
import type { SortOrder } from './SortOrder';
import {
    SortOrderFromJSON,
    SortOrderFromJSONTyped,
    SortOrderToJSON,
} from './SortOrder';

/**
 * Defines the display preferences for any item that supports them (usually Folders).
 * @export
 * @interface UpdateDisplayPreferencesRequest
 */
export interface UpdateDisplayPreferencesRequest {
    /**
     * Gets or sets the user id.
     * @type {string}
     * @memberof UpdateDisplayPreferencesRequest
     */
    id?: string | null;
    /**
     * Gets or sets the type of the view.
     * @type {string}
     * @memberof UpdateDisplayPreferencesRequest
     */
    viewType?: string | null;
    /**
     * Gets or sets the sort by.
     * @type {string}
     * @memberof UpdateDisplayPreferencesRequest
     */
    sortBy?: string | null;
    /**
     * Gets or sets the index by.
     * @type {string}
     * @memberof UpdateDisplayPreferencesRequest
     */
    indexBy?: string | null;
    /**
     * Gets or sets a value indicating whether [remember indexing].
     * @type {boolean}
     * @memberof UpdateDisplayPreferencesRequest
     */
    rememberIndexing?: boolean;
    /**
     * Gets or sets the height of the primary image.
     * @type {number}
     * @memberof UpdateDisplayPreferencesRequest
     */
    primaryImageHeight?: number;
    /**
     * Gets or sets the width of the primary image.
     * @type {number}
     * @memberof UpdateDisplayPreferencesRequest
     */
    primaryImageWidth?: number;
    /**
     * Gets or sets the custom prefs.
     * @type {{ [key: string]: string; }}
     * @memberof UpdateDisplayPreferencesRequest
     */
    customPrefs?: { [key: string]: string; };
    /**
     * 
     * @type {ScrollDirection}
     * @memberof UpdateDisplayPreferencesRequest
     */
    scrollDirection?: ScrollDirection;
    /**
     * Gets or sets a value indicating whether to show backdrops on this item.
     * @type {boolean}
     * @memberof UpdateDisplayPreferencesRequest
     */
    showBackdrop?: boolean;
    /**
     * Gets or sets a value indicating whether [remember sorting].
     * @type {boolean}
     * @memberof UpdateDisplayPreferencesRequest
     */
    rememberSorting?: boolean;
    /**
     * 
     * @type {SortOrder}
     * @memberof UpdateDisplayPreferencesRequest
     */
    sortOrder?: SortOrder;
    /**
     * Gets or sets a value indicating whether [show sidebar].
     * @type {boolean}
     * @memberof UpdateDisplayPreferencesRequest
     */
    showSidebar?: boolean;
    /**
     * Gets or sets the client.
     * @type {string}
     * @memberof UpdateDisplayPreferencesRequest
     */
    client?: string | null;
}

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

    return isInstance;
}

export function UpdateDisplayPreferencesRequestFromJSON(json: any): UpdateDisplayPreferencesRequest {
    return UpdateDisplayPreferencesRequestFromJSONTyped(json, false);
}

export function UpdateDisplayPreferencesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDisplayPreferencesRequest {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': !exists(json, 'Id') ? undefined : json['Id'],
        'viewType': !exists(json, 'ViewType') ? undefined : json['ViewType'],
        'sortBy': !exists(json, 'SortBy') ? undefined : json['SortBy'],
        'indexBy': !exists(json, 'IndexBy') ? undefined : json['IndexBy'],
        'rememberIndexing': !exists(json, 'RememberIndexing') ? undefined : json['RememberIndexing'],
        'primaryImageHeight': !exists(json, 'PrimaryImageHeight') ? undefined : json['PrimaryImageHeight'],
        'primaryImageWidth': !exists(json, 'PrimaryImageWidth') ? undefined : json['PrimaryImageWidth'],
        'customPrefs': !exists(json, 'CustomPrefs') ? undefined : json['CustomPrefs'],
        'scrollDirection': !exists(json, 'ScrollDirection') ? undefined : ScrollDirectionFromJSON(json['ScrollDirection']),
        'showBackdrop': !exists(json, 'ShowBackdrop') ? undefined : json['ShowBackdrop'],
        'rememberSorting': !exists(json, 'RememberSorting') ? undefined : json['RememberSorting'],
        'sortOrder': !exists(json, 'SortOrder') ? undefined : SortOrderFromJSON(json['SortOrder']),
        'showSidebar': !exists(json, 'ShowSidebar') ? undefined : json['ShowSidebar'],
        'client': !exists(json, 'Client') ? undefined : json['Client'],
    };
}

export function UpdateDisplayPreferencesRequestToJSON(value?: UpdateDisplayPreferencesRequest | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Id': value.id,
        'ViewType': value.viewType,
        'SortBy': value.sortBy,
        'IndexBy': value.indexBy,
        'RememberIndexing': value.rememberIndexing,
        'PrimaryImageHeight': value.primaryImageHeight,
        'PrimaryImageWidth': value.primaryImageWidth,
        'CustomPrefs': value.customPrefs,
        'ScrollDirection': ScrollDirectionToJSON(value.scrollDirection),
        'ShowBackdrop': value.showBackdrop,
        'RememberSorting': value.rememberSorting,
        'SortOrder': SortOrderToJSON(value.sortOrder),
        'ShowSidebar': value.showSidebar,
        'Client': value.client,
    };
}

