/* * 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 LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * InternalServerError */ export class LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContained"; } } /** * Forbidden */ export type LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Forbidden */ export class LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContained"; } } /** * Unauthorized */ export type LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Unauthorized */ export class LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContained"; } } /** * BadRequest */ export type LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * BadRequest */ export class LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContained"; } } /** @internal */ export const LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContained, 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 LocationServicesLocationManagementUpdateListOrPointInternalServerErrorErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContained, 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 LocationServicesLocationManagementUpdateListOrPointForbiddenErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContained, 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 LocationServicesLocationManagementUpdateListOrPointUnauthorizedErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContained, 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 LocationServicesLocationManagementUpdateListOrPointBadRequestErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); });