Class SlackFormSelectElement.Builder
java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormSelectElement.Builder
- Enclosing class:
SlackFormSelectElement
@Generated(from="AbstractSlackFormSelectElement",
generator="Immutables")
@NotThreadSafe
public static final class SlackFormSelectElement.Builder
extends Object
Builds instances of type
SlackFormSelectElement.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Adds elements tooptionGroupslist.addAllOptions(Iterable<? extends SlackFormOption> elements) Adds elements tooptionslist.addAllSelectedOptions(Iterable<? extends SlackFormOption> elements) Adds elements toselectedOptionslist.addOptionGroups(SlackFormOptionGroup element) Adds one element tooptionGroupslist.addOptionGroups(SlackFormOptionGroup... elements) Adds elements tooptionGroupslist.addOptions(SlackFormOption element) Adds one element tooptionslist.addOptions(SlackFormOption... elements) Adds elements tooptionslist.addSelectedOptions(SlackFormOption element) Adds one element toselectedOptionslist.addSelectedOptions(SlackFormOption... elements) Adds elements toselectedOptionslist.build()Builds a newSlackFormSelectElement.from(AbstractSlackFormSelectElement instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormSelectElementinstance.Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasLabelinstance.from(HasOptions instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasOptionsinstance.from(SlackDialogFormElement instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElementinstance.setDataSource(SlackDataSource dataSource) Initializes the value for thedataSourceattribute.Initializes the value for thelabelattribute.setMinQueryLength(Integer minQueryLength) Initializes the optional valueminQueryLengthto minQueryLength.setMinQueryLength(Optional<Integer> minQueryLength) Initializes the optional valueminQueryLengthto minQueryLength.Initializes the value for thenameattribute.setOptional(Boolean optional) Initializes the optional valueoptionalto optional.setOptional(Optional<Boolean> optional) Initializes the optional valueoptionalto optional.setOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Sets or replaces all elements foroptionGroupslist.setOptions(Iterable<? extends SlackFormOption> elements) Sets or replaces all elements foroptionslist.setPlaceholder(String placeholder) Initializes the optional valueplaceholderto placeholder.setPlaceholder(Optional<String> placeholder) Initializes the optional valueplaceholderto placeholder.setSelectedOptions(Iterable<? extends SlackFormOption> elements) Sets or replaces all elements forselectedOptionslist.setType(SlackFormElementTypes type) Initializes the value for thetypeattribute.Initializes the optional valuevalueto value.Initializes the optional valuevalueto value.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasLabelinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormSelectElementinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.HasOptionsinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addOptions
Adds one element tooptionslist.- Parameters:
element- A options element- Returns:
thisbuilder for use in a chained invocation
-
addOptions
Adds elements tooptionslist.- Parameters:
elements- An array of options elements- Returns:
thisbuilder for use in a chained invocation
-
setOptions
public final SlackFormSelectElement.Builder setOptions(Iterable<? extends SlackFormOption> elements) Sets or replaces all elements foroptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOptions
public final SlackFormSelectElement.Builder addAllOptions(Iterable<? extends SlackFormOption> elements) Adds elements tooptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
setLabel
Initializes the value for thelabelattribute.- Parameters:
label- The value for label- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setPlaceholder
Initializes the optional valueplaceholderto placeholder.- Parameters:
placeholder- The value for placeholder,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setPlaceholder
Initializes the optional valueplaceholderto placeholder.- Parameters:
placeholder- The value for placeholder- Returns:
thisbuilder for use in a chained invocation
-
setOptional
Initializes the optional valueoptionalto optional.- Parameters:
optional- The value for optional,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setOptional
Initializes the optional valueoptionalto optional.- Parameters:
optional- The value for optional- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.If not set, this attribute will have a default value as returned by the initializer of
type.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
setDataSource
Initializes the value for thedataSourceattribute.If not set, this attribute will have a default value as returned by the initializer of
dataSource.- Parameters:
dataSource- The value for dataSource- Returns:
thisbuilder for use in a chained invocation
-
addOptionGroups
Adds one element tooptionGroupslist.- Parameters:
element- A optionGroups element- Returns:
thisbuilder for use in a chained invocation
-
addOptionGroups
Adds elements tooptionGroupslist.- Parameters:
elements- An array of optionGroups elements- Returns:
thisbuilder for use in a chained invocation
-
setOptionGroups
public final SlackFormSelectElement.Builder setOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Sets or replaces all elements foroptionGroupslist.- Parameters:
elements- An iterable of optionGroups elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOptionGroups
public final SlackFormSelectElement.Builder addAllOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Adds elements tooptionGroupslist.- Parameters:
elements- An iterable of optionGroups elements- Returns:
thisbuilder for use in a chained invocation
-
setValue
Initializes the optional valuevalueto value.- Parameters:
value- The value for value,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setValue
Initializes the optional valuevalueto value.- Parameters:
value- The value for value- Returns:
thisbuilder for use in a chained invocation
-
addSelectedOptions
Adds one element toselectedOptionslist.- Parameters:
element- A selectedOptions element- Returns:
thisbuilder for use in a chained invocation
-
addSelectedOptions
Adds elements toselectedOptionslist.- Parameters:
elements- An array of selectedOptions elements- Returns:
thisbuilder for use in a chained invocation
-
setSelectedOptions
public final SlackFormSelectElement.Builder setSelectedOptions(Iterable<? extends SlackFormOption> elements) Sets or replaces all elements forselectedOptionslist.- Parameters:
elements- An iterable of selectedOptions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSelectedOptions
public final SlackFormSelectElement.Builder addAllSelectedOptions(Iterable<? extends SlackFormOption> elements) Adds elements toselectedOptionslist.- Parameters:
elements- An iterable of selectedOptions elements- Returns:
thisbuilder for use in a chained invocation
-
setMinQueryLength
Initializes the optional valueminQueryLengthto minQueryLength.- Parameters:
minQueryLength- The value for minQueryLength,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setMinQueryLength
Initializes the optional valueminQueryLengthto minQueryLength.- Parameters:
minQueryLength- The value for minQueryLength- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackFormSelectElement.- Returns:
- An immutable instance of SlackFormSelectElement
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-