package cc.mrbird.febs.unisoftiot.enums;
|
|
import lombok.Getter;
|
|
/**
|
* 设备请求URL枚举类
|
* 用于定义与设备相关的API请求的URL和方法
|
*/
|
@Getter
|
public enum DeviceRequestUrlEnum {
|
|
/**
|
* 设备控制请求配置
|
* 使用POST方法发送设备控制指令
|
*/
|
DEVICE_CONTROL(HttpMethod.POST,"/device/control"),
|
|
/**
|
* 设备分组请求配置
|
* 使用POST方法对设备进行分组操作
|
*/
|
DEVICE_GROUP(HttpMethod.POST,"/device/group"),
|
|
/**
|
* 设备标签请求配置
|
* 使用POST方法添加或修改设备标签
|
*/
|
DEVICE_TAG(HttpMethod.POST,"/device/tag"),
|
|
/**
|
* 设备列表请求配置
|
* 使用POST方法获取设备列表
|
*/
|
DEVICE_LIST(HttpMethod.POST,"/device/list"),
|
|
/**
|
* 设备信息请求配置
|
* 使用POST方法获取特定设备的信息
|
*/
|
DEVICE_INFO(HttpMethod.POST,"/device/info");
|
|
// 请求方法,如POST、GET等
|
private HttpMethod requestMethod;
|
|
// 请求的URL路径
|
private String requestUrl;
|
|
/**
|
* 构造函数,初始化设备请求的URL和方法
|
*
|
* @param requestMethod HTTP请求方法,例如POST
|
* @param requestUrl HTTP请求的URL路径
|
*/
|
DeviceRequestUrlEnum(HttpMethod requestMethod, String requestUrl) {
|
this.requestMethod = requestMethod;
|
this.requestUrl = requestUrl;
|
}
|
|
}
|