/* 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';

/**
 * 
 * @export
 * @interface BaseItemDtoQueryResult
 */
export interface BaseItemDtoQueryResult {
    /**
     * Gets or sets the items.
     * @type {Array<BaseItemDto>}
     * @memberof BaseItemDtoQueryResult
     */
    items?: Array<BaseItemDto> | null;
    /**
     * Gets or sets the total number of records available.
     * @type {number}
     * @memberof BaseItemDtoQueryResult
     */
    totalRecordCount?: number;
    /**
     * Gets or sets the index of the first record in Items.
     * @type {number}
     * @memberof BaseItemDtoQueryResult
     */
    startIndex?: number;
}

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

    return isInstance;
}

export function BaseItemDtoQueryResultFromJSON(json: any): BaseItemDtoQueryResult {
    return BaseItemDtoQueryResultFromJSONTyped(json, false);
}

export function BaseItemDtoQueryResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): BaseItemDtoQueryResult {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'items': !exists(json, 'Items') ? undefined : (json['Items'] === null ? null : (json['Items'] as Array<any>).map(BaseItemDtoFromJSON)),
        'totalRecordCount': !exists(json, 'TotalRecordCount') ? undefined : json['TotalRecordCount'],
        'startIndex': !exists(json, 'StartIndex') ? undefined : json['StartIndex'],
    };
}

export function BaseItemDtoQueryResultToJSON(value?: BaseItemDtoQueryResult | 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)),
        'TotalRecordCount': value.totalRecordCount,
        'StartIndex': value.startIndex,
    };
}

