com.huaweicloud.sdk.csms.v1.model.ListSecretVersionsResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.csms.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class ListSecretVersionsResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "version_metadatas")
private List versionMetadatas = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "page_info")
private PageInfo pageInfo;
public ListSecretVersionsResponse withVersionMetadatas(List versionMetadatas) {
this.versionMetadatas = versionMetadatas;
return this;
}
public ListSecretVersionsResponse addVersionMetadatasItem(VersionMetadata versionMetadatasItem) {
if (this.versionMetadatas == null) {
this.versionMetadatas = new ArrayList<>();
}
this.versionMetadatas.add(versionMetadatasItem);
return this;
}
public ListSecretVersionsResponse withVersionMetadatas(Consumer> versionMetadatasSetter) {
if (this.versionMetadatas == null) {
this.versionMetadatas = new ArrayList<>();
}
versionMetadatasSetter.accept(this.versionMetadatas);
return this;
}
/**
* version_metadata对象。
* @return versionMetadatas
*/
public List getVersionMetadatas() {
return versionMetadatas;
}
public void setVersionMetadatas(List versionMetadatas) {
this.versionMetadatas = versionMetadatas;
}
public ListSecretVersionsResponse withPageInfo(PageInfo pageInfo) {
this.pageInfo = pageInfo;
return this;
}
public ListSecretVersionsResponse withPageInfo(Consumer pageInfoSetter) {
if (this.pageInfo == null) {
this.pageInfo = new PageInfo();
pageInfoSetter.accept(this.pageInfo);
}
return this;
}
/**
* Get pageInfo
* @return pageInfo
*/
public PageInfo getPageInfo() {
return pageInfo;
}
public void setPageInfo(PageInfo pageInfo) {
this.pageInfo = pageInfo;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListSecretVersionsResponse that = (ListSecretVersionsResponse) obj;
return Objects.equals(this.versionMetadatas, that.versionMetadatas)
&& Objects.equals(this.pageInfo, that.pageInfo);
}
@Override
public int hashCode() {
return Objects.hash(versionMetadatas, pageInfo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListSecretVersionsResponse {\n");
sb.append(" versionMetadatas: ").append(toIndentedString(versionMetadatas)).append("\n");
sb.append(" pageInfo: ").append(toIndentedString(pageInfo)).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 ");
}
}