/* * 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 { LocationServicesDistanceFinderNearbyExternalResponseOpeningHours, LocationServicesDistanceFinderNearbyExternalResponseOpeningHours$inboundSchema, } from "./locationservicesdistancefindernearbyexternalresponseopeninghours.js"; export type LocationServicesDistanceFinderNearbyExternalResponsePointData = { /** * Identifier for the location. */ id?: string | undefined; /** * Name of the location. */ name?: string | undefined; /** * Description of the location for display purposes. */ description?: string | undefined; /** * Address of the location for display purposes. */ address?: string | undefined; country?: string | undefined; /** * The WGS 84 latitude in decimal degrees format. */ latitude?: string | undefined; /** * The WGS 84 longitude in decimal degrees format. */ longitude?: string | undefined; metaInfo?: { [k: string]: string } | undefined; unstructuredMetaInfo?: { [k: string]: any } | undefined; openingHours?: | LocationServicesDistanceFinderNearbyExternalResponseOpeningHours | undefined; }; /** @internal */ export const LocationServicesDistanceFinderNearbyExternalResponsePointData$inboundSchema: z.ZodType< LocationServicesDistanceFinderNearbyExternalResponsePointData, 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: LocationServicesDistanceFinderNearbyExternalResponseOpeningHours$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 locationServicesDistanceFinderNearbyExternalResponsePointDataFromJSON( jsonString: string, ): SafeParseResult< LocationServicesDistanceFinderNearbyExternalResponsePointData, SDKValidationError > { return safeParse( jsonString, (x) => LocationServicesDistanceFinderNearbyExternalResponsePointData$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'LocationServicesDistanceFinderNearbyExternalResponsePointData' from JSON`, ); }