1
zrg
2024-10-15 a1e3e548ea03ceb32d07bf9f73f4719dd14f7f2e
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
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.authorization.rbac.role.create
    /// </summary>
    public class OapiAuthorizationRbacRoleCreateRequest : BaseDingTalkRequest<DingTalk.Api.Response.OapiAuthorizationRbacRoleCreateResponse>
    {
        /// <summary>
        /// 微应用agenId,需要联系权限平台配置
        /// </summary>
        public string AgentId { get; set; }
 
        /// <summary>
        /// 管理组详情
        /// </summary>
        public string OpenRoleCreate { get; set; }
 
        public OpenRoleCreateVoDomain OpenRoleCreate_ { set { this.OpenRoleCreate = TopUtils.ObjectToJson(value); } } 
 
        #region IDingTalkRequest Members
 
        public override string GetApiName()
        {
            return "dingtalk.oapi.authorization.rbac.role.create";
        }
 
        public override string GetApiCallType()
        {
            return DingTalkConstants.CALL_TYPE_OAPI;
        }
 
        public override IDictionary<string, string> GetParameters()
        {
            TopDictionary parameters = new TopDictionary();
            parameters.Add("agent_id", this.AgentId);
            parameters.Add("open_role_create", this.OpenRoleCreate);
            if (this.otherParams != null)
            {
                parameters.AddAll(this.otherParams);
            }
            return parameters;
        }
 
        public override void Validate()
        {
            RequestValidator.ValidateRequired("agent_id", this.AgentId);
            RequestValidator.ValidateRequired("open_role_create", this.OpenRoleCreate);
        }
 
    /// <summary>
/// OpenContactScopeVoDomain Data Structure.
/// </summary>
[Serializable]
 
public class OpenContactScopeVoDomain : TopObject
{
            /// <summary>
            /// 可管理的指定部门
            /// </summary>
            [XmlArray("dept_ids")]
            [XmlArrayItem("number")]
            public List<string> DeptIds { get; set; }
    
            /// <summary>
            /// 员工所在的部门
            /// </summary>
            [XmlElement("include_member_depts")]
            public Nullable<bool> IncludeMemberDepts { get; set; }
    
            /// <summary>
            /// 主管能管理的部门
            /// </summary>
            [XmlElement("include_self_manage_depts")]
            public Nullable<bool> IncludeSelfManageDepts { get; set; }
    
            /// <summary>
            /// 可管理的员工列表
            /// </summary>
            [XmlArray("userids")]
            [XmlArrayItem("string")]
            public List<string> Userids { get; set; }
}
 
    /// <summary>
/// OpenConditionVoDomain Data Structure.
/// </summary>
[Serializable]
 
public class OpenConditionVoDomain : TopObject
{
            /// <summary>
            /// contactScope
            /// </summary>
            [XmlElement("open_contact_scope")]
            public OpenContactScopeVoDomain OpenContactScope { get; set; }
}
 
    /// <summary>
/// OpenActionVoDomain Data Structure.
/// </summary>
[Serializable]
 
public class OpenActionVoDomain : TopObject
{
            /// <summary>
            /// acitonId列表
            /// </summary>
            [XmlArray("action_ids")]
            [XmlArrayItem("string")]
            public List<string> ActionIds { get; set; }
    
            /// <summary>
            /// conditon
            /// </summary>
            [XmlElement("open_condition")]
            public OpenConditionVoDomain OpenCondition { get; set; }
}
 
    /// <summary>
/// OpenMemberVoDomain Data Structure.
/// </summary>
[Serializable]
 
public class OpenMemberVoDomain : TopObject
{
            /// <summary>
            /// member所属组织
            /// </summary>
            [XmlElement("belong_corpid")]
            public string BelongCorpid { get; set; }
    
            /// <summary>
            /// 成员id
            /// </summary>
            [XmlElement("member_id")]
            public string MemberId { get; set; }
    
            /// <summary>
            /// 成员类型
            /// </summary>
            [XmlElement("member_type")]
            public string MemberType { get; set; }
    
            /// <summary>
            /// 操作人userid
            /// </summary>
            [XmlElement("operate_userid")]
            public string OperateUserid { get; set; }
}
 
    /// <summary>
/// OpenRoleCreateVoDomain Data Structure.
/// </summary>
[Serializable]
 
public class OpenRoleCreateVoDomain : TopObject
{
            /// <summary>
            /// aciton列表
            /// </summary>
            [XmlElement("open_action")]
            public OpenActionVoDomain OpenAction { get; set; }
    
            /// <summary>
            /// 成员列表
            /// </summary>
            [XmlArray("open_members")]
            [XmlArrayItem("open_member_vo")]
            public List<OpenMemberVoDomain> OpenMembers { get; set; }
    
            /// <summary>
            /// 资源列表
            /// </summary>
            [XmlArray("open_resources")]
            [XmlArrayItem("string")]
            public List<string> OpenResources { get; set; }
    
            /// <summary>
            /// 管理组id,注意:创建的时候不要填写
            /// </summary>
            [XmlElement("open_role_id")]
            public string OpenRoleId { get; set; }
    
            /// <summary>
            /// 管理组名
            /// </summary>
            [XmlElement("open_role_name")]
            public string OpenRoleName { get; set; }
}
 
        #endregion
    }
}