/* * 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 GeneralSubtreeIp = { /** * The first IP address in the range. */ begin?: string | undefined; /** * The CIDR specifying the subtree. */ cidr?: string | undefined; /** * The last IP address in the range. */ end?: string | undefined; /** * The subnet mask of the CIDR. */ mask?: string | undefined; }; /** @internal */ export const GeneralSubtreeIp$inboundSchema: z.ZodType< GeneralSubtreeIp, z.ZodTypeDef, unknown > = z.object({ begin: z.string().optional(), cidr: z.string().optional(), end: z.string().optional(), mask: z.string().optional(), }); export function generalSubtreeIpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GeneralSubtreeIp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GeneralSubtreeIp' from JSON`, ); }