/* 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 { ImageSavingConvention } from './ImageSavingConvention';
import {
    ImageSavingConventionFromJSON,
    ImageSavingConventionFromJSONTyped,
    ImageSavingConventionToJSON,
} from './ImageSavingConvention';
import type { MetadataOptions } from './MetadataOptions';
import {
    MetadataOptionsFromJSON,
    MetadataOptionsFromJSONTyped,
    MetadataOptionsToJSON,
} from './MetadataOptions';
import type { NameValuePair } from './NameValuePair';
import {
    NameValuePairFromJSON,
    NameValuePairFromJSONTyped,
    NameValuePairToJSON,
} from './NameValuePair';
import type { PathSubstitution } from './PathSubstitution';
import {
    PathSubstitutionFromJSON,
    PathSubstitutionFromJSONTyped,
    PathSubstitutionToJSON,
} from './PathSubstitution';
import type { RepositoryInfo } from './RepositoryInfo';
import {
    RepositoryInfoFromJSON,
    RepositoryInfoFromJSONTyped,
    RepositoryInfoToJSON,
} from './RepositoryInfo';

/**
 * Represents the server configuration.
 * @export
 * @interface UpdateConfigurationRequest
 */
export interface UpdateConfigurationRequest {
    /**
     * Gets or sets the number of days we should retain log files.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    logFileRetentionDays?: number;
    /**
     * Gets or sets a value indicating whether this instance is first run.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    isStartupWizardCompleted?: boolean;
    /**
     * Gets or sets the cache path.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    cachePath?: string | null;
    /**
     * Gets or sets the last known version that was ran using the configuration.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    previousVersion?: string | null;
    /**
     * Gets or sets the stringified PreviousVersion to be stored/loaded,
     * because System.Version itself isn't xml-serializable.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    previousVersionStr?: string | null;
    /**
     * Gets or sets a value indicating whether to enable prometheus metrics exporting.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableMetrics?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableNormalizedItemByNameIds?: boolean;
    /**
     * Gets or sets a value indicating whether this instance is port authorized.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    isPortAuthorized?: boolean;
    /**
     * Gets or sets a value indicating whether quick connect is available for use on this server.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    quickConnectAvailable?: boolean;
    /**
     * Gets or sets a value indicating whether [enable case sensitive item ids].
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableCaseSensitiveItemIds?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    disableLiveTvChannelUserDataName?: boolean;
    /**
     * Gets or sets the metadata path.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    metadataPath?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    metadataNetworkPath?: string;
    /**
     * Gets or sets the preferred metadata language.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    preferredMetadataLanguage?: string;
    /**
     * Gets or sets the metadata country code.
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    metadataCountryCode?: string;
    /**
     * Gets or sets characters to be replaced with a ' ' in strings to create a sort name.
     * @type {Array<string>}
     * @memberof UpdateConfigurationRequest
     */
    sortReplaceCharacters?: Array<string>;
    /**
     * Gets or sets characters to be removed from strings to create a sort name.
     * @type {Array<string>}
     * @memberof UpdateConfigurationRequest
     */
    sortRemoveCharacters?: Array<string>;
    /**
     * Gets or sets words to be removed from strings to create a sort name.
     * @type {Array<string>}
     * @memberof UpdateConfigurationRequest
     */
    sortRemoveWords?: Array<string>;
    /**
     * Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    minResumePct?: number;
    /**
     * Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    maxResumePct?: number;
    /**
     * Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    minResumeDurationSeconds?: number;
    /**
     * Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    minAudiobookResume?: number;
    /**
     * Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    maxAudiobookResume?: number;
    /**
     * Gets or sets the delay in seconds that we will wait after a file system change to try and discover what has been added/removed
     * Some delay is necessary with some items because their creation is not atomic.  It involves the creation of several
     * different directories and files.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    libraryMonitorDelay?: number;
    /**
     * 
     * @type {ImageSavingConvention}
     * @memberof UpdateConfigurationRequest
     */
    imageSavingConvention?: ImageSavingConvention;
    /**
     * 
     * @type {Array<MetadataOptions>}
     * @memberof UpdateConfigurationRequest
     */
    metadataOptions?: Array<MetadataOptions>;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    skipDeserializationForBasicTypes?: boolean;
    /**
     * 
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    serverName?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdateConfigurationRequest
     */
    uICulture?: string;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    saveMetadataHidden?: boolean;
    /**
     * 
     * @type {Array<NameValuePair>}
     * @memberof UpdateConfigurationRequest
     */
    contentTypes?: Array<NameValuePair>;
    /**
     * 
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    remoteClientBitrateLimit?: number;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableFolderView?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableGroupingIntoCollections?: boolean;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    displaySpecialsWithinSeasons?: boolean;
    /**
     * 
     * @type {Array<string>}
     * @memberof UpdateConfigurationRequest
     */
    codecsUsed?: Array<string>;
    /**
     * 
     * @type {Array<RepositoryInfo>}
     * @memberof UpdateConfigurationRequest
     */
    pluginRepositories?: Array<RepositoryInfo>;
    /**
     * 
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableExternalContentInSuggestions?: boolean;
    /**
     * 
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    imageExtractionTimeoutMs?: number;
    /**
     * 
     * @type {Array<PathSubstitution>}
     * @memberof UpdateConfigurationRequest
     */
    pathSubstitutions?: Array<PathSubstitution>;
    /**
     * Gets or sets a value indicating whether slow server responses should be logged as a warning.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    enableSlowResponseWarning?: boolean;
    /**
     * Gets or sets the threshold for the slow response time warning in ms.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    slowResponseThresholdMs?: number;
    /**
     * Gets or sets the cors hosts.
     * @type {Array<string>}
     * @memberof UpdateConfigurationRequest
     */
    corsHosts?: Array<string>;
    /**
     * Gets or sets the number of days we should retain activity logs.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    activityLogRetentionDays?: number | null;
    /**
     * Gets or sets the how the library scan fans out.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    libraryScanFanoutConcurrency?: number;
    /**
     * Gets or sets the how many metadata refreshes can run concurrently.
     * @type {number}
     * @memberof UpdateConfigurationRequest
     */
    libraryMetadataRefreshConcurrency?: number;
    /**
     * Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    removeOldPlugins?: boolean;
    /**
     * Gets or sets a value indicating whether clients should be allowed to upload logs.
     * @type {boolean}
     * @memberof UpdateConfigurationRequest
     */
    allowClientLogUpload?: boolean;
}

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

    return isInstance;
}

