"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.FullDatasetDtoToJSON = exports.FullDatasetDtoFromJSONTyped = exports.FullDatasetDtoFromJSON = exports.instanceOfFullDatasetDto = void 0;
const runtime_1 = require("../runtime");
const DatapointDto_1 = require("./DatapointDto");
/**
 * Check if a given object implements the FullDatasetDto interface.
 */
function instanceOfFullDatasetDto(value) {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "envId" in value;
    isInstance = isInstance && "slug" in value;
    isInstance = isInstance && "name" in value;
    isInstance = isInstance && "inputSchema" in value;
    isInstance = isInstance && "outputSchema" in value;
    isInstance = isInstance && "isFineTuning" in value;
    isInstance = isInstance && "datapoints" in value;
    return isInstance;
}
exports.instanceOfFullDatasetDto = instanceOfFullDatasetDto;
function FullDatasetDtoFromJSON(json) {
    return FullDatasetDtoFromJSONTyped(json, false);
}
exports.FullDatasetDtoFromJSON = FullDatasetDtoFromJSON;
function FullDatasetDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'id': json['id'],
        'envId': json['envId'],
        'slug': json['slug'],
        'name': json['name'],
        'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
        'inputSchema': json['inputSchema'],
        'outputSchema': json['outputSchema'],
        'isFineTuning': json['isFineTuning'],
        'datapoints': (json['datapoints'].map(DatapointDto_1.DatapointDtoFromJSON)),
    };
}
exports.FullDatasetDtoFromJSONTyped = FullDatasetDtoFromJSONTyped;
function FullDatasetDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'id': value.id,
        'envId': value.envId,
        'slug': value.slug,
        'name': value.name,
        'description': value.description,
        'inputSchema': value.inputSchema,
        'outputSchema': value.outputSchema,
        'isFineTuning': value.isFineTuning,
        'datapoints': (value.datapoints.map(DatapointDto_1.DatapointDtoToJSON)),
    };
}
exports.FullDatasetDtoToJSON = FullDatasetDtoToJSON;
