Class Actions.Builder

java.lang.Object
com.hubspot.slack.client.models.blocks.Actions.Builder
Enclosing class:
Actions

@Generated(from="ActionsIF", generator="Immutables") @NotThreadSafe public static final class Actions.Builder extends Object
Builds instances of type Actions. 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 Actions.Builder from(Block instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.Block instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final Actions.Builder from(ActionsIF instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.ActionsIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setBlockId

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

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

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

      public final Actions.Builder addElements(BlockElement... 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 Actions.Builder setElements(Iterable<? extends BlockElement> 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 Actions.Builder addAllElements(Iterable<? extends BlockElement> elements)
      Adds elements to elements list.
      Parameters:
      elements - An iterable of elements elements
      Returns:
      this builder for use in a chained invocation
    • build

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