Class SlackEventMessageChanged

All Implemented Interfaces:
HasChannel, SlackEvent

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

Use the builder to create immutable instances: SlackEventMessageChanged.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 AbstractSlackEventMessageChanged
      Returns:
      The value of the channelId attribute
    • isHidden

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

      public LiteMessage getMessage()
      Specified by:
      getMessage in class AbstractSlackEventMessageChanged
      Returns:
      The value of the message attribute
    • getPreviousMessage

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

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

      public final SlackEventMessageChanged 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 SlackEventMessageChanged 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 SlackEventMessageChanged 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 SlackEventMessageChanged 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 SlackEventMessageChanged 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 SlackEventMessageChanged 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 SlackEventMessageChanged 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
    • withHidden

      public final SlackEventMessageChanged 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
    • withMessage

      public final SlackEventMessageChanged withMessage(LiteMessage value)
      Copy the current immutable object by setting a value for the message attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for message
      Returns:
      A modified copy or the this object
    • withPreviousMessage

      public final SlackEventMessageChanged 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 SlackEventMessageChanged 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
    • withEventTs

      public final SlackEventMessageChanged 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 SlackEventMessageChanged 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, hidden, message, previousMessage, eventTs.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackEventMessageChanged.Builder builder()
      Creates a builder for SlackEventMessageChanged.
       SlackEventMessageChanged.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
          .setHidden(boolean) // required hidden
          .setMessage(com.hubspot.slack.client.models.LiteMessage) // required message
          .setPreviousMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optional previousMessage
          .setEventTs(String) // required eventTs
          .build();
       
      Returns:
      A new SlackEventMessageChanged builder