Class SlackFormOptionGroup.Builder
java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormOptionGroup.Builder
- Enclosing class:
SlackFormOptionGroup
@Generated(from="SlackFormOptionGroupIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackFormOptionGroup.Builder
extends Object
Builds instances of type
SlackFormOptionGroup.
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 TypeMethodDescriptionaddAllOptions(Iterable<? extends SlackFormOption> elements) Adds elements tooptionslist.addOptions(SlackFormOption element) Adds one element tooptionslist.addOptions(SlackFormOption... elements) Adds elements tooptionslist.build()Builds a newSlackFormOptionGroup.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(SlackFormOptionGroupIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.dialog.form.elements.SlackFormOptionGroupIFinstance.Initializes the value for thelabelattribute.setOptions(Iterable<? extends SlackFormOption> elements) Sets or replaces all elements foroptionslist.
-
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.SlackFormOptionGroupIFinstance.- 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
-
setLabel
Initializes the value for thelabelattribute.- Parameters:
label- The value for label- 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
Sets or replaces all elements foroptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOptions
public final SlackFormOptionGroup.Builder addAllOptions(Iterable<? extends SlackFormOption> elements) Adds elements tooptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackFormOptionGroup.- Returns:
- An immutable instance of SlackFormOptionGroup
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-