java.lang.Object
java.lang.Record
it.auties.whatsapp.model.info.NotificationMessageInfo
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Info
public record NotificationMessageInfo(ChatMessageKey key, MessageContainer message, long messageTimestampSeconds, Optional<String> participant)
extends Record
implements Info, it.auties.protobuf.model.ProtobufMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChatMessageKeyThe field for thekeyrecord component.private final MessageContainerThe field for themessagerecord component.private final longThe field for themessageTimestampSecondsrecord component.The field for theparticipantrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNotificationMessageInfo(ChatMessageKey key, MessageContainer message, long messageTimestampSeconds, Optional<String> participant) Creates an instance of aNotificationMessageInforecord 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.key()Returns the value of thekeyrecord component.message()Returns the value of themessagerecord component.Returns when the message was sentlongReturns the value of themessageTimestampSecondsrecord component.Returns the value of theparticipantrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
key
The field for thekeyrecord component. -
message
The field for themessagerecord component. -
messageTimestampSeconds
private final long messageTimestampSecondsThe field for themessageTimestampSecondsrecord component. -
participant
The field for theparticipantrecord component.
-
-
Constructor Details
-
NotificationMessageInfo
public NotificationMessageInfo(ChatMessageKey key, MessageContainer message, long messageTimestampSeconds, Optional<String> participant) Creates an instance of aNotificationMessageInforecord class.- Parameters:
key- the value for thekeyrecord componentmessage- the value for themessagerecord componentmessageTimestampSeconds- the value for themessageTimestampSecondsrecord componentparticipant- the value for theparticipantrecord component
-
-
Method Details
-
messageTimestamp
Returns when the message 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 '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
messageTimestampSeconds
public long messageTimestampSeconds()Returns the value of themessageTimestampSecondsrecord component.- Returns:
- the value of the
messageTimestampSecondsrecord component
-
participant
Returns the value of theparticipantrecord component.- Returns:
- the value of the
participantrecord component
-