Class InputMedia

java.lang.Object
io.micronaut.chatbots.telegram.api.InputMedia
Direct Known Subclasses:
InputMediaDocument, InputMediaPhoto

public abstract class InputMedia extends Object
This object represents the content of a media message to be sent. It should be one of: - InputMediaAnimation - InputMediaDocument - InputMediaPhoto - InputMediaVideo
  • Constructor Details

    • InputMedia

      protected InputMedia(@NonNull @NonNull String type)
  • Method Details

    • getType

      @NonNull public @NonNull String getType()
      Returns:
      Type of the result, must be photo.
    • setType

      public void setType(@NonNull @NonNull String type)
      Parameters:
      type - Type of the result, must be photo.
    • getMedia

      @NonNull public @NonNull String getMedia()
      Returns:
      File to send.
    • setMedia

      public void setMedia(@NonNull @NonNull String media)
      Parameters:
      media - File to send.
    • getCaption

      @Nullable public @Nullable String getCaption()
      Returns:
      Caption of the audio to be sent, 0-1024 characters
    • setCaption

      public void setCaption(@Nullable @Nullable String caption)
      Parameters:
      caption - Caption of the audio to be sent, 0-1024 characters
    • getParseMode

      @Nullable public @Nullable 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 @Nullable 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 @Nullable 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 @Nullable List<MessageEntity> captionEntities)
      Parameters:
      captionEntities - List of special entities that appear in the caption, which can be specified instead of parse_mode.
    • toString

      public String toString()
      Overrides:
      toString in class Object