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.batchevent.post
///
public class OapiSmartdeviceBatcheventPostRequest : BaseDingTalkRequest
{
///
/// 自动创建
///
public string DeviceEventVos { get; set; }
public List DeviceEventVos_ { set { this.DeviceEventVos = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.smartdevice.batchevent.post";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("device_event_vos", this.DeviceEventVos);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateObjectMaxListSize("device_event_vos", this.DeviceEventVos, 999);
}
///
/// 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
}
}