public class AnswerCallbackQuery extends BotApiMethod<Boolean>
Modifier and Type | Field and Description |
---|---|
static String |
PATH |
METHOD_FIELD
OBJECT_MAPPER
Constructor and Description |
---|
AnswerCallbackQuery() |
Modifier and Type | Method and Description |
---|---|
Boolean |
deserializeResponse(String answer)
Deserialize a json answer to the response type to a method
|
Integer |
getCacheTime() |
String |
getCallbackQueryId() |
String |
getMethod()
Getter for method path (that is the same as method name)
|
Boolean |
getShowAlert() |
String |
getText() |
String |
getUrl() |
void |
setCacheTime(Integer cacheTime) |
AnswerCallbackQuery |
setCallbackQueryId(String callbackQueryId) |
AnswerCallbackQuery |
setShowAlert(Boolean showAlert) |
AnswerCallbackQuery |
setText(String text) |
AnswerCallbackQuery |
setUrl(String url) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public String getCallbackQueryId()
public AnswerCallbackQuery setCallbackQueryId(String callbackQueryId)
public String getText()
public AnswerCallbackQuery setText(String text)
public Boolean getShowAlert()
public AnswerCallbackQuery setShowAlert(Boolean showAlert)
public String getUrl()
public AnswerCallbackQuery setUrl(String url)
public Integer getCacheTime()
public void setCacheTime(Integer cacheTime)
public String getMethod()
BotApiMethod
getMethod
in class BotApiMethod<Boolean>
public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethod
deserializeResponse
in class PartialBotApiMethod<Boolean>
answer
- Json answer receivedTelegramApiRequestException
public void validate() throws TelegramApiValidationException
Validable
TelegramApiValidationException
- If any mandatory field is emptyCopyright © 2016. All rights reserved.