"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.ExperimentAnalyticsChartDtoToJSON = exports.ExperimentAnalyticsChartDtoFromJSONTyped = exports.ExperimentAnalyticsChartDtoFromJSON = exports.instanceOfExperimentAnalyticsChartDto = exports.ExperimentAnalyticsChartDtoTypeEnum = void 0;
const ExperimentAnalyticsValueDto_1 = require("./ExperimentAnalyticsValueDto");
/**
 * @export
 */
exports.ExperimentAnalyticsChartDtoTypeEnum = {
    Bar: 'bar',
    Pie: 'pie'
};
/**
 * Check if a given object implements the ExperimentAnalyticsChartDto interface.
 */
function instanceOfExperimentAnalyticsChartDto(value) {
    let isInstance = true;
    isInstance = isInstance && "type" in value;
    isInstance = isInstance && "property" in value;
    isInstance = isInstance && "values" in value;
    return isInstance;
}
exports.instanceOfExperimentAnalyticsChartDto = instanceOfExperimentAnalyticsChartDto;
function ExperimentAnalyticsChartDtoFromJSON(json) {
    return ExperimentAnalyticsChartDtoFromJSONTyped(json, false);
}
exports.ExperimentAnalyticsChartDtoFromJSON = ExperimentAnalyticsChartDtoFromJSON;
function ExperimentAnalyticsChartDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'type': json['type'],
        'property': json['property'],
        'values': (json['values'].map(ExperimentAnalyticsValueDto_1.ExperimentAnalyticsValueDtoFromJSON)),
    };
}
exports.ExperimentAnalyticsChartDtoFromJSONTyped = ExperimentAnalyticsChartDtoFromJSONTyped;
function ExperimentAnalyticsChartDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'type': value.type,
        'property': value.property,
        'values': (value.values.map(ExperimentAnalyticsValueDto_1.ExperimentAnalyticsValueDtoToJSON)),
    };
}
exports.ExperimentAnalyticsChartDtoToJSON = ExperimentAnalyticsChartDtoToJSON;
