package com.jay.monitor.data.server.models.request.dingding;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * @Module 跳转
 * @Description 查看跳转事件
 * @Author liukaixiong
 * @Date 2021/1/14 19:06
 */
public class ActionCardModel extends BaseDDModel {
    /**
     * actionCard : {"title":"乔布斯 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身","text":"![screenshot](https://gw.alicdn.com/tfs/TB1ut3xxbsrBKNjSZFpXXcXhFXa-846-786.png) ","btnOrientation":"0","btns":[{"title":"内容不错","actionURL":"https://www.dingtalk.com/"},{"title":"不感兴趣","actionURL":"https://www.dingtalk.com/"}]}
     * msgtype : actionCard
     */

    @JsonProperty("actionCard")
    private ActionCardDTO actionCard;

    public ActionCardModel() {
        super("actionCard");
    }


    public static class ActionCardDTO {
        /**
         * title : 乔布斯 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身
         * text : ![screenshot](https://gw.alicdn.com/tfs/TB1ut3xxbsrBKNjSZFpXXcXhFXa-846-786.png)
         * btnOrientation : 0
         * btns : [{"title":"内容不错","actionURL":"https://www.dingtalk.com/"},{"title":"不感兴趣","actionURL":"https://www.dingtalk.com/"}]
         */

        @JsonProperty("title")
        private String title;
        @JsonProperty("text")
        private String text;
        @JsonProperty("btnOrientation")
        private String btnOrientation;
        @JsonProperty("btns")
        private List<BtnsDTO> btns;

        public static class BtnsDTO {

            public BtnsDTO() {
            }

            public BtnsDTO(String title, String actionURL) {
                this.title = title;
                this.actionURL = actionURL;
            }

            /**
             * title : 内容不错
             * actionURL : https://www.dingtalk.com/
             */
            @JsonProperty("title")
            private String title;
            @JsonProperty("actionURL")
            private String actionURL;

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getActionURL() {
                return actionURL;
            }

            public void setActionURL(String actionURL) {
                this.actionURL = actionURL;
            }
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String getBtnOrientation() {
            return btnOrientation;
        }

        public void setBtnOrientation(String btnOrientation) {
            this.btnOrientation = btnOrientation;
        }

        public List<BtnsDTO> getBtns() {
            return btns;
        }

        public void setBtns(List<BtnsDTO> btns) {
            this.btns = btns;
        }
    }

    public ActionCardDTO getActionCard() {
        return actionCard;
    }

    public void setActionCard(ActionCardDTO actionCard) {
        this.actionCard = actionCard;
    }
}
