Class ChatPostEphemeralMessageParams.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.chat.ChatPostEphemeralMessageParams.Builder
- Enclosing class:
ChatPostEphemeralMessageParams
@Generated(from="ChatPostEphemeralMessageParamsIF",
generator="Immutables")
@NotThreadSafe
public static final class ChatPostEphemeralMessageParams.Builder
extends Object
Builds instances of type
ChatPostEphemeralMessageParams.
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 newChatPostEphemeralMessageParams.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.from(ChatPostEphemeralMessageParamsIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.ChatPostEphemeralMessageParamsIFinstance.from(MessageParams instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.params.chat.MessageParamsinstance.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.setParseMode(String parseMode) Initializes the value for theparseModeattribute.setSendAsUser(Boolean sendAsUser) Initializes the optional valuesendAsUserto sendAsUser.setSendAsUser(Optional<Boolean> sendAsUser) Initializes the optional valuesendAsUserto sendAsUser.setShouldLinkNames(boolean shouldLinkNames) Initializes the value for theshouldLinkNamesattribute.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.setUserToSendTo(String userToSendTo) Initializes the value for theuserToSendToattribute.
-
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.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.ChatPostEphemeralMessageParamsIFinstance.- Parameters:
instance- The instance from which to copy values- 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
-
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 ChatPostEphemeralMessageParams.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 ChatPostEphemeralMessageParams.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
public final ChatPostEphemeralMessageParams.Builder addAllBlocks(Iterable<? extends Block> elements) 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
-
setUserToSendTo
Initializes the value for theuserToSendToattribute.- Parameters:
userToSendTo- The value for userToSendTo- Returns:
thisbuilder for use in a chained invocation
-
setSendAsUser
Initializes the optional valuesendAsUserto sendAsUser.- Parameters:
sendAsUser- The value for sendAsUser,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setSendAsUser
Initializes the optional valuesendAsUserto sendAsUser.- Parameters:
sendAsUser- The value for sendAsUser- 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
-
setShouldLinkNames
Initializes the value for theshouldLinkNamesattribute.If not set, this attribute will have a default value as returned by the initializer of
shouldLinkNames.- Parameters:
shouldLinkNames- The value for shouldLinkNames- Returns:
thisbuilder for use in a chained invocation
-
setParseMode
Initializes the value for theparseModeattribute.If not set, this attribute will have a default value as returned by the initializer of
parseMode.- Parameters:
parseMode- The value for parseMode- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newChatPostEphemeralMessageParams.- Returns:
- An immutable instance of ChatPostEphemeralMessageParams
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-