com.huaweicloud.sdk.geip.v3.model.CreateV2TagRequestBodyTag Maven / Gradle / Ivy
package com.huaweicloud.sdk.geip.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* 标签对象
*/
public class CreateV2TagRequestBodyTag {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "key")
private String key;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "value")
private String value;
public CreateV2TagRequestBodyTag withKey(String key) {
this.key = key;
return this;
}
/**
* - 功能说明:标签名称 - 约束: - 创建的预定义标签如果与已有的预定义标签完全相同,则会覆盖已有的预定义标签;若只有“键”相同,“值”不同,则为新创建的预定义标签。 - 键的长度最大36字符,由英文字母、数字、下划线、中划线、中文字符组成。 - 单个资源最多可以添加20个标签。
* @return key
*/
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public CreateV2TagRequestBodyTag withValue(String value) {
this.value = value;
return this;
}
/**
* - 功能说明:标签值 - 约束: - 值的长度最大43字符,由英文字母、数字、下划线、点、中划线、中文字符组成。
* @return value
*/
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CreateV2TagRequestBodyTag that = (CreateV2TagRequestBodyTag) obj;
return Objects.equals(this.key, that.key) && Objects.equals(this.value, that.value);
}
@Override
public int hashCode() {
return Objects.hash(key, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateV2TagRequestBodyTag {\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 ");
}
}