Class MessageContainer

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

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

Use the builder to create immutable instances: MessageContainer.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 MessageContainerIF
      Returns:
      The value of the messageTs attribute
    • getChannelId

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

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

      public final MessageContainer 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 MessageContainer 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 MessageContainer 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 MessageContainer 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of MessageContainer 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.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static MessageContainer copyOf(MessageContainerIF instance)
      Creates an immutable copy of a MessageContainerIF 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 MessageContainer instance
    • builder

      public static MessageContainer.Builder builder()
      Creates a builder for MessageContainer.
       MessageContainer.builder()
          .setType(com.hubspot.slack.client.models.interaction.ContainerType) // required type
          .setMessageTs(String) // required messageTs
          .setChannelId(String) // required channelId
          .setEphemeral(boolean) // required ephemeral
          .build();
       
      Returns:
      A new MessageContainer builder