Package com.whatsapp.api.domain.messages
Class Message.MessageBuilder
java.lang.Object
com.whatsapp.api.domain.messages.Message.MessageBuilder
- Enclosing class:
- Message
The type Message builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuildAudioMessage
(AudioMessage audioMessage) Build audio messagebuildContactMessage
(ContactMessage contactMessage) Required.buildDocumentMessage
(DocumentMessage documentMessage) Build document messagestatic Message.MessageBuilder
builder()
Builder message builder.buildImageMessage
(ImageMessage imageMessage) Build image messagebuildInteractiveMessage
(InteractiveMessage interactiveMessage) Build an object to send anInteractiveMessage
buildLocationMessage
(LocationMessage locationMessage) Build location messagebuildReactionMessage
(ReactionMessage reactionMessage) Build reaction messagebuildStickerMessage
(StickerMessage stickerMessage) Build sticker messagebuildTemplateMessage
(TemplateMessage templateMessage) Build template messagebuildTextMessage
(TextMessage textMessage) Build a text objetc, with: body required preview_url optionalbuildVideoMessage
(VideoMessage videoMessage) Build video messagesetContext
(Context context) Sets context.Sets to.
-
Method Details
-
builder
Builder message builder.- Returns:
- the message builder
-
setTo
Sets to.- Parameters:
to
- Required.WhatsApp ID or phone number for the person you want to send a message to.
- Returns:
- the to
-
setContext
Sets context.- Parameters:
context
- . the messsage's context.- Returns:
- the context
-
buildTextMessage
Build a text objetc, with:- body required
- preview_url optional
- Parameters:
textMessage
- :TextMessage
object.- Returns:
- the message
-
buildContactMessage
Required. Build an objetc withContact
- Parameters:
contactMessage
- the contact message- Returns:
- the message
- See Also:
-
buildTemplateMessage
Build template message- Parameters:
templateMessage
- the template message- Returns:
- the message
- See Also:
-
buildInteractiveMessage
Build an object to send anInteractiveMessage
- Parameters:
interactiveMessage
- the interactive message- Returns:
- the message
- See Also:
-
buildAudioMessage
Build audio message- Parameters:
audioMessage
- the audio message- Returns:
- the message
- See Also:
-
buildDocumentMessage
Build document message- Parameters:
documentMessage
- the document message- Returns:
- the message
- See Also:
-
buildImageMessage
Build image message- Parameters:
imageMessage
- the image message- Returns:
- the message
- See Also:
-
buildStickerMessage
Build sticker message- Parameters:
stickerMessage
- the sticker message- Returns:
- the message
- See Also:
-
buildVideoMessage
Build video message- Parameters:
videoMessage
- the video message- Returns:
- the message
- See Also:
-
buildReactionMessage
Build reaction message- Parameters:
reactionMessage
- the reaction message- Returns:
- the message
- See Also:
-
buildLocationMessage
Build location message- Parameters:
locationMessage
- the location message- Returns:
- the message
- See Also:
-