Class ImmutableVariableRecordValue.Builder

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableVariableRecordValue.Builder
Enclosing class:
ImmutableVariableRecordValue

@NotThreadSafe public static final class ImmutableVariableRecordValue.Builder extends Object
Builds instances of type ImmutableVariableRecordValue. 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 Details

    • from

      Fill a builder with attribute values from the provided io.camunda.zeebe.protocol.record.value.ProcessInstanceRelated instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided io.camunda.zeebe.protocol.record.value.VariableRecordValue instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • withName

      public final ImmutableVariableRecordValue.Builder withName(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name (can be null)
      Returns:
      this builder for use in a chained invocation
    • withValue

      public final ImmutableVariableRecordValue.Builder withValue(String value)
      Initializes the value for the value attribute.
      Parameters:
      value - The value for value (can be null)
      Returns:
      this builder for use in a chained invocation
    • withScopeKey

      public final ImmutableVariableRecordValue.Builder withScopeKey(long scopeKey)
      Initializes the value for the scopeKey attribute.
      Parameters:
      scopeKey - The value for scopeKey
      Returns:
      this builder for use in a chained invocation
    • withProcessInstanceKey

      public final ImmutableVariableRecordValue.Builder withProcessInstanceKey(long processInstanceKey)
      Initializes the value for the processInstanceKey attribute.
      Parameters:
      processInstanceKey - The value for processInstanceKey
      Returns:
      this builder for use in a chained invocation
    • withProcessDefinitionKey

      public final ImmutableVariableRecordValue.Builder withProcessDefinitionKey(long processDefinitionKey)
      Initializes the value for the processDefinitionKey attribute.
      Parameters:
      processDefinitionKey - The value for processDefinitionKey
      Returns:
      this builder for use in a chained invocation
    • withBpmnProcessId

      public final ImmutableVariableRecordValue.Builder withBpmnProcessId(String bpmnProcessId)
      Initializes the value for the bpmnProcessId attribute.
      Parameters:
      bpmnProcessId - The value for bpmnProcessId (can be null)
      Returns:
      this builder for use in a chained invocation
    • clear

      Clear the builder to the initial state.
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of VariableRecordValue
      Throws:
      IllegalStateException - if any required attributes are missing