zrg
2024-08-16 18865d8bf24382e850e661dec6cca0e8b9dba6ae
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
115
116
117
118
119
120
121
122
123
124
125
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.industry.studentpool.batchadd
    /// </summary>
    public class OapiIndustryStudentpoolBatchaddRequest : BaseDingTalkRequest<DingTalk.Api.Response.OapiIndustryStudentpoolBatchaddResponse>
    {
        /// <summary>
        /// 业务code
        /// </summary>
        public string BizCode { get; set; }
 
        /// <summary>
        /// 学员列表
        /// </summary>
        public string StudentList { get; set; }
 
        public List<TrainingStudentDtoDomain> StudentList_ { set { this.StudentList = TopUtils.ObjectToJson(value); } } 
 
        #region IDingTalkRequest Members
 
        public override string GetApiName()
        {
            return "dingtalk.oapi.industry.studentpool.batchadd";
        }
 
        public override string GetApiCallType()
        {
            return DingTalkConstants.CALL_TYPE_OAPI;
        }
 
        public override IDictionary<string, string> GetParameters()
        {
            TopDictionary parameters = new TopDictionary();
            parameters.Add("biz_code", this.BizCode);
            parameters.Add("student_list", this.StudentList);
            if (this.otherParams != null)
            {
                parameters.AddAll(this.otherParams);
            }
            return parameters;
        }
 
        public override void Validate()
        {
            RequestValidator.ValidateRequired("biz_code", this.BizCode);
            RequestValidator.ValidateObjectMaxListSize("student_list", this.StudentList, 20);
        }
 
    /// <summary>
/// PatriarchDtoDomain Data Structure.
/// </summary>
[Serializable]
 
public class PatriarchDtoDomain : TopObject
{
            /// <summary>
            /// 联系人手机号
            /// </summary>
            [XmlElement("mobile")]
            public string Mobile { get; set; }
    
            /// <summary>
            /// 联系人名字
            /// </summary>
            [XmlElement("name")]
            public string Name { get; set; }
    
            /// <summary>
            /// 联系人与学员的关系
            /// </summary>
            [XmlElement("relation")]
            public string Relation { get; set; }
}
 
    /// <summary>
/// TrainingStudentDtoDomain Data Structure.
/// </summary>
[Serializable]
 
public class TrainingStudentDtoDomain : TopObject
{
            /// <summary>
            /// 学员手机号
            /// </summary>
            [XmlElement("mobile")]
            public string Mobile { get; set; }
    
            /// <summary>
            /// 学员名字
            /// </summary>
            [XmlElement("name")]
            public string Name { get; set; }
    
            /// <summary>
            /// 学员编号
            /// </summary>
            [XmlElement("number")]
            public string Number { get; set; }
    
            /// <summary>
            /// 课包ID列表
            /// </summary>
            [XmlArray("package_ids")]
            [XmlArrayItem("number")]
            public List<string> PackageIds { get; set; }
    
            /// <summary>
            /// 学员联系人列表
            /// </summary>
            [XmlArray("patriarchs")]
            [XmlArrayItem("patriarch_dto")]
            public List<PatriarchDtoDomain> Patriarchs { get; set; }
}
 
        #endregion
    }
}