com.huaweicloud.sdk.sis.v1.model.ShowVocabulariesRequest Maven / Gradle / Ivy
package com.huaweicloud.sdk.sis.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Request Object
*/
public class ShowVocabulariesRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "offset")
private Integer offset;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "limit")
private Integer limit;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private ShowVocabulariesParams body;
public ShowVocabulariesRequest withOffset(Integer offset) {
this.offset = offset;
return this;
}
/**
* 页码偏移量,表示从此页码偏移量开始查询,offset大于等于0。
* @return offset
*/
public Integer getOffset() {
return offset;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public ShowVocabulariesRequest withLimit(Integer limit) {
this.limit = limit;
return this;
}
/**
* 每页显示的条目数量。
* @return limit
*/
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public ShowVocabulariesRequest withBody(ShowVocabulariesParams body) {
this.body = body;
return this;
}
public ShowVocabulariesRequest withBody(Consumer bodySetter) {
if (this.body == null) {
this.body = new ShowVocabulariesParams();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public ShowVocabulariesParams getBody() {
return body;
}
public void setBody(ShowVocabulariesParams body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowVocabulariesRequest that = (ShowVocabulariesRequest) obj;
return Objects.equals(this.offset, that.offset) && Objects.equals(this.limit, that.limit)
&& Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(offset, limit, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowVocabulariesRequest {\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).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 ");
}
}