package com.yuchen.saas.device.api.vo.scene;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Map;

@Data
public class DeviceSceneLinkageRuleDetailActionVo implements Serializable {

   @ApiModelProperty(name = "uri", value = "规则类型（动作类型：service-下发服务，setProperty-设置属性，trigger-规则输出，triggerAlarm-告警输出）")
   private String uri;
   @ApiModelProperty(name = "params", value = "规则参数")
   private Params params;

    public String getCheckType(){
        return uri.substring(uri.lastIndexOf("/")+1,uri.length());
    }

   @Data
   public static class Params{
       @ApiModelProperty(name = "productKey", value = "产品")
       private String productKey;
       @ApiModelProperty(name = "deviceName", value = "设备")
       private String deviceName;
       @ApiModelProperty(name = "propMode", value = "参数类型")
       private String propMode;
       @ApiModelProperty(name = "identity", value = "事件")
       private String identity;
       @ApiModelProperty(name = "propertyItemsType", value = "参数类型集合")
       private Map<String,Object> propertyItemsType;
       @ApiModelProperty(name = "propertyItems", value = "参数")
       private Map<String,Object> propertyItems;
       @ApiModelProperty(name = "switchStatus", value = "规则输出-输出动作 0触发 1启用 2停止")
       private String switchStatus;
       @ApiModelProperty(name = "ruleId", value = "规则输出-规则id")
       private String ruleId;
       @ApiModelProperty(name = "alarmType", value = "告警类型 1-弹指定监控实时视频")
       private Integer alarmType;
       @ApiModelProperty(name = "alarmDevices", value = "告警输出设备，多个用逗号分隔")
       private String alarmDevices;
   }
}
