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