com.huaweicloud.sdk.gaussdbforopengauss.v3.model.ValidateParaGroupNameRequest Maven / Gradle / Ivy
package com.huaweicloud.sdk.gaussdbforopengauss.v3.model;
import java.util.Collections;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class ValidateParaGroupNameRequest {
/**
* 语言
*/
public static final class XLanguageEnum {
/**
* Enum ZH_CN for value: "zh-cn"
*/
public static final XLanguageEnum ZH_CN = new XLanguageEnum("zh-cn");
/**
* Enum EN_US for value: "en-us"
*/
public static final XLanguageEnum EN_US = new XLanguageEnum("en-us");
private static final Map STATIC_FIELDS = createStaticFields();
private static Map createStaticFields() {
Map map = new HashMap<>();
map.put("zh-cn", ZH_CN);
map.put("en-us", EN_US);
return Collections.unmodifiableMap(map);
}
private String value;
XLanguageEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static XLanguageEnum fromValue(String value) {
if( value == null ){
return null;
}
XLanguageEnum result = STATIC_FIELDS.get(value);
if (result == null) {
result = new XLanguageEnum(value);
}
return result;
}
public static XLanguageEnum valueOf(String value) {
if( value == null ){
return null;
}
XLanguageEnum result = STATIC_FIELDS.get(value);
if (result != null) {
return result;
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
@Override
public boolean equals(Object obj) {
if (obj instanceof XLanguageEnum) {
return this.value.equals(((XLanguageEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="X-Language")
private XLanguageEnum xLanguage;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="name")
private String name;
public ValidateParaGroupNameRequest withXLanguage(XLanguageEnum xLanguage) {
this.xLanguage = xLanguage;
return this;
}
/**
* 语言
* @return xLanguage
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="X-Language")
public XLanguageEnum getXLanguage() {
return xLanguage;
}
public void setXLanguage(XLanguageEnum xLanguage) {
this.xLanguage = xLanguage;
}
public ValidateParaGroupNameRequest withName(String name) {
this.name = name;
return this;
}
/**
* 参数组名称。
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ValidateParaGroupNameRequest validateParaGroupNameRequest = (ValidateParaGroupNameRequest) o;
return Objects.equals(this.xLanguage, validateParaGroupNameRequest.xLanguage) &&
Objects.equals(this.name, validateParaGroupNameRequest.name);
}
@Override
public int hashCode() {
return Objects.hash(xLanguage, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ValidateParaGroupNameRequest {\n");
sb.append(" xLanguage: ").append(toIndentedString(xLanguage)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}