com.dell.cpsd.hal.data.provider.api.ElementIdentity Maven / Gradle / Ivy
package com.dell.cpsd.hal.data.provider.api;
import java.util.ArrayList;
import java.util.List;
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;
/**
* ElementIdentity
*
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"uuid",
"elementType",
"identifier",
"serialNumber",
"businessKeys"
})
public class ElementIdentity {
@JsonProperty("uuid")
private String uuid;
/**
*
* (Required)
*
*/
@JsonProperty("elementType")
private String elementType;
/**
*
* (Required)
*
*/
@JsonProperty("identifier")
private String identifier;
@JsonProperty("serialNumber")
private String serialNumber;
@JsonProperty("businessKeys")
private List businessKeys = new ArrayList();
/**
* No args constructor for use in serialization
*
*/
public ElementIdentity() {
}
/**
*
* @param identifier
* @param serialNumber
* @param businessKeys
* @param uuid
* @param elementType
*/
public ElementIdentity(String uuid, String elementType, String identifier, String serialNumber, List businessKeys) {
super();
this.uuid = uuid;
this.elementType = elementType;
this.identifier = identifier;
this.serialNumber = serialNumber;
this.businessKeys = businessKeys;
}
/**
*
* @return
* The uuid
*/
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
/**
*
* @param uuid
* The uuid
*/
@JsonProperty("uuid")
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
*
* (Required)
*
* @return
* The elementType
*/
@JsonProperty("elementType")
public String getElementType() {
return elementType;
}
/**
*
* (Required)
*
* @param elementType
* The elementType
*/
@JsonProperty("elementType")
public void setElementType(String elementType) {
this.elementType = elementType;
}
/**
*
* (Required)
*
* @return
* The identifier
*/
@JsonProperty("identifier")
public String getIdentifier() {
return identifier;
}
/**
*
* (Required)
*
* @param identifier
* The identifier
*/
@JsonProperty("identifier")
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* @return
* The serialNumber
*/
@JsonProperty("serialNumber")
public String getSerialNumber() {
return serialNumber;
}
/**
*
* @param serialNumber
* The serialNumber
*/
@JsonProperty("serialNumber")
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
/**
*
* @return
* The businessKeys
*/
@JsonProperty("businessKeys")
public List getBusinessKeys() {
return businessKeys;
}
/**
*
* @param businessKeys
* The businessKeys
*/
@JsonProperty("businessKeys")
public void setBusinessKeys(List businessKeys) {
this.businessKeys = businessKeys;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(uuid).append(elementType).append(identifier).append(serialNumber).append(businessKeys).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ElementIdentity) == false) {
return false;
}
ElementIdentity rhs = ((ElementIdentity) other);
return new EqualsBuilder().append(uuid, rhs.uuid).append(elementType, rhs.elementType).append(identifier, rhs.identifier).append(serialNumber, rhs.serialNumber).append(businessKeys, rhs.businessKeys).isEquals();
}
}