Class SlackEventBotMessage.Builder
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventBotMessage.Builder
- Enclosing class:
SlackEventBotMessage
@Generated(from="AbstractSlackEventBotMessage",
generator="Immutables")
@NotThreadSafe
public static final class SlackEventBotMessage.Builder
extends Object
Builds instances of type
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.
-
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 newSlackEventBotMessage.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.from(AbstractSlackEventBotMessage instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.AbstractSlackEventBotMessageinstance.from(SlackEvent instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventinstance.from(SlackEventMessageBase instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.SlackEventMessageBaseinstance.setAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.Sets or replaces all elements forblockslist.Initializes the value for thebotIdattribute.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setSubtype(SlackMessageSubtype subtype) Initializes the optional valuesubtypeto subtype.setSubtype(Optional<? extends SlackMessageSubtype> subtype) Initializes the optional valuesubtypeto subtype.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.Initializes the value for thetsattribute.setType(SlackEventType type) Initializes the value for thetypeattribute.
-
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.models.events.SlackEventinstance.- 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.models.events.SlackEventMessageBaseinstance.- 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.models.events.AbstractSlackEventBotMessageinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
setTs
Initializes the value for thetsattribute.- Parameters:
ts- The value for ts- Returns:
thisbuilder for use in a chained invocation
-
setSubtype
Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setSubtype
public final SlackEventBotMessage.Builder setSubtype(Optional<? extends SlackMessageSubtype> subtype) Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype- 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
-
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
-
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
Sets or replaces all elements forattachmentslist.- Parameters:
elements- An iterable of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAttachments
public final SlackEventBotMessage.Builder addAllAttachments(Iterable<? extends Attachment> elements) Adds elements toattachmentslist.- Parameters:
elements- An iterable of attachments elements- Returns:
thisbuilder for use in a chained invocation
-
setBotId
Initializes the value for thebotIdattribute.- Parameters:
botId- The value for botId- 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
-
build
Builds a newSlackEventBotMessage.- Returns:
- An immutable instance of SlackEventBotMessage
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-