@NotThreadSafe public static final class ViewResponseAction.Builder extends Object
ViewResponseAction.
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.
| Modifier and Type | Method and Description |
|---|---|
ViewResponseAction |
build()
Builds a new
ViewResponseAction. |
ViewResponseAction.Builder |
from(ViewResponseActionIF instance)
Fill a builder with attribute values from the provided
ViewResponseActionIF instance. |
ViewResponseAction.Builder |
putAllErrors(Map<String,? extends String> errors)
Put all mappings from the specified map as entries to
errors map. |
ViewResponseAction.Builder |
putErrors(Map.Entry<String,? extends String> entry)
Put one entry to the
errors map. |
ViewResponseAction.Builder |
putErrors(String key,
String value)
Put one entry to the
errors map. |
ViewResponseAction.Builder |
setErrors(Map<String,? extends String> errors)
Sets or replaces all mappings from the specified map as entries for the
errors map. |
ViewResponseAction.Builder |
setResponseAction(String responseAction)
Initializes the value for the
responseAction attribute. |
ViewResponseAction.Builder |
setView(ModalViewPayload view)
Initializes the optional value
view to view. |
ViewResponseAction.Builder |
setView(Optional<ModalViewPayload> view)
Initializes the optional value
view to view. |
public final ViewResponseAction.Builder from(ViewResponseActionIF instance)
ViewResponseActionIF 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 ViewResponseAction.Builder setResponseAction(String responseAction)
responseAction attribute.responseAction - The value for responseActionthis builder for use in a chained invocationpublic final ViewResponseAction.Builder setView(@Nullable ModalViewPayload view)
view to view.view - The value for view, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ViewResponseAction.Builder setView(Optional<ModalViewPayload> view)
view to view.view - The value for viewthis builder for use in a chained invocationpublic final ViewResponseAction.Builder putErrors(String key, String value)
errors map.key - The key in the errors mapvalue - The associated value in the errors mapthis builder for use in a chained invocationpublic final ViewResponseAction.Builder putErrors(Map.Entry<String,? extends String> entry)
errors map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ViewResponseAction.Builder setErrors(Map<String,? extends String> errors)
errors map. Nulls are not permittederrors - The entries that will be added to the errors mapthis builder for use in a chained invocationpublic final ViewResponseAction.Builder putAllErrors(Map<String,? extends String> errors)
errors map. Nulls are not permittederrors - The entries that will be added to the errors mapthis builder for use in a chained invocationpublic ViewResponseAction build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
ViewResponseAction.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2020. All rights reserved.