com.huaweicloud.sdk.sis.v1.model.ShowVocabulariesResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.sis.v1.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 ShowVocabulariesResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "count")
private Integer count;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "result")
private List result = null;
public ShowVocabulariesResponse withCount(Integer count) {
this.count = count;
return this;
}
/**
* 热词表数。
* @return count
*/
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public ShowVocabulariesResponse withResult(List result) {
this.result = result;
return this;
}
public ShowVocabulariesResponse addResultItem(VocabInfo resultItem) {
if (this.result == null) {
this.result = new ArrayList<>();
}
this.result.add(resultItem);
return this;
}
public ShowVocabulariesResponse withResult(Consumer> resultSetter) {
if (this.result == null) {
this.result = new ArrayList<>();
}
resultSetter.accept(this.result);
return this;
}
/**
* 调用成功返回热词表列表,调用失败时无此字段。
* @return result
*/
public List getResult() {
return result;
}
public void setResult(List result) {
this.result = result;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowVocabulariesResponse that = (ShowVocabulariesResponse) obj;
return Objects.equals(this.count, that.count) && Objects.equals(this.result, that.result);
}
@Override
public int hashCode() {
return Objects.hash(count, result);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowVocabulariesResponse {\n");
sb.append(" count: ").append(toIndentedString(count)).append("\n");
sb.append(" result: ").append(toIndentedString(result)).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 ");
}
}