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

130 lines
4.0 KiB
TypeScript
Raw Permalink 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';
/**
*
* @export
* @interface SubtitleOptions
*/
export interface SubtitleOptions {
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
skipIfEmbeddedSubtitlesPresent?: boolean;
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
skipIfAudioTrackMatches?: boolean;
/**
*
* @type {Array<string>}
* @memberof SubtitleOptions
*/
downloadLanguages?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
downloadMovieSubtitles?: boolean;
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
downloadEpisodeSubtitles?: boolean;
/**
*
* @type {string}
* @memberof SubtitleOptions
*/
openSubtitlesUsername?: string | null;
/**
*
* @type {string}
* @memberof SubtitleOptions
*/
openSubtitlesPasswordHash?: string | null;
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
isOpenSubtitleVipAccount?: boolean;
/**
*
* @type {boolean}
* @memberof SubtitleOptions
*/
requirePerfectMatch?: boolean;
}
/**
* Check if a given object implements the SubtitleOptions interface.
*/
export function instanceOfSubtitleOptions(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function SubtitleOptionsFromJSON(json: any): SubtitleOptions {
return SubtitleOptionsFromJSONTyped(json, false);
}
export function SubtitleOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubtitleOptions {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'skipIfEmbeddedSubtitlesPresent': !exists(json, 'SkipIfEmbeddedSubtitlesPresent') ? undefined : json['SkipIfEmbeddedSubtitlesPresent'],
'skipIfAudioTrackMatches': !exists(json, 'SkipIfAudioTrackMatches') ? undefined : json['SkipIfAudioTrackMatches'],
'downloadLanguages': !exists(json, 'DownloadLanguages') ? undefined : json['DownloadLanguages'],
'downloadMovieSubtitles': !exists(json, 'DownloadMovieSubtitles') ? undefined : json['DownloadMovieSubtitles'],
'downloadEpisodeSubtitles': !exists(json, 'DownloadEpisodeSubtitles') ? undefined : json['DownloadEpisodeSubtitles'],
'openSubtitlesUsername': !exists(json, 'OpenSubtitlesUsername') ? undefined : json['OpenSubtitlesUsername'],
'openSubtitlesPasswordHash': !exists(json, 'OpenSubtitlesPasswordHash') ? undefined : json['OpenSubtitlesPasswordHash'],
'isOpenSubtitleVipAccount': !exists(json, 'IsOpenSubtitleVipAccount') ? undefined : json['IsOpenSubtitleVipAccount'],
'requirePerfectMatch': !exists(json, 'RequirePerfectMatch') ? undefined : json['RequirePerfectMatch'],
};
}
export function SubtitleOptionsToJSON(value?: SubtitleOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'SkipIfEmbeddedSubtitlesPresent': value.skipIfEmbeddedSubtitlesPresent,
'SkipIfAudioTrackMatches': value.skipIfAudioTrackMatches,
'DownloadLanguages': value.downloadLanguages,
'DownloadMovieSubtitles': value.downloadMovieSubtitles,
'DownloadEpisodeSubtitles': value.downloadEpisodeSubtitles,
'OpenSubtitlesUsername': value.openSubtitlesUsername,
'OpenSubtitlesPasswordHash': value.openSubtitlesPasswordHash,
'IsOpenSubtitleVipAccount': value.isOpenSubtitleVipAccount,
'RequirePerfectMatch': value.requirePerfectMatch,
};
}