export function UpdateConfigurationRequestFromJSON(json: any): UpdateConfigurationRequest {
    return UpdateConfigurationRequestFromJSONTyped(json, false);
}

export function UpdateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConfigurationRequest {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'logFileRetentionDays': !exists(json, 'LogFileRetentionDays') ? undefined : json['LogFileRetentionDays'],
        'isStartupWizardCompleted': !exists(json, 'IsStartupWizardCompleted') ? undefined : json['IsStartupWizardCompleted'],
        'cachePath': !exists(json, 'CachePath') ? undefined : json['CachePath'],
        'previousVersion': !exists(json, 'PreviousVersion') ? undefined : json['PreviousVersion'],
        'previousVersionStr': !exists(json, 'PreviousVersionStr') ? undefined : json['PreviousVersionStr'],
        'enableMetrics': !exists(json, 'EnableMetrics') ? undefined : json['EnableMetrics'],
        'enableNormalizedItemByNameIds': !exists(json, 'EnableNormalizedItemByNameIds') ? undefined : json['EnableNormalizedItemByNameIds'],
        'isPortAuthorized': !exists(json, 'IsPortAuthorized') ? undefined : json['IsPortAuthorized'],
        'quickConnectAvailable': !exists(json, 'QuickConnectAvailable') ? undefined : json['QuickConnectAvailable'],
        'enableCaseSensitiveItemIds': !exists(json, 'EnableCaseSensitiveItemIds') ? undefined : json['EnableCaseSensitiveItemIds'],
        'disableLiveTvChannelUserDataName': !exists(json, 'DisableLiveTvChannelUserDataName') ? undefined : json['DisableLiveTvChannelUserDataName'],
        'metadataPath': !exists(json, 'MetadataPath') ? undefined : json['MetadataPath'],
        'metadataNetworkPath': !exists(json, 'MetadataNetworkPath') ? undefined : json['MetadataNetworkPath'],
        'preferredMetadataLanguage': !exists(json, 'PreferredMetadataLanguage') ? undefined : json['PreferredMetadataLanguage'],
        'metadataCountryCode': !exists(json, 'MetadataCountryCode') ? undefined : json['MetadataCountryCode'],
        'sortReplaceCharacters': !exists(json, 'SortReplaceCharacters') ? undefined : json['SortReplaceCharacters'],
        'sortRemoveCharacters': !exists(json, 'SortRemoveCharacters') ? undefined : json['SortRemoveCharacters'],
        'sortRemoveWords': !exists(json, 'SortRemoveWords') ? undefined : json['SortRemoveWords'],
        'minResumePct': !exists(json, 'MinResumePct') ? undefined : json['MinResumePct'],
        'maxResumePct': !exists(json, 'MaxResumePct') ? undefined : json['MaxResumePct'],
        'minResumeDurationSeconds': !exists(json, 'MinResumeDurationSeconds') ? undefined : json['MinResumeDurationSeconds'],
        'minAudiobookResume': !exists(json, 'MinAudiobookResume') ? undefined : json['MinAudiobookResume'],
        'maxAudiobookResume': !exists(json, 'MaxAudiobookResume') ? undefined : json['MaxAudiobookResume'],
        'libraryMonitorDelay': !exists(json, 'LibraryMonitorDelay') ? undefined : json['LibraryMonitorDelay'],
        'imageSavingConvention': !exists(json, 'ImageSavingConvention') ? undefined : ImageSavingConventionFromJSON(json['ImageSavingConvention']),
        'metadataOptions': !exists(json, 'MetadataOptions') ? undefined : ((json['MetadataOptions'] as Array<any>).map(MetadataOptionsFromJSON)),
        'skipDeserializationForBasicTypes': !exists(json, 'SkipDeserializationForBasicTypes') ? undefined : json['SkipDeserializationForBasicTypes'],
        'serverName': !exists(json, 'ServerName') ? undefined : json['ServerName'],
        'uICulture': !exists(json, 'UICulture') ? undefined : json['UICulture'],
        'saveMetadataHidden': !exists(json, 'SaveMetadataHidden') ? undefined : json['SaveMetadataHidden'],
        'contentTypes': !exists(json, 'ContentTypes') ? undefined : ((json['ContentTypes'] as Array<any>).map(NameValuePairFromJSON)),
        'remoteClientBitrateLimit': !exists(json, 'RemoteClientBitrateLimit') ? undefined : json['RemoteClientBitrateLimit'],
        'enableFolderView': !exists(json, 'EnableFolderView') ? undefined : json['EnableFolderView'],
        'enableGroupingIntoCollections': !exists(json, 'EnableGroupingIntoCollections') ? undefined : json['EnableGroupingIntoCollections'],
        'displaySpecialsWithinSeasons': !exists(json, 'DisplaySpecialsWithinSeasons') ? undefined : json['DisplaySpecialsWithinSeasons'],
        'codecsUsed': !exists(json, 'CodecsUsed') ? undefined : json['CodecsUsed'],
        'pluginRepositories': !exists(json, 'PluginRepositories') ? undefined : ((json['PluginRepositories'] as Array<any>).map(RepositoryInfoFromJSON)),
        'enableExternalContentInSuggestions': !exists(json, 'EnableExternalContentInSuggestions') ? undefined : json['EnableExternalContentInSuggestions'],
        'imageExtractionTimeoutMs': !exists(json, 'ImageExtractionTimeoutMs') ? undefined : json['ImageExtractionTimeoutMs'],
        'pathSubstitutions': !exists(json, 'PathSubstitutions') ? undefined : ((json['PathSubstitutions'] as Array<any>).map(PathSubstitutionFromJSON)),
        'enableSlowResponseWarning': !exists(json, 'EnableSlowResponseWarning') ? undefined : json['EnableSlowResponseWarning'],
        'slowResponseThresholdMs': !exists(json, 'SlowResponseThresholdMs') ? undefined : json['SlowResponseThresholdMs'],
        'corsHosts': !exists(json, 'CorsHosts') ? undefined : json['CorsHosts'],
        'activityLogRetentionDays': !exists(json, 'ActivityLogRetentionDays') ? undefined : json['ActivityLogRetentionDays'],
        'libraryScanFanoutConcurrency': !exists(json, 'LibraryScanFanoutConcurrency') ? undefined : json['LibraryScanFanoutConcurrency'],
        'libraryMetadataRefreshConcurrency': !exists(json, 'LibraryMetadataRefreshConcurrency') ? undefined : json['LibraryMetadataRefreshConcurrency'],
        'removeOldPlugins': !exists(json, 'RemoveOldPlugins') ? undefined : json['RemoveOldPlugins'],
        'allowClientLogUpload': !exists(json, 'AllowClientLogUpload') ? undefined : json['AllowClientLogUpload'],
    };
}

export function UpdateConfigurationRequestToJSON(value?: UpdateConfigurationRequest | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'LogFileRetentionDays': value.logFileRetentionDays,
        'IsStartupWizardCompleted': value.isStartupWizardCompleted,
        'CachePath': value.cachePath,
        'PreviousVersion': value.previousVersion,
        'PreviousVersionStr': value.previousVersionStr,
        'EnableMetrics': value.enableMetrics,
        'EnableNormalizedItemByNameIds': value.enableNormalizedItemByNameIds,
        'IsPortAuthorized': value.isPortAuthorized,
        'QuickConnectAvailable': value.quickConnectAvailable,
        'EnableCaseSensitiveItemIds': value.enableCaseSensitiveItemIds,
        'DisableLiveTvChannelUserDataName': value.disableLiveTvChannelUserDataName,
        'MetadataPath': value.metadataPath,
        'MetadataNetworkPath': value.metadataNetworkPath,
        'PreferredMetadataLanguage': value.preferredMetadataLanguage,
        'MetadataCountryCode': value.metadataCountryCode,
        'SortReplaceCharacters': value.sortReplaceCharacters,
        'SortRemoveCharacters': value.sortRemoveCharacters,
        'SortRemoveWords': value.sortRemoveWords,
        'MinResumePct': value.minResumePct,
        'MaxResumePct': value.maxResumePct,
        'MinResumeDurationSeconds': value.minResumeDurationSeconds,
        'MinAudiobookResume': value.minAudiobookResume,
        'MaxAudiobookResume': value.maxAudiobookResume,
        'LibraryMonitorDelay': value.libraryMonitorDelay,
        'ImageSavingConvention': ImageSavingConventionToJSON(value.imageSavingConvention),
        'MetadataOptions': value.metadataOptions === undefined ? undefined : ((value.metadataOptions as Array<any>).map(MetadataOptionsToJSON)),
        'SkipDeserializationForBasicTypes': value.skipDeserializationForBasicTypes,
        'ServerName': value.serverName,
        'UICulture': value.uICulture,
        'SaveMetadataHidden': value.saveMetadataHidden,
        'ContentTypes': value.contentTypes === undefined ? undefined : ((value.contentTypes as Array<any>).map(NameValuePairToJSON)),
        'RemoteClientBitrateLimit': value.remoteClientBitrateLimit,
        'EnableFolderView': value.enableFolderView,
        'EnableGroupingIntoCollections': value.enableGroupingIntoCollections,
        'DisplaySpecialsWithinSeasons': value.displaySpecialsWithinSeasons,
        'CodecsUsed': value.codecsUsed,
        'PluginRepositories': value.pluginRepositories === undefined ? undefined : ((value.pluginRepositories as Array<any>).map(RepositoryInfoToJSON)),
        'EnableExternalContentInSuggestions': value.enableExternalContentInSuggestions,
        'ImageExtractionTimeoutMs': value.imageExtractionTimeoutMs,
        'PathSubstitutions': value.pathSubstitutions === undefined ? undefined : ((value.pathSubstitutions as Array<any>).map(PathSubstitutionToJSON)),
        'EnableSlowResponseWarning': value.enableSlowResponseWarning,
        'SlowResponseThresholdMs': value.slowResponseThresholdMs,
        'CorsHosts': value.corsHosts,
        'ActivityLogRetentionDays': value.activityLogRetentionDays,
        'LibraryScanFanoutConcurrency': value.libraryScanFanoutConcurrency,
        'LibraryMetadataRefreshConcurrency': value.libraryMetadataRefreshConcurrency,
        'RemoveOldPlugins': value.removeOldPlugins,
        'AllowClientLogUpload': value.allowClientLogUpload,
    };
}

