public class SendMessage extends BotApiMethod<Message>
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH |
METHOD_FIELD| Constructor and Description |
|---|
SendMessage() |
| Modifier and Type | Method and Description |
|---|---|
Message |
deserializeResponse(org.json.JSONObject answer)
Deserialize a json answer to the response type to a method
|
SendMessage |
disableNotification() |
SendMessage |
disableWebPagePreview() |
SendMessage |
enableHtml(boolean enable) |
SendMessage |
enableMarkdown(boolean enable) |
SendMessage |
enableNotification() |
SendMessage |
enableWebPagePreview() |
String |
getChatId() |
Boolean |
getDisableNotification() |
Boolean |
getDisableWebPagePreview() |
String |
getPath()
Getter for method path (that is the same as method name)
|
ReplyKeyboard |
getReplyMarkup() |
Integer |
getReplyToMessageId() |
String |
getText() |
void |
serialize(com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers) |
void |
serializeWithType(com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers,
com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) |
SendMessage |
setChatId(String chatId) |
SendMessage |
setReplyMarkup(ReplyKeyboard replyMarkup) |
SendMessage |
setReplyToMessageId(Integer replyToMessageId) |
SendMessage |
setText(String text) |
org.json.JSONObject |
toJson()
Convert to json object
|
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public String getChatId()
public SendMessage setChatId(String chatId)
public String getText()
public SendMessage setText(String text)
public Integer getReplyToMessageId()
public SendMessage setReplyToMessageId(Integer replyToMessageId)
public ReplyKeyboard getReplyMarkup()
public SendMessage setReplyMarkup(ReplyKeyboard replyMarkup)
public Boolean getDisableWebPagePreview()
public Boolean getDisableNotification()
public SendMessage disableWebPagePreview()
public SendMessage enableWebPagePreview()
public SendMessage enableNotification()
public SendMessage disableNotification()
public SendMessage enableMarkdown(boolean enable)
public SendMessage enableHtml(boolean enable)
public org.json.JSONObject toJson()
IToJsonpublic String getPath()
BotApiMethodgetPath in class BotApiMethod<Message>public Message deserializeResponse(org.json.JSONObject answer)
BotApiMethoddeserializeResponse in class BotApiMethod<Message>answer - Json answer receivedpublic void validate()
throws TelegramApiValidationException
ValidableTelegramApiValidationException - If any mandatory field is emptypublic void serialize(com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers)
throws IOException
IOExceptionpublic void serializeWithType(com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers,
com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
throws IOException
IOExceptionCopyright © 2016. All rights reserved.