/* tslint:disable */
/* eslint-disable */
/**
 * OmsorgCore.Api
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
import type { ContractResponse } from './ContractResponse';
import {
    ContractResponseFromJSON,
    ContractResponseFromJSONTyped,
    ContractResponseToJSON,
    ContractResponseToJSONTyped,
} from './ContractResponse';

/**
 * 
 * @export
 * @interface ContractResponsePagedResponse
 */
export interface ContractResponsePagedResponse {
    /**
     * 
     * @type {Array<ContractResponse>}
     * @memberof ContractResponsePagedResponse
     */
    items?: Array<ContractResponse> | null;
    /**
     * 
     * @type {number}
     * @memberof ContractResponsePagedResponse
     */
    totalCount?: number;
    /**
     * 
     * @type {number}
     * @memberof ContractResponsePagedResponse
     */
    page?: number;
    /**
     * 
     * @type {number}
     * @memberof ContractResponsePagedResponse
     */
    pageSize?: number;
}

/**
 * Check if a given object implements the ContractResponsePagedResponse interface.
 */
export function instanceOfContractResponsePagedResponse(value: object): value is ContractResponsePagedResponse {
    return true;
}

export function ContractResponsePagedResponseFromJSON(json: any): ContractResponsePagedResponse {
    return ContractResponsePagedResponseFromJSONTyped(json, false);
}

export function ContractResponsePagedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContractResponsePagedResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'items': json['items'] == null ? undefined : ((json['items'] as Array<any>).map(ContractResponseFromJSON)),
        'totalCount': json['totalCount'] == null ? undefined : json['totalCount'],
        'page': json['page'] == null ? undefined : json['page'],
        'pageSize': json['pageSize'] == null ? undefined : json['pageSize'],
    };
}

export function ContractResponsePagedResponseToJSON(json: any): ContractResponsePagedResponse {
    return ContractResponsePagedResponseToJSONTyped(json, false);
}

export function ContractResponsePagedResponseToJSONTyped(value?: ContractResponsePagedResponse | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'items': value['items'] == null ? undefined : ((value['items'] as Array<any>).map(ContractResponseToJSON)),
        'totalCount': value['totalCount'],
        'page': value['page'],
        'pageSize': value['pageSize'],
    };
}

