cloud.genesys.webmessaging.sdk.model.ContentText Maven / Gradle / Ivy
package cloud.genesys.webmessaging.sdk.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.util.Objects;
import java.io.IOException;
import cloud.genesys.webmessaging.sdk.model.TextType;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* Text content. Message content element containing text only.
*/
@ApiModel(description = "Text content. Message content element containing text only.")
public class ContentText implements Serializable {
private String body = null;
private TextType type = null;
/**
* Text to be shown for this content element.
**/
public ContentText body(String body) {
this.body = body;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "Text to be shown for this content element.")
@JsonProperty("body")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
/**
* Type of text content.
**/
public ContentText type(TextType type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "Type of text content.")
@JsonProperty("type")
public TextType getType() {
return type;
}
public void setType(TextType type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContentText contentText = (ContentText) o;
return Objects.equals(this.body, contentText.body) &&
Objects.equals(this.type, contentText.type);
}
@Override
public int hashCode() {
return Objects.hash(body, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ContentText {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}
}