@NotThreadSafe public static final class SlackEventBotMessage.Builder extends Object
SlackEventBotMessage.
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 |
|---|---|
SlackEventBotMessage.Builder |
addAllAttachments(Iterable<? extends Attachment> elements)
Adds elements to
attachments list. |
SlackEventBotMessage.Builder |
addAttachments(Attachment... elements)
Adds elements to
attachments list. |
SlackEventBotMessage.Builder |
addAttachments(Attachment element)
Adds one element to
attachments list. |
SlackEventBotMessage |
build()
Builds a new
SlackEventBotMessage. |
SlackEventBotMessage.Builder |
from(AbstractSlackEventBotMessage instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.AbstractSlackEventBotMessage instance. |
SlackEventBotMessage.Builder |
from(HasChannel instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.interceptor.HasChannel instance. |
SlackEventBotMessage.Builder |
from(SlackEvent instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.SlackEvent instance. |
SlackEventBotMessage.Builder |
from(SlackEventMessageBase instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.models.events.SlackEventMessageBase instance. |
SlackEventBotMessage.Builder |
setAttachments(Iterable<? extends Attachment> elements)
Sets or replaces all elements for
attachments list. |
SlackEventBotMessage.Builder |
setBotId(String botId)
Initializes the value for the
botId attribute. |
SlackEventBotMessage.Builder |
setChannelId(String channelId)
Initializes the value for the
channelId attribute. |
SlackEventBotMessage.Builder |
setSubtype(Optional<SlackMessageSubtype> subtype)
Initializes the optional value
subtype to subtype. |
SlackEventBotMessage.Builder |
setSubtype(SlackMessageSubtype subtype)
Initializes the optional value
subtype to subtype. |
SlackEventBotMessage.Builder |
setText(Optional<String> text)
Initializes the optional value
text to text. |
SlackEventBotMessage.Builder |
setText(String text)
Initializes the optional value
text to text. |
SlackEventBotMessage.Builder |
setTs(String ts)
Initializes the value for the
ts attribute. |
SlackEventBotMessage.Builder |
setType(SlackEventType type)
Initializes the value for the
type attribute. |
public final SlackEventBotMessage.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 SlackEventBotMessage.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 SlackEventBotMessage.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 SlackEventBotMessage.Builder from(AbstractSlackEventBotMessage instance)
com.hubspot.slack.client.models.events.AbstractSlackEventBotMessage instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setChannelId(String channelId)
channelId attribute.channelId - The value for channelIdthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setText(@Nullable String text)
text to text.text - The value for text, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackEventBotMessage.Builder setText(Optional<String> text)
text to text.text - The value for textthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder addAttachments(Attachment element)
attachments list.element - A attachments elementthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder addAttachments(Attachment... elements)
attachments list.elements - An array of attachments elementsthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder addAllAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setBotId(String botId)
botId attribute.botId - The value for botIdthis builder for use in a chained invocationpublic final SlackEventBotMessage.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 SlackEventBotMessage.Builder setSubtype(Optional<SlackMessageSubtype> subtype)
subtype to subtype.subtype - The value for subtypethis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setType(SlackEventType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final SlackEventBotMessage.Builder setTs(String ts)
ts attribute.ts - The value for tsthis builder for use in a chained invocationpublic SlackEventBotMessage build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackEventBotMessage.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.