/* * 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 { LocationServicesGeocodingGlobalExternalGeocodingItemResponse, LocationServicesGeocodingGlobalExternalGeocodingItemResponse$inboundSchema, } from "./locationservicesgeocodingglobalexternalgeocodingitemresponse.js"; export type LocationServicesGeocodingGlobalExternalGeocodingResult = { /** * The input from the original request. */ input?: string | undefined; /** * An array of geocoding results corresponding to each input from the original request. */ results?: | Array | undefined; }; /** @internal */ export const LocationServicesGeocodingGlobalExternalGeocodingResult$inboundSchema: z.ZodType< LocationServicesGeocodingGlobalExternalGeocodingResult, z.ZodTypeDef, unknown > = z.object({ Input: z.string().optional(), Results: z.array( LocationServicesGeocodingGlobalExternalGeocodingItemResponse$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "Input": "input", "Results": "results", }); }); export function locationServicesGeocodingGlobalExternalGeocodingResultFromJSON( jsonString: string, ): SafeParseResult< LocationServicesGeocodingGlobalExternalGeocodingResult, SDKValidationError > { return safeParse( jsonString, (x) => LocationServicesGeocodingGlobalExternalGeocodingResult$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'LocationServicesGeocodingGlobalExternalGeocodingResult' from JSON`, ); }