com.huaweicloud.sdk.cloudtest.v1.model.BasePageInfoTestPoint Maven / Gradle / Ivy
package com.huaweicloud.sdk.cloudtest.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* BasePageInfoTestPoint
*/
public class BasePageInfoTestPoint {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "limit")
private Integer limit;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "list")
private List list = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "offset")
private Integer offset;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "pages")
private Integer pages;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "size")
private Integer size;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "total")
private Long total;
public BasePageInfoTestPoint withLimit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Get limit
* @return limit
*/
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public BasePageInfoTestPoint withList(List list) {
this.list = list;
return this;
}
public BasePageInfoTestPoint addListItem(TestPoint listItem) {
if (this.list == null) {
this.list = new ArrayList<>();
}
this.list.add(listItem);
return this;
}
public BasePageInfoTestPoint withList(Consumer> listSetter) {
if (this.list == null) {
this.list = new ArrayList<>();
}
listSetter.accept(this.list);
return this;
}
/**
* Get list
* @return list
*/
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
}
public BasePageInfoTestPoint withOffset(Integer offset) {
this.offset = offset;
return this;
}
/**
* Get offset
* @return offset
*/
public Integer getOffset() {
return offset;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public BasePageInfoTestPoint withPages(Integer pages) {
this.pages = pages;
return this;
}
/**
* Get pages
* @return pages
*/
public Integer getPages() {
return pages;
}
public void setPages(Integer pages) {
this.pages = pages;
}
public BasePageInfoTestPoint withSize(Integer size) {
this.size = size;
return this;
}
/**
* Get size
* @return size
*/
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public BasePageInfoTestPoint withTotal(Long total) {
this.total = total;
return this;
}
/**
* Get total
* @return total
*/
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
BasePageInfoTestPoint that = (BasePageInfoTestPoint) obj;
return Objects.equals(this.limit, that.limit) && Objects.equals(this.list, that.list)
&& Objects.equals(this.offset, that.offset) && Objects.equals(this.pages, that.pages)
&& Objects.equals(this.size, that.size) && Objects.equals(this.total, that.total);
}
@Override
public int hashCode() {
return Objects.hash(limit, list, offset, pages, size, total);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BasePageInfoTestPoint {\n");
sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
sb.append(" list: ").append(toIndentedString(list)).append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" pages: ").append(toIndentedString(pages)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" total: ").append(toIndentedString(total)).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 ");
}
}