Module it.auties.cobalt
Record Class TemplateReplyMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.button.TemplateReplyMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ButtonMessage,ButtonReplyMessage,ContextualMessage,Message
public record TemplateReplyMessage(String id, String buttonText, Optional<ContextInfo> contextInfo, int index)
extends Record
implements ButtonReplyMessage
A model class that represents a message that contains a newsletters to a previous
HighlyStructuredMessage-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebuttonTextrecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final StringThe field for theidrecord component.private final intThe field for theindexrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTemplateReplyMessage(String id, String buttonText, Optional<ContextInfo> contextInfo, int index) Creates an instance of aTemplateReplyMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuttonTextrecord component.Returns the value of thecontextInforecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intindex()Returns the value of theindexrecord 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.ButtonMessage
category
-
Field Details
-
id
The field for theidrecord component. -
buttonText
The field for thebuttonTextrecord component. -
contextInfo
The field for thecontextInforecord component. -
index
private final int indexThe field for theindexrecord component.
-
-
Constructor Details
-
TemplateReplyMessage
public TemplateReplyMessage(String id, String buttonText, Optional<ContextInfo> contextInfo, int index) Creates an instance of aTemplateReplyMessagerecord class.- Parameters:
id- the value for theidrecord componentbuttonText- the value for thebuttonTextrecord componentcontextInfo- the value for thecontextInforecord componentindex- the value for theindexrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
buttonText
Returns the value of thebuttonTextrecord component.- Returns:
- the value of the
buttonTextrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-