/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6b955609daf1
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
import { BaseModelCard$inboundSchema } from "./basemodelcard.js";
import { FTModelCard$inboundSchema } from "./ftmodelcard.js";
/** @internal */
export const ModelListData$inboundSchema = discriminatedUnion("type", {
    base: BaseModelCard$inboundSchema,
    ["fine-tuned"]: FTModelCard$inboundSchema,
});
export function modelListDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ModelListData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModelListData' from JSON`);
}
/** @internal */
export const ModelList$inboundSchema = z.object({
    object: z.string().default("list"),
    data: z.array(discriminatedUnion("type", {
        base: BaseModelCard$inboundSchema,
        ["fine-tuned"]: FTModelCard$inboundSchema,
    })).optional(),
});
export function modelListFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ModelList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModelList' from JSON`);
}
//# sourceMappingURL=modellist.js.map