Class ViewResponseAction.Builder
java.lang.Object
com.hubspot.slack.client.models.interaction.ViewResponseAction.Builder
- Enclosing class:
ViewResponseAction
@Generated(from="ViewResponseActionIF",
generator="Immutables")
@NotThreadSafe
public static final class ViewResponseAction.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newViewResponseAction.from(ViewResponseActionIF instance) Fill a builder with attribute values from the providedViewResponseActionIFinstance.putAllErrors(Map<String, ? extends String> entries) Put all mappings from the specified map as entries toerrorsmap.Put one entry to theerrorsmap.Put one entry to theerrorsmap.Sets or replaces all mappings from the specified map as entries for theerrorsmap.setResponseAction(String responseAction) Initializes the value for theresponseActionattribute.setView(ModalViewPayload view) Initializes the optional valueviewto view.setView(Optional<? extends ModalViewPayload> view) Initializes the optional valueviewto view.
-
Method Details
-
from
Fill a builder with attribute values from the providedViewResponseActionIFinstance. 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
-
setResponseAction
Initializes the value for theresponseActionattribute.- Parameters:
responseAction- The value for responseAction- Returns:
thisbuilder for use in a chained invocation
-
setView
Initializes the optional valueviewto view.- Parameters:
view- The value for view,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setView
Initializes the optional valueviewto view.- Parameters:
view- The value for view- Returns:
thisbuilder for use in a chained invocation
-
putErrors
Put one entry to theerrorsmap.- Parameters:
key- The key in the errors mapvalue- The associated value in the errors map- Returns:
thisbuilder for use in a chained invocation
-
putErrors
Put one entry to theerrorsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
setErrors
Sets or replaces all mappings from the specified map as entries for theerrorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the errors map- Returns:
thisbuilder for use in a chained invocation
-
putAllErrors
Put all mappings from the specified map as entries toerrorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the errors map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newViewResponseAction.- Returns:
- An immutable instance of ViewResponseAction
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-