Class LocationMessage

  • All Implemented Interfaces:
    Content

    public class LocationMessage
    extends java.lang.Object
    implements Content
    A location type message includes the coordinates (latitude and longitude) of a location and an optional location object which can include the name and address of the location. Typically sent in response to a Location Request.
    • Field Detail

      • JSON_PROPERTY_TYPE

        public static final java.lang.String JSON_PROPERTY_TYPE
        See Also:
        Constant Field Values
      • JSON_PROPERTY_TEXT

        public static final java.lang.String JSON_PROPERTY_TEXT
        See Also:
        Constant Field Values
      • JSON_PROPERTY_COORDINATES

        public static final java.lang.String JSON_PROPERTY_COORDINATES
        See Also:
        Constant Field Values
      • JSON_PROPERTY_LOCATION

        public static final java.lang.String JSON_PROPERTY_LOCATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • LocationMessage

        public LocationMessage()
    • Method Detail

      • getType

        public java.lang.String getType()
        The type of message.
        Specified by:
        getType in interface Content
        Returns:
        type
      • setType

        public void setType​(java.lang.String type)
      • getText

        @Nullable
        public java.lang.String getText()
        The fallback text message used when location messages are not supported by the channel.
        Returns:
        text
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object