Package com.whatsapp.api.domain.messages
Class ButtonComponent
java.lang.Object
com.whatsapp.api.domain.messages.Component<ButtonComponent>
com.whatsapp.api.domain.messages.ButtonComponent
The type Button component.
-
Constructor Summary
ConstructorDescriptionInstantiates a new Button component.ButtonComponent
(int index, ButtonSubType subType) Instantiates a new Button component. -
Method Summary
Modifier and TypeMethodDescriptionint
getIndex()
Gets index.Gets sub type.setIndex
(int index) Sets index.setSubType
(ButtonSubType subType) Sets sub type.Methods inherited from class com.whatsapp.api.domain.messages.Component
addParameter, getParameters, getType, setParameters
-
Constructor Details
-
ButtonComponent
public ButtonComponent()Instantiates a new Button component. -
ButtonComponent
Instantiates a new Button component.- Parameters:
index
- the indexsubType
- the sub type
-
-
Method Details
-
getIndex
public int getIndex()Gets index.- Returns:
- the index
-
setIndex
Sets index. Required when type=button. Not used for the other types. Only used for Cloud API. Position index of the button. You can have up to 3 buttons using index values of 0 to 2.- Parameters:
index
- the index- Returns:
- the index
-
getSubType
Gets sub type.- Returns:
- the sub type
-
setSubType
Sets sub type. Required when type=button. Not used for the other types. Type of button to create.- Parameters:
subType
- the sub type- Returns:
- the sub type
-