public class SendChatAction extends BotApiMethod<Boolean>
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_FIELD |
static String |
CHATID_FIELD |
static String |
PATH |
METHOD_FIELDOBJECT_MAPPER| Constructor and Description |
|---|
SendChatAction() |
SendChatAction(Long chatId,
String action) |
SendChatAction(String chatId,
String action) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
deserializeResponse(String answer)
Deserialize a json answer to the response type to a method
|
ActionType |
getAction() |
String |
getChatId() |
String |
getMethod()
Getter for method path (that is the same as method name)
|
SendChatAction |
setAction(ActionType action) |
SendChatAction |
setChatId(Long chatId) |
SendChatAction |
setChatId(String chatId) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public static final String CHATID_FIELD
public static final String ACTION_FIELD
public String getChatId()
public ActionType getAction()
public SendChatAction setChatId(String chatId)
public SendChatAction setChatId(Long chatId)
public SendChatAction setAction(ActionType action)
public String getMethod()
BotApiMethodgetMethod in class BotApiMethod<Boolean>public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethoddeserializeResponse in class PartialBotApiMethod<Boolean>answer - Json answer receivedTelegramApiRequestExceptionpublic void validate()
throws TelegramApiValidationException
ValidableTelegramApiValidationException - If any mandatory field is emptyCopyright © 2017. All rights reserved.