Class Place
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Place.Builder,
Place>
Contains details about addresses or points of interest that match the search criteria.
Not all details are included with all responses. Some details may only be returned by specific data partners.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
The numerical portion of an address, such as a building number.static Place.Builder
builder()
The Amazon Location categories that describe this Place.final String
country()
A country/region specified using ISO 3166 3-digit country/region code.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final PlaceGeometry
geometry()
Returns the value of the Geometry property for this object.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the Categories property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the SupplementalCategories property.final Boolean
True
if the result is interpolated from other known places.final String
label()
The full name and address of the point of interest such as a city, region, or country.final String
A name for a local area, such as a city or town name.final String
The name of a community district.final String
A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.final String
region()
A name for an area or geographical division, such as a province or state name.static Class
<? extends Place.Builder> final String
street()
The name for a street or a road to identify a location.final String
An area that's part of a larger municipality.final String
A county, or an area that's part of a larger region.Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.final TimeZone
timeZone()
The time zone in which thePlace
is located.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final String
For addresses with multiple units, the unit identifier.final String
unitType()
For addresses with aUnitNumber
, the type of unit.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
addressNumber
The numerical portion of an address, such as a building number.
- Returns:
- The numerical portion of an address, such as a building number.
-
hasCategories
public final boolean hasCategories()For responses, this returns true if the service returned a value for the Categories property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
categories
The Amazon Location categories that describe this Place.
For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCategories()
method.- Returns:
- The Amazon Location categories that describe this Place.
For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.
-
country
A country/region specified using ISO 3166 3-digit country/region code. For example,
CAN
.- Returns:
- A country/region specified using ISO 3166
3-digit country/region code. For example,
CAN
.
-
geometry
Returns the value of the Geometry property for this object.- Returns:
- The value of the Geometry property for this object.
-
interpolated
True
if the result is interpolated from other known places.False
if the Place is a known place.Not returned when the partner does not provide the information.
For example, returns
False
for an address location that is found in the partner data, but returnsTrue
if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.- Returns:
True
if the result is interpolated from other known places.False
if the Place is a known place.Not returned when the partner does not provide the information.
For example, returns
False
for an address location that is found in the partner data, but returnsTrue
if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.
-
label
The full name and address of the point of interest such as a city, region, or country. For example,
123 Any Street, Any Town, USA
.- Returns:
- The full name and address of the point of interest such as a city, region, or country. For example,
123 Any Street, Any Town, USA
.
-
municipality
A name for a local area, such as a city or town name. For example,
Toronto
.- Returns:
- A name for a local area, such as a city or town name. For example,
Toronto
.
-
neighborhood
The name of a community district. For example,
Downtown
.- Returns:
- The name of a community district. For example,
Downtown
.
-
postalCode
A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.
- Returns:
- A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.
-
region
A name for an area or geographical division, such as a province or state name. For example,
British Columbia
.- Returns:
- A name for an area or geographical division, such as a province or state name. For example,
British Columbia
.
-
street
The name for a street or a road to identify a location. For example,
Main Street
.- Returns:
- The name for a street or a road to identify a location. For example,
Main Street
.
-
subMunicipality
An area that's part of a larger municipality. For example,
Blissville
is a submunicipality in the Queen County in New York.This property is only returned for a place index that uses Esri as a data provider. The property is represented as a
district
.For more information about data providers, see Amazon Location Service data providers.
- Returns:
- An area that's part of a larger municipality. For example,
Blissville
is a submunicipality in the Queen County in New York.This property is only returned for a place index that uses Esri as a data provider. The property is represented as a
district
.For more information about data providers, see Amazon Location Service data providers.
-
subRegion
A county, or an area that's part of a larger region. For example,
Metro Vancouver
.- Returns:
- A county, or an area that's part of a larger region. For example,
Metro Vancouver
.
-
hasSupplementalCategories
public final boolean hasSupplementalCategories()For responses, this returns true if the service returned a value for the SupplementalCategories property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
supplementalCategories
Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSupplementalCategories()
method.- Returns:
- Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.
-
timeZone
The time zone in which the
Place
is located. Returned only when using HERE or Grab as the selected partner.- Returns:
- The time zone in which the
Place
is located. Returned only when using HERE or Grab as the selected partner.
-
unitNumber
For addresses with multiple units, the unit identifier. Can include numbers and letters, for example
3B
orUnit 123
.This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for
SearchPlaceIndexForPosition
.- Returns:
- For addresses with multiple units, the unit identifier. Can include numbers and letters, for example
3B
orUnit 123
.This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for
SearchPlaceIndexForPosition
.
-
unitType
For addresses with a
UnitNumber
, the type of unit. For example,Apartment
.This property is returned only for a place index that uses Esri as a data provider.
- Returns:
- For addresses with a
UnitNumber
, the type of unit. For example,Apartment
.This property is returned only for a place index that uses Esri as a data provider.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<Place.Builder,
Place> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-