
com.zendesk.sunshine_conversations_client.model.TemplateMessage Maven / Gradle / Ivy
The newest version!
/*
* Sunshine Conversations API
*
* The version of the OpenAPI document: 15.5.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.zendesk.sunshine_conversations_client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.zendesk.sunshine_conversations_client.model.Content;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.math.BigDecimal;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* TemplateMessage
*/
@JsonPropertyOrder({
TemplateMessage.JSON_PROPERTY_TYPE,
TemplateMessage.JSON_PROPERTY_BLOCK_CHAT_INPUT,
TemplateMessage.JSON_PROPERTY_TEMPLATE
})
public class TemplateMessage implements Content {
public static final String JSON_PROPERTY_TYPE = "type";
private String type = "template";
public static final String JSON_PROPERTY_BLOCK_CHAT_INPUT = "blockChatInput";
private Boolean blockChatInput;
public static final String JSON_PROPERTY_TEMPLATE = "template";
private Object template;
public TemplateMessage type(String type) {
this.type = type;
return this;
}
/**
* The type of message.
* @return type
**/
@ApiModelProperty(required = true, value = "The type of message.")
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public TemplateMessage blockChatInput(Boolean blockChatInput) {
this.blockChatInput = blockChatInput;
return this;
}
/**
* When set to true, the chat input will be disabled on supported client implementations when the message is the most recent one in the history. Can be used for guided flows or to temporarily disable the user's ability to send messages in the conversation.
* @return blockChatInput
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "When set to true, the chat input will be disabled on supported client implementations when the message is the most recent one in the history. Can be used for guided flows or to temporarily disable the user's ability to send messages in the conversation.")
@JsonProperty(JSON_PROPERTY_BLOCK_CHAT_INPUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getBlockChatInput() {
return blockChatInput;
}
public void setBlockChatInput(Boolean blockChatInput) {
this.blockChatInput = blockChatInput;
}
public TemplateMessage template(Object template) {
this.template = template;
return this;
}
/**
* The whatsapp template message to send. For more information, consult the [guide](https://docs.smooch.io/guide/whatsapp#sending-message-templates). `schema` must be set to `whatsapp`.
* @return template
**/
@ApiModelProperty(required = true, value = "The whatsapp template message to send. For more information, consult the [guide](https://docs.smooch.io/guide/whatsapp#sending-message-templates). `schema` must be set to `whatsapp`.")
@JsonProperty(JSON_PROPERTY_TEMPLATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Object getTemplate() {
return template;
}
public void setTemplate(Object template) {
this.template = template;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemplateMessage templateMessage = (TemplateMessage) o;
return Objects.equals(this.type, templateMessage.type) &&
Objects.equals(this.blockChatInput, templateMessage.blockChatInput) &&
Objects.equals(this.template, templateMessage.template);
}
@Override
public int hashCode() {
return Objects.hash(type, blockChatInput, template);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemplateMessage {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" blockChatInput: ").append(toIndentedString(blockChatInput)).append("\n");
sb.append(" template: ").append(toIndentedString(template)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy