Class SlackReplyMessage.Builder
java.lang.Object
com.hubspot.slack.client.models.events.util.SlackReplyMessage.Builder
- Enclosing class:
SlackReplyMessage
@Generated(from="AbstractSlackReplyMessage",
generator="Immutables")
@NotThreadSafe
public static final class SlackReplyMessage.Builder
extends Object
Builds instances of type
SlackReplyMessage.
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 TypeMethodDescriptionaddAllAttachments(Iterable<? extends Attachment> elements) Adds elements toattachmentslist.addAttachments(Attachment element) Adds one element toattachmentslist.addAttachments(Attachment... elements) Adds elements toattachmentslist.build()Builds a newSlackReplyMessage.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasUserinstance.from(SlackEvent instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventinstance.from(SlackEventMessageBase instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventMessageBaseinstance.from(AbstractSlackReplyMessage instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.util.AbstractSlackReplyMessageinstance.setAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setLatestReplyTimestamp(String latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.setLatestReplyTimestamp(Optional<String> latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.setReplyCount(int replyCount) Initializes the value for thereplyCountattribute.setReplyUserIds(List<String> replyUserIds) Initializes the optional valuereplyUserIdsto replyUserIds.setReplyUserIds(Optional<? extends List<String>> replyUserIds) Initializes the optional valuereplyUserIdsto replyUserIds.setReplyUsersCount(Integer replyUsersCount) Initializes the optional valuereplyUsersCountto replyUsersCount.setReplyUsersCount(Optional<Integer> replyUsersCount) Initializes the optional valuereplyUsersCountto replyUsersCount.setSubtype(SlackMessageSubtype subtype) Initializes the optional valuesubtypeto subtype.setSubtype(Optional<? extends SlackMessageSubtype> subtype) Initializes the optional valuesubtypeto subtype.setThreadTs(String threadTs) Initializes the value for thethreadTsattribute.Initializes the value for thetsattribute.setType(SlackEventType type) Initializes the value for thetypeattribute.Initializes the value for theuserIdattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventMessageBaseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasUserinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.util.AbstractSlackReplyMessageinstance.- 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
-
setTs
Initializes the value for thetsattribute.- Parameters:
ts- The value for ts- 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
-
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
-
setThreadTs
Initializes the value for thethreadTsattribute.- Parameters:
threadTs- The value for threadTs- Returns:
thisbuilder for use in a chained invocation
-
setUserId
Initializes the value for theuserIdattribute.- Parameters:
userId- The value for userId- Returns:
thisbuilder for use in a chained invocation
-
setChannelId
Initializes the value for thechannelIdattribute.- Parameters:
channelId- The value for channelId- Returns:
thisbuilder for use in a chained invocation
-
setReplyCount
Initializes the value for thereplyCountattribute.If not set, this attribute will have a default value as returned by the initializer of
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
public final SlackReplyMessage.Builder setReplyUserIds(Optional<? extends List<String>> replyUserIds) 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
public final SlackReplyMessage.Builder setLatestReplyTimestamp(@Nullable String latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.- Parameters:
latestReplyTimestamp- The value for latestReplyTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setLatestReplyTimestamp
public final SlackReplyMessage.Builder setLatestReplyTimestamp(Optional<String> latestReplyTimestamp) Initializes the optional valuelatestReplyTimestampto latestReplyTimestamp.- Parameters:
latestReplyTimestamp- The value for latestReplyTimestamp- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackReplyMessage.- Returns:
- An immutable instance of SlackReplyMessage
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-