Class BlockActions.Builder

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

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

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

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

      public final BlockActions.Builder setToken(String token)
      Initializes the value for the token attribute.
      Parameters:
      token - The value for token
      Returns:
      this builder for use in a chained invocation
    • setTeam

      public final BlockActions.Builder setTeam(SlackTeam team)
      Initializes the value for the team attribute.
      Parameters:
      team - The value for team
      Returns:
      this builder for use in a chained invocation
    • setUser

      public final BlockActions.Builder setUser(SlackUserLite user)
      Initializes the value for the user attribute.
      Parameters:
      user - The value for user
      Returns:
      this builder for use in a chained invocation
    • setTriggerId

      public final BlockActions.Builder setTriggerId(String triggerId)
      Initializes the value for the triggerId attribute.
      Parameters:
      triggerId - The value for triggerId
      Returns:
      this builder for use in a chained invocation
    • setResponseUrl

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

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

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

      public final BlockActions.Builder setMessage(Optional<? extends LiteMessage> message)
      Initializes the optional value message to message.
      Parameters:
      message - The value for message
      Returns:
      this builder for use in a chained invocation
    • setView

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

      public final BlockActions.Builder setView(Optional<? extends ViewResponseBase> view)
      Initializes the optional value view to view.
      Parameters:
      view - The value for view
      Returns:
      this builder for use in a chained invocation
    • addElementActions

      public final BlockActions.Builder addElementActions(BlockElementAction element)
      Adds one element to elementActions list.
      Parameters:
      element - A elementActions element
      Returns:
      this builder for use in a chained invocation
    • addElementActions

      public final BlockActions.Builder addElementActions(BlockElementAction... elements)
      Adds elements to elementActions list.
      Parameters:
      elements - An array of elementActions elements
      Returns:
      this builder for use in a chained invocation
    • setElementActions

      public final BlockActions.Builder setElementActions(Iterable<? extends BlockElementAction> elements)
      Sets or replaces all elements for elementActions list.
      Parameters:
      elements - An iterable of elementActions elements
      Returns:
      this builder for use in a chained invocation
    • addAllElementActions

      public final BlockActions.Builder addAllElementActions(Iterable<? extends BlockElementAction> elements)
      Adds elements to elementActions list.
      Parameters:
      elements - An iterable of elementActions elements
      Returns:
      this builder for use in a chained invocation
    • setState

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

      public final BlockActions.Builder setState(Optional<? extends StateValuesPayload> state)
      Initializes the optional value state to state.
      Parameters:
      state - The value for state
      Returns:
      this builder for use in a chained invocation
    • setContainer

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

      public final BlockActions.Builder setContainer(Optional<? extends Container> container)
      Initializes the optional value container to container.
      Parameters:
      container - The value for container
      Returns:
      this builder for use in a chained invocation
    • build

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