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

90 lines
2.2 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 { MediaPathDtoPathInfo } from './MediaPathDtoPathInfo';
import {
MediaPathDtoPathInfoFromJSON,
MediaPathDtoPathInfoFromJSONTyped,
MediaPathDtoPathInfoToJSON,
} from './MediaPathDtoPathInfo';
/**
* Media Path dto.
* @export
* @interface MediaPathDto
*/
export interface MediaPathDto {
/**
* Gets or sets the name of the library.
* @type {string}
* @memberof MediaPathDto
*/
name: string;
/**
* Gets or sets the path to add.
* @type {string}
* @memberof MediaPathDto
*/
path?: string | null;
/**
*
* @type {MediaPathDtoPathInfo}
* @memberof MediaPathDto
*/
pathInfo?: MediaPathDtoPathInfo | null;
}
/**
* Check if a given object implements the MediaPathDto interface.
*/
export function instanceOfMediaPathDto(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "name" in value;
return isInstance;
}
export function MediaPathDtoFromJSON(json: any): MediaPathDto {
return MediaPathDtoFromJSONTyped(json, false);
}
export function MediaPathDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaPathDto {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': json['Name'],
'path': !exists(json, 'Path') ? undefined : json['Path'],
'pathInfo': !exists(json, 'PathInfo') ? undefined : MediaPathDtoPathInfoFromJSON(json['PathInfo']),
};
}
export function MediaPathDtoToJSON(value?: MediaPathDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Name': value.name,
'Path': value.path,
'PathInfo': MediaPathDtoPathInfoToJSON(value.pathInfo),
};
}