Record Class LiveLocationMessage

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.standard.LiveLocationMessage
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, ContextualMessage, Message

public record LiveLocationMessage(double latitude, double longitude, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, long sequenceNumber, int timeOffset, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo) extends Record implements ContextualMessage
A model class that represents a message holding a live location inside
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the accuracy record component.
    private final Optional<String>
    The field for the caption record component.
    private final Optional<ContextInfo>
    The field for the contextInfo record component.
    private final double
    The field for the latitude record component.
    private final double
    The field for the longitude record component.
    private final int
    The field for the magneticNorthOffset record component.
    private final long
    The field for the sequenceNumber record component.
    private final float
    The field for the speed record component.
    private final Optional<byte[]>
    The field for the thumbnail record component.
    private final int
    The field for the timeOffset record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LiveLocationMessage(double latitude, double longitude, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, long sequenceNumber, int timeOffset, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo)
    Creates an instance of a LiveLocationMessage record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the accuracy record component.
    Returns the value of the caption record component.
    Return message category
    Returns the value of the contextInfo record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the latitude record component.
    double
    Returns the value of the longitude record component.
    int
    Returns the value of the magneticNorthOffset record component.
    long
    Returns the value of the sequenceNumber record component.
    float
    Returns the value of the speed record component.
    Optional<byte[]>
    Returns the value of the thumbnail record component.
    int
    Returns the value of the timeOffset record component.
    final String
    Returns a string representation of this record class.
    Return message type

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • latitude

      private final double latitude
      The field for the latitude record component.
    • longitude

      private final double longitude
      The field for the longitude record component.
    • accuracy

      private final int accuracy
      The field for the accuracy record component.
    • speed

      private final float speed
      The field for the speed record component.
    • magneticNorthOffset

      private final int magneticNorthOffset
      The field for the magneticNorthOffset record component.
    • caption

      private final Optional<String> caption
      The field for the caption record component.
    • sequenceNumber

      private final long sequenceNumber
      The field for the sequenceNumber record component.
    • timeOffset

      private final int timeOffset
      The field for the timeOffset record component.
    • thumbnail

      private final Optional<byte[]> thumbnail
      The field for the thumbnail record component.
    • contextInfo

      private final Optional<ContextInfo> contextInfo
      The field for the contextInfo record component.
  • Constructor Details

    • LiveLocationMessage

      public LiveLocationMessage(double latitude, double longitude, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, long sequenceNumber, int timeOffset, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo)
      Creates an instance of a LiveLocationMessage record class.
      Parameters:
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      accuracy - the value for the accuracy record component
      speed - the value for the speed record component
      magneticNorthOffset - the value for the magneticNorthOffset record component
      caption - the value for the caption record component
      sequenceNumber - the value for the sequenceNumber record component
      timeOffset - the value for the timeOffset record component
      thumbnail - the value for the thumbnail record component
      contextInfo - the value for the contextInfo record component
  • 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
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • latitude

      public double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • accuracy

      public int accuracy()
      Returns the value of the accuracy record component.
      Returns:
      the value of the accuracy record component
    • speed

      public float speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component
    • magneticNorthOffset

      public int magneticNorthOffset()
      Returns the value of the magneticNorthOffset record component.
      Returns:
      the value of the magneticNorthOffset record component
    • caption

      public Optional<String> caption()
      Returns the value of the caption record component.
      Returns:
      the value of the caption record component
    • sequenceNumber

      public long sequenceNumber()
      Returns the value of the sequenceNumber record component.
      Returns:
      the value of the sequenceNumber record component
    • timeOffset

      public int timeOffset()
      Returns the value of the timeOffset record component.
      Returns:
      the value of the timeOffset record component
    • thumbnail

      public Optional<byte[]> thumbnail()
      Returns the value of the thumbnail record component.
      Returns:
      the value of the thumbnail record component
    • contextInfo

      public Optional<ContextInfo> contextInfo()
      Returns the value of the contextInfo record component.
      Specified by:
      contextInfo in interface ContextualMessage
      Returns:
      the value of the contextInfo record component