/* * 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 { HostDnsForwardResolution, HostDnsForwardResolution$inboundSchema, } from "./hostdnsforwardresolution.js"; import { HostDnsReverseResolution, HostDnsReverseResolution$inboundSchema, } from "./hostdnsreverseresolution.js"; export type HostDns = { forwardDns?: { [k: string]: HostDnsForwardResolution } | undefined; names?: Array | null | undefined; reverseDns?: HostDnsReverseResolution | undefined; }; /** @internal */ export const HostDns$inboundSchema: z.ZodType = z.object({ forward_dns: z.record(HostDnsForwardResolution$inboundSchema).optional(), names: z.nullable(z.array(z.string())).optional(), reverse_dns: HostDnsReverseResolution$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "forward_dns": "forwardDns", "reverse_dns": "reverseDns", }); }); export function hostDnsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HostDns$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostDns' from JSON`, ); }