/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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 PortmapV3Entry = { description?: string | undefined; networkId?: string | undefined; owner?: string | undefined; shorthand?: string | undefined; universalAddress?: string | undefined; version?: number | undefined; }; /** @internal */ export const PortmapV3Entry$inboundSchema: z.ZodType< PortmapV3Entry, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), network_id: z.string().optional(), owner: z.string().optional(), shorthand: z.string().optional(), universal_address: z.string().optional(), version: z.number().int().optional(), }).transform((v) => { return remap$(v, { "network_id": "networkId", "universal_address": "universalAddress", }); }); export function portmapV3EntryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PortmapV3Entry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PortmapV3Entry' from JSON`, ); }