using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
namespace DingTalk.Api.Request
{
///
/// TOP API: dingtalk.oapi.smartdevice.event.post
///
public class OapiSmartdeviceEventPostRequest : BaseDingTalkRequest
{
///
/// 系统自动生成
///
public string DeviceEventVo { get; set; }
public DeviceEventVoDomain DeviceEventVo_ { set { this.DeviceEventVo = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.smartdevice.event.post";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("device_event_vo", this.DeviceEventVo);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
}
///
/// DeviceEventVoDomain Data Structure.
///
[Serializable]
public class DeviceEventVoDomain : TopObject
{
///
/// json格式的数据体
///
[XmlElement("data")]
public string Data { get; set; }
///
/// 设备名称
///
[XmlElement("dn")]
public string Dn { get; set; }
///
/// 产品key
///
[XmlElement("pk")]
public string Pk { get; set; }
///
/// 事件对应的topic
///
[XmlElement("topic")]
public string Topic { get; set; }
}
#endregion
}
}