[SDC] Onboarding 1710 rebase.
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-software-product-lib / openecomp-sdc-vendor-software-product-api / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / types / composition / Nic.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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.openecomp.sdc.vendorsoftwareproduct.types.composition;
22
23
24 public class Nic implements CompositionDataEntity {
25   private String name;
26   private String description;
27   private String networkId;
28   private String networkName;
29   private NetworkType networkType;
30   private String networkDescription;
31
32   public String getName() {
33     return name;
34   }
35
36   public void setName(String name) {
37     this.name = name;
38   }
39
40   public String getDescription() {
41     return description;
42   }
43
44   public void setDescription(String description) {
45     this.description = description;
46   }
47
48   public String getNetworkId() {
49     return networkId;
50   }
51
52   public void setNetworkId(String networkId) {
53     this.networkId = networkId;
54   }
55
56   public String getNetworkName() {
57     return networkName;
58   }
59
60   public void setNetworkName(String networkName) {
61     this.networkName = networkName;
62   }
63
64   public NetworkType getNetworkType() {
65     return networkType;
66   }
67
68   public void setNetworkType(NetworkType networkType) {
69     this.networkType = networkType;
70   }
71
72   public String getNetworkDescription(){
73     return networkDescription;
74   }
75
76   public void setNetworkDescription(String networkDescription){
77     this.networkDescription=networkDescription;
78   }
79
80   @Override
81   public int hashCode() {
82     int result = name != null ? name.hashCode() : 0;
83     result = 31 * result + (description != null ? description.hashCode() : 0);
84     result = 31 * result + (networkId != null ? networkId.hashCode() : 0);
85     result = 31 * result + (networkType != null ? networkType.hashCode() : 0);
86     result = 31 * result + (networkDescription != null ? networkDescription.hashCode() : 0);
87     return result;
88   }
89
90   @Override
91   public boolean equals(Object object) {
92     if (this == object) {
93       return true;
94     }
95     if (object == null || getClass() != object.getClass()) {
96       return false;
97     }
98
99     Nic nic = (Nic) object;
100
101     if (name != null ? !name.equals(nic.name) : nic.name != null) {
102       return false;
103     }
104     if (description != null ? !description.equals(nic.description) : nic.description != null) {
105       return false;
106     }
107     if (networkId != null ? !networkId.equals(nic.networkId) : nic.networkId != null) {
108       return false;
109     }
110     if (networkType != null ? !networkType.equals(nic.networkType) : nic.networkType != null) {
111       return false;
112     }
113     if (networkDescription != null ? !networkDescription.equals(nic.networkDescription) : nic.networkDescription != null) {
114       return false;
115     }
116     return networkType == nic.networkType;
117
118   }
119 }