Class Action.Builder

java.lang.Object
com.hubspot.slack.client.models.actions.Action.Builder
Enclosing class:
Action

@Generated(from="ActionIF", generator="Immutables") @NotThreadSafe public static final class Action.Builder extends Object
Builds instances of type Action. 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 Action.Builder from(ActionIF instance)
      Fill a builder with attribute values from the provided ActionIF 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
    • setName

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

      public final Action.Builder setName(Optional<String> name)
      Initializes the optional value name to name.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setType

      public final Action.Builder setType(ActionType type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • setText

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

      public final Action.Builder setText(Optional<String> text)
      Initializes the optional value text to text.
      Parameters:
      text - The value for text
      Returns:
      this builder for use in a chained invocation
    • setValue

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

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

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

      public final Action.Builder setConfirm(Optional<? extends Confirm> confirm)
      Initializes the optional value confirm to confirm.
      Parameters:
      confirm - The value for confirm
      Returns:
      this builder for use in a chained invocation
    • setUrl

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

      public final Action.Builder setUrl(Optional<String> url)
      Initializes the optional value url to url.
      Parameters:
      url - The value for url
      Returns:
      this builder for use in a chained invocation
    • setRawStyle

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

      public final Action.Builder setRawStyle(Optional<String> rawStyle)
      Initializes the optional value rawStyle to rawStyle.
      Parameters:
      rawStyle - The value for rawStyle
      Returns:
      this builder for use in a chained invocation
    • addOptions

      public final Action.Builder addOptions(Option element)
      Adds one element to options list.
      Parameters:
      element - A options element
      Returns:
      this builder for use in a chained invocation
    • addOptions

      public final Action.Builder addOptions(Option... elements)
      Adds elements to options list.
      Parameters:
      elements - An array of options elements
      Returns:
      this builder for use in a chained invocation
    • setOptions

      public final Action.Builder setOptions(Iterable<? extends Option> elements)
      Sets or replaces all elements for options list.
      Parameters:
      elements - An iterable of options elements
      Returns:
      this builder for use in a chained invocation
    • addAllOptions

      public final Action.Builder addAllOptions(Iterable<? extends Option> elements)
      Adds elements to options list.
      Parameters:
      elements - An iterable of options elements
      Returns:
      this builder for use in a chained invocation
    • addSelectedOptions

      public final Action.Builder addSelectedOptions(Option element)
      Adds one element to selectedOptions list.
      Parameters:
      element - A selectedOptions element
      Returns:
      this builder for use in a chained invocation
    • addSelectedOptions

      public final Action.Builder addSelectedOptions(Option... elements)
      Adds elements to selectedOptions list.
      Parameters:
      elements - An array of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • setSelectedOptions

      public final Action.Builder setSelectedOptions(Iterable<? extends Option> elements)
      Sets or replaces all elements for selectedOptions list.
      Parameters:
      elements - An iterable of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • addAllSelectedOptions

      public final Action.Builder addAllSelectedOptions(Iterable<? extends Option> elements)
      Adds elements to selectedOptions list.
      Parameters:
      elements - An iterable of selectedOptions elements
      Returns:
      this builder for use in a chained invocation
    • setDataSource

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

      public final Action.Builder setDataSource(Optional<? extends SlackDataSource> dataSource)
      Initializes the optional value dataSource to dataSource.
      Parameters:
      dataSource - The value for dataSource
      Returns:
      this builder for use in a chained invocation
    • setMinQueryLength

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

      public final Action.Builder setMinQueryLength(Optional<Integer> minQueryLength)
      Initializes the optional value minQueryLength to minQueryLength.
      Parameters:
      minQueryLength - The value for minQueryLength
      Returns:
      this builder for use in a chained invocation
    • build

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