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

113 lines
3.1 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';
import type { SendCommandType } from './SendCommandType';
import {
SendCommandTypeFromJSON,
SendCommandTypeFromJSONTyped,
SendCommandTypeToJSON,
} from './SendCommandType';
/**
* Class SendCommand.
* @export
* @interface SendCommand
*/
export interface SendCommand {
/**
* Gets the group identifier.
* @type {string}
* @memberof SendCommand
*/
groupId?: string;
/**
* Gets the playlist identifier of the playing item.
* @type {string}
* @memberof SendCommand
*/
playlistItemId?: string;
/**
* Gets or sets the UTC time when to execute the command.
* @type {Date}
* @memberof SendCommand
*/
when?: Date;
/**
* Gets the position ticks.
* @type {number}
* @memberof SendCommand
*/
positionTicks?: number | null;
/**
*
* @type {SendCommandType}
* @memberof SendCommand
*/
command?: SendCommandType;
/**
* Gets the UTC time when this command has been emitted.
* @type {Date}
* @memberof SendCommand
*/
emittedAt?: Date;
}
/**
* Check if a given object implements the SendCommand interface.
*/
export function instanceOfSendCommand(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function SendCommandFromJSON(json: any): SendCommand {
return SendCommandFromJSONTyped(json, false);
}
export function SendCommandFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendCommand {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'groupId': !exists(json, 'GroupId') ? undefined : json['GroupId'],
'playlistItemId': !exists(json, 'PlaylistItemId') ? undefined : json['PlaylistItemId'],
'when': !exists(json, 'When') ? undefined : (new Date(json['When'])),
'positionTicks': !exists(json, 'PositionTicks') ? undefined : json['PositionTicks'],
'command': !exists(json, 'Command') ? undefined : SendCommandTypeFromJSON(json['Command']),
'emittedAt': !exists(json, 'EmittedAt') ? undefined : (new Date(json['EmittedAt'])),
};
}
export function SendCommandToJSON(value?: SendCommand | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'GroupId': value.groupId,
'PlaylistItemId': value.playlistItemId,
'When': value.when === undefined ? undefined : (value.when.toISOString()),
'PositionTicks': value.positionTicks,
'Command': SendCommandTypeToJSON(value.command),
'EmittedAt': value.emittedAt === undefined ? undefined : (value.emittedAt.toISOString()),
};
}