Class SlackEventMessageChanged.Builder
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageChanged.Builder
- Enclosing class:
SlackEventMessageChanged
@Generated(from="AbstractSlackEventMessageChanged",
generator="Immutables")
@NotThreadSafe
public static final class SlackEventMessageChanged.Builder
extends Object
Builds instances of type
SlackEventMessageChanged.
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 newSlackEventMessageChanged.from(HasChannel instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.methods.interceptor.HasChannelinstance.from(AbstractSlackEventMessageChanged instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.events.AbstractSlackEventMessageChangedinstance.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.setEventTs(String eventTs) Initializes the value for theeventTsattribute.setHidden(boolean hidden) Initializes the value for thehiddenattribute.setMessage(LiteMessage message) Initializes the value for themessageattribute.setPreviousMessage(LiteMessage previousMessage) Initializes the optional valuepreviousMessageto previousMessage.setPreviousMessage(Optional<? extends LiteMessage> previousMessage) Initializes the optional valuepreviousMessageto previousMessage.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.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.AbstractSlackEventMessageChangedinstance.- 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 SlackEventMessageChanged.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 SlackEventMessageChanged.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 SlackEventMessageChanged.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
-
setHidden
Initializes the value for thehiddenattribute.- Parameters:
hidden- The value for hidden- 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
-
setPreviousMessage
public final SlackEventMessageChanged.Builder setPreviousMessage(@Nullable LiteMessage previousMessage) Initializes the optional valuepreviousMessageto previousMessage.- Parameters:
previousMessage- The value for previousMessage,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setPreviousMessage
public final SlackEventMessageChanged.Builder setPreviousMessage(Optional<? extends LiteMessage> previousMessage) Initializes the optional valuepreviousMessageto previousMessage.- Parameters:
previousMessage- The value for previousMessage- Returns:
thisbuilder for use in a chained invocation
-
setEventTs
Initializes the value for theeventTsattribute.- Parameters:
eventTs- The value for eventTs- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackEventMessageChanged.- Returns:
- An immutable instance of SlackEventMessageChanged
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-