using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Domain.IoTAliGenieEntity
{
    public class BaseInfo
    {
        /// <summary>
        /// xxxx酒店
        /// </summary>
        public string appName { get; set; }
        /// <summary>
        /// MD5
        /// </summary>
        public string authType { get; set; }
        /// <summary>
        /// 酒店ID
        /// </summary>
        public string hotelId { get; set; }
        /// <summary>
        /// 请求ID
        /// </summary>
        public string requestId { get; set; }
        /// <summary>
        /// 请求时间戳
        /// </summary>
        public long requestTime { get; set; }
        /// <summary>
        /// 房号
        /// </summary>
        public string roomNo { get; set; }
        /// <summary>
        /// token
        /// </summary>
        public string token { get; set; }
    }

    public class DevicesItem
    {
        /// <summary>
        /// Light，DimmingLight，Aircondition，Curtain，LaceCurtain窗纱，TV，Door门，ExhaustFan排气扇
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 设备编号：device-1-10
        /// </summary>
        public string number { get; set; }
        /// <summary>
        /// 设备名称：卧室电视灯带
        /// </summary>
        public string deviceName { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        public List<string> aliasList { get; set; } 
        /// <summary>
        /// 0 代表关，1 代表开
        /// </summary>
        public int? @switch { get; set; }
        /// <summary>
        /// 数值0~100，目前调光型设备 最低20、最高100
        /// </summary>
        public int? value { get; set; }
        /// <summary>
        /// value 调高x
        /// </summary>
        public int? value_up { get; set; }
        /// <summary>
        /// value 调低x
        /// </summary>
        public int? value_down { get; set; }
        /// <summary>
        /// 场景模式：custom自定义
        /// </summary>
        public string modeType { get; set; }
        /// <summary>
        /// 模式，auto 为自动，cold为制冷，heat 为制热，或场景英文代码
        /// </summary>
        public string mode { get; set; }

        /// <summary>
        /// 新添加的模式名字
        /// </summary>
        public string modeName { get; set; }
        /// <summary>
        /// 风速调到x 档
        /// </summary>
        public int? fanSpeed { get; set; }
        /// <summary>
        /// 温度调到x 度
        /// </summary>
        public int? temperature { get; set; }
        /// <summary>
        /// 室温，仅返回状态使用，无法调节
        /// </summary>
        public int? roomTemperature { get; set; }
        /// <summary>
        /// 风速调高x 档
        /// </summary>
        public int? fanSpeed_up { get; set; }
        /// <summary>
        /// 风速调低x 档
        /// </summary>
        public int? fanSpeed_down { get; set; }
        /// <summary>
        /// 温度调高x 度
        /// </summary>
        public int? temperature_up { get; set; }
        /// <summary>
        /// 温度调低x 度
        /// </summary>
        public int? temperature_down { get; set; }
        /// <summary>
        /// pause：暂停，continue：继续
        /// </summary>
        public string action { get; set; }
        /// <summary>
        /// 频道名称，如中央一套。
        /// </summary>
        public string channelName { get; set; }
        /// <summary>
        /// 切换到第几台
        /// </summary>
        public int? channelNumber { get; set; }
        /// <summary>
        /// 增加台
        /// </summary>
        public int? channelNumber_up { get; set; }
        /// <summary>
        /// 减少台
        /// </summary>
        public int? channelNumber_down { get; set; }
        /// <summary>
        /// 音量
        /// </summary>
        public int? volume { get; set; }
        /// <summary>
        /// 电视音量增加（步长为5）
        /// </summary>
        public int? volume_up { get; set; }
        /// <summary>
        /// 电视音量减少（步长为5）
        /// </summary>
        public int? volume_down { get; set; }
        /// <summary>
        /// 电视静音:mute = 1 电视取消静音： mute = 0
        /// </summary>
        public int? mute { get; set; }
    }

    public class Command
    {
        /// <summary>
        /// 指令类型：QUERYALL，CONTROL为控制指令，QUERY为查询指令，LOG为工单指令
        /// </summary>
        public string commandType { get; set; }
        /// <summary>
        /// 设备属性列表：设备控制或状态查询请求使用
        /// </summary>
        public List<DevicesItem> devices { get; set; }
    }
    /// <summary>
    /// 请求获取设备列表
    /// </summary>
    public class Request
    {
        /// <summary>
        /// 基本信息
        /// </summary>
        public BaseInfo baseInfo { get; set; }
        /// <summary>
        /// 指令类型
        /// </summary>
        public Command command { get; set; }
    }

    public class GroupsItem
    {
        /// <summary>
        /// 位置名称：房间
        /// </summary>
        public string groupName { get; set; }
        /// <summary>
        /// 位置：room
        /// </summary>
        public string groupId { get; set; }
        /// <summary>
        /// 设备列表
        /// </summary>
        public List<DevicesItem> devices { get; set; }
    }

    public class Result
    {
        /// <summary>
        /// 是否支持红外设备标志。注：
        /// 传入true时，表示会覆盖原本已配置的红外设备信息
        /// 传入false时，表示会保留原本已配置的红外设备信息
        /// </summary>
        public bool enableInfraredDeviceImport { get; set; }
        /// <summary>
        /// 是否支持mesh设备标志，默认不传会走覆盖逻辑，注:
        /// 传入true时，表示会覆盖原本已配置的mesh设备信息
        /// 传入false时，表示会保留原本已配置的mesh设备信息
        /// </summary>
        public bool enableMeshDeviceImport { get; set; }
        /// <summary>
        /// 客控方语音发现设备，需要设备导入请按以下结构返回设备数据完成服务端配置
        /// </summary>
        public List<GroupsItem> groups { get; set; }
        /// <summary>
        /// 客控方语音发现设备，需要关联房间的场景模式请按照以下结构返回场景内容完成场景的关联
        /// </summary>
        public List<SceneModeItem> sceneModes { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<DevicesItem> status { get; set; }
    }

    public class SceneModeItem
    {
        /// <summary>
        /// 场景编码
        /// </summary>
        public string SceneId { get; set; }
        /// <summary>
        /// 场景名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 场景图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 场景描述信息
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 触发语料
        /// </summary>
        public List<string> CorpusList { get; set; } 
        /// <summary>
        /// 是否带屏显示：1显示，0不显示
        /// </summary>
        public int isDisplayScreen { get; set; } 
    }
    /// <summary>
    /// 响应回复设备列表
    /// </summary>
    public class Response
    {
        /// <summary>
        /// 结果集
        /// </summary>
        public Result result { get; set; }
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 请求ID
        /// </summary>
        public string requestId { get; set; }
        /// <summary>
        /// 响应时间戳
        /// </summary>
        public long responseTime { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 状态代码：200正常，500控制系统内部错误，501不支持的操作，404不支持的设备
        /// </summary>
        public int statusCode { get; set; }
    }
    /// <summary>
    /// 自定义场景
    /// </summary>
    public class RcuScene
    {
        /// <summary>
        /// 酒店id
        /// </summary>
        public string HotelId { get; set; }
        /// <summary>
        /// 导入配置
        /// </summary>
        public ImportHotelConfig ImportHotelConfig { get; set; }
    }

    public class ImportHotelConfig
    {
        /// <summary>
        /// 酒店RCU自定义场景
        /// </summary>
        public List<RcuCustomScenes> RcuCustomScenes { get; set; }
    }

    public class RcuCustomScenes
    {
        /// <summary>
        /// 场景编码
        /// </summary>
        public string SceneId { get; set; }
        /// <summary>
        /// 场景名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 场景图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 场景描述信息
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 触发语料
        /// </summary>
        public List<string> CorpusList { get; set; } 
    }

    public class ApiResult
    {
        /// <summary>
        /// 调用返回码，除约定的SUCCESS_CODE外，其余由服务提供者自定义
        /// </summary>
        public int StatusCode { get; set; }
        /// <summary>
        /// 服务的实际返回结果
        /// </summary>
        public bool Result { get; set; }
        /// <summary>
        /// 附加信息，典型应用场景是对失败调用进行简述，方便调用方定位问题
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 阿里云为该请求生成的唯一标识符。
        /// </summary>
        public string RequestId { get; set; }
    }
}

