/
OrganizationClient.java
261 lines (236 loc) · 10.9 KB
/
OrganizationClient.java
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.organization.v20181225;
import java.lang.reflect.Type;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.AbstractClient;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.JsonResponseModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.organization.v20181225.models.*;
public class OrganizationClient extends AbstractClient{
private static String endpoint = "organization.tencentcloudapi.com";
private static String service = "organization";
private static String version = "2018-12-25";
public OrganizationClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public OrganizationClient(Credential credential, String region, ClientProfile profile) {
super(OrganizationClient.endpoint, OrganizationClient.version, credential, region, profile);
}
/**
*接受加入企业组织邀请
* @param req AcceptOrganizationInvitationRequest
* @return AcceptOrganizationInvitationResponse
* @throws TencentCloudSDKException
*/
public AcceptOrganizationInvitationResponse AcceptOrganizationInvitation(AcceptOrganizationInvitationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "AcceptOrganizationInvitation", AcceptOrganizationInvitationResponse.class);
}
/**
*添加企业组织单元
* @param req AddOrganizationNodeRequest
* @return AddOrganizationNodeResponse
* @throws TencentCloudSDKException
*/
public AddOrganizationNodeResponse AddOrganizationNode(AddOrganizationNodeRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "AddOrganizationNode", AddOrganizationNodeResponse.class);
}
/**
*取消企业组织邀请
* @param req CancelOrganizationInvitationRequest
* @return CancelOrganizationInvitationResponse
* @throws TencentCloudSDKException
*/
public CancelOrganizationInvitationResponse CancelOrganizationInvitation(CancelOrganizationInvitationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CancelOrganizationInvitation", CancelOrganizationInvitationResponse.class);
}
/**
*创建企业组织
* @param req CreateOrganizationRequest
* @return CreateOrganizationResponse
* @throws TencentCloudSDKException
*/
public CreateOrganizationResponse CreateOrganization(CreateOrganizationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateOrganization", CreateOrganizationResponse.class);
}
/**
*删除企业组织
* @param req DeleteOrganizationRequest
* @return DeleteOrganizationResponse
* @throws TencentCloudSDKException
*/
public DeleteOrganizationResponse DeleteOrganization(DeleteOrganizationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DeleteOrganization", DeleteOrganizationResponse.class);
}
/**
*删除企业组织成员
* @param req DeleteOrganizationMemberFromNodeRequest
* @return DeleteOrganizationMemberFromNodeResponse
* @throws TencentCloudSDKException
*/
public DeleteOrganizationMemberFromNodeResponse DeleteOrganizationMemberFromNode(DeleteOrganizationMemberFromNodeRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DeleteOrganizationMemberFromNode", DeleteOrganizationMemberFromNodeResponse.class);
}
/**
*批量删除企业组织成员
* @param req DeleteOrganizationMembersRequest
* @return DeleteOrganizationMembersResponse
* @throws TencentCloudSDKException
*/
public DeleteOrganizationMembersResponse DeleteOrganizationMembers(DeleteOrganizationMembersRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DeleteOrganizationMembers", DeleteOrganizationMembersResponse.class);
}
/**
*批量删除企业组织单元
* @param req DeleteOrganizationNodesRequest
* @return DeleteOrganizationNodesResponse
* @throws TencentCloudSDKException
*/
public DeleteOrganizationNodesResponse DeleteOrganizationNodes(DeleteOrganizationNodesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DeleteOrganizationNodes", DeleteOrganizationNodesResponse.class);
}
/**
*拒绝企业组织邀请
* @param req DenyOrganizationInvitationRequest
* @return DenyOrganizationInvitationResponse
* @throws TencentCloudSDKException
*/
public DenyOrganizationInvitationResponse DenyOrganizationInvitation(DenyOrganizationInvitationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DenyOrganizationInvitation", DenyOrganizationInvitationResponse.class);
}
/**
*获取企业组织信息
* @param req GetOrganizationRequest
* @return GetOrganizationResponse
* @throws TencentCloudSDKException
*/
public GetOrganizationResponse GetOrganization(GetOrganizationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetOrganization", GetOrganizationResponse.class);
}
/**
*获取企业组织成员
* @param req GetOrganizationMemberRequest
* @return GetOrganizationMemberResponse
* @throws TencentCloudSDKException
*/
public GetOrganizationMemberResponse GetOrganizationMember(GetOrganizationMemberRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetOrganizationMember", GetOrganizationMemberResponse.class);
}
/**
*获取邀请信息列表
* @param req ListOrganizationInvitationsRequest
* @return ListOrganizationInvitationsResponse
* @throws TencentCloudSDKException
*/
public ListOrganizationInvitationsResponse ListOrganizationInvitations(ListOrganizationInvitationsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ListOrganizationInvitations", ListOrganizationInvitationsResponse.class);
}
/**
*获取企业组织成员列表
* @param req ListOrganizationMembersRequest
* @return ListOrganizationMembersResponse
* @throws TencentCloudSDKException
*/
public ListOrganizationMembersResponse ListOrganizationMembers(ListOrganizationMembersRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ListOrganizationMembers", ListOrganizationMembersResponse.class);
}
/**
*获取企业组织单元成员列表
* @param req ListOrganizationNodeMembersRequest
* @return ListOrganizationNodeMembersResponse
* @throws TencentCloudSDKException
*/
public ListOrganizationNodeMembersResponse ListOrganizationNodeMembers(ListOrganizationNodeMembersRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ListOrganizationNodeMembers", ListOrganizationNodeMembersResponse.class);
}
/**
*获取企业组织单元列表
* @param req ListOrganizationNodesRequest
* @return ListOrganizationNodesResponse
* @throws TencentCloudSDKException
*/
public ListOrganizationNodesResponse ListOrganizationNodes(ListOrganizationNodesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ListOrganizationNodes", ListOrganizationNodesResponse.class);
}
/**
*移动成员到指定企业组织单元
* @param req MoveOrganizationMembersToNodeRequest
* @return MoveOrganizationMembersToNodeResponse
* @throws TencentCloudSDKException
*/
public MoveOrganizationMembersToNodeResponse MoveOrganizationMembersToNode(MoveOrganizationMembersToNodeRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "MoveOrganizationMembersToNode", MoveOrganizationMembersToNodeResponse.class);
}
/**
*退出企业组织
* @param req QuitOrganizationRequest
* @return QuitOrganizationResponse
* @throws TencentCloudSDKException
*/
public QuitOrganizationResponse QuitOrganization(QuitOrganizationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "QuitOrganization", QuitOrganizationResponse.class);
}
/**
*发送企业组织邀请
* @param req SendOrganizationInvitationRequest
* @return SendOrganizationInvitationResponse
* @throws TencentCloudSDKException
*/
public SendOrganizationInvitationResponse SendOrganizationInvitation(SendOrganizationInvitationRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "SendOrganizationInvitation", SendOrganizationInvitationResponse.class);
}
/**
*更新企业成员信息
* @param req UpdateOrganizationMemberRequest
* @return UpdateOrganizationMemberResponse
* @throws TencentCloudSDKException
*/
public UpdateOrganizationMemberResponse UpdateOrganizationMember(UpdateOrganizationMemberRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "UpdateOrganizationMember", UpdateOrganizationMemberResponse.class);
}
/**
*更新企业组织单元
* @param req UpdateOrganizationNodeRequest
* @return UpdateOrganizationNodeResponse
* @throws TencentCloudSDKException
*/
public UpdateOrganizationNodeResponse UpdateOrganizationNode(UpdateOrganizationNodeRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "UpdateOrganizationNode", UpdateOrganizationNodeResponse.class);
}
}