java.lang.Object
java.lang.Record
it.auties.whatsapp.model.info.WebNotificationsInfo
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Info
public record WebNotificationsInfo(long timestampSeconds, int unreadChats, int notifyMessageCount, List<ChatMessageInfo> notifyMessages)
extends Record
implements Info, it.auties.protobuf.model.ProtobufMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thenotifyMessageCountrecord component.private final List<ChatMessageInfo> The field for thenotifyMessagesrecord component.private final longThe field for thetimestampSecondsrecord component.private final intThe field for theunreadChatsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWebNotificationsInfo(long timestampSeconds, int unreadChats, int notifyMessageCount, List<ChatMessageInfo> notifyMessages) Creates an instance of aWebNotificationsInforecord 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.intReturns the value of thenotifyMessageCountrecord component.Returns the value of thenotifyMessagesrecord component.Returns when the notification was sentlongReturns the value of thetimestampSecondsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theunreadChatsrecord component.
-
Field Details
-
timestampSeconds
private final long timestampSecondsThe field for thetimestampSecondsrecord component. -
unreadChats
private final int unreadChatsThe field for theunreadChatsrecord component. -
notifyMessageCount
private final int notifyMessageCountThe field for thenotifyMessageCountrecord component. -
notifyMessages
The field for thenotifyMessagesrecord component.
-
-
Constructor Details
-
WebNotificationsInfo
public WebNotificationsInfo(long timestampSeconds, int unreadChats, int notifyMessageCount, List<ChatMessageInfo> notifyMessages) Creates an instance of aWebNotificationsInforecord class.- Parameters:
timestampSeconds- the value for thetimestampSecondsrecord componentunreadChats- the value for theunreadChatsrecord componentnotifyMessageCount- the value for thenotifyMessageCountrecord componentnotifyMessages- the value for thenotifyMessagesrecord component
-
-
Method Details
-
timestamp
Returns when the notification 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 '=='. -
timestampSeconds
public long timestampSeconds()Returns the value of thetimestampSecondsrecord component.- Returns:
- the value of the
timestampSecondsrecord component
-
unreadChats
public int unreadChats()Returns the value of theunreadChatsrecord component.- Returns:
- the value of the
unreadChatsrecord component
-
notifyMessageCount
public int notifyMessageCount()Returns the value of thenotifyMessageCountrecord component.- Returns:
- the value of the
notifyMessageCountrecord component
-
notifyMessages
Returns the value of thenotifyMessagesrecord component.- Returns:
- the value of the
notifyMessagesrecord component
-