9bf629e35f744aee6e2b46abb400da963ae8c2e8
[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
20 import java.util.HashSet;
21 import java.util.Objects;
22 import java.util.Set;
23
24 /**
25  * The connection points reported by each operation
26  */
27 public class ReportedAffectedConnectionPoints {
28     @SerializedName("cbam_pre")
29     private Set<ReportedAffectedCp> pre = new HashSet<>();
30     @SerializedName("cbam_post")
31     private Set<ReportedAffectedCp> post = new HashSet<>();
32
33     /**
34      * @return the connection points that were present after the operation has finished
35      */
36     public Set<ReportedAffectedCp> getPost() {
37         return post;
38     }
39
40     /**
41      * @param post the connection points that were present after the operation has finished
42      */
43     public void setPost(Set<ReportedAffectedCp> post) {
44         this.post = post;
45     }
46
47     /**
48      * @return the connection points that were present before the operation was started
49      */
50     public Set<ReportedAffectedCp> getPre() {
51         return pre;
52     }
53
54     /**
55      * @param pre the connection points that were present before the operation was started
56      */
57     public void setPre(Set<ReportedAffectedCp> pre) {
58         this.pre = pre;
59     }
60
61     @Override
62     public boolean equals(Object o) {
63         if (this == o) return true;
64         if (o == null || getClass() != o.getClass()) return false;
65         ReportedAffectedConnectionPoints that = (ReportedAffectedConnectionPoints) o;
66         return Objects.equals(pre, that.pre) &&
67                 Objects.equals(post, that.post);
68     }
69
70     @Override
71     public int hashCode() {
72
73         return Objects.hash(pre, post);
74     }
75
76     @Override
77     public String toString() {
78         return "ReportedAffectedConnectionPoints{" +
79                 "pre=" + pre +
80                 ", post=" + post +
81                 '}';
82     }
83 }