/* 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 { MediaSourceInfo } from './MediaSourceInfo'; import { MediaSourceInfoFromJSON, MediaSourceInfoFromJSONTyped, MediaSourceInfoToJSON, } from './MediaSourceInfo'; import type { PlaybackErrorCode } from './PlaybackErrorCode'; import { PlaybackErrorCodeFromJSON, PlaybackErrorCodeFromJSONTyped, PlaybackErrorCodeToJSON, } from './PlaybackErrorCode'; /** * Class PlaybackInfoResponse. * @export * @interface PlaybackInfoResponse */ export interface PlaybackInfoResponse { /** * Gets or sets the media sources. * @type {Array} * @memberof PlaybackInfoResponse */ mediaSources?: Array; /** * Gets or sets the play session identifier. * @type {string} * @memberof PlaybackInfoResponse */ playSessionId?: string | null; /** * * @type {PlaybackErrorCode} * @memberof PlaybackInfoResponse */ errorCode?: PlaybackErrorCode | null; } /** * Check if a given object implements the PlaybackInfoResponse interface. */ export function instanceOfPlaybackInfoResponse(value: object): boolean { let isInstance = true; return isInstance; } export function PlaybackInfoResponseFromJSON(json: any): PlaybackInfoResponse { return PlaybackInfoResponseFromJSONTyped(json, false); } export function PlaybackInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaybackInfoResponse { if ((json === undefined) || (json === null)) { return json; } return { 'mediaSources': !exists(json, 'MediaSources') ? undefined : ((json['MediaSources'] as Array).map(MediaSourceInfoFromJSON)), 'playSessionId': !exists(json, 'PlaySessionId') ? undefined : json['PlaySessionId'], 'errorCode': !exists(json, 'ErrorCode') ? undefined : PlaybackErrorCodeFromJSON(json['ErrorCode']), }; } export function PlaybackInfoResponseToJSON(value?: PlaybackInfoResponse | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'MediaSources': value.mediaSources === undefined ? undefined : ((value.mediaSources as Array).map(MediaSourceInfoToJSON)), 'PlaySessionId': value.playSessionId, 'ErrorCode': PlaybackErrorCodeToJSON(value.errorCode), }; }