Class ImmutableVariableDocumentRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableVariableDocumentRecordValue.Builder
- Enclosing class:
ImmutableVariableDocumentRecordValue
Builds instances of type
ImmutableVariableDocumentRecordValue.
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 newImmutableVariableDocumentRecordValue.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(TenantOwned instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.TenantOwnedinstance.from(VariableDocumentRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.VariableDocumentRecordValueinstance.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.withScopeKey(long scopeKey) Initializes the value for thescopeKeyattribute.withTenantId(String tenantId) Initializes the value for thetenantIdattribute.withUpdateSemantics(VariableDocumentUpdateSemantic updateSemantics) Initializes the value for theupdateSemanticsattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.
-
Method Details
-
from
public final ImmutableVariableDocumentRecordValue.Builder from(VariableDocumentRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.VariableDocumentRecordValueinstance.- 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
-
from
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
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 ImmutableVariableDocumentRecordValue.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 ImmutableVariableDocumentRecordValue.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 ImmutableVariableDocumentRecordValue.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
-
withTenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withScopeKey
Initializes the value for thescopeKeyattribute.- Parameters:
scopeKey- The value for scopeKey- Returns:
thisbuilder for use in a chained invocation
-
withUpdateSemantics
public final ImmutableVariableDocumentRecordValue.Builder withUpdateSemantics(VariableDocumentUpdateSemantic updateSemantics) Initializes the value for theupdateSemanticsattribute.- Parameters:
updateSemantics- The value for updateSemantics (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 newImmutableVariableDocumentRecordValue.- Returns:
- An immutable instance of VariableDocumentRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-