Make clientAuth header optional and log request
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / policy / api / PushPolicyParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
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
21 package org.onap.policy.api;
22
23 import com.google.gson.Gson;
24 import java.util.UUID;
25
26 /**
27  * <code>PushPolicyParameters</code> defines the Policy Parameters which are required to Push a Policy to PDPGroup.
28  *
29  * @version 0.1
30  */
31 public class PushPolicyParameters {
32     private static final Gson GSON = new Gson();
33     private String policyName;
34     private String policyType;
35     private String pdpGroup;
36     private UUID requestID;
37
38     /**
39      * Constructor with no Parameters.
40      */
41     public PushPolicyParameters() {
42         // Empty constructor
43     }
44
45     /**
46      * Constructor with Parameters.
47      *
48      * @param policyName the <code>String</code> format of the Policy Name
49      * @param policyType the <code>String</code> format of the Policy Type
50      * @param pdpGroup the <code>String</code> format of the PDPGroup
51      * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging
52      *        messages.
53      */
54     public PushPolicyParameters(String policyName, String policyType, String pdpGroup, UUID requestID) {
55         this.policyName = policyName;
56         this.policyType = policyType;
57         this.pdpGroup = pdpGroup;
58         this.requestID = requestID;
59     }
60
61     /**
62      * Gets the PolicyName of the Push Policy Parameters.
63      *
64      * @return policyName the <code>String</code> format of the Policy Name
65      */
66     public String getPolicyName() {
67         return policyName;
68     }
69
70     /**
71      * Sets the policyName of the Push Policy Parameters.
72      *
73      * @param policyName the <code>String</code> format of the Policy Name
74      */
75     public void setPolicyName(String policyName) {
76         this.policyName = policyName;
77     }
78
79     /**
80      * Gets the PolicyType of the Push Policy Parameters.
81      *
82      * @return policyType the <code>String</code> format of the Policy Type
83      */
84     public String getPolicyType() {
85         return policyType;
86     }
87
88     /**
89      * Sets the policyType of the Push Policy Parameters.
90      *
91      * @param policyType the <code>String</code> format of the Policy Type
92      */
93     public void setPolicyType(String policyType) {
94         this.policyType = policyType;
95     }
96
97     /**
98      * Gets the PDPGroup of the Push Policy Parameters.
99      *
100      * @return pdpGroup the <code>String</code> format of the PDPGroup
101      */
102     public String getPdpGroup() {
103         return pdpGroup;
104     }
105
106     /**
107      * Sets the PDPGroup of the Push Policy Parameters.
108      *
109      * @param pdpGroup the <code>String</code> format of the PDPGroup
110      */
111     public void setPdpGroup(String pdpGroup) {
112         this.pdpGroup = pdpGroup;
113     }
114
115     /**
116      * Gets the requestID of the Push Policy Parameters.
117      *
118      * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
119      */
120     public UUID getRequestID() {
121         return requestID;
122     }
123
124     /**
125      * Sets the requestID of the Push Policy Parameters.
126      *
127      * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging
128      *        messages.
129      */
130     public void setRequestID(UUID requestID) {
131         this.requestID = requestID;
132     }
133
134     /**
135      * Used to print the input Params for PushPolicy REST call.
136      *
137      * @return JSON String of this object.
138      */
139     @Override
140     public String toString() {
141         return GSON.toJson(this);
142     }
143
144 }