2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
24 public class Nic implements CompositionDataEntity {
26 private String description;
27 private String networkId;
28 private String networkName;
29 private NetworkType networkType;
30 private String networkDescription;
32 public String getName() {
36 public void setName(String name) {
40 public String getDescription() {
44 public void setDescription(String description) {
45 this.description = description;
48 public String getNetworkId() {
52 public void setNetworkId(String networkId) {
53 this.networkId = networkId;
56 public String getNetworkName() {
60 public void setNetworkName(String networkName) {
61 this.networkName = networkName;
64 public NetworkType getNetworkType() {
68 public void setNetworkType(NetworkType networkType) {
69 this.networkType = networkType;
72 public String getNetworkDescription(){
73 return networkDescription;
76 public void setNetworkDescription(String networkDescription){
77 this.networkDescription=networkDescription;
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);
91 public boolean equals(Object object) {
95 if (object == null || getClass() != object.getClass()) {
99 Nic nic = (Nic) object;
101 if (name != null ? !name.equals(nic.name) : nic.name != null) {
104 if (description != null ? !description.equals(nic.description) : nic.description != null) {
107 if (networkId != null ? !networkId.equals(nic.networkId) : nic.networkId != null) {
110 if (networkType != null ? !networkType.equals(nic.networkType) : nic.networkType != null) {
113 if (networkDescription != null ? !networkDescription.equals(nic.networkDescription) : nic.networkDescription != null) {
116 return networkType == nic.networkType;