Module it.auties.cobalt
Record Class ProtocolMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.server.ProtocolMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Message,ServerMessage
public record ProtocolMessage(Optional<ChatMessageKey> key, ProtocolMessage.Type protocolType, long ephemeralExpiration, long ephemeralSettingTimestampSeconds, Optional<HistorySyncNotification> historySyncNotification, Optional<AppStateSyncKeyShare> appStateSyncKeyShare, Optional<AppStateSyncKeyRequest> appStateSyncKeyRequest, Optional<InitialSecurityNotificationSettingSync> initialSecurityNotificationSettingSync, Optional<AppStateFatalExceptionNotification> appStateFatalExceptionNotification, Optional<ChatDisappear> disappearingMode, Optional<MessageContainer> editedMessage, long timestampMilliseconds)
extends Record
implements ServerMessage
A model class that represents a message sent by a WhatsappWeb.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various type of data that aProtocolMessagecan wrap -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<AppStateFatalExceptionNotification> The field for theappStateFatalExceptionNotificationrecord component.private final Optional<AppStateSyncKeyRequest> The field for theappStateSyncKeyRequestrecord component.private final Optional<AppStateSyncKeyShare> The field for theappStateSyncKeySharerecord component.private final Optional<ChatDisappear> The field for thedisappearingModerecord component.private final Optional<MessageContainer> The field for theeditedMessagerecord component.private final longThe field for theephemeralExpirationrecord component.private final longThe field for theephemeralSettingTimestampSecondsrecord component.private final Optional<HistorySyncNotification> The field for thehistorySyncNotificationrecord component.private final Optional<InitialSecurityNotificationSettingSync> The field for theinitialSecurityNotificationSettingSyncrecord component.private final Optional<ChatMessageKey> The field for thekeyrecord component.private final ProtocolMessage.TypeThe field for theprotocolTyperecord component.private final longThe field for thetimestampMillisecondsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionProtocolMessage(Optional<ChatMessageKey> key, ProtocolMessage.Type protocolType, long ephemeralExpiration, long ephemeralSettingTimestampSeconds, Optional<HistorySyncNotification> historySyncNotification, Optional<AppStateSyncKeyShare> appStateSyncKeyShare, Optional<AppStateSyncKeyRequest> appStateSyncKeyRequest, Optional<InitialSecurityNotificationSettingSync> initialSecurityNotificationSettingSync, Optional<AppStateFatalExceptionNotification> appStateFatalExceptionNotification, Optional<ChatDisappear> disappearingMode, Optional<MessageContainer> editedMessage, long timestampMilliseconds) Creates an instance of aProtocolMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theappStateFatalExceptionNotificationrecord component.Returns the value of theappStateSyncKeyRequestrecord component.Returns the value of theappStateSyncKeySharerecord component.Returns the value of thedisappearingModerecord component.Returns the value of theeditedMessagerecord component.longReturns the value of theephemeralExpirationrecord component.longReturns the value of theephemeralSettingTimestampSecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehistorySyncNotificationrecord component.Returns the value of theinitialSecurityNotificationSettingSyncrecord component.key()Returns the value of thekeyrecord component.Returns the value of theprotocolTyperecord component.longReturns the value of thetimestampMillisecondsrecord component.final StringtoString()Returns a string representation of this record class.type()Return message typeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.ServerMessage
category
-
Field Details
-
key
The field for thekeyrecord component. -
protocolType
The field for theprotocolTyperecord component. -
ephemeralExpiration
private final long ephemeralExpirationThe field for theephemeralExpirationrecord component. -
ephemeralSettingTimestampSeconds
private final long ephemeralSettingTimestampSecondsThe field for theephemeralSettingTimestampSecondsrecord component. -
historySyncNotification
The field for thehistorySyncNotificationrecord component. -
appStateSyncKeyRequest
The field for theappStateSyncKeyRequestrecord component. -
initialSecurityNotificationSettingSync
private final Optional<InitialSecurityNotificationSettingSync> initialSecurityNotificationSettingSyncThe field for theinitialSecurityNotificationSettingSyncrecord component. -
appStateFatalExceptionNotification
The field for theappStateFatalExceptionNotificationrecord component. -
disappearingMode
The field for thedisappearingModerecord component. -
editedMessage
The field for theeditedMessagerecord component. -
timestampMilliseconds
private final long timestampMillisecondsThe field for thetimestampMillisecondsrecord component.
-
-
Constructor Details
-
ProtocolMessage
public ProtocolMessage(Optional<ChatMessageKey> key, ProtocolMessage.Type protocolType, long ephemeralExpiration, long ephemeralSettingTimestampSeconds, Optional<HistorySyncNotification> historySyncNotification, Optional<AppStateSyncKeyShare> appStateSyncKeyShare, Optional<AppStateSyncKeyRequest> appStateSyncKeyRequest, Optional<InitialSecurityNotificationSettingSync> initialSecurityNotificationSettingSync, Optional<AppStateFatalExceptionNotification> appStateFatalExceptionNotification, Optional<ChatDisappear> disappearingMode, Optional<MessageContainer> editedMessage, long timestampMilliseconds) Creates an instance of aProtocolMessagerecord class.- Parameters:
key- the value for thekeyrecord componentprotocolType- the value for theprotocolTyperecord componentephemeralExpiration- the value for theephemeralExpirationrecord componentephemeralSettingTimestampSeconds- the value for theephemeralSettingTimestampSecondsrecord componenthistorySyncNotification- the value for thehistorySyncNotificationrecord componentappStateSyncKeyShare- the value for theappStateSyncKeySharerecord componentappStateSyncKeyRequest- the value for theappStateSyncKeyRequestrecord componentinitialSecurityNotificationSettingSync- the value for theinitialSecurityNotificationSettingSyncrecord componentappStateFatalExceptionNotification- the value for theappStateFatalExceptionNotificationrecord componentdisappearingMode- the value for thedisappearingModerecord componenteditedMessage- the value for theeditedMessagerecord componenttimestampMilliseconds- the value for thetimestampMillisecondsrecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message type -
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
-
protocolType
Returns the value of theprotocolTyperecord component.- Returns:
- the value of the
protocolTyperecord component
-
ephemeralExpiration
public long ephemeralExpiration()Returns the value of theephemeralExpirationrecord component.- Returns:
- the value of the
ephemeralExpirationrecord component
-
ephemeralSettingTimestampSeconds
public long ephemeralSettingTimestampSeconds()Returns the value of theephemeralSettingTimestampSecondsrecord component.- Returns:
- the value of the
ephemeralSettingTimestampSecondsrecord component
-
historySyncNotification
Returns the value of thehistorySyncNotificationrecord component.- Returns:
- the value of the
historySyncNotificationrecord component
-
appStateSyncKeyRequest
Returns the value of theappStateSyncKeyRequestrecord component.- Returns:
- the value of the
appStateSyncKeyRequestrecord component
-
initialSecurityNotificationSettingSync
Returns the value of theinitialSecurityNotificationSettingSyncrecord component.- Returns:
- the value of the
initialSecurityNotificationSettingSyncrecord component
-
appStateFatalExceptionNotification
Returns the value of theappStateFatalExceptionNotificationrecord component.- Returns:
- the value of the
appStateFatalExceptionNotificationrecord component
-
disappearingMode
Returns the value of thedisappearingModerecord component.- Returns:
- the value of the
disappearingModerecord component
-
editedMessage
Returns the value of theeditedMessagerecord component.- Returns:
- the value of the
editedMessagerecord component
-
timestampMilliseconds
public long timestampMilliseconds()Returns the value of thetimestampMillisecondsrecord component.- Returns:
- the value of the
timestampMillisecondsrecord component
-