Class InputPaidMedia
Object
InputPaidMedia
- All Implemented Interfaces:
Serializable,BotApiObject,Validable
- Direct Known Subclasses:
InputPaidMediaPhoto,InputPaidMediaVideo
- Version:
- 7.5 This object describes the paid media to be sent. Currently, it can be one of InputPaidMediaPhoto InputPaidMediaVideo
- Author:
- Ruben Bermudez
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInputPaidMedia.InputPaidMediaBuilder<C extends InputPaidMedia,B extends InputPaidMedia.InputPaidMediaBuilder<C, B>> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetType()booleanvoidUse this setter to send new file.voidsetMedia(InputStream mediaStream, String fileName) Use this setter to send new file as stream.voidUse this setter to send an existing file (using file_id) or an url.voidvalidate()Validates that mandatory fields are filled and optional objects
-
Field Details
-
TYPE_FIELD
- See Also:
-
MEDIA_FIELD
- See Also:
-
-
Constructor Details
-
InputPaidMedia
public InputPaidMedia()
-
-
Method Details
-
isNewMedia
public boolean isNewMedia() -
setMedia
Use this setter to send an existing file (using file_id) or an url.- Parameters:
media- File_id or URL of the file to send
-
setMedia
Use this setter to send new file.- Parameters:
mediaFile- File to send
-
setMedia
Use this setter to send new file as stream.- Parameters:
mediaStream- File to send
-
validate
Description copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Specified by:
validatein interfaceValidable- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
getType
-