/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { LoqateError } from "./loqateerror.js"; /** * InternalServerError */ export type LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * InternalServerError */ export class LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContainedData, 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.number != null) this.number = err.number; if (err.description != null) this.description = err.description; if (err.resolution != null) this.resolution = err.resolution; this.name = "LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContained"; } } /** * Forbidden */ export type LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Forbidden */ export class LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContainedData, 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.number != null) this.number = err.number; if (err.description != null) this.description = err.description; if (err.resolution != null) this.resolution = err.resolution; this.name = "LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContained"; } } /** * Unauthorized */ export type LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Unauthorized */ export class LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContainedData, 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.number != null) this.number = err.number; if (err.description != null) this.description = err.description; if (err.resolution != null) this.resolution = err.resolution; this.name = "LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContained"; } } /** * BadRequest */ export type LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * BadRequest */ export class LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContainedData, 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.number != null) this.number = err.number; if (err.description != null) this.description = err.description; if (err.resolution != null) this.resolution = err.resolution; this.name = "LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContained"; } } /** @internal */ export const LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContained, z.ZodTypeDef, unknown > = z.object({ Number: z.number().int().optional(), Description: z.string().optional(), Cause: z.string().optional(), Resolution: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { const remapped = remap$(v, { "Number": "number", "Description": "description", "Cause": "cause", "Resolution": "resolution", }); return new LocationServicesLocationManagementDeleteListOrPointInternalServerErrorErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContained, z.ZodTypeDef, unknown > = z.object({ Number: z.number().int().optional(), Description: z.string().optional(), Cause: z.string().optional(), Resolution: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { const remapped = remap$(v, { "Number": "number", "Description": "description", "Cause": "cause", "Resolution": "resolution", }); return new LocationServicesLocationManagementDeleteListOrPointForbiddenErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContained, z.ZodTypeDef, unknown > = z.object({ Number: z.number().int().optional(), Description: z.string().optional(), Cause: z.string().optional(), Resolution: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { const remapped = remap$(v, { "Number": "number", "Description": "description", "Cause": "cause", "Resolution": "resolution", }); return new LocationServicesLocationManagementDeleteListOrPointUnauthorizedErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContained, z.ZodTypeDef, unknown > = z.object({ Number: z.number().int().optional(), Description: z.string().optional(), Cause: z.string().optional(), Resolution: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { const remapped = remap$(v, { "Number": "number", "Description": "description", "Cause": "cause", "Resolution": "resolution", }); return new LocationServicesLocationManagementDeleteListOrPointBadRequestErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); });