/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 1c08a382c048
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
import { ClassifierFineTuningJob$inboundSchema, } from "./classifierfinetuningjob.js";
import { CompletionFineTuningJob$inboundSchema, } from "./completionfinetuningjob.js";
/** @internal */
export const ListFineTuningJobsResponseData$inboundSchema = discriminatedUnion("job_type", {
    classifier: ClassifierFineTuningJob$inboundSchema,
    completion: CompletionFineTuningJob$inboundSchema,
}, { outputPropertyName: "jobType" });
export function listFineTuningJobsResponseDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListFineTuningJobsResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListFineTuningJobsResponseData' from JSON`);
}
/** @internal */
export const ListFineTuningJobsResponse$inboundSchema = z.object({
    data: z.array(discriminatedUnion("job_type", {
        classifier: ClassifierFineTuningJob$inboundSchema,
        completion: CompletionFineTuningJob$inboundSchema,
    }, { outputPropertyName: "jobType" })).optional(),
    object: z.literal("list").default("list"),
    total: z.int(),
});
export function listFineTuningJobsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListFineTuningJobsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListFineTuningJobsResponse' from JSON`);
}
//# sourceMappingURL=listfinetuningjobsresponse.js.map