Class ChatUpdateMessageParams.Builder

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

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

      Fill a builder with attribute values from the provided com.hubspot.slack.client.methods.params.chat.ChatUpdateMessageParamsIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ChatUpdateMessageParams.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
    • addAttachments

      public final ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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 ChatUpdateMessageParams.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
    • setTs

      public final ChatUpdateMessageParams.Builder setTs(String ts)
      Initializes the value for the ts attribute.
      Parameters:
      ts - The value for ts
      Returns:
      this builder for use in a chained invocation
    • setAsUser

      public final ChatUpdateMessageParams.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 ChatUpdateMessageParams.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
    • setShouldLinkNames

      public final ChatUpdateMessageParams.Builder setShouldLinkNames(boolean shouldLinkNames)
      Initializes the value for the shouldLinkNames attribute.

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

      Parameters:
      shouldLinkNames - The value for shouldLinkNames
      Returns:
      this builder for use in a chained invocation
    • setParse

      public final ChatUpdateMessageParams.Builder setParse(String parse)
      Initializes the value for the parse attribute.

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

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

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