/* 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 AddMediaPathRequest
 */
export interface AddMediaPathRequest {
    /**
     * Gets or sets the name of the library.
     * @type {string}
     * @memberof AddMediaPathRequest
     */
    name: string;
    /**
     * Gets or sets the path to add.
     * @type {string}
     * @memberof AddMediaPathRequest
     */
    path?: string | null;
    /**
     * 
     * @type {MediaPathDtoPathInfo}
     * @memberof AddMediaPathRequest
     */
    pathInfo?: MediaPathDtoPathInfo | null;
}

/**
 * Check if a given object implements the AddMediaPathRequest interface.
 */
export function instanceOfAddMediaPathRequest(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "name" in value;

    return isInstance;
}

export function AddMediaPathRequestFromJSON(json: any): AddMediaPathRequest {
    return AddMediaPathRequestFromJSONTyped(json, false);
}

export function AddMediaPathRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddMediaPathRequest {
    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 AddMediaPathRequestToJSON(value?: AddMediaPathRequest | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Name': value.name,
        'Path': value.path,
        'PathInfo': MediaPathDtoPathInfoToJSON(value.pathInfo),
    };
}

