"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.ProjectDtoToJSON = exports.ProjectDtoFromJSONTyped = exports.ProjectDtoFromJSON = exports.instanceOfProjectDto = void 0;
const runtime_1 = require("../runtime");
/**
 * Check if a given object implements the ProjectDto interface.
 */
function instanceOfProjectDto(value) {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "name" in value;
    isInstance = isInstance && "openaiApiKey" in value;
    isInstance = isInstance && "cohereApiKey" in value;
    return isInstance;
}
exports.instanceOfProjectDto = instanceOfProjectDto;
function ProjectDtoFromJSON(json) {
    return ProjectDtoFromJSONTyped(json, false);
}
exports.ProjectDtoFromJSON = ProjectDtoFromJSON;
function ProjectDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'id': json['id'],
        'name': json['name'],
        'orgId': !(0, runtime_1.exists)(json, 'orgId') ? undefined : json['orgId'],
        'userId': !(0, runtime_1.exists)(json, 'userId') ? undefined : json['userId'],
        'openaiApiKey': json['openaiApiKey'],
        'cohereApiKey': json['cohereApiKey'],
    };
}
exports.ProjectDtoFromJSONTyped = ProjectDtoFromJSONTyped;
function ProjectDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'id': value.id,
        'name': value.name,
        'orgId': value.orgId,
        'userId': value.userId,
        'openaiApiKey': value.openaiApiKey,
        'cohereApiKey': value.cohereApiKey,
    };
}
exports.ProjectDtoToJSON = ProjectDtoToJSON;
