Record Class DoctorAiAnalysisRequest
java.lang.Object
java.lang.Record
com.shaft.doctor.DoctorAiAnalysisRequest
- Record Components:
enabled- whether provider analysis is requestedapprovalPolicy- explicit processing-location and evidence-category approvaltimeout- provider request timeoutbudget- provider request budgetmaxEvidenceItems- maximum minimized evidence items sent to the providermaxEvidenceBytes- maximum UTF-8 bytes across submitted evidencemaxResponseBytes- maximum accepted structured provider response bytescacheEnabled- whether safe structured successful advisories may be cached
public record DoctorAiAnalysisRequest(boolean enabled, com.shaft.pilot.ai.ApprovalPolicy approvalPolicy, Duration timeout, com.shaft.pilot.ai.AiBudget budget, int maxEvidenceItems, long maxEvidenceBytes, long maxResponseBytes, boolean cacheEnabled)
extends Record
Explicit policy for one optional provider-assisted Doctor analysis.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault maximum submitted evidence size.static final intDefault maximum number of minimized evidence items.static final longDefault maximum structured provider response size. -
Constructor Summary
ConstructorsConstructorDescriptionDoctorAiAnalysisRequest(boolean enabled, com.shaft.pilot.ai.ApprovalPolicy approvalPolicy, Duration timeout, com.shaft.pilot.ai.AiBudget budget, int maxEvidenceItems, long maxEvidenceBytes, long maxResponseBytes, boolean cacheEnabled) Creates a validated provider-analysis policy. -
Method Summary
Modifier and TypeMethodDescriptioncom.shaft.pilot.ai.ApprovalPolicyReturns the value of theapprovalPolicyrecord component.com.shaft.pilot.ai.AiBudgetbudget()Returns the value of thebudgetrecord component.booleanReturns the value of thecacheEnabledrecord component.static DoctorAiAnalysisRequestdefaults(com.shaft.pilot.ai.ApprovalPolicy approvalPolicy) Creates conservative enabled defaults.static DoctorAiAnalysisRequestdisabled()Creates a disabled request that preserves deterministic output.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxEvidenceBytesrecord component.intReturns the value of themaxEvidenceItemsrecord component.longReturns the value of themaxResponseBytesrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_MAX_EVIDENCE_ITEMS
public static final int DEFAULT_MAX_EVIDENCE_ITEMSDefault maximum number of minimized evidence items.- See Also:
-
DEFAULT_MAX_EVIDENCE_BYTES
public static final long DEFAULT_MAX_EVIDENCE_BYTESDefault maximum submitted evidence size.- See Also:
-
DEFAULT_MAX_RESPONSE_BYTES
public static final long DEFAULT_MAX_RESPONSE_BYTESDefault maximum structured provider response size.- See Also:
-
-
Constructor Details
-
DoctorAiAnalysisRequest
public DoctorAiAnalysisRequest(boolean enabled, com.shaft.pilot.ai.ApprovalPolicy approvalPolicy, Duration timeout, com.shaft.pilot.ai.AiBudget budget, int maxEvidenceItems, long maxEvidenceBytes, long maxResponseBytes, boolean cacheEnabled) Creates a validated provider-analysis policy.
-
-
Method Details
-
defaults
Creates conservative enabled defaults.- Parameters:
approvalPolicy- explicit provider approval- Returns:
- enabled provider-analysis request
-
disabled
Creates a disabled request that preserves deterministic output.- Returns:
- disabled request
-
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. -
enabled
-
approvalPolicy
public com.shaft.pilot.ai.ApprovalPolicy approvalPolicy()Returns the value of theapprovalPolicyrecord component.- Returns:
- the value of the
approvalPolicyrecord component
-
timeout
-
budget
-
maxEvidenceItems
public int maxEvidenceItems()Returns the value of themaxEvidenceItemsrecord component.- Returns:
- the value of the
maxEvidenceItemsrecord component
-
maxEvidenceBytes
public long maxEvidenceBytes()Returns the value of themaxEvidenceBytesrecord component.- Returns:
- the value of the
maxEvidenceBytesrecord component
-
maxResponseBytes
public long maxResponseBytes()Returns the value of themaxResponseBytesrecord component.- Returns:
- the value of the
maxResponseBytesrecord component
-
cacheEnabled
public boolean cacheEnabled()Returns the value of thecacheEnabledrecord component.- Returns:
- the value of the
cacheEnabledrecord component
-