/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6e2e46e83894
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
import * as components from "../components/index.js";
/** @internal */
export const JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z.object({
    modelId: z.string(),
    updateModelRequest: components.UpdateModelRequest$outboundSchema,
}).transform((v) => {
    return remap$(v, {
        modelId: "model_id",
        updateModelRequest: "UpdateModelRequest",
    });
});
export function jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON(jobsApiRoutesFineTuningUpdateFineTunedModelRequest) {
    return JSON.stringify(JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUpdateFineTunedModelRequest));
}
/** @internal */
export const JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema = discriminatedUnion("model_type", {
    classifier: components.ClassifierFineTunedModel$inboundSchema,
    completion: components.CompletionFineTunedModel$inboundSchema,
}, { outputPropertyName: "modelType" });
export function jobsApiRoutesFineTuningUpdateFineTunedModelResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelResponse' from JSON`);
}
//# sourceMappingURL=jobsapiroutesfinetuningupdatefinetunedmodel.js.map