public class ButtonElement extends BlockElement
| Modifier and Type | Class and Description |
|---|---|
static class |
ButtonElement.ButtonElementBuilder |
| Constructor and Description |
|---|
ButtonElement() |
ButtonElement(PlainTextObject text,
String actionId,
String url,
String value,
String style,
ConfirmationDialogObject confirm) |
| Modifier and Type | Method and Description |
|---|---|
static ButtonElement.ButtonElementBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getActionId()
An identifier for this action.
|
ConfirmationDialogObject |
getConfirm()
A confirm object that defines an optional confirmation dialog after the button is clicked.
|
String |
getStyle()
Decorates buttons with alternative visual color schemes.
|
PlainTextObject |
getText()
A text object that defines the button's text.
|
String |
getType() |
String |
getUrl()
A URL to load in the user's browser when the button is clicked.
|
String |
getValue()
The value to send along with the interaction payload.
|
int |
hashCode() |
void |
setActionId(String actionId)
An identifier for this action.
|
void |
setConfirm(ConfirmationDialogObject confirm)
A confirm object that defines an optional confirmation dialog after the button is clicked.
|
void |
setStyle(String style)
Decorates buttons with alternative visual color schemes.
|
void |
setText(PlainTextObject text)
A text object that defines the button's text.
|
void |
setUrl(String url)
A URL to load in the user's browser when the button is clicked.
|
void |
setValue(String value)
The value to send along with the interaction payload.
|
String |
toString() |
public static final String TYPE
public ButtonElement()
public ButtonElement(PlainTextObject text, String actionId, String url, String value, String style, ConfirmationDialogObject confirm)
public static ButtonElement.ButtonElementBuilder builder()
public String getType()
public PlainTextObject getText()
public String getActionId()
public String getUrl()
public String getValue()
public String getStyle()
`primary` gives buttons a green outline and text, ideal for affirmation or confirmation actions. `primary` should only be used for one button within a set.
`danger` gives buttons a red outline and text, and should be used when the action is destructive. Use danger even more sparingly than `primary`.
If you don't include this field, the `default` button style will be used.
public ConfirmationDialogObject getConfirm()
public void setText(PlainTextObject text)
public void setActionId(String actionId)
public void setUrl(String url)
public void setValue(String value)
public void setStyle(String style)
`primary` gives buttons a green outline and text, ideal for affirmation or confirmation actions. `primary` should only be used for one button within a set.
`danger` gives buttons a red outline and text, and should be used when the action is destructive. Use danger even more sparingly than `primary`.
If you don't include this field, the `default` button style will be used.
public void setConfirm(ConfirmationDialogObject confirm)
protected boolean canEqual(Object other)
Copyright © 2020. All rights reserved.