TDLightTelegramBots/src/main/java/org/telegram/telegrambots/api/methods/SendDocument.java

77 lines
2.2 KiB
Java
Raw Normal View History

2016-01-14 23:09:19 +01:00
package org.telegram.telegrambots.api.methods;
2016-01-14 01:14:53 +01:00
2016-01-14 23:09:19 +01:00
import org.telegram.telegrambots.api.objects.ReplyKeyboard;
2016-01-14 01:14:53 +01:00
/**
* @author Ruben Bermudez
* @version 1.0
* @brief Use this method to send general files. On success, the sent Message is returned.
* @date 20 of June of 2015
*/
public class SendDocument {
public static final String PATH = "senddocument";
public static final String CHATID_FIELD = "chat_id";
private String chatId; ///< Unique identifier for the chat to send the message to or Username for the channel to send the message to
public static final String DOCUMENT_FIELD = "document";
private String document; ///< File file to send. file_id as String to resend a file that is already on the Telegram servers
public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id";
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
public static final String REPLYMARKUP_FIELD = "reply_markup";
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
private boolean isNewDocument;
private String documentName;
public SendDocument() {
super();
}
public String getChatId() {
return chatId;
}
public void setChatId(String chatId) {
this.chatId = chatId;
}
public String getDocument() {
return document;
}
public void setDocument(String document) {
this.document = document;
this.isNewDocument = false;
}
public void setNewDocument(String document, String documentName) {
this.document = document;
this.isNewDocument = true;
this.documentName = documentName;
}
public boolean isNewDocument() {
return isNewDocument;
}
public String getDocumentName() {
return documentName;
}
public Integer getReplayToMessageId() {
return replayToMessageId;
}
public void setReplayToMessageId(Integer replayToMessageId) {
this.replayToMessageId = replayToMessageId;
}
public ReplyKeyboard getReplayMarkup() {
return replayMarkup;
}
public void setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup;
}
}