"use strict";
/* 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.DashboardAnalyticsDtoToJSON = exports.DashboardAnalyticsDtoFromJSONTyped = exports.DashboardAnalyticsDtoFromJSON = exports.instanceOfDashboardAnalyticsDto = void 0;
const ChangesDto_1 = require("./ChangesDto");
const MaxDto_1 = require("./MaxDto");
/**
 * Check if a given object implements the DashboardAnalyticsDto interface.
 */
function instanceOfDashboardAnalyticsDto(value) {
    let isInstance = true;
    isInstance = isInstance && "cost" in value;
    isInstance = isInstance && "averageLatency" in value;
    isInstance = isInstance && "traces" in value;
    isInstance = isInstance && "max" in value;
    isInstance = isInstance && "changes" in value;
    isInstance = isInstance && "experimentCount" in value;
    return isInstance;
}
exports.instanceOfDashboardAnalyticsDto = instanceOfDashboardAnalyticsDto;
function DashboardAnalyticsDtoFromJSON(json) {
    return DashboardAnalyticsDtoFromJSONTyped(json, false);
}
exports.DashboardAnalyticsDtoFromJSON = DashboardAnalyticsDtoFromJSON;
function DashboardAnalyticsDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'cost': json['cost'],
        'averageLatency': json['averageLatency'],
        'traces': json['traces'],
        'max': (0, MaxDto_1.MaxDtoFromJSON)(json['max']),
        'changes': (0, ChangesDto_1.ChangesDtoFromJSON)(json['changes']),
        'experimentCount': json['experimentCount'],
    };
}
exports.DashboardAnalyticsDtoFromJSONTyped = DashboardAnalyticsDtoFromJSONTyped;
function DashboardAnalyticsDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'cost': value.cost,
        'averageLatency': value.averageLatency,
        'traces': value.traces,
        'max': (0, MaxDto_1.MaxDtoToJSON)(value.max),
        'changes': (0, ChangesDto_1.ChangesDtoToJSON)(value.changes),
        'experimentCount': value.experimentCount,
    };
}
exports.DashboardAnalyticsDtoToJSON = DashboardAnalyticsDtoToJSON;
