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

129 lines
3.6 KiB
TypeScript
Raw Permalink 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 { PlayCommand } from './PlayCommand';
import {
PlayCommandFromJSON,
PlayCommandFromJSONTyped,
PlayCommandToJSON,
} from './PlayCommand';
/**
* Class PlayRequest.
* @export
* @interface PlayRequest
*/
export interface PlayRequest {
/**
* Gets or sets the item ids.
* @type {Array<string>}
* @memberof PlayRequest
*/
itemIds?: Array<string> | null;
/**
* Gets or sets the start position ticks that the first item should be played at.
* @type {number}
* @memberof PlayRequest
*/
startPositionTicks?: number | null;
/**
*
* @type {PlayCommand}
* @memberof PlayRequest
*/
playCommand?: PlayCommand;
/**
* Gets or sets the controlling user identifier.
* @type {string}
* @memberof PlayRequest
*/
controllingUserId?: string;
/**
*
* @type {number}
* @memberof PlayRequest
*/
subtitleStreamIndex?: number | null;
/**
*
* @type {number}
* @memberof PlayRequest
*/
audioStreamIndex?: number | null;
/**
*
* @type {string}
* @memberof PlayRequest
*/
mediaSourceId?: string | null;
/**
*
* @type {number}
* @memberof PlayRequest
*/
startIndex?: number | null;
}
/**
* Check if a given object implements the PlayRequest interface.
*/
export function instanceOfPlayRequest(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PlayRequestFromJSON(json: any): PlayRequest {
return PlayRequestFromJSONTyped(json, false);
}
export function PlayRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlayRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'itemIds': !exists(json, 'ItemIds') ? undefined : json['ItemIds'],
'startPositionTicks': !exists(json, 'StartPositionTicks') ? undefined : json['StartPositionTicks'],
'playCommand': !exists(json, 'PlayCommand') ? undefined : PlayCommandFromJSON(json['PlayCommand']),
'controllingUserId': !exists(json, 'ControllingUserId') ? undefined : json['ControllingUserId'],
'subtitleStreamIndex': !exists(json, 'SubtitleStreamIndex') ? undefined : json['SubtitleStreamIndex'],
'audioStreamIndex': !exists(json, 'AudioStreamIndex') ? undefined : json['AudioStreamIndex'],
'mediaSourceId': !exists(json, 'MediaSourceId') ? undefined : json['MediaSourceId'],
'startIndex': !exists(json, 'StartIndex') ? undefined : json['StartIndex'],
};
}
export function PlayRequestToJSON(value?: PlayRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'ItemIds': value.itemIds,
'StartPositionTicks': value.startPositionTicks,
'PlayCommand': PlayCommandToJSON(value.playCommand),
'ControllingUserId': value.controllingUserId,
'SubtitleStreamIndex': value.subtitleStreamIndex,
'AudioStreamIndex': value.audioStreamIndex,
'MediaSourceId': value.mediaSourceId,
'StartIndex': value.startIndex,
};
}