Class ImmutableProcessInstanceModificationVariableInstructionValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceModificationVariableInstructionValue.Builder
- Enclosing class:
- ImmutableProcessInstanceModificationVariableInstructionValue
@NotThreadSafe
public static final class ImmutableProcessInstanceModificationVariableInstructionValue.Builder
extends Object
Builds instances of type
ImmutableProcessInstanceModificationVariableInstructionValue.
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()clear()Clear the builder to the initial state.from(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue instance) Fill a builder with attribute values from the providedProcessInstanceModificationVariableInstructionValueinstance.putAllVariables(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tovariablesmap.putVariable(String key, Object value) Put one entry to thevariablesmap.putVariable(Map.Entry<String, ? extends Object> entry) Put one entry to thevariablesmap.withElementId(String elementId) Initializes the value for theelementIdattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.
-
Method Details
-
from
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder from(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue instance) Fill a builder with attribute values from the providedProcessInstanceModificationVariableInstructionValueinstance. 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
-
putVariable
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder putVariable(@Nullable String key, @Nullable Object value) Put one entry to thevariablesmap.- Parameters:
key- The key in the variables mapvalue- The associated value in the variables map- Returns:
thisbuilder for use in a chained invocation
-
putVariable
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder putVariable(Map.Entry<String, ? extends Object> entry) Put one entry to thevariablesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
withVariables
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the variables map- Returns:
thisbuilder for use in a chained invocation
-
putAllVariables
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder putAllVariables(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tovariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the variables map- Returns:
thisbuilder for use in a chained invocation
-
withElementId
public final ImmutableProcessInstanceModificationVariableInstructionValue.Builder withElementId(String elementId) Initializes the value for theelementIdattribute.- Parameters:
elementId- The value for elementId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
- Returns:
- An immutable instance of ProcessInstanceModificationVariableInstructionValue
- Throws:
IllegalStateException- if any required attributes are missing
-