Package com.tnsai.server.audit
Record Class AuditService.AuditEntry
java.lang.Object
java.lang.Record
com.tnsai.server.audit.AuditService.AuditEntry
- Enclosing class:
AuditService
public static record AuditService.AuditEntry(String toolCallId, String agentId, String tool, String risk, String decision, long timestamp, String summary)
extends Record
Immutable audit entry for a tool call decision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.decision()Returns the value of thedecisionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.risk()Returns the value of theriskrecord component.summary()Returns the value of thesummaryrecord component.longReturns the value of thetimestamprecord component.tool()Returns the value of thetoolrecord component.Returns the value of thetoolCallIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuditEntry
public AuditEntry(String toolCallId, String agentId, String tool, String risk, String decision, long timestamp, String summary) Creates an instance of aAuditEntryrecord class.- Parameters:
toolCallId- the value for thetoolCallIdrecord componentagentId- the value for theagentIdrecord componenttool- the value for thetoolrecord componentrisk- the value for theriskrecord componentdecision- the value for thedecisionrecord componenttimestamp- the value for thetimestamprecord componentsummary- the value for thesummaryrecord 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 '=='. -
toolCallId
Returns the value of thetoolCallIdrecord component.- Returns:
- the value of the
toolCallIdrecord component
-
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
tool
Returns the value of thetoolrecord component.- Returns:
- the value of the
toolrecord component
-
risk
Returns the value of theriskrecord component.- Returns:
- the value of the
riskrecord component
-
decision
Returns the value of thedecisionrecord component.- Returns:
- the value of the
decisionrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-