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

89 lines
2.3 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 { PlaystateCommand } from './PlaystateCommand';
import {
PlaystateCommandFromJSON,
PlaystateCommandFromJSONTyped,
PlaystateCommandToJSON,
} from './PlaystateCommand';
/**
*
* @export
* @interface PlaystateRequest
*/
export interface PlaystateRequest {
/**
*
* @type {PlaystateCommand}
* @memberof PlaystateRequest
*/
command?: PlaystateCommand;
/**
*
* @type {number}
* @memberof PlaystateRequest
*/
seekPositionTicks?: number | null;
/**
* Gets or sets the controlling user identifier.
* @type {string}
* @memberof PlaystateRequest
*/
controllingUserId?: string | null;
}
/**
* Check if a given object implements the PlaystateRequest interface.
*/
export function instanceOfPlaystateRequest(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PlaystateRequestFromJSON(json: any): PlaystateRequest {
return PlaystateRequestFromJSONTyped(json, false);
}
export function PlaystateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaystateRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'command': !exists(json, 'Command') ? undefined : PlaystateCommandFromJSON(json['Command']),
'seekPositionTicks': !exists(json, 'SeekPositionTicks') ? undefined : json['SeekPositionTicks'],
'controllingUserId': !exists(json, 'ControllingUserId') ? undefined : json['ControllingUserId'],
};
}
export function PlaystateRequestToJSON(value?: PlaystateRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Command': PlaystateCommandToJSON(value.command),
'SeekPositionTicks': value.seekPositionTicks,
'ControllingUserId': value.controllingUserId,
};
}