/* tslint:disable */
/* eslint-disable */
/**
 * Montelo
 * Documentation for the Montelo API.
 *
 * 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 { exists, mapValues } from '../runtime';
import type { TraceWithLogsDto } from './TraceWithLogsDto';
import {
    TraceWithLogsDtoFromJSON,
    TraceWithLogsDtoFromJSONTyped,
    TraceWithLogsDtoToJSON,
} from './TraceWithLogsDto';

/**
 * 
 * @export
 * @interface TracesWithCountDto
 */
export interface TracesWithCountDto {
    /**
     * 
     * @type {Array<TraceWithLogsDto>}
     * @memberof TracesWithCountDto
     */
    traces: Array<TraceWithLogsDto>;
    /**
     * 
     * @type {number}
     * @memberof TracesWithCountDto
     */
    totalCount: number;
}

/**
 * Check if a given object implements the TracesWithCountDto interface.
 */
export function instanceOfTracesWithCountDto(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "traces" in value;
    isInstance = isInstance && "totalCount" in value;

    return isInstance;
}

export function TracesWithCountDtoFromJSON(json: any): TracesWithCountDto {
    return TracesWithCountDtoFromJSONTyped(json, false);
}

export function TracesWithCountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TracesWithCountDto {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'traces': ((json['traces'] as Array<any>).map(TraceWithLogsDtoFromJSON)),
        'totalCount': json['totalCount'],
    };
}

export function TracesWithCountDtoToJSON(value?: TracesWithCountDto | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'traces': ((value.traces as Array<any>).map(TraceWithLogsDtoToJSON)),
        'totalCount': value.totalCount,
    };
}

