com.huaweicloud.sdk.osm.v2.model.CreateAskQuestionRequest Maven / Gradle / Ivy
package com.huaweicloud.sdk.osm.v2.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 CreateAskQuestionRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-service-key")
private String xServiceKey;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-site")
private String xSite;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-language")
private String xLanguage;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private AskQuestionReq body;
public CreateAskQuestionRequest withXServiceKey(String xServiceKey) {
this.xServiceKey = xServiceKey;
return this;
}
/**
* 调用智能客服服务标志。
* @return xServiceKey
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-service-key")
public String getXServiceKey() {
return xServiceKey;
}
public void setXServiceKey(String xServiceKey) {
this.xServiceKey = xServiceKey;
}
public CreateAskQuestionRequest withXSite(String xSite) {
this.xSite = xSite;
return this;
}
/**
* 站点标记,0-中国站 1-国际站
* @return xSite
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-site")
public String getXSite() {
return xSite;
}
public void setXSite(String xSite) {
this.xSite = xSite;
}
public CreateAskQuestionRequest withXLanguage(String xLanguage) {
this.xLanguage = xLanguage;
return this;
}
/**
* 区域语言简写,en-us zh-cn
* @return xLanguage
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "x-language")
public String getXLanguage() {
return xLanguage;
}
public void setXLanguage(String xLanguage) {
this.xLanguage = xLanguage;
}
public CreateAskQuestionRequest withBody(AskQuestionReq body) {
this.body = body;
return this;
}
public CreateAskQuestionRequest withBody(Consumer bodySetter) {
if (this.body == null) {
this.body = new AskQuestionReq();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public AskQuestionReq getBody() {
return body;
}
public void setBody(AskQuestionReq 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;
}
CreateAskQuestionRequest that = (CreateAskQuestionRequest) obj;
return Objects.equals(this.xServiceKey, that.xServiceKey) && Objects.equals(this.xSite, that.xSite)
&& Objects.equals(this.xLanguage, that.xLanguage) && Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(xServiceKey, xSite, xLanguage, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAskQuestionRequest {\n");
sb.append(" xServiceKey: ").append(toIndentedString(xServiceKey)).append("\n");
sb.append(" xSite: ").append(toIndentedString(xSite)).append("\n");
sb.append(" xLanguage: ").append(toIndentedString(xLanguage)).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 ");
}
}