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 intThe field for thecountrecord component.private final booleanThe field for thedeletedrecord component.The field for thekeywordsrecord component.private final StringThe field for themessagerecord component.private final StringThe field for theshortcutrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionQuickReplyAction(String shortcut, String message, List<String> keywords, int count, boolean deleted) Creates an instance of aQuickReplyActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionThe type of this actionintThe version of this actionintcount()Returns the value of thecountrecord component.booleandeleted()Returns the value of thedeletedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.The name of this actionkeywords()Returns the value of thekeywordsrecord component.message()Returns the value of themessagerecord component.shortcut()Returns the value of theshortcutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
shortcut
The field for theshortcutrecord component. -
message
The field for themessagerecord component. -
keywords
The field for thekeywordsrecord component. -
count
private final int countThe field for thecountrecord component. -
deleted
private final boolean deletedThe field for thedeletedrecord component.
-
-
Constructor Details
-
QuickReplyAction
public QuickReplyAction(String shortcut, String message, List<String> keywords, int count, boolean deleted) Creates an instance of aQuickReplyActionrecord class.- Parameters:
shortcut- the value for theshortcutrecord componentmessage- the value for themessagerecord componentkeywords- the value for thekeywordsrecord componentcount- the value for thecountrecord componentdeleted- the value for thedeletedrecord component
-
-
Method Details
-
indexName
The name of this action -
actionVersion
public int actionVersion()The version of this action- Specified by:
actionVersionin interfaceAction- Returns:
- a non-null string
-
actionType
The type of this action- Specified by:
actionTypein 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 theshortcutrecord component.- Returns:
- the value of the
shortcutrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
keywords
Returns the value of thekeywordsrecord component.- Returns:
- the value of the
keywordsrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
deleted
public boolean deleted()Returns the value of thedeletedrecord component.- Returns:
- the value of the
deletedrecord component
-