Class CarouselMessage

  • All Implemented Interfaces:
    Content

    public class CarouselMessage
    extends java.lang.Object
    implements Content
    Carousel messages are a horizontally scrollable set of items that may each contain text, an image, and message actions. Not all messaging channels fully support carousel messages; currently only Facebook Messenger, LINE, Telegram, Viber, the Web Messenger, the Android SDK and the iOS SDK cover the full functionality. For all other platforms a carousel message is rendered as raw text. The raw text fallback does not include any images or postback message actions.
    • Field Detail

      • JSON_PROPERTY_TYPE

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

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

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

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

      • CarouselMessage

        public CarouselMessage()
    • Method Detail

      • 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)
      • getText

        @Nullable
        public java.lang.String getText()
        The fallback text message used when carousel messages are not supported by the channel.
        Returns:
        text
      • 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)
      • 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