Class Location

java.lang.Object
io.micronaut.chatbots.telegram.api.Location

public class Location extends Object
This object represents a point on the map.
Since:
1.0.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • Location

      public Location()
  • Method Details

    • getLongitude

      @NonNull public @NonNull Float getLongitude()
      Returns:
      Longitude as defined by sender.
    • setLongitude

      public void setLongitude(@NonNull @NonNull Float longitude)
      Parameters:
      longitude - Longitude as defined by sender.
    • getLatitude

      @NonNull public @NonNull Float getLatitude()
      Returns:
      Latitude as defined by sender.
    • setLatitude

      public void setLatitude(@NonNull @NonNull Float latitude)
      Parameters:
      latitude - Latitude as defined by sender.
    • getHorizontalAccuracy

      @Nullable public @Nullable Float getHorizontalAccuracy()
      Returns:
      The radius of uncertainty for the location, measured in meters; 0-1500.
    • setHorizontalAccuracy

      public void setHorizontalAccuracy(@Nullable @Nullable Float horizontalAccuracy)
      Parameters:
      horizontalAccuracy - The radius of uncertainty for the location, measured in meters; 0-1500.
    • getLivePeriod

      @Nullable public @Nullable Integer getLivePeriod()
      Returns:
      Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
    • setLivePeriod

      public void setLivePeriod(@Nullable @Nullable Integer livePeriod)
      Parameters:
      livePeriod - Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
    • getHeading

      @Nullable public @Nullable Integer getHeading()
      Returns:
      The direction in which user is moving, in degrees; 1-360. For active live locations only.
    • setHeading

      public void setHeading(@Nullable @Nullable Integer heading)
      Parameters:
      heading - The direction in which user is moving, in degrees; 1-360. For active live locations only.
    • getProximityAlertRadius

      @Nullable public @Nullable Integer getProximityAlertRadius()
      Returns:
      The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
    • setProximityAlertRadius

      public void setProximityAlertRadius(@Nullable @Nullable Integer proximityAlertRadius)
      Parameters:
      proximityAlertRadius - The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
    • toString

      public String toString()
      Overrides:
      toString in class Object