Class TopLevelMessageInteractionResponse.Builder
java.lang.Object
com.hubspot.slack.client.models.interaction.TopLevelMessageInteractionResponse.Builder
- Enclosing class:
TopLevelMessageInteractionResponse
@Generated(from="TopLevelMessageInteractionResponseIF",
generator="Immutables")
@NotThreadSafe
public static final class TopLevelMessageInteractionResponse.Builder
extends Object
Builds instances of type
TopLevelMessageInteractionResponse.
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 newTopLevelMessageInteractionResponse.from(TopLevelMessageInteractionResponseIF instance) Fill a builder with attribute values from the providedTopLevelMessageInteractionResponseIFinstance.setAttachments(Iterable<? extends Attachment> elements) Sets or replaces all elements forattachmentslist.Sets or replaces all elements forblockslist.setDeleteOriginal(boolean deleteOriginal) Initializes the value for thedeleteOriginalattribute.setReplaceOriginal(boolean replaceOriginal) Initializes the value for thereplaceOriginalattribute.setResponseType(TopLevelMessageResponseType responseType) Initializes the value for theresponseTypeattribute.Initializes the optional valuetextto text.Initializes the optional valuetextto text.
-
Method Details
-
from
public final TopLevelMessageInteractionResponse.Builder from(TopLevelMessageInteractionResponseIF instance) Fill a builder with attribute values from the providedTopLevelMessageInteractionResponseIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setResponseType
public final TopLevelMessageInteractionResponse.Builder setResponseType(TopLevelMessageResponseType responseType) Initializes the value for theresponseTypeattribute.- Parameters:
responseType- The value for responseType- Returns:
thisbuilder for use in a chained invocation
-
setReplaceOriginal
Initializes the value for thereplaceOriginalattribute.- Parameters:
replaceOriginal- The value for replaceOriginal- Returns:
thisbuilder for use in a chained invocation
-
setDeleteOriginal
Initializes the value for thedeleteOriginalattribute.If not set, this attribute will have a default value as returned by the initializer of
deleteOriginal.- Parameters:
deleteOriginal- The value for deleteOriginal- 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 TopLevelMessageInteractionResponse.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 TopLevelMessageInteractionResponse.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
public final TopLevelMessageInteractionResponse.Builder setBlocks(Iterable<? extends Block> elements) Sets or replaces all elements forblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBlocks
public final TopLevelMessageInteractionResponse.Builder addAllBlocks(Iterable<? extends Block> elements) Adds elements toblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newTopLevelMessageInteractionResponse.- Returns:
- An immutable instance of TopLevelMessageInteractionResponse
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-