Type Parameters:
T - Body type for message
All Superinterfaces:
ConversationMessageBody

public interface AppMessage<T extends AppMessageBody> extends ConversationMessageBody
Message originating from an app
Since:
1.3
  • Method Details

    • getBody

      T getBody()
      Get message body
      Returns:
      Message body
    • getExplicitChannelMessage

      Map<ConversationChannel,String> getExplicitChannelMessage()
      Allows you to specify a channel and define a corresponding channel specific message payload that will override the standard Conversation API message types. The key in the map must point to a valid conversation channel as defined in the enum ConversationChannel. The message content must be provided in string format. You may use the transcoding endpoint to help create your message. For more information about how to construct an explicit channel message for a particular channel, see that channel's corresponding documentation (for example, using explicit channel messages with the WhatsApp channel).
      Returns:
      explicitChannelMessage
    • getExplicitChannelOmniMessage

      Override the message's content for specified channels. The key in the map must point to a valid conversation channel as defined in the enum ConversationChannel. The content defined under the specified channel will be sent on that channel.
      Returns:
      explicitChannelOmniMessage
    • getChannelSpecificMessage

      Map<ConversationChannel,ChannelSpecificMessage> getChannelSpecificMessage()
      Channel specific messages, overriding any transcoding. The structure of this property is more well-defined than the open structure of the `explicit_channel_message` property, and may be easier to use. The key in the map must point to a valid conversation channel as defined in the enum `ConversationChannel`.
      Returns:
      channelSpecificMessage
    • getAgent

      Agent getAgent()
      Get agent
      Returns:
      agent
    • builder

      static <T extends AppMessageBody> AppMessage.Builder<T> builder()
      Getting Builder
      Returns:
      New Builder instance
      Since:
      1.0