com.huaweicloud.sdk.hss.v5.model.ListVulHostsResponse 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 ListVulHostsResponse 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 ListVulHostsResponse withTotalNum(Integer totalNum) {
this.totalNum = totalNum;
return this;
}
/**
* 受影响的云服务器总数
* minimum: 0
* maximum: 10000
* @return totalNum
*/
public Integer getTotalNum() {
return totalNum;
}
public void setTotalNum(Integer totalNum) {
this.totalNum = totalNum;
}
public ListVulHostsResponse withDataList(List dataList) {
this.dataList = dataList;
return this;
}
public ListVulHostsResponse addDataListItem(VulHostInfo dataListItem) {
if (this.dataList == null) {
this.dataList = new ArrayList<>();
}
this.dataList.add(dataListItem);
return this;
}
public ListVulHostsResponse 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;
}
ListVulHostsResponse that = (ListVulHostsResponse) 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 ListVulHostsResponse {\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 ");
}
}