
com.indeed.rabbitmq.admin.pojo.Consumer Maven / Gradle / Ivy
package com.indeed.rabbitmq.admin.pojo;
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;
/**
* Describes an active consumer of a RabbitMQ queue.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"consumer_tag",
"exclusive",
"ack_required",
"prefetch_count",
"channel_details",
"queue",
"arguments"
})
public class Consumer {
@JsonProperty("consumer_tag")
private java.lang.String consumerTag;
@JsonProperty("exclusive")
private Boolean exclusive;
@JsonProperty("ack_required")
private Boolean ackRequired;
@JsonProperty("prefetch_count")
private Long prefetchCount;
@JsonProperty("channel_details")
private ChannelDetails channelDetails;
@JsonProperty("queue")
private QueueDetails queue;
/**
* Additional arguments specified by the consumer.
*
*/
@JsonProperty("arguments")
@JsonPropertyDescription("Additional arguments specified by the consumer.")
private Map arguments;
@JsonIgnore
private Map additionalProperties = new HashMap();
@JsonProperty("consumer_tag")
public java.lang.String getConsumerTag() {
return consumerTag;
}
@JsonProperty("consumer_tag")
public void setConsumerTag(java.lang.String consumerTag) {
this.consumerTag = consumerTag;
}
public Consumer withConsumerTag(java.lang.String consumerTag) {
this.consumerTag = consumerTag;
return this;
}
@JsonProperty("exclusive")
public Boolean getExclusive() {
return exclusive;
}
@JsonProperty("exclusive")
public void setExclusive(Boolean exclusive) {
this.exclusive = exclusive;
}
public Consumer withExclusive(Boolean exclusive) {
this.exclusive = exclusive;
return this;
}
@JsonProperty("ack_required")
public Boolean getAckRequired() {
return ackRequired;
}
@JsonProperty("ack_required")
public void setAckRequired(Boolean ackRequired) {
this.ackRequired = ackRequired;
}
public Consumer withAckRequired(Boolean ackRequired) {
this.ackRequired = ackRequired;
return this;
}
@JsonProperty("prefetch_count")
public Long getPrefetchCount() {
return prefetchCount;
}
@JsonProperty("prefetch_count")
public void setPrefetchCount(Long prefetchCount) {
this.prefetchCount = prefetchCount;
}
public Consumer withPrefetchCount(Long prefetchCount) {
this.prefetchCount = prefetchCount;
return this;
}
@JsonProperty("channel_details")
public ChannelDetails getChannelDetails() {
return channelDetails;
}
@JsonProperty("channel_details")
public void setChannelDetails(ChannelDetails channelDetails) {
this.channelDetails = channelDetails;
}
public Consumer withChannelDetails(ChannelDetails channelDetails) {
this.channelDetails = channelDetails;
return this;
}
@JsonProperty("queue")
public QueueDetails getQueue() {
return queue;
}
@JsonProperty("queue")
public void setQueue(QueueDetails queue) {
this.queue = queue;
}
public Consumer withQueue(QueueDetails queue) {
this.queue = queue;
return this;
}
/**
* Additional arguments specified by the consumer.
*
*/
@JsonProperty("arguments")
public Map getArguments() {
return arguments;
}
/**
* Additional arguments specified by the consumer.
*
*/
@JsonProperty("arguments")
public void setArguments(Map arguments) {
this.arguments = arguments;
}
public Consumer withArguments(Map arguments) {
this.arguments = arguments;
return this;
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(java.lang.String name, java.lang.Object value) {
this.additionalProperties.put(name, value);
}
public Consumer withAdditionalProperty(java.lang.String name, java.lang.Object value) {
this.additionalProperties.put(name, value);
return this;
}
@Override
public java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Consumer.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("consumerTag");
sb.append('=');
sb.append(((this.consumerTag == null)?"":this.consumerTag));
sb.append(',');
sb.append("exclusive");
sb.append('=');
sb.append(((this.exclusive == null)?"":this.exclusive));
sb.append(',');
sb.append("ackRequired");
sb.append('=');
sb.append(((this.ackRequired == null)?"":this.ackRequired));
sb.append(',');
sb.append("prefetchCount");
sb.append('=');
sb.append(((this.prefetchCount == null)?"":this.prefetchCount));
sb.append(',');
sb.append("channelDetails");
sb.append('=');
sb.append(((this.channelDetails == null)?"":this.channelDetails));
sb.append(',');
sb.append("queue");
sb.append('=');
sb.append(((this.queue == null)?"":this.queue));
sb.append(',');
sb.append("arguments");
sb.append('=');
sb.append(((this.arguments == null)?"":this.arguments));
sb.append(',');
sb.append("additionalProperties");
sb.append('=');
sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.consumerTag == null)? 0 :this.consumerTag.hashCode()));
result = ((result* 31)+((this.prefetchCount == null)? 0 :this.prefetchCount.hashCode()));
result = ((result* 31)+((this.exclusive == null)? 0 :this.exclusive.hashCode()));
result = ((result* 31)+((this.arguments == null)? 0 :this.arguments.hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.ackRequired == null)? 0 :this.ackRequired.hashCode()));
result = ((result* 31)+((this.channelDetails == null)? 0 :this.channelDetails.hashCode()));
result = ((result* 31)+((this.queue == null)? 0 :this.queue.hashCode()));
return result;
}
@Override
public boolean equals(java.lang.Object other) {
if (other == this) {
return true;
}
if ((other instanceof Consumer) == false) {
return false;
}
Consumer rhs = ((Consumer) other);
return (((((((((this.consumerTag == rhs.consumerTag)||((this.consumerTag!= null)&&this.consumerTag.equals(rhs.consumerTag)))&&((this.prefetchCount == rhs.prefetchCount)||((this.prefetchCount!= null)&&this.prefetchCount.equals(rhs.prefetchCount))))&&((this.exclusive == rhs.exclusive)||((this.exclusive!= null)&&this.exclusive.equals(rhs.exclusive))))&&((this.arguments == rhs.arguments)||((this.arguments!= null)&&this.arguments.equals(rhs.arguments))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.ackRequired == rhs.ackRequired)||((this.ackRequired!= null)&&this.ackRequired.equals(rhs.ackRequired))))&&((this.channelDetails == rhs.channelDetails)||((this.channelDetails!= null)&&this.channelDetails.equals(rhs.channelDetails))))&&((this.queue == rhs.queue)||((this.queue!= null)&&this.queue.equals(rhs.queue))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy