Class ChatUnfurlParams

java.lang.Object
com.hubspot.slack.client.methods.params.chat.ChatUnfurlParams
All Implemented Interfaces:
HasChannel, ChatUnfurlParamsIF

@Generated(from="ChatUnfurlParamsIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ChatUnfurlParams extends Object implements ChatUnfurlParamsIF
Immutable implementation of ChatUnfurlParamsIF.

Use the builder to create immutable instances: ChatUnfurlParams.builder().

  • Method Details

    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface ChatUnfurlParamsIF
      Specified by:
      getChannelId in interface HasChannel
      Returns:
      The value of the channelId attribute
    • getTs

      public String getTs()
      Specified by:
      getTs in interface ChatUnfurlParamsIF
      Returns:
      The value of the ts attribute
    • getUnfurls

      public Map<String,ChatUnfurlBlocksOrAttachment> getUnfurls()
      Specified by:
      getUnfurls in interface ChatUnfurlParamsIF
      Returns:
      The value of the unfurls attribute
    • getIsUserAuthRequired

      public Optional<Boolean> getIsUserAuthRequired()
      Specified by:
      getIsUserAuthRequired in interface ChatUnfurlParamsIF
      Returns:
      The value of the isUserAuthRequired attribute
    • getUserAuthMessage

      public Optional<String> getUserAuthMessage()
      Specified by:
      getUserAuthMessage in interface ChatUnfurlParamsIF
      Returns:
      The value of the userAuthMessage attribute
    • getUserAuthUrl

      public Optional<URI> getUserAuthUrl()
      Specified by:
      getUserAuthUrl in interface ChatUnfurlParamsIF
      Returns:
      The value of the userAuthUrl attribute
    • getMetadata

      public Optional<Metadata> getMetadata()
      Specified by:
      getMetadata in interface ChatUnfurlParamsIF
      Returns:
      The value of the metadata attribute
    • withChannelId

      public final ChatUnfurlParams withChannelId(String value)
      Copy the current immutable object by setting a value for the channelId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for channelId
      Returns:
      A modified copy or the this object
    • withTs

      public final ChatUnfurlParams withTs(String value)
      Copy the current immutable object by setting a value for the ts attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ts
      Returns:
      A modified copy or the this object
    • withUnfurls

      public final ChatUnfurlParams withUnfurls(Map<String,? extends ChatUnfurlBlocksOrAttachment> entries)
      Copy the current immutable object by replacing the unfurls map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to replace the unfurls map
      Returns:
      A modified copy or this if not changed
    • withIsUserAuthRequired

      public final ChatUnfurlParams withIsUserAuthRequired(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional isUserAuthRequired attribute.
      Parameters:
      value - The value for isUserAuthRequired, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withIsUserAuthRequired

      public final ChatUnfurlParams withIsUserAuthRequired(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the isUserAuthRequired attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for isUserAuthRequired
      Returns:
      A modified copy or this if not changed
    • withUserAuthMessage

      public final ChatUnfurlParams withUserAuthMessage(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional userAuthMessage attribute.
      Parameters:
      value - The value for userAuthMessage, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUserAuthMessage

      public final ChatUnfurlParams withUserAuthMessage(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the userAuthMessage attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for userAuthMessage
      Returns:
      A modified copy or this if not changed
    • withUserAuthUrl

      public final ChatUnfurlParams withUserAuthUrl(@Nullable URI value)
      Copy the current immutable object by setting a present value for the optional userAuthUrl attribute.
      Parameters:
      value - The value for userAuthUrl, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUserAuthUrl

      public final ChatUnfurlParams withUserAuthUrl(Optional<? extends URI> optional)
      Copy the current immutable object by setting an optional value for the userAuthUrl attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for userAuthUrl
      Returns:
      A modified copy or this if not changed
    • withMetadata

      public final ChatUnfurlParams withMetadata(@Nullable Metadata value)
      Copy the current immutable object by setting a present value for the optional metadata attribute.
      Parameters:
      value - The value for metadata, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withMetadata

      public final ChatUnfurlParams withMetadata(Optional<? extends Metadata> optional)
      Copy the current immutable object by setting an optional value for the metadata attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for metadata
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatUnfurlParams that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: channelId, ts, unfurls, isUserAuthRequired, userAuthMessage, userAuthUrl, metadata.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ChatUnfurlParams with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ChatUnfurlParams copyOf(ChatUnfurlParamsIF instance)
      Creates an immutable copy of a ChatUnfurlParamsIF value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ChatUnfurlParams instance
    • builder

      public static ChatUnfurlParams.Builder builder()
      Creates a builder for ChatUnfurlParams.
       ChatUnfurlParams.builder()
          .setChannelId(String) // required channelId
          .setTs(String) // required ts
          .putUnfurls|putAllUnfurls(String => com.hubspot.slack.client.models.ChatUnfurlBlocksOrAttachment) // unfurls mappings
          .setIsUserAuthRequired(Optional<Boolean>) // optional isUserAuthRequired
          .setUserAuthMessage(Optional<String>) // optional userAuthMessage
          .setUserAuthUrl(Optional<java.net.URI>) // optional userAuthUrl
          .setMetadata(Optional<com.hubspot.slack.client.methods.params.chat.workobject.Metadata>) // optional metadata
          .build();
       
      Returns:
      A new ChatUnfurlParams builder