java.lang.Object
it.auties.whatsapp.model.message.model.ContextualMessage
it.auties.whatsapp.model.message.standard.LocationMessage
All Implemented Interfaces:
it.auties.protobuf.base.ProtobufMessage, FourRowTemplateTitle, HydratedFourRowTemplateTitle, ButtonsMessageHeader, Message

public final class LocationMessage extends ContextualMessage implements ButtonsMessageHeader, FourRowTemplateTitle, HydratedFourRowTemplateTitle
A model class that represents a message holding a location inside
  • Constructor Details

    • LocationMessage

      protected LocationMessage(LocationMessage.LocationMessageBuilder<?,?> b)
    • LocationMessage

      public LocationMessage(double latitude, double longitude, String name, String address, String url, boolean live, int accuracy, float speed, int magneticNorthOffset, String caption, byte[] thumbnail)
    • LocationMessage

      public LocationMessage()
  • Method Details

    • type

      public MessageType type()
      Description copied from interface: Message
      Return message type
      Specified by:
      type in interface Message
      Returns:
      a non-null message type
    • category

      public MessageCategory category()
      Description copied from interface: Message
      Return message category
      Specified by:
      category in interface Message
      Returns:
      a non-null message category
    • titleType

      public FourRowTemplateTitleType titleType()
      Description copied from interface: FourRowTemplateTitle
      Return the type of this title
      Specified by:
      titleType in interface FourRowTemplateTitle
      Returns:
      a non-null type
    • hydratedTitleType

      public HydratedFourRowTemplateTitleType hydratedTitleType()
      Description copied from interface: HydratedFourRowTemplateTitle
      Return the type of this title
      Specified by:
      hydratedTitleType in interface HydratedFourRowTemplateTitle
      Returns:
      a non-null type
    • builder

      public static LocationMessage.LocationMessageBuilder<?,?> builder()
    • latitude

      public double latitude()
      The latitude of the location that this message wraps
    • longitude

      public double longitude()
      The longitude of the location that this message wraps
    • name

      public String name()
      The name of the location that this message wraps
    • address

      public String address()
      The address of the location that this message wraps
    • url

      public String url()
      A URL to visit the location that this message wraps in Google Maps
    • live

      public boolean live()
      Determines whether this message is a LiveLocationMessage
    • accuracy

      public int accuracy()
      The accuracy in meters of the location that this message wraps
    • speed

      public float speed()
      The speed in meters per second of the device that sent this live location message
    • magneticNorthOffset

      public int magneticNorthOffset()
      Degrees Clockwise from Magnetic North
    • caption

      public String caption()
      The caption of this message
    • thumbnail

      public byte[] thumbnail()
      The thumbnail for this image message encoded as jpeg in an array of bytes
    • latitude

      public LocationMessage latitude(double latitude)
      The latitude of the location that this message wraps
      Returns:
      this.
    • longitude

      public LocationMessage longitude(double longitude)
      The longitude of the location that this message wraps
      Returns:
      this.
    • name

      public LocationMessage name(String name)
      The name of the location that this message wraps
      Returns:
      this.
    • address

      public LocationMessage address(String address)
      The address of the location that this message wraps
      Returns:
      this.
    • url

      public LocationMessage url(String url)
      A URL to visit the location that this message wraps in Google Maps
      Returns:
      this.
    • live

      public LocationMessage live(boolean live)
      Determines whether this message is a LiveLocationMessage
      Returns:
      this.
    • accuracy

      public LocationMessage accuracy(int accuracy)
      The accuracy in meters of the location that this message wraps
      Returns:
      this.
    • speed

      public LocationMessage speed(float speed)
      The speed in meters per second of the device that sent this live location message
      Returns:
      this.
    • magneticNorthOffset

      public LocationMessage magneticNorthOffset(int magneticNorthOffset)
      Degrees Clockwise from Magnetic North
      Returns:
      this.
    • caption

      public LocationMessage caption(String caption)
      The caption of this message
      Returns:
      this.
    • thumbnail

      public LocationMessage thumbnail(byte[] thumbnail)
      The thumbnail for this image message encoded as jpeg in an array of bytes
      Returns:
      this.
    • toString

      public String toString()
      Overrides:
      toString in class ContextualMessage
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ContextualMessage
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class ContextualMessage
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ContextualMessage