@NotThreadSafe public static final class TopLevelMessageInteractionResponse.Builder extends Object
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.
public final TopLevelMessageInteractionResponse.Builder from(TopLevelMessageInteractionResponseIF instance)
TopLevelMessageInteractionResponseIF instance.
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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder setResponseType(TopLevelMessageResponseType responseType)
responseType attribute.responseType - The value for responseTypethis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder setReplaceOriginal(boolean replaceOriginal)
replaceOriginal attribute.replaceOriginal - The value for replaceOriginalthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder setDeleteOriginal(boolean deleteOriginal)
deleteOriginal attribute.
If not set, this attribute will have a default value as returned by the initializer of deleteOriginal.
deleteOriginal - The value for deleteOriginalthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder setText(@Nullable String text)
text to text.text - The value for text, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final TopLevelMessageInteractionResponse.Builder setText(Optional<String> text)
text to text.text - The value for textthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder addAttachments(Attachment element)
attachments list.element - A attachments elementthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder addAttachments(Attachment... elements)
attachments list.elements - An array of attachments elementsthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder setAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final TopLevelMessageInteractionResponse.Builder addAllAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic TopLevelMessageInteractionResponse build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
TopLevelMessageInteractionResponse.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.