Class ImmutableForm.Builder

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

public static final class ImmutableForm.Builder extends Object
Builds instances of type ImmutableForm. 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 ImmutableForm.Builder from(Form instance)
      Fill a builder with attribute values from the provided io.camunda.zeebe.protocol.record.value.deployment.Form instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

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

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

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

      public final ImmutableForm.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
    • withVersionTag

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

      public final ImmutableForm.Builder withFormKey(long formKey)
      Initializes the value for the formKey attribute.
      Parameters:
      formKey - The value for formKey
      Returns:
      this builder for use in a chained invocation
    • withResourceName

      public final ImmutableForm.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 ImmutableForm.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 ImmutableForm.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
    • withDeploymentKey

      public final ImmutableForm.Builder withDeploymentKey(long deploymentKey)
      Initializes the value for the deploymentKey attribute.
      Parameters:
      deploymentKey - The value for deploymentKey
      Returns:
      this builder for use in a chained invocation
    • withResource

      public final ImmutableForm.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 ImmutableForm.Builder clear()
      Clear the builder to the initial state.
      Returns:
      this builder for use in a chained invocation
    • build

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