summaryrefslogtreecommitdiffstats
path: root/models-pap/src/main/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-03-13 17:28:56 -0400
committerJim Hahn <jrh3@att.com>2019-03-14 11:08:06 -0400
commitb021c3ecf1e8e523cd25cc377666d1d33c3fae97 (patch)
tree0d8c82d7b1b12dcff744bf4d36f183ad75465cac /models-pap/src/main/java
parent748e3cd4a9e89b3b87a74b9134d45687f197409b (diff)
Add classes for PDP "simple" REST APIs
Change-Id: I81a624a9cfb93df488bbd447f3ee24d1880048d6 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pap/src/main/java')
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java6
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java6
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java39
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java39
4 files changed, 80 insertions, 10 deletions
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java
index a66263c56..46da8d363 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java
@@ -30,10 +30,6 @@ import lombok.ToString;
@Getter
@Setter
@ToString
-public class PdpGroupDeleteResponse {
+public class PdpGroupDeleteResponse extends SimpleResponse {
- /**
- * Optional detailed message in error cases.
- */
- private String errorDetails;
}
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java
index c14aa6650..b81d02b87 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java
@@ -30,10 +30,6 @@ import lombok.ToString;
@Getter
@Setter
@ToString
-public class PdpGroupDeployResponse {
+public class PdpGroupDeployResponse extends SimpleResponse {
- /**
- * Optional detailed message in error cases.
- */
- private String errorDetails;
}
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java
new file mode 100644
index 000000000..f20255858
--- /dev/null
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java
@@ -0,0 +1,39 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Models
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.models.pap.concepts;
+
+import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.onap.policy.pdp.common.models.Policy;
+
+/**
+ * Request deploy or update a set of policies using the <i>simple</i> PDP Group deployment
+ * REST API. Only the "name" and "policyVersion" fields of a Policy are used, and only the
+ * "name" field is actually required.
+ */
+@Getter
+@Setter
+@ToString
+public class PdpPolicies {
+ private List<Policy> policies;
+}
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java
new file mode 100644
index 000000000..e4e84e7f0
--- /dev/null
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java
@@ -0,0 +1,39 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP Policy Models
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.models.pap.concepts;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * Response returned when no extra output fields are needed.
+ */
+@Getter
+@Setter
+@ToString
+public class SimpleResponse {
+
+ /**
+ * Optional detailed message in error cases.
+ */
+ private String errorDetails;
+}