/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PortmapV2Entry = { description?: string | undefined; port?: number | undefined; protocol?: string | undefined; shorthand?: string | undefined; version?: number | undefined; }; /** @internal */ export const PortmapV2Entry$inboundSchema: z.ZodType< PortmapV2Entry, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), port: z.number().int().optional(), protocol: z.string().optional(), shorthand: z.string().optional(), version: z.number().int().optional(), }); export function portmapV2EntryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PortmapV2Entry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PortmapV2Entry' from JSON`, ); }