/* * 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 GetApiV3MessagesCountsOverTimeRequest = { /** * Subnet ID */ subnet?: string | null | undefined; /** * End Timestamp */ end?: number | null | undefined; /** * Start Timestamp */ start: number; /** * Step value */ step?: number | undefined; }; /** @internal */ export const GetApiV3MessagesCountsOverTimeRequest$inboundSchema: z.ZodType< GetApiV3MessagesCountsOverTimeRequest, z.ZodTypeDef, unknown > = z.object({ subnet: z.nullable(z.string()).default(null), end: z.nullable(z.number()).default(null), start: z.number(), step: z.number().int().default(7200), }); /** @internal */ export type GetApiV3MessagesCountsOverTimeRequest$Outbound = { subnet: string | null; end: number | null; start: number; step: number; }; /** @internal */ export const GetApiV3MessagesCountsOverTimeRequest$outboundSchema: z.ZodType< GetApiV3MessagesCountsOverTimeRequest$Outbound, z.ZodTypeDef, GetApiV3MessagesCountsOverTimeRequest > = z.object({ subnet: z.nullable(z.string()).default(null), end: z.nullable(z.number()).default(null), start: z.number(), step: z.number().int().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 GetApiV3MessagesCountsOverTimeRequest$ { /** @deprecated use `GetApiV3MessagesCountsOverTimeRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3MessagesCountsOverTimeRequest$inboundSchema; /** @deprecated use `GetApiV3MessagesCountsOverTimeRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3MessagesCountsOverTimeRequest$outboundSchema; /** @deprecated use `GetApiV3MessagesCountsOverTimeRequest$Outbound` instead. */ export type Outbound = GetApiV3MessagesCountsOverTimeRequest$Outbound; } export function getApiV3MessagesCountsOverTimeRequestToJSON( getApiV3MessagesCountsOverTimeRequest: GetApiV3MessagesCountsOverTimeRequest, ): string { return JSON.stringify( GetApiV3MessagesCountsOverTimeRequest$outboundSchema.parse( getApiV3MessagesCountsOverTimeRequest, ), ); } export function getApiV3MessagesCountsOverTimeRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV3MessagesCountsOverTimeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV3MessagesCountsOverTimeRequest' from JSON`, ); }