Make clientAuth header optional and log request
[policy/engine.git] / ONAP-PDP-REST / src / main / java / org / onap / policy / pdp / rest / api / models / PolicyConfig.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-PDP-REST
4  * ================================================================================
5  * Copyright (C) 2017,2019 AT&T Intellectual Property. 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 package org.onap.policy.pdp.rest.api.models;
21
22 import com.google.gson.Gson;
23 import io.swagger.annotations.ApiModel;
24
25 import java.util.Map;
26 import org.onap.policy.api.PolicyConfigStatus;
27 import org.onap.policy.api.PolicyConfigType;
28 import org.onap.policy.api.PolicyType;
29 import org.onap.policy.models.APIConfigResponse;
30
31 @ApiModel
32 public class PolicyConfig implements APIConfigResponse {
33     private static final Gson GSON = new Gson();
34     private String policyConfigMessage;
35     private PolicyConfigStatus policyConfigStatus;
36     private PolicyType type;
37     private String config;
38     private String policyName;
39     private PolicyConfigType policyType;
40     private String policyVersion;
41     private Map<String, String> matchingConditions;
42     private Map<String, String> responseAttributes;
43     private Map<String, String> property;
44
45     @Override
46     public String getConfig() {
47         return config;
48     }
49
50     public void setConfig(String config) {
51         this.config = config;
52     }
53
54     @Override
55     public PolicyType getType() {
56         return type;
57     }
58
59     public void setType(PolicyType type) {
60         this.type = type;
61     }
62
63     @Override
64     public PolicyConfigStatus getPolicyConfigStatus() {
65         return policyConfigStatus;
66     }
67
68     public void setPolicyConfigStatus(PolicyConfigStatus policyConfigStatus) {
69         this.policyConfigStatus = policyConfigStatus;
70     }
71
72     @Override
73     public String getPolicyConfigMessage() {
74         return policyConfigMessage;
75     }
76
77     public void setPolicyConfigMessage(String policyConfigMessage) {
78         this.policyConfigMessage = policyConfigMessage;
79     }
80
81     @Override
82     public Map<String, String> getProperty() {
83         return property;
84     }
85
86     public void setProperty(Map<String, String> property) {
87         this.property = property;
88     }
89
90     @Override
91     public String getPolicyName() {
92         return policyName;
93     }
94
95     public void setPolicyName(String policyName) {
96         this.policyName = policyName;
97     }
98
99     @Override
100     public String getPolicyVersion() {
101         return policyVersion;
102     }
103
104     public void setPolicyVersion(String policyVersion) {
105         this.policyVersion = policyVersion;
106     }
107
108     @Override
109     public Map<String, String> getMatchingConditions() {
110         return matchingConditions;
111     }
112
113     public void setMatchingConditions(Map<String, String> matchingConditions) {
114         this.matchingConditions = matchingConditions;
115     }
116
117     public void setResponseAttributes(Map<String, String> responseAttributes) {
118         this.responseAttributes = responseAttributes;
119     }
120
121     @Override
122     public Map<String, String> getResponseAttributes() {
123         return responseAttributes;
124     }
125
126     public PolicyConfigType getPolicyType() {
127         return policyType;
128     }
129
130     public void setPolicyType(PolicyConfigType policyType) {
131         this.policyType = policyType;
132     }
133
134     @Override
135     public String toString() {
136         return GSON.toJson(this);
137     }
138 }