Class MessageAttachmentContainer

java.lang.Object
com.hubspot.slack.client.models.interaction.MessageAttachmentContainer
All Implemented Interfaces:
Container, MessageAttachmentContainerIF

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

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

  • Method Details

    • getType

      public ContainerType getType()
      Specified by:
      getType in interface Container
      Returns:
      The value of the type attribute
    • getMessageTs

      public String getMessageTs()
      Specified by:
      getMessageTs in interface MessageAttachmentContainerIF
      Returns:
      The value of the messageTs attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface MessageAttachmentContainerIF
      Returns:
      The value of the channelId attribute
    • isEphemeral

      public boolean isEphemeral()
      Specified by:
      isEphemeral in interface MessageAttachmentContainerIF
      Returns:
      The value of the ephemeral attribute
    • isAppUnfurl

      public boolean isAppUnfurl()
      Specified by:
      isAppUnfurl in interface MessageAttachmentContainerIF
      Returns:
      The value of the appUnfurl attribute
    • getAttachmentId

      public int getAttachmentId()
      Specified by:
      getAttachmentId in interface MessageAttachmentContainerIF
      Returns:
      The value of the attachmentId attribute
    • getExternalRef

      public Optional<ExternalRef> getExternalRef()
      Specified by:
      getExternalRef in interface MessageAttachmentContainerIF
      Returns:
      The value of the externalRef attribute
    • getEntityUrl

      public Optional<String> getEntityUrl()
      Specified by:
      getEntityUrl in interface MessageAttachmentContainerIF
      Returns:
      The value of the entityUrl attribute
    • withType

      public final MessageAttachmentContainer withType(ContainerType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withMessageTs

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

      public final MessageAttachmentContainer 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
    • withEphemeral

      public final MessageAttachmentContainer withEphemeral(boolean value)
      Copy the current immutable object by setting a value for the ephemeral attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ephemeral
      Returns:
      A modified copy or the this object
    • withAppUnfurl

      public final MessageAttachmentContainer withAppUnfurl(boolean value)
      Copy the current immutable object by setting a value for the appUnfurl attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for appUnfurl
      Returns:
      A modified copy or the this object
    • withAttachmentId

      public final MessageAttachmentContainer withAttachmentId(int value)
      Copy the current immutable object by setting a value for the attachmentId attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for attachmentId
      Returns:
      A modified copy or the this object
    • withExternalRef

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

      public final MessageAttachmentContainer withExternalRef(Optional<? extends ExternalRef> optional)
      Copy the current immutable object by setting an optional value for the externalRef 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 externalRef
      Returns:
      A modified copy or this if not changed
    • withEntityUrl

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

      public final MessageAttachmentContainer withEntityUrl(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the entityUrl 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 entityUrl
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of MessageAttachmentContainer 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: type, messageTs, channelId, ephemeral, appUnfurl, attachmentId, externalRef, entityUrl.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a MessageAttachmentContainerIF 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 MessageAttachmentContainer instance
    • builder

      public static MessageAttachmentContainer.Builder builder()
      Creates a builder for MessageAttachmentContainer.
       MessageAttachmentContainer.builder()
          .setType(com.hubspot.slack.client.models.interaction.ContainerType) // required type
          .setMessageTs(String) // required messageTs
          .setChannelId(String) // required channelId
          .setEphemeral(boolean) // required ephemeral
          .setAppUnfurl(boolean) // required appUnfurl
          .setAttachmentId(int) // required attachmentId
          .setExternalRef(Optional<com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef>) // optional externalRef
          .setEntityUrl(Optional<String>) // optional entityUrl
          .build();
       
      Returns:
      A new MessageAttachmentContainer builder