Class InteractiveAction.Builder

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

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

      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
    • setType

      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • setCallbackId

      public final InteractiveAction.Builder setCallbackId(String callbackId)
      Initializes the value for the callbackId attribute.
      Parameters:
      callbackId - The value for callbackId
      Returns:
      this builder for use in a chained invocation
    • setActionTs

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

      public final InteractiveAction.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 InteractiveAction.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 InteractiveAction.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
    • setChannel

      public final InteractiveAction.Builder setChannel(SlackChannel channel)
      Initializes the value for the channel attribute.
      Parameters:
      channel - The value for channel
      Returns:
      this builder for use in a chained invocation
    • addActions

      public final InteractiveAction.Builder addActions(Action element)
      Adds one element to actions list.
      Parameters:
      element - A actions element
      Returns:
      this builder for use in a chained invocation
    • addActions

      public final InteractiveAction.Builder addActions(Action... elements)
      Adds elements to actions list.
      Parameters:
      elements - An array of actions elements
      Returns:
      this builder for use in a chained invocation
    • setActions

      public final InteractiveAction.Builder setActions(Iterable<? extends Action> elements)
      Sets or replaces all elements for actions list.
      Parameters:
      elements - An iterable of actions elements
      Returns:
      this builder for use in a chained invocation
    • addAllActions

      public final InteractiveAction.Builder addAllActions(Iterable<? extends Action> elements)
      Adds elements to actions list.
      Parameters:
      elements - An iterable of actions elements
      Returns:
      this builder for use in a chained invocation
    • setMessageTs

      public final InteractiveAction.Builder setMessageTs(String messageTs)
      Initializes the value for the messageTs attribute.
      Parameters:
      messageTs - The value for messageTs
      Returns:
      this builder for use in a chained invocation
    • setAttachmentId

      public final InteractiveAction.Builder setAttachmentId(int attachmentId)
      Initializes the value for the attachmentId attribute.
      Parameters:
      attachmentId - The value for attachmentId
      Returns:
      this builder for use in a chained invocation
    • setAppUnfurl

      public final InteractiveAction.Builder setAppUnfurl(boolean appUnfurl)
      Initializes the value for the appUnfurl attribute.
      Parameters:
      appUnfurl - The value for appUnfurl
      Returns:
      this builder for use in a chained invocation
    • setOriginalMessage

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

      public final InteractiveAction.Builder setOriginalMessage(Optional<? extends LiteMessage> originalMessage)
      Initializes the optional value originalMessage to originalMessage.
      Parameters:
      originalMessage - The value for originalMessage
      Returns:
      this builder for use in a chained invocation
    • setResponseUrl

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

      public final InteractiveAction.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
    • build

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