package cn.iocoder.yudao.module.iot.core.topic.topo; import cn.iocoder.yudao.module.iot.core.enums.IotDeviceMessageMethodEnum; import cn.iocoder.yudao.module.iot.core.topic.IotDeviceIdentity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; /** * IoT 设备拓扑关系变更通知 Request DTO *

* 用于 {@link IotDeviceMessageMethodEnum#TOPO_CHANGE} 下行消息的 params 参数 * * @author 芋道源码 * @see 阿里云 - 通知网关拓扑关系变化 */ @Data @NoArgsConstructor @AllArgsConstructor public class IotDeviceTopoChangeReqDTO { public static final Integer STATUS_CREATE = 0; public static final Integer STATUS_DELETE = 1; /** * 拓扑关系状态 */ private Integer status; /** * 子设备列表 */ private List subList; public static IotDeviceTopoChangeReqDTO ofCreate(List subList) { return new IotDeviceTopoChangeReqDTO(STATUS_CREATE, subList); } public static IotDeviceTopoChangeReqDTO ofDelete(List subList) { return new IotDeviceTopoChangeReqDTO(STATUS_DELETE, subList); } }