com.huaweicloud.sdk.hss.v5.model.ListPolicyGroupResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.hss.v5.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 ListPolicyGroupResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "total_num")
private Integer totalNum;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "data_list")
private List dataList = null;
public ListPolicyGroupResponse withTotalNum(Integer totalNum) {
this.totalNum = totalNum;
return this;
}
/**
* 总数
* minimum: 0
* maximum: 2147483647
* @return totalNum
*/
public Integer getTotalNum() {
return totalNum;
}
public void setTotalNum(Integer totalNum) {
this.totalNum = totalNum;
}
public ListPolicyGroupResponse withDataList(List dataList) {
this.dataList = dataList;
return this;
}
public ListPolicyGroupResponse addDataListItem(PolicyGroupResponseInfo dataListItem) {
if (this.dataList == null) {
this.dataList = new ArrayList<>();
}
this.dataList.add(dataListItem);
return this;
}
public ListPolicyGroupResponse withDataList(Consumer> dataListSetter) {
if (this.dataList == null) {
this.dataList = new ArrayList<>();
}
dataListSetter.accept(this.dataList);
return this;
}
/**
* 策略组列表
* @return dataList
*/
public List getDataList() {
return dataList;
}
public void setDataList(List dataList) {
this.dataList = dataList;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListPolicyGroupResponse that = (ListPolicyGroupResponse) obj;
return Objects.equals(this.totalNum, that.totalNum) && Objects.equals(this.dataList, that.dataList);
}
@Override
public int hashCode() {
return Objects.hash(totalNum, dataList);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListPolicyGroupResponse {\n");
sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n");
sb.append(" dataList: ").append(toIndentedString(dataList)).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 ");
}
}