"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.DatapointRunWithExperimentDtoToJSON = exports.DatapointRunWithExperimentDtoFromJSONTyped = exports.DatapointRunWithExperimentDtoFromJSON = exports.instanceOfDatapointRunWithExperimentDto = void 0;
const ExperimentDto_1 = require("./ExperimentDto");
/**
 * Check if a given object implements the DatapointRunWithExperimentDto interface.
 */
function instanceOfDatapointRunWithExperimentDto(value) {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "output" in value;
    isInstance = isInstance && "experimentId" in value;
    isInstance = isInstance && "datapointId" in value;
    isInstance = isInstance && "experiment" in value;
    return isInstance;
}
exports.instanceOfDatapointRunWithExperimentDto = instanceOfDatapointRunWithExperimentDto;
function DatapointRunWithExperimentDtoFromJSON(json) {
    return DatapointRunWithExperimentDtoFromJSONTyped(json, false);
}
exports.DatapointRunWithExperimentDtoFromJSON = DatapointRunWithExperimentDtoFromJSON;
function DatapointRunWithExperimentDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'id': json['id'],
        'output': json['output'],
        'experimentId': json['experimentId'],
        'datapointId': json['datapointId'],
        'experiment': (0, ExperimentDto_1.ExperimentDtoFromJSON)(json['experiment']),
    };
}
exports.DatapointRunWithExperimentDtoFromJSONTyped = DatapointRunWithExperimentDtoFromJSONTyped;
function DatapointRunWithExperimentDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'id': value.id,
        'output': value.output,
        'experimentId': value.experimentId,
        'datapointId': value.datapointId,
        'experiment': (0, ExperimentDto_1.ExperimentDtoToJSON)(value.experiment),
    };
}
exports.DatapointRunWithExperimentDtoToJSON = DatapointRunWithExperimentDtoToJSON;
