Class InputMedia
- java.lang.Object
-
- io.micronaut.chatbots.telegram.api.InputMedia
-
- Direct Known Subclasses:
InputMediaDocument
,InputMediaPhoto
public abstract class InputMedia extends java.lang.Object
This object represents the content of a media message to be sent. It should be one of: -InputMediaAnimation
-InputMediaDocument
-InputMediaPhoto
-InputMediaVideo
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InputMedia(java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCaption()
java.util.List<MessageEntity>
getCaptionEntities()
java.lang.String
getMedia()
java.lang.String
getParseMode()
java.lang.String
getType()
void
setCaption(java.lang.String caption)
void
setCaptionEntities(java.util.List<MessageEntity> captionEntities)
void
setMedia(java.lang.String media)
void
setParseMode(java.lang.String parseMode)
void
setType(java.lang.String type)
java.lang.String
toString()
-
-
-
Method Detail
-
getType
@NonNull public java.lang.String getType()
- Returns:
- Type of the result, must be photo.
-
setType
public void setType(@NonNull java.lang.String type)
- Parameters:
type
- Type of the result, must be photo.
-
getMedia
@NonNull public java.lang.String getMedia()
- Returns:
- File to send.
-
setMedia
public void setMedia(@NonNull java.lang.String media)
- Parameters:
media
- File to send.
-
getCaption
@Nullable public java.lang.String getCaption()
- Returns:
- Caption of the audio to be sent, 0-1024 characters
-
setCaption
public void setCaption(@Nullable java.lang.String caption)
- Parameters:
caption
- Caption of the audio to be sent, 0-1024 characters
-
getParseMode
@Nullable public java.lang.String getParseMode()
- Returns:
- Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
-
setParseMode
public void setParseMode(@Nullable java.lang.String parseMode)
- Parameters:
parseMode
- Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
-
getCaptionEntities
@Nullable public java.util.List<MessageEntity> getCaptionEntities()
- Returns:
- List of special entities that appear in the caption, which can be specified instead of parse_mode.
-
setCaptionEntities
public void setCaptionEntities(@Nullable java.util.List<MessageEntity> captionEntities)
- Parameters:
captionEntities
- List of special entities that appear in the caption, which can be specified instead of parse_mode.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-