Record Class ProvenanceDetails

java.lang.Object
java.lang.Record
ai.doctruth.ProvenanceDetails
Record Components:
region - cloud / data-residency region the extraction was processed in.
retainUntil - UTC timestamp after which this audit record may be destroyed.
retries - number of retries before success; 0 means first attempt.

public record ProvenanceDetails(Optional<String> region, Optional<Instant> retainUntil, int retries) extends Record
Supplemental provenance metadata kept behind Provenance so the public provenance record stays small while preserving retry, data-residency, and retention semantics.
Since:
0.1.0
  • Constructor Details

    • ProvenanceDetails

      public ProvenanceDetails(Optional<String> region, Optional<Instant> retainUntil, int retries)
      Creates an instance of a ProvenanceDetails record class.
      Parameters:
      region - the value for the region record component
      retainUntil - the value for the retainUntil record component
      retries - the value for the retries record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • region

      public Optional<String> region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • retainUntil

      public Optional<Instant> retainUntil()
      Returns the value of the retainUntil record component.
      Returns:
      the value of the retainUntil record component
    • retries

      public int retries()
      Returns the value of the retries record component.
      Returns:
      the value of the retries record component