/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 3d179cbf1510 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { GetSearchIndexSchemaDetailResponseField, GetSearchIndexSchemaDetailResponseField$inboundSchema, } from "./getsearchindexschemadetailresponsefield.js"; export type GetSearchIndexSchemaDetailResponseSchemaModel = { name: string; summary: string | null; embeddingDimensions: number | null; fields: Array; }; /** @internal */ export const GetSearchIndexSchemaDetailResponseSchemaModel$inboundSchema: z.ZodType = z.object({ name: z.string(), summary: z.nullable(z.string()), embedding_dimensions: z.nullable(z.int()), fields: z.array(GetSearchIndexSchemaDetailResponseField$inboundSchema), }).transform((v) => { return remap$(v, { "embedding_dimensions": "embeddingDimensions", }); }); export function getSearchIndexSchemaDetailResponseSchemaModelFromJSON( jsonString: string, ): SafeParseResult< GetSearchIndexSchemaDetailResponseSchemaModel, SDKValidationError > { return safeParse( jsonString, (x) => GetSearchIndexSchemaDetailResponseSchemaModel$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetSearchIndexSchemaDetailResponseSchemaModel' from JSON`, ); }