Class ChatUnfurlParams.Builder

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

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

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

      public final ChatUnfurlParams.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
    • putUnfurls

      public final ChatUnfurlParams.Builder putUnfurls(String key, ChatUnfurlBlocksOrAttachment value)
      Put one entry to the unfurls map.
      Parameters:
      key - The key in the unfurls map
      value - The associated value in the unfurls map
      Returns:
      this builder for use in a chained invocation
    • putUnfurls

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

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

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

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

      public final ChatUnfurlParams.Builder setIsUserAuthRequired(Optional<Boolean> isUserAuthRequired)
      Initializes the optional value isUserAuthRequired to isUserAuthRequired.
      Parameters:
      isUserAuthRequired - The value for isUserAuthRequired
      Returns:
      this builder for use in a chained invocation
    • setUserAuthMessage

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

      public final ChatUnfurlParams.Builder setUserAuthMessage(Optional<String> userAuthMessage)
      Initializes the optional value userAuthMessage to userAuthMessage.
      Parameters:
      userAuthMessage - The value for userAuthMessage
      Returns:
      this builder for use in a chained invocation
    • setUserAuthUrl

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

      public final ChatUnfurlParams.Builder setUserAuthUrl(Optional<? extends URI> userAuthUrl)
      Initializes the optional value userAuthUrl to userAuthUrl.
      Parameters:
      userAuthUrl - The value for userAuthUrl
      Returns:
      this builder for use in a chained invocation
    • setMetadata

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

      public final ChatUnfurlParams.Builder setMetadata(Optional<? extends Metadata> metadata)
      Initializes the optional value metadata to metadata.
      Parameters:
      metadata - The value for metadata
      Returns:
      this builder for use in a chained invocation
    • build

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