hxb
2024-10-24 ce88de4891b87c3b7b2750575e15d6e48d518852
HDLLinkPMSdk/src/main/java/com/hdl/linkpm/sdk/home/bean/logic/LogicInfoBean.java
New file
@@ -0,0 +1,203 @@
package com.hdl.linkpm.sdk.home.bean.logic;
import androidx.annotation.NonNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by jlchen on 12/10/21.
 * 自动化 详情对象
 */
public class LogicInfoBean implements Serializable {
    private String sid;//自动化id
    private String gatewayId;//网关ID
    private String name;//自动化名字
    private List<String> conditionLabel = new ArrayList<>();//触发条件标签  1:时间点条件 2:时间段+循环方式 3:设备状态
    private String tag;//— tag   标签
    private String push_customer_message;//消息推送内容
    private String relation;//关系 and/or
    private String enable;//true:启用(默认) false:禁用
    private CycleBean cycle;//循环时间
    private List<InputBean> input = new ArrayList<>();//触发条件
    private List<OutputBean> output = new ArrayList<>();//执行动作
    private String output_delay;//输出延时
    @NonNull
    public String getSid() {
        return sid == null ? "" : sid;
    }
    public void setSid(@NonNull String sid) {
        this.sid = sid;
    }
    @NonNull
    public String getGatewayId() {
        return gatewayId == null ? "" : gatewayId;
    }
    public void setGatewayId(@NonNull String gatewayId) {
        this.gatewayId = gatewayId;
    }
    @NonNull
    public String getName() {
        return name == null ? "" : name;
    }
    public void setName(@NonNull String name) {
        this.name = name;
    }
    @NonNull
    public List<String> getConditionLabel() {
        if (conditionLabel == null) {
            return new ArrayList<>();
        }
        return conditionLabel;
    }
    public void setConditionLabel(@NonNull List<String> conditionLabel) {
        this.conditionLabel = conditionLabel;
    }
    @NonNull
    public String getTag() {
        return tag == null ? "" : tag;
    }
    public void setTag(@NonNull String tag) {
        this.tag = tag;
    }
    @NonNull
    public String getPush_customer_message() {
        return push_customer_message == null ? "" : push_customer_message;
    }
    public void setPush_customer_message(@NonNull String push_customer_message) {
        this.push_customer_message = push_customer_message;
    }
    @NonNull
    public String getRelation() {
        return relation == null ? "" : relation;
    }
    public void setRelation(@NonNull String relation) {
        this.relation = relation;
    }
    @NonNull
    public String getEnable() {
        return enable == null ? "" : enable;
    }
    public void setEnable(@NonNull String enable) {
        this.enable = enable;
    }
    public CycleBean getCycle() {
        return cycle;
    }
    public void setCycle(CycleBean cycle) {
        this.cycle = cycle;
    }
    @NonNull
    public List<InputBean> getInput() {
        if (input == null) {
            return new ArrayList<>();
        }
        return input;
    }
    public void setInput(@NonNull List<InputBean> input) {
        this.input = input;
    }
    @NonNull
    public List<OutputBean> getOutput() {
        if (output == null) {
            return new ArrayList<>();
        }
        return output;
    }
    public void setOutput(@NonNull List<OutputBean> output) {
        this.output = output;
    }
    @NonNull
    public String getOutput_delay() {
        return output_delay == null ? "" : output_delay;
    }
    public void setOutput_delay(@NonNull String output_delay) {
        this.output_delay = output_delay;
    }
    /**
     * 循环时间
     */
    public static class CycleBean implements Serializable{
        private String type;//时间类型
        private List<String> value;//值
        public String getType() {
            return type;
        }
        public void setType(String type) {
            this.type = type;
        }
        public List<String> getValue() {
            return value;
        }
        public void setValue(List<String> value) {
            this.value = value;
        }
    }
    /**
     * 触发条件
     */
    public static class InputBean implements Serializable{
        private String sid;//设备sid 仅在condition_type:3 设备触发必填
        private String condition_type;//1:时间点条件 2:时间段+循环方式 3:设备状态
        private List<ConditionBean> condition;//条件
        public String getSid() {
            return sid;
        }
        public void setSid(String sid) {
            this.sid = sid;
        }
        public String getCondition_type() {
            return condition_type;
        }
        public void setCondition_type(String condition_type) {
            this.condition_type = condition_type;
        }
        public List<ConditionBean> getCondition() {
            return condition;
        }
        public void setCondition(List<ConditionBean> condition) {
            this.condition = condition;
        }
    }
}