/* 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 { BaseItemDto } from './BaseItemDto';
import {
    BaseItemDtoFromJSON,
    BaseItemDtoFromJSONTyped,
    BaseItemDtoToJSON,
} from './BaseItemDto';
import type { RecommendationType } from './RecommendationType';
import {
    RecommendationTypeFromJSON,
    RecommendationTypeFromJSONTyped,
    RecommendationTypeToJSON,
} from './RecommendationType';

/**
 * 
 * @export
 * @interface RecommendationDto
 */
export interface RecommendationDto {
    /**
     * 
     * @type {Array<BaseItemDto>}
     * @memberof RecommendationDto
     */
    items?: Array<BaseItemDto> | null;
    /**
     * 
     * @type {RecommendationType}
     * @memberof RecommendationDto
     */
    recommendationType?: RecommendationType;
    /**
     * 
     * @type {string}
     * @memberof RecommendationDto
     */
    baselineItemName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof RecommendationDto
     */
    categoryId?: string;
}

/**
 * Check if a given object implements the RecommendationDto interface.
 */
export function instanceOfRecommendationDto(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function RecommendationDtoFromJSON(json: any): RecommendationDto {
    return RecommendationDtoFromJSONTyped(json, false);
}

export function RecommendationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecommendationDto {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'items': !exists(json, 'Items') ? undefined : (json['Items'] === null ? null : (json['Items'] as Array<any>).map(BaseItemDtoFromJSON)),
        'recommendationType': !exists(json, 'RecommendationType') ? undefined : RecommendationTypeFromJSON(json['RecommendationType']),
        'baselineItemName': !exists(json, 'BaselineItemName') ? undefined : json['BaselineItemName'],
        'categoryId': !exists(json, 'CategoryId') ? undefined : json['CategoryId'],
    };
}

export function RecommendationDtoToJSON(value?: RecommendationDto | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Items': value.items === undefined ? undefined : (value.items === null ? null : (value.items as Array<any>).map(BaseItemDtoToJSON)),
        'RecommendationType': RecommendationTypeToJSON(value.recommendationType),
        'BaselineItemName': value.baselineItemName,
        'CategoryId': value.categoryId,
    };
}

