Module it.auties.cobalt
Record Class ButtonsResponseMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.button.ButtonsResponseMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ButtonMessage,ButtonReplyMessage,ContextualMessage,Message
public record ButtonsResponseMessage(String buttonId, Optional<String> buttonText, Optional<ContextInfo> contextInfo, ButtonsResponseMessage.ResponseType responseType)
extends Record
implements ButtonReplyMessage
A model class that represents a message that contains a newsletters to a previous
ButtonsMessage-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebuttonIdrecord component.The field for thebuttonTextrecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final ButtonsResponseMessage.ResponseTypeThe field for theresponseTyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionButtonsResponseMessage(String buttonId, Optional<String> buttonText, Optional<ContextInfo> contextInfo, ButtonsResponseMessage.ResponseType responseType) Creates an instance of aButtonsResponseMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuttonId()Returns the value of thebuttonIdrecord component.Returns 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.static ButtonsResponseMessageof(ChatMessageInfo quoted, Button button) Returns the value of theresponseTyperecord 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
-
buttonId
The field for thebuttonIdrecord component. -
buttonText
The field for thebuttonTextrecord component. -
contextInfo
The field for thecontextInforecord component. -
responseType
The field for theresponseTyperecord component.
-
-
Constructor Details
-
ButtonsResponseMessage
public ButtonsResponseMessage(String buttonId, Optional<String> buttonText, Optional<ContextInfo> contextInfo, ButtonsResponseMessage.ResponseType responseType) Creates an instance of aButtonsResponseMessagerecord class.- Parameters:
buttonId- the value for thebuttonIdrecord componentbuttonText- the value for thebuttonTextrecord componentcontextInfo- the value for thecontextInforecord componentresponseType- the value for theresponseTyperecord component
-
-
Method Details
-
of
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
buttonId
Returns the value of thebuttonIdrecord component.- Returns:
- the value of the
buttonIdrecord 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
-
responseType
Returns the value of theresponseTyperecord component.- Returns:
- the value of the
responseTyperecord component
-