com.huaweicloud.sdk.osm.v2.model.CreateLabelsReq Maven / Gradle / Ivy
package com.huaweicloud.sdk.osm.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* CreateLabelsReq
*/
public class CreateLabelsReq {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "name")
private String name;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "color")
private String color;
public CreateLabelsReq withName(String name) {
this.name = name;
return this;
}
/**
* 标签名称
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateLabelsReq withColor(String color) {
this.color = color;
return this;
}
/**
* 颜色值,如#000000
* @return color
*/
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CreateLabelsReq that = (CreateLabelsReq) obj;
return Objects.equals(this.name, that.name) && Objects.equals(this.color, that.color);
}
@Override
public int hashCode() {
return Objects.hash(name, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateLabelsReq {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).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 ");
}
}