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

90 lines
2.5 KiB
TypeScript
Raw 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';
/**
* Class ReadyRequest.
* @export
* @interface SyncPlayReadyRequest
*/
export interface SyncPlayReadyRequest {
/**
* Gets or sets when the request has been made by the client.
* @type {Date}
* @memberof SyncPlayReadyRequest
*/
when?: Date;
/**
* Gets or sets the position ticks.
* @type {number}
* @memberof SyncPlayReadyRequest
*/
positionTicks?: number;
/**
* Gets or sets a value indicating whether the client playback is unpaused.
* @type {boolean}
* @memberof SyncPlayReadyRequest
*/
isPlaying?: boolean;
/**
* Gets or sets the playlist item identifier of the playing item.
* @type {string}
* @memberof SyncPlayReadyRequest
*/
playlistItemId?: string;
}
/**
* Check if a given object implements the SyncPlayReadyRequest interface.
*/
export function instanceOfSyncPlayReadyRequest(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function SyncPlayReadyRequestFromJSON(json: any): SyncPlayReadyRequest {
return SyncPlayReadyRequestFromJSONTyped(json, false);
}
export function SyncPlayReadyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncPlayReadyRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'when': !exists(json, 'When') ? undefined : (new Date(json['When'])),
'positionTicks': !exists(json, 'PositionTicks') ? undefined : json['PositionTicks'],
'isPlaying': !exists(json, 'IsPlaying') ? undefined : json['IsPlaying'],
'playlistItemId': !exists(json, 'PlaylistItemId') ? undefined : json['PlaylistItemId'],
};
}
export function SyncPlayReadyRequestToJSON(value?: SyncPlayReadyRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'When': value.when === undefined ? undefined : (value.when.toISOString()),
'PositionTicks': value.positionTicks,
'IsPlaying': value.isPlaying,
'PlaylistItemId': value.playlistItemId,
};
}