Module it.auties.cobalt
Record Class HydratedCallButton
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.hydrated.HydratedCallButton
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,HydratedButton
public record HydratedCallButton(String text, String phoneNumber)
extends Record
implements HydratedButton
A model class that represents a hydrated button that can start a phone call
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hydrated.HydratedButton
HydratedButton.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHydratedCallButton(String text, String phoneNumber) Creates an instance of aHydratedCallButtonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this buttonfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thephoneNumberrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
text
The field for thetextrecord component. -
phoneNumber
The field for thephoneNumberrecord component.
-
-
Constructor Details
-
HydratedCallButton
Creates an instance of aHydratedCallButtonrecord class.- Parameters:
text- the value for thetextrecord componentphoneNumber- the value for thephoneNumberrecord component
-
-
Method Details
-
buttonType
Description copied from interface:HydratedButtonReturns the type of this button- Specified by:
buttonTypein interfaceHydratedButton- Returns:
- a non-null 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). -
text
Returns the value of thetextrecord component.- Specified by:
textin interfaceHydratedButton- Returns:
- the value of the
textrecord component
-
phoneNumber
Returns the value of thephoneNumberrecord component.- Returns:
- the value of the
phoneNumberrecord component
-