com.katalon.testops.api.model.SearchRequestPagination Maven / Gradle / Ivy
/*
* Katalon TestOps API reference
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.katalon.testops.api.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.katalon.testops.api.model.SearchRequestSortOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* SearchRequestPagination
*/
@JsonPropertyOrder({
SearchRequestPagination.JSON_PROPERTY_PAGE,
SearchRequestPagination.JSON_PROPERTY_SIZE,
SearchRequestPagination.JSON_PROPERTY_SORTS
})
@JsonTypeName("SearchRequestPagination")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SearchRequestPagination implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_PAGE = "page";
private Integer page;
public static final String JSON_PROPERTY_SIZE = "size";
private Integer size;
public static final String JSON_PROPERTY_SORTS = "sorts";
private List sorts = null;
public SearchRequestPagination page(Integer page) {
this.page = page;
return this;
}
/**
* Get page
* @return page
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public SearchRequestPagination size(Integer size) {
this.size = size;
return this;
}
/**
* Get size
* @return size
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public SearchRequestPagination sorts(List sorts) {
this.sorts = sorts;
return this;
}
public SearchRequestPagination addSortsItem(SearchRequestSortOrder sortsItem) {
if (this.sorts == null) {
this.sorts = new ArrayList<>();
}
this.sorts.add(sortsItem);
return this;
}
/**
* Get sorts
* @return sorts
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SORTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getSorts() {
return sorts;
}
public void setSorts(List sorts) {
this.sorts = sorts;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SearchRequestPagination searchRequestPagination = (SearchRequestPagination) o;
return Objects.equals(this.page, searchRequestPagination.page) &&
Objects.equals(this.size, searchRequestPagination.size) &&
Objects.equals(this.sorts, searchRequestPagination.sorts);
}
@Override
public int hashCode() {
return Objects.hash(page, size, sorts);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SearchRequestPagination {\n");
sb.append(" page: ").append(toIndentedString(page)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" sorts: ").append(toIndentedString(sorts)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}