@NotThreadSafe public static final class SlackEventMessage.Builder extends Object
SlackEventMessage.
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.
| Modifier and Type | Method and Description |
|---|---|
SlackEventMessage |
build()
Builds a new
SlackEventMessage. |
SlackEventMessage.Builder |
from(AbstractSlackEventMessage instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.AbstractSlackEventMessage instance. |
SlackEventMessage.Builder |
from(HasChannel instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.interceptor.HasChannel instance. |
SlackEventMessage.Builder |
from(HasUser instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.interceptor.HasUser instance. |
SlackEventMessage.Builder |
from(SlackEvent instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.SlackEvent instance. |
SlackEventMessage.Builder |
from(SlackEventMessageBase instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.SlackEventMessageBase instance. |
SlackEventMessage.Builder |
setBotId(Optional<String> botId)
Initializes the optional value
botId to botId. |
SlackEventMessage.Builder |
setBotId(String botId)
Initializes the optional value
botId to botId. |
SlackEventMessage.Builder |
setChannelId(String channelId)
Initializes the value for the
channelId attribute. |
SlackEventMessage.Builder |
setSubtype(Optional<SlackMessageSubtype> subtype)
Initializes the optional value
subtype to subtype. |
SlackEventMessage.Builder |
setSubtype(SlackMessageSubtype subtype)
Initializes the optional value
subtype to subtype. |
SlackEventMessage.Builder |
setText(String text)
Initializes the value for the
text attribute. |
SlackEventMessage.Builder |
setThreadTs(Optional<String> threadTs)
Initializes the optional value
threadTs to threadTs. |
SlackEventMessage.Builder |
setThreadTs(String threadTs)
Initializes the optional value
threadTs to threadTs. |
SlackEventMessage.Builder |
setTs(String ts)
Initializes the value for the
ts attribute. |
SlackEventMessage.Builder |
setType(SlackEventType type)
Initializes the value for the
type attribute. |
SlackEventMessage.Builder |
setUserId(String userId)
Initializes the value for the
userId attribute. |
public final SlackEventMessage.Builder from(HasChannel instance)
com.hubspot.slack.client.methods.interceptor.HasChannel instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventMessage.Builder from(SlackEventMessageBase instance)
com.hubspot.slack.client.models.events.SlackEventMessageBase instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventMessage.Builder from(SlackEvent instance)
com.hubspot.slack.client.models.events.SlackEvent instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventMessage.Builder from(AbstractSlackEventMessage instance)
com.hubspot.slack.client.models.events.AbstractSlackEventMessage instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventMessage.Builder from(HasUser instance)
com.hubspot.slack.client.methods.interceptor.HasUser instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setChannelId(String channelId)
channelId attribute.channelId - The value for channelIdthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setThreadTs(@Nullable String threadTs)
threadTs to threadTs.threadTs - The value for threadTs, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackEventMessage.Builder setThreadTs(Optional<String> threadTs)
threadTs to threadTs.threadTs - The value for threadTsthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setBotId(@Nullable String botId)
botId to botId.botId - The value for botId, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackEventMessage.Builder setBotId(Optional<String> botId)
botId to botId.botId - The value for botIdthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setUserId(String userId)
userId attribute.userId - The value for userIdthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setText(String text)
text attribute.text - The value for textthis builder for use in a chained invocationpublic final SlackEventMessage.Builder setSubtype(@Nullable SlackMessageSubtype subtype)
subtype to subtype.subtype - The value for subtype, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackEventMessage.Builder setSubtype(Optional<SlackMessageSubtype> subtype)
subtype to subtype.subtype - The value for subtypethis builder for use in a chained invocationpublic final SlackEventMessage.Builder setType(SlackEventType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final SlackEventMessage.Builder setTs(String ts)
ts attribute.ts - The value for tsthis builder for use in a chained invocationpublic SlackEventMessage build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackEventMessage.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.