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 StringCHATID_FIELDstatic StringINLINE_MESSAGE_ID_FIELDstatic StringMEDIA_FIELDstatic StringMESSAGEID_FIELDstatic StringPATHstatic StringREPLYMARKUP_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 SerializabledeserializeResponse(String answer)Deserialize a json answer to the response type to a methodStringgetChatId()StringgetInlineMessageId()InputMediagetMedia()IntegergetMessageId()InlineKeyboardMarkupgetReplyMarkup()EditMessageMediasetChatId(Long chatId)EditMessageMediasetChatId(String chatId)EditMessageMediasetInlineMessageId(String inlineMessageId)voidsetMedia(InputMedia media)EditMessageMediasetMessageId(Integer messageId)EditMessageMediasetReplyMarkup(InlineKeyboardMarkup replyMarkup)StringtoString()voidvalidate()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:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<Serializable>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-