Merge "Fix comparison issues in onap pap rest"
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / std / pap / StdPAPPolicyParams.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-XACML
4  * ================================================================================
5  * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.xacml.std.pap;
22
23 import java.util.Map;
24
25 public class StdPAPPolicyParams {
26     private String configPolicyType;
27     private String policyName;
28     private String description;
29     private String onapName;
30     private String configName;
31     private Map<String, String> attributes;
32     private String configType;
33     private String configBodyData;
34     private Boolean editPolicy;
35     private String domain;
36     private String riskLevel;
37     private String riskType;
38     private String guard;
39     private String ttlDate;
40     private int highestVersion;
41
42     private StdPAPPolicyParams() {
43         super();
44     }
45
46     public int getHighestVersion() {
47         return highestVersion;
48     }
49
50     public static StdPAPPolicyParamsBuilder builder() {
51         return new StdPAPPolicyParamsBuilder();
52     }
53
54     public String getConfigPolicyType() {
55         return configPolicyType;
56     }
57
58     public String getPolicyName() {
59         return policyName;
60     }
61
62     public String getDescription() {
63         return description;
64     }
65
66     public String getOnapName() {
67         return onapName;
68     }
69
70     public String getConfigName() {
71         return configName;
72     }
73
74     public Map<String, String> getAttributes() {
75         return attributes;
76     }
77
78     public String getConfigType() {
79         return configType;
80     }
81
82     public String getConfigBodyData() {
83         return configBodyData;
84     }
85
86     public Boolean getEditPolicy() {
87         return editPolicy;
88     }
89
90     public String getDomain() {
91         return domain;
92     }
93
94     public String getRiskLevel() {
95         return riskLevel;
96     }
97
98     public String getRiskType() {
99         return riskType;
100     }
101
102     public String getGuard() {
103         return guard;
104     }
105
106     public String getTtlDate() {
107         return ttlDate;
108     }
109
110     public static class StdPAPPolicyParamsBuilder {
111         StdPAPPolicyParams m = new StdPAPPolicyParams();
112
113         public StdPAPPolicyParams build() {
114             return m;
115         }
116
117         public StdPAPPolicyParamsBuilder configPolicyType(String configPolicyType) {
118             m.configPolicyType = configPolicyType;
119             return this;
120         }
121
122
123         public StdPAPPolicyParamsBuilder policyName(String policyName) {
124             m.policyName = policyName;
125             return this;
126         }
127
128         public StdPAPPolicyParamsBuilder description(String description) {
129             m.description = description;
130             return this;
131         }
132
133         public StdPAPPolicyParamsBuilder onapName(String onapName) {
134             m.onapName = onapName;
135             return this;
136         }
137
138         public StdPAPPolicyParamsBuilder configName(String configName) {
139             m.configName = configName;
140             return this;
141         }
142
143         public StdPAPPolicyParamsBuilder attributes(Map<String, String> attributes) {
144             m.attributes = attributes;
145             return this;
146         }
147
148         public StdPAPPolicyParamsBuilder configType(String configType) {
149             m.configType = configType;
150             return this;
151         }
152
153         public StdPAPPolicyParamsBuilder configBodyData(String body) {
154             m.configBodyData = body;
155             return this;
156         }
157
158         public StdPAPPolicyParamsBuilder editPolicy(boolean editPolicy) {
159             m.editPolicy = editPolicy;
160             return this;
161         }
162
163         public StdPAPPolicyParamsBuilder domain(String domain) {
164             m.domain = domain;
165             return this;
166         }
167
168         public StdPAPPolicyParamsBuilder riskLevel(String riskLevel) {
169             m.riskLevel = riskLevel;
170             return this;
171         }
172
173         public StdPAPPolicyParamsBuilder riskType(String riskType) {
174             m.riskType = riskType;
175             return this;
176         }
177
178         public StdPAPPolicyParamsBuilder guard(String guard) {
179             m.guard = guard;
180             return this;
181         }
182
183         public StdPAPPolicyParamsBuilder ttlDate(String ttlDate) {
184             m.ttlDate = ttlDate;
185             return this;
186         }
187
188         public StdPAPPolicyParamsBuilder highestVersion(int highVer) {
189             m.highestVersion = highVer;
190             return this;
191         }
192     }
193 }