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

109 lines
3.5 KiB
TypeScript

/* 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 { NameIdPair } from './NameIdPair';
import {
NameIdPairFromJSON,
NameIdPairFromJSONTyped,
NameIdPairToJSON,
} from './NameIdPair';
import type { NameValuePair } from './NameValuePair';
import {
NameValuePairFromJSON,
NameValuePairFromJSONTyped,
NameValuePairToJSON,
} from './NameValuePair';
import type { TunerChannelMapping } from './TunerChannelMapping';
import {
TunerChannelMappingFromJSON,
TunerChannelMappingFromJSONTyped,
TunerChannelMappingToJSON,
} from './TunerChannelMapping';
/**
* Channel mapping options dto.
* @export
* @interface ChannelMappingOptionsDto
*/
export interface ChannelMappingOptionsDto {
/**
* Gets or sets list of tuner channels.
* @type {Array<TunerChannelMapping>}
* @memberof ChannelMappingOptionsDto
*/
tunerChannels?: Array<TunerChannelMapping>;
/**
* Gets or sets list of provider channels.
* @type {Array<NameIdPair>}
* @memberof ChannelMappingOptionsDto
*/
providerChannels?: Array<NameIdPair>;
/**
* Gets or sets list of mappings.
* @type {Array<NameValuePair>}
* @memberof ChannelMappingOptionsDto
*/
mappings?: Array<NameValuePair>;
/**
* Gets or sets provider name.
* @type {string}
* @memberof ChannelMappingOptionsDto
*/
providerName?: string | null;
}
/**
* Check if a given object implements the ChannelMappingOptionsDto interface.
*/
export function instanceOfChannelMappingOptionsDto(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function ChannelMappingOptionsDtoFromJSON(json: any): ChannelMappingOptionsDto {
return ChannelMappingOptionsDtoFromJSONTyped(json, false);
}
export function ChannelMappingOptionsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelMappingOptionsDto {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'tunerChannels': !exists(json, 'TunerChannels') ? undefined : ((json['TunerChannels'] as Array<any>).map(TunerChannelMappingFromJSON)),
'providerChannels': !exists(json, 'ProviderChannels') ? undefined : ((json['ProviderChannels'] as Array<any>).map(NameIdPairFromJSON)),
'mappings': !exists(json, 'Mappings') ? undefined : ((json['Mappings'] as Array<any>).map(NameValuePairFromJSON)),
'providerName': !exists(json, 'ProviderName') ? undefined : json['ProviderName'],
};
}
export function ChannelMappingOptionsDtoToJSON(value?: ChannelMappingOptionsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'TunerChannels': value.tunerChannels === undefined ? undefined : ((value.tunerChannels as Array<any>).map(TunerChannelMappingToJSON)),
'ProviderChannels': value.providerChannels === undefined ? undefined : ((value.providerChannels as Array<any>).map(NameIdPairToJSON)),
'Mappings': value.mappings === undefined ? undefined : ((value.mappings as Array<any>).map(NameValuePairToJSON)),
'ProviderName': value.providerName,
};
}