Add classes for PDP "simple" REST APIs 64/82264/1
authorJim Hahn <jrh3@att.com>
Wed, 13 Mar 2019 21:28:56 +0000 (17:28 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 14 Mar 2019 15:08:06 +0000 (11:08 -0400)
Change-Id: I81a624a9cfb93df488bbd447f3ee24d1880048d6
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeleteResponse.java
models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java
models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java [new file with mode: 0644]
models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java [new file with mode: 0644]

index a66263c..46da8d3 100644 (file)
@@ -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;
 }
index c14aa66..b81d02b 100644 (file)
@@ -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 (file)
index 0000000..f202558
--- /dev/null
@@ -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 (file)
index 0000000..e4e84e7
--- /dev/null
@@ -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;
+}