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