Class EditMessageMedia
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<Serializable>
-
- org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia
-
- All Implemented Interfaces:
Validable
public class EditMessageMedia extends PartialBotApiMethod<Serializable>
- Version:
- 4.0.0 Use this method to edit audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHATID_FIELD
static String
INLINE_MESSAGE_ID_FIELD
static String
MEDIA_FIELD
static String
MESSAGEID_FIELD
static String
PATH
static String
REPLYMARKUP_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description EditMessageMedia()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable
deserializeResponse(String answer)
Deserialize a json answer to the response type to a methodString
getChatId()
String
getInlineMessageId()
InputMedia
getMedia()
Integer
getMessageId()
InlineKeyboardMarkup
getReplyMarkup()
EditMessageMedia
setChatId(Long chatId)
EditMessageMedia
setChatId(String chatId)
EditMessageMedia
setInlineMessageId(String inlineMessageId)
void
setMedia(InputMedia media)
EditMessageMedia
setMessageId(Integer messageId)
EditMessageMedia
setReplyMarkup(InlineKeyboardMarkup replyMarkup)
String
toString()
void
validate()
Validates that mandatory fields are filled and optional objects
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
CHATID_FIELD
public static final String CHATID_FIELD
- See Also:
- Constant Field Values
-
MESSAGEID_FIELD
public static final String MESSAGEID_FIELD
- See Also:
- Constant Field Values
-
INLINE_MESSAGE_ID_FIELD
public static final String INLINE_MESSAGE_ID_FIELD
- See Also:
- Constant Field Values
-
MEDIA_FIELD
public static final String MEDIA_FIELD
- See Also:
- Constant Field Values
-
REPLYMARKUP_FIELD
public static final String REPLYMARKUP_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChatId
public String getChatId()
-
setChatId
public EditMessageMedia setChatId(String chatId)
-
setChatId
public EditMessageMedia setChatId(Long chatId)
-
getMessageId
public Integer getMessageId()
-
setMessageId
public EditMessageMedia setMessageId(Integer messageId)
-
getInlineMessageId
public String getInlineMessageId()
-
setInlineMessageId
public EditMessageMedia setInlineMessageId(String inlineMessageId)
-
getMedia
public InputMedia getMedia()
-
setMedia
public void setMedia(InputMedia media)
-
getReplyMarkup
public InlineKeyboardMarkup getReplyMarkup()
-
setReplyMarkup
public EditMessageMedia setReplyMarkup(InlineKeyboardMarkup replyMarkup)
-
deserializeResponse
public Serializable deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethod
Deserialize a json answer to the response type to a method- Specified by:
deserializeResponse
in classPartialBotApiMethod<Serializable>
- Parameters:
answer
- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationException
Description copied from interface:Validable
Validates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException
- If any mandatory field is empty
-
-