move actors code in drools-applications to policy/models
[policy/models.git] / models-interactions / model-impl / sdnr / src / main / java / org / onap / policy / sdnr / PciResponseWrapper.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * sdnr
4  * ================================================================================
5  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
6  * Modifications Copyright (C) 2019 Nordix Foundation.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.sdnr;
23
24 import com.google.gson.annotations.SerializedName;
25
26 import java.io.Serializable;
27
28 public class PciResponseWrapper extends PciWrapper implements Serializable {
29
30     private static final long serialVersionUID = 109837814781086802L;
31
32     @SerializedName(value = "body")
33     private PciResponse body;
34
35     public PciResponseWrapper() {
36         super();
37     }
38
39     /**
40      * Get the body.
41      *
42      * @return the body
43      */
44     public PciResponse getBody() {
45         return body;
46     }
47
48     /**
49      * Set the body.
50      *
51      * @param body
52      *            the body to set
53      */
54     public void setBody(PciResponse body) {
55         this.body = body;
56     }
57
58     @Override
59     public String toString() {
60         return "ResponseWrapper [body=" + body + ", toString()=" + super.toString() + "]";
61     }
62
63     @Override
64     public int hashCode() {
65         final int prime = 31;
66         int result = super.hashCode();
67         result = prime * result + ((body == null) ? 0 : body.hashCode());
68         return result;
69     }
70
71     @Override
72     public boolean equals(Object obj) {
73         if (this == obj) {
74             return true;
75         }
76         if (!super.equals(obj)) {
77             return false;
78         }
79         if (getClass() != obj.getClass()) {
80             return false;
81         }
82         PciResponseWrapper other = (PciResponseWrapper) obj;
83         if (body == null) {
84             if (other.body != null) {
85                 return false;
86             }
87         } else if (!body.equals(other.body)) {
88             return false;
89         }
90         return true;
91     }
92 }