Class ImmutableProcess.Builder

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

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

      public final ImmutableProcess.Builder from(Process instance)
      Fill a builder with attribute values from the provided io.camunda.zeebe.protocol.record.value.deployment.Process instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableProcess.Builder from(ProcessMetadataValue instance)
      Fill a builder with attribute values from the provided io.camunda.zeebe.protocol.record.value.deployment.ProcessMetadataValue instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • withBpmnProcessId

      public final ImmutableProcess.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 ImmutableProcess.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 ImmutableProcess.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 ImmutableProcess.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 ImmutableProcess.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 ImmutableProcess.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
    • withResource

      public final ImmutableProcess.Builder withResource(byte... resource)
      Initializes the value for the resource attribute.
      Parameters:
      resource - The elements for resource
      Returns:
      this builder for use in a chained invocation
    • clear

      public ImmutableProcess.Builder clear()
      Clear the builder to the initial state.
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableProcess build()
      Builds a new ImmutableProcess.
      Returns:
      An immutable instance of Process
      Throws:
      IllegalStateException - if any required attributes are missing