Class ImmutableProcessInstanceRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceRecordValue.Builder
- Enclosing class:
ImmutableProcessInstanceRecordValue
Builds instances of type
ImmutableProcessInstanceRecordValue.
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 newImmutableProcessInstanceRecordValue.clear()Clear the builder to the initial state.from(ProcessInstanceRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRecordValueinstance.from(ProcessInstanceRelated instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRelatedinstance.from(TenantOwned instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.TenantOwnedinstance.withBpmnElementType(BpmnElementType bpmnElementType) Initializes the value for thebpmnElementTypeattribute.withBpmnEventType(BpmnEventType bpmnEventType) Initializes the value for thebpmnEventTypeattribute.withBpmnProcessId(String bpmnProcessId) Initializes the value for thebpmnProcessIdattribute.withElementId(String elementId) Initializes the value for theelementIdattribute.withFlowScopeKey(long flowScopeKey) Initializes the value for theflowScopeKeyattribute.withParentElementInstanceKey(long parentElementInstanceKey) Initializes the value for theparentElementInstanceKeyattribute.withParentProcessInstanceKey(long parentProcessInstanceKey) Initializes the value for theparentProcessInstanceKeyattribute.withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withTenantId(String tenantId) Initializes the value for thetenantIdattribute.withVersion(int version) Initializes the value for theversionattribute.
-
Method Details
-
from
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
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRecordValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.TenantOwnedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withTenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withBpmnProcessId
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 ImmutableProcessInstanceRecordValue.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 ImmutableProcessInstanceRecordValue.Builder withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withElementId
Initializes the value for theelementIdattribute.- Parameters:
elementId- The value for elementId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withFlowScopeKey
Initializes the value for theflowScopeKeyattribute.- Parameters:
flowScopeKey- The value for flowScopeKey- Returns:
thisbuilder for use in a chained invocation
-
withBpmnElementType
public final ImmutableProcessInstanceRecordValue.Builder withBpmnElementType(BpmnElementType bpmnElementType) Initializes the value for thebpmnElementTypeattribute.- Parameters:
bpmnElementType- The value for bpmnElementType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withParentProcessInstanceKey
public final ImmutableProcessInstanceRecordValue.Builder withParentProcessInstanceKey(long parentProcessInstanceKey) Initializes the value for theparentProcessInstanceKeyattribute.- Parameters:
parentProcessInstanceKey- The value for parentProcessInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withParentElementInstanceKey
public final ImmutableProcessInstanceRecordValue.Builder withParentElementInstanceKey(long parentElementInstanceKey) Initializes the value for theparentElementInstanceKeyattribute.- Parameters:
parentElementInstanceKey- The value for parentElementInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withBpmnEventType
public final ImmutableProcessInstanceRecordValue.Builder withBpmnEventType(BpmnEventType bpmnEventType) Initializes the value for thebpmnEventTypeattribute.- Parameters:
bpmnEventType- The value for bpmnEventType (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
Builds a newImmutableProcessInstanceRecordValue.- Returns:
- An immutable instance of ProcessInstanceRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-