Module it.auties.cobalt
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
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theaccuracyrecord component.The field for thecaptionrecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final doubleThe field for thelatituderecord component.private final doubleThe field for thelongituderecord component.private final intThe field for themagneticNorthOffsetrecord component.private final longThe field for thesequenceNumberrecord component.private final floatThe field for thespeedrecord component.private final Optional<byte[]> The field for thethumbnailrecord component.private final intThe field for thetimeOffsetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLiveLocationMessage(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 aLiveLocationMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintaccuracy()Returns the value of theaccuracyrecord component.caption()Returns the value of thecaptionrecord component.category()Return message categoryReturns the value of thecontextInforecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.intReturns the value of themagneticNorthOffsetrecord component.longReturns the value of thesequenceNumberrecord component.floatspeed()Returns the value of thespeedrecord component.Optional<byte[]> Returns the value of thethumbnailrecord component.intReturns the value of thetimeOffsetrecord component.final StringtoString()Returns a string representation of this record class.type()Return message type
-
Field Details
-
latitude
private final double latitudeThe field for thelatituderecord component. -
longitude
private final double longitudeThe field for thelongituderecord component. -
accuracy
private final int accuracyThe field for theaccuracyrecord component. -
speed
private final float speedThe field for thespeedrecord component. -
magneticNorthOffset
private final int magneticNorthOffsetThe field for themagneticNorthOffsetrecord component. -
caption
The field for thecaptionrecord component. -
sequenceNumber
private final long sequenceNumberThe field for thesequenceNumberrecord component. -
timeOffset
private final int timeOffsetThe field for thetimeOffsetrecord component. -
thumbnail
The field for thethumbnailrecord component. -
contextInfo
The field for thecontextInforecord 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 aLiveLocationMessagerecord class.- Parameters:
latitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentaccuracy- the value for theaccuracyrecord componentspeed- the value for thespeedrecord componentmagneticNorthOffset- the value for themagneticNorthOffsetrecord componentcaption- the value for thecaptionrecord componentsequenceNumber- the value for thesequenceNumberrecord componenttimeOffset- the value for thetimeOffsetrecord componentthumbnail- the value for thethumbnailrecord componentcontextInfo- the value for thecontextInforecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message type -
category
Description copied from interface:MessageReturn message category -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
accuracy
public int accuracy()Returns the value of theaccuracyrecord component.- Returns:
- the value of the
accuracyrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
magneticNorthOffset
public int magneticNorthOffset()Returns the value of themagneticNorthOffsetrecord component.- Returns:
- the value of the
magneticNorthOffsetrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
sequenceNumber
public long sequenceNumber()Returns the value of thesequenceNumberrecord component.- Returns:
- the value of the
sequenceNumberrecord component
-
timeOffset
public int timeOffset()Returns the value of thetimeOffsetrecord component.- Returns:
- the value of the
timeOffsetrecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-