/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: e1eea242b18a
 */
import { safeParse } from "../../lib/schemas.js";
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
import { smartUnion } from "../../types/smartUnion.js";
import * as components from "../components/index.js";
/** @internal */
export const ResponseT$inboundSchema = discriminatedUnion("job_type", {
    classifier: components.ClassifierFineTuningJob$inboundSchema,
    completion: components.CompletionFineTuningJob$inboundSchema,
}, { outputPropertyName: "jobType" });
export function responseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseT' from JSON`);
}
/** @internal */
export const JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = smartUnion([
    components.LegacyJobMetadata$inboundSchema,
    discriminatedUnion("job_type", {
        classifier: components.ClassifierFineTuningJob$inboundSchema,
        completion: components.CompletionFineTuningJob$inboundSchema,
    }, { outputPropertyName: "jobType" }),
]);
export function jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON`);
}
//# sourceMappingURL=jobsapiroutesfinetuningcreatefinetuningjob.js.map