/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus = { FourHundredAndThree: 403, } as const; export type ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus = ClosedEnum< typeof ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus >; /** * Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource. */ export type ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBodyData = { status: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus; message: string; }; /** * Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource. */ export class ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody extends Error { status: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBodyData; constructor( err: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBodyData ) { 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 = "ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody"; } } export const ConsoleV1DynamicConfigControllerGenCreateStatus = { FourHundredAndOne: 401, } as const; export type ConsoleV1DynamicConfigControllerGenCreateStatus = ClosedEnum< typeof ConsoleV1DynamicConfigControllerGenCreateStatus >; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export type ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBodyData = { status: ConsoleV1DynamicConfigControllerGenCreateStatus; message: string; }; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export class ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody extends Error { status: ConsoleV1DynamicConfigControllerGenCreateStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBodyData; constructor(err: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBodyData) { 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 = "ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody"; } } export const Status = { FourHundred: 400, } as const; export type Status = ClosedEnum; /** * Invalid request. Please check the request input and try again. */ export type ConsoleV1DynamicConfigControllerGenCreateResponseBodyData = { status: Status; message: string; }; /** * Invalid request. Please check the request input and try again. */ export class ConsoleV1DynamicConfigControllerGenCreateResponseBody extends Error { status: Status; /** The original data that was passed to this error instance. */ data$: ConsoleV1DynamicConfigControllerGenCreateResponseBodyData; constructor(err: ConsoleV1DynamicConfigControllerGenCreateResponseBodyData) { 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 = "ConsoleV1DynamicConfigControllerGenCreateResponseBody"; } } /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus > = z.nativeEnum(ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus); /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus > = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$outboundSchema; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$inboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody(v); }); /** @internal */ export type ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$outboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$Outbound, z.ZodTypeDef, ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody > = z .instanceof(ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsStatus$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 ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$outboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseResponseBody$Outbound; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenCreateStatus > = z.nativeEnum(ConsoleV1DynamicConfigControllerGenCreateStatus); /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1DynamicConfigControllerGenCreateStatus > = ConsoleV1DynamicConfigControllerGenCreateStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1DynamicConfigControllerGenCreateStatus$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenCreateStatus$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenCreateStatus$outboundSchema; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$inboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1DynamicConfigControllerGenCreateStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody(v); }); /** @internal */ export type ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$outboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$Outbound, z.ZodTypeDef, ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody > = z .instanceof(ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1DynamicConfigControllerGenCreateStatus$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 ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$outboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1DynamicConfigControllerGenCreateDynamicConfigsResponseBody$Outbound; } /** @internal */ export const Status$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Status); /** @internal */ export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Status$ { /** @deprecated use `Status$inboundSchema` instead. */ export const inboundSchema = Status$inboundSchema; /** @deprecated use `Status$outboundSchema` instead. */ export const outboundSchema = Status$outboundSchema; } /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateResponseBody$inboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateResponseBody, z.ZodTypeDef, unknown > = z .object({ status: Status$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1DynamicConfigControllerGenCreateResponseBody(v); }); /** @internal */ export type ConsoleV1DynamicConfigControllerGenCreateResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1DynamicConfigControllerGenCreateResponseBody$outboundSchema: z.ZodType< ConsoleV1DynamicConfigControllerGenCreateResponseBody$Outbound, z.ZodTypeDef, ConsoleV1DynamicConfigControllerGenCreateResponseBody > = z .instanceof(ConsoleV1DynamicConfigControllerGenCreateResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: Status$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 ConsoleV1DynamicConfigControllerGenCreateResponseBody$ { /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1DynamicConfigControllerGenCreateResponseBody$inboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1DynamicConfigControllerGenCreateResponseBody$outboundSchema; /** @deprecated use `ConsoleV1DynamicConfigControllerGenCreateResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1DynamicConfigControllerGenCreateResponseBody$Outbound; }