2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
 * <p>
 * 用于 {@link IotDeviceMessageMethodEnum#TOPO_CHANGE} 下行消息的 params 参数
 *
 * @author 芋道源码
 * @see <a href="https://help.aliyun.com/zh/marketplace/notify-gateway-topology-changes">阿里云 - 通知网关拓扑关系变化</a>
 */
@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<IotDeviceIdentity> subList;
 
    public static IotDeviceTopoChangeReqDTO ofCreate(List<IotDeviceIdentity> subList) {
        return new IotDeviceTopoChangeReqDTO(STATUS_CREATE, subList);
    }
 
    public static IotDeviceTopoChangeReqDTO ofDelete(List<IotDeviceIdentity> subList) {
        return new IotDeviceTopoChangeReqDTO(STATUS_DELETE, subList);
    }
 
}