"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.ExperimentAnalyticsDtoToJSON = exports.ExperimentAnalyticsDtoFromJSONTyped = exports.ExperimentAnalyticsDtoFromJSON = exports.instanceOfExperimentAnalyticsDto = void 0;
const ExperimentAnalyticsChartDto_1 = require("./ExperimentAnalyticsChartDto");
const ExperimentDto_1 = require("./ExperimentDto");
/**
 * Check if a given object implements the ExperimentAnalyticsDto interface.
 */
function instanceOfExperimentAnalyticsDto(value) {
    let isInstance = true;
    isInstance = isInstance && "experiment" in value;
    isInstance = isInstance && "charts" in value;
    return isInstance;
}
exports.instanceOfExperimentAnalyticsDto = instanceOfExperimentAnalyticsDto;
function ExperimentAnalyticsDtoFromJSON(json) {
    return ExperimentAnalyticsDtoFromJSONTyped(json, false);
}
exports.ExperimentAnalyticsDtoFromJSON = ExperimentAnalyticsDtoFromJSON;
function ExperimentAnalyticsDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'experiment': (0, ExperimentDto_1.ExperimentDtoFromJSON)(json['experiment']),
        'charts': (json['charts'].map(ExperimentAnalyticsChartDto_1.ExperimentAnalyticsChartDtoFromJSON)),
    };
}
exports.ExperimentAnalyticsDtoFromJSONTyped = ExperimentAnalyticsDtoFromJSONTyped;
function ExperimentAnalyticsDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'experiment': (0, ExperimentDto_1.ExperimentDtoToJSON)(value.experiment),
        'charts': (value.charts.map(ExperimentAnalyticsChartDto_1.ExperimentAnalyticsChartDtoToJSON)),
    };
}
exports.ExperimentAnalyticsDtoToJSON = ExperimentAnalyticsDtoToJSON;
