From b021c3ecf1e8e523cd25cc377666d1d33c3fae97 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 13 Mar 2019 17:28:56 -0400 Subject: Add classes for PDP "simple" REST APIs Change-Id: I81a624a9cfb93df488bbd447f3ee24d1880048d6 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn --- .../pap/concepts/PdpGroupDeleteResponse.java | 6 +--- .../pap/concepts/PdpGroupDeployResponse.java | 6 +--- .../policy/models/pap/concepts/PdpPolicies.java | 39 ++++++++++++++++++++++ .../policy/models/pap/concepts/SimpleResponse.java | 39 ++++++++++++++++++++++ 4 files changed, 80 insertions(+), 10 deletions(-) create mode 100644 models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java create mode 100644 models-pap/src/main/java/org/onap/policy/models/pap/concepts/SimpleResponse.java (limited to 'models-pap') 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 simple 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 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; +} -- cgit 1.2.3-korg