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

90 lines
2.5 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';
/**
* Class BufferRequestDto.
* @export
* @interface BufferRequestDto
*/
export interface BufferRequestDto {
/**
* Gets or sets when the request has been made by the client.
* @type {Date}
* @memberof BufferRequestDto
*/
when?: Date;
/**
* Gets or sets the position ticks.
* @type {number}
* @memberof BufferRequestDto
*/
positionTicks?: number;
/**
* Gets or sets a value indicating whether the client playback is unpaused.
* @type {boolean}
* @memberof BufferRequestDto
*/
isPlaying?: boolean;
/**
* Gets or sets the playlist item identifier of the playing item.
* @type {string}
* @memberof BufferRequestDto
*/
playlistItemId?: string;
}
/**
* Check if a given object implements the BufferRequestDto interface.
*/
export function instanceOfBufferRequestDto(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function BufferRequestDtoFromJSON(json: any): BufferRequestDto {
return BufferRequestDtoFromJSONTyped(json, false);
}
export function BufferRequestDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BufferRequestDto {
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 BufferRequestDtoToJSON(value?: BufferRequestDto | 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,
};
}