Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Finds a place by its unique ID. A PlaceId
is returned by other search
operations.
A PlaceId is valid only if all of the following are the same in the
original search request and the call to GetPlace
.
- Customer AWS account
- AWS Region
- Data provider specified in the place index resource
Synopsis
- data GetPlace = GetPlace' {}
- newGetPlace :: Text -> Text -> GetPlace
- getPlace_language :: Lens' GetPlace (Maybe Text)
- getPlace_indexName :: Lens' GetPlace Text
- getPlace_placeId :: Lens' GetPlace Text
- data GetPlaceResponse = GetPlaceResponse' {
- httpStatus :: Int
- place :: Place
- newGetPlaceResponse :: Int -> Place -> GetPlaceResponse
- getPlaceResponse_httpStatus :: Lens' GetPlaceResponse Int
- getPlaceResponse_place :: Lens' GetPlaceResponse Place
Creating a Request
See: newGetPlace
smart constructor.
GetPlace' | |
|
Instances
Create a value of GetPlace
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
GetPlace
, getPlace_language
- The preferred language used to return results. The value must be a valid
BCP 47 language tag, for example,
en
for English.
This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.
For an example, we'll use the Greek language. You search for a location
around Athens, Greece, with the language
parameter set to en
. The
city
in the results will most likely be returned as Athens
.
If you set the language
parameter to el
, for Greek, then the city
in the results will more likely be returned as Αθήνα
.
If the data provider does not have a value for Greek, the result will be in a language that the provider does support.
GetPlace
, getPlace_indexName
- The name of the place index resource that you want to use for the
search.
GetPlace
, getPlace_placeId
- The identifier of the place to find.
Request Lenses
getPlace_language :: Lens' GetPlace (Maybe Text) Source #
The preferred language used to return results. The value must be a valid
BCP 47 language tag, for example,
en
for English.
This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.
For an example, we'll use the Greek language. You search for a location
around Athens, Greece, with the language
parameter set to en
. The
city
in the results will most likely be returned as Athens
.
If you set the language
parameter to el
, for Greek, then the city
in the results will more likely be returned as Αθήνα
.
If the data provider does not have a value for Greek, the result will be in a language that the provider does support.
getPlace_indexName :: Lens' GetPlace Text Source #
The name of the place index resource that you want to use for the search.
Destructuring the Response
data GetPlaceResponse Source #
See: newGetPlaceResponse
smart constructor.
GetPlaceResponse' | |
|
Instances
Create a value of GetPlaceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:GetPlaceResponse'
, getPlaceResponse_httpStatus
- The response's http status code.
GetPlaceResponse
, getPlaceResponse_place
- Details about the result, such as its address and position.
Response Lenses
getPlaceResponse_httpStatus :: Lens' GetPlaceResponse Int Source #
The response's http status code.
getPlaceResponse_place :: Lens' GetPlaceResponse Place Source #
Details about the result, such as its address and position.