/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: b1ef3ab850f8 */ 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 { GetSearchIndexSummaryResponseVespaSchemaModel, GetSearchIndexSummaryResponseVespaSchemaModel$inboundSchema, } from "./getsearchindexsummaryresponsevespaschemamodel.js"; export type GetSearchIndexSummaryResponseVespaIndex = { type: "vespa"; k8sCluster: string; k8sNamespace: string; vespaInstanceName: string; schemas: Array; }; /** @internal */ export const GetSearchIndexSummaryResponseVespaIndex$inboundSchema: z.ZodType< GetSearchIndexSummaryResponseVespaIndex, unknown > = z.object({ type: z.literal("vespa"), k8s_cluster: z.string(), k8s_namespace: z.string(), vespa_instance_name: z.string(), schemas: z.array(GetSearchIndexSummaryResponseVespaSchemaModel$inboundSchema), }).transform((v) => { return remap$(v, { "k8s_cluster": "k8sCluster", "k8s_namespace": "k8sNamespace", "vespa_instance_name": "vespaInstanceName", }); }); export function getSearchIndexSummaryResponseVespaIndexFromJSON( jsonString: string, ): SafeParseResult< GetSearchIndexSummaryResponseVespaIndex, SDKValidationError > { return safeParse( jsonString, (x) => GetSearchIndexSummaryResponseVespaIndex$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetSearchIndexSummaryResponseVespaIndex' from JSON`, ); }