Class ImmutableProcessInstanceResultRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceResultRecordValue.Builder
- Enclosing class:
- ImmutableProcessInstanceResultRecordValue
@NotThreadSafe
public static final class ImmutableProcessInstanceResultRecordValue.Builder
extends Object
Builds instances of type
ImmutableProcessInstanceResultRecordValue.
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 newImmutableProcessInstanceResultRecordValue.clear()Clear the builder to the initial state.from(RecordValueWithVariables instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.RecordValueWithVariablesinstance.from(ProcessInstanceRelated instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRelatedinstance.from(ProcessInstanceResultRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceResultRecordValueinstance.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.withBpmnProcessId(String bpmnProcessId) Initializes the value for thebpmnProcessIdattribute.withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.withVersion(int version) Initializes the value for theversionattribute.
-
Method Details
-
from
public final ImmutableProcessInstanceResultRecordValue.Builder from(ProcessInstanceRelated instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRelatedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableProcessInstanceResultRecordValue.Builder from(ProcessInstanceResultRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceResultRecordValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableProcessInstanceResultRecordValue.Builder from(RecordValueWithVariables instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.RecordValueWithVariablesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putVariable
public final ImmutableProcessInstanceResultRecordValue.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 ImmutableProcessInstanceResultRecordValue.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 ImmutableProcessInstanceResultRecordValue.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 ImmutableProcessInstanceResultRecordValue.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
-
withBpmnProcessId
public final ImmutableProcessInstanceResultRecordValue.Builder withBpmnProcessId(String bpmnProcessId) Initializes the value for thebpmnProcessIdattribute.- Parameters:
bpmnProcessId- The value for bpmnProcessId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
withProcessDefinitionKey
public final ImmutableProcessInstanceResultRecordValue.Builder withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.- Parameters:
processDefinitionKey- The value for processDefinitionKey- Returns:
thisbuilder for use in a chained invocation
-
withProcessInstanceKey
public final ImmutableProcessInstanceResultRecordValue.Builder withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- 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
Builds a newImmutableProcessInstanceResultRecordValue.- Returns:
- An immutable instance of ProcessInstanceResultRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-