Class SlashCommandResponseParams.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.chat.SlashCommandResponseParams.Builder
- Enclosing class:
SlashCommandResponseParams
@Generated(from="AbstractSlashCommandResponseParams",
generator="Immutables")
@NotThreadSafe
public static final class SlashCommandResponseParams.Builder
extends Object
Builds instances of type
SlashCommandResponseParams.
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.addAllBlocks(Iterable<? extends Block> elements) Adds elements toblockslist.addAttachments(Attachment element) Adds one element toattachmentslist.addAttachments(Attachment... elements) Adds elements toattachmentslist.Adds one element toblockslist.Adds elements toblockslist.build()Builds a newSlashCommandResponseParams.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.from(AbstractChatMessageParams instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.AbstractChatMessageParamsinstance.from(AbstractSlashCommandResponseParams instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.AbstractSlashCommandResponseParamsinstance.from(MessageParams instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.MessageParamsinstance.Initializes the optional valueasUserto asUser.Initializes the optional valueasUserto asUser.setAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.Sets or replaces all elements forblockslist.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setIconEmoji(String iconEmoji) Initializes the optional valueiconEmojito iconEmoji.setIconEmoji(Optional<String> iconEmoji) Initializes the optional valueiconEmojito iconEmoji.setIconUrl(String iconUrl) Initializes the optional valueiconUrlto iconUrl.setIconUrl(Optional<String> iconUrl) Initializes the optional valueiconUrlto iconUrl.setLinkNames(Boolean linkNames) Initializes the optional valuelinkNamesto linkNames.setLinkNames(Optional<Boolean> linkNames) Initializes the optional valuelinkNamesto linkNames.setReplyBroadcast(Boolean replyBroadcast) Initializes the optional valuereplyBroadcastto replyBroadcast.setReplyBroadcast(Optional<Boolean> replyBroadcast) Initializes the optional valuereplyBroadcastto replyBroadcast.setResponseType(TopLevelMessageResponseType responseType) Initializes the value for theresponseTypeattribute.Initializes the optional valuetextto text.Initializes the optional valuetextto text.setThreadTs(String threadTs) Initializes the optional valuethreadTsto threadTs.setThreadTs(Optional<String> threadTs) Initializes the optional valuethreadTsto threadTs.setUnfurlLinks(Boolean unfurlLinks) Initializes the optional valueunfurlLinksto unfurlLinks.setUnfurlLinks(Optional<Boolean> unfurlLinks) Initializes the optional valueunfurlLinksto unfurlLinks.setUnfurlMedia(Boolean unfurlMedia) Initializes the optional valueunfurlMediato unfurlMedia.setUnfurlMedia(Optional<Boolean> unfurlMedia) Initializes the optional valueunfurlMediato unfurlMedia.setUsername(String username) Initializes the optional valueusernameto username.setUsername(Optional<String> username) Initializes the optional valueusernameto username.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.AbstractSlashCommandResponseParamsinstance.- 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.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.methods.params.chat.MessageParamsinstance.- 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.params.chat.AbstractChatMessageParamsinstance.- Parameters:
instance- The instance from which to copy values- 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
public final SlashCommandResponseParams.Builder setAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.- Parameters:
elements- An iterable of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAttachments
public final SlashCommandResponseParams.Builder addAllAttachments(Iterable<? extends Attachment> elements) Adds elements toattachmentslist.- Parameters:
elements- An iterable of attachments 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
-
setChannelId
Initializes the value for thechannelIdattribute.- Parameters:
channelId- The value for channelId- Returns:
thisbuilder for use in a chained invocation
-
setText
Initializes the optional valuetextto text.- Parameters:
text- The value for text,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setText
Initializes the optional valuetextto text.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
setThreadTs
Initializes the optional valuethreadTsto threadTs.- Parameters:
threadTs- The value for threadTs,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setThreadTs
Initializes the optional valuethreadTsto threadTs.- Parameters:
threadTs- The value for threadTs- 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
-
setAsUser
Initializes the optional valueasUserto asUser.- Parameters:
asUser- The value for asUser,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setAsUser
Initializes the optional valueasUserto asUser.- Parameters:
asUser- The value for asUser- Returns:
thisbuilder for use in a chained invocation
-
setIconEmoji
Initializes the optional valueiconEmojito iconEmoji.- Parameters:
iconEmoji- The value for iconEmoji,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIconEmoji
Initializes the optional valueiconEmojito iconEmoji.- Parameters:
iconEmoji- The value for iconEmoji- Returns:
thisbuilder for use in a chained invocation
-
setIconUrl
Initializes the optional valueiconUrlto iconUrl.- Parameters:
iconUrl- The value for iconUrl,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIconUrl
Initializes the optional valueiconUrlto iconUrl.- Parameters:
iconUrl- The value for iconUrl- Returns:
thisbuilder for use in a chained invocation
-
setLinkNames
Initializes the optional valuelinkNamesto linkNames.- Parameters:
linkNames- The value for linkNames,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setLinkNames
Initializes the optional valuelinkNamesto linkNames.- Parameters:
linkNames- The value for linkNames- Returns:
thisbuilder for use in a chained invocation
-
setUnfurlLinks
Initializes the optional valueunfurlLinksto unfurlLinks.- Parameters:
unfurlLinks- The value for unfurlLinks,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUnfurlLinks
Initializes the optional valueunfurlLinksto unfurlLinks.- Parameters:
unfurlLinks- The value for unfurlLinks- Returns:
thisbuilder for use in a chained invocation
-
setUnfurlMedia
Initializes the optional valueunfurlMediato unfurlMedia.- Parameters:
unfurlMedia- The value for unfurlMedia,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUnfurlMedia
Initializes the optional valueunfurlMediato unfurlMedia.- Parameters:
unfurlMedia- The value for unfurlMedia- Returns:
thisbuilder for use in a chained invocation
-
setReplyBroadcast
Initializes the optional valuereplyBroadcastto replyBroadcast.- Parameters:
replyBroadcast- The value for replyBroadcast,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setReplyBroadcast
Initializes the optional valuereplyBroadcastto replyBroadcast.- Parameters:
replyBroadcast- The value for replyBroadcast- Returns:
thisbuilder for use in a chained invocation
-
setResponseType
public final SlashCommandResponseParams.Builder setResponseType(TopLevelMessageResponseType responseType) Initializes the value for theresponseTypeattribute.If not set, this attribute will have a default value as returned by the initializer of
responseType.- Parameters:
responseType- The value for responseType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlashCommandResponseParams.- Returns:
- An immutable instance of SlashCommandResponseParams
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-