/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 6127fc8dfe96 */ 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"; export type GetSearchIndexSummaryResponseVespaSchemaModel = { id: string; name: string; documentCount: number | null; }; /** @internal */ export const GetSearchIndexSummaryResponseVespaSchemaModel$inboundSchema: z.ZodType = z.object({ id: z.string(), name: z.string(), document_count: z.nullable(z.int()), }).transform((v) => { return remap$(v, { "document_count": "documentCount", }); }); export function getSearchIndexSummaryResponseVespaSchemaModelFromJSON( jsonString: string, ): SafeParseResult< GetSearchIndexSummaryResponseVespaSchemaModel, SDKValidationError > { return safeParse( jsonString, (x) => GetSearchIndexSummaryResponseVespaSchemaModel$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetSearchIndexSummaryResponseVespaSchemaModel' from JSON`, ); }