Bump versions by 0.1.0 for next dev cycle
[vpnservice.git] / itm / itm-impl / src / main / java / org / opendaylight / vpnservice / itm / confighelpers / HwVtep.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.vpnservice.itm.confighelpers;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.TunnelTypeBase;
13
14 /**
15  * Created by eanraju on 02-Feb-16.
16  */
17 public class HwVtep {
18
19     private String transportZone;
20     private Class<? extends TunnelTypeBase> tunnel_type;
21     private IpPrefix ipPrefix;
22     private IpAddress gatewayIP;
23     private int vlanID;
24     private String topo_id;
25     private String node_id;
26     IpAddress hwIp;
27
28     @Override
29     public boolean equals(Object o) {
30         if (this == o) return true;
31         if (o == null || getClass() != o.getClass()) return false;
32
33         HwVtep HwVtep = (HwVtep) o;
34
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);
43
44     }
45
46     @Override
47     public String toString() {
48         return "HwVtep{" +
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 + '\'' +
56                 ", hwIp=" + hwIp +
57                 '}';
58     }
59
60     @Override
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();
70         return result;
71     }
72
73     public String getTransportZone() {
74         return transportZone;
75     }
76
77     public void setTransportZone(String transportZone) {
78         this.transportZone = transportZone;
79     }
80
81     public Class<? extends TunnelTypeBase> getTunnel_type() {
82         return tunnel_type;
83     }
84
85     public void setTunnel_type(Class<? extends TunnelTypeBase> tunnel_type) {
86         this.tunnel_type = tunnel_type;
87     }
88
89     public IpPrefix getIpPrefix() {
90         return ipPrefix;
91     }
92
93     public void setIpPrefix(IpPrefix ipPrefix) {
94         this.ipPrefix = ipPrefix;
95     }
96
97     public IpAddress getGatewayIP() {
98         return gatewayIP;
99     }
100
101     public void setGatewayIP(IpAddress gatewayIP) {
102         this.gatewayIP = gatewayIP;
103     }
104
105     public int getVlanID() {
106         return vlanID;
107     }
108
109     public void setVlanID(int vlanID) {
110         this.vlanID = vlanID;
111     }
112
113     public String getTopo_id() {
114         return topo_id;
115     }
116
117     public void setTopo_id(String topo_id) {
118         this.topo_id = topo_id;
119     }
120
121     public String getNode_id() {
122         return node_id;
123     }
124
125     public void setNode_id(String node_id) {
126         this.node_id = node_id;
127     }
128
129     public IpAddress getHwIp() {
130         return hwIp;
131     }
132
133     public void setHwIp(IpAddress hwIp) {
134         this.hwIp = hwIp;
135     }
136 }