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

175 lines
5.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';
import type { HardwareEncodingType } from './HardwareEncodingType';
import {
HardwareEncodingTypeFromJSON,
HardwareEncodingTypeFromJSONTyped,
HardwareEncodingTypeToJSON,
} from './HardwareEncodingType';
import type { TranscodeReason } from './TranscodeReason';
import {
TranscodeReasonFromJSON,
TranscodeReasonFromJSONTyped,
TranscodeReasonToJSON,
} from './TranscodeReason';
/**
*
* @export
* @interface TranscodingInfo
*/
export interface TranscodingInfo {
/**
*
* @type {string}
* @memberof TranscodingInfo
*/
audioCodec?: string | null;
/**
*
* @type {string}
* @memberof TranscodingInfo
*/
videoCodec?: string | null;
/**
*
* @type {string}
* @memberof TranscodingInfo
*/
container?: string | null;
/**
*
* @type {boolean}
* @memberof TranscodingInfo
*/
isVideoDirect?: boolean;
/**
*
* @type {boolean}
* @memberof TranscodingInfo
*/
isAudioDirect?: boolean;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
bitrate?: number | null;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
framerate?: number | null;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
completionPercentage?: number | null;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
width?: number | null;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
height?: number | null;
/**
*
* @type {number}
* @memberof TranscodingInfo
*/
audioChannels?: number | null;
/**
*
* @type {HardwareEncodingType}
* @memberof TranscodingInfo
*/
hardwareAccelerationType?: HardwareEncodingType | null;
/**
*
* @type {Array<TranscodeReason>}
* @memberof TranscodingInfo
*/
transcodeReasons?: Array<TranscodeReason>;
}
/**
* Check if a given object implements the TranscodingInfo interface.
*/
export function instanceOfTranscodingInfo(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function TranscodingInfoFromJSON(json: any): TranscodingInfo {
return TranscodingInfoFromJSONTyped(json, false);
}
export function TranscodingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TranscodingInfo {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'audioCodec': !exists(json, 'AudioCodec') ? undefined : json['AudioCodec'],
'videoCodec': !exists(json, 'VideoCodec') ? undefined : json['VideoCodec'],
'container': !exists(json, 'Container') ? undefined : json['Container'],
'isVideoDirect': !exists(json, 'IsVideoDirect') ? undefined : json['IsVideoDirect'],
'isAudioDirect': !exists(json, 'IsAudioDirect') ? undefined : json['IsAudioDirect'],
'bitrate': !exists(json, 'Bitrate') ? undefined : json['Bitrate'],
'framerate': !exists(json, 'Framerate') ? undefined : json['Framerate'],
'completionPercentage': !exists(json, 'CompletionPercentage') ? undefined : json['CompletionPercentage'],
'width': !exists(json, 'Width') ? undefined : json['Width'],
'height': !exists(json, 'Height') ? undefined : json['Height'],
'audioChannels': !exists(json, 'AudioChannels') ? undefined : json['AudioChannels'],
'hardwareAccelerationType': !exists(json, 'HardwareAccelerationType') ? undefined : HardwareEncodingTypeFromJSON(json['HardwareAccelerationType']),
'transcodeReasons': !exists(json, 'TranscodeReasons') ? undefined : ((json['TranscodeReasons'] as Array<any>).map(TranscodeReasonFromJSON)),
};
}
export function TranscodingInfoToJSON(value?: TranscodingInfo | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'AudioCodec': value.audioCodec,
'VideoCodec': value.videoCodec,
'Container': value.container,
'IsVideoDirect': value.isVideoDirect,
'IsAudioDirect': value.isAudioDirect,
'Bitrate': value.bitrate,
'Framerate': value.framerate,
'CompletionPercentage': value.completionPercentage,
'Width': value.width,
'Height': value.height,
'AudioChannels': value.audioChannels,
'HardwareAccelerationType': HardwareEncodingTypeToJSON(value.hardwareAccelerationType),
'TranscodeReasons': value.transcodeReasons === undefined ? undefined : ((value.transcodeReasons as Array<any>).map(TranscodeReasonToJSON)),
};
}