Class SingleSelectComponent.Builder
- java.lang.Object
-
- com.intercom.api.types.SingleSelectComponent.Builder
-
- All Implemented Interfaces:
SingleSelectComponent._FinalStage,SingleSelectComponent.IdStage
- Enclosing class:
- SingleSelectComponent
public static final class SingleSelectComponent.Builder extends java.lang.Object implements SingleSelectComponent.IdStage, SingleSelectComponent._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleSelectComponent._FinalStageaction(ActionComponent action)This can be a Submit Action, URL Action, or Sheets Action.SingleSelectComponent._FinalStageaction(java.util.Optional<ActionComponent> action)This can be a Submit Action, URL Action, or Sheets Action.SingleSelectComponent._FinalStageaddAllOptions(java.util.List<SingleSelectOption> options)The list of options.SingleSelectComponent._FinalStageaddOptions(SingleSelectOption options)The list of options.SingleSelectComponentbuild()SingleSelectComponent._FinalStagedisabled(java.lang.Boolean disabled)Styles all options and prevents the action.SingleSelectComponent._FinalStagedisabled(java.util.Optional<java.lang.Boolean> disabled)Styles all options and prevents the action.SingleSelectComponent.Builderfrom(SingleSelectComponent other)SingleSelectComponent._FinalStageid(java.lang.String id)A unique identifier for the component.SingleSelectComponent._FinalStagelabel(java.lang.String label)The text shown above the options.SingleSelectComponent._FinalStagelabel(java.util.Optional<java.lang.String> label)The text shown above the options.SingleSelectComponent._FinalStageoptions(java.util.List<SingleSelectOption> options)The list of options.SingleSelectComponent._FinalStagesaveState(SingleSelectComponent.SaveState saveState)Styles the input.SingleSelectComponent._FinalStagesaveState(java.util.Optional<SingleSelectComponent.SaveState> saveState)Styles the input.SingleSelectComponent._FinalStagevalue(java.lang.String value)The option that is selected by default.SingleSelectComponent._FinalStagevalue(java.util.Optional<java.lang.String> value)The option that is selected by default.
-
-
-
Method Detail
-
from
public SingleSelectComponent.Builder from(SingleSelectComponent other)
- Specified by:
fromin interfaceSingleSelectComponent.IdStage
-
id
public SingleSelectComponent._FinalStage id(@NotNull java.lang.String id)
A unique identifier for the component.A unique identifier for the component.
- Specified by:
idin interfaceSingleSelectComponent.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
action
public SingleSelectComponent._FinalStage action(ActionComponent action)
This can be a Submit Action, URL Action, or Sheets Action.
- Specified by:
actionin interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
action
public SingleSelectComponent._FinalStage action(java.util.Optional<ActionComponent> action)
This can be a Submit Action, URL Action, or Sheets Action.
- Specified by:
actionin interfaceSingleSelectComponent._FinalStage
-
disabled
public SingleSelectComponent._FinalStage disabled(java.lang.Boolean disabled)
Styles all options and prevents the action. Default is false. Will be overridden if save_state is saved.
- Specified by:
disabledin interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
disabled
public SingleSelectComponent._FinalStage disabled(java.util.Optional<java.lang.Boolean> disabled)
Styles all options and prevents the action. Default is false. Will be overridden if save_state is saved.
- Specified by:
disabledin interfaceSingleSelectComponent._FinalStage
-
saveState
public SingleSelectComponent._FinalStage saveState(SingleSelectComponent.SaveState saveState)
Styles the input. Default is
unsaved. Prevent action withsaved.- Specified by:
saveStatein interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
saveState
public SingleSelectComponent._FinalStage saveState(java.util.Optional<SingleSelectComponent.SaveState> saveState)
Styles the input. Default is
unsaved. Prevent action withsaved.- Specified by:
saveStatein interfaceSingleSelectComponent._FinalStage
-
value
public SingleSelectComponent._FinalStage value(java.lang.String value)
The option that is selected by default.
- Specified by:
valuein interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
value
public SingleSelectComponent._FinalStage value(java.util.Optional<java.lang.String> value)
The option that is selected by default.
- Specified by:
valuein interfaceSingleSelectComponent._FinalStage
-
label
public SingleSelectComponent._FinalStage label(java.lang.String label)
The text shown above the options.
- Specified by:
labelin interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
label
public SingleSelectComponent._FinalStage label(java.util.Optional<java.lang.String> label)
The text shown above the options.
- Specified by:
labelin interfaceSingleSelectComponent._FinalStage
-
addAllOptions
public SingleSelectComponent._FinalStage addAllOptions(java.util.List<SingleSelectOption> options)
The list of options. Can provide 2 to 10.
- Specified by:
addAllOptionsin interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addOptions
public SingleSelectComponent._FinalStage addOptions(SingleSelectOption options)
The list of options. Can provide 2 to 10.
- Specified by:
addOptionsin interfaceSingleSelectComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
options
public SingleSelectComponent._FinalStage options(java.util.List<SingleSelectOption> options)
The list of options. Can provide 2 to 10.
- Specified by:
optionsin interfaceSingleSelectComponent._FinalStage
-
build
public SingleSelectComponent build()
- Specified by:
buildin interfaceSingleSelectComponent._FinalStage
-
-