/* * 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"; import { MdnsResult, MdnsResult$inboundSchema } from "./mdnsresult.js"; export type Mdns = { multipleResponses?: boolean | undefined; names?: Array | null | undefined; results?: Array | null | undefined; }; /** @internal */ export const Mdns$inboundSchema: z.ZodType = z .object({ multiple_responses: z.boolean().optional(), names: z.nullable(z.array(z.string())).optional(), results: z.nullable(z.array(MdnsResult$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "multiple_responses": "multipleResponses", }); }); export function mdnsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Mdns$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Mdns' from JSON`, ); }