Class ImmutableIncidentRecordValue.Builder

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

@NotThreadSafe public static final class ImmutableIncidentRecordValue.Builder extends Object
Builds instances of type ImmutableIncidentRecordValue. 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.IncidentRecordValue instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • withErrorType

      public final ImmutableIncidentRecordValue.Builder withErrorType(ErrorType errorType)
      Initializes the value for the errorType attribute.
      Parameters:
      errorType - The value for errorType (can be null)
      Returns:
      this builder for use in a chained invocation
    • withErrorMessage

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

      public final ImmutableIncidentRecordValue.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
    • withProcessDefinitionKey

      public final ImmutableIncidentRecordValue.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
    • withProcessInstanceKey

      public final ImmutableIncidentRecordValue.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
    • withElementId

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

      public final ImmutableIncidentRecordValue.Builder withElementInstanceKey(long elementInstanceKey)
      Initializes the value for the elementInstanceKey attribute.
      Parameters:
      elementInstanceKey - The value for elementInstanceKey
      Returns:
      this builder for use in a chained invocation
    • withJobKey

      public final ImmutableIncidentRecordValue.Builder withJobKey(long jobKey)
      Initializes the value for the jobKey attribute.
      Parameters:
      jobKey - The value for jobKey
      Returns:
      this builder for use in a chained invocation
    • withVariableScopeKey

      public final ImmutableIncidentRecordValue.Builder withVariableScopeKey(long variableScopeKey)
      Initializes the value for the variableScopeKey attribute.
      Parameters:
      variableScopeKey - The value for variableScopeKey
      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 IncidentRecordValue
      Throws:
      IllegalStateException - if any required attributes are missing