package org.opennaas.extensions.router.capabilities.api.model.chassis;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
/*
* #%L
* OpenNaaS :: CIM Model
* %%
* Copyright (C) 2007 - 2014 FundaciĆ³ Privada i2CAT, Internet i InnovaciĆ³ a Catalunya
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/**
* Interface information
*
* @author Julio Carlos Barrera
*
*/
@XmlRootElement(namespace = "opennaas.api")
@XmlAccessorType(XmlAccessType.FIELD)
public class InterfaceInfo {
private String name;
private String peerUnit;
private String vlan;
private String state;
private String description;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPeerUnit() {
return peerUnit;
}
public void setPeerUnit(String peerUnit) {
this.peerUnit = peerUnit;
}
public String getVlan() {
return vlan;
}
public void setVlan(String vlan) {
this.vlan = vlan;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((peerUnit == null) ? 0 : peerUnit.hashCode());
result = prime * result + ((state == null) ? 0 : state.hashCode());
result = prime * result + ((vlan == null) ? 0 : vlan.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
InterfaceInfo other = (InterfaceInfo) obj;
if (description == null) {
if (other.description != null)
return false;
} else if (!description.equals(other.description))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (peerUnit == null) {
if (other.peerUnit != null)
return false;
} else if (!peerUnit.equals(other.peerUnit))
return false;
if (state == null) {
if (other.state != null)
return false;
} else if (!state.equals(other.state))
return false;
if (vlan == null) {
if (other.vlan != null)
return false;
} else if (!vlan.equals(other.vlan))
return false;
return true;
}
}