Record Class ResponseCoverageRecord
java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.doppelganger.progress.ResponseCoverageRecord
- Record Components:
fingerprint- the stable identifier for this endpoint + response code pairverb- the endpoint's current HTTP verb; not part of the key, refreshed on every run that observes this endpointpath- the endpoint's current path template; not part of the key, refreshed on every run that observes this endpointresponseCode- the response code this record tracks, e.g."200","404"testCount- the number of contract tests detected to cover this response code as of the most recent run that observed itfirstDeclaredAt- when this response code was first observed declared in the OpenAPI documentation, ornullif it never has beenfirstCoveredAt- when this response code was first observed covered by at least one contract test (testCount > 0), ornullif it never has beenlastSeenAt- when this response code was last present in a run that could see it, ornullfor a record that has never actually been seenremovedAt- when this response code was first observed missing from the endpoint's declared response codes, ornullwhile it's still declared
public record ResponseCoverageRecord(String fingerprint, com.arc_e_tect.gradle.detector.core.model.HttpVerb verb, String path, String responseCode, int testCount, Instant firstDeclaredAt, Instant firstCoveredAt, Instant lastSeenAt, Instant removedAt)
extends Record
Persisted, per-endpoint-and-response-code history of contract test coverage, keyed by
<endpoint fingerprint>-<response code> (see ResponseCoverageHistoryUpdater).
Deliberately separate from api-detector-core's cross-plugin
ContractProgressRecord: response coverage is a Doppelganger-only concern with a different
shape - testCount() is a live gauge refreshed every run, not a milestone timestamp
stamped once.
-
Constructor Summary
ConstructorsConstructorDescriptionResponseCoverageRecord(String fingerprint, com.arc_e_tect.gradle.detector.core.model.HttpVerb verb, String path, String responseCode, int testCount, Instant firstDeclaredAt, Instant firstCoveredAt, Instant lastSeenAt, Instant removedAt) Creates an instance of aResponseCoverageRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefingerprintrecord component.Returns the value of thefirstCoveredAtrecord component.Returns the value of thefirstDeclaredAtrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelastSeenAtrecord component.path()Returns the value of thepathrecord component.Returns the value of theremovedAtrecord component.Returns the value of theresponseCoderecord component.intReturns the value of thetestCountrecord component.final StringtoString()Returns a string representation of this record class.com.arc_e_tect.gradle.detector.core.model.HttpVerbverb()Returns the value of theverbrecord component.
-
Constructor Details
-
ResponseCoverageRecord
public ResponseCoverageRecord(String fingerprint, com.arc_e_tect.gradle.detector.core.model.HttpVerb verb, String path, String responseCode, int testCount, Instant firstDeclaredAt, Instant firstCoveredAt, Instant lastSeenAt, Instant removedAt) Creates an instance of aResponseCoverageRecordrecord class.- Parameters:
fingerprint- the value for thefingerprintrecord componentverb- the value for theverbrecord componentpath- the value for thepathrecord componentresponseCode- the value for theresponseCoderecord componenttestCount- the value for thetestCountrecord componentfirstDeclaredAt- the value for thefirstDeclaredAtrecord componentfirstCoveredAt- the value for thefirstCoveredAtrecord componentlastSeenAt- the value for thelastSeenAtrecord componentremovedAt- the value for theremovedAtrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
fingerprint
Returns the value of thefingerprintrecord component.- Returns:
- the value of the
fingerprintrecord component
-
verb
public com.arc_e_tect.gradle.detector.core.model.HttpVerb verb()Returns the value of theverbrecord component.- Returns:
- the value of the
verbrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
responseCode
Returns the value of theresponseCoderecord component.- Returns:
- the value of the
responseCoderecord component
-
testCount
public int testCount()Returns the value of thetestCountrecord component.- Returns:
- the value of the
testCountrecord component
-
firstDeclaredAt
Returns the value of thefirstDeclaredAtrecord component.- Returns:
- the value of the
firstDeclaredAtrecord component
-
firstCoveredAt
Returns the value of thefirstCoveredAtrecord component.- Returns:
- the value of the
firstCoveredAtrecord component
-
lastSeenAt
Returns the value of thelastSeenAtrecord component.- Returns:
- the value of the
lastSeenAtrecord component
-
removedAt
Returns the value of theremovedAtrecord component.- Returns:
- the value of the
removedAtrecord component
-