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.customerservice.event.change
///
public class OapiCustomerserviceEventChangeRequest : BaseDingTalkRequest
{
///
/// 事件对象
///
public string EventDto { get; set; }
public EventDtoDomain EventDto_ { set { this.EventDto = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.customerservice.event.change";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("event_dto", this.EventDto);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("event_dto", this.EventDto);
}
///
/// EventDtoDomain Data Structure.
///
[Serializable]
public class EventDtoDomain : TopObject
{
///
/// 事件业务类型,参考com.dingtalk.customerservice.common.EventBizTypeEnum
///
[XmlElement("biz_type")]
public string BizType { get; set; }
///
/// buId(租户id)
///
[XmlElement("bu_id")]
public string BuId { get; set; }
///
/// 钉钉corpId
///
[XmlElement("ding_corp_id")]
public string DingCorpId { get; set; }
///
/// 事件变更内容,json格式
///
[XmlElement("event_body")]
public string EventBody { get; set; }
///
/// 事件code,参考com.dingtalk.customerservice.common.EventBizTypeEnum
///
[XmlElement("event_code")]
public string EventCode { get; set; }
///
/// 事件的唯一性id,用于幂等
///
[XmlElement("event_id")]
public string EventId { get; set; }
///
/// 实例id
///
[XmlElement("open_instance_id")]
public string OpenInstanceId { get; set; }
///
/// 1,智能客服;1001,经济体版本
///
[XmlElement("production_type")]
public Nullable ProductionType { get; set; }
///
/// 事件来源,com.dingtalk.customerservice.common.SourceEnum
///
[XmlElement("source")]
public string Source { get; set; }
}
#endregion
}
}