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:
  • Method Details

    • 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 the isEmpty() 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()

      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 returns True 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 returns True if 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.
    • subMunicipality

      public final String 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

      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 the isEmpty() 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 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

      public final String unitNumber()

      For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 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 or Unit 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

      public final String 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

      public Place.Builder 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 interface ToCopyableBuilder<Place.Builder,Place>
      Returns:
      a builder for type T
    • builder

      public static Place.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Place.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.