/* * 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 MdnsResult = { addresses?: Array | null | undefined; fullName?: string | undefined; port?: number | undefined; priority?: number | undefined; target?: string | undefined; texts?: Array | null | undefined; weight?: number | undefined; }; /** @internal */ export const MdnsResult$inboundSchema: z.ZodType< MdnsResult, z.ZodTypeDef, unknown > = z.object({ addresses: z.nullable(z.array(z.string())).optional(), full_name: z.string().optional(), port: z.number().int().optional(), priority: z.number().int().optional(), target: z.string().optional(), texts: z.nullable(z.array(z.string())).optional(), weight: z.number().int().optional(), }).transform((v) => { return remap$(v, { "full_name": "fullName", }); }); export function mdnsResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MdnsResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MdnsResult' from JSON`, ); }