Record Class AdminAuditEvent
java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.audit.AdminAuditEvent
public record AdminAuditEvent(Instant timestamp, String commandId, String operator, String target, boolean writes, String outcome, Map<String,Object> attributes)
extends Record
Immutable audit record for one admin operation.
Emitted by AdminAuditLogger both as an SLF4J line and (when configured) as a Spring
ApplicationEvent, so downstream sinks (Loki, RocketMQ, Nacos audit, ...) can subscribe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of thecommandIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.operator()Returns the value of theoperatorrecord component.outcome()Returns the value of theoutcomerecord component.target()Returns the value of thetargetrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.booleanwrites()Returns the value of thewritesrecord component.
-
Constructor Details
-
AdminAuditEvent
public AdminAuditEvent(Instant timestamp, String commandId, String operator, String target, boolean writes, String outcome, Map<String, Object> attributes) Creates an instance of aAdminAuditEventrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentcommandId- the value for thecommandIdrecord componentoperator- the value for theoperatorrecord componenttarget- the value for thetargetrecord componentwrites- the value for thewritesrecord componentoutcome- the value for theoutcomerecord componentattributes- the value for theattributesrecord 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 '=='. -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
commandId
Returns the value of thecommandIdrecord component.- Returns:
- the value of the
commandIdrecord component
-
operator
Returns the value of theoperatorrecord component.- Returns:
- the value of the
operatorrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
writes
public boolean writes()Returns the value of thewritesrecord component.- Returns:
- the value of the
writesrecord component
-
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-