2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.vpnservice.itm.confighelpers;
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.TunnelTypeBase;
15 * Created by eanraju on 02-Feb-16.
19 private String transportZone;
20 private Class<? extends TunnelTypeBase> tunnel_type;
21 private IpPrefix ipPrefix;
22 private IpAddress gatewayIP;
24 private String topo_id;
25 private String node_id;
29 public boolean equals(Object o) {
30 if (this == o) return true;
31 if (o == null || getClass() != o.getClass()) return false;
33 HwVtep HwVtep = (HwVtep) o;
35 if (vlanID != HwVtep.vlanID) return false;
36 if (!transportZone.equals(HwVtep.transportZone)) return false;
37 if (tunnel_type != null ? !tunnel_type.equals(HwVtep.tunnel_type) : HwVtep.tunnel_type != null) return false;
38 if (!ipPrefix.equals(HwVtep.ipPrefix)) return false;
39 if (gatewayIP != null ? !gatewayIP.equals(HwVtep.gatewayIP) : HwVtep.gatewayIP != null) return false;
40 if (!topo_id.equals(HwVtep.topo_id)) return false;
41 if (!node_id.equals(HwVtep.node_id)) return false;
42 return hwIp.equals(HwVtep.hwIp);
47 public String toString() {
49 "transportZone='" + transportZone + '\'' +
50 ", tunnel_type=" + tunnel_type +
51 ", ipPrefix=" + ipPrefix +
52 ", gatewayIP=" + gatewayIP +
53 ", vlanID=" + vlanID +
54 ", topo_id='" + topo_id + '\'' +
55 ", node_id='" + node_id + '\'' +
61 public int hashCode() {
62 int result = transportZone.hashCode();
63 result = 31 * result + (tunnel_type != null ? tunnel_type.hashCode() : 0);
64 result = 31 * result + ipPrefix.hashCode();
65 result = 31 * result + (gatewayIP != null ? gatewayIP.hashCode() : 0);
66 result = 31 * result + vlanID;
67 result = 31 * result + topo_id.hashCode();
68 result = 31 * result + node_id.hashCode();
69 result = 31 * result + hwIp.hashCode();
73 public String getTransportZone() {
77 public void setTransportZone(String transportZone) {
78 this.transportZone = transportZone;
81 public Class<? extends TunnelTypeBase> getTunnel_type() {
85 public void setTunnel_type(Class<? extends TunnelTypeBase> tunnel_type) {
86 this.tunnel_type = tunnel_type;
89 public IpPrefix getIpPrefix() {
93 public void setIpPrefix(IpPrefix ipPrefix) {
94 this.ipPrefix = ipPrefix;
97 public IpAddress getGatewayIP() {
101 public void setGatewayIP(IpAddress gatewayIP) {
102 this.gatewayIP = gatewayIP;
105 public int getVlanID() {
109 public void setVlanID(int vlanID) {
110 this.vlanID = vlanID;
113 public String getTopo_id() {
117 public void setTopo_id(String topo_id) {
118 this.topo_id = topo_id;
121 public String getNode_id() {
125 public void setNode_id(String node_id) {
126 this.node_id = node_id;
129 public IpAddress getHwIp() {
133 public void setHwIp(IpAddress hwIp) {