com.dell.cpsd.hal.data.provider.api.NetworkIdentity Maven / Gradle / Ivy
package com.dell.cpsd.hal.data.provider.api;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"ipV4Address",
"ipV6Address",
"macAddress"
})
public class NetworkIdentity {
@JsonProperty("ipV4Address")
private String ipV4Address;
@JsonProperty("ipV6Address")
private String ipV6Address;
@JsonProperty("macAddress")
private String macAddress;
/**
* No args constructor for use in serialization
*
*/
public NetworkIdentity() {
}
/**
*
* @param macAddress
* @param ipV4Address
* @param ipV6Address
*/
public NetworkIdentity(String ipV4Address, String ipV6Address, String macAddress) {
super();
this.ipV4Address = ipV4Address;
this.ipV6Address = ipV6Address;
this.macAddress = macAddress;
}
/**
*
* @return
* The ipV4Address
*/
@JsonProperty("ipV4Address")
public String getIpV4Address() {
return ipV4Address;
}
/**
*
* @param ipV4Address
* The ipV4Address
*/
@JsonProperty("ipV4Address")
public void setIpV4Address(String ipV4Address) {
this.ipV4Address = ipV4Address;
}
/**
*
* @return
* The ipV6Address
*/
@JsonProperty("ipV6Address")
public String getIpV6Address() {
return ipV6Address;
}
/**
*
* @param ipV6Address
* The ipV6Address
*/
@JsonProperty("ipV6Address")
public void setIpV6Address(String ipV6Address) {
this.ipV6Address = ipV6Address;
}
/**
*
* @return
* The macAddress
*/
@JsonProperty("macAddress")
public String getMacAddress() {
return macAddress;
}
/**
*
* @param macAddress
* The macAddress
*/
@JsonProperty("macAddress")
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(ipV4Address).append(ipV6Address).append(macAddress).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof NetworkIdentity) == false) {
return false;
}
NetworkIdentity rhs = ((NetworkIdentity) other);
return new EqualsBuilder().append(ipV4Address, rhs.ipV4Address).append(ipV6Address, rhs.ipV6Address).append(macAddress, rhs.macAddress).isEquals();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy