com.katalon.testops.api.model.Pageable 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.Sort;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Pageable
*/
@JsonPropertyOrder({
Pageable.JSON_PROPERTY_SORT,
Pageable.JSON_PROPERTY_OFFSET,
Pageable.JSON_PROPERTY_PAGE_NUMBER,
Pageable.JSON_PROPERTY_PAGE_SIZE,
Pageable.JSON_PROPERTY_PAGED,
Pageable.JSON_PROPERTY_UNPAGED
})
@JsonTypeName("Pageable")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Pageable implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_SORT = "sort";
private Sort sort;
public static final String JSON_PROPERTY_OFFSET = "offset";
private Long offset;
public static final String JSON_PROPERTY_PAGE_NUMBER = "pageNumber";
private Integer pageNumber;
public static final String JSON_PROPERTY_PAGE_SIZE = "pageSize";
private Integer pageSize;
public static final String JSON_PROPERTY_PAGED = "paged";
private Boolean paged;
public static final String JSON_PROPERTY_UNPAGED = "unpaged";
private Boolean unpaged;
public Pageable sort(Sort sort) {
this.sort = sort;
return this;
}
/**
* Get sort
* @return sort
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SORT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Sort getSort() {
return sort;
}
public void setSort(Sort sort) {
this.sort = sort;
}
public Pageable offset(Long offset) {
this.offset = offset;
return this;
}
/**
* Get offset
* @return offset
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OFFSET)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getOffset() {
return offset;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Pageable pageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
return this;
}
/**
* Get pageNumber
* @return pageNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PAGE_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getPageNumber() {
return pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
}
public Pageable pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Get pageSize
* @return pageSize
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PAGE_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Pageable paged(Boolean paged) {
this.paged = paged;
return this;
}
/**
* Get paged
* @return paged
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PAGED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getPaged() {
return paged;
}
public void setPaged(Boolean paged) {
this.paged = paged;
}
public Pageable unpaged(Boolean unpaged) {
this.unpaged = unpaged;
return this;
}
/**
* Get unpaged
* @return unpaged
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_UNPAGED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getUnpaged() {
return unpaged;
}
public void setUnpaged(Boolean unpaged) {
this.unpaged = unpaged;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Pageable pageable = (Pageable) o;
return Objects.equals(this.sort, pageable.sort) &&
Objects.equals(this.offset, pageable.offset) &&
Objects.equals(this.pageNumber, pageable.pageNumber) &&
Objects.equals(this.pageSize, pageable.pageSize) &&
Objects.equals(this.paged, pageable.paged) &&
Objects.equals(this.unpaged, pageable.unpaged);
}
@Override
public int hashCode() {
return Objects.hash(sort, offset, pageNumber, pageSize, paged, unpaged);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Pageable {\n");
sb.append(" sort: ").append(toIndentedString(sort)).append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n");
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
sb.append(" paged: ").append(toIndentedString(paged)).append("\n");
sb.append(" unpaged: ").append(toIndentedString(unpaged)).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 ");
}
}