Class SlackEventMessage.Builder
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessage.Builder
- Enclosing class:
SlackEventMessage
@Generated(from="AbstractSlackEventMessage",
generator="Immutables")
@NotThreadSafe
public static final class SlackEventMessage.Builder
extends Object
Builds instances of type
SlackEventMessage.
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.addAllFiles(Iterable<? extends SlackFile> elements) Adds elements tofileslist.addAttachments(Attachment element) Adds one element toattachmentslist.addAttachments(Attachment... elements) Adds elements toattachmentslist.Adds one element tofileslist.Adds elements tofileslist.build()Builds a newSlackEventMessage.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasEditedinstance.Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasUserinstance.from(AbstractSlackEventMessage instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.AbstractSlackEventMessageinstance.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.Initializes the optional valuebotIdto botId.Initializes the optional valuebotIdto botId.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setEdited(MessageEdited edited) Initializes the optional valueeditedto edited.setEdited(Optional<? extends MessageEdited> edited) Initializes the optional valueeditedto edited.Sets or replaces all elements forfileslist.setSubtype(SlackMessageSubtype subtype) Initializes the optional valuesubtypeto subtype.setSubtype(Optional<? extends SlackMessageSubtype> subtype) Initializes the optional valuesubtypeto subtype.Initializes the value for thetextattribute.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.Initializes the value for theuserIdattribute.
-
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.methods.interceptor.HasEditedinstance.- 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.AbstractSlackEventMessageinstance.- 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.HasUserinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setEdited
Initializes the optional valueeditedto edited.- Parameters:
edited- The value for edited,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setEdited
Initializes the optional valueeditedto edited.- Parameters:
edited- The value for edited- 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
Initializes the optional valuesubtypeto subtype.- Parameters:
subtype- The value for subtype- 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
Adds elements toattachmentslist.- Parameters:
elements- An iterable of attachments 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
-
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
-
setBotId
Initializes the optional valuebotIdto botId.- Parameters:
botId- The value for botId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setBotId
Initializes the optional valuebotIdto botId.- Parameters:
botId- The value for botId- Returns:
thisbuilder for use in a chained invocation
-
setUserId
Initializes the value for theuserIdattribute.- Parameters:
userId- The value for userId- Returns:
thisbuilder for use in a chained invocation
-
setText
Initializes the value for thetextattribute.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
addFiles
Adds one element tofileslist.- Parameters:
element- A files element- Returns:
thisbuilder for use in a chained invocation
-
addFiles
Adds elements tofileslist.- Parameters:
elements- An array of files elements- Returns:
thisbuilder for use in a chained invocation
-
setFiles
Sets or replaces all elements forfileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFiles
Adds elements tofileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackEventMessage.- Returns:
- An immutable instance of SlackEventMessage
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-