Class ListMessage

  • All Implemented Interfaces:
    Content

    public class ListMessage
    extends java.lang.Object
    implements Content
    List messages are a vertically scrollable set of items that may each contain text, an image, and message actions. Not all messaging channels fully support list messages. * Facebook Messenger and WeChat have native support. * For LINE and our Android, iOS and Web SDK, Sunshine Conversations converts list messages to carousel. * On WhatsApp, Telegram and Twitter, Sunshine Conversations converts list messages to multiple rich messages. * On all other platforms, Sunshine Conversations converts list messages to raw text.
    • Field Detail

      • JSON_PROPERTY_TYPE

        public static final java.lang.String JSON_PROPERTY_TYPE
        See Also:
        Constant Field Values
      • JSON_PROPERTY_ITEMS

        public static final java.lang.String JSON_PROPERTY_ITEMS
        See Also:
        Constant Field Values
      • JSON_PROPERTY_ACTIONS

        public static final java.lang.String JSON_PROPERTY_ACTIONS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ListMessage

        public ListMessage()
    • Method Detail

      • type

        public ListMessage type​(java.lang.String type)
      • getType

        public java.lang.String getType()
        The type of message.
        Specified by:
        getType in interface Content
        Returns:
        type
      • setType

        public void setType​(java.lang.String type)
      • getItems

        public java.util.List<Item> getItems()
        An array of objects representing the items associated with the message. Only present in carousel and list type messages.
        Returns:
        items
      • setItems

        public void setItems​(java.util.List<Item> items)
      • getActions

        @Nullable
        public java.util.List<ActionSubset> getActions()
        An array of objects representing the actions associated with the message. The array length is limited by the third party channel.
        Returns:
        actions
      • setActions

        public void setActions​(java.util.List<ActionSubset> actions)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object