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

243 lines
7.8 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 { PlayMethod } from './PlayMethod';
import {
PlayMethodFromJSON,
PlayMethodFromJSONTyped,
PlayMethodToJSON,
} from './PlayMethod';
import type { PlaybackProgressInfoItem } from './PlaybackProgressInfoItem';
import {
PlaybackProgressInfoItemFromJSON,
PlaybackProgressInfoItemFromJSONTyped,
PlaybackProgressInfoItemToJSON,
} from './PlaybackProgressInfoItem';
import type { QueueItem } from './QueueItem';
import {
QueueItemFromJSON,
QueueItemFromJSONTyped,
QueueItemToJSON,
} from './QueueItem';
import type { RepeatMode } from './RepeatMode';
import {
RepeatModeFromJSON,
RepeatModeFromJSONTyped,
RepeatModeToJSON,
} from './RepeatMode';
/**
* Class PlaybackProgressInfo.
* @export
* @interface PlaybackProgressInfo
*/
export interface PlaybackProgressInfo {
/**
* Gets or sets a value indicating whether this instance can seek.
* @type {boolean}
* @memberof PlaybackProgressInfo
*/
canSeek?: boolean;
/**
*
* @type {PlaybackProgressInfoItem}
* @memberof PlaybackProgressInfo
*/
item?: PlaybackProgressInfoItem | null;
/**
* Gets or sets the item identifier.
* @type {string}
* @memberof PlaybackProgressInfo
*/
itemId?: string;
/**
* Gets or sets the session id.
* @type {string}
* @memberof PlaybackProgressInfo
*/
sessionId?: string | null;
/**
* Gets or sets the media version identifier.
* @type {string}
* @memberof PlaybackProgressInfo
*/
mediaSourceId?: string | null;
/**
* Gets or sets the index of the audio stream.
* @type {number}
* @memberof PlaybackProgressInfo
*/
audioStreamIndex?: number | null;
/**
* Gets or sets the index of the subtitle stream.
* @type {number}
* @memberof PlaybackProgressInfo
*/
subtitleStreamIndex?: number | null;
/**
* Gets or sets a value indicating whether this instance is paused.
* @type {boolean}
* @memberof PlaybackProgressInfo
*/
isPaused?: boolean;
/**
* Gets or sets a value indicating whether this instance is muted.
* @type {boolean}
* @memberof PlaybackProgressInfo
*/
isMuted?: boolean;
/**
* Gets or sets the position ticks.
* @type {number}
* @memberof PlaybackProgressInfo
*/
positionTicks?: number | null;
/**
*
* @type {number}
* @memberof PlaybackProgressInfo
*/
playbackStartTimeTicks?: number | null;
/**
* Gets or sets the volume level.
* @type {number}
* @memberof PlaybackProgressInfo
*/
volumeLevel?: number | null;
/**
*
* @type {number}
* @memberof PlaybackProgressInfo
*/
brightness?: number | null;
/**
*
* @type {string}
* @memberof PlaybackProgressInfo
*/
aspectRatio?: string | null;
/**
*
* @type {PlayMethod}
* @memberof PlaybackProgressInfo
*/
playMethod?: PlayMethod;
/**
* Gets or sets the live stream identifier.
* @type {string}
* @memberof PlaybackProgressInfo
*/
liveStreamId?: string | null;
/**
* Gets or sets the play session identifier.
* @type {string}
* @memberof PlaybackProgressInfo
*/
playSessionId?: string | null;
/**
*
* @type {RepeatMode}
* @memberof PlaybackProgressInfo
*/
repeatMode?: RepeatMode;
/**
*
* @type {Array<QueueItem>}
* @memberof PlaybackProgressInfo
*/
nowPlayingQueue?: Array<QueueItem> | null;
/**
*
* @type {string}
* @memberof PlaybackProgressInfo
*/
playlistItemId?: string | null;
}
/**
* Check if a given object implements the PlaybackProgressInfo interface.
*/
export function instanceOfPlaybackProgressInfo(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PlaybackProgressInfoFromJSON(json: any): PlaybackProgressInfo {
return PlaybackProgressInfoFromJSONTyped(json, false);
}
export function PlaybackProgressInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaybackProgressInfo {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'canSeek': !exists(json, 'CanSeek') ? undefined : json['CanSeek'],
'item': !exists(json, 'Item') ? undefined : PlaybackProgressInfoItemFromJSON(json['Item']),
'itemId': !exists(json, 'ItemId') ? undefined : json['ItemId'],
'sessionId': !exists(json, 'SessionId') ? undefined : json['SessionId'],
'mediaSourceId': !exists(json, 'MediaSourceId') ? undefined : json['MediaSourceId'],
'audioStreamIndex': !exists(json, 'AudioStreamIndex') ? undefined : json['AudioStreamIndex'],
'subtitleStreamIndex': !exists(json, 'SubtitleStreamIndex') ? undefined : json['SubtitleStreamIndex'],
'isPaused': !exists(json, 'IsPaused') ? undefined : json['IsPaused'],
'isMuted': !exists(json, 'IsMuted') ? undefined : json['IsMuted'],
'positionTicks': !exists(json, 'PositionTicks') ? undefined : json['PositionTicks'],
'playbackStartTimeTicks': !exists(json, 'PlaybackStartTimeTicks') ? undefined : json['PlaybackStartTimeTicks'],
'volumeLevel': !exists(json, 'VolumeLevel') ? undefined : json['VolumeLevel'],
'brightness': !exists(json, 'Brightness') ? undefined : json['Brightness'],
'aspectRatio': !exists(json, 'AspectRatio') ? undefined : json['AspectRatio'],
'playMethod': !exists(json, 'PlayMethod') ? undefined : PlayMethodFromJSON(json['PlayMethod']),
'liveStreamId': !exists(json, 'LiveStreamId') ? undefined : json['LiveStreamId'],
'playSessionId': !exists(json, 'PlaySessionId') ? undefined : json['PlaySessionId'],
'repeatMode': !exists(json, 'RepeatMode') ? undefined : RepeatModeFromJSON(json['RepeatMode']),
'nowPlayingQueue': !exists(json, 'NowPlayingQueue') ? undefined : (json['NowPlayingQueue'] === null ? null : (json['NowPlayingQueue'] as Array<any>).map(QueueItemFromJSON)),
'playlistItemId': !exists(json, 'PlaylistItemId') ? undefined : json['PlaylistItemId'],
};
}
export function PlaybackProgressInfoToJSON(value?: PlaybackProgressInfo | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'CanSeek': value.canSeek,
'Item': PlaybackProgressInfoItemToJSON(value.item),
'ItemId': value.itemId,
'SessionId': value.sessionId,
'MediaSourceId': value.mediaSourceId,
'AudioStreamIndex': value.audioStreamIndex,
'SubtitleStreamIndex': value.subtitleStreamIndex,
'IsPaused': value.isPaused,
'IsMuted': value.isMuted,
'PositionTicks': value.positionTicks,
'PlaybackStartTimeTicks': value.playbackStartTimeTicks,
'VolumeLevel': value.volumeLevel,
'Brightness': value.brightness,
'AspectRatio': value.aspectRatio,
'PlayMethod': PlayMethodToJSON(value.playMethod),
'LiveStreamId': value.liveStreamId,
'PlaySessionId': value.playSessionId,
'RepeatMode': RepeatModeToJSON(value.repeatMode),
'NowPlayingQueue': value.nowPlayingQueue === undefined ? undefined : (value.nowPlayingQueue === null ? null : (value.nowPlayingQueue as Array<any>).map(QueueItemToJSON)),
'PlaylistItemId': value.playlistItemId,
};
}