java.lang.Object
it.auties.whatsapp.model.message.button.InteractiveMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,TemplateFormatter,ButtonMessage,ContextualMessage<InteractiveMessage>,Message
public final class InteractiveMessage
extends Object
implements ContextualMessage<InteractiveMessage>, ButtonMessage, TemplateFormatter
A model class that represents a message holding an interactive message inside. Not really clear
how this could be used, contributions are welcomed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.TemplateFormatter
TemplateFormatter.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InteractiveBodyprivate final InteractiveCollectionprivate final InteractiveNativeFlowprivate final InteractiveShopprivate ContextInfoprivate final InteractiveFooterprivate final InteractiveHeader -
Constructor Summary
ConstructorsConstructorDescriptionInteractiveMessage(InteractiveHeader header, InteractiveBody body, InteractiveFooter footer, InteractiveShop contentShop, InteractiveCollection contentCollection, InteractiveNativeFlow contentNativeFlow, ContextInfo contextInfo) -
Method Summary
Modifier and TypeMethodDescriptionbody()category()Return message categoryOptional<? extends InteractiveMessageContent> content()Returns the content of this message if it's thereReturns the type of content that this message wrapsfooter()header()setContextInfo(ContextInfo contextInfo) (package private) static InteractiveMessagesimpleBuilder(InteractiveHeader header, String body, String footer, InteractiveMessageContent content, ContextInfo contextInfo) Returns the type of this formattertoString()type()Return message type
-
Field Details
-
header
-
body
-
contentShop
-
contentCollection
-
contentNativeFlow
-
contextInfo
-
-
Constructor Details
-
Method Details
-
simpleBuilder
static InteractiveMessage simpleBuilder(InteractiveHeader header, String body, String footer, InteractiveMessageContent content, ContextInfo contextInfo) -
contentType
Returns the type of content that this message wraps- Returns:
- a non-null content type
-
content
Returns the content of this message if it's there- Returns:
- a non-null content type
-
templateType
Description copied from interface:TemplateFormatterReturns the type of this formatter- Specified by:
templateTypein interfaceTemplateFormatter- Returns:
- a non-null type
-
type
Description copied from interface:MessageReturn message type -
category
Description copied from interface:MessageReturn message category- Specified by:
categoryin interfaceButtonMessage- Specified by:
categoryin interfaceMessage- Returns:
- a non-null message category
-
header
-
body
-
contentShop
-
contentCollection
-
contentNativeFlow
-
contextInfo
- Specified by:
contextInfoin interfaceContextualMessage<InteractiveMessage>
-
setContextInfo
- Specified by:
setContextInfoin interfaceContextualMessage<InteractiveMessage>
-
toString
-