/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const GetApiV3MetricsBoundaryNodesCountFormat = { Json: "json", Csv: "csv", } as const; export type GetApiV3MetricsBoundaryNodesCountFormat = ClosedEnum< typeof GetApiV3MetricsBoundaryNodesCountFormat >; export type GetApiV3MetricsBoundaryNodesCountRequest = { /** * End Timestamp */ end?: number | null | undefined; format?: GetApiV3MetricsBoundaryNodesCountFormat | undefined; /** * Start Timestamp */ start?: number | null | undefined; /** * Float Step value */ step?: number | undefined; }; /** @internal */ export const GetApiV3MetricsBoundaryNodesCountFormat$inboundSchema: z.ZodNativeEnum = z .nativeEnum(GetApiV3MetricsBoundaryNodesCountFormat); /** @internal */ export const GetApiV3MetricsBoundaryNodesCountFormat$outboundSchema: z.ZodNativeEnum = GetApiV3MetricsBoundaryNodesCountFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3MetricsBoundaryNodesCountFormat$ { /** @deprecated use `GetApiV3MetricsBoundaryNodesCountFormat$inboundSchema` instead. */ export const inboundSchema = GetApiV3MetricsBoundaryNodesCountFormat$inboundSchema; /** @deprecated use `GetApiV3MetricsBoundaryNodesCountFormat$outboundSchema` instead. */ export const outboundSchema = GetApiV3MetricsBoundaryNodesCountFormat$outboundSchema; } /** @internal */ export const GetApiV3MetricsBoundaryNodesCountRequest$inboundSchema: z.ZodType< GetApiV3MetricsBoundaryNodesCountRequest, z.ZodTypeDef, unknown > = z.object({ end: z.nullable(z.number()).default(null), format: GetApiV3MetricsBoundaryNodesCountFormat$inboundSchema.default("json"), start: z.nullable(z.number()).default(null), step: z.number().default(7200), }); /** @internal */ export type GetApiV3MetricsBoundaryNodesCountRequest$Outbound = { end: number | null; format: string; start: number | null; step: number; }; /** @internal */ export const GetApiV3MetricsBoundaryNodesCountRequest$outboundSchema: z.ZodType< GetApiV3MetricsBoundaryNodesCountRequest$Outbound, z.ZodTypeDef, GetApiV3MetricsBoundaryNodesCountRequest > = z.object({ end: z.nullable(z.number()).default(null), format: GetApiV3MetricsBoundaryNodesCountFormat$outboundSchema.default( "json", ), start: z.nullable(z.number()).default(null), step: z.number().default(7200), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3MetricsBoundaryNodesCountRequest$ { /** @deprecated use `GetApiV3MetricsBoundaryNodesCountRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3MetricsBoundaryNodesCountRequest$inboundSchema; /** @deprecated use `GetApiV3MetricsBoundaryNodesCountRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3MetricsBoundaryNodesCountRequest$outboundSchema; /** @deprecated use `GetApiV3MetricsBoundaryNodesCountRequest$Outbound` instead. */ export type Outbound = GetApiV3MetricsBoundaryNodesCountRequest$Outbound; } export function getApiV3MetricsBoundaryNodesCountRequestToJSON( getApiV3MetricsBoundaryNodesCountRequest: GetApiV3MetricsBoundaryNodesCountRequest, ): string { return JSON.stringify( GetApiV3MetricsBoundaryNodesCountRequest$outboundSchema.parse( getApiV3MetricsBoundaryNodesCountRequest, ), ); } export function getApiV3MetricsBoundaryNodesCountRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiV3MetricsBoundaryNodesCountRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiV3MetricsBoundaryNodesCountRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiV3MetricsBoundaryNodesCountRequest' from JSON`, ); }