Record Class DoctorAdvisory.Metadata
java.lang.Object
java.lang.Record
com.shaft.doctor.model.DoctorAdvisory.Metadata
- Record Components:
providerStatus- normalized provider outcomeprovider- provider identifiermodel- model identifierconfigurationIdentifier- non-secret configuration checksumdurationMillis- elapsed provider durationusage- provider-reported usagefallbackReason- safe fallback reasoncacheHit- whether the advisory came from the explicit safe cachewarnings- safe validation warnings
- Enclosing class:
DoctorAdvisory
public static record DoctorAdvisory.Metadata(com.shaft.pilot.ai.AiResponseStatus providerStatus, String provider, String model, String configurationIdentifier, long durationMillis, com.shaft.pilot.ai.AiUsage usage, String fallbackReason, boolean cacheHit, List<String> warnings)
extends Record
Safe provider, timing, usage, cache, and fallback metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a cache-hit copy.booleancacheHit()Returns the value of thecacheHitrecord component.Returns the value of theconfigurationIdentifierrecord component.longReturns the value of thedurationMillisrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbackReasonrecord component.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.provider()Returns the value of theproviderrecord component.com.shaft.pilot.ai.AiResponseStatusReturns the value of theproviderStatusrecord component.final StringtoString()Returns a string representation of this record class.com.shaft.pilot.ai.AiUsageusage()Returns the value of theusagerecord component.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
Metadata
-
-
Method Details
-
asCacheHit
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
providerStatus
public com.shaft.pilot.ai.AiResponseStatus providerStatus()Returns the value of theproviderStatusrecord component.- Returns:
- the value of the
providerStatusrecord component
-
provider
-
model
-
configurationIdentifier
Returns the value of theconfigurationIdentifierrecord component.- Returns:
- the value of the
configurationIdentifierrecord component
-
durationMillis
public long durationMillis()Returns the value of thedurationMillisrecord component.- Returns:
- the value of the
durationMillisrecord component
-
usage
-
fallbackReason
Returns the value of thefallbackReasonrecord component.- Returns:
- the value of the
fallbackReasonrecord component
-
cacheHit
-
warnings
-