Class ContextActionsBlock.Builder

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

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

      public final ContextActionsBlock.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
    • setBlockId

      public final ContextActionsBlock.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 ContextActionsBlock.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 ContextActionsBlock.Builder addElements(ContextActionsElement element)
      Adds one element to elements list.
      Parameters:
      element - A elements element
      Returns:
      this builder for use in a chained invocation
    • addElements

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

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