Class SlackReplyMessage
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageBase
com.hubspot.slack.client.models.events.util.AbstractSlackReplyMessage
com.hubspot.slack.client.models.events.util.SlackReplyMessage
- All Implemented Interfaces:
HasChannel,HasUser,SlackEvent
@Generated(from="AbstractSlackReplyMessage",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackReplyMessage
extends AbstractSlackReplyMessage
Immutable implementation of
AbstractSlackReplyMessage.
Use the builder to create immutable instances:
SlackReplyMessage.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackReplyMessage.Builderbuilder()Creates a builder forSlackReplyMessage.static SlackReplyMessagecopyOf(AbstractSlackReplyMessage instance) Creates an immutable copy of aAbstractSlackReplyMessagevalue.booleanThis instance is equal to all instances ofSlackReplyMessagethat have equal attribute values.intgetTs()getType()inthashCode()Computes a hash code from attributes:type,ts,subtype,attachments,threadTs,userId,channelId,replyCount,replyUserIds,replyUsersCount,latestReplyTimestamp.toString()Prints the immutable valueSlackReplyMessagewith attribute values.final SlackReplyMessagewithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackReplyMessagewithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackReplyMessagewithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final SlackReplyMessagewithLatestReplyTimestamp(String value) Copy the current immutable object by setting a present value for the optionallatestReplyTimestampattribute.final SlackReplyMessagewithLatestReplyTimestamp(Optional<String> optional) Copy the current immutable object by setting an optional value for thelatestReplyTimestampattribute.final SlackReplyMessagewithReplyCount(int value) Copy the current immutable object by setting a value for thereplyCountattribute.final SlackReplyMessagewithReplyUserIds(List<String> value) Copy the current immutable object by setting a present value for the optionalreplyUserIdsattribute.final SlackReplyMessagewithReplyUserIds(Optional<? extends List<String>> optional) Copy the current immutable object by setting an optional value for thereplyUserIdsattribute.final SlackReplyMessagewithReplyUsersCount(Integer value) Copy the current immutable object by setting a present value for the optionalreplyUsersCountattribute.final SlackReplyMessagewithReplyUsersCount(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thereplyUsersCountattribute.final SlackReplyMessagewithSubtype(SlackMessageSubtype value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final SlackReplyMessagewithSubtype(Optional<? extends SlackMessageSubtype> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final SlackReplyMessagewithThreadTs(String value) Copy the current immutable object by setting a value for thethreadTsattribute.final SlackReplyMessageCopy the current immutable object by setting a value for thetsattribute.final SlackReplyMessagewithType(SlackEventType value) Copy the current immutable object by setting a value for thetypeattribute.final SlackReplyMessagewithUserId(String value) Copy the current immutable object by setting a value for theuserIdattribute.
-
Method Details
-
getType
- Returns:
- The value of the
typeattribute
-
getTs
- Returns:
- The value of the
tsattribute
-
getSubtype
- Specified by:
getSubtypein classSlackEventMessageBase- Returns:
- The value of the
subtypeattribute
-
getAttachments
- Specified by:
getAttachmentsin classSlackEventMessageBase- Returns:
- The value of the
attachmentsattribute
-
getThreadTs
- Specified by:
getThreadTsin classAbstractSlackReplyMessage- Returns:
- The value of the
threadTsattribute
-
getUserId
- Specified by:
getUserIdin interfaceHasUser- Specified by:
getUserIdin classAbstractSlackReplyMessage- Returns:
- The value of the
userIdattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractSlackReplyMessage- Returns:
- The value of the
channelIdattribute
-
getReplyCount
public int getReplyCount()- Overrides:
getReplyCountin classAbstractSlackReplyMessage- Returns:
- The value of the
replyCountattribute
-
getReplyUserIds
- Specified by:
getReplyUserIdsin classAbstractSlackReplyMessage- Returns:
- The value of the
replyUserIdsattribute
-
getReplyUsersCount
- Specified by:
getReplyUsersCountin classAbstractSlackReplyMessage- Returns:
- The value of the
replyUsersCountattribute
-
getLatestReplyTimestamp
- Specified by:
getLatestReplyTimestampin classAbstractSlackReplyMessage- Returns:
- The value of the
latestReplyTimestampattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withTs
Copy the current immutable object by setting a value for thetsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ts- Returns:
- A modified copy or the
thisobject
-
withSubtype
Copy the current immutable object by setting a present value for the optionalsubtypeattribute.- Parameters:
value- The value for subtype,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSubtype
Copy the current immutable object by setting an optional value for thesubtypeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for subtype- Returns:
- A modified copy or
thisif not changed
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of attachments elements to set- Returns:
- A modified copy or
thisif not changed
-
withThreadTs
Copy the current immutable object by setting a value for thethreadTsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for threadTs- Returns:
- A modified copy or the
thisobject
-
withUserId
Copy the current immutable object by setting a value for theuserIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userId- Returns:
- A modified copy or the
thisobject
-
withChannelId
Copy the current immutable object by setting a value for thechannelIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channelId- Returns:
- A modified copy or the
thisobject
-
withReplyCount
Copy the current immutable object by setting a value for thereplyCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for replyCount- Returns:
- A modified copy or the
thisobject
-
withReplyUserIds
Copy the current immutable object by setting a present value for the optionalreplyUserIdsattribute.- Parameters:
value- The value for replyUserIds,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withReplyUserIds
Copy the current immutable object by setting an optional value for thereplyUserIdsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for replyUserIds- Returns:
- A modified copy or
thisif not changed
-
withReplyUsersCount
Copy the current immutable object by setting a present value for the optionalreplyUsersCountattribute.- Parameters:
value- The value for replyUsersCount,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withReplyUsersCount
Copy the current immutable object by setting an optional value for thereplyUsersCountattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for replyUsersCount- Returns:
- A modified copy or
thisif not changed
-
withLatestReplyTimestamp
Copy the current immutable object by setting a present value for the optionallatestReplyTimestampattribute.- Parameters:
value- The value for latestReplyTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withLatestReplyTimestamp
Copy the current immutable object by setting an optional value for thelatestReplyTimestampattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for latestReplyTimestamp- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackReplyMessagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,ts,subtype,attachments,threadTs,userId,channelId,replyCount,replyUserIds,replyUsersCount,latestReplyTimestamp. -
toString
Prints the immutable valueSlackReplyMessagewith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackReplyMessagevalue. 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 SlackReplyMessage instance
-
builder
Creates a builder forSlackReplyMessage.SlackReplyMessage.builder() .setType(com.hubspot.slack.client.models.events.SlackEventType) // requiredtype.setTs(String) // requiredts.setSubtype(Optional<com.hubspot.slack.client.models.events.SlackMessageSubtype>) // optionalsubtype.addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) //attachmentselements .setThreadTs(String) // requiredthreadTs.setUserId(String) // requireduserId.setChannelId(String) // requiredchannelId.setReplyCount(int) // optionalreplyCount.setReplyUserIds(Optional<List<String>>) // optionalreplyUserIds.setReplyUsersCount(Optional<Integer>) // optionalreplyUsersCount.setLatestReplyTimestamp(Optional<String>) // optionallatestReplyTimestamp.build();- Returns:
- A new SlackReplyMessage builder
-