09bc5d3283eeb565353cb049a28b2998cfe6a0ec
[appc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * =============================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.appc.flow.controller.data;
24
25 import com.fasterxml.jackson.annotation.JsonProperty;
26
27 public class ActionIdentifier {
28
29     @Override
30     public int hashCode() {
31         final int prime = 31;
32         int result = 1;
33         result = prime * result + ((vnfId == null) ? 0 : vnfId.hashCode());
34         result = prime * result + ((vnfcName == null) ? 0 : vnfcName.hashCode());
35         result = prime * result + ((vserverId == null) ? 0 : vserverId.hashCode());
36         return result;
37     }
38
39     @Override
40     public boolean equals(Object obj) {
41         if (this == obj)
42             return true;
43         if (obj == null)
44             return false;
45         if (getClass() != obj.getClass())
46             return false;
47         ActionIdentifier other = (ActionIdentifier) obj;
48         if (vnfId == null) {
49             if (other.vnfId != null)
50                 return false;
51         } else if (!vnfId.equals(other.vnfId))
52             return false;
53         if (vnfcName == null) {
54             if (other.vnfcName != null)
55                 return false;
56         } else if (!vnfcName.equals(other.vnfcName))
57             return false;
58         if (vserverId == null) {
59             if (other.vserverId != null)
60                 return false;
61         } else if (!vserverId.equals(other.vserverId))
62             return false;
63         return true;
64     }
65
66     @JsonProperty("vnf-id")
67     private String vnfId ;
68     @JsonProperty("vserver-id")
69     private String vserverId;
70     @JsonProperty("vnfc-name")
71     private String vnfcName;
72
73     public String getVserverId() {
74         return vserverId;
75     }
76
77     public void setVserverId(String vserverId) {
78         this.vserverId = vserverId;
79     }
80
81     public String getVnfcName() {
82         return vnfcName;
83     }
84
85     public void setVnfcName(String vnfcName) {
86         this.vnfcName = vnfcName;
87     }
88
89     public String getVnfId() {
90         return vnfId;
91     }
92
93     public void setVnfId(String vnfId) {
94         this.vnfId = vnfId;
95     }
96
97     @Override
98     public String toString() {
99         return "ActionIdentifier [vnfId=" + vnfId + ", vserverId=" + vserverId + ", vnfcName=" + vnfcName + "]";
100     }
101
102 }