com.huaweicloud.sdk.iotanalytics.v1.model.SaslPlainAuthInfo Maven / Gradle / Ivy
package com.huaweicloud.sdk.iotanalytics.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* sasl plain 认证信息
*/
public class SaslPlainAuthInfo {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "username")
private String username;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "password")
private String password;
public SaslPlainAuthInfo withUsername(String username) {
this.username = username;
return this;
}
/**
* 用户名。支持大小写字母、数字、“.”、“-” 、“_”
* @return username
*/
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public SaslPlainAuthInfo withPassword(String password) {
this.password = password;
return this;
}
/**
* 密码
* @return password
*/
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
SaslPlainAuthInfo that = (SaslPlainAuthInfo) obj;
return Objects.equals(this.username, that.username) && Objects.equals(this.password, that.password);
}
@Override
public int hashCode() {
return Objects.hash(username, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SaslPlainAuthInfo {\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}