jellyfin-discord-bot/server/jellyfin/models/LiveStreamResponseMediaSour...

444 lines
15 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 { IsoType } from './IsoType';
import {
IsoTypeFromJSON,
IsoTypeFromJSONTyped,
IsoTypeToJSON,
} from './IsoType';
import type { MediaAttachment } from './MediaAttachment';
import {
MediaAttachmentFromJSON,
MediaAttachmentFromJSONTyped,
MediaAttachmentToJSON,
} from './MediaAttachment';
import type { MediaProtocol } from './MediaProtocol';
import {
MediaProtocolFromJSON,
MediaProtocolFromJSONTyped,
MediaProtocolToJSON,
} from './MediaProtocol';
import type { MediaSourceType } from './MediaSourceType';
import {
MediaSourceTypeFromJSON,
MediaSourceTypeFromJSONTyped,
MediaSourceTypeToJSON,
} from './MediaSourceType';
import type { MediaStream } from './MediaStream';
import {
MediaStreamFromJSON,
MediaStreamFromJSONTyped,
MediaStreamToJSON,
} from './MediaStream';
import type { TransportStreamTimestamp } from './TransportStreamTimestamp';
import {
TransportStreamTimestampFromJSON,
TransportStreamTimestampFromJSONTyped,
TransportStreamTimestampToJSON,
} from './TransportStreamTimestamp';
import type { Video3DFormat } from './Video3DFormat';
import {
Video3DFormatFromJSON,
Video3DFormatFromJSONTyped,
Video3DFormatToJSON,
} from './Video3DFormat';
import type { VideoType } from './VideoType';
import {
VideoTypeFromJSON,
VideoTypeFromJSONTyped,
VideoTypeToJSON,
} from './VideoType';
/**
*
* @export
* @interface LiveStreamResponseMediaSource
*/
export interface LiveStreamResponseMediaSource {
/**
*
* @type {MediaProtocol}
* @memberof LiveStreamResponseMediaSource
*/
protocol?: MediaProtocol;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
id?: string | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
path?: string | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
encoderPath?: string | null;
/**
*
* @type {MediaProtocol}
* @memberof LiveStreamResponseMediaSource
*/
encoderProtocol?: MediaProtocol | null;
/**
*
* @type {MediaSourceType}
* @memberof LiveStreamResponseMediaSource
*/
type?: MediaSourceType;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
container?: string | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
size?: number | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
name?: string | null;
/**
* Gets or sets a value indicating whether the media is remote.
* Differentiate internet url vs local network.
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
isRemote?: boolean;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
eTag?: string | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
runTimeTicks?: number | null;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
readAtNativeFramerate?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
ignoreDts?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
ignoreIndex?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
genPtsInput?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
supportsTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
supportsDirectStream?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
supportsDirectPlay?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
isInfiniteStream?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
requiresOpening?: boolean;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
openToken?: string | null;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
requiresClosing?: boolean;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
liveStreamId?: string | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
bufferMs?: number | null;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
requiresLooping?: boolean;
/**
*
* @type {boolean}
* @memberof LiveStreamResponseMediaSource
*/
supportsProbing?: boolean;
/**
*
* @type {VideoType}
* @memberof LiveStreamResponseMediaSource
*/
videoType?: VideoType | null;
/**
*
* @type {IsoType}
* @memberof LiveStreamResponseMediaSource
*/
isoType?: IsoType | null;
/**
*
* @type {Video3DFormat}
* @memberof LiveStreamResponseMediaSource
*/
video3DFormat?: Video3DFormat | null;
/**
*
* @type {Array<MediaStream>}
* @memberof LiveStreamResponseMediaSource
*/
mediaStreams?: Array<MediaStream> | null;
/**
*
* @type {Array<MediaAttachment>}
* @memberof LiveStreamResponseMediaSource
*/
mediaAttachments?: Array<MediaAttachment> | null;
/**
*
* @type {Array<string>}
* @memberof LiveStreamResponseMediaSource
*/
formats?: Array<string> | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
bitrate?: number | null;
/**
*
* @type {TransportStreamTimestamp}
* @memberof LiveStreamResponseMediaSource
*/
timestamp?: TransportStreamTimestamp | null;
/**
*
* @type {{ [key: string]: string; }}
* @memberof LiveStreamResponseMediaSource
*/
requiredHttpHeaders?: { [key: string]: string; } | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
transcodingUrl?: string | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
transcodingSubProtocol?: string | null;
/**
*
* @type {string}
* @memberof LiveStreamResponseMediaSource
*/
transcodingContainer?: string | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
analyzeDurationMs?: number | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
defaultAudioStreamIndex?: number | null;
/**
*
* @type {number}
* @memberof LiveStreamResponseMediaSource
*/
defaultSubtitleStreamIndex?: number | null;
}
/**
* Check if a given object implements the LiveStreamResponseMediaSource interface.
*/
export function instanceOfLiveStreamResponseMediaSource(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function LiveStreamResponseMediaSourceFromJSON(json: any): LiveStreamResponseMediaSource {
return LiveStreamResponseMediaSourceFromJSONTyped(json, false);
}
export function LiveStreamResponseMediaSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveStreamResponseMediaSource {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'protocol': !exists(json, 'Protocol') ? undefined : MediaProtocolFromJSON(json['Protocol']),
'id': !exists(json, 'Id') ? undefined : json['Id'],
'path': !exists(json, 'Path') ? undefined : json['Path'],
'encoderPath': !exists(json, 'EncoderPath') ? undefined : json['EncoderPath'],
'encoderProtocol': !exists(json, 'EncoderProtocol') ? undefined : MediaProtocolFromJSON(json['EncoderProtocol']),
'type': !exists(json, 'Type') ? undefined : MediaSourceTypeFromJSON(json['Type']),
'container': !exists(json, 'Container') ? undefined : json['Container'],
'size': !exists(json, 'Size') ? undefined : json['Size'],
'name': !exists(json, 'Name') ? undefined : json['Name'],
'isRemote': !exists(json, 'IsRemote') ? undefined : json['IsRemote'],
'eTag': !exists(json, 'ETag') ? undefined : json['ETag'],
'runTimeTicks': !exists(json, 'RunTimeTicks') ? undefined : json['RunTimeTicks'],
'readAtNativeFramerate': !exists(json, 'ReadAtNativeFramerate') ? undefined : json['ReadAtNativeFramerate'],
'ignoreDts': !exists(json, 'IgnoreDts') ? undefined : json['IgnoreDts'],
'ignoreIndex': !exists(json, 'IgnoreIndex') ? undefined : json['IgnoreIndex'],
'genPtsInput': !exists(json, 'GenPtsInput') ? undefined : json['GenPtsInput'],
'supportsTranscoding': !exists(json, 'SupportsTranscoding') ? undefined : json['SupportsTranscoding'],
'supportsDirectStream': !exists(json, 'SupportsDirectStream') ? undefined : json['SupportsDirectStream'],
'supportsDirectPlay': !exists(json, 'SupportsDirectPlay') ? undefined : json['SupportsDirectPlay'],
'isInfiniteStream': !exists(json, 'IsInfiniteStream') ? undefined : json['IsInfiniteStream'],
'requiresOpening': !exists(json, 'RequiresOpening') ? undefined : json['RequiresOpening'],
'openToken': !exists(json, 'OpenToken') ? undefined : json['OpenToken'],
'requiresClosing': !exists(json, 'RequiresClosing') ? undefined : json['RequiresClosing'],
'liveStreamId': !exists(json, 'LiveStreamId') ? undefined : json['LiveStreamId'],
'bufferMs': !exists(json, 'BufferMs') ? undefined : json['BufferMs'],
'requiresLooping': !exists(json, 'RequiresLooping') ? undefined : json['RequiresLooping'],
'supportsProbing': !exists(json, 'SupportsProbing') ? undefined : json['SupportsProbing'],
'videoType': !exists(json, 'VideoType') ? undefined : VideoTypeFromJSON(json['VideoType']),
'isoType': !exists(json, 'IsoType') ? undefined : IsoTypeFromJSON(json['IsoType']),
'video3DFormat': !exists(json, 'Video3DFormat') ? undefined : Video3DFormatFromJSON(json['Video3DFormat']),
'mediaStreams': !exists(json, 'MediaStreams') ? undefined : (json['MediaStreams'] === null ? null : (json['MediaStreams'] as Array<any>).map(MediaStreamFromJSON)),
'mediaAttachments': !exists(json, 'MediaAttachments') ? undefined : (json['MediaAttachments'] === null ? null : (json['MediaAttachments'] as Array<any>).map(MediaAttachmentFromJSON)),
'formats': !exists(json, 'Formats') ? undefined : json['Formats'],
'bitrate': !exists(json, 'Bitrate') ? undefined : json['Bitrate'],
'timestamp': !exists(json, 'Timestamp') ? undefined : TransportStreamTimestampFromJSON(json['Timestamp']),
'requiredHttpHeaders': !exists(json, 'RequiredHttpHeaders') ? undefined : json['RequiredHttpHeaders'],
'transcodingUrl': !exists(json, 'TranscodingUrl') ? undefined : json['TranscodingUrl'],
'transcodingSubProtocol': !exists(json, 'TranscodingSubProtocol') ? undefined : json['TranscodingSubProtocol'],
'transcodingContainer': !exists(json, 'TranscodingContainer') ? undefined : json['TranscodingContainer'],
'analyzeDurationMs': !exists(json, 'AnalyzeDurationMs') ? undefined : json['AnalyzeDurationMs'],
'defaultAudioStreamIndex': !exists(json, 'DefaultAudioStreamIndex') ? undefined : json['DefaultAudioStreamIndex'],
'defaultSubtitleStreamIndex': !exists(json, 'DefaultSubtitleStreamIndex') ? undefined : json['DefaultSubtitleStreamIndex'],
};
}
export function LiveStreamResponseMediaSourceToJSON(value?: LiveStreamResponseMediaSource | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Protocol': MediaProtocolToJSON(value.protocol),
'Id': value.id,
'Path': value.path,
'EncoderPath': value.encoderPath,
'EncoderProtocol': MediaProtocolToJSON(value.encoderProtocol),
'Type': MediaSourceTypeToJSON(value.type),
'Container': value.container,
'Size': value.size,
'Name': value.name,
'IsRemote': value.isRemote,
'ETag': value.eTag,
'RunTimeTicks': value.runTimeTicks,
'ReadAtNativeFramerate': value.readAtNativeFramerate,
'IgnoreDts': value.ignoreDts,
'IgnoreIndex': value.ignoreIndex,
'GenPtsInput': value.genPtsInput,
'SupportsTranscoding': value.supportsTranscoding,
'SupportsDirectStream': value.supportsDirectStream,
'SupportsDirectPlay': value.supportsDirectPlay,
'IsInfiniteStream': value.isInfiniteStream,
'RequiresOpening': value.requiresOpening,
'OpenToken': value.openToken,
'RequiresClosing': value.requiresClosing,
'LiveStreamId': value.liveStreamId,
'BufferMs': value.bufferMs,
'RequiresLooping': value.requiresLooping,
'SupportsProbing': value.supportsProbing,
'VideoType': VideoTypeToJSON(value.videoType),
'IsoType': IsoTypeToJSON(value.isoType),
'Video3DFormat': Video3DFormatToJSON(value.video3DFormat),
'MediaStreams': value.mediaStreams === undefined ? undefined : (value.mediaStreams === null ? null : (value.mediaStreams as Array<any>).map(MediaStreamToJSON)),
'MediaAttachments': value.mediaAttachments === undefined ? undefined : (value.mediaAttachments === null ? null : (value.mediaAttachments as Array<any>).map(MediaAttachmentToJSON)),
'Formats': value.formats,
'Bitrate': value.bitrate,
'Timestamp': TransportStreamTimestampToJSON(value.timestamp),
'RequiredHttpHeaders': value.requiredHttpHeaders,
'TranscodingUrl': value.transcodingUrl,
'TranscodingSubProtocol': value.transcodingSubProtocol,
'TranscodingContainer': value.transcodingContainer,
'AnalyzeDurationMs': value.analyzeDurationMs,
'DefaultAudioStreamIndex': value.defaultAudioStreamIndex,
'DefaultSubtitleStreamIndex': value.defaultSubtitleStreamIndex,
};
}