/* 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 { ExperimentAnalyticsChartDto } from './ExperimentAnalyticsChartDto';
import {
    ExperimentAnalyticsChartDtoFromJSON,
    ExperimentAnalyticsChartDtoFromJSONTyped,
    ExperimentAnalyticsChartDtoToJSON,
} from './ExperimentAnalyticsChartDto';
import type { ExperimentDto } from './ExperimentDto';
import {
    ExperimentDtoFromJSON,
    ExperimentDtoFromJSONTyped,
    ExperimentDtoToJSON,
} from './ExperimentDto';

/**
 * 
 * @export
 * @interface ExperimentAnalyticsDto
 */
export interface ExperimentAnalyticsDto {
    /**
     * 
     * @type {ExperimentDto}
     * @memberof ExperimentAnalyticsDto
     */
    experiment: ExperimentDto;
    /**
     * 
     * @type {Array<ExperimentAnalyticsChartDto>}
     * @memberof ExperimentAnalyticsDto
     */
    charts: Array<ExperimentAnalyticsChartDto>;
}

/**
 * Check if a given object implements the ExperimentAnalyticsDto interface.
 */
export function instanceOfExperimentAnalyticsDto(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "experiment" in value;
    isInstance = isInstance && "charts" in value;

    return isInstance;
}

export function ExperimentAnalyticsDtoFromJSON(json: any): ExperimentAnalyticsDto {
    return ExperimentAnalyticsDtoFromJSONTyped(json, false);
}

export function ExperimentAnalyticsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExperimentAnalyticsDto {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'experiment': ExperimentDtoFromJSON(json['experiment']),
        'charts': ((json['charts'] as Array<any>).map(ExperimentAnalyticsChartDtoFromJSON)),
    };
}

export function ExperimentAnalyticsDtoToJSON(value?: ExperimentAnalyticsDto | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'experiment': ExperimentDtoToJSON(value.experiment),
        'charts': ((value.charts as Array<any>).map(ExperimentAnalyticsChartDtoToJSON)),
    };
}

