Package com.intercom.api.types
Class ButtonComponent.Builder
- java.lang.Object
-
- com.intercom.api.types.ButtonComponent.Builder
-
- All Implemented Interfaces:
ButtonComponent._FinalStage,ButtonComponent.ActionStage,ButtonComponent.IdStage,ButtonComponent.LabelStage
- Enclosing class:
- ButtonComponent
public static final class ButtonComponent.Builder extends java.lang.Object implements ButtonComponent.IdStage, ButtonComponent.LabelStage, ButtonComponent.ActionStage, ButtonComponent._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ButtonComponent._FinalStageaction(ActionComponent action)This can be a Submit Action, URL Action, or Sheets Action.ButtonComponentbuild()ButtonComponent._FinalStagedisabled(java.lang.Boolean disabled)Styles the button and prevents the action.ButtonComponent._FinalStagedisabled(java.util.Optional<java.lang.Boolean> disabled)Styles the button and prevents the action.ButtonComponent.Builderfrom(ButtonComponent other)ButtonComponent.LabelStageid(java.lang.String id)A unique identifier for the component.ButtonComponent.ActionStagelabel(java.lang.String label)The text that will be rendered inside the button.ButtonComponent._FinalStagestyle(ButtonComponent.Style style)Styles the button.ButtonComponent._FinalStagestyle(java.util.Optional<ButtonComponent.Style> style)Styles the button.
-
-
-
Method Detail
-
from
public ButtonComponent.Builder from(ButtonComponent other)
- Specified by:
fromin interfaceButtonComponent.IdStage
-
id
public ButtonComponent.LabelStage id(@NotNull java.lang.String id)
A unique identifier for the component.A unique identifier for the component.
- Specified by:
idin interfaceButtonComponent.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
label
public ButtonComponent.ActionStage label(@NotNull java.lang.String label)
The text that will be rendered inside the button.The text that will be rendered inside the button.
- Specified by:
labelin interfaceButtonComponent.LabelStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
action
public ButtonComponent._FinalStage action(@NotNull ActionComponent action)
This can be a Submit Action, URL Action, or Sheets Action.This can be a Submit Action, URL Action, or Sheets Action.
- Specified by:
actionin interfaceButtonComponent.ActionStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
disabled
public ButtonComponent._FinalStage disabled(java.lang.Boolean disabled)
Styles the button and prevents the action. Default is false.
- Specified by:
disabledin interfaceButtonComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
disabled
public ButtonComponent._FinalStage disabled(java.util.Optional<java.lang.Boolean> disabled)
Styles the button and prevents the action. Default is false.
- Specified by:
disabledin interfaceButtonComponent._FinalStage
-
style
public ButtonComponent._FinalStage style(ButtonComponent.Style style)
Styles the button. Default is 'primary'.
- Specified by:
stylein interfaceButtonComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
style
public ButtonComponent._FinalStage style(java.util.Optional<ButtonComponent.Style> style)
Styles the button. Default is 'primary'.
- Specified by:
stylein interfaceButtonComponent._FinalStage
-
build
public ButtonComponent build()
- Specified by:
buildin interfaceButtonComponent._FinalStage
-
-