2026-06-26 20b96473f2520590a0dca6b775b81e3ea06a77a0
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
package cn.iocoder.yudao.module.iot.core.topic.auth;
 
import cn.iocoder.yudao.module.iot.core.enums.IotDeviceMessageMethodEnum;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
 
/**
 * IoT 子设备动态注册 Request DTO
 * <p>
 * 用于 {@link IotDeviceMessageMethodEnum#SUB_DEVICE_REGISTER} 消息的 params 数组元素
 * <p>
 * 特殊:网关子设备的动态注册,必须已经创建好该网关子设备(不然哪来的 {@link #deviceName} 字段)。更多的好处,是设备不用提前烧录 deviceSecret 密钥。
 *
 * @author 芋道源码
 * @see <a href="https://help.aliyun.com/zh/iot/user-guide/register-devices">阿里云 - 动态注册子设备</a>
 */
@Data
public class IotSubDeviceRegisterReqDTO {
 
    /**
     * 子设备 ProductKey
     */
    @NotEmpty(message = "产品标识不能为空")
    private String productKey;
 
    /**
     * 子设备 DeviceName
     */
    @NotEmpty(message = "设备名称不能为空")
    private String deviceName;
 
}