Class SlackEventMessageReplied

All Implemented Interfaces:
HasChannel, SlackEvent

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

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

      public SlackReplyMessage getMessage()
      Specified by:
      getMessage in class AbstractSlackEventMessageReplied
      Returns:
      The value of the message attribute
    • withType

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

      public final SlackEventMessageReplied withMessage(SlackReplyMessage 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
    • equals

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

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

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

      public static SlackEventMessageReplied.Builder builder()
      Creates a builder for SlackEventMessageReplied.
       SlackEventMessageReplied.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
          .setMessage(com.hubspot.slack.client.models.events.util.SlackReplyMessage) // required message
          .build();
       
      Returns:
      A new SlackEventMessageReplied builder