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