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=========================================================
21 package org.onap.policy.api;
23 import com.google.gson.Gson;
24 import java.util.UUID;
27 * <code>PushPolicyParameters</code> defines the Policy Parameters which are required to Push a Policy to PDPGroup.
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;
39 * Constructor with no Parameters.
41 public PushPolicyParameters() {
46 * Constructor with Parameters.
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
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;
62 * Gets the PolicyName of the Push Policy Parameters.
64 * @return policyName the <code>String</code> format of the Policy Name
66 public String getPolicyName() {
71 * Sets the policyName of the Push Policy Parameters.
73 * @param policyName the <code>String</code> format of the Policy Name
75 public void setPolicyName(String policyName) {
76 this.policyName = policyName;
80 * Gets the PolicyType of the Push Policy Parameters.
82 * @return policyType the <code>String</code> format of the Policy Type
84 public String getPolicyType() {
89 * Sets the policyType of the Push Policy Parameters.
91 * @param policyType the <code>String</code> format of the Policy Type
93 public void setPolicyType(String policyType) {
94 this.policyType = policyType;
98 * Gets the PDPGroup of the Push Policy Parameters.
100 * @return pdpGroup the <code>String</code> format of the PDPGroup
102 public String getPdpGroup() {
107 * Sets the PDPGroup of the Push Policy Parameters.
109 * @param pdpGroup the <code>String</code> format of the PDPGroup
111 public void setPdpGroup(String pdpGroup) {
112 this.pdpGroup = pdpGroup;
116 * Gets the requestID of the Push Policy Parameters.
118 * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
120 public UUID getRequestID() {
125 * Sets the requestID of the Push Policy Parameters.
127 * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging
130 public void setRequestID(UUID requestID) {
131 this.requestID = requestID;
135 * Used to print the input Params for PushPolicy REST call.
137 * @return JSON String of this object.
140 public String toString() {
141 return GSON.toJson(this);