"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeAiLlmEndpointParams = serializeAiLlmEndpointParams;
exports.deserializeAiLlmEndpointParams = deserializeAiLlmEndpointParams;
const aiLlmEndpointParamsOpenAi_1 = require("./aiLlmEndpointParamsOpenAi");
const aiLlmEndpointParamsOpenAi_2 = require("./aiLlmEndpointParamsOpenAi");
const aiLlmEndpointParamsGoogle_1 = require("./aiLlmEndpointParamsGoogle");
const aiLlmEndpointParamsGoogle_2 = require("./aiLlmEndpointParamsGoogle");
const aiLlmEndpointParamsAws_1 = require("./aiLlmEndpointParamsAws");
const aiLlmEndpointParamsAws_2 = require("./aiLlmEndpointParamsAws");
const aiLlmEndpointParamsIbm_1 = require("./aiLlmEndpointParamsIbm");
const aiLlmEndpointParamsIbm_2 = require("./aiLlmEndpointParamsIbm");
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
function serializeAiLlmEndpointParams(val) {
    if (val.type == 'openai_params') {
        return (0, aiLlmEndpointParamsOpenAi_1.serializeAiLlmEndpointParamsOpenAi)(val);
    }
    if (val.type == 'google_params') {
        return (0, aiLlmEndpointParamsGoogle_1.serializeAiLlmEndpointParamsGoogle)(val);
    }
    if (val.type == 'aws_params') {
        return (0, aiLlmEndpointParamsAws_1.serializeAiLlmEndpointParamsAws)(val);
    }
    if (val.type == 'ibm_params') {
        return (0, aiLlmEndpointParamsIbm_1.serializeAiLlmEndpointParamsIbm)(val);
    }
    throw new errors_1.BoxSdkError({ message: 'unknown type' });
}
function deserializeAiLlmEndpointParams(val) {
    if (!(0, json_1.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "AiLlmEndpointParams"',
        });
    }
    if (val.type == 'openai_params') {
        return (0, aiLlmEndpointParamsOpenAi_2.deserializeAiLlmEndpointParamsOpenAi)(val);
    }
    if (val.type == 'google_params') {
        return (0, aiLlmEndpointParamsGoogle_2.deserializeAiLlmEndpointParamsGoogle)(val);
    }
    if (val.type == 'aws_params') {
        return (0, aiLlmEndpointParamsAws_2.deserializeAiLlmEndpointParamsAws)(val);
    }
    if (val.type == 'ibm_params') {
        return (0, aiLlmEndpointParamsIbm_2.deserializeAiLlmEndpointParamsIbm)(val);
    }
    throw new errors_1.BoxSdkError({ message: "Can't deserialize AiLlmEndpointParams" });
}
//# sourceMappingURL=aiLlmEndpointParams.js.map