Class SlackDialog.Builder
java.lang.Object
com.hubspot.slack.client.models.dialog.SlackDialog.Builder
- Enclosing class:
SlackDialog
@Generated(from="SlackDialogIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackDialog.Builder
extends Object
Builds instances of type
SlackDialog.
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 TypeMethodDescriptionfinal SlackDialog.BuilderaddAllElements(Iterable<? extends SlackDialogFormElement> elements) Adds elements toelementslist.final SlackDialog.BuilderaddElements(SlackDialogFormElement element) Adds one element toelementslist.final SlackDialog.BuilderaddElements(SlackDialogFormElement... elements) Adds elements toelementslist.build()Builds a newSlackDialog.final SlackDialog.Builderfrom(SlackDialogIF instance) Fill a builder with attribute values from the providedSlackDialogIFinstance.final SlackDialog.BuildersetCallbackId(String callbackId) Initializes the value for thecallbackIdattribute.final SlackDialog.BuildersetElements(Iterable<? extends SlackDialogFormElement> elements) Sets or replaces all elements forelementslist.final SlackDialog.BuildersetNotifyOnCancel(Boolean notifyOnCancel) Initializes the optional valuenotifyOnCancelto notifyOnCancel.final SlackDialog.BuildersetNotifyOnCancel(Optional<Boolean> notifyOnCancel) Initializes the optional valuenotifyOnCancelto notifyOnCancel.final SlackDialog.BuilderInitializes the optional valuestateto state.final SlackDialog.BuilderInitializes the optional valuestateto state.final SlackDialog.BuildersetSubmitLabel(String submitLabel) Initializes the optional valuesubmitLabelto submitLabel.final SlackDialog.BuildersetSubmitLabel(Optional<String> submitLabel) Initializes the optional valuesubmitLabelto submitLabel.final SlackDialog.BuilderInitializes the value for thetitleattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlackDialogIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setTitle
Initializes the value for thetitleattribute.- Parameters:
title- The value for title- Returns:
thisbuilder for use in a chained invocation
-
setCallbackId
Initializes the value for thecallbackIdattribute.- Parameters:
callbackId- The value for callbackId- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds one element toelementslist.- Parameters:
element- A elements element- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds elements toelementslist.- Parameters:
elements- An array of elements elements- Returns:
thisbuilder for use in a chained invocation
-
setElements
Sets or replaces all elements forelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
addAllElements
public final SlackDialog.Builder addAllElements(Iterable<? extends SlackDialogFormElement> elements) Adds elements toelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
setState
Initializes the optional valuestateto state.- Parameters:
state- The value for state,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setState
Initializes the optional valuestateto state.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
setSubmitLabel
Initializes the optional valuesubmitLabelto submitLabel.- Parameters:
submitLabel- The value for submitLabel,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setSubmitLabel
Initializes the optional valuesubmitLabelto submitLabel.- Parameters:
submitLabel- The value for submitLabel- Returns:
thisbuilder for use in a chained invocation
-
setNotifyOnCancel
Initializes the optional valuenotifyOnCancelto notifyOnCancel.- Parameters:
notifyOnCancel- The value for notifyOnCancel,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setNotifyOnCancel
Initializes the optional valuenotifyOnCancelto notifyOnCancel.- Parameters:
notifyOnCancel- The value for notifyOnCancel- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackDialog.- Returns:
- An immutable instance of SlackDialog
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-