com.huaweicloud.sdk.ccm.v1.model.Resources Maven / Gradle / Ivy
package com.huaweicloud.sdk.ccm.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* Resources
*/
public class Resources {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private String type;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "used")
private Integer used;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "quota")
private Integer quota;
public Resources withType(String type) {
this.type = type;
return this;
}
/**
* 证书类型: - **CERTIFICATE_AUTHORITY**: CA证书; - **CERTIFICATE**: 私有证书。
* @return type
*/
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Resources withUsed(Integer used) {
this.used = used;
return this;
}
/**
* 已使用配额数。
* @return used
*/
public Integer getUsed() {
return used;
}
public void setUsed(Integer used) {
this.used = used;
}
public Resources withQuota(Integer quota) {
this.quota = quota;
return this;
}
/**
* 配额总数: - **CERTIFICATE_AUTHORITY**: 当前系统指定100; - **CERTIFICATE**: 当前系统指定100000。
* @return quota
*/
public Integer getQuota() {
return quota;
}
public void setQuota(Integer quota) {
this.quota = quota;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
Resources that = (Resources) obj;
return Objects.equals(this.type, that.type) && Objects.equals(this.used, that.used)
&& Objects.equals(this.quota, that.quota);
}
@Override
public int hashCode() {
return Objects.hash(type, used, quota);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Resources {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" used: ").append(toIndentedString(used)).append("\n");
sb.append(" quota: ").append(toIndentedString(quota)).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 ");
}
}