java.lang.Object
java.lang.Record
it.auties.whatsapp.model.poll.PollUpdate
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record PollUpdate(ChatMessageKey pollUpdateMessageKey, PollUpdateEncryptedOptions vote, long senderTimestampMilliseconds)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model class that represents metadata about a
PollUpdateMessage Not currently used, so it's
package private-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChatMessageKeyThe field for thepollUpdateMessageKeyrecord component.private final longThe field for thesenderTimestampMillisecondsrecord component.private final PollUpdateEncryptedOptionsThe field for thevoterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPollUpdate(ChatMessageKey pollUpdateMessageKey, PollUpdateEncryptedOptions vote, long senderTimestampMilliseconds) Creates an instance of aPollUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepollUpdateMessageKeyrecord component.Returns when the update was sentlongReturns the value of thesenderTimestampMillisecondsrecord component.final StringtoString()Returns a string representation of this record class.vote()Returns the value of thevoterecord component.
-
Field Details
-
pollUpdateMessageKey
The field for thepollUpdateMessageKeyrecord component. -
vote
The field for thevoterecord component. -
senderTimestampMilliseconds
private final long senderTimestampMillisecondsThe field for thesenderTimestampMillisecondsrecord component.
-
-
Constructor Details
-
PollUpdate
public PollUpdate(ChatMessageKey pollUpdateMessageKey, PollUpdateEncryptedOptions vote, long senderTimestampMilliseconds) Creates an instance of aPollUpdaterecord class.- Parameters:
pollUpdateMessageKey- the value for thepollUpdateMessageKeyrecord componentvote- the value for thevoterecord componentsenderTimestampMilliseconds- the value for thesenderTimestampMillisecondsrecord component
-
-
Method Details
-
senderTimestamp
Returns when the update was sent- Returns:
- an optional
-
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 '=='. -
pollUpdateMessageKey
Returns the value of thepollUpdateMessageKeyrecord component.- Returns:
- the value of the
pollUpdateMessageKeyrecord component
-
vote
Returns the value of thevoterecord component.- Returns:
- the value of the
voterecord component
-
senderTimestampMilliseconds
public long senderTimestampMilliseconds()Returns the value of thesenderTimestampMillisecondsrecord component.- Returns:
- the value of the
senderTimestampMillisecondsrecord component
-