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