/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d63e96615715 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { SchemaFieldDataType, SchemaFieldDataType$outboundSchema, } from "./schemafielddatatype.js"; import { SchemaFieldIndex, SchemaFieldIndex$outboundSchema, } from "./schemafieldindex.js"; import { SchemaFieldRankingType, SchemaFieldRankingType$outboundSchema, } from "./schemafieldrankingtype.js"; import { SchemaFieldStorage, SchemaFieldStorage$outboundSchema, } from "./schemafieldstorage.js"; export type RegisterDeploymentRequestVespaField = { name: string; type: SchemaFieldDataType; storage: SchemaFieldStorage; ranking: SchemaFieldRankingType; indexType: SchemaFieldIndex | null; multidimensional: boolean; }; /** @internal */ export type RegisterDeploymentRequestVespaField$Outbound = { name: string; type: string; storage: string; ranking: string; index_type: string | null; multidimensional: boolean; }; /** @internal */ export const RegisterDeploymentRequestVespaField$outboundSchema: z.ZodType< RegisterDeploymentRequestVespaField$Outbound, RegisterDeploymentRequestVespaField > = z.object({ name: z.string(), type: SchemaFieldDataType$outboundSchema, storage: SchemaFieldStorage$outboundSchema, ranking: SchemaFieldRankingType$outboundSchema, indexType: z.nullable(SchemaFieldIndex$outboundSchema), multidimensional: z.boolean(), }).transform((v) => { return remap$(v, { indexType: "index_type", }); }); export function registerDeploymentRequestVespaFieldToJSON( registerDeploymentRequestVespaField: RegisterDeploymentRequestVespaField, ): string { return JSON.stringify( RegisterDeploymentRequestVespaField$outboundSchema.parse( registerDeploymentRequestVespaField, ), ); }