com.huaweicloud.sdk.ccm.v1.model.ListCertificateRequest 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;
/**
* Request Object
*/
public class ListCertificateRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "limit")
private Integer limit;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "name")
private String name;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "offset")
private Integer offset;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "status")
private String status;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "sort_key")
private String sortKey;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "sort_dir")
private String sortDir;
public ListCertificateRequest withLimit(Integer limit) {
this.limit = limit;
return this;
}
/**
* 指定查询返回记录条数,默认值10。
* minimum: 0
* maximum: 1000
* @return limit
*/
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public ListCertificateRequest withName(String name) {
this.name = name;
return this;
}
/**
* 私有证书名称,返回名称带有name字段的证书集合。
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ListCertificateRequest withOffset(Integer offset) {
this.offset = offset;
return this;
}
/**
* 索引位置,从offset指定的下一条数据开始查询。
* minimum: 0
* @return offset
*/
public Integer getOffset() {
return offset;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public ListCertificateRequest withStatus(String status) {
this.status = status;
return this;
}
/**
* 私有证书状态,通过状态过滤证书集合。 - **ISSUED** : 已签发; - **REVOKED** : 已吊销; - **EXPIRED** : 已过期。
* @return status
*/
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public ListCertificateRequest withSortKey(String sortKey) {
this.sortKey = sortKey;
return this;
}
/**
* 排序属性,目前支持以下属性: - **create_time** : 证书创建时间(默认) - **common_name** : 证书名称 - **issuer_name** : 签发CA名称 - **not_after** : 证书到期时间
* @return sortKey
*/
public String getSortKey() {
return sortKey;
}
public void setSortKey(String sortKey) {
this.sortKey = sortKey;
}
public ListCertificateRequest withSortDir(String sortDir) {
this.sortDir = sortDir;
return this;
}
/**
* 排序方向,支持以下值: - **DESC** : 降序(默认) - **ASC** : 升序
* @return sortDir
*/
public String getSortDir() {
return sortDir;
}
public void setSortDir(String sortDir) {
this.sortDir = sortDir;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListCertificateRequest that = (ListCertificateRequest) obj;
return Objects.equals(this.limit, that.limit) && Objects.equals(this.name, that.name)
&& Objects.equals(this.offset, that.offset) && Objects.equals(this.status, that.status)
&& Objects.equals(this.sortKey, that.sortKey) && Objects.equals(this.sortDir, that.sortDir);
}
@Override
public int hashCode() {
return Objects.hash(limit, name, offset, status, sortKey, sortDir);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListCertificateRequest {\n");
sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" sortKey: ").append(toIndentedString(sortKey)).append("\n");
sb.append(" sortDir: ").append(toIndentedString(sortDir)).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 ");
}
}