001package ca.cdr.api.model.json;
002
003/*-
004 * #%L
005 * Smile CDR - CDR
006 * %%
007 * Copyright (C) 2016 - 2024 Smile CDR, Inc.
008 * %%
009 * All rights reserved.
010 * #L%
011 */
012
013import com.fasterxml.jackson.annotation.JsonProperty;
014import com.fasterxml.jackson.annotation.JsonPropertyOrder;
015import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
016import com.fasterxml.jackson.databind.annotation.JsonSerialize;
017
018import java.util.ArrayList;
019import java.util.Date;
020import java.util.List;
021
022@JsonPropertyOrder({"from", "to", "userId", "pageIndex", "pageSize", "audit-events"})
023public class AuditEventsJson implements IModelJson {
024
025        @JsonProperty("audit-events")
026        private List<AuditEventJson> auditEventsJsonList;
027
028        @JsonProperty("from")
029        @JsonSerialize(using = JsonDateSerializer.class)
030        @JsonDeserialize(using = JsonDateDeserializer.class)
031        private Date auditFromDate;
032
033        @JsonProperty("to")
034        @JsonSerialize(using = JsonDateSerializer.class)
035        @JsonDeserialize(using = JsonDateDeserializer.class)
036        private Date auditToDate;
037
038        @JsonProperty("userId")
039        private Long userId;
040
041        @JsonProperty("pageSize")
042        private int auditPageSize;
043
044        @JsonProperty("pageIndex")
045        private int auditPageIndex;
046
047        public Date getAuditFromDate() {
048                return auditFromDate;
049        }
050
051        public void setAuditFromDate(Date auditFromDate) {
052                this.auditFromDate = auditFromDate;
053        }
054
055        public Date getAuditToDate() {
056                return auditToDate;
057        }
058
059        public void setAuditToDate(Date auditToDate) {
060                this.auditToDate = auditToDate;
061        }
062
063        public int getAuditPageSize() {
064                return auditPageSize;
065        }
066
067        public void setAuditPageSize(int auditPageSize) {
068                this.auditPageSize = auditPageSize;
069        }
070
071        public int getAuditPageIndex() {
072                return auditPageIndex;
073        }
074
075        public void setAuditPageIndex(int auditPageIdex) {
076                this.auditPageIndex = auditPageIdex;
077        }
078
079        public Long getUserId() {
080                return userId;
081        }
082
083        public void setUserId(Long userId) {
084                this.userId = userId;
085        }
086
087        public List<AuditEventJson> getAuditEventsJsonListJsonList() {
088
089                if (auditEventsJsonList == null) {
090                        auditEventsJsonList = new ArrayList<AuditEventJson>();
091                }
092                return auditEventsJsonList;
093        }
094}