java.lang.Object
it.auties.whatsapp.model.message.button.TemplateMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ButtonMessage,ContextualMessage<TemplateMessage>,Message
public final class TemplateMessage
extends Object
implements ContextualMessage<TemplateMessage>, ButtonMessage
A model class that represents a message sent in a WhatsappBusiness chat that provides a list of
buttons to choose from.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HydratedFourRowTemplateprivate ContextInfoprivate final HighlyStructuredFourRowTemplateprivate final HydratedFourRowTemplateprivate final Stringprivate final InteractiveMessage -
Constructor Summary
ConstructorsConstructorDescriptionTemplateMessage(String id, HydratedFourRowTemplate content, HighlyStructuredFourRowTemplate highlyStructuredFourRowTemplateFormat, HydratedFourRowTemplate hydratedFourRowTemplateFormat, InteractiveMessage interactiveMessageFormat, ContextInfo contextInfo) -
Method Summary
Modifier and TypeMethodDescriptioncontent()(package private) static TemplateMessagecustomBuilder(String id, HydratedFourRowTemplate content, TemplateFormatter format, ContextInfo contextInfo) Optional<? extends TemplateFormatter> format()Returns the formatter of this messageReturns the type of format of this messageid()setContextInfo(ContextInfo contextInfo) toString()type()Return message typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.ButtonMessage
category
-
Field Details
-
id
-
-
highlyStructuredFourRowTemplateFormat
-
hydratedFourRowTemplateFormat
-
interactiveMessageFormat
-
contextInfo
-
-
Constructor Details
-
TemplateMessage
public TemplateMessage(String id, HydratedFourRowTemplate content, HighlyStructuredFourRowTemplate highlyStructuredFourRowTemplateFormat, HydratedFourRowTemplate hydratedFourRowTemplateFormat, InteractiveMessage interactiveMessageFormat, ContextInfo contextInfo)
-
-
Method Details
-
customBuilder
static TemplateMessage customBuilder(String id, HydratedFourRowTemplate content, TemplateFormatter format, ContextInfo contextInfo) -
formatType
Returns the type of format of this message- Returns:
- a non-null
TemplateFormatter.Type
-
format
Returns the formatter of this message- Returns:
- an optional
-
type
Description copied from interface:MessageReturn message type -
id
-
content
-
highlyStructuredFourRowTemplateFormat
-
hydratedFourRowTemplateFormat
-
interactiveMessageFormat
-
contextInfo
- Specified by:
contextInfoin interfaceContextualMessage<TemplateMessage>
-
setContextInfo
- Specified by:
setContextInfoin interfaceContextualMessage<TemplateMessage>
-
toString
-