Class DialogSubmission.Builder

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

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

      public final DialogSubmission.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
    • 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 DialogSubmission.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 DialogSubmission.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 DialogSubmission.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 DialogSubmission.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 DialogSubmission.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 DialogSubmission.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
    • putSubmission

      public final DialogSubmission.Builder putSubmission(String key, Optional<String> value)
      Put one entry to the submission map.
      Parameters:
      key - The key in the submission map
      value - The associated value in the submission map
      Returns:
      this builder for use in a chained invocation
    • putSubmission

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

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

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

      public final DialogSubmission.Builder setState(@Nullable String 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 DialogSubmission.Builder setState(Optional<String> state)
      Initializes the optional value state to state.
      Parameters:
      state - The value for state
      Returns:
      this builder for use in a chained invocation
    • build

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