Removing jackson to mitigate cve-2017-4995
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / driver / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / nokia / vnfm / notification / ReportedAffectedConnectionPoints.java
1 /*
2  * Copyright 2016-2017, Nokia Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
17
18 import com.google.gson.annotations.SerializedName;
19 import java.util.HashSet;
20 import java.util.Objects;
21 import java.util.Set;
22
23 /**
24  * The connection points reported by each operation
25  */
26 public class ReportedAffectedConnectionPoints {
27     @SerializedName("cbam_pre")
28     private Set<ReportedAffectedCp> pre = new HashSet<>();
29     @SerializedName("cbam_post")
30     private Set<ReportedAffectedCp> post = new HashSet<>();
31
32     /**
33      * @return the connection points that were present after the operation has finished
34      */
35     public Set<ReportedAffectedCp> getPost() {
36         return post;
37     }
38
39     /**
40      * @param post the connection points that were present after the operation has finished
41      */
42     public void setPost(Set<ReportedAffectedCp> post) {
43         this.post = post;
44     }
45
46     /**
47      * @return the connection points that were present before the operation was started
48      */
49     public Set<ReportedAffectedCp> getPre() {
50         return pre;
51     }
52
53     /**
54      * @param pre the connection points that were present before the operation was started
55      */
56     public void setPre(Set<ReportedAffectedCp> pre) {
57         this.pre = pre;
58     }
59
60     @Override
61     //generated code. This is the recommended way to formulate equals
62     @SuppressWarnings({"squid:S00122", "squid:S1067"})
63     public boolean equals(Object o) {
64         if (this == o) return true;
65         if (o == null || getClass() != o.getClass()) return false;
66         ReportedAffectedConnectionPoints that = (ReportedAffectedConnectionPoints) o;
67         return Objects.equals(pre, that.pre) &&
68                 Objects.equals(post, that.post);
69     }
70
71     @Override
72     public int hashCode() {
73
74         return Objects.hash(pre, post);
75     }
76
77     @Override
78     public String toString() {
79         return "ReportedAffectedConnectionPoints{" +
80                 "pre=" + pre +
81                 ", post=" + post +
82                 '}';
83     }
84 }