public class GenericTemplateBuilder extends TemplateBaseBuilder
messageBuilder| Modifier and Type | Method and Description |
|---|---|
GenericTemplateBuilder |
addElement(GenericTemplateElement element)
Adds a
GenericTemplateElement to this template. |
GenericTemplateElementBuilder |
addElement(String title)
Adds a
GenericTemplateElement to this template. |
GenericTemplateBuilder |
addQuickReply(QuickReply reply)
Adds a
QuickReply to the current object. |
GenericTemplateBuilder |
addQuickReply(String title,
String payload)
Adds a
QuickReply to the current object. |
FbBotMillResponse |
build(MessageEnvelope envelope)
Builds the
FbBotMillResponse that the bot should return. |
String |
toString() |
getRecipienteventKind, getLocationMessage, safeGetMessage, safeGetPostbackPayload, safeGetQuickReplyPayload, safeGetRecipient, safeGetRecipientId, safeGetSender, safeGetSenderId, validatepublic GenericTemplateElementBuilder addElement(String title)
GenericTemplateElement to this template.title - the title of the element to add.public GenericTemplateBuilder addElement(GenericTemplateElement element)
GenericTemplateElement to this template.element - the element to add.public GenericTemplateBuilder addQuickReply(String title, String payload)
QuickReply to the current object.title - the quick reply button label. It can't be empty.payload - the payload sent back when the button is pressed. It can't be
empty.public GenericTemplateBuilder addQuickReply(QuickReply reply)
QuickReply to the current object.reply - a quick reply object.public FbBotMillResponse build(MessageEnvelope envelope)
FbBotMillResponse that the bot should return. Creates a response containing a Generic Template.envelope - a MessageEnvelope object representing the incoming
message.FbBotMillResponse of this bot.public String toString()
toString in class TemplateBaseBuilderCopyright © 2017 BotMill. All rights reserved.