/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { OrgAutoModel, OrgAutoModel$inboundSchema, OrgAutoModel$Outbound, OrgAutoModel$outboundSchema, } from "./orgautomodel.js"; export type ListOrgAutoModelsResponse = { object: "list"; data: Array; }; /** @internal */ export const ListOrgAutoModelsResponse$inboundSchema: z.ZodType< ListOrgAutoModelsResponse, z.ZodTypeDef, unknown > = z.object({ object: z.literal("list"), data: z.array(OrgAutoModel$inboundSchema), }); /** @internal */ export type ListOrgAutoModelsResponse$Outbound = { object: "list"; data: Array; }; /** @internal */ export const ListOrgAutoModelsResponse$outboundSchema: z.ZodType< ListOrgAutoModelsResponse$Outbound, z.ZodTypeDef, ListOrgAutoModelsResponse > = z.object({ object: z.literal("list"), data: z.array(OrgAutoModel$outboundSchema), }); export function listOrgAutoModelsResponseToJSON( listOrgAutoModelsResponse: ListOrgAutoModelsResponse, ): string { return JSON.stringify( ListOrgAutoModelsResponse$outboundSchema.parse(listOrgAutoModelsResponse), ); } export function listOrgAutoModelsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListOrgAutoModelsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListOrgAutoModelsResponse' from JSON`, ); }