Class StateBlock.Builder

java.lang.Object
com.hubspot.slack.client.models.response.views.StateBlock.Builder
Enclosing class:
StateBlock

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

      public final StateBlock.Builder putActions(String key, StateAction value)
      Put one entry to the actions map.
      Parameters:
      key - The key in the actions map
      value - The associated value in the actions map
      Returns:
      this builder for use in a chained invocation
    • putActions

      public final StateBlock.Builder putActions(Map.Entry<String,? extends StateAction> entry)
      Put one entry to the actions map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • setActions

      public final StateBlock.Builder setActions(Map<String,? extends StateAction> entries)
      Sets or replaces all mappings from the specified map as entries for the actions map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the actions map
      Returns:
      this builder for use in a chained invocation
    • putAllActions

      public final StateBlock.Builder putAllActions(Map<String,? extends StateAction> entries)
      Put all mappings from the specified map as entries to actions map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the actions map
      Returns:
      this builder for use in a chained invocation
    • build

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