/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export const ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus = { FourHundredAndFour: 404, } as const; export type ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus = ClosedEnum< typeof ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus >; /** * Not Found. The requested resource could not be found. */ export type ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBodyData = { status: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus; message: string; }; /** * Not Found. The requested resource could not be found. */ export class ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody extends Error { status: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBodyData; constructor(err: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBodyData) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.status = err.status; this.name = "ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody"; } } export const ConsoleV1DynamicConfigControllerGenReadStatus = { FourHundredAndOne: 401, } as const; export type ConsoleV1DynamicConfigControllerGenReadStatus = ClosedEnum< typeof ConsoleV1DynamicConfigControllerGenReadStatus >; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export type ConsoleV1DynamicConfigControllerGenReadResponseBodyData = { status: ConsoleV1DynamicConfigControllerGenReadStatus; message: string; }; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export class ConsoleV1DynamicConfigControllerGenReadResponseBody extends Error { status: ConsoleV1DynamicConfigControllerGenReadStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1DynamicConfigControllerGenReadResponseBodyData; constructor(err: ConsoleV1DynamicConfigControllerGenReadResponseBodyData) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.status = err.status; this.name = "ConsoleV1DynamicConfigControllerGenReadResponseBody"; } } /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus > = z.nativeEnum(ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus); /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus > = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$outboundSchema; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$inboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody(v); }); /** @internal */ export type ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$outboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$Outbound, z.ZodTypeDef, ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody > = z .instanceof(ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1DynamicConfigControllerGenReadDynamicConfigsStatus$outboundSchema, message: z.string(), }) ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$outboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1DynamicConfigControllerGenReadDynamicConfigsResponseBody$Outbound; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenReadStatus > = z.nativeEnum(ConsoleV1DynamicConfigControllerGenReadStatus); /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenReadStatus > = ConsoleV1DynamicConfigControllerGenReadStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenReadStatus$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenReadStatus$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenReadStatus$outboundSchema; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadResponseBody$inboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenReadResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1DynamicConfigControllerGenReadStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1DynamicConfigControllerGenReadResponseBody(v); }); /** @internal */ export type ConsoleV1DynamicConfigControllerGenReadResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1DynamicConfigControllerGenReadResponseBody$outboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenReadResponseBody$Outbound, z.ZodTypeDef, ConsoleV1DynamicConfigControllerGenReadResponseBody > = z .instanceof(ConsoleV1DynamicConfigControllerGenReadResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1DynamicConfigControllerGenReadStatus$outboundSchema, message: z.string(), }) ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenReadResponseBody$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenReadResponseBody$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenReadResponseBody$outboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenReadResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1DynamicConfigControllerGenReadResponseBody$Outbound; }