java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.model.KeepInChat
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record KeepInChat(KeepInChatType keepType, long serverTimestampSeconds, ChatMessageKey key, Jid deviceJid, long clientTimestampInMilliseconds, long serverTimestampMilliseconds)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model class that represents an ephemeral message that was saved manually by the user in a chat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theclientTimestampInMillisecondsrecord component.private final JidThe field for thedeviceJidrecord component.private final KeepInChatTypeThe field for thekeepTyperecord component.private final ChatMessageKeyThe field for thekeyrecord component.private final longThe field for theserverTimestampMillisecondsrecord component.private final longThe field for theserverTimestampSecondsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKeepInChat(KeepInChatType keepType, long serverTimestampSeconds, ChatMessageKey key, Jid deviceJid, long clientTimestampInMilliseconds, long serverTimestampMilliseconds) Creates an instance of aKeepInChatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theclientTimestampInMillisecondsrecord component.Returns the value of thedeviceJidrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keepType()Returns the value of thekeepTyperecord component.key()Returns the value of thekeyrecord component.longReturns the value of theserverTimestampMillisecondsrecord component.longReturns the value of theserverTimestampSecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
keepType
The field for thekeepTyperecord component. -
serverTimestampSeconds
private final long serverTimestampSecondsThe field for theserverTimestampSecondsrecord component. -
key
The field for thekeyrecord component. -
deviceJid
The field for thedeviceJidrecord component. -
clientTimestampInMilliseconds
private final long clientTimestampInMillisecondsThe field for theclientTimestampInMillisecondsrecord component. -
serverTimestampMilliseconds
private final long serverTimestampMillisecondsThe field for theserverTimestampMillisecondsrecord component.
-
-
Constructor Details
-
KeepInChat
public KeepInChat(KeepInChatType keepType, long serverTimestampSeconds, ChatMessageKey key, Jid deviceJid, long clientTimestampInMilliseconds, long serverTimestampMilliseconds) Creates an instance of aKeepInChatrecord class.- Parameters:
keepType- the value for thekeepTyperecord componentserverTimestampSeconds- the value for theserverTimestampSecondsrecord componentkey- the value for thekeyrecord componentdeviceJid- the value for thedeviceJidrecord componentclientTimestampInMilliseconds- the value for theclientTimestampInMillisecondsrecord componentserverTimestampMilliseconds- the value for theserverTimestampMillisecondsrecord component
-
-
Method Details
-
serverTimestamp
-
clientTimestamp
-
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 '=='. -
keepType
Returns the value of thekeepTyperecord component.- Returns:
- the value of the
keepTyperecord component
-
serverTimestampSeconds
public long serverTimestampSeconds()Returns the value of theserverTimestampSecondsrecord component.- Returns:
- the value of the
serverTimestampSecondsrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
deviceJid
Returns the value of thedeviceJidrecord component.- Returns:
- the value of the
deviceJidrecord component
-
clientTimestampInMilliseconds
public long clientTimestampInMilliseconds()Returns the value of theclientTimestampInMillisecondsrecord component.- Returns:
- the value of the
clientTimestampInMillisecondsrecord component
-
serverTimestampMilliseconds
public long serverTimestampMilliseconds()Returns the value of theserverTimestampMillisecondsrecord component.- Returns:
- the value of the
serverTimestampMillisecondsrecord component
-