Record Class DoctorAiAnalysisRequest

java.lang.Object
java.lang.Record
com.shaft.doctor.DoctorAiAnalysisRequest
Record Components:
enabled - whether provider analysis is requested
approvalPolicy - explicit processing-location and evidence-category approval
timeout - provider request timeout
budget - provider request budget
maxEvidenceItems - maximum minimized evidence items sent to the provider
maxEvidenceBytes - maximum UTF-8 bytes across submitted evidence
maxResponseBytes - maximum accepted structured provider response bytes
cacheEnabled - 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 Details

    • DEFAULT_MAX_EVIDENCE_ITEMS

      public static final int DEFAULT_MAX_EVIDENCE_ITEMS
      Default maximum number of minimized evidence items.
      See Also:
    • DEFAULT_MAX_EVIDENCE_BYTES

      public static final long DEFAULT_MAX_EVIDENCE_BYTES
      Default maximum submitted evidence size.
      See Also:
    • DEFAULT_MAX_RESPONSE_BYTES

      public static final long DEFAULT_MAX_RESPONSE_BYTES
      Default 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

      public static DoctorAiAnalysisRequest defaults(com.shaft.pilot.ai.ApprovalPolicy approvalPolicy)
      Creates conservative enabled defaults.
      Parameters:
      approvalPolicy - explicit provider approval
      Returns:
      enabled provider-analysis request
    • disabled

      public static DoctorAiAnalysisRequest disabled()
      Creates a disabled request that preserves deterministic output.
      Returns:
      disabled request
    • 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.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • approvalPolicy

      public com.shaft.pilot.ai.ApprovalPolicy approvalPolicy()
      Returns the value of the approvalPolicy record component.
      Returns:
      the value of the approvalPolicy record component
    • timeout

      public Duration timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • budget

      public com.shaft.pilot.ai.AiBudget budget()
      Returns the value of the budget record component.
      Returns:
      the value of the budget record component
    • maxEvidenceItems

      public int maxEvidenceItems()
      Returns the value of the maxEvidenceItems record component.
      Returns:
      the value of the maxEvidenceItems record component
    • maxEvidenceBytes

      public long maxEvidenceBytes()
      Returns the value of the maxEvidenceBytes record component.
      Returns:
      the value of the maxEvidenceBytes record component
    • maxResponseBytes

      public long maxResponseBytes()
      Returns the value of the maxResponseBytes record component.
      Returns:
      the value of the maxResponseBytes record component
    • cacheEnabled

      public boolean cacheEnabled()
      Returns the value of the cacheEnabled record component.
      Returns:
      the value of the cacheEnabled record component