/* * 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"; import { Network, Network$inboundSchema } from "./network.js"; import { Organization, Organization$inboundSchema } from "./organization.js"; export type Whois = { network?: Network | undefined; organization?: Organization | undefined; }; /** @internal */ export const Whois$inboundSchema: z.ZodType = z .object({ network: Network$inboundSchema.optional(), organization: Organization$inboundSchema.optional(), }); export function whoisFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Whois$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Whois' from JSON`, ); }