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

243 lines
8.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 { 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 PlaybackStartInfo.
* @export
* @interface ReportPlaybackStartRequest
*/
export interface ReportPlaybackStartRequest {
/**
* Gets or sets a value indicating whether this instance can seek.
* @type {boolean}
* @memberof ReportPlaybackStartRequest
*/
canSeek?: boolean;
/**
*
* @type {PlaybackProgressInfoItem}
* @memberof ReportPlaybackStartRequest
*/
item?: PlaybackProgressInfoItem | null;
/**
* Gets or sets the item identifier.
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
itemId?: string;
/**
* Gets or sets the session id.
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
sessionId?: string | null;
/**
* Gets or sets the media version identifier.
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
mediaSourceId?: string | null;
/**
* Gets or sets the index of the audio stream.
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
audioStreamIndex?: number | null;
/**
* Gets or sets the index of the subtitle stream.
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
subtitleStreamIndex?: number | null;
/**
* Gets or sets a value indicating whether this instance is paused.
* @type {boolean}
* @memberof ReportPlaybackStartRequest
*/
isPaused?: boolean;
/**
* Gets or sets a value indicating whether this instance is muted.
* @type {boolean}
* @memberof ReportPlaybackStartRequest
*/
isMuted?: boolean;
/**
* Gets or sets the position ticks.
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
positionTicks?: number | null;
/**
*
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
playbackStartTimeTicks?: number | null;
/**
* Gets or sets the volume level.
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
volumeLevel?: number | null;
/**
*
* @type {number}
* @memberof ReportPlaybackStartRequest
*/
brightness?: number | null;
/**
*
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
aspectRatio?: string | null;
/**
*
* @type {PlayMethod}
* @memberof ReportPlaybackStartRequest
*/
playMethod?: PlayMethod;
/**
* Gets or sets the live stream identifier.
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
liveStreamId?: string | null;
/**
* Gets or sets the play session identifier.
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
playSessionId?: string | null;
/**
*
* @type {RepeatMode}
* @memberof ReportPlaybackStartRequest
*/
repeatMode?: RepeatMode;
/**
*
* @type {Array<QueueItem>}
* @memberof ReportPlaybackStartRequest
*/
nowPlayingQueue?: Array<QueueItem> | null;
/**
*
* @type {string}
* @memberof ReportPlaybackStartRequest
*/
playlistItemId?: string | null;
}
/**
* Check if a given object implements the ReportPlaybackStartRequest interface.
*/
export function instanceOfReportPlaybackStartRequest(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function ReportPlaybackStartRequestFromJSON(json: any): ReportPlaybackStartRequest {
return ReportPlaybackStartRequestFromJSONTyped(json, false);
}
export function ReportPlaybackStartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReportPlaybackStartRequest {
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 ReportPlaybackStartRequestToJSON(value?: ReportPlaybackStartRequest | 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,
};
}