public class SendPoll extends BotApiMethod<Message>
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH |
METHOD_FIELDOBJECT_MAPPER| Constructor and Description |
|---|
SendPoll() |
SendPoll(Long chatId,
String question,
List<String> options) |
SendPoll(String chatId,
String question,
List<String> options) |
| Modifier and Type | Method and Description |
|---|---|
Message |
deserializeResponse(String answer)
Deserialize a json answer to the response type to a method
|
SendPoll |
disableNotification() |
SendPoll |
enableNotification() |
boolean |
equals(Object o) |
String |
getChatId() |
Boolean |
getDisableNotification() |
String |
getMethod()
Getter for method path (that is the same as method name)
|
List<String> |
getOptions() |
String |
getQuestion() |
ReplyKeyboard |
getReplyMarkup() |
Integer |
getReplyToMessageId() |
int |
hashCode() |
SendPoll |
setChatId(Long chatId) |
SendPoll |
setChatId(String chatId) |
SendPoll |
setOptions(List<String> options) |
SendPoll |
setQuestion(String question) |
SendPoll |
setReplyMarkup(ReplyKeyboard replyMarkup) |
SendPoll |
setReplyToMessageId(Integer replyToMessageId) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public String getChatId()
public String getQuestion()
public Integer getReplyToMessageId()
public ReplyKeyboard getReplyMarkup()
public SendPoll setReplyMarkup(ReplyKeyboard replyMarkup)
public Boolean getDisableNotification()
public SendPoll enableNotification()
public SendPoll disableNotification()
public String getMethod()
BotApiMethodgetMethod in class BotApiMethod<Message>public Message deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethoddeserializeResponse in class PartialBotApiMethod<Message>answer - Json answer receivedTelegramApiRequestExceptionpublic void validate()
throws TelegramApiValidationException
ValidableTelegramApiValidationException - If any mandatory field is emptyCopyright © 2019. All rights reserved.