com.volcengine.model.maas.api.v2.ChatResp Maven / Gradle / Ivy
Show all versions of volc-sdk-java Show documentation
package com.volcengine.model.maas.api.v2;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* MaasChatResponse
*
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"error",
"choices",
"usage",
"extra"
})
@Generated("jsonschema2pojo")
public class ChatResp extends BaseResponse {
/**
* Error
*
*
*
*/
@JsonProperty("error")
private Error error;
/**
* Choices
*
*
*
*/
@JsonProperty("choices")
private List choices = new ArrayList();
/**
* Usage
*
*
*
*/
@JsonProperty("usage")
private Usage usage;
/**
* Extra
*
*
*
*/
@JsonProperty("extra")
private Map extra;
/**
* Error
*
*
*
*/
@JsonProperty("error")
public Error getError() {
return error;
}
/**
* Error
*
*
*
*/
@JsonProperty("error")
public void setError(Error error) {
this.error = error;
}
public ChatResp withError(Error error) {
this.error = error;
return this;
}
/**
* Choices
*
*
*
*/
@JsonProperty("choices")
public List getChoices() {
return choices;
}
/**
* Choices
*
*
*
*/
@JsonProperty("choices")
public void setChoices(List choices) {
this.choices = choices;
}
public ChatResp withChoices(List choices) {
this.choices = choices;
return this;
}
/**
* Usage
*
*
*
*/
@JsonProperty("usage")
public Usage getUsage() {
return usage;
}
/**
* Usage
*
*
*
*/
@JsonProperty("usage")
public void setUsage(Usage usage) {
this.usage = usage;
}
public ChatResp withUsage(Usage usage) {
this.usage = usage;
return this;
}
/**
* Extra
*
*
*
*/
@JsonProperty("extra")
public Map getExtra() {
return extra;
}
/**
* Extra
*
*
*
*/
@JsonProperty("extra")
public void setExtra(Map extra) {
this.extra = extra;
}
public ChatResp withExtra(Map extra) {
this.extra = extra;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(ChatResp.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("error");
sb.append('=');
sb.append(((this.error == null)?"":this.error));
sb.append(',');
sb.append("choices");
sb.append('=');
sb.append(((this.choices == null)?"":this.choices));
sb.append(',');
sb.append("usage");
sb.append('=');
sb.append(((this.usage == null)?"":this.usage));
sb.append(',');
sb.append("extra");
sb.append('=');
sb.append(((this.extra == null)?"":this.extra));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.error == null)? 0 :this.error.hashCode()));
result = ((result* 31)+((this.choices == null)? 0 :this.choices.hashCode()));
result = ((result* 31)+((this.usage == null)? 0 :this.usage.hashCode()));
result = ((result* 31)+((this.extra == null)? 0 :this.extra.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ChatResp) == false) {
return false;
}
ChatResp rhs = ((ChatResp) other);
return (((((this.error == rhs.error)||((this.error!= null)&&this.error.equals(rhs.error)))&&((this.choices == rhs.choices)||((this.choices!= null)&&this.choices.equals(rhs.choices))))&&((this.usage == rhs.usage)||((this.usage!= null)&&this.usage.equals(rhs.usage))))&&((this.extra == rhs.extra)||((this.extra!= null)&&this.extra.equals(rhs.extra))));
}
}