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 Details

    • from

      public final SlackDialog.Builder from(SlackDialogIF instance)
      Fill a builder with attribute values from the provided 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.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setTitle

      public final SlackDialog.Builder setTitle(String title)
      Initializes the value for the title attribute.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • setCallbackId

      public final SlackDialog.Builder setCallbackId(String callbackId)
      Initializes the value for the callbackId attribute.
      Parameters:
      callbackId - The value for callbackId
      Returns:
      this builder for use in a chained invocation
    • addElements

      public final SlackDialog.Builder addElements(SlackDialogFormElement element)
      Adds one element to elements list.
      Parameters:
      element - A elements element
      Returns:
      this builder for use in a chained invocation
    • addElements

      public final SlackDialog.Builder addElements(SlackDialogFormElement... elements)
      Adds elements to elements list.
      Parameters:
      elements - An array of elements elements
      Returns:
      this builder for use in a chained invocation
    • setElements

      public final SlackDialog.Builder setElements(Iterable<? extends SlackDialogFormElement> elements)
      Sets or replaces all elements for elements list.
      Parameters:
      elements - An iterable of elements elements
      Returns:
      this builder for use in a chained invocation
    • addAllElements

      public final SlackDialog.Builder addAllElements(Iterable<? extends SlackDialogFormElement> elements)
      Adds elements to elements list.
      Parameters:
      elements - An iterable of elements elements
      Returns:
      this builder for use in a chained invocation
    • setState

      public final SlackDialog.Builder setState(@Nullable String state)
      Initializes the optional value state to state.
      Parameters:
      state - The value for state, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setState

      public final SlackDialog.Builder setState(Optional<String> state)
      Initializes the optional value state to state.
      Parameters:
      state - The value for state
      Returns:
      this builder for use in a chained invocation
    • setSubmitLabel

      public final SlackDialog.Builder setSubmitLabel(@Nullable String submitLabel)
      Initializes the optional value submitLabel to submitLabel.
      Parameters:
      submitLabel - The value for submitLabel, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setSubmitLabel

      public final SlackDialog.Builder setSubmitLabel(Optional<String> submitLabel)
      Initializes the optional value submitLabel to submitLabel.
      Parameters:
      submitLabel - The value for submitLabel
      Returns:
      this builder for use in a chained invocation
    • setNotifyOnCancel

      public final SlackDialog.Builder setNotifyOnCancel(@Nullable Boolean notifyOnCancel)
      Initializes the optional value notifyOnCancel to notifyOnCancel.
      Parameters:
      notifyOnCancel - The value for notifyOnCancel, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setNotifyOnCancel

      public final SlackDialog.Builder setNotifyOnCancel(Optional<Boolean> notifyOnCancel)
      Initializes the optional value notifyOnCancel to notifyOnCancel.
      Parameters:
      notifyOnCancel - The value for notifyOnCancel
      Returns:
      this builder for use in a chained invocation
    • build

      public SlackDialog build()
      Builds a new SlackDialog.
      Returns:
      An immutable instance of SlackDialog
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing