059333992ea2c8ac6e72a0102844ac0404b0eb7e
[policy/xacml-pdp.git] / main / src / main / java / org / onap / policy / pdpx / main / rest / model / StatisticsReport.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.pdpx.main.rest.model;
22
23 /**
24  * Class to represent statistics report of xacmlPdp service.
25  *
26  */
27 public class StatisticsReport {
28
29     private int code;
30     private long totalPolicyTypesCount;
31     private long totalPoliciesCount;
32     private long permitDecisionsCount;
33     private long denyDecisionsCount;
34     private long indeterminantDecisionsCount;
35     private long notApplicableDecisionsCount;
36
37
38     /**
39      * Returns the code of this {@link StatisticsReport} instance.
40      *
41      * @return the code
42      */
43     public int getCode() {
44         return code;
45     }
46
47     /**
48      * Set code in this {@link StatisticsReport} instance.
49      *
50      * @param code the code to set
51      */
52     public void setCode(final int code) {
53         this.code = code;
54     }
55
56     /**
57      * Returns the totalPolicyTypesCount of this {@link StatisticsReport} instance.
58      *
59      * @return the totalPolicyTypesCount
60      */
61     public long getTotalPolicyTypesCount() {
62         return totalPolicyTypesCount;
63     }
64
65     /**
66      * Set totalPolicyTypesCount in this {@link StatisticsReport} instance.
67      *
68      * @param totalPolicyTypesCount the totalPolicyTypesCount to set
69      */
70     public void setTotalPolicyTypesCount(long totalPolicyTypesCount) {
71         this.totalPolicyTypesCount = totalPolicyTypesCount;
72     }
73
74     /**
75      * Returns the totalPoliciesCount of this {@link StatisticsReport} instance.
76      *
77      * @return the totalPoliciesCount
78      */
79     public long getTotalPoliciesCount() {
80         return totalPoliciesCount;
81     }
82
83     /**
84      * Set totalPoliciesCount in this {@link StatisticsReport} instance.
85      *
86      * @param totalPoliciesCount the totalPoliciesCount to set
87      */
88     public void setTotalPoliciesCount(long totalPoliciesCount) {
89         this.totalPoliciesCount = totalPoliciesCount;
90     }
91
92     /**
93      * Returns the permitDecisionsCount of this {@link StatisticsReport} instance.
94      *
95      * @return the permitDecisionsCount
96      */
97     public long getPermitDecisionsCount() {
98         return permitDecisionsCount;
99     }
100
101     /**
102      * Set permitDecisionsCount in this {@link StatisticsReport} instance.
103      *
104      * @param permitDecisionsCount the permitDecisionsCount to set
105      */
106     public void setPermitDecisionsCount(long permitDecisionsCount) {
107         this.permitDecisionsCount = permitDecisionsCount;
108     }
109
110     /**
111      * Returns the denyDecisionsCount of this {@link StatisticsReport} instance.
112      *
113      * @return the denyDecisionsCount
114      */
115     public long getDenyDecisionsCount() {
116         return denyDecisionsCount;
117     }
118
119     /**
120      * Set denyDecisionsCount in this {@link StatisticsReport} instance.
121      *
122      * @param denyDecisionsCount the denyDecisionsCount to set
123      */
124     public void setDenyDecisionsCount(long denyDecisionsCount) {
125         this.denyDecisionsCount = denyDecisionsCount;
126     }
127
128     /**
129      * Returns the indeterminantDecisionsCount of this {@link StatisticsReport} instance.
130      *
131      * @return the indeterminantDecisionsCount
132      */
133     public long getIndeterminantDecisionsCount() {
134         return indeterminantDecisionsCount;
135     }
136
137     /**
138      * Set indeterminantDecisionsCount in this {@link StatisticsReport} instance.
139      *
140      * @param indeterminantDecisionsCount the indeterminantDecisionsCount to set
141      */
142     public void setIndeterminantDecisionsCount(long indeterminantDecisionsCount) {
143         this.indeterminantDecisionsCount = indeterminantDecisionsCount;
144     }
145
146     /**
147      * Returns the notApplicableDecisionsCount of this {@link StatisticsReport} instance.
148      *
149      * @return the notApplicableDecisionsCount
150      */
151     public long getNotApplicableDecisionsCount() {
152         return notApplicableDecisionsCount;
153     }
154
155     /**
156      * Set notApplicableDecisionsCount in this {@link StatisticsReport} instance.
157      *
158      * @param notApplicableDecisionsCount the notApplicableDecisionsCount to set
159      */
160     public void setNotApplicableDecisionsCount(long notApplicableDecisionsCount) {
161         this.notApplicableDecisionsCount = notApplicableDecisionsCount;
162     }
163
164     /**
165      * {@inheritDoc}.
166      */
167     @Override
168     public String toString() {
169         final StringBuilder builder = new StringBuilder();
170         builder.append("StatisticsReport [code=");
171         builder.append(getCode());
172         builder.append(", totalPolicyTypesCount=");
173         builder.append(getTotalPolicyTypesCount());
174         builder.append(", totalPoliciesCount=");
175         builder.append(getTotalPoliciesCount());
176         builder.append(", permitDecisionsCount=");
177         builder.append(getPermitDecisionsCount());
178         builder.append(", denyDecisionsCount=");
179         builder.append(getDenyDecisionsCount());
180         builder.append(", indeterminantDecisionsCount=");
181         builder.append(getIndeterminantDecisionsCount());
182         builder.append(", notApplicableDecisionsCount=");
183         builder.append(getNotApplicableDecisionsCount());
184         builder.append("]");
185         return builder.toString();
186     }
187 }