Updates to config flow-controller bundle
[appc.git] / appc-config / appc-flow-controller / provider / src / main / java / org / onap / appc / flow / controller / data / ActionIdentifier.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APP-C
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  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.appc.flow.controller.data;
22
23 import com.fasterxml.jackson.annotation.JsonProperty;
24
25 public class ActionIdentifier {
26
27     @Override
28     public int hashCode() {
29         final int prime = 31;
30         int result = 1;
31         result = prime * result + ((vnfId == null) ? 0 : vnfId.hashCode());
32         result = prime * result + ((vnfcName == null) ? 0 : vnfcName.hashCode());
33         result = prime * result + ((vserverId == null) ? 0 : vserverId.hashCode());
34         return result;
35     }
36
37     @Override
38     public boolean equals(Object obj) {
39         if (this == obj)
40             return true;
41         if (obj == null)
42             return false;
43         if (getClass() != obj.getClass())
44             return false;
45         ActionIdentifier other = (ActionIdentifier) obj;
46         if (vnfId == null) {
47             if (other.vnfId != null)
48                 return false;
49         } else if (!vnfId.equals(other.vnfId))
50             return false;
51         if (vnfcName == null) {
52             if (other.vnfcName != null)
53                 return false;
54         } else if (!vnfcName.equals(other.vnfcName))
55             return false;
56         if (vserverId == null) {
57             if (other.vserverId != null)
58                 return false;
59         } else if (!vserverId.equals(other.vserverId))
60             return false;
61         return true;
62     }
63
64     @JsonProperty("vnf-id")
65     private String vnfId ;
66     @JsonProperty("vserver-id")
67     private String vserverId;
68     @JsonProperty("vnfc-name")
69     private String vnfcName;
70
71     public String getVserverId() {
72         return vserverId;
73     }
74
75     public void setVserverId(String vserverId) {
76         this.vserverId = vserverId;
77     }
78
79     public String getVnfcName() {
80         return vnfcName;
81     }
82
83     public void setVnfcName(String vnfcName) {
84         this.vnfcName = vnfcName;
85     }
86
87     public String getVnfId() {
88         return vnfId;
89     }
90
91     public void setVnfId(String vnfId) {
92         this.vnfId = vnfId;
93     }
94
95     @Override
96     public String toString() {
97         return "ActionIdentifier [vnfId=" + vnfId + ", vserverId=" + vserverId + ", vnfcName=" + vnfcName + "]";
98     }
99
100 }