java.lang.Object
java.lang.Record
it.auties.whatsapp.model.action.QuickReplyAction
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage
,it.auties.protobuf.model.ProtobufObject
,Action
public record QuickReplyAction(String shortcut, String message, List<String> keywords, int count, boolean deleted)
extends Record
implements Action
A model clas that represents the addition or deletion of a quick reply
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The field for thecount
record component.private final boolean
The field for thedeleted
record component.The field for thekeywords
record component.private final String
The field for themessage
record component.private final String
The field for theshortcut
record component. -
Constructor Summary
ConstructorsConstructorDescriptionQuickReplyAction
(String shortcut, String message, List<String> keywords, int count, boolean deleted) Creates an instance of aQuickReplyAction
record class. -
Method Summary
Modifier and TypeMethodDescriptionThe type of this actionint
The version of this actionint
count()
Returns the value of thecount
record component.boolean
deleted()
Returns the value of thedeleted
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.The name of this actionkeywords()
Returns the value of thekeywords
record component.message()
Returns the value of themessage
record component.shortcut()
Returns the value of theshortcut
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
shortcut
The field for theshortcut
record component. -
message
The field for themessage
record component. -
keywords
The field for thekeywords
record component. -
count
private final int countThe field for thecount
record component. -
deleted
private final boolean deletedThe field for thedeleted
record component.
-
-
Constructor Details
-
QuickReplyAction
public QuickReplyAction(String shortcut, String message, List<String> keywords, int count, boolean deleted) Creates an instance of aQuickReplyAction
record class.- Parameters:
shortcut
- the value for theshortcut
record componentmessage
- the value for themessage
record componentkeywords
- the value for thekeywords
record componentcount
- the value for thecount
record componentdeleted
- the value for thedeleted
record component
-
-
Method Details
-
indexName
The name of this action -
actionVersion
public int actionVersion()The version of this action- Specified by:
actionVersion
in interfaceAction
- Returns:
- a non-null string
-
actionType
The type of this action- Specified by:
actionType
in interfaceAction
- Returns:
- a non-null string
-
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 '=='. -
shortcut
Returns the value of theshortcut
record component.- Returns:
- the value of the
shortcut
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
keywords
Returns the value of thekeywords
record component.- Returns:
- the value of the
keywords
record component
-
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-
deleted
public boolean deleted()Returns the value of thedeleted
record component.- Returns:
- the value of the
deleted
record component
-