List.of(). Optional fields use Optional<T> and are never absent (they resolve to Optional.empty() when not present).
PlaceResults
Import:com.williamcallahan.applemaps.domain.model.PlaceResultsReturned by:
AppleMaps.geocode, AppleMaps.reverseGeocode
| Field | Type | Description |
|---|---|---|
results | List<Place> | Zero or more places matching the geocode request. Never null. |
results is a Place record. A successful geocode that finds no matching address returns an empty list rather than throwing an exception.
Place
Import:com.williamcallahan.applemaps.domain.model.PlaceReturned by:
AppleMaps.lookupPlace, contained in PlaceResults, PlacesResponse, DirectionsResponse
| Field | Type | Description |
|---|---|---|
id | Optional<String> | Apple Maps place identifier, if available. |
alternateIds | List<String> | Alternate identifiers associated with this place. Never null. |
name | String | Display name of the place. Never null. |
coordinate | Location | Latitude/longitude coordinate. Never null. |
displayMapRegion | Optional<MapRegion> | Suggested map region for display, if available. |
formattedAddressLines | List<String> | Human-readable address lines (for example, ["880 Harrison St", "San Francisco, CA 94107", "United States"]). Never null. |
structuredAddress | Optional<StructuredAddress> | Machine-readable address components, if available. See StructuredAddress. |
country | String | Country name. Never null. |
countryCode | String | ISO 3166-1 alpha-2 country code. Never null. |
StructuredAddress
Import:com.williamcallahan.applemaps.domain.model.StructuredAddressContained in:
Place.structuredAddress, SearchResponsePlace.structuredAddress, AutocompleteResult.structuredAddress
| Field | Type | Description |
|---|---|---|
administrativeArea | Optional<String> | State or province, e.g. "California". |
administrativeAreaCode | Optional<String> | Short code for the administrative area, e.g. "CA". |
subAdministrativeArea | Optional<String> | County or district within the administrative area, if available. |
areasOfInterest | List<String> | Named areas of interest at this location. Never null. |
dependentLocalities | List<String> | Sub-locality names, e.g. ["Yerba Buena"]. Never null. |
fullThoroughfare | Optional<String> | Street number and name combined, e.g. "880 Harrison St". |
locality | Optional<String> | City or town, e.g. "San Francisco". |
postCode | Optional<String> | Postal code, e.g. "94107". |
subLocality | Optional<String> | Neighborhood, e.g. "Yerba Buena". |
subThoroughfare | Optional<String> | Street number, e.g. "880". |
thoroughfare | Optional<String> | Street name without number, e.g. "Harrison St". |
SearchResponse
Import:com.williamcallahan.applemaps.domain.model.SearchResponseReturned by:
AppleMaps.search, AppleMaps.resolveCompletionUrl, AppleMaps.resolveCompletionUrls
| Field | Type | Description |
|---|---|---|
displayMapRegion | Optional<SearchMapRegion> | Suggested map region bounding the results, if available. Pass to SearchRegion.fromSearchMapRegion to use as a region hint in a follow-up request. |
paginationInfo | Optional<PaginationInfo> | Pagination metadata, present when pagination is enabled and more results exist. |
results | List<SearchResponsePlace> | Matching places. Never null. |
SearchResponsePlace
Each element inSearchResponse.results is a SearchResponsePlace:
SearchResponsePlace contains all fields from Place plus poiCategory — the point-of-interest category for the result, if applicable.
SearchAutocompleteResponse
Import:com.williamcallahan.applemaps.domain.model.SearchAutocompleteResponseReturned by:
AppleMaps.autocomplete
| Field | Type | Description |
|---|---|---|
results | List<AutocompleteResult> | Autocomplete suggestions. Never null. |
AutocompleteResult
| Field | Type | Description |
|---|---|---|
completionUrl | String | URL to resolve to full place data. Pass to AppleMaps.resolveCompletionUrl. Never null. |
displayLines | List<String> | Human-readable suggestion lines suitable for display in a suggestion dropdown. Never null. |
location | Optional<Location> | Approximate location of the suggestion, if available. |
structuredAddress | Optional<StructuredAddress> | Structured address for the suggestion, if available. |
DirectionsResponse
Import:com.williamcallahan.applemaps.domain.model.DirectionsResponseReturned by:
AppleMaps.directions
| Field | Type | Description |
|---|---|---|
origin | Optional<Place> | Resolved origin place, if available. |
destination | Optional<Place> | Resolved destination place, if available. |
routes | List<DirectionsRoute> | One or more routes. Never null. |
steps | List<DirectionsStep> | Flat list of all steps across all routes. Never null. |
stepPaths | List<List<Location>> | Coordinate arrays for each step’s path. Indexed by DirectionsStep.stepPathIndex. Never null. |
DirectionsRoute
| Field | Type | Description |
|---|---|---|
name | Optional<String> | Route name, if available. |
distanceMeters | Optional<Long> | Total route distance in meters. |
durationSeconds | Optional<Long> | Expected travel time in seconds. |
hasTolls | Optional<Boolean> | Whether the route passes through tolled roads. |
stepIndexes | List<Integer> | Indexes into the DirectionsResponse.steps list for this route. Never null. |
transportType | Optional<TransportType> | Transport mode for this route. |
DirectionsStep
| Field | Type | Description |
|---|---|---|
stepPathIndex | Optional<Integer> | Index into DirectionsResponse.stepPaths for this step’s coordinate path. |
distanceMeters | Optional<Long> | Step distance in meters. |
durationSeconds | Optional<Long> | Step travel time in seconds. |
instructions | Optional<String> | Human-readable navigation instruction (for example, “Turn left onto Main St”). |
transportType | Optional<TransportType> | Transport mode for this step. |
EtaResponse
Import:com.williamcallahan.applemaps.domain.model.EtaResponseReturned by:
AppleMaps.etas
| Field | Type | Description |
|---|---|---|
etas | List<EtaEstimate> | One estimate per destination, in the same order as EtaInput.destinations. Never null. |
EtaEstimate
| Field | Type | Description |
|---|---|---|
destination | Optional<Location> | Destination coordinate matched by the API. |
distanceMeters | Optional<Long> | Travel distance in meters. |
expectedTravelTimeSeconds | Optional<Long> | Real-time travel time estimate in seconds (accounts for current traffic). |
staticTravelTimeSeconds | Optional<Long> | Historical average travel time in seconds (no real-time traffic). |
transportType | Optional<TransportType> | Transport mode used for this estimate. |
PlacesResponse
Import:com.williamcallahan.applemaps.domain.model.PlacesResponseReturned by:
AppleMaps.lookupPlaces
| Field | Type | Description |
|---|---|---|
results | List<Place> | Successfully resolved places. Never null. |
errors | List<PlaceLookupError> | Per-ID errors for place IDs that could not be resolved. Never null. |
lookupPlaces call may partially succeed — some IDs may appear in results while others appear in errors.
PlaceLookupError
| Field | Type | Description |
|---|---|---|
errorCode | PlaceLookupErrorCode | Error code from the API. Never null. |
id() | Optional<String> | The place ID associated with the error (accessor method, not a record component). |
PlaceLookupErrorCode
Import:com.williamcallahan.applemaps.domain.model.PlaceLookupErrorCodeUsed in:
PlaceLookupError
| Constant | Description |
|---|---|
FAILED_INVALID_ID | The request provided an invalid place identifier. |
FAILED_NOT_FOUND | The requested place could not be found. |
FAILED_INTERNAL_ERROR | The lookup failed due to an internal error on Apple’s side. |
PaginationInfo
Import:com.williamcallahan.applemaps.domain.model.PaginationInfoContained in:
SearchResponse.paginationInfo
Present when SearchInput.enablePagination(true) is set and more results are available.
| Field | Type | Description |
|---|---|---|
nextPageToken | Optional<String> | Token to pass to .pageToken() in the next SearchInput to retrieve the next page. Empty if on the last page. |
prevPageToken | Optional<String> | Token for the previous page, if applicable. |
totalPageCount | long | Total number of pages available. |
totalResults | long | Total number of results across all pages. |
AlternateIdsResponse
Import:com.williamcallahan.applemaps.domain.model.AlternateIdsResponseReturned by:
AppleMaps.lookupAlternateIds
| Field | Type | Description |
|---|---|---|
results | List<AlternateIdsEntry> | Successfully resolved alternate ID entries. Never null. |
errors | List<PlaceLookupError> | Per-ID errors for place IDs that could not be resolved. Never null. |
AlternateIdsEntry
| Field | Type | Description |
|---|---|---|
id | Optional<String> | The primary place ID that was queried. |
alternateIds | List<String> | Alternate identifiers for the place (for example, identifiers from other mapping data providers). Never null. |
Enum types
TransportType
Import:com.williamcallahan.applemaps.domain.model.TransportTypeUsed in:
DirectionsInput, EtaInput, DirectionsRoute, DirectionsStep, EtaEstimate
| Constant | API value | Description |
|---|---|---|
AUTOMOBILE | "Automobile" | Car/road routing. |
TRANSIT | "Transit" | Public transit routing. |
WALKING | "Walking" | Pedestrian routing. |
CYCLING | "Cycling" | Bicycle routing. |
DirectionsAvoid
Import:com.williamcallahan.applemaps.domain.model.DirectionsAvoidUsed in:
DirectionsInput
| Constant | API value | Description |
|---|---|---|
TOLLS | "Tolls" | Avoids tolled roads where an alternative exists. |
PoiCategory
Import:com.williamcallahan.applemaps.domain.model.PoiCategoryUsed in:
SearchInput, SearchAutocompleteInput, SearchResponsePlace
Complete list of all 42 constants:
| Constant | API value |
|---|---|
AIRPORT | "Airport" |
AIRPORT_GATE | "AirportGate" |
AIRPORT_TERMINAL | "AirportTerminal" |
AMUSEMENT_PARK | "AmusementPark" |
ATM | "ATM" |
AQUARIUM | "Aquarium" |
BAKERY | "Bakery" |
BANK | "Bank" |
BEACH | "Beach" |
BREWERY | "Brewery" |
BOWLING | "Bowling" |
CAFE | "Cafe" |
CAMPGROUND | "Campground" |
CAR_RENTAL | "CarRental" |
EV_CHARGER | "EVCharger" |
FIRE_STATION | "FireStation" |
FITNESS_CENTER | "FitnessCenter" |
FOOD_MARKET | "FoodMarket" |
GAS_STATION | "GasStation" |
HOSPITAL | "Hospital" |
HOTEL | "Hotel" |
LAUNDRY | "Laundry" |
LIBRARY | "Library" |
MARINA | "Marina" |
MOVIE_THEATER | "MovieTheater" |
MUSEUM | "Museum" |
NATIONAL_PARK | "NationalPark" |
NIGHTLIFE | "Nightlife" |
PARK | "Park" |
PARKING | "Parking" |
PHARMACY | "Pharmacy" |
PLAYGROUND | "Playground" |
POLICE | "Police" |
POST_OFFICE | "PostOffice" |
PUBLIC_TRANSPORT | "PublicTransport" |
RELIGIOUS_SITE | "ReligiousSite" |
RESTAURANT | "Restaurant" |
RESTROOM | "Restroom" |
SCHOOL | "School" |
STADIUM | "Stadium" |
STORE | "Store" |
THEATER | "Theater" |
UNIVERSITY | "University" |
WINERY | "Winery" |
ZOO | "Zoo" |
LANDMARK | "Landmark" |
SearchResultType
Import:com.williamcallahan.applemaps.domain.model.SearchResultTypeUsed in:
SearchInput
| Constant | API value | Description |
|---|---|---|
POI | "poi" | Point of interest. |
ADDRESS | "address" | Address result. |
PHYSICAL_FEATURE | "physicalFeature" | Physical geographic feature. |
POINT_OF_INTEREST | "pointOfInterest" | Point of interest (alternate value). |
SearchACResultType
Import:com.williamcallahan.applemaps.domain.model.SearchACResultTypeUsed in:
SearchAutocompleteInput
Extends SearchResultType with an additional QUERY value for query suggestions:
| Constant | API value | Description |
|---|---|---|
POI | "poi" | Point of interest suggestion. |
ADDRESS | "address" | Address suggestion. |
PHYSICAL_FEATURE | "physicalFeature" | Physical feature suggestion. |
POINT_OF_INTEREST | "pointOfInterest" | Point of interest (alternate value). |
QUERY | "query" | Generic query suggestion (not tied to a specific place). |