/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type CountSubnetsResponse = { /** * Total */ total?: number | undefined; }; /** @internal */ export const CountSubnetsResponse$inboundSchema: z.ZodType< CountSubnetsResponse, z.ZodTypeDef, unknown > = z.object({ total: z.number().int().optional(), }); /** @internal */ export type CountSubnetsResponse$Outbound = { total?: number | undefined; }; /** @internal */ export const CountSubnetsResponse$outboundSchema: z.ZodType< CountSubnetsResponse$Outbound, z.ZodTypeDef, CountSubnetsResponse > = z.object({ total: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CountSubnetsResponse$ { /** @deprecated use `CountSubnetsResponse$inboundSchema` instead. */ export const inboundSchema = CountSubnetsResponse$inboundSchema; /** @deprecated use `CountSubnetsResponse$outboundSchema` instead. */ export const outboundSchema = CountSubnetsResponse$outboundSchema; /** @deprecated use `CountSubnetsResponse$Outbound` instead. */ export type Outbound = CountSubnetsResponse$Outbound; } export function countSubnetsResponseToJSON( countSubnetsResponse: CountSubnetsResponse, ): string { return JSON.stringify( CountSubnetsResponse$outboundSchema.parse(countSubnetsResponse), ); } export function countSubnetsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CountSubnetsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CountSubnetsResponse' from JSON`, ); }