Class ImmutableCompensationSubscriptionRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableCompensationSubscriptionRecordValue.Builder
- Enclosing class:
ImmutableCompensationSubscriptionRecordValue
Builds instances of type
ImmutableCompensationSubscriptionRecordValue.
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 newImmutableCompensationSubscriptionRecordValue.clear()Clear the builder to the initial state.from(CompensationSubscriptionRecordValue instance) Fill a builder with attribute values from the providedCompensationSubscriptionRecordValueinstance.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.withCompensableActivityId(String compensableActivityId) Initializes the value for thecompensableActivityIdattribute.withCompensableActivityInstanceKey(long compensableActivityInstanceKey) Initializes the value for thecompensableActivityInstanceKeyattribute.withCompensableActivityScopeKey(long compensableActivityScopeKey) Initializes the value for thecompensableActivityScopeKeyattribute.withCompensationHandlerId(String compensationHandlerId) Initializes the value for thecompensationHandlerIdattribute.withCompensationHandlerInstanceKey(long compensationHandlerInstanceKey) Initializes the value for thecompensationHandlerInstanceKeyattribute.withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withTenantId(String tenantId) Initializes the value for thetenantIdattribute.withThrowEventId(String throwEventId) Initializes the value for thethrowEventIdattribute.withThrowEventInstanceKey(long throwEventInstanceKey) Initializes the value for thethrowEventInstanceKeyattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.
-
Method Details
-
from
public final ImmutableCompensationSubscriptionRecordValue.Builder from(CompensationSubscriptionRecordValue instance) Fill a builder with attribute values from the providedCompensationSubscriptionRecordValueinstance. 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
-
withTenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withProcessInstanceKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withProcessDefinitionKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.- Parameters:
processDefinitionKey- The value for processDefinitionKey- Returns:
thisbuilder for use in a chained invocation
-
withCompensableActivityId
public final ImmutableCompensationSubscriptionRecordValue.Builder withCompensableActivityId(String compensableActivityId) Initializes the value for thecompensableActivityIdattribute.- Parameters:
compensableActivityId- The value for compensableActivityId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withThrowEventId
public final ImmutableCompensationSubscriptionRecordValue.Builder withThrowEventId(String throwEventId) Initializes the value for thethrowEventIdattribute.- Parameters:
throwEventId- The value for throwEventId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withThrowEventInstanceKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withThrowEventInstanceKey(long throwEventInstanceKey) Initializes the value for thethrowEventInstanceKeyattribute.- Parameters:
throwEventInstanceKey- The value for throwEventInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withCompensationHandlerId
public final ImmutableCompensationSubscriptionRecordValue.Builder withCompensationHandlerId(String compensationHandlerId) Initializes the value for thecompensationHandlerIdattribute.- Parameters:
compensationHandlerId- The value for compensationHandlerId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withCompensationHandlerInstanceKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withCompensationHandlerInstanceKey(long compensationHandlerInstanceKey) Initializes the value for thecompensationHandlerInstanceKeyattribute.- Parameters:
compensationHandlerInstanceKey- The value for compensationHandlerInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withCompensableActivityScopeKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withCompensableActivityScopeKey(long compensableActivityScopeKey) Initializes the value for thecompensableActivityScopeKeyattribute.- Parameters:
compensableActivityScopeKey- The value for compensableActivityScopeKey- Returns:
thisbuilder for use in a chained invocation
-
withCompensableActivityInstanceKey
public final ImmutableCompensationSubscriptionRecordValue.Builder withCompensableActivityInstanceKey(long compensableActivityInstanceKey) Initializes the value for thecompensableActivityInstanceKeyattribute.- Parameters:
compensableActivityInstanceKey- The value for compensableActivityInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
putVariable
public final ImmutableCompensationSubscriptionRecordValue.Builder putVariable(String key, 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 ImmutableCompensationSubscriptionRecordValue.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 ImmutableCompensationSubscriptionRecordValue.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 ImmutableCompensationSubscriptionRecordValue.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
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCompensationSubscriptionRecordValue.- Returns:
- An immutable instance of CompensationSubscriptionRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-