/* * 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 LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * InternalServerError */ export class LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContained"; } } /** * Forbidden */ export type LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Forbidden */ export class LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContained"; } } /** * Unauthorized */ export type LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Unauthorized */ export class LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContained"; } } /** * BadRequest */ export type LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * BadRequest */ export class LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContained"; } } /** @internal */ export const LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContained, 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 LocationServicesLocationManagementCreateListInternalServerErrorErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContained, 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 LocationServicesLocationManagementCreateListForbiddenErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContained, 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 LocationServicesLocationManagementCreateListUnauthorizedErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContained, 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 LocationServicesLocationManagementCreateListBadRequestErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); });