Module it.auties.cobalt
Record Class HydratedTemplateButton
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.hydrated.HydratedTemplateButton
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record HydratedTemplateButton(HydratedQuickReplyButton quickReplyButton, HydratedURLButton urlButton, HydratedCallButton callButton, int index)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model class that represents a hydrated template for a button
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HydratedCallButtonThe field for thecallButtonrecord component.private final intThe field for theindexrecord component.private final HydratedQuickReplyButtonThe field for thequickReplyButtonrecord component.private final HydratedURLButtonThe field for theurlButtonrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHydratedTemplateButton(HydratedQuickReplyButton quickReplyButton, HydratedURLButton urlButton, HydratedCallButton callButton, int index) Creates an instance of aHydratedTemplateButtonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbutton()Returns this buttonReturns the type of button that this message wrapsReturns the value of thecallButtonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.static HydratedTemplateButtonof(int index, HydratedButton button) Constructs a new template buttonstatic HydratedTemplateButtonof(HydratedButton button) Constructs a new template buttonReturns the value of thequickReplyButtonrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theurlButtonrecord component.
-
Field Details
-
quickReplyButton
The field for thequickReplyButtonrecord component. -
urlButton
The field for theurlButtonrecord component. -
callButton
The field for thecallButtonrecord component. -
index
private final int indexThe field for theindexrecord component.
-
-
Constructor Details
-
HydratedTemplateButton
public HydratedTemplateButton(HydratedQuickReplyButton quickReplyButton, HydratedURLButton urlButton, HydratedCallButton callButton, int index) Creates an instance of aHydratedTemplateButtonrecord class.- Parameters:
quickReplyButton- the value for thequickReplyButtonrecord componenturlButton- the value for theurlButtonrecord componentcallButton- the value for thecallButtonrecord componentindex- the value for theindexrecord component
-
-
Method Details
-
of
Constructs a new template button- Parameters:
button- the non-null button- Returns:
- a non-null button template
-
of
Constructs a new template button- Parameters:
index- the indexbutton- the non-null button- Returns:
- a non-null button template
-
button
Returns this button- Returns:
- a non-null optional
-
buttonType
Returns the type of button that this message wraps- Returns:
- a non-null button 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 '=='. -
quickReplyButton
Returns the value of thequickReplyButtonrecord component.- Returns:
- the value of the
quickReplyButtonrecord component
-
urlButton
Returns the value of theurlButtonrecord component.- Returns:
- the value of the
urlButtonrecord component
-
callButton
Returns the value of thecallButtonrecord component.- Returns:
- the value of the
callButtonrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-