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

175 lines
5.9 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 { ClientCapabilitiesDtoDeviceProfile } from './ClientCapabilitiesDtoDeviceProfile';
import {
ClientCapabilitiesDtoDeviceProfileFromJSON,
ClientCapabilitiesDtoDeviceProfileFromJSONTyped,
ClientCapabilitiesDtoDeviceProfileToJSON,
} from './ClientCapabilitiesDtoDeviceProfile';
import type { MediaProtocol } from './MediaProtocol';
import {
MediaProtocolFromJSON,
MediaProtocolFromJSONTyped,
MediaProtocolToJSON,
} from './MediaProtocol';
/**
* Open live stream dto.
* @export
* @interface OpenLiveStreamDto
*/
export interface OpenLiveStreamDto {
/**
* Gets or sets the open token.
* @type {string}
* @memberof OpenLiveStreamDto
*/
openToken?: string | null;
/**
* Gets or sets the user id.
* @type {string}
* @memberof OpenLiveStreamDto
*/
userId?: string | null;
/**
* Gets or sets the play session id.
* @type {string}
* @memberof OpenLiveStreamDto
*/
playSessionId?: string | null;
/**
* Gets or sets the max streaming bitrate.
* @type {number}
* @memberof OpenLiveStreamDto
*/
maxStreamingBitrate?: number | null;
/**
* Gets or sets the start time in ticks.
* @type {number}
* @memberof OpenLiveStreamDto
*/
startTimeTicks?: number | null;
/**
* Gets or sets the audio stream index.
* @type {number}
* @memberof OpenLiveStreamDto
*/
audioStreamIndex?: number | null;
/**
* Gets or sets the subtitle stream index.
* @type {number}
* @memberof OpenLiveStreamDto
*/
subtitleStreamIndex?: number | null;
/**
* Gets or sets the max audio channels.
* @type {number}
* @memberof OpenLiveStreamDto
*/
maxAudioChannels?: number | null;
/**
* Gets or sets the item id.
* @type {string}
* @memberof OpenLiveStreamDto
*/
itemId?: string | null;
/**
* Gets or sets a value indicating whether to enable direct play.
* @type {boolean}
* @memberof OpenLiveStreamDto
*/
enableDirectPlay?: boolean | null;
/**
* Gets or sets a value indicating whether to enale direct stream.
* @type {boolean}
* @memberof OpenLiveStreamDto
*/
enableDirectStream?: boolean | null;
/**
*
* @type {ClientCapabilitiesDtoDeviceProfile}
* @memberof OpenLiveStreamDto
*/
deviceProfile?: ClientCapabilitiesDtoDeviceProfile | null;
/**
* Gets or sets the device play protocols.
* @type {Array<MediaProtocol>}
* @memberof OpenLiveStreamDto
*/
directPlayProtocols?: Array<MediaProtocol>;
}
/**
* Check if a given object implements the OpenLiveStreamDto interface.
*/
export function instanceOfOpenLiveStreamDto(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function OpenLiveStreamDtoFromJSON(json: any): OpenLiveStreamDto {
return OpenLiveStreamDtoFromJSONTyped(json, false);
}
export function OpenLiveStreamDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenLiveStreamDto {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'openToken': !exists(json, 'OpenToken') ? undefined : json['OpenToken'],
'userId': !exists(json, 'UserId') ? undefined : json['UserId'],
'playSessionId': !exists(json, 'PlaySessionId') ? undefined : json['PlaySessionId'],
'maxStreamingBitrate': !exists(json, 'MaxStreamingBitrate') ? undefined : json['MaxStreamingBitrate'],
'startTimeTicks': !exists(json, 'StartTimeTicks') ? undefined : json['StartTimeTicks'],
'audioStreamIndex': !exists(json, 'AudioStreamIndex') ? undefined : json['AudioStreamIndex'],
'subtitleStreamIndex': !exists(json, 'SubtitleStreamIndex') ? undefined : json['SubtitleStreamIndex'],
'maxAudioChannels': !exists(json, 'MaxAudioChannels') ? undefined : json['MaxAudioChannels'],
'itemId': !exists(json, 'ItemId') ? undefined : json['ItemId'],
'enableDirectPlay': !exists(json, 'EnableDirectPlay') ? undefined : json['EnableDirectPlay'],
'enableDirectStream': !exists(json, 'EnableDirectStream') ? undefined : json['EnableDirectStream'],
'deviceProfile': !exists(json, 'DeviceProfile') ? undefined : ClientCapabilitiesDtoDeviceProfileFromJSON(json['DeviceProfile']),
'directPlayProtocols': !exists(json, 'DirectPlayProtocols') ? undefined : ((json['DirectPlayProtocols'] as Array<any>).map(MediaProtocolFromJSON)),
};
}
export function OpenLiveStreamDtoToJSON(value?: OpenLiveStreamDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'OpenToken': value.openToken,
'UserId': value.userId,
'PlaySessionId': value.playSessionId,
'MaxStreamingBitrate': value.maxStreamingBitrate,
'StartTimeTicks': value.startTimeTicks,
'AudioStreamIndex': value.audioStreamIndex,
'SubtitleStreamIndex': value.subtitleStreamIndex,
'MaxAudioChannels': value.maxAudioChannels,
'ItemId': value.itemId,
'EnableDirectPlay': value.enableDirectPlay,
'EnableDirectStream': value.enableDirectStream,
'DeviceProfile': ClientCapabilitiesDtoDeviceProfileToJSON(value.deviceProfile),
'DirectPlayProtocols': value.directPlayProtocols === undefined ? undefined : ((value.directPlayProtocols as Array<any>).map(MediaProtocolToJSON)),
};
}