@NotThreadSafe public static final class ChatPostMessageParams.Builder extends Object
ChatPostMessageParams.
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 |
|---|---|
ChatPostMessageParams.Builder |
addAllAttachments(Iterable<? extends Attachment> elements)
Adds elements to
attachments list. |
ChatPostMessageParams.Builder |
addAllBlocks(Iterable<? extends Block> elements)
Adds elements to
blocks list. |
ChatPostMessageParams.Builder |
addAttachments(Attachment... elements)
Adds elements to
attachments list. |
ChatPostMessageParams.Builder |
addAttachments(Attachment element)
Adds one element to
attachments list. |
ChatPostMessageParams.Builder |
addBlocks(Block... elements)
Adds elements to
blocks list. |
ChatPostMessageParams.Builder |
addBlocks(Block element)
Adds one element to
blocks list. |
ChatPostMessageParams |
build()
Builds a new
ChatPostMessageParams. |
ChatPostMessageParams.Builder |
from(AbstractChatPostMessageParams instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.params.chat.AbstractChatPostMessageParams instance. |
ChatPostMessageParams.Builder |
from(HasChannel instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.interceptor.HasChannel instance. |
ChatPostMessageParams.Builder |
from(MessageParams instance)
Fill a builder with attribute values from the provided
com.hubspot.slack.client.methods.params.chat.MessageParams instance. |
ChatPostMessageParams.Builder |
setAsUser(Boolean asUser)
Initializes the optional value
asUser to asUser. |
ChatPostMessageParams.Builder |
setAsUser(Optional<Boolean> asUser)
Initializes the optional value
asUser to asUser. |
ChatPostMessageParams.Builder |
setAttachments(Iterable<? extends Attachment> elements)
Sets or replaces all elements for
attachments list. |
ChatPostMessageParams.Builder |
setBlocks(Iterable<? extends Block> elements)
Sets or replaces all elements for
blocks list. |
ChatPostMessageParams.Builder |
setChannelId(String channelId)
Initializes the value for the
channelId attribute. |
ChatPostMessageParams.Builder |
setIconEmoji(Optional<String> iconEmoji)
Initializes the optional value
iconEmoji to iconEmoji. |
ChatPostMessageParams.Builder |
setIconEmoji(String iconEmoji)
Initializes the optional value
iconEmoji to iconEmoji. |
ChatPostMessageParams.Builder |
setIconUrl(Optional<String> iconUrl)
Initializes the optional value
iconUrl to iconUrl. |
ChatPostMessageParams.Builder |
setIconUrl(String iconUrl)
Initializes the optional value
iconUrl to iconUrl. |
ChatPostMessageParams.Builder |
setLinkNames(Boolean linkNames)
Initializes the optional value
linkNames to linkNames. |
ChatPostMessageParams.Builder |
setLinkNames(Optional<Boolean> linkNames)
Initializes the optional value
linkNames to linkNames. |
ChatPostMessageParams.Builder |
setReplyBroadcast(Boolean replyBroadcast)
Initializes the optional value
replyBroadcast to replyBroadcast. |
ChatPostMessageParams.Builder |
setReplyBroadcast(Optional<Boolean> replyBroadcast)
Initializes the optional value
replyBroadcast to replyBroadcast. |
ChatPostMessageParams.Builder |
setText(Optional<String> text)
Initializes the optional value
text to text. |
ChatPostMessageParams.Builder |
setText(String text)
Initializes the optional value
text to text. |
ChatPostMessageParams.Builder |
setThreadTs(Optional<String> threadTs)
Initializes the optional value
threadTs to threadTs. |
ChatPostMessageParams.Builder |
setThreadTs(String threadTs)
Initializes the optional value
threadTs to threadTs. |
ChatPostMessageParams.Builder |
setUnfurlLinks(Boolean unfurlLinks)
Initializes the optional value
unfurlLinks to unfurlLinks. |
ChatPostMessageParams.Builder |
setUnfurlLinks(Optional<Boolean> unfurlLinks)
Initializes the optional value
unfurlLinks to unfurlLinks. |
ChatPostMessageParams.Builder |
setUnfurlMedia(Boolean unfurlMedia)
Initializes the optional value
unfurlMedia to unfurlMedia. |
ChatPostMessageParams.Builder |
setUnfurlMedia(Optional<Boolean> unfurlMedia)
Initializes the optional value
unfurlMedia to unfurlMedia. |
ChatPostMessageParams.Builder |
setUsername(Optional<String> username)
Initializes the optional value
username to username. |
ChatPostMessageParams.Builder |
setUsername(String username)
Initializes the optional value
username to username. |
public final ChatPostMessageParams.Builder from(MessageParams instance)
com.hubspot.slack.client.methods.params.chat.MessageParams instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder from(AbstractChatPostMessageParams instance)
com.hubspot.slack.client.methods.params.chat.AbstractChatPostMessageParams instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ChatPostMessageParams.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 ChatPostMessageParams.Builder setChannelId(String channelId)
channelId attribute.channelId - The value for channelIdthis builder for use in a chained invocationpublic final ChatPostMessageParams.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 ChatPostMessageParams.Builder setText(Optional<String> text)
text to text.text - The value for textthis builder for use in a chained invocationpublic final ChatPostMessageParams.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 ChatPostMessageParams.Builder setThreadTs(Optional<String> threadTs)
threadTs to threadTs.threadTs - The value for threadTsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setUsername(@Nullable String username)
username to username.username - The value for username, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setUsername(Optional<String> username)
username to username.username - The value for usernamethis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setAsUser(@Nullable Boolean asUser)
asUser to asUser.asUser - The value for asUser, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setAsUser(Optional<Boolean> asUser)
asUser to asUser.asUser - The value for asUserthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setIconEmoji(@Nullable String iconEmoji)
iconEmoji to iconEmoji.iconEmoji - The value for iconEmoji, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setIconEmoji(Optional<String> iconEmoji)
iconEmoji to iconEmoji.iconEmoji - The value for iconEmojithis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setIconUrl(@Nullable String iconUrl)
iconUrl to iconUrl.iconUrl - The value for iconUrl, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setIconUrl(Optional<String> iconUrl)
iconUrl to iconUrl.iconUrl - The value for iconUrlthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setLinkNames(@Nullable Boolean linkNames)
linkNames to linkNames.linkNames - The value for linkNames, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setLinkNames(Optional<Boolean> linkNames)
linkNames to linkNames.linkNames - The value for linkNamesthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setUnfurlLinks(@Nullable Boolean unfurlLinks)
unfurlLinks to unfurlLinks.unfurlLinks - The value for unfurlLinks, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setUnfurlLinks(Optional<Boolean> unfurlLinks)
unfurlLinks to unfurlLinks.unfurlLinks - The value for unfurlLinksthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setUnfurlMedia(@Nullable Boolean unfurlMedia)
unfurlMedia to unfurlMedia.unfurlMedia - The value for unfurlMedia, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setUnfurlMedia(Optional<Boolean> unfurlMedia)
unfurlMedia to unfurlMedia.unfurlMedia - The value for unfurlMediathis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setReplyBroadcast(@Nullable Boolean replyBroadcast)
replyBroadcast to replyBroadcast.replyBroadcast - The value for replyBroadcast, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ChatPostMessageParams.Builder setReplyBroadcast(Optional<Boolean> replyBroadcast)
replyBroadcast to replyBroadcast.replyBroadcast - The value for replyBroadcastthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addAttachments(Attachment element)
attachments list.element - A attachments elementthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addAttachments(Attachment... elements)
attachments list.elements - An array of attachments elementsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addAllAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addBlocks(Block element)
blocks list.element - A blocks elementthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addBlocks(Block... elements)
blocks list.elements - An array of blocks elementsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder setBlocks(Iterable<? extends Block> elements)
blocks list.elements - An iterable of blocks elementsthis builder for use in a chained invocationpublic final ChatPostMessageParams.Builder addAllBlocks(Iterable<? extends Block> elements)
blocks list.elements - An iterable of blocks elementsthis builder for use in a chained invocationpublic ChatPostMessageParams build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
ChatPostMessageParams.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.