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

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


/**
 * A context under which a RabbitMQ node is executing.
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "node",
    "description",
    "path",
    "port"
})
public class Context {

    /**
     * The node to which this context applies.
     * 
     */
    @JsonProperty("node")
    @JsonPropertyDescription("The node to which this context applies.")
    private String node;
    /**
     * A description of this context.
     * 
     */
    @JsonProperty("description")
    @JsonPropertyDescription("A description of this context.")
    private String description;
    /**
     * The context path.
     * 
     */
    @JsonProperty("path")
    @JsonPropertyDescription("The context path.")
    private String path;
    /**
     * The context port.
     * 
     */
    @JsonProperty("port")
    @JsonPropertyDescription("The context port.")
    private String port;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    /**
     * The node to which this context applies.
     * 
     */
    @JsonProperty("node")
    public String getNode() {
        return node;
    }

    /**
     * The node to which this context applies.
     * 
     */
    @JsonProperty("node")
    public void setNode(String node) {
        this.node = node;
    }

    public Context withNode(String node) {
        this.node = node;
        return this;
    }

    /**
     * A description of this context.
     * 
     */
    @JsonProperty("description")
    public String getDescription() {
        return description;
    }

    /**
     * A description of this context.
     * 
     */
    @JsonProperty("description")
    public void setDescription(String description) {
        this.description = description;
    }

    public Context withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * The context path.
     * 
     */
    @JsonProperty("path")
    public String getPath() {
        return path;
    }

    /**
     * The context path.
     * 
     */
    @JsonProperty("path")
    public void setPath(String path) {
        this.path = path;
    }

    public Context withPath(String path) {
        this.path = path;
        return this;
    }

    /**
     * The context port.
     * 
     */
    @JsonProperty("port")
    public String getPort() {
        return port;
    }

    /**
     * The context port.
     * 
     */
    @JsonProperty("port")
    public void setPort(String port) {
        this.port = port;
    }

    public Context withPort(String port) {
        this.port = port;
        return this;
    }

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

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

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

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(Context.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("node");
        sb.append('=');
        sb.append(((this.node == null)?"":this.node));
        sb.append(',');
        sb.append("description");
        sb.append('=');
        sb.append(((this.description == null)?"":this.description));
        sb.append(',');
        sb.append("path");
        sb.append('=');
        sb.append(((this.path == null)?"":this.path));
        sb.append(',');
        sb.append("port");
        sb.append('=');
        sb.append(((this.port == null)?"":this.port));
        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.node == null)? 0 :this.node.hashCode()));
        result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
        result = ((result* 31)+((this.path == null)? 0 :this.path.hashCode()));
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.port == null)? 0 :this.port.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof Context) == false) {
            return false;
        }
        Context rhs = ((Context) other);
        return ((((((this.node == rhs.node)||((this.node!= null)&&this.node.equals(rhs.node)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.path == rhs.path)||((this.path!= null)&&this.path.equals(rhs.path))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.port == rhs.port)||((this.port!= null)&&this.port.equals(rhs.port))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy