Class SlackEventMessageReplied.Builder
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageReplied.Builder
- Enclosing class:
SlackEventMessageReplied
@Generated(from="AbstractSlackEventMessageReplied",
generator="Immutables")
@NotThreadSafe
public static final class SlackEventMessageReplied.Builder
extends Object
Builds instances of type
SlackEventMessageReplied.
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.addAttachments(Attachment element) Adds one element toattachmentslist.addAttachments(Attachment... elements) Adds elements toattachmentslist.build()Builds a newSlackEventMessageReplied.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.from(AbstractSlackEventMessageReplied instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.AbstractSlackEventMessageRepliedinstance.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.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setMessage(SlackReplyMessage message) Initializes the value for themessageattribute.setSubtype(SlackMessageSubtype subtype) Initializes the optional valuesubtypeto subtype.setSubtype(Optional<? extends SlackMessageSubtype> subtype) Initializes the optional valuesubtypeto subtype.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.models.events.AbstractSlackEventMessageRepliedinstance.- 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.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
-
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 SlackEventMessageReplied.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
-
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 SlackEventMessageReplied.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 SlackEventMessageReplied.Builder addAllAttachments(Iterable<? extends Attachment> elements) 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
-
setMessage
Initializes the value for themessageattribute.- Parameters:
message- The value for message- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackEventMessageReplied.- Returns:
- An immutable instance of SlackEventMessageReplied
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-