Class ChatPostMessageParams.Builder

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

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

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

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