Class ImmutableProcessMetadataValue.Builder

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

@NotThreadSafe public static final class ImmutableProcessMetadataValue.Builder extends Object
Builds instances of type ImmutableProcessMetadataValue. 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 ProcessMetadataValue instance. 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:
      this builder for use in a chained invocation
    • withBpmnProcessId

      public final ImmutableProcessMetadataValue.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
    • withVersion

      public final ImmutableProcessMetadataValue.Builder withVersion(int version)
      Initializes the value for the version attribute.
      Parameters:
      version - The value for version
      Returns:
      this builder for use in a chained invocation
    • withProcessDefinitionKey

      public final ImmutableProcessMetadataValue.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
    • withResourceName

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

      public final ImmutableProcessMetadataValue.Builder withChecksum(byte... checksum)
      Initializes the value for the checksum attribute.
      Parameters:
      checksum - The elements for checksum
      Returns:
      this builder for use in a chained invocation
    • withDuplicate

      public final ImmutableProcessMetadataValue.Builder withDuplicate(boolean duplicate)
      Initializes the value for the duplicate attribute.
      Parameters:
      duplicate - The value for duplicate
      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 ProcessMetadataValue
      Throws:
      IllegalStateException - if any required attributes are missing