zrg
2024-08-28 26ba47c84ba0b96943869a541178e7e394d424f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
{
    /// <summary>
    /// TOP API: dingtalk.oapi.customerservice.event.change
    /// </summary>
    public class OapiCustomerserviceEventChangeRequest : BaseDingTalkRequest<DingTalk.Api.Response.OapiCustomerserviceEventChangeResponse>
    {
        /// <summary>
        /// 事件对象
        /// </summary>
        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<string, string> 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);
        }
 
    /// <summary>
/// EventDtoDomain Data Structure.
/// </summary>
[Serializable]
 
public class EventDtoDomain : TopObject
{
            /// <summary>
            /// 事件业务类型,参考com.dingtalk.customerservice.common.EventBizTypeEnum
            /// </summary>
            [XmlElement("biz_type")]
            public string BizType { get; set; }
    
            /// <summary>
            /// buId(租户id)
            /// </summary>
            [XmlElement("bu_id")]
            public string BuId { get; set; }
    
            /// <summary>
            /// 钉钉corpId
            /// </summary>
            [XmlElement("ding_corp_id")]
            public string DingCorpId { get; set; }
    
            /// <summary>
            /// 事件变更内容,json格式
            /// </summary>
            [XmlElement("event_body")]
            public string EventBody { get; set; }
    
            /// <summary>
            /// 事件code,参考com.dingtalk.customerservice.common.EventBizTypeEnum
            /// </summary>
            [XmlElement("event_code")]
            public string EventCode { get; set; }
    
            /// <summary>
            /// 事件的唯一性id,用于幂等
            /// </summary>
            [XmlElement("event_id")]
            public string EventId { get; set; }
    
            /// <summary>
            /// 实例id
            /// </summary>
            [XmlElement("open_instance_id")]
            public string OpenInstanceId { get; set; }
    
            /// <summary>
            /// 1,智能客服;1001,经济体版本
            /// </summary>
            [XmlElement("production_type")]
            public Nullable<long> ProductionType { get; set; }
    
            /// <summary>
            /// 事件来源,com.dingtalk.customerservice.common.SourceEnum
            /// </summary>
            [XmlElement("source")]
            public string Source { get; set; }
}
 
        #endregion
    }
}