@NotThreadSafe public static final class SlackDialog.Builder extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
SlackDialog.Builder |
addAllElements(Iterable<? extends SlackDialogFormElement> elements)
Adds elements to
elements list. |
SlackDialog.Builder |
addElements(SlackDialogFormElement... elements)
Adds elements to
elements list. |
SlackDialog.Builder |
addElements(SlackDialogFormElement element)
Adds one element to
elements list. |
SlackDialog |
build()
Builds a new
SlackDialog. |
SlackDialog.Builder |
from(SlackDialogIF instance)
Fill a builder with attribute values from the provided
SlackDialogIF instance. |
SlackDialog.Builder |
setCallbackId(String callbackId)
Initializes the value for the
callbackId attribute. |
SlackDialog.Builder |
setElements(Iterable<? extends SlackDialogFormElement> elements)
Sets or replaces all elements for
elements list. |
SlackDialog.Builder |
setNotifyOnCancel(Boolean notifyOnCancel)
Initializes the optional value
notifyOnCancel to notifyOnCancel. |
SlackDialog.Builder |
setNotifyOnCancel(Optional<Boolean> notifyOnCancel)
Initializes the optional value
notifyOnCancel to notifyOnCancel. |
SlackDialog.Builder |
setState(Optional<String> state)
Initializes the optional value
state to state. |
SlackDialog.Builder |
setState(String state)
Initializes the optional value
state to state. |
SlackDialog.Builder |
setSubmitLabel(Optional<String> submitLabel)
Initializes the optional value
submitLabel to submitLabel. |
SlackDialog.Builder |
setSubmitLabel(String submitLabel)
Initializes the optional value
submitLabel to submitLabel. |
SlackDialog.Builder |
setTitle(String title)
Initializes the value for the
title attribute. |
public final SlackDialog.Builder from(SlackDialogIF instance)
SlackDialogIF instance.
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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackDialog.Builder setTitle(String title)
title attribute.title - The value for titlethis builder for use in a chained invocationpublic final SlackDialog.Builder setCallbackId(String callbackId)
callbackId attribute.callbackId - The value for callbackIdthis builder for use in a chained invocationpublic final SlackDialog.Builder addElements(SlackDialogFormElement element)
elements list.element - A elements elementthis builder for use in a chained invocationpublic final SlackDialog.Builder addElements(SlackDialogFormElement... elements)
elements list.elements - An array of elements elementsthis builder for use in a chained invocationpublic final SlackDialog.Builder setElements(Iterable<? extends SlackDialogFormElement> elements)
elements list.elements - An iterable of elements elementsthis builder for use in a chained invocationpublic final SlackDialog.Builder addAllElements(Iterable<? extends SlackDialogFormElement> elements)
elements list.elements - An iterable of elements elementsthis builder for use in a chained invocationpublic final SlackDialog.Builder setState(@Nullable String state)
state to state.state - The value for state, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackDialog.Builder setState(Optional<String> state)
state to state.state - The value for statethis builder for use in a chained invocationpublic final SlackDialog.Builder setSubmitLabel(@Nullable String submitLabel)
submitLabel to submitLabel.submitLabel - The value for submitLabel, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackDialog.Builder setSubmitLabel(Optional<String> submitLabel)
submitLabel to submitLabel.submitLabel - The value for submitLabelthis builder for use in a chained invocationpublic final SlackDialog.Builder setNotifyOnCancel(@Nullable Boolean notifyOnCancel)
notifyOnCancel to notifyOnCancel.notifyOnCancel - The value for notifyOnCancel, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackDialog.Builder setNotifyOnCancel(Optional<Boolean> notifyOnCancel)
notifyOnCancel to notifyOnCancel.notifyOnCancel - The value for notifyOnCancelthis builder for use in a chained invocationpublic SlackDialog build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackDialog.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.