Class SlackEventMessageDeleted

All Implemented Interfaces:
HasChannel, SlackEvent

@Generated(from="AbstractSlackEventMessageDeleted", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class SlackEventMessageDeleted extends AbstractSlackEventMessageDeleted
Immutable implementation of AbstractSlackEventMessageDeleted.

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

  • Method Details

    • getType

      public SlackEventType getType()
      Returns:
      The value of the type attribute
    • getTs

      public String getTs()
      Returns:
      The value of the ts attribute
    • getSubtype

      public Optional<SlackMessageSubtype> getSubtype()
      Specified by:
      getSubtype in class SlackEventMessageBase
      Returns:
      The value of the subtype attribute
    • getAttachments

      public List<Attachment> getAttachments()
      Specified by:
      getAttachments in class SlackEventMessageBase
      Returns:
      The value of the attachments attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface HasChannel
      Specified by:
      getChannelId in class AbstractSlackEventMessageDeleted
      Returns:
      The value of the channelId attribute
    • getPreviousMessage

      public Optional<LiteMessage> getPreviousMessage()
      Specified by:
      getPreviousMessage in class AbstractSlackEventMessageDeleted
      Returns:
      The value of the previousMessage attribute
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in class AbstractSlackEventMessageDeleted
      Returns:
      The value of the hidden attribute
    • getDeletedTs

      public String getDeletedTs()
      Specified by:
      getDeletedTs in class AbstractSlackEventMessageDeleted
      Returns:
      The value of the deletedTs attribute
    • getEventTs

      public String getEventTs()
      Specified by:
      getEventTs in class AbstractSlackEventMessageDeleted
      Returns:
      The value of the eventTs attribute
    • withType

      public final SlackEventMessageDeleted withType(SlackEventType 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
    • withTs

      public final SlackEventMessageDeleted 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
    • withSubtype

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

      public final SlackEventMessageDeleted withSubtype(Optional<? extends SlackMessageSubtype> optional)
      Copy the current immutable object by setting an optional value for the subtype 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 subtype
      Returns:
      A modified copy or this if not changed
    • withAttachments

      public final SlackEventMessageDeleted withAttachments(Attachment... elements)
      Copy the current immutable object with elements that replace the content of attachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAttachments

      public final SlackEventMessageDeleted withAttachments(Iterable<? extends Attachment> elements)
      Copy the current immutable object with elements that replace the content of attachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of attachments elements to set
      Returns:
      A modified copy or this if not changed
    • withChannelId

      public final SlackEventMessageDeleted 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
    • withPreviousMessage

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

      public final SlackEventMessageDeleted withPreviousMessage(Optional<? extends LiteMessage> optional)
      Copy the current immutable object by setting an optional value for the previousMessage 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 previousMessage
      Returns:
      A modified copy or this if not changed
    • withHidden

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackEventMessageDeleted 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, ts, subtype, attachments, channelId, previousMessage, hidden, deletedTs, eventTs.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackEventMessageDeleted.Builder builder()
      Creates a builder for SlackEventMessageDeleted.
       SlackEventMessageDeleted.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setTs(String) // required ts
          .setSubtype(Optional<com.hubspot.slack.client.models.events.SlackMessageSubtype>) // optional subtype
          .addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) // attachments elements
          .setChannelId(String) // required channelId
          .setPreviousMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optional previousMessage
          .setHidden(boolean) // required hidden
          .setDeletedTs(String) // required deletedTs
          .setEventTs(String) // required eventTs
          .build();
       
      Returns:
      A new SlackEventMessageDeleted builder