2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.onap.policy.pdp.rest.api.models;
22 import com.google.gson.Gson;
23 import io.swagger.annotations.ApiModel;
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;
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;
46 public String getConfig() {
50 public void setConfig(String config) {
55 public PolicyType getType() {
59 public void setType(PolicyType type) {
64 public PolicyConfigStatus getPolicyConfigStatus() {
65 return policyConfigStatus;
68 public void setPolicyConfigStatus(PolicyConfigStatus policyConfigStatus) {
69 this.policyConfigStatus = policyConfigStatus;
73 public String getPolicyConfigMessage() {
74 return policyConfigMessage;
77 public void setPolicyConfigMessage(String policyConfigMessage) {
78 this.policyConfigMessage = policyConfigMessage;
82 public Map<String, String> getProperty() {
86 public void setProperty(Map<String, String> property) {
87 this.property = property;
91 public String getPolicyName() {
95 public void setPolicyName(String policyName) {
96 this.policyName = policyName;
100 public String getPolicyVersion() {
101 return policyVersion;
104 public void setPolicyVersion(String policyVersion) {
105 this.policyVersion = policyVersion;
109 public Map<String, String> getMatchingConditions() {
110 return matchingConditions;
113 public void setMatchingConditions(Map<String, String> matchingConditions) {
114 this.matchingConditions = matchingConditions;
117 public void setResponseAttributes(Map<String, String> responseAttributes) {
118 this.responseAttributes = responseAttributes;
122 public Map<String, String> getResponseAttributes() {
123 return responseAttributes;
126 public PolicyConfigType getPolicyType() {
130 public void setPolicyType(PolicyConfigType policyType) {
131 this.policyType = policyType;
135 public String toString() {
136 return GSON.toJson(this);