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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.pdpx.main.rest.model;
24 * Class to represent statistics report of xacmlPdp service.
27 public class StatisticsReport {
30 private long totalPolicyTypesCount;
31 private long totalPoliciesCount;
32 private long permitDecisionsCount;
33 private long denyDecisionsCount;
34 private long indeterminantDecisionsCount;
35 private long notApplicableDecisionsCount;
39 * Returns the code of this {@link StatisticsReport} instance.
43 public int getCode() {
48 * Set code in this {@link StatisticsReport} instance.
50 * @param code the code to set
52 public void setCode(final int code) {
57 * Returns the totalPolicyTypesCount of this {@link StatisticsReport} instance.
59 * @return the totalPolicyTypesCount
61 public long getTotalPolicyTypesCount() {
62 return totalPolicyTypesCount;
66 * Set totalPolicyTypesCount in this {@link StatisticsReport} instance.
68 * @param totalPolicyTypesCount the totalPolicyTypesCount to set
70 public void setTotalPolicyTypesCount(long totalPolicyTypesCount) {
71 this.totalPolicyTypesCount = totalPolicyTypesCount;
75 * Returns the totalPoliciesCount of this {@link StatisticsReport} instance.
77 * @return the totalPoliciesCount
79 public long getTotalPoliciesCount() {
80 return totalPoliciesCount;
84 * Set totalPoliciesCount in this {@link StatisticsReport} instance.
86 * @param totalPoliciesCount the totalPoliciesCount to set
88 public void setTotalPoliciesCount(long totalPoliciesCount) {
89 this.totalPoliciesCount = totalPoliciesCount;
93 * Returns the permitDecisionsCount of this {@link StatisticsReport} instance.
95 * @return the permitDecisionsCount
97 public long getPermitDecisionsCount() {
98 return permitDecisionsCount;
102 * Set permitDecisionsCount in this {@link StatisticsReport} instance.
104 * @param permitDecisionsCount the permitDecisionsCount to set
106 public void setPermitDecisionsCount(long permitDecisionsCount) {
107 this.permitDecisionsCount = permitDecisionsCount;
111 * Returns the denyDecisionsCount of this {@link StatisticsReport} instance.
113 * @return the denyDecisionsCount
115 public long getDenyDecisionsCount() {
116 return denyDecisionsCount;
120 * Set denyDecisionsCount in this {@link StatisticsReport} instance.
122 * @param denyDecisionsCount the denyDecisionsCount to set
124 public void setDenyDecisionsCount(long denyDecisionsCount) {
125 this.denyDecisionsCount = denyDecisionsCount;
129 * Returns the indeterminantDecisionsCount of this {@link StatisticsReport} instance.
131 * @return the indeterminantDecisionsCount
133 public long getIndeterminantDecisionsCount() {
134 return indeterminantDecisionsCount;
138 * Set indeterminantDecisionsCount in this {@link StatisticsReport} instance.
140 * @param indeterminantDecisionsCount the indeterminantDecisionsCount to set
142 public void setIndeterminantDecisionsCount(long indeterminantDecisionsCount) {
143 this.indeterminantDecisionsCount = indeterminantDecisionsCount;
147 * Returns the notApplicableDecisionsCount of this {@link StatisticsReport} instance.
149 * @return the notApplicableDecisionsCount
151 public long getNotApplicableDecisionsCount() {
152 return notApplicableDecisionsCount;
156 * Set notApplicableDecisionsCount in this {@link StatisticsReport} instance.
158 * @param notApplicableDecisionsCount the notApplicableDecisionsCount to set
160 public void setNotApplicableDecisionsCount(long notApplicableDecisionsCount) {
161 this.notApplicableDecisionsCount = notApplicableDecisionsCount;
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());
185 return builder.toString();