Class SendDocument
- All Implemented Interfaces:
Validable
- Version:
- 1.0 Use this method to send general files. On success, the sent Message is returned.
- Author:
- Ruben Bermudez
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
SendDocument.SendDocumentBuilder<C extends SendDocument,
B extends SendDocument.SendDocumentBuilder<C, B>> Nested classes/interfaces inherited from class SendMediaBotMethod
SendMediaBotMethod.SendMediaBotMethodBuilder<T extends Serializable,
C extends SendMediaBotMethod<T>, B extends SendMediaBotMethod.SendMediaBotMethodBuilder<T, C, B>> Nested classes/interfaces inherited from class PartialBotApiMethod
PartialBotApiMethod.PartialBotApiMethodBuilder<T extends Serializable,
C extends PartialBotApiMethod<T>, B extends PartialBotApiMethod.PartialBotApiMethodBuilder<T, C, B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class SendMediaBotMethod
ALLOW_PAID_BROADCAST_FIELD, ALLOW_SENDING_WITHOUT_REPLY_FIELD, CHAT_ID_FIELD, DISABLE_NOTIFICATION_FIELD, MESSAGE_EFFECT_ID_FIELD, MESSAGE_THREAD_ID_FIELD, PROTECT_CONTENT_FIELD, REPLY_MARKUP_FIELD, REPLY_PARAMETERS_FIELD, REPLY_TO_MESSAGE_ID_FIELD
Fields inherited from class PartialBotApiMethod
OBJECT_MAPPER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserializeResponse
(String answer) Deserialize a json answer to the response type to a methodvoid
void
getFile()
Getter for method path (that is the same as method name)void
void
validate()
Validates that mandatory fields are filled and optional objectsMethods inherited from class SendMediaBotMethod
getAllowPaidBroadcast, getAllowSendingWithoutReply, getChatId, getDisableNotification, getMessageEffectId, getMessageThreadId, getProtectContent, getReplyMarkup, getReplyParameters, getReplyToMessageId
Methods inherited from class PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Field Details
-
PATH
- See Also:
-
DOCUMENT_FIELD
- See Also:
-
CAPTION_FIELD
- See Also:
-
PARSEMODE_FIELD
- See Also:
-
THUMBNAIL_FIELD
- See Also:
-
CAPTION_ENTITIES_FIELD
- See Also:
-
DISABLECONTENTTYPEDETECTION_FIELD
- See Also:
-
BUSINESS_CONNECTION_ID_FIELD
- See Also:
-
-
Constructor Details
-
SendDocument
public SendDocument()
-
-
Method Details
-
setChatId
-
enableNotification
public void enableNotification() -
disableNotification
public void disableNotification() -
deserializeResponse
Description copied from class:PartialBotApiMethod
Deserialize a json answer to the response type to a method- Specified by:
deserializeResponse
in classPartialBotApiMethod<Message>
- Parameters:
answer
- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
Description copied from interface:Validable
Validates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException
- If any mandatory field is empty
-
getFile
- Specified by:
getFile
in classSendMediaBotMethod<Message>
-
getFileField
- Specified by:
getFileField
in classSendMediaBotMethod<Message>
-
getMethod
Description copied from class:PartialBotApiMethod
Getter for method path (that is the same as method name)- Specified by:
getMethod
in classPartialBotApiMethod<Message>
- Returns:
- Method path
-