/* * 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 RequestCountAllocation = { unify?: number | undefined; proxy?: number | undefined; vault?: number | undefined; }; /** @internal */ export const RequestCountAllocation$inboundSchema: z.ZodType< RequestCountAllocation, z.ZodTypeDef, unknown > = z.object({ unify: z.number().optional(), proxy: z.number().optional(), vault: z.number().optional(), }); /** @internal */ export type RequestCountAllocation$Outbound = { unify?: number | undefined; proxy?: number | undefined; vault?: number | undefined; }; /** @internal */ export const RequestCountAllocation$outboundSchema: z.ZodType< RequestCountAllocation$Outbound, z.ZodTypeDef, RequestCountAllocation > = z.object({ unify: z.number().optional(), proxy: z.number().optional(), vault: z.number().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RequestCountAllocation$ { /** @deprecated use `RequestCountAllocation$inboundSchema` instead. */ export const inboundSchema = RequestCountAllocation$inboundSchema; /** @deprecated use `RequestCountAllocation$outboundSchema` instead. */ export const outboundSchema = RequestCountAllocation$outboundSchema; /** @deprecated use `RequestCountAllocation$Outbound` instead. */ export type Outbound = RequestCountAllocation$Outbound; } export function requestCountAllocationToJSON( requestCountAllocation: RequestCountAllocation, ): string { return JSON.stringify( RequestCountAllocation$outboundSchema.parse(requestCountAllocation), ); } export function requestCountAllocationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RequestCountAllocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestCountAllocation' from JSON`, ); }