All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.indeed.rabbitmq.admin.pojo.Exchange 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.JsonPropertyOrder;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "name",
    "vhost",
    "type",
    "durable",
    "auto_delete",
    "internal",
    "message_stats",
    "arguments"
})
public class Exchange {

    @JsonProperty("name")
    private String name;
    @JsonProperty("vhost")
    private String vhost;
    @JsonProperty("type")
    private String type;
    @JsonProperty("durable")
    private Boolean durable;
    @JsonProperty("auto_delete")
    private Boolean autoDelete;
    @JsonProperty("internal")
    private Boolean internal;
    @JsonProperty("message_stats")
    private ExchangeStatistics messageStats;
    @JsonProperty("arguments")
    private Object arguments;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    @JsonProperty("name")
    public String getName() {
        return name;
    }

    @JsonProperty("name")
    public void setName(String name) {
        this.name = name;
    }

    public Exchange withName(String name) {
        this.name = name;
        return this;
    }

    @JsonProperty("vhost")
    public String getVhost() {
        return vhost;
    }

    @JsonProperty("vhost")
    public void setVhost(String vhost) {
        this.vhost = vhost;
    }

    public Exchange withVhost(String vhost) {
        this.vhost = vhost;
        return this;
    }

    @JsonProperty("type")
    public String getType() {
        return type;
    }

    @JsonProperty("type")
    public void setType(String type) {
        this.type = type;
    }

    public Exchange withType(String type) {
        this.type = type;
        return this;
    }

    @JsonProperty("durable")
    public Boolean getDurable() {
        return durable;
    }

    @JsonProperty("durable")
    public void setDurable(Boolean durable) {
        this.durable = durable;
    }

    public Exchange withDurable(Boolean durable) {
        this.durable = durable;
        return this;
    }

    @JsonProperty("auto_delete")
    public Boolean getAutoDelete() {
        return autoDelete;
    }

    @JsonProperty("auto_delete")
    public void setAutoDelete(Boolean autoDelete) {
        this.autoDelete = autoDelete;
    }

    public Exchange withAutoDelete(Boolean autoDelete) {
        this.autoDelete = autoDelete;
        return this;
    }

    @JsonProperty("internal")
    public Boolean getInternal() {
        return internal;
    }

    @JsonProperty("internal")
    public void setInternal(Boolean internal) {
        this.internal = internal;
    }

    public Exchange withInternal(Boolean internal) {
        this.internal = internal;
        return this;
    }

    @JsonProperty("message_stats")
    public ExchangeStatistics getMessageStats() {
        return messageStats;
    }

    @JsonProperty("message_stats")
    public void setMessageStats(ExchangeStatistics messageStats) {
        this.messageStats = messageStats;
    }

    public Exchange withMessageStats(ExchangeStatistics messageStats) {
        this.messageStats = messageStats;
        return this;
    }

    @JsonProperty("arguments")
    public Object getArguments() {
        return arguments;
    }

    @JsonProperty("arguments")
    public void setArguments(Object arguments) {
        this.arguments = arguments;
    }

    public Exchange withArguments(Object arguments) {
        this.arguments = arguments;
        return this;
    }

    @JsonAnyGetter
    public Map getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public Exchange withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(Exchange.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("name");
        sb.append('=');
        sb.append(((this.name == null)?"":this.name));
        sb.append(',');
        sb.append("vhost");
        sb.append('=');
        sb.append(((this.vhost == null)?"":this.vhost));
        sb.append(',');
        sb.append("type");
        sb.append('=');
        sb.append(((this.type == null)?"":this.type));
        sb.append(',');
        sb.append("durable");
        sb.append('=');
        sb.append(((this.durable == null)?"":this.durable));
        sb.append(',');
        sb.append("autoDelete");
        sb.append('=');
        sb.append(((this.autoDelete == null)?"":this.autoDelete));
        sb.append(',');
        sb.append("internal");
        sb.append('=');
        sb.append(((this.internal == null)?"":this.internal));
        sb.append(',');
        sb.append("messageStats");
        sb.append('=');
        sb.append(((this.messageStats == null)?"":this.messageStats));
        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.vhost == null)? 0 :this.vhost.hashCode()));
        result = ((result* 31)+((this.durable == null)? 0 :this.durable.hashCode()));
        result = ((result* 31)+((this.internal == null)? 0 :this.internal.hashCode()));
        result = ((result* 31)+((this.messageStats == null)? 0 :this.messageStats.hashCode()));
        result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
        result = ((result* 31)+((this.autoDelete == null)? 0 :this.autoDelete.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.type == null)? 0 :this.type.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof Exchange) == false) {
            return false;
        }
        Exchange rhs = ((Exchange) other);
        return ((((((((((this.vhost == rhs.vhost)||((this.vhost!= null)&&this.vhost.equals(rhs.vhost)))&&((this.durable == rhs.durable)||((this.durable!= null)&&this.durable.equals(rhs.durable))))&&((this.internal == rhs.internal)||((this.internal!= null)&&this.internal.equals(rhs.internal))))&&((this.messageStats == rhs.messageStats)||((this.messageStats!= null)&&this.messageStats.equals(rhs.messageStats))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.autoDelete == rhs.autoDelete)||((this.autoDelete!= null)&&this.autoDelete.equals(rhs.autoDelete))))&&((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.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy