"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$ = exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$outboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ = exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = void 0;
exports.jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON;
exports.jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON;
exports.jobsApiRoutesFineTuningUpdateFineTunedModelResponseToJSON = jobsApiRoutesFineTuningUpdateFineTunedModelResponseToJSON;
exports.jobsApiRoutesFineTuningUpdateFineTunedModelResponseFromJSON = jobsApiRoutesFineTuningUpdateFineTunedModelResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/** @internal */
exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = z.object({
    model_id: z.string(),
    UpdateFTModelIn: components.UpdateFTModelIn$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "model_id": "modelId",
        "UpdateFTModelIn": "updateFTModelIn",
    });
});
/** @internal */
exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z.object({
    modelId: z.string(),
    updateFTModelIn: components.UpdateFTModelIn$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        modelId: "model_id",
        updateFTModelIn: "UpdateFTModelIn",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobsApiRoutesFineTuningUpdateFineTunedModelRequest$;
(function (JobsApiRoutesFineTuningUpdateFineTunedModelRequest$) {
    /** @deprecated use `JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema` instead. */
    JobsApiRoutesFineTuningUpdateFineTunedModelRequest$.inboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema;
    /** @deprecated use `JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema` instead. */
    JobsApiRoutesFineTuningUpdateFineTunedModelRequest$.outboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema;
})(JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ || (exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ = JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ = {}));
function jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON(jobsApiRoutesFineTuningUpdateFineTunedModelRequest) {
    return JSON.stringify(exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUpdateFineTunedModelRequest));
}
function jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelRequest' from JSON`);
}
/** @internal */
exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema = z.union([
    components.CompletionFTModelOut$inboundSchema.and(z.object({ model_type: z.literal("completion") }).transform((v) => ({
        modelType: v.model_type,
    }))),
    components.ClassifierFTModelOut$inboundSchema.and(z.object({ model_type: z.literal("classifier") }).transform((v) => ({
        modelType: v.model_type,
    }))),
]);
/** @internal */
exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$outboundSchema = z.union([
    components.CompletionFTModelOut$outboundSchema.and(z.object({ modelType: z.literal("completion") }).transform((v) => ({
        model_type: v.modelType,
    }))),
    components.ClassifierFTModelOut$outboundSchema.and(z.object({ modelType: z.literal("classifier") }).transform((v) => ({
        model_type: v.modelType,
    }))),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobsApiRoutesFineTuningUpdateFineTunedModelResponse$;
(function (JobsApiRoutesFineTuningUpdateFineTunedModelResponse$) {
    /** @deprecated use `JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema` instead. */
    JobsApiRoutesFineTuningUpdateFineTunedModelResponse$.inboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema;
    /** @deprecated use `JobsApiRoutesFineTuningUpdateFineTunedModelResponse$outboundSchema` instead. */
    JobsApiRoutesFineTuningUpdateFineTunedModelResponse$.outboundSchema = exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$outboundSchema;
})(JobsApiRoutesFineTuningUpdateFineTunedModelResponse$ || (exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$ = JobsApiRoutesFineTuningUpdateFineTunedModelResponse$ = {}));
function jobsApiRoutesFineTuningUpdateFineTunedModelResponseToJSON(jobsApiRoutesFineTuningUpdateFineTunedModelResponse) {
    return JSON.stringify(exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$outboundSchema.parse(jobsApiRoutesFineTuningUpdateFineTunedModelResponse));
}
function jobsApiRoutesFineTuningUpdateFineTunedModelResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelResponse' from JSON`);
}
//# sourceMappingURL=jobsapiroutesfinetuningupdatefinetunedmodel.js.map