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