Class SlashCommandSubmission.Builder

java.lang.Object
com.hubspot.slack.client.models.commands.SlashCommandSubmission.Builder
Enclosing class:
SlashCommandSubmission

@Generated(from="SlashCommandSubmissionIF", generator="Immutables") @NotThreadSafe public static final class SlashCommandSubmission.Builder extends Object
Builds instances of type SlashCommandSubmission. 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

      Fill a builder with attribute values from the provided SlashCommandSubmissionIF 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
    • setToken

      public final SlashCommandSubmission.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
    • setTeamId

      public final SlashCommandSubmission.Builder setTeamId(String teamId)
      Initializes the value for the teamId attribute.
      Parameters:
      teamId - The value for teamId
      Returns:
      this builder for use in a chained invocation
    • setTeamDomain

      public final SlashCommandSubmission.Builder setTeamDomain(String teamDomain)
      Initializes the value for the teamDomain attribute.
      Parameters:
      teamDomain - The value for teamDomain
      Returns:
      this builder for use in a chained invocation
    • setEnterpriseId

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

      public final SlashCommandSubmission.Builder setEnterpriseId(Optional<String> enterpriseId)
      Initializes the optional value enterpriseId to enterpriseId.
      Parameters:
      enterpriseId - The value for enterpriseId
      Returns:
      this builder for use in a chained invocation
    • setEnterpriseName

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

      public final SlashCommandSubmission.Builder setEnterpriseName(Optional<String> enterpriseName)
      Initializes the optional value enterpriseName to enterpriseName.
      Parameters:
      enterpriseName - The value for enterpriseName
      Returns:
      this builder for use in a chained invocation
    • setChannelId

      public final SlashCommandSubmission.Builder setChannelId(String channelId)
      Initializes the value for the channelId attribute.
      Parameters:
      channelId - The value for channelId
      Returns:
      this builder for use in a chained invocation
    • setChannelName

      public final SlashCommandSubmission.Builder setChannelName(String channelName)
      Initializes the value for the channelName attribute.
      Parameters:
      channelName - The value for channelName
      Returns:
      this builder for use in a chained invocation
    • setUserId

      public final SlashCommandSubmission.Builder setUserId(String userId)
      Initializes the value for the userId attribute.
      Parameters:
      userId - The value for userId
      Returns:
      this builder for use in a chained invocation
    • setCommand

      public final SlashCommandSubmission.Builder setCommand(String command)
      Initializes the value for the command attribute.
      Parameters:
      command - The value for command
      Returns:
      this builder for use in a chained invocation
    • setText

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

      public final SlashCommandSubmission.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 SlashCommandSubmission.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
    • setUserName

      @Deprecated public final SlashCommandSubmission.Builder setUserName(String userName)
      Deprecated.
      Initializes the value for the userName attribute.
      Parameters:
      userName - The value for userName
      Returns:
      this builder for use in a chained invocation
    • build

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