com.dell.cpsd.identity.service.api.ElementIdentity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of identity-service-api Show documentation
Show all versions of identity-service-api Show documentation
This repository creates a UUID for any managed element.
The newest version!
package com.dell.cpsd.identity.service.api;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"correlationUuid",
"identity"
})
public class ElementIdentity {
/**
* The correlation identifier for consumer to distinguish resolved uuids.
*
*/
@JsonProperty("correlationUuid")
@JsonPropertyDescription("")
private String correlationUuid;
/**
*
* (Required)
*
*/
@JsonProperty("identity")
private Identity identity;
/**
* No args constructor for use in serialization
*
*/
public ElementIdentity() {
}
/**
*
* @param identity
* @param correlationUuid
*/
public ElementIdentity(String correlationUuid, Identity identity) {
super();
this.correlationUuid = correlationUuid;
this.identity = identity;
}
/**
* The correlation identifier for consumer to distinguish resolved uuids.
*
* @return
* The correlationUuid
*/
@JsonProperty("correlationUuid")
public String getCorrelationUuid() {
return correlationUuid;
}
/**
* The correlation identifier for consumer to distinguish resolved uuids.
*
* @param correlationUuid
* The correlationUuid
*/
@JsonProperty("correlationUuid")
public void setCorrelationUuid(String correlationUuid) {
this.correlationUuid = correlationUuid;
}
/**
*
* (Required)
*
* @return
* The identity
*/
@JsonProperty("identity")
public Identity getIdentity() {
return identity;
}
/**
*
* (Required)
*
* @param identity
* The identity
*/
@JsonProperty("identity")
public void setIdentity(Identity identity) {
this.identity = identity;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(correlationUuid).append(identity).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(correlationUuid, rhs.correlationUuid).append(identity, rhs.identity).isEquals();
}
}