Class ImmutableDecisionRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableDecisionRecordValue.Builder
- Enclosing class:
- ImmutableDecisionRecordValue
Builds instances of type
ImmutableDecisionRecordValue.
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 newImmutableDecisionRecordValue.clear()Clear the builder to the initial state.from(DecisionRecordValue instance) Fill a builder with attribute values from the providedDecisionRecordValueinstance.withDecisionId(String decisionId) Initializes the value for thedecisionIdattribute.withDecisionKey(long decisionKey) Initializes the value for thedecisionKeyattribute.withDecisionName(String decisionName) Initializes the value for thedecisionNameattribute.withDecisionRequirementsId(String decisionRequirementsId) Initializes the value for thedecisionRequirementsIdattribute.withDecisionRequirementsKey(long decisionRequirementsKey) Initializes the value for thedecisionRequirementsKeyattribute.withDuplicate(boolean duplicate) Initializes the value for theduplicateattribute.withVersion(int version) Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedDecisionRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withDecisionId
Initializes the value for thedecisionIdattribute.- Parameters:
decisionId- The value for decisionId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withDecisionName
Initializes the value for thedecisionNameattribute.- Parameters:
decisionName- The value for decisionName (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
-
withDecisionKey
Initializes the value for thedecisionKeyattribute.- Parameters:
decisionKey- The value for decisionKey- Returns:
thisbuilder for use in a chained invocation
-
withDecisionRequirementsId
public final ImmutableDecisionRecordValue.Builder withDecisionRequirementsId(String decisionRequirementsId) Initializes the value for thedecisionRequirementsIdattribute.- Parameters:
decisionRequirementsId- The value for decisionRequirementsId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withDecisionRequirementsKey
public final ImmutableDecisionRecordValue.Builder withDecisionRequirementsKey(long decisionRequirementsKey) Initializes the value for thedecisionRequirementsKeyattribute.- Parameters:
decisionRequirementsKey- The value for decisionRequirementsKey- Returns:
thisbuilder for use in a chained invocation
-
withDuplicate
Initializes the value for theduplicateattribute.- Parameters:
duplicate- The value for duplicate- 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 newImmutableDecisionRecordValue.- Returns:
- An immutable instance of DecisionRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-