Class Place
- java.lang.Object
-
- software.amazon.awssdk.services.location.model.Place
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Place.Builder,Place>
@Generated("software.amazon.awssdk:codegen") public final class Place extends Object implements SdkPojo, Serializable, 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePlace.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddressNumber()The numerical portion of an address, such as a building number.static Place.Builderbuilder()List<String>categories()The Amazon Location categories that describe this Place.Stringcountry()A country/region specified using ISO 3166 3-digit country/region code.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)PlaceGeometrygeometry()Returns the value of the Geometry property for this object.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasCategories()For responses, this returns true if the service returned a value for the Categories property.inthashCode()booleanhasSupplementalCategories()For responses, this returns true if the service returned a value for the SupplementalCategories property.Booleaninterpolated()Trueif the result is interpolated from other known places.Stringlabel()The full name and address of the point of interest such as a city, region, or country.Stringmunicipality()A name for a local area, such as a city or town name.Stringneighborhood()The name of a community district.StringpostalCode()A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.Stringregion()A name for an area or geographical division, such as a province or state name.List<SdkField<?>>sdkFields()static Class<? extends Place.Builder>serializableBuilderClass()Stringstreet()The name for a street or a road to identify a location.StringsubRegion()A county, or an area that's part of a larger region.List<String>supplementalCategories()Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.TimeZonetimeZone()The time zone in which thePlaceis located.Place.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringunitNumber()For addresses with multiple units, the unit identifier.StringunitType()For addresses with aUnitNumber, the type of unit.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
addressNumber
public final String 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
public final List<String> 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
public final String 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
public final PlaceGeometry geometry()
Returns the value of the Geometry property for this object.- Returns:
- The value of the Geometry property for this object.
-
interpolated
public final Boolean interpolated()
Trueif the result is interpolated from other known places.Falseif the Place is a known place.Not returned when the partner does not provide the information.
For example, returns
Falsefor an address location that is found in the partner data, but returnsTrueif an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.- Returns:
Trueif the result is interpolated from other known places.Falseif the Place is a known place.Not returned when the partner does not provide the information.
For example, returns
Falsefor an address location that is found in the partner data, but returnsTrueif an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.
-
label
public final String 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
public final String 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
public final String neighborhood()
The name of a community district. For example,
Downtown.- Returns:
- The name of a community district. For example,
Downtown.
-
postalCode
public final String 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
public final String 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
public final String 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.
-
subRegion
public final String 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
public final List<String> 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
public final TimeZone timeZone()
The time zone in which the
Placeis located. Returned only when using HERE or Grab as the selected partner.- Returns:
- The time zone in which the
Placeis located. Returned only when using HERE or Grab as the selected partner.
-
unitNumber
public final String unitNumber()
For addresses with multiple units, the unit identifier. Can include numbers and letters, for example
3BorUnit 123.Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for
SearchPlaceIndexForPosition.- Returns:
- For addresses with multiple units, the unit identifier. Can include numbers and letters, for example
3BorUnit 123.Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for
SearchPlaceIndexForPosition.
-
unitType
public final String unitType()
For addresses with a
UnitNumber, the type of unit. For example,Apartment.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.Returned only for a place index that uses Esri as a data provider.
-
toBuilder
public Place.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Place.Builder,Place>
-
builder
public static Place.Builder builder()
-
serializableBuilderClass
public static Class<? extends Place.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
-