Class BlockElementAction.Builder

java.lang.Object
com.hubspot.slack.client.models.interaction.BlockElementAction.Builder
Enclosing class:
BlockElementAction

@Generated(from="BlockElementActionIF", generator="Immutables") @NotThreadSafe public static final class BlockElementAction.Builder extends Object
Builds instances of type BlockElementAction. 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 BlockElementAction.Builder from(BlockElementActionIF instance)
      Fill a builder with attribute values from the provided BlockElementActionIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setBlockId

      public final BlockElementAction.Builder setBlockId(String blockId)
      Initializes the value for the blockId attribute.
      Parameters:
      blockId - The value for blockId
      Returns:
      this builder for use in a chained invocation
    • setActionId

      public final BlockElementAction.Builder setActionId(String actionId)
      Initializes the value for the actionId attribute.
      Parameters:
      actionId - The value for actionId
      Returns:
      this builder for use in a chained invocation
    • setElement

      public final BlockElementAction.Builder setElement(BlockElement element)
      Initializes the value for the element attribute.
      Parameters:
      element - The value for element
      Returns:
      this builder for use in a chained invocation
    • setSelectedValue

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

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

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

      public final BlockElementAction.Builder setSelectedDate(Optional<? extends LocalDate> selectedDate)
      Initializes the optional value selectedDate to selectedDate.
      Parameters:
      selectedDate - The value for selectedDate
      Returns:
      this builder for use in a chained invocation
    • setActionTs

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

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

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