Class ImmutableDeploymentRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableDeploymentRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, DeploymentRecordValue

@ParametersAreNonnullByDefault @Immutable public final class ImmutableDeploymentRecordValue extends Object implements DeploymentRecordValue
Immutable implementation of DeploymentRecordValue.

Use the builder to create immutable instances: ImmutableDeploymentRecordValue.builder().

  • Method Details

    • getResources

      public List<DeploymentResource> getResources()
      Specified by:
      getResources in interface DeploymentRecordValue
      Returns:
      the resources to deploy
    • getProcessesMetadata

      public List<ProcessMetadataValue> getProcessesMetadata()
      Specified by:
      getProcessesMetadata in interface DeploymentRecordValue
      Returns:
      the deployed processes
    • getDecisionsMetadata

      public List<DecisionRecordValue> getDecisionsMetadata()
      Specified by:
      getDecisionsMetadata in interface DeploymentRecordValue
      Returns:
      the deployed decisions
    • getDecisionRequirementsMetadata

      public List<DecisionRequirementsMetadataValue> getDecisionRequirementsMetadata()
      Specified by:
      getDecisionRequirementsMetadata in interface DeploymentRecordValue
      Returns:
      the deployed decision requirements (DRGs)
    • withResources

      public final ImmutableDeploymentRecordValue withResources(DeploymentResource... elements)
      Copy the current immutable object with elements that replace the content of resources.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withResources

      public final ImmutableDeploymentRecordValue withResources(Iterable<? extends DeploymentResource> elements)
      Copy the current immutable object with elements that replace the content of resources. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of resources elements to set
      Returns:
      A modified copy of this object
    • withProcessesMetadata

      public final ImmutableDeploymentRecordValue withProcessesMetadata(ProcessMetadataValue... elements)
      Copy the current immutable object with elements that replace the content of processesMetadata.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withProcessesMetadata

      public final ImmutableDeploymentRecordValue withProcessesMetadata(Iterable<? extends ProcessMetadataValue> elements)
      Copy the current immutable object with elements that replace the content of processesMetadata. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of processesMetadata elements to set
      Returns:
      A modified copy of this object
    • withDecisionsMetadata

      public final ImmutableDeploymentRecordValue withDecisionsMetadata(DecisionRecordValue... elements)
      Copy the current immutable object with elements that replace the content of decisionsMetadata.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDecisionsMetadata

      public final ImmutableDeploymentRecordValue withDecisionsMetadata(Iterable<? extends DecisionRecordValue> elements)
      Copy the current immutable object with elements that replace the content of decisionsMetadata. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of decisionsMetadata elements to set
      Returns:
      A modified copy of this object
    • withDecisionRequirementsMetadata

      public final ImmutableDeploymentRecordValue withDecisionRequirementsMetadata(DecisionRequirementsMetadataValue... elements)
      Copy the current immutable object with elements that replace the content of decisionRequirementsMetadata.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDecisionRequirementsMetadata

      public final ImmutableDeploymentRecordValue withDecisionRequirementsMetadata(Iterable<? extends DecisionRequirementsMetadataValue> elements)
      Copy the current immutable object with elements that replace the content of decisionRequirementsMetadata. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of decisionRequirementsMetadata elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDeploymentRecordValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a lazily computed hash code from attributes: resources, processesMetadata, decisionsMetadata, decisionRequirementsMetadata.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DeploymentRecordValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableDeploymentRecordValue copyOf(DeploymentRecordValue instance)
      Creates an immutable copy of a DeploymentRecordValue value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable DeploymentRecordValue instance
    • builder

      public static ImmutableDeploymentRecordValue.Builder builder()
      Creates a builder for ImmutableDeploymentRecordValue.
       ImmutableDeploymentRecordValue.builder()
          .addResource|addAllResources(io.camunda.zeebe.protocol.record.value.deployment.DeploymentResource) // resources elements
          .addProcessesMetadata|addAllProcessesMetadata(io.camunda.zeebe.protocol.record.value.deployment.ProcessMetadataValue) // processesMetadata elements
          .addDecisionsMetadata|addAllDecisionsMetadata(io.camunda.zeebe.protocol.record.value.deployment.DecisionRecordValue) // decisionsMetadata elements
          .addDecisionRequirementsMetadata|addAllDecisionRequirementsMetadata(io.camunda.zeebe.protocol.record.value.deployment.DecisionRequirementsMetadataValue) // decisionRequirementsMetadata elements
          .build();
       
      Returns:
      A new ImmutableDeploymentRecordValue builder