jellyfin-discord-bot/server/jellyfin/models/ServerConfiguration.ts

476 lines
19 KiB
TypeScript
Raw Normal View History

2023-05-04 23:34:53 +02:00
/* 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 ServerConfiguration
*/
export interface ServerConfiguration {
/**
* Gets or sets the number of days we should retain log files.
* @type {number}
* @memberof ServerConfiguration
*/
logFileRetentionDays?: number;
/**
* Gets or sets a value indicating whether this instance is first run.
* @type {boolean}
* @memberof ServerConfiguration
*/
isStartupWizardCompleted?: boolean;
/**
* Gets or sets the cache path.
* @type {string}
* @memberof ServerConfiguration
*/
cachePath?: string | null;
/**
* Gets or sets the last known version that was ran using the configuration.
* @type {string}
* @memberof ServerConfiguration
*/
previousVersion?: string | null;
/**
* Gets or sets the stringified PreviousVersion to be stored/loaded,
* because System.Version itself isn't xml-serializable.
* @type {string}
* @memberof ServerConfiguration
*/
previousVersionStr?: string | null;
/**
* Gets or sets a value indicating whether to enable prometheus metrics exporting.
* @type {boolean}
* @memberof ServerConfiguration
*/
enableMetrics?: boolean;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
enableNormalizedItemByNameIds?: boolean;
/**
* Gets or sets a value indicating whether this instance is port authorized.
* @type {boolean}
* @memberof ServerConfiguration
*/
isPortAuthorized?: boolean;
/**
* Gets or sets a value indicating whether quick connect is available for use on this server.
* @type {boolean}
* @memberof ServerConfiguration
*/
quickConnectAvailable?: boolean;
/**
* Gets or sets a value indicating whether [enable case sensitive item ids].
* @type {boolean}
* @memberof ServerConfiguration
*/
enableCaseSensitiveItemIds?: boolean;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
disableLiveTvChannelUserDataName?: boolean;
/**
* Gets or sets the metadata path.
* @type {string}
* @memberof ServerConfiguration
*/
metadataPath?: string;
/**
*
* @type {string}
* @memberof ServerConfiguration
*/
metadataNetworkPath?: string;
/**
* Gets or sets the preferred metadata language.
* @type {string}
* @memberof ServerConfiguration
*/
preferredMetadataLanguage?: string;
/**
* Gets or sets the metadata country code.
* @type {string}
* @memberof ServerConfiguration
*/
metadataCountryCode?: string;
/**
* Gets or sets characters to be replaced with a ' ' in strings to create a sort name.
* @type {Array<string>}
* @memberof ServerConfiguration
*/
sortReplaceCharacters?: Array<string>;
/**
* Gets or sets characters to be removed from strings to create a sort name.
* @type {Array<string>}
* @memberof ServerConfiguration
*/
sortRemoveCharacters?: Array<string>;
/**
* Gets or sets words to be removed from strings to create a sort name.
* @type {Array<string>}
* @memberof ServerConfiguration
*/
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 ServerConfiguration
*/
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 ServerConfiguration
*/
maxResumePct?: number;
/**
* Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
* @type {number}
* @memberof ServerConfiguration
*/
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 ServerConfiguration
*/
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 ServerConfiguration
*/
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 ServerConfiguration
*/
libraryMonitorDelay?: number;
/**
*
* @type {ImageSavingConvention}
* @memberof ServerConfiguration
*/
imageSavingConvention?: ImageSavingConvention;
/**
*
* @type {Array<MetadataOptions>}
* @memberof ServerConfiguration
*/
metadataOptions?: Array<MetadataOptions>;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
skipDeserializationForBasicTypes?: boolean;
/**
*
* @type {string}
* @memberof ServerConfiguration
*/
serverName?: string;
/**
*
* @type {string}
* @memberof ServerConfiguration
*/
uICulture?: string;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
saveMetadataHidden?: boolean;
/**
*
* @type {Array<NameValuePair>}
* @memberof ServerConfiguration
*/
contentTypes?: Array<NameValuePair>;
/**
*
* @type {number}
* @memberof ServerConfiguration
*/
remoteClientBitrateLimit?: number;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
enableFolderView?: boolean;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
enableGroupingIntoCollections?: boolean;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
displaySpecialsWithinSeasons?: boolean;
/**
*
* @type {Array<string>}
* @memberof ServerConfiguration
*/
codecsUsed?: Array<string>;
/**
*
* @type {Array<RepositoryInfo>}
* @memberof ServerConfiguration
*/
pluginRepositories?: Array<RepositoryInfo>;
/**
*
* @type {boolean}
* @memberof ServerConfiguration
*/
enableExternalContentInSuggestions?: boolean;
/**
*
* @type {number}
* @memberof ServerConfiguration
*/
imageExtractionTimeoutMs?: number;
/**
*
* @type {Array<PathSubstitution>}
* @memberof ServerConfiguration
*/
pathSubstitutions?: Array<PathSubstitution>;
/**
* Gets or sets a value indicating whether slow server responses should be logged as a warning.
* @type {boolean}
* @memberof ServerConfiguration
*/
enableSlowResponseWarning?: boolean;
/**
* Gets or sets the threshold for the slow response time warning in ms.
* @type {number}
* @memberof ServerConfiguration
*/
slowResponseThresholdMs?: number;
/**
* Gets or sets the cors hosts.
* @type {Array<string>}
* @memberof ServerConfiguration
*/
corsHosts?: Array<string>;
/**
* Gets or sets the number of days we should retain activity logs.
* @type {number}
* @memberof ServerConfiguration
*/
activityLogRetentionDays?: number | null;
/**
* Gets or sets the how the library scan fans out.
* @type {number}
* @memberof ServerConfiguration
*/
libraryScanFanoutConcurrency?: number;
/**
* Gets or sets the how many metadata refreshes can run concurrently.
* @type {number}
* @memberof ServerConfiguration
*/
libraryMetadataRefreshConcurrency?: number;
/**
* Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
* @type {boolean}
* @memberof ServerConfiguration
*/
removeOldPlugins?: boolean;
/**
* Gets or sets a value indicating whether clients should be allowed to upload logs.
* @type {boolean}
* @memberof ServerConfiguration
*/
allowClientLogUpload?: boolean;
}
/**
* Check if a given object implements the ServerConfiguration interface.
*/
export function instanceOfServerConfiguration(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function ServerConfigurationFromJSON(json: any): ServerConfiguration {
return ServerConfigurationFromJSONTyped(json, false);
}
export function ServerConfigurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServerConfiguration {
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 ServerConfigurationToJSON(value?: ServerConfiguration | 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,
};
}