package com.cm.smartgate.pojo.dtos.check;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: SmartGateCheckResultDTO
 * @Description: 智能闸机校验结果
 * @Author: WangGeng
 * @Date: 2020/8/27 17:49
 * @Version: 1.0
 **/
@ApiModel
public class SmartGateCheckResultDTO {

    @ApiModelProperty(name = "PictureAck", value = "平台对收到的图片进行回复,设备没有收到此字段认为失败,后续会进行再一次上传")
    @JSONField(name = "PictureAck")
    private PictureAck PictureAck;
    @ApiModelProperty(name = "DoorOpenAndShowTips", value = "开关门提示")
    @JSONField(name = "DoorOpenAndShowTips")
    private DoorOpenAndShowTips DoorOpenAndShowTips;

    public SmartGateCheckResultDTO.PictureAck getPictureAck() {
        return PictureAck;
    }

    public void setPictureAck(SmartGateCheckResultDTO.PictureAck pictureAck) {
        PictureAck = pictureAck;
    }

    public SmartGateCheckResultDTO.DoorOpenAndShowTips getDoorOpenAndShowTips() {
        return DoorOpenAndShowTips;
    }

    public void setDoorOpenAndShowTips(SmartGateCheckResultDTO.DoorOpenAndShowTips doorOpenAndShowTips) {
        DoorOpenAndShowTips = doorOpenAndShowTips;
    }

    @ApiModel
    public static class PictureAck {
        @ApiModelProperty(name = "Result", value = "平台回复图片是否已收到")
        private Boolean Result;
        @ApiModelProperty(name = "PicID", value = "图片ID字符串")
        private String PicID;

        public Boolean getResult() {
            return Result;
        }

        public void setResult(Boolean result) {
            Result = result;
        }

        public String getPicID() {
            return PicID == null ? "" : PicID.trim();
        }

        public void setPicID(String picID) {
            PicID = picID;
        }
    }

    @ApiModel
    public static class DoorOpenAndShowTips {
        @ApiModelProperty(name = "Type", value = "提示类型")
        @JSONField(name = "Type")
        private String Type;
        @ApiModelProperty(name = "Customtip", value = "自定义语")
        @JSONField(name = "Customtip")
        private String Customtip;
        @ApiModelProperty(name = "Tipstime", value = "自定义文字显示时间，单位ms")
        @JSONField(name = "Tipstime")
        private Long Tipstime;
        @ApiModelProperty(name = "BorderColor", value = "字体颜色，R,G,B,不透明度")
        @JSONField(name = "BorderColor")
        private List<Integer> BorderColor;
        @ApiModelProperty(name = "BackgroundColor", value = "背景颜色，R,G,B,不透明度")
        @JSONField(name = "BackgroundColor")
        private List<Integer> BackgroundColor;
        @ApiModelProperty(name = "DoorIndex", value = "继电器序号")
        @JSONField(name = "DoorIndex")
        private Integer DoorIndex;
        @ApiModelProperty(name = "Opendelay", value = "单位ms,开门延迟时间")
        @JSONField(name = "Opendelay")
        private Long Opendelay;

        public String getType() {
            return Type == null ? "" : Type.trim();
        }

        public void setType(String type) {
            Type = type;
        }

        public String getCustomtip() {
            return Customtip == null ? "" : Customtip.trim();
        }

        public void setCustomtip(String customtip) {
            Customtip = customtip;
        }

        public Long getTipstime() {
            return Tipstime;
        }

        public void setTipstime(Long tipstime) {
            Tipstime = tipstime;
        }

        public List<Integer> getBorderColor() {
            if (BorderColor == null) {
                return new ArrayList<>();
            }
            return BorderColor;
        }

        public void setBorderColor(List<Integer> borderColor) {
            BorderColor = borderColor;
        }

        public List<Integer> getBackgroundColor() {
            if (BackgroundColor == null) {
                return new ArrayList<>();
            }
            return BackgroundColor;
        }

        public void setBackgroundColor(List<Integer> backgroundColor) {
            BackgroundColor = backgroundColor;
        }

        public Integer getDoorIndex() {
            return DoorIndex;
        }

        public void setDoorIndex(Integer doorIndex) {
            DoorIndex = doorIndex;
        }

        public Long getOpendelay() {
            return Opendelay;
        }

        public void setOpendelay(Long opendelay) {
            Opendelay = opendelay;
        }
    }

}
