package ai.sentryagent.idp.models;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** An immutable audit event record. */
@JsonIgnoreProperties(ignoreUnknown = true)
public final class AuditEvent {

    @JsonProperty("eventId")   private String eventId;
    @JsonProperty("agentId")   private String agentId;
    @JsonProperty("action")    private String action;
    @JsonProperty("outcome")   private String outcome;
    @JsonProperty("ipAddress") private String ipAddress;
    @JsonProperty("userAgent") private String userAgent;
    @JsonProperty("metadata")  private Map<String, Object> metadata;
    @JsonProperty("timestamp") private String timestamp;

    public AuditEvent() {}

    public String getEventId()               { return eventId; }
    public String getAgentId()               { return agentId; }
    public String getAction()                { return action; }
    public String getOutcome()               { return outcome; }
    public String getIpAddress()             { return ipAddress; }
    public String getUserAgent()             { return userAgent; }
    public Map<String, Object> getMetadata() { return metadata; }
    public String getTimestamp()             { return timestamp; }

    @Override
    public String toString() {
        return "AuditEvent{eventId='" + eventId + "', action='" + action + "', outcome='" + outcome + "'}";
    }
}
