
com.indeed.rabbitmq.admin.pojo.Bind 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;
/**
* Definition of a binding to create from an exchange to an exchange or queue.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"routing_key",
"arguments"
})
public class Bind {
/**
* The binding key or binding pattern.
*
* How this value is applied to the message routing key is dependent on the type of the source exchange.
*
*/
@JsonProperty("routing_key")
@JsonPropertyDescription("How this value is applied to the message routing key is dependent on the type of the source exchange.")
private java.lang.String routingKey;
/**
* Additional arguments to apply to the binding being created.
*
*/
@JsonProperty("arguments")
@JsonPropertyDescription("Additional arguments to apply to the binding being created.")
private Map arguments;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* The binding key or binding pattern.
*
* How this value is applied to the message routing key is dependent on the type of the source exchange.
*
*/
@JsonProperty("routing_key")
public java.lang.String getRoutingKey() {
return routingKey;
}
/**
* The binding key or binding pattern.
*
* How this value is applied to the message routing key is dependent on the type of the source exchange.
*
*/
@JsonProperty("routing_key")
public void setRoutingKey(java.lang.String routingKey) {
this.routingKey = routingKey;
}
public Bind withRoutingKey(java.lang.String routingKey) {
this.routingKey = routingKey;
return this;
}
/**
* Additional arguments to apply to the binding being created.
*
*/
@JsonProperty("arguments")
public Map getArguments() {
return arguments;
}
/**
* Additional arguments to apply to the binding being created.
*
*/
@JsonProperty("arguments")
public void setArguments(Map arguments) {
this.arguments = arguments;
}
public Bind 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 Bind 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(Bind.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("routingKey");
sb.append('=');
sb.append(((this.routingKey == null)?"":this.routingKey));
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.arguments == null)? 0 :this.arguments.hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.routingKey == null)? 0 :this.routingKey.hashCode()));
return result;
}
@Override
public boolean equals(java.lang.Object other) {
if (other == this) {
return true;
}
if ((other instanceof Bind) == false) {
return false;
}
Bind rhs = ((Bind) other);
return ((((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.routingKey == rhs.routingKey)||((this.routingKey!= null)&&this.routingKey.equals(rhs.routingKey))));
}
}