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

159 lines
4.7 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 { RepeatMode } from './RepeatMode';
import {
RepeatModeFromJSON,
RepeatModeFromJSONTyped,
RepeatModeToJSON,
} from './RepeatMode';
/**
*
* @export
* @interface PlayerStateInfo
*/
export interface PlayerStateInfo {
/**
* Gets or sets the now playing position ticks.
* @type {number}
* @memberof PlayerStateInfo
*/
positionTicks?: number | null;
/**
* Gets or sets a value indicating whether this instance can seek.
* @type {boolean}
* @memberof PlayerStateInfo
*/
canSeek?: boolean;
/**
* Gets or sets a value indicating whether this instance is paused.
* @type {boolean}
* @memberof PlayerStateInfo
*/
isPaused?: boolean;
/**
* Gets or sets a value indicating whether this instance is muted.
* @type {boolean}
* @memberof PlayerStateInfo
*/
isMuted?: boolean;
/**
* Gets or sets the volume level.
* @type {number}
* @memberof PlayerStateInfo
*/
volumeLevel?: number | null;
/**
* Gets or sets the index of the now playing audio stream.
* @type {number}
* @memberof PlayerStateInfo
*/
audioStreamIndex?: number | null;
/**
* Gets or sets the index of the now playing subtitle stream.
* @type {number}
* @memberof PlayerStateInfo
*/
subtitleStreamIndex?: number | null;
/**
* Gets or sets the now playing media version identifier.
* @type {string}
* @memberof PlayerStateInfo
*/
mediaSourceId?: string | null;
/**
*
* @type {PlayMethod}
* @memberof PlayerStateInfo
*/
playMethod?: PlayMethod | null;
/**
*
* @type {RepeatMode}
* @memberof PlayerStateInfo
*/
repeatMode?: RepeatMode;
/**
* Gets or sets the now playing live stream identifier.
* @type {string}
* @memberof PlayerStateInfo
*/
liveStreamId?: string | null;
}
/**
* Check if a given object implements the PlayerStateInfo interface.
*/
export function instanceOfPlayerStateInfo(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PlayerStateInfoFromJSON(json: any): PlayerStateInfo {
return PlayerStateInfoFromJSONTyped(json, false);
}
export function PlayerStateInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlayerStateInfo {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'positionTicks': !exists(json, 'PositionTicks') ? undefined : json['PositionTicks'],
'canSeek': !exists(json, 'CanSeek') ? undefined : json['CanSeek'],
'isPaused': !exists(json, 'IsPaused') ? undefined : json['IsPaused'],
'isMuted': !exists(json, 'IsMuted') ? undefined : json['IsMuted'],
'volumeLevel': !exists(json, 'VolumeLevel') ? undefined : json['VolumeLevel'],
'audioStreamIndex': !exists(json, 'AudioStreamIndex') ? undefined : json['AudioStreamIndex'],
'subtitleStreamIndex': !exists(json, 'SubtitleStreamIndex') ? undefined : json['SubtitleStreamIndex'],
'mediaSourceId': !exists(json, 'MediaSourceId') ? undefined : json['MediaSourceId'],
'playMethod': !exists(json, 'PlayMethod') ? undefined : PlayMethodFromJSON(json['PlayMethod']),
'repeatMode': !exists(json, 'RepeatMode') ? undefined : RepeatModeFromJSON(json['RepeatMode']),
'liveStreamId': !exists(json, 'LiveStreamId') ? undefined : json['LiveStreamId'],
};
}
export function PlayerStateInfoToJSON(value?: PlayerStateInfo | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'PositionTicks': value.positionTicks,
'CanSeek': value.canSeek,
'IsPaused': value.isPaused,
'IsMuted': value.isMuted,
'VolumeLevel': value.volumeLevel,
'AudioStreamIndex': value.audioStreamIndex,
'SubtitleStreamIndex': value.subtitleStreamIndex,
'MediaSourceId': value.mediaSourceId,
'PlayMethod': PlayMethodToJSON(value.playMethod),
'RepeatMode': RepeatModeToJSON(value.repeatMode),
'LiveStreamId': value.liveStreamId,
};
}