com.dell.cpsd.sample.service.api.MessageProperties Maven / Gradle / Ivy
package com.dell.cpsd.sample.service.api;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
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;
/**
* AMQP properties properties
*
* AMQP properties.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"timestamp",
"correlationId",
"replyTo"
})
public class MessageProperties implements Serializable
{
/**
* Message timestamp
*
* Message creation timestamp.
* (Required)
*
*/
@JsonProperty("timestamp")
@JsonPropertyDescription("Message creation timestamp.")
private Date timestamp;
/**
* Correlation ID
*
* Messages chain reference.
* (Required)
*
*/
@JsonProperty("correlationId")
@JsonPropertyDescription("Messages chain reference.")
private String correlationId;
/**
* Reply-to identifier.
*
* Reply-to identifier. Default format is: {@literal'.'}
*
*/
@JsonProperty("replyTo")
@JsonPropertyDescription("Reply-to identifier. Default format is: {@literal'.'}")
private String replyTo;
@JsonIgnore
private Map additionalProperties = new HashMap();
private final static long serialVersionUID = 3401394770546483686L;
/**
* No args constructor for use in serialization
*
*/
public MessageProperties() {
}
/**
*
* @param replyTo
* @param correlationId
* @param timestamp
*/
public MessageProperties(Date timestamp, String correlationId, String replyTo) {
super();
this.timestamp = timestamp;
this.correlationId = correlationId;
this.replyTo = replyTo;
}
/**
* Message timestamp
*
* Message creation timestamp.
* (Required)
*
*/
@JsonProperty("timestamp")
public Date getTimestamp() {
return timestamp;
}
/**
* Message timestamp
*
* Message creation timestamp.
* (Required)
*
*/
@JsonProperty("timestamp")
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
/**
* Correlation ID
*
* Messages chain reference.
* (Required)
*
*/
@JsonProperty("correlationId")
public String getCorrelationId() {
return correlationId;
}
/**
* Correlation ID
*
* Messages chain reference.
* (Required)
*
*/
@JsonProperty("correlationId")
public void setCorrelationId(String correlationId) {
this.correlationId = correlationId;
}
/**
* Reply-to identifier.
*
* Reply-to identifier. Default format is: {@literal'.'}
*
*/
@JsonProperty("replyTo")
public String getReplyTo() {
return replyTo;
}
/**
* Reply-to identifier.
*
* Reply-to identifier. Default format is: {@literal'.'}
*
*/
@JsonProperty("replyTo")
public void setReplyTo(String replyTo) {
this.replyTo = replyTo;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(timestamp).append(correlationId).append(replyTo).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof MessageProperties) == false) {
return false;
}
MessageProperties rhs = ((MessageProperties) other);
return new EqualsBuilder().append(timestamp, rhs.timestamp).append(correlationId, rhs.correlationId).append(replyTo, rhs.replyTo).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}