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

444 lines
14 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';
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 MediaSourceInfo
*/
export interface MediaSourceInfo {
/**
*
* @type {MediaProtocol}
* @memberof MediaSourceInfo
*/
protocol?: MediaProtocol;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
id?: string | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
path?: string | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
encoderPath?: string | null;
/**
*
* @type {MediaProtocol}
* @memberof MediaSourceInfo
*/
encoderProtocol?: MediaProtocol | null;
/**
*
* @type {MediaSourceType}
* @memberof MediaSourceInfo
*/
type?: MediaSourceType;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
container?: string | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
size?: number | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
name?: string | null;
/**
* Gets or sets a value indicating whether the media is remote.
* Differentiate internet url vs local network.
* @type {boolean}
* @memberof MediaSourceInfo
*/
isRemote?: boolean;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
eTag?: string | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
runTimeTicks?: number | null;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
readAtNativeFramerate?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
ignoreDts?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
ignoreIndex?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
genPtsInput?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
supportsTranscoding?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
supportsDirectStream?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
supportsDirectPlay?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
isInfiniteStream?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
requiresOpening?: boolean;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
openToken?: string | null;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
requiresClosing?: boolean;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
liveStreamId?: string | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
bufferMs?: number | null;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
requiresLooping?: boolean;
/**
*
* @type {boolean}
* @memberof MediaSourceInfo
*/
supportsProbing?: boolean;
/**
*
* @type {VideoType}
* @memberof MediaSourceInfo
*/
videoType?: VideoType | null;
/**
*
* @type {IsoType}
* @memberof MediaSourceInfo
*/
isoType?: IsoType | null;
/**
*
* @type {Video3DFormat}
* @memberof MediaSourceInfo
*/
video3DFormat?: Video3DFormat | null;
/**
*
* @type {Array<MediaStream>}
* @memberof MediaSourceInfo
*/
mediaStreams?: Array<MediaStream> | null;
/**
*
* @type {Array<MediaAttachment>}
* @memberof MediaSourceInfo
*/
mediaAttachments?: Array<MediaAttachment> | null;
/**
*
* @type {Array<string>}
* @memberof MediaSourceInfo
*/
formats?: Array<string> | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
bitrate?: number | null;
/**
*
* @type {TransportStreamTimestamp}
* @memberof MediaSourceInfo
*/
timestamp?: TransportStreamTimestamp | null;
/**
*
* @type {{ [key: string]: string; }}
* @memberof MediaSourceInfo
*/
requiredHttpHeaders?: { [key: string]: string; } | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
transcodingUrl?: string | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
transcodingSubProtocol?: string | null;
/**
*
* @type {string}
* @memberof MediaSourceInfo
*/
transcodingContainer?: string | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
analyzeDurationMs?: number | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
defaultAudioStreamIndex?: number | null;
/**
*
* @type {number}
* @memberof MediaSourceInfo
*/
defaultSubtitleStreamIndex?: number | null;
}
/**
* Check if a given object implements the MediaSourceInfo interface.
*/
export function instanceOfMediaSourceInfo(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function MediaSourceInfoFromJSON(json: any): MediaSourceInfo {
return MediaSourceInfoFromJSONTyped(json, false);
}
export function MediaSourceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaSourceInfo {
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 MediaSourceInfoToJSON(value?: MediaSourceInfo | 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,
};
}