Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Response implements Serializable {
- @SerializedName("message")
- @Expose
- private List<Message> messages;
- public List<Message> getMessages() {
- return messages;
- }
- public void setMessages(List<Message> messages) {
- this.messages = messages;
- }
- }
- public class Message implements Serializable {
- @SerializedName("type")
- @Expose
- @MessageType
- private int type;
- @SerializedName("position")
- @Expose
- @MessagePosition
- private String position;
- public int getType() {
- return type;
- }
- public String getPosition() {
- return position;
- }
- public void setType(@MessageType int type) {
- this.type = type;
- }
- public void setPosition(@MessagePosition String position) {
- this.position = position;
- }
- }
- public class TextMessage extends Message {
- @SerializedName("text")
- @Expose
- private String text;
- public String getText() {
- return text;
- }
- public void setText(String text) {
- this.text = text;
- }
- public class ImageMessage extends Message {
- @SerializedName("attachment")
- @Expose
- private Attachment attachment;
- public Attachment getAttachment() {
- return attachment;
- }
- public void setAttachment(Attachment attachment) {
- this.attachment = attachment;
- }
- }
- ---- Response
- |
- - TextResponse -> List<TextMessage>
- |
- - ImageResponse -> List<ImageMessage>
Add Comment
Please, Sign In to add comment