package ai.sentryagent.idp.models;

/** Optional query parameters for querying the audit log. */
public final class QueryAuditParams {
    private final String agentId;
    private final String action;
    private final String outcome;
    private final String fromDate;
    private final String toDate;
    private final Integer page;
    private final Integer limit;

    private QueryAuditParams(Builder b) {
        this.agentId  = b.agentId;
        this.action   = b.action;
        this.outcome  = b.outcome;
        this.fromDate = b.fromDate;
        this.toDate   = b.toDate;
        this.page     = b.page;
        this.limit    = b.limit;
    }

    public String getAgentId()  { return agentId; }
    public String getAction()   { return action; }
    public String getOutcome()  { return outcome; }
    public String getFromDate() { return fromDate; }
    public String getToDate()   { return toDate; }
    public Integer getPage()    { return page; }
    public Integer getLimit()   { return limit; }

    public static Builder builder() { return new Builder(); }

    public static final class Builder {
        private String agentId;
        private String action;
        private String outcome;
        private String fromDate;
        private String toDate;
        private Integer page;
        private Integer limit;

        public Builder agentId(String agentId)  { this.agentId = agentId;   return this; }
        public Builder action(String action)    { this.action = action;     return this; }
        public Builder outcome(String outcome)  { this.outcome = outcome;   return this; }
        public Builder fromDate(String from)    { this.fromDate = from;     return this; }
        public Builder toDate(String to)        { this.toDate = to;         return this; }
        public Builder page(int page)           { this.page = page;         return this; }
        public Builder limit(int limit)         { this.limit = limit;       return this; }

        public QueryAuditParams build() { return new QueryAuditParams(this); }
    }
}
