amazonka-location-2.0: Amazon Location Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Location.GetPlace

Description

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

Creating a Request

data GetPlace Source #

See: newGetPlace smart constructor.

Constructors

GetPlace' 

Fields

  • language :: Maybe Text

    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.

  • indexName :: Text

    The name of the place index resource that you want to use for the search.

  • placeId :: Text

    The identifier of the place to find.

Instances

Instances details
ToHeaders GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Methods

toHeaders :: GetPlace -> [Header] #

ToPath GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

ToQuery GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

AWSRequest GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Associated Types

type AWSResponse GetPlace #

Generic GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Associated Types

type Rep GetPlace :: Type -> Type #

Methods

from :: GetPlace -> Rep GetPlace x #

to :: Rep GetPlace x -> GetPlace #

Read GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Show GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

NFData GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Methods

rnf :: GetPlace -> () #

Eq GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Hashable GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Methods

hashWithSalt :: Int -> GetPlace -> Int #

hash :: GetPlace -> Int #

type AWSResponse GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

type Rep GetPlace Source # 
Instance details

Defined in Amazonka.Location.GetPlace

type Rep GetPlace = D1 ('MetaData "GetPlace" "Amazonka.Location.GetPlace" "amazonka-location-2.0-4NLaYgEbMXwF6j2j7LAFNb" 'False) (C1 ('MetaCons "GetPlace'" 'PrefixI 'True) (S1 ('MetaSel ('Just "language") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "indexName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "placeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetPlace Source #

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.

getPlace_placeId :: Lens' GetPlace Text Source #

The identifier of the place to find.

Destructuring the Response

data GetPlaceResponse Source #

See: newGetPlaceResponse smart constructor.

Constructors

GetPlaceResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • place :: Place

    Details about the result, such as its address and position.

Instances

Instances details
Generic GetPlaceResponse Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Associated Types

type Rep GetPlaceResponse :: Type -> Type #

Show GetPlaceResponse Source # 
Instance details

Defined in Amazonka.Location.GetPlace

NFData GetPlaceResponse Source # 
Instance details

Defined in Amazonka.Location.GetPlace

Methods

rnf :: GetPlaceResponse -> () #

Eq GetPlaceResponse Source # 
Instance details

Defined in Amazonka.Location.GetPlace

type Rep GetPlaceResponse Source # 
Instance details

Defined in Amazonka.Location.GetPlace

type Rep GetPlaceResponse = D1 ('MetaData "GetPlaceResponse" "Amazonka.Location.GetPlace" "amazonka-location-2.0-4NLaYgEbMXwF6j2j7LAFNb" 'False) (C1 ('MetaCons "GetPlaceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "place") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Place)))

newGetPlaceResponse Source #

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.