New file |
| | |
| | | package com.hdl.linkpm.sdk.template.bean; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Dictionary; |
| | | import java.util.Enumeration; |
| | | import java.util.List; |
| | | |
| | | public class TemplateSceneBean implements Serializable { |
| | | private String name;//场景名称 |
| | | private String sid;//link设备sid |
| | | private String image;//场景图片 |
| | | private String sceneType;//场景类型 |
| | | private List<String> uids = new ArrayList<>();//房间uid |
| | | private transient List<String> roomIds = new ArrayList<>();//房间id |
| | | private String delay;//场景延时 |
| | | private String group;//场景分组 |
| | | private List<TemplateSceneFunctionBean> functions = new ArrayList<>();//场景功能 |
| | | private boolean can_delete; |
| | | private ArrayList<TemplateSceneImageBean> imageBeans = new ArrayList<>(); |
| | | |
| | | public boolean isCan_delete() { |
| | | return can_delete; |
| | | } |
| | | |
| | | public void setCan_delete(boolean can_delete) { |
| | | this.can_delete = can_delete; |
| | | } |
| | | |
| | | public ArrayList<TemplateSceneImageBean> getImageBeans() { |
| | | if (imageBeans == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | return imageBeans; |
| | | } |
| | | |
| | | public void setImageBeans(ArrayList<TemplateSceneImageBean> imageBeans) { |
| | | this.imageBeans = imageBeans; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name == null ? "" : name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getSid() { |
| | | return sid == null ? "" : sid; |
| | | } |
| | | |
| | | public void setSid(String sid) { |
| | | this.sid = sid; |
| | | } |
| | | |
| | | public String getImage() { |
| | | return image == null ? "" : image; |
| | | } |
| | | |
| | | public void setImage(String image) { |
| | | this.image = image; |
| | | } |
| | | |
| | | public String getSceneType() { |
| | | return sceneType == null ? "" : sceneType; |
| | | } |
| | | |
| | | public void setSceneType(String sceneType) { |
| | | this.sceneType = sceneType; |
| | | } |
| | | |
| | | public List<String> getUids() { |
| | | if (uids == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | return uids; |
| | | } |
| | | |
| | | public void setUids(List<String> uids) { |
| | | this.uids = uids; |
| | | } |
| | | |
| | | public List<String> getRoomIds() { |
| | | if (roomIds == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | return roomIds; |
| | | } |
| | | |
| | | public void setRoomIds(List<String> roomIds) { |
| | | this.roomIds = roomIds; |
| | | } |
| | | |
| | | public String getDelay() { |
| | | return delay == null ? "" : delay; |
| | | } |
| | | |
| | | public void setDelay(String delay) { |
| | | this.delay = delay; |
| | | } |
| | | |
| | | public String getGroup() { |
| | | return group == null ? "" : group; |
| | | } |
| | | |
| | | public void setGroup(String group) { |
| | | this.group = group; |
| | | } |
| | | |
| | | public List<TemplateSceneFunctionBean> getFunctions() { |
| | | if (functions == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | return functions; |
| | | } |
| | | |
| | | public void setFunctions(List<TemplateSceneFunctionBean> functions) { |
| | | this.functions = functions; |
| | | } |
| | | |
| | | public void addFunction(TemplateSceneFunctionBean function){ |
| | | this.functions.add(function); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 场景的功能对象 |
| | | */ |
| | | public static class TemplateSceneFunctionBean implements Serializable { |
| | | private String sid;// link设备sid string |
| | | private String delay;// 延迟时间 string |
| | | private List<TemplateSceneFunctionStateBean> status = new ArrayList<>();// 设备动作 array<object> |
| | | |
| | | public String getSid() { |
| | | return sid; |
| | | } |
| | | |
| | | public void setSid(String sid) { |
| | | this.sid = sid; |
| | | } |
| | | |
| | | public String getDelay() { |
| | | return delay; |
| | | } |
| | | |
| | | public void setDelay(String delay) { |
| | | this.delay = delay; |
| | | } |
| | | |
| | | public List<TemplateSceneFunctionStateBean> getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(List<TemplateSceneFunctionStateBean> status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public void addStatus(TemplateSceneFunctionStateBean stateBean){ |
| | | this.status.add(stateBean); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 场景的功能的属性设置状态 |
| | | */ |
| | | public static class TemplateSceneFunctionStateBean implements Serializable { |
| | | private String key; |
| | | private String value; |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(String key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | } |
| | | |
| | | public static class TemplateSceneImageBean |
| | | { |
| | | private String imageId; |
| | | |
| | | private String cloudUrl; |
| | | |
| | | private String localUrl; |
| | | |
| | | public String getImageId() { |
| | | return imageId == null ? "" : imageId; |
| | | } |
| | | |
| | | public void setImageId(String imageId) { |
| | | this.imageId = imageId; |
| | | } |
| | | |
| | | public String getCloudUrl() { |
| | | return cloudUrl == null ? "" : cloudUrl; |
| | | } |
| | | |
| | | public void setCloudUrl(String cloudUrl) { |
| | | this.cloudUrl = cloudUrl; |
| | | } |
| | | |
| | | public String getLocalUrl() { |
| | | return localUrl == null ? "" : localUrl; |
| | | } |
| | | |
| | | public void setLocalUrl(String localUrl) { |
| | | this.localUrl = localUrl; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |