Package com.hubspot.slack.client.models
Class LiteMessage
java.lang.Object
com.hubspot.slack.client.models.LiteMessage
- All Implemented Interfaces:
LiteMessageIF
@Generated(from="LiteMessageIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class LiteMessage
extends Object
implements LiteMessageIF
Immutable implementation of
LiteMessageIF.
Use the builder to create immutable instances:
LiteMessage.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic LiteMessage.Builderbuilder()Creates a builder forLiteMessage.static LiteMessagecopyOf(LiteMessageIF instance) Creates an immutable copy of aLiteMessageIFvalue.booleanThis instance is equal to all instances ofLiteMessagethat have equal attribute values.getBotId()getFiles()getText()getType()getUser()inthashCode()Computes a hash code from attributes:type,subtype,user,botId,username,text,attachments,files,blocks,reactions,timestamp,threadTimestamp,replyCount,replyUserIds,replyUsersCount,latestReplyTimestamp.toString()Prints the immutable valueLiteMessagewith attribute values.final LiteMessagewithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final LiteMessagewithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final LiteMessagewithBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.final LiteMessagewithBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.final LiteMessageCopy the current immutable object by setting a present value for the optionalbotIdattribute.final LiteMessageCopy the current immutable object by setting an optional value for thebotIdattribute.final LiteMessageCopy the current immutable object with elements that replace the content offiles.final LiteMessageCopy the current immutable object with elements that replace the content offiles.final LiteMessagewithLatestReplyTimestamp(String value) Copy the current immutable object by setting a present value for the optionallatestReplyTimestampattribute.final LiteMessagewithLatestReplyTimestamp(Optional<String> optional) Copy the current immutable object by setting an optional value for thelatestReplyTimestampattribute.final LiteMessagewithReactions(Reaction... elements) Copy the current immutable object with elements that replace the content ofreactions.final LiteMessagewithReactions(Iterable<? extends Reaction> elements) Copy the current immutable object with elements that replace the content ofreactions.final LiteMessagewithReplyCount(Integer value) Copy the current immutable object by setting a present value for the optionalreplyCountattribute.final LiteMessagewithReplyCount(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thereplyCountattribute.final LiteMessagewithReplyUserIds(List<String> value) Copy the current immutable object by setting a present value for the optionalreplyUserIdsattribute.final LiteMessagewithReplyUserIds(Optional<? extends List<String>> optional) Copy the current immutable object by setting an optional value for thereplyUserIdsattribute.final LiteMessagewithReplyUsersCount(Integer value) Copy the current immutable object by setting a present value for the optionalreplyUsersCountattribute.final LiteMessagewithReplyUsersCount(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thereplyUsersCountattribute.final LiteMessagewithSubtype(String value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final LiteMessagewithSubtype(Optional<String> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final LiteMessageCopy the current immutable object by setting a value for thetextattribute.final LiteMessagewithThreadTimestamp(String value) Copy the current immutable object by setting a present value for the optionalthreadTimestampattribute.final LiteMessagewithThreadTimestamp(Optional<String> optional) Copy the current immutable object by setting an optional value for thethreadTimestampattribute.final LiteMessagewithTimestamp(String value) Copy the current immutable object by setting a value for thetimestampattribute.final LiteMessageCopy the current immutable object by setting a value for thetypeattribute.final LiteMessageCopy the current immutable object by setting a present value for the optionaluserattribute.final LiteMessageCopy the current immutable object by setting an optional value for theuserattribute.final LiteMessagewithUsername(String value) Copy the current immutable object by setting a present value for the optionalusernameattribute.final LiteMessagewithUsername(Optional<String> optional) Copy the current immutable object by setting an optional value for theusernameattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceLiteMessageIF- Returns:
- The value of the
typeattribute
-
getSubtype
- Specified by:
getSubtypein interfaceLiteMessageIF- Returns:
- The value of the
subtypeattribute
-
getUser
- Specified by:
getUserin interfaceLiteMessageIF- Returns:
- The value of the
userattribute
-
getBotId
- Specified by:
getBotIdin interfaceLiteMessageIF- Returns:
- The value of the
botIdattribute
-
getUsername
- Specified by:
getUsernamein interfaceLiteMessageIF- Returns:
- The value of the
usernameattribute
-
getText
- Specified by:
getTextin interfaceLiteMessageIF- Returns:
- The value of the
textattribute
-
getAttachments
- Specified by:
getAttachmentsin interfaceLiteMessageIF- Returns:
- The value of the
attachmentsattribute
-
getFiles
- Specified by:
getFilesin interfaceLiteMessageIF- Returns:
- The value of the
filesattribute
-
getBlocks
- Specified by:
getBlocksin interfaceLiteMessageIF- Returns:
- The value of the
blocksattribute
-
getReactions
- Specified by:
getReactionsin interfaceLiteMessageIF- Returns:
- The value of the
reactionsattribute
-
getTimestamp
- Specified by:
getTimestampin interfaceLiteMessageIF- Returns:
- The value of the
timestampattribute
-
getThreadTimestamp
- Specified by:
getThreadTimestampin interfaceLiteMessageIF- Returns:
- The value of the
threadTimestampattribute
-
getReplyCount
- Specified by:
getReplyCountin interfaceLiteMessageIF- Returns:
- The value of the
replyCountattribute
-
getReplyUserIds
- Specified by:
getReplyUserIdsin interfaceLiteMessageIF- Returns:
- The value of the
replyUserIdsattribute
-
getReplyUsersCount
- Specified by:
getReplyUsersCountin interfaceLiteMessageIF- Returns:
- The value of the
replyUsersCountattribute
-
getLatestReplyTimestamp
- Specified by:
getLatestReplyTimestampin interfaceLiteMessageIF- Returns:
- The value of the
latestReplyTimestampattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- 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
-
withUser
Copy the current immutable object by setting a present value for the optionaluserattribute.- Parameters:
value- The value for user,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUser
Copy the current immutable object by setting an optional value for theuserattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for user- Returns:
- A modified copy or
thisif not changed
-
withBotId
Copy the current immutable object by setting a present value for the optionalbotIdattribute.- Parameters:
value- The value for botId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBotId
Copy the current immutable object by setting an optional value for thebotIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for botId- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting a present value for the optionalusernameattribute.- Parameters:
value- The value for username,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting an optional value for theusernameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for username- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
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
-
withFiles
Copy the current immutable object with elements that replace the content offiles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFiles
Copy the current immutable object with elements that replace the content offiles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of files elements to set- Returns:
- A modified copy or
thisif not changed
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of blocks elements to set- Returns:
- A modified copy or
thisif not changed
-
withReactions
Copy the current immutable object with elements that replace the content ofreactions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withReactions
Copy the current immutable object with elements that replace the content ofreactions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of reactions elements to set- Returns:
- A modified copy or
thisif not changed
-
withTimestamp
Copy the current immutable object by setting a value for thetimestampattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for timestamp- Returns:
- A modified copy or the
thisobject
-
withThreadTimestamp
Copy the current immutable object by setting a present value for the optionalthreadTimestampattribute.- Parameters:
value- The value for threadTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withThreadTimestamp
Copy the current immutable object by setting an optional value for thethreadTimestampattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for threadTimestamp- Returns:
- A modified copy or
thisif not changed
-
withReplyCount
Copy the current immutable object by setting a present value for the optionalreplyCountattribute.- Parameters:
value- The value for replyCount,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withReplyCount
Copy the current immutable object by setting an optional value for thereplyCountattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for replyCount- Returns:
- A modified copy or
thisif not changed
-
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 ofLiteMessagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,subtype,user,botId,username,text,attachments,files,blocks,reactions,timestamp,threadTimestamp,replyCount,replyUserIds,replyUsersCount,latestReplyTimestamp. -
toString
Prints the immutable valueLiteMessagewith attribute values. -
copyOf
Creates an immutable copy of aLiteMessageIFvalue. 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 LiteMessage instance
-
builder
Creates a builder forLiteMessage.LiteMessage.builder() .setType(String) // requiredtype.setSubtype(Optional<String>) // optionalsubtype.setUser(Optional<String>) // optionaluser.setBotId(Optional<String>) // optionalbotId.setUsername(Optional<String>) // optionalusername.setText(String) // requiredtext.addAttachments|addAllAttachments(Attachment) //attachmentselements .addFiles|addAllFiles(com.hubspot.slack.client.models.files.SlackFile) //fileselements .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .addReactions|addAllReactions(Reaction) //reactionselements .setTimestamp(String) // requiredtimestamp.setThreadTimestamp(Optional<String>) // optionalthreadTimestamp.setReplyCount(Optional<Integer>) // optionalreplyCount.setReplyUserIds(Optional<List<String>>) // optionalreplyUserIds.setReplyUsersCount(Optional<Integer>) // optionalreplyUsersCount.setLatestReplyTimestamp(Optional<String>) // optionallatestReplyTimestamp.build();- Returns:
- A new LiteMessage builder
-