From 0e46f8c95a9fbe05691fa48700191c1bc1ecd937 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 17 Feb 2022 17:17:01 +0530 Subject: [PATCH] properties for new bind tags --- .../messagerosa/core/model/StylingTag.java | 27 +++++++++++++++++++ .../core/model/XMessagePayload.java | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/main/java/messagerosa/core/model/StylingTag.java diff --git a/src/main/java/messagerosa/core/model/StylingTag.java b/src/main/java/messagerosa/core/model/StylingTag.java new file mode 100644 index 0000000..2eefb0c --- /dev/null +++ b/src/main/java/messagerosa/core/model/StylingTag.java @@ -0,0 +1,27 @@ +package messagerosa.core.model; + +public enum StylingTag { + LIST("list"), + QUICKREPLYBTN("buttonsForListItems"), + IMAGE("image"), + AUDIO("audio"), + VIDEO("video"); + + private String name; + + StylingTag(String stylingTag) { + name=stylingTag; + } + + public String toString() { + return name; + } + + public static StylingTag getEnumByText(String code) { + for (StylingTag e : StylingTag.values()) { + if (e.name.equals(code)) + return e; + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 127fb86..7d3c4e3 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -19,5 +19,8 @@ public class XMessagePayload { private LocationParams location; private ContactCard contactCard; private ArrayList buttonChoices; - private String stylingTag; + private StylingTag stylingTag; + private String flow; + private Integer index; + private String mediaCaption; }