/* * 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 LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * InternalServerError */ export class LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContained"; } } /** * NotFound */ export type NotFoundErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * NotFound */ export class NotFoundErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: NotFoundErrorResponseSelfContainedData; constructor( err: NotFoundErrorResponseSelfContainedData, 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 = "NotFoundErrorResponseSelfContained"; } } /** * Forbidden */ export type LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Forbidden */ export class LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContained"; } } /** * Unauthorized */ export type LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * Unauthorized */ export class LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContained"; } } /** * BadRequest */ export type LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContainedData = { number?: number | undefined; description?: string | undefined; cause?: string | undefined; resolution?: string | undefined; }; /** * BadRequest */ export class LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContained extends LoqateError { number?: number | undefined; description?: string | undefined; resolution?: string | undefined; /** The original data that was passed to this error instance. */ data$: LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContainedData; constructor( err: LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContainedData, 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 = "LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContained"; } } /** @internal */ export const LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContained, 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 LocationServicesLocationManagementGetListsInternalServerErrorErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const NotFoundErrorResponseSelfContained$inboundSchema: z.ZodType< NotFoundErrorResponseSelfContained, 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 NotFoundErrorResponseSelfContained(remapped, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContained, 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 LocationServicesLocationManagementGetListsForbiddenErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContained, 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 LocationServicesLocationManagementGetListsUnauthorizedErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContained$inboundSchema: z.ZodType< LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContained, 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 LocationServicesLocationManagementGetListsBadRequestErrorResponseSelfContained( remapped, { request: v.request$, response: v.response$, body: v.body$ }, ); });