/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { WistiaError } from "./wistiaerror.js"; /** * Internal server error */ export type PutMediasMediaHashedIdSwapInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutMediasMediaHashedIdSwapInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasMediaHashedIdSwapInternalServerErrorData; constructor( err: PutMediasMediaHashedIdSwapInternalServerErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PutMediasMediaHashedIdSwapInternalServerError"; } } /** * Resource not found */ export type PutMediasMediaHashedIdSwapNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PutMediasMediaHashedIdSwapNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasMediaHashedIdSwapNotFoundErrorData; constructor( err: PutMediasMediaHashedIdSwapNotFoundErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PutMediasMediaHashedIdSwapNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PutMediasMediaHashedIdSwapForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PutMediasMediaHashedIdSwapForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasMediaHashedIdSwapForbiddenErrorData; constructor( err: PutMediasMediaHashedIdSwapForbiddenErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PutMediasMediaHashedIdSwapForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutMediasMediaHashedIdSwapUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutMediasMediaHashedIdSwapUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasMediaHashedIdSwapUnauthorizedErrorData; constructor( err: PutMediasMediaHashedIdSwapUnauthorizedErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PutMediasMediaHashedIdSwapUnauthorizedError"; } } /** * Bad request, e.g. missing replacement_media_id or media type mismatch. */ export type PutMediasMediaHashedIdSwapBadRequestErrorData = { error?: string | undefined; }; /** * Bad request, e.g. missing replacement_media_id or media type mismatch. */ export class PutMediasMediaHashedIdSwapBadRequestError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasMediaHashedIdSwapBadRequestErrorData; constructor( err: PutMediasMediaHashedIdSwapBadRequestErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "PutMediasMediaHashedIdSwapBadRequestError"; } } /** @internal */ export const PutMediasMediaHashedIdSwapInternalServerError$inboundSchema: z.ZodType< PutMediasMediaHashedIdSwapInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasMediaHashedIdSwapInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasMediaHashedIdSwapNotFoundError$inboundSchema: z.ZodType< PutMediasMediaHashedIdSwapNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasMediaHashedIdSwapNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasMediaHashedIdSwapForbiddenError$inboundSchema: z.ZodType< PutMediasMediaHashedIdSwapForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasMediaHashedIdSwapForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasMediaHashedIdSwapUnauthorizedError$inboundSchema: z.ZodType< PutMediasMediaHashedIdSwapUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasMediaHashedIdSwapUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasMediaHashedIdSwapBadRequestError$inboundSchema: z.ZodType< PutMediasMediaHashedIdSwapBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasMediaHashedIdSwapBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });