com.dell.cpsd.SIOGatewayAckMessage Maven / Gradle / Ivy
package com.dell.cpsd;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import com.dell.cpsd.common.rabbitmq.annotation.Message;
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;
/**
* This message comes from the adapter and gets sent to fru-paqx
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@Message(value = "com.dell.cpsd.coprhd.sio.gateway.ack", version = "1.0")
@JsonPropertyOrder({
"messageProperties",
"status",
"sioObjectId"
})
public class SIOGatewayAckMessage implements Serializable
{
/**
* AMQP properties properties
*
*
* Corresponds to the "messageProperties" property.AMQP properties.
*
*/
@JsonProperty("messageProperties")
@JsonPropertyDescription("AMQP properties.")
private MessageProperties messageProperties;
@JsonProperty("status")
private String status;
@JsonProperty("sioObjectId")
private String sioObjectId;
@JsonIgnore
private Map additionalProperties = new HashMap();
private final static long serialVersionUID = 2327750001760615666L;
/**
* No args constructor for use in serialization
*
*/
public SIOGatewayAckMessage() {
}
/**
*
* @param messageProperties
* @param sioObjectId
* @param status
*/
public SIOGatewayAckMessage(MessageProperties messageProperties, String status, String sioObjectId) {
super();
this.messageProperties = messageProperties;
this.status = status;
this.sioObjectId = sioObjectId;
}
/**
* AMQP properties properties
*
*
* Corresponds to the "messageProperties" property.AMQP properties.
*
*/
@JsonProperty("messageProperties")
public MessageProperties getMessageProperties() {
return messageProperties;
}
/**
* AMQP properties properties
*
*
* Corresponds to the "messageProperties" property.AMQP properties.
*
*/
@JsonProperty("messageProperties")
public void setMessageProperties(MessageProperties messageProperties) {
this.messageProperties = messageProperties;
}
@JsonProperty("status")
public String getStatus() {
return status;
}
@JsonProperty("status")
public void setStatus(String status) {
this.status = status;
}
@JsonProperty("sioObjectId")
public String getSioObjectId() {
return sioObjectId;
}
@JsonProperty("sioObjectId")
public void setSioObjectId(String sioObjectId) {
this.sioObjectId = sioObjectId;
}
@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(messageProperties).append(status).append(sioObjectId).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof SIOGatewayAckMessage) == false) {
return false;
}
SIOGatewayAckMessage rhs = ((SIOGatewayAckMessage) other);
return new EqualsBuilder().append(messageProperties, rhs.messageProperties).append(status, rhs.status).append(sioObjectId, rhs.sioObjectId).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}