Package com.hubspot.slack.client.models
Class LiteMessage.Builder
java.lang.Object
com.hubspot.slack.client.models.LiteMessage.Builder
- Enclosing class:
LiteMessage
@Generated(from="LiteMessageIF",
generator="Immutables")
@NotThreadSafe
public static final class LiteMessage.Builder
extends Object
Builds instances of type
LiteMessage.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionfinal LiteMessage.BuilderaddAllAttachments(Iterable<? extends Attachment> elements) Adds elements toattachmentslist.final LiteMessage.BuilderaddAllBlocks(Iterable<? extends Block> elements) Adds elements toblockslist.final LiteMessage.BuilderaddAllFiles(Iterable<? extends SlackFile> elements) Adds elements tofileslist.final LiteMessage.BuilderaddAllReactions(Iterable<? extends Reaction> elements) Adds elements toreactionslist.final LiteMessage.BuilderaddAttachments(Attachment element) Adds one element toattachmentslist.final LiteMessage.BuilderaddAttachments(Attachment... elements) Adds elements toattachmentslist.final LiteMessage.BuilderAdds one element toblockslist.final LiteMessage.BuilderAdds elements toblockslist.final LiteMessage.BuilderAdds one element tofileslist.final LiteMessage.BuilderAdds elements tofileslist.final LiteMessage.BuilderaddReactions(Reaction element) Adds one element toreactionslist.final LiteMessage.BuilderaddReactions(Reaction... elements) Adds elements toreactionslist.build()Builds a newLiteMessage.final LiteMessage.Builderfrom(LiteMessageIF instance) Fill a builder with attribute values from the providedLiteMessageIFinstance.final LiteMessage.BuildersetAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.final LiteMessage.BuilderSets or replaces all elements forblockslist.final LiteMessage.BuilderInitializes the optional valuebotIdto botId.final LiteMessage.BuilderInitializes the optional valuebotIdto botId.final LiteMessage.BuilderSets or replaces all elements forfileslist.final LiteMessage.BuildersetLatestReplyTimestamp(String latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.final LiteMessage.BuildersetLatestReplyTimestamp(Optional<String> latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.final LiteMessage.BuildersetReactions(Iterable<? extends Reaction> elements) Sets or replaces all elements forreactionslist.final LiteMessage.BuildersetReplyCount(Integer replyCount) Initializes the optional valuereplyCountto replyCount.final LiteMessage.BuildersetReplyCount(Optional<Integer> replyCount) Initializes the optional valuereplyCountto replyCount.final LiteMessage.BuildersetReplyUserIds(List<String> replyUserIds) Initializes the optional valuereplyUserIdsto replyUserIds.final LiteMessage.BuildersetReplyUserIds(Optional<? extends List<String>> replyUserIds) Initializes the optional valuereplyUserIdsto replyUserIds.final LiteMessage.BuildersetReplyUsersCount(Integer replyUsersCount) Initializes the optional valuereplyUsersCountto replyUsersCount.final LiteMessage.BuildersetReplyUsersCount(Optional<Integer> replyUsersCount) Initializes the optional valuereplyUsersCountto replyUsersCount.final LiteMessage.BuildersetSubtype(String subtype) Initializes the optional valuesubtypeto subtype.final LiteMessage.BuildersetSubtype(Optional<String> subtype) Initializes the optional valuesubtypeto subtype.final LiteMessage.BuilderInitializes the value for thetextattribute.final LiteMessage.BuildersetThreadTimestamp(String threadTimestamp) Initializes the optional valuethreadTimestampto threadTimestamp.final LiteMessage.BuildersetThreadTimestamp(Optional<String> threadTimestamp) Initializes the optional valuethreadTimestampto threadTimestamp.final LiteMessage.BuildersetTimestamp(String timestamp) Initializes the value for thetimestampattribute.final LiteMessage.BuilderInitializes the value for thetypeattribute.final LiteMessage.BuilderInitializes the optional valueuserto user.final LiteMessage.BuilderInitializes the optional valueuserto user.final LiteMessage.BuildersetUsername(String username) Initializes the optional valueusernameto username.final LiteMessage.BuildersetUsername(Optional<String> username) Initializes the optional valueusernameto username.
-
Method Details
-
from
Fill a builder with attribute values from the providedLiteMessageIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
setSubtype
Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setSubtype
Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype- Returns:
thisbuilder for use in a chained invocation
-
setUser
Initializes the optional valueuserto user.- Parameters:
user- The value for user,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUser
Initializes the optional valueuserto user.- Parameters:
user- The value for user- Returns:
thisbuilder for use in a chained invocation
-
setBotId
Initializes the optional valuebotIdto botId.- Parameters:
botId- The value for botId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setBotId
Initializes the optional valuebotIdto botId.- Parameters:
botId- The value for botId- Returns:
thisbuilder for use in a chained invocation
-
setUsername
Initializes the optional valueusernameto username.- Parameters:
username- The value for username,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUsername
Initializes the optional valueusernameto username.- Parameters:
username- The value for username- Returns:
thisbuilder for use in a chained invocation
-
setText
Initializes the value for thetextattribute.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
addAttachments
Adds one element toattachmentslist.- Parameters:
element- A attachments element- Returns:
thisbuilder for use in a chained invocation
-
addAttachments
Adds elements toattachmentslist.- Parameters:
elements- An array of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
setAttachments
Sets or replaces all elements forattachmentslist.- Parameters:
elements- An iterable of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAttachments
Adds elements toattachmentslist.- Parameters:
elements- An iterable of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
addFiles
Adds one element tofileslist.- Parameters:
element- A files element- Returns:
thisbuilder for use in a chained invocation
-
addFiles
Adds elements tofileslist.- Parameters:
elements- An array of files elements- Returns:
thisbuilder for use in a chained invocation
-
setFiles
Sets or replaces all elements forfileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFiles
Adds elements tofileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
addBlocks
Adds one element toblockslist.- Parameters:
element- A blocks element- Returns:
thisbuilder for use in a chained invocation
-
addBlocks
Adds elements toblockslist.- Parameters:
elements- An array of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
setBlocks
Sets or replaces all elements forblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBlocks
Adds elements toblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
addReactions
Adds one element toreactionslist.- Parameters:
element- A reactions element- Returns:
thisbuilder for use in a chained invocation
-
addReactions
Adds elements toreactionslist.- Parameters:
elements- An array of reactions elements- Returns:
thisbuilder for use in a chained invocation
-
setReactions
Sets or replaces all elements forreactionslist.- Parameters:
elements- An iterable of reactions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllReactions
Adds elements toreactionslist.- Parameters:
elements- An iterable of reactions elements- Returns:
thisbuilder for use in a chained invocation
-
setTimestamp
Initializes the value for thetimestampattribute.- Parameters:
timestamp- The value for timestamp- Returns:
thisbuilder for use in a chained invocation
-
setThreadTimestamp
Initializes the optional valuethreadTimestampto threadTimestamp.- Parameters:
threadTimestamp- The value for threadTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setThreadTimestamp
Initializes the optional valuethreadTimestampto threadTimestamp.- Parameters:
threadTimestamp- The value for threadTimestamp- Returns:
thisbuilder for use in a chained invocation
-
setReplyCount
Initializes the optional valuereplyCountto replyCount.- Parameters:
replyCount- The value for replyCount,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setReplyCount
Initializes the optional valuereplyCountto replyCount.- Parameters:
replyCount- The value for replyCount- Returns:
thisbuilder for use in a chained invocation
-
setReplyUserIds
Initializes the optional valuereplyUserIdsto replyUserIds.- Parameters:
replyUserIds- The value for replyUserIds,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setReplyUserIds
Initializes the optional valuereplyUserIdsto replyUserIds.- Parameters:
replyUserIds- The value for replyUserIds- Returns:
thisbuilder for use in a chained invocation
-
setReplyUsersCount
Initializes the optional valuereplyUsersCountto replyUsersCount.- Parameters:
replyUsersCount- The value for replyUsersCount,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setReplyUsersCount
Initializes the optional valuereplyUsersCountto replyUsersCount.- Parameters:
replyUsersCount- The value for replyUsersCount- Returns:
thisbuilder for use in a chained invocation
-
setLatestReplyTimestamp
Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.- Parameters:
latestReplyTimestamp- The value for latestReplyTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setLatestReplyTimestamp
Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.- Parameters:
latestReplyTimestamp- The value for latestReplyTimestamp- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newLiteMessage.- Returns:
- An immutable instance of LiteMessage
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-