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

com.indeed.rabbitmq.admin.pojo.User 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 description of a RabbitMQ user account.
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "name",
    "password",
    "password_hash",
    "hashing_algorithm",
    "tags"
})
public class User {

    /**
     * The user name.
     * 
     */
    @JsonProperty("name")
    @JsonPropertyDescription("The user name.")
    private String name;
    /**
     * The user password in plain text.
     * 
     */
    @JsonProperty("password")
    @JsonPropertyDescription("The user password in plain text.")
    private String password;
    /**
     * A hashed representation of the user password.
     * 
     */
    @JsonProperty("password_hash")
    @JsonPropertyDescription("A hashed representation of the user password.")
    private String passwordHash;
    /**
     * The hashing algorithm.
     * 
     */
    @JsonProperty("hashing_algorithm")
    @JsonPropertyDescription("The hashing algorithm.")
    private String hashingAlgorithm;
    /**
     * Tags associated with this user.
     * 
     */
    @JsonProperty("tags")
    @JsonPropertyDescription("Tags associated with this user.")
    private String tags;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    /**
     * The user name.
     * 
     */
    @JsonProperty("name")
    public String getName() {
        return name;
    }

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

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

    /**
     * The user password in plain text.
     * 
     */
    @JsonProperty("password")
    public String getPassword() {
        return password;
    }

    /**
     * The user password in plain text.
     * 
     */
    @JsonProperty("password")
    public void setPassword(String password) {
        this.password = password;
    }

    public User withPassword(String password) {
        this.password = password;
        return this;
    }

    /**
     * A hashed representation of the user password.
     * 
     */
    @JsonProperty("password_hash")
    public String getPasswordHash() {
        return passwordHash;
    }

    /**
     * A hashed representation of the user password.
     * 
     */
    @JsonProperty("password_hash")
    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }

    public User withPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
        return this;
    }

    /**
     * The hashing algorithm.
     * 
     */
    @JsonProperty("hashing_algorithm")
    public String getHashingAlgorithm() {
        return hashingAlgorithm;
    }

    /**
     * The hashing algorithm.
     * 
     */
    @JsonProperty("hashing_algorithm")
    public void setHashingAlgorithm(String hashingAlgorithm) {
        this.hashingAlgorithm = hashingAlgorithm;
    }

    public User withHashingAlgorithm(String hashingAlgorithm) {
        this.hashingAlgorithm = hashingAlgorithm;
        return this;
    }

    /**
     * Tags associated with this user.
     * 
     */
    @JsonProperty("tags")
    public String getTags() {
        return tags;
    }

    /**
     * Tags associated with this user.
     * 
     */
    @JsonProperty("tags")
    public void setTags(String tags) {
        this.tags = tags;
    }

    public User withTags(String tags) {
        this.tags = tags;
        return this;
    }

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

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

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

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(User.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("password");
        sb.append('=');
        sb.append(((this.password == null)?"":this.password));
        sb.append(',');
        sb.append("passwordHash");
        sb.append('=');
        sb.append(((this.passwordHash == null)?"":this.passwordHash));
        sb.append(',');
        sb.append("hashingAlgorithm");
        sb.append('=');
        sb.append(((this.hashingAlgorithm == null)?"":this.hashingAlgorithm));
        sb.append(',');
        sb.append("tags");
        sb.append('=');
        sb.append(((this.tags == null)?"":this.tags));
        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.password == null)? 0 :this.password.hashCode()));
        result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
        result = ((result* 31)+((this.hashingAlgorithm == null)? 0 :this.hashingAlgorithm.hashCode()));
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.passwordHash == null)? 0 :this.passwordHash.hashCode()));
        result = ((result* 31)+((this.tags == null)? 0 :this.tags.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof User) == false) {
            return false;
        }
        User rhs = ((User) other);
        return (((((((this.password == rhs.password)||((this.password!= null)&&this.password.equals(rhs.password)))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.hashingAlgorithm == rhs.hashingAlgorithm)||((this.hashingAlgorithm!= null)&&this.hashingAlgorithm.equals(rhs.hashingAlgorithm))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.passwordHash == rhs.passwordHash)||((this.passwordHash!= null)&&this.passwordHash.equals(rhs.passwordHash))))&&((this.tags == rhs.tags)||((this.tags!= null)&&this.tags.equals(rhs.tags))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy