Record Class DoctorAdvisory
java.lang.Object
java.lang.Record
com.shaft.doctor.model.DoctorAdvisory
- Record Components:
schemaVersion- Doctor advisory envelope schema versionstatus- advisory outcomeanalysis- schema-validated provider analysismetadata- safe provider and fallback metadataconfidence- SHAFT-computed confidence score 0-100confidenceRationale- human-readable rationale for the confidence score
public record DoctorAdvisory(String schemaVersion, DoctorAdvisory.Status status, DoctorAdvisory.ProviderAnalysis analysis, DoctorAdvisory.Metadata metadata, int confidence, String confidenceRationale)
extends Record
Separately identified optional provider advisory that never replaces the deterministic diagnosis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne provider hypothesis.static final recordSafe provider, timing, usage, cache, and fallback metadata.static final recordOne provider observation.static final recordVersioned provider output accepted by Doctor.static final recordOne provider-recommended action.static enumAdvisory outcome. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDoctorAdvisory(String schemaVersion, DoctorAdvisory.Status status, DoctorAdvisory.ProviderAnalysis analysis, DoctorAdvisory.Metadata metadata, int confidence, String confidenceRationale) Creates a validated advisory. -
Method Summary
Modifier and TypeMethodDescriptionanalysis()Returns the value of theanalysisrecord component.intReturns the value of theconfidencerecord component.Returns the value of theconfidenceRationalerecord component.static DoctorAdvisorydisabled()Returns a disabled advisory that is not rendered into deterministic reports.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.Returns the value of theschemaVersionrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CURRENT_SCHEMA_VERSION
Current advisory envelope schema version.- See Also:
-
-
Constructor Details
-
DoctorAdvisory
public DoctorAdvisory(String schemaVersion, DoctorAdvisory.Status status, DoctorAdvisory.ProviderAnalysis analysis, DoctorAdvisory.Metadata metadata, int confidence, String confidenceRationale) Creates a validated advisory.
-
-
Method Details
-
disabled
Returns a disabled advisory that is not rendered into deterministic reports.- Returns:
- disabled advisory
-
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. -
schemaVersion
Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
status
-
analysis
-
metadata
-
confidence
public int confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
confidenceRationale
Returns the value of theconfidenceRationalerecord component.- Returns:
- the value of the
confidenceRationalerecord component
-