/* * 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 { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours, LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours$inboundSchema, } from "./locationserviceslocationmanagementupdatelistorpoexternalresponseopeninghours.js"; export type LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData = { /** * A GuID unique to a given location. If updating fields within one location this parameter is required. */ id?: string | undefined; /** * The name of the location. */ name?: string | undefined; /** * The description of the location for display purposes. */ description?: string | undefined; /** * The address of the location for display purposes. **If Geocoding is set to TRUE then this parameter is mandatory.** */ address?: string | undefined; /** * The ISO2 or ISO3 country code. **If Geocoding is set to TRUE then this parameter is mandatory.** */ country?: string | undefined; /** * The WGS 84 latitude in decimal degrees format. **This is mandatory unless Geocoding is set to TRUE.** */ latitude?: string | undefined; /** * The WGS 84 longitude in decimal degrees format. **This is mandatory unless Geocoding is set to TRUE.** */ longitude?: string | undefined; /** * Key value pairs that can be used to store any other relevant information. For example, this could be used to store contact information as “ContactNumber”:”123456789” */ metaInfo?: { [k: string]: string } | undefined; unstructuredMetaInfo?: { [k: string]: any } | undefined; openingHours?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours | undefined; }; /** @internal */ export const LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData, z.ZodTypeDef, unknown > = z.object({ Id: z.string().optional(), Name: z.string().optional(), Description: z.string().optional(), Address: z.string().optional(), Country: z.string().optional(), Latitude: z.string().optional(), Longitude: z.string().optional(), MetaInfo: z.record(z.string()).optional(), UnstructuredMetaInfo: z.record(z.any()).optional(), OpeningHours: LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "Id": "id", "Name": "name", "Description": "description", "Address": "address", "Country": "country", "Latitude": "latitude", "Longitude": "longitude", "MetaInfo": "metaInfo", "UnstructuredMetaInfo": "unstructuredMetaInfo", "OpeningHours": "openingHours", }); }); export function locationServicesLocationManagementUpdateListOrPoExternalResponsePointDataFromJSON( jsonString: string, ): SafeParseResult< LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData, SDKValidationError > { return safeParse( jsonString, (x) => LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'LocationServicesLocationManagementUpdateListOrPoExternalResponsePointData' from JSON`, ); }