Class SlashCommandResponseParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.chat.SlashCommandResponseParams.Builder
Enclosing class:
SlashCommandResponseParams

@Generated(from="AbstractSlashCommandResponseParams", generator="Immutables") @NotThreadSafe public static final class SlashCommandResponseParams.Builder extends Object
Builds instances of type SlashCommandResponseParams. 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 com.hubspot.slack.client.methods.params.chat.AbstractSlashCommandResponseParams instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final SlashCommandResponseParams.Builder from(HasChannel instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.methods.interceptor.HasChannel instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final SlashCommandResponseParams.Builder from(MessageParams instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.methods.params.chat.MessageParams 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.methods.params.chat.AbstractChatMessageParams instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addAttachments

      public final SlashCommandResponseParams.Builder addAttachments(Attachment element)
      Adds one element to attachments list.
      Parameters:
      element - A attachments element
      Returns:
      this builder for use in a chained invocation
    • addAttachments

      public final SlashCommandResponseParams.Builder addAttachments(Attachment... elements)
      Adds elements to attachments list.
      Parameters:
      elements - An array of attachments elements
      Returns:
      this builder for use in a chained invocation
    • setAttachments

      public final SlashCommandResponseParams.Builder setAttachments(Iterable<? extends Attachment> elements)
      Sets or replaces all elements for attachments list.
      Parameters:
      elements - An iterable of attachments elements
      Returns:
      this builder for use in a chained invocation
    • addAllAttachments

      public final SlashCommandResponseParams.Builder addAllAttachments(Iterable<? extends Attachment> elements)
      Adds elements to attachments list.
      Parameters:
      elements - An iterable of attachments elements
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final SlashCommandResponseParams.Builder addBlocks(Block element)
      Adds one element to blocks list.
      Parameters:
      element - A blocks element
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final SlashCommandResponseParams.Builder addBlocks(Block... elements)
      Adds elements to blocks list.
      Parameters:
      elements - An array of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setBlocks

      public final SlashCommandResponseParams.Builder setBlocks(Iterable<? extends Block> elements)
      Sets or replaces all elements for blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • addAllBlocks

      public final SlashCommandResponseParams.Builder addAllBlocks(Iterable<? extends Block> elements)
      Adds elements to blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setChannelId

      public final SlashCommandResponseParams.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
    • setText

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

      public final SlashCommandResponseParams.Builder setText(Optional<String> text)
      Initializes the optional value text to text.
      Parameters:
      text - The value for text
      Returns:
      this builder for use in a chained invocation
    • setThreadTs

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

      public final SlashCommandResponseParams.Builder setThreadTs(Optional<String> threadTs)
      Initializes the optional value threadTs to threadTs.
      Parameters:
      threadTs - The value for threadTs
      Returns:
      this builder for use in a chained invocation
    • setUsername

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

      public final SlashCommandResponseParams.Builder setUsername(Optional<String> username)
      Initializes the optional value username to username.
      Parameters:
      username - The value for username
      Returns:
      this builder for use in a chained invocation
    • setAsUser

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

      public final SlashCommandResponseParams.Builder setAsUser(Optional<Boolean> asUser)
      Initializes the optional value asUser to asUser.
      Parameters:
      asUser - The value for asUser
      Returns:
      this builder for use in a chained invocation
    • setIconEmoji

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

      public final SlashCommandResponseParams.Builder setIconEmoji(Optional<String> iconEmoji)
      Initializes the optional value iconEmoji to iconEmoji.
      Parameters:
      iconEmoji - The value for iconEmoji
      Returns:
      this builder for use in a chained invocation
    • setIconUrl

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

      public final SlashCommandResponseParams.Builder setIconUrl(Optional<String> iconUrl)
      Initializes the optional value iconUrl to iconUrl.
      Parameters:
      iconUrl - The value for iconUrl
      Returns:
      this builder for use in a chained invocation
    • setLinkNames

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

      public final SlashCommandResponseParams.Builder setLinkNames(Optional<Boolean> linkNames)
      Initializes the optional value linkNames to linkNames.
      Parameters:
      linkNames - The value for linkNames
      Returns:
      this builder for use in a chained invocation
    • setUnfurlLinks

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

      public final SlashCommandResponseParams.Builder setUnfurlLinks(Optional<Boolean> unfurlLinks)
      Initializes the optional value unfurlLinks to unfurlLinks.
      Parameters:
      unfurlLinks - The value for unfurlLinks
      Returns:
      this builder for use in a chained invocation
    • setUnfurlMedia

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

      public final SlashCommandResponseParams.Builder setUnfurlMedia(Optional<Boolean> unfurlMedia)
      Initializes the optional value unfurlMedia to unfurlMedia.
      Parameters:
      unfurlMedia - The value for unfurlMedia
      Returns:
      this builder for use in a chained invocation
    • setReplyBroadcast

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

      public final SlashCommandResponseParams.Builder setReplyBroadcast(Optional<Boolean> replyBroadcast)
      Initializes the optional value replyBroadcast to replyBroadcast.
      Parameters:
      replyBroadcast - The value for replyBroadcast
      Returns:
      this builder for use in a chained invocation
    • setResponseType

      public final SlashCommandResponseParams.Builder setResponseType(TopLevelMessageResponseType responseType)
      Initializes the value for the responseType attribute.

      If not set, this attribute will have a default value as returned by the initializer of responseType.

      Parameters:
      responseType - The value for responseType
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of SlashCommandResponseParams
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing