com.aliyun.dingtalkimpaas_1_0.Client Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dingtalk Show documentation
Show all versions of dingtalk Show documentation
Alibaba Cloud dingtalk SDK for Java
The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkimpaas_1_0;
import com.aliyun.tea.*;
import com.aliyun.dingtalkimpaas_1_0.models.*;
public class Client extends com.aliyun.teaopenapi.Client {
public Client(com.aliyun.teaopenapi.models.Config config) throws Exception {
super(config);
com.aliyun.gateway.dingtalk.Client gatewayClient = new com.aliyun.gateway.dingtalk.Client();
this._spi = gatewayClient;
this._endpointRule = "";
if (com.aliyun.teautil.Common.empty(_endpoint)) {
this._endpoint = "api.dingtalk.com";
}
}
/**
* summary :
* 添加群成员
*
* @param request AddGroupMembersRequest
* @param headers AddGroupMembersHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AddGroupMembersResponse
*/
public AddGroupMembersResponse addGroupMembersWithOptions(AddGroupMembersRequest request, AddGroupMembersHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.members)) {
body.put("members", request.members);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "AddGroupMembers"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/members/batchAdd"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new AddGroupMembersResponse());
}
/**
* summary :
* 添加群成员
*
* @param request AddGroupMembersRequest
* @return AddGroupMembersResponse
*/
public AddGroupMembersResponse addGroupMembers(AddGroupMembersRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AddGroupMembersHeaders headers = new AddGroupMembersHeaders();
return this.addGroupMembersWithOptions(request, headers, runtime);
}
/**
* summary :
* 外部用户导入profile
*
* @param request AddProfileRequest
* @param headers AddProfileHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AddProfileResponse
*/
public AddProfileResponse addProfileWithOptions(AddProfileRequest request, AddProfileHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.appUid)) {
body.put("appUid", request.appUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.avatarMediaId)) {
body.put("avatarMediaId", request.avatarMediaId);
}
if (!com.aliyun.teautil.Common.isUnset(request.mobileNumber)) {
body.put("mobileNumber", request.mobileNumber);
}
if (!com.aliyun.teautil.Common.isUnset(request.nick)) {
body.put("nick", request.nick);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "AddProfile"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/users/profiles"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "none")
));
return TeaModel.toModel(this.execute(params, req, runtime), new AddProfileResponse());
}
/**
* summary :
* 外部用户导入profile
*
* @param request AddProfileRequest
* @return AddProfileResponse
*/
public AddProfileResponse addProfile(AddProfileRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AddProfileHeaders headers = new AddProfileHeaders();
return this.addProfileWithOptions(request, headers, runtime);
}
/**
* summary :
* 消息批量接口
*
* @param request BatchSendRequest
* @param headers BatchSendHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return BatchSendResponse
*/
public BatchSendResponse batchSendWithOptions(BatchSendRequest request, BatchSendHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.appUids)) {
body.put("appUids", request.appUids);
}
if (!com.aliyun.teautil.Common.isUnset(request.content)) {
body.put("content", request.content);
}
if (!com.aliyun.teautil.Common.isUnset(request.conversationIds)) {
body.put("conversationIds", request.conversationIds);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "BatchSend"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/messages/batchSend"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new BatchSendResponse());
}
/**
* summary :
* 消息批量接口
*
* @param request BatchSendRequest
* @return BatchSendResponse
*/
public BatchSendResponse batchSend(BatchSendRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
BatchSendHeaders headers = new BatchSendHeaders();
return this.batchSendWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建群
*
* @param request CreateGroupRequest
* @param headers CreateGroupHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateGroupResponse
*/
public CreateGroupResponse createGroupWithOptions(CreateGroupRequest request, CreateGroupHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.channel)) {
body.put("channel", request.channel);
}
if (!com.aliyun.teautil.Common.isUnset(request.creatorUid)) {
body.put("creatorUid", request.creatorUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.iconMediaId)) {
body.put("iconMediaId", request.iconMediaId);
}
if (!com.aliyun.teautil.Common.isUnset(request.name)) {
body.put("name", request.name);
}
if (!com.aliyun.teautil.Common.isUnset(request.properties)) {
body.put("properties", request.properties);
}
if (!com.aliyun.teautil.Common.isUnset(request.uuid)) {
body.put("uuid", request.uuid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "CreateGroup"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new CreateGroupResponse());
}
/**
* summary :
* 创建群
*
* @param request CreateGroupRequest
* @return CreateGroupResponse
*/
public CreateGroupResponse createGroup(CreateGroupRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateGroupHeaders headers = new CreateGroupHeaders();
return this.createGroupWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建托管账号为群主的群
*
* @param request CreateTrustGroupRequest
* @param headers CreateTrustGroupHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateTrustGroupResponse
*/
public CreateTrustGroupResponse createTrustGroupWithOptions(CreateTrustGroupRequest request, CreateTrustGroupHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.channel)) {
body.put("channel", request.channel);
}
if (!com.aliyun.teautil.Common.isUnset(request.iconMediaId)) {
body.put("iconMediaId", request.iconMediaId);
}
if (!com.aliyun.teautil.Common.isUnset(request.members)) {
body.put("members", request.members);
}
if (!com.aliyun.teautil.Common.isUnset(request.name)) {
body.put("name", request.name);
}
if (!com.aliyun.teautil.Common.isUnset(request.properties)) {
body.put("properties", request.properties);
}
if (!com.aliyun.teautil.Common.isUnset(request.systemMsg)) {
body.put("systemMsg", request.systemMsg);
}
if (!com.aliyun.teautil.Common.isUnset(request.uuid)) {
body.put("uuid", request.uuid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "CreateTrustGroup"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/trusts"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new CreateTrustGroupResponse());
}
/**
* summary :
* 创建托管账号为群主的群
*
* @param request CreateTrustGroupRequest
* @return CreateTrustGroupResponse
*/
public CreateTrustGroupResponse createTrustGroup(CreateTrustGroupRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateTrustGroupHeaders headers = new CreateTrustGroupHeaders();
return this.createTrustGroupWithOptions(request, headers, runtime);
}
/**
* summary :
* 解散群
*
* @param request DismissGroupRequest
* @param headers DismissGroupHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return DismissGroupResponse
*/
public DismissGroupResponse dismissGroupWithOptions(DismissGroupRequest request, DismissGroupHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "DismissGroup"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/dismiss"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new DismissGroupResponse());
}
/**
* summary :
* 解散群
*
* @param request DismissGroupRequest
* @return DismissGroupResponse
*/
public DismissGroupResponse dismissGroup(DismissGroupRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
DismissGroupHeaders headers = new DismissGroupHeaders();
return this.dismissGroupWithOptions(request, headers, runtime);
}
/**
* summary :
* 生成单聊会话Id
*
* @param request GetConversationIdRequest
* @param headers GetConversationIdHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetConversationIdResponse
*/
public GetConversationIdResponse getConversationIdWithOptions(GetConversationIdRequest request, GetConversationIdHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.appUid)) {
body.put("appUid", request.appUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "GetConversationId"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/conversations"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new GetConversationIdResponse());
}
/**
* summary :
* 生成单聊会话Id
*
* @param request GetConversationIdRequest
* @return GetConversationIdResponse
*/
public GetConversationIdResponse getConversationId(GetConversationIdRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetConversationIdHeaders headers = new GetConversationIdHeaders();
return this.getConversationIdWithOptions(request, headers, runtime);
}
/**
* summary :
* 多媒体文件下载
*
* @param request GetMediaUrlRequest
* @param headers GetMediaUrlHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetMediaUrlResponse
*/
public GetMediaUrlResponse getMediaUrlWithOptions(GetMediaUrlRequest request, GetMediaUrlHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.mediaId)) {
body.put("mediaId", request.mediaId);
}
if (!com.aliyun.teautil.Common.isUnset(request.urlExpireTime)) {
body.put("urlExpireTime", request.urlExpireTime);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "GetMediaUrl"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/medium/urls"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new GetMediaUrlResponse());
}
/**
* summary :
* 多媒体文件下载
*
* @param request GetMediaUrlRequest
* @return GetMediaUrlResponse
*/
public GetMediaUrlResponse getMediaUrl(GetMediaUrlRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetMediaUrlHeaders headers = new GetMediaUrlHeaders();
return this.getMediaUrlWithOptions(request, headers, runtime);
}
/**
* summary :
* 多媒体文件批量下载
*
* @param request GetMediaUrlsRequest
* @param headers GetMediaUrlsHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetMediaUrlsResponse
*/
public GetMediaUrlsResponse getMediaUrlsWithOptions(GetMediaUrlsRequest request, GetMediaUrlsHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.mediaIds)) {
body.put("mediaIds", request.mediaIds);
}
if (!com.aliyun.teautil.Common.isUnset(request.urlExpireTime)) {
body.put("urlExpireTime", request.urlExpireTime);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "GetMediaUrls"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/mediaUrls/query"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new GetMediaUrlsResponse());
}
/**
* summary :
* 多媒体文件批量下载
*
* @param request GetMediaUrlsRequest
* @return GetMediaUrlsResponse
*/
public GetMediaUrlsResponse getMediaUrls(GetMediaUrlsRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetMediaUrlsHeaders headers = new GetMediaUrlsHeaders();
return this.getMediaUrlsWithOptions(request, headers, runtime);
}
/**
* summary :
* 获取钉盘文件下载信息
*
* @param request GetSpaceFileUrlRequest
* @param headers GetSpaceFileUrlHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetSpaceFileUrlResponse
*/
public GetSpaceFileUrlResponse getSpaceFileUrlWithOptions(GetSpaceFileUrlRequest request, GetSpaceFileUrlHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map query = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.fileId)) {
query.put("fileId", request.fileId);
}
if (!com.aliyun.teautil.Common.isUnset(request.senderUid)) {
query.put("senderUid", request.senderUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.spaceId)) {
query.put("spaceId", request.spaceId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("query", com.aliyun.openapiutil.Client.query(query))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "GetSpaceFileUrl"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/spaces/files/urls"),
new TeaPair("method", "GET"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new GetSpaceFileUrlResponse());
}
/**
* summary :
* 获取钉盘文件下载信息
*
* @param request GetSpaceFileUrlRequest
* @return GetSpaceFileUrlResponse
*/
public GetSpaceFileUrlResponse getSpaceFileUrl(GetSpaceFileUrlRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetSpaceFileUrlHeaders headers = new GetSpaceFileUrlHeaders();
return this.getSpaceFileUrlWithOptions(request, headers, runtime);
}
/**
* summary :
* 获取企业员工类型的群成员
*
* @param request ListGroupStaffMembersRequest
* @param headers ListGroupStaffMembersHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return ListGroupStaffMembersResponse
*/
public ListGroupStaffMembersResponse listGroupStaffMembersWithOptions(ListGroupStaffMembersRequest request, ListGroupStaffMembersHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "ListGroupStaffMembers"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/staffMemers/query"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new ListGroupStaffMembersResponse());
}
/**
* summary :
* 获取企业员工类型的群成员
*
* @param request ListGroupStaffMembersRequest
* @return ListGroupStaffMembersResponse
*/
public ListGroupStaffMembersResponse listGroupStaffMembers(ListGroupStaffMembersRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
ListGroupStaffMembersHeaders headers = new ListGroupStaffMembersHeaders();
return this.listGroupStaffMembersWithOptions(request, headers, runtime);
}
/**
* summary :
* 查询batchSend结果
*
* @param request QueryBatchSendResultRequest
* @param headers QueryBatchSendResultHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return QueryBatchSendResultResponse
*/
public QueryBatchSendResultResponse queryBatchSendResultWithOptions(QueryBatchSendResultRequest request, QueryBatchSendResultHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map query = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.senderUserId)) {
query.put("senderUserId", request.senderUserId);
}
if (!com.aliyun.teautil.Common.isUnset(request.taskId)) {
query.put("taskId", request.taskId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("query", com.aliyun.openapiutil.Client.query(query))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "QueryBatchSendResult"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/messages/batchSendResults"),
new TeaPair("method", "GET"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new QueryBatchSendResultResponse());
}
/**
* summary :
* 查询batchSend结果
*
* @param request QueryBatchSendResultRequest
* @return QueryBatchSendResultResponse
*/
public QueryBatchSendResultResponse queryBatchSendResult(QueryBatchSendResultRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
QueryBatchSendResultHeaders headers = new QueryBatchSendResultHeaders();
return this.queryBatchSendResultWithOptions(request, headers, runtime);
}
/**
* summary :
* 消息已读
*
* @param request ReadMessageRequest
* @param headers ReadMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return ReadMessageResponse
*/
public ReadMessageResponse readMessageWithOptions(ReadMessageRequest request, ReadMessageHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.messageId)) {
body.put("messageId", request.messageId);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "ReadMessage"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/messages/read"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "none")
));
return TeaModel.toModel(this.execute(params, req, runtime), new ReadMessageResponse());
}
/**
* summary :
* 消息已读
*
* @param request ReadMessageRequest
* @return ReadMessageResponse
*/
public ReadMessageResponse readMessage(ReadMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
ReadMessageHeaders headers = new ReadMessageHeaders();
return this.readMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 消息撤回
*
* @param request RecallMessageRequest
* @param headers RecallMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return RecallMessageResponse
*/
public RecallMessageResponse recallMessageWithOptions(RecallMessageRequest request, RecallMessageHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.messageId)) {
body.put("messageId", request.messageId);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.type)) {
body.put("type", request.type);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "RecallMessage"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/messages/recall"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "none")
));
return TeaModel.toModel(this.execute(params, req, runtime), new RecallMessageResponse());
}
/**
* summary :
* 消息撤回
*
* @param request RecallMessageRequest
* @return RecallMessageResponse
*/
public RecallMessageResponse recallMessage(RecallMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
RecallMessageHeaders headers = new RecallMessageHeaders();
return this.recallMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 移除群成员
*
* @param request RemoveGroupMembersRequest
* @param headers RemoveGroupMembersHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return RemoveGroupMembersResponse
*/
public RemoveGroupMembersResponse removeGroupMembersWithOptions(RemoveGroupMembersRequest request, RemoveGroupMembersHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.memberUids)) {
body.put("memberUids", request.memberUids);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "RemoveGroupMembers"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/members/batchRemove"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new RemoveGroupMembersResponse());
}
/**
* summary :
* 移除群成员
*
* @param request RemoveGroupMembersRequest
* @return RemoveGroupMembersResponse
*/
public RemoveGroupMembersResponse removeGroupMembers(RemoveGroupMembersRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
RemoveGroupMembersHeaders headers = new RemoveGroupMembersHeaders();
return this.removeGroupMembersWithOptions(request, headers, runtime);
}
/**
* summary :
* 消息发送
*
* @param request SendMessageRequest
* @param headers SendMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return SendMessageResponse
*/
public SendMessageResponse sendMessageWithOptions(SendMessageRequest request, SendMessageHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.content)) {
body.put("content", request.content);
}
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.createTime)) {
body.put("createTime", request.createTime);
}
if (!com.aliyun.teautil.Common.isUnset(request.receiverUid)) {
body.put("receiverUid", request.receiverUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.senderUid)) {
body.put("senderUid", request.senderUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.uuid)) {
body.put("uuid", request.uuid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "SendMessage"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/messages/send"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new SendMessageResponse());
}
/**
* summary :
* 消息发送
*
* @param request SendMessageRequest
* @return SendMessageResponse
*/
public SendMessageResponse sendMessage(SendMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
SendMessageHeaders headers = new SendMessageHeaders();
return this.sendMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 通过群模板机器人发送消息
*
* @param request SendRobotMessageRequest
* @param headers SendRobotMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return SendRobotMessageResponse
*/
public SendRobotMessageResponse sendRobotMessageWithOptions(SendRobotMessageRequest request, SendRobotMessageHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.atAll)) {
body.put("atAll", request.atAll);
}
if (!com.aliyun.teautil.Common.isUnset(request.atAppUids)) {
body.put("atAppUids", request.atAppUids);
}
if (!com.aliyun.teautil.Common.isUnset(request.atMobiles)) {
body.put("atMobiles", request.atMobiles);
}
if (!com.aliyun.teautil.Common.isUnset(request.atUnionIds)) {
body.put("atUnionIds", request.atUnionIds);
}
if (!com.aliyun.teautil.Common.isUnset(request.atUsers)) {
body.put("atUsers", request.atUsers);
}
if (!com.aliyun.teautil.Common.isUnset(request.channel)) {
body.put("channel", request.channel);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgMediaIdParamMap)) {
body.put("msgMediaIdParamMap", request.msgMediaIdParamMap);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParamMap)) {
body.put("msgParamMap", request.msgParamMap);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgTemplateId)) {
body.put("msgTemplateId", request.msgTemplateId);
}
if (!com.aliyun.teautil.Common.isUnset(request.receiverAppUids)) {
body.put("receiverAppUids", request.receiverAppUids);
}
if (!com.aliyun.teautil.Common.isUnset(request.receiverMobiles)) {
body.put("receiverMobiles", request.receiverMobiles);
}
if (!com.aliyun.teautil.Common.isUnset(request.receiverUnionIds)) {
body.put("receiverUnionIds", request.receiverUnionIds);
}
if (!com.aliyun.teautil.Common.isUnset(request.receiverUserIds)) {
body.put("receiverUserIds", request.receiverUserIds);
}
if (!com.aliyun.teautil.Common.isUnset(request.robotCode)) {
body.put("robotCode", request.robotCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.targetOpenConversationId)) {
body.put("targetOpenConversationId", request.targetOpenConversationId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "SendRobotMessage"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/robots/messages/send"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new SendRobotMessageResponse());
}
/**
* summary :
* 通过群模板机器人发送消息
*
* @param request SendRobotMessageRequest
* @return SendRobotMessageResponse
*/
public SendRobotMessageResponse sendRobotMessage(SendRobotMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
SendRobotMessageHeaders headers = new SendRobotMessageHeaders();
return this.sendRobotMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 修改群名称
*
* @param request UpdateGroupNameRequest
* @param headers UpdateGroupNameHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateGroupNameResponse
*/
public UpdateGroupNameResponse updateGroupNameWithOptions(UpdateGroupNameRequest request, UpdateGroupNameHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.name)) {
body.put("name", request.name);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.operationSource)) {
realHeaders.put("operationSource", com.aliyun.teautil.Common.toJSONString(headers.operationSource));
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "UpdateGroupName"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/names"),
new TeaPair("method", "PUT"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new UpdateGroupNameResponse());
}
/**
* summary :
* 修改群名称
*
* @param request UpdateGroupNameRequest
* @return UpdateGroupNameResponse
*/
public UpdateGroupNameResponse updateGroupName(UpdateGroupNameRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateGroupNameHeaders headers = new UpdateGroupNameHeaders();
return this.updateGroupNameWithOptions(request, headers, runtime);
}
/**
* summary :
* 转让群主
*
* @param request UpdateGroupOwnerRequest
* @param headers UpdateGroupOwnerHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateGroupOwnerResponse
*/
public UpdateGroupOwnerResponse updateGroupOwnerWithOptions(UpdateGroupOwnerRequest request, UpdateGroupOwnerHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.conversationId)) {
body.put("conversationId", request.conversationId);
}
if (!com.aliyun.teautil.Common.isUnset(request.operatorUid)) {
body.put("operatorUid", request.operatorUid);
}
if (!com.aliyun.teautil.Common.isUnset(request.ownerUid)) {
body.put("ownerUid", request.ownerUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "UpdateGroupOwner"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/groups/owners"),
new TeaPair("method", "PUT"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new UpdateGroupOwnerResponse());
}
/**
* summary :
* 转让群主
*
* @param request UpdateGroupOwnerRequest
* @return UpdateGroupOwnerResponse
*/
public UpdateGroupOwnerResponse updateGroupOwner(UpdateGroupOwnerRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateGroupOwnerHeaders headers = new UpdateGroupOwnerHeaders();
return this.updateGroupOwnerWithOptions(request, headers, runtime);
}
/**
* summary :
* 互联互通上传文件
*
* @param request UploadFileRequest
* @param headers UploadFileHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UploadFileResponse
*/
public UploadFileResponse uploadFileWithOptions(UploadFileRequest request, UploadFileHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.fileName)) {
body.put("fileName", request.fileName);
}
if (!com.aliyun.teautil.Common.isUnset(request.fileType)) {
body.put("fileType", request.fileType);
}
if (!com.aliyun.teautil.Common.isUnset(request.fileUrl)) {
body.put("fileUrl", request.fileUrl);
}
if (!com.aliyun.teautil.Common.isUnset(request.senderUid)) {
body.put("senderUid", request.senderUid);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "UploadFile"),
new TeaPair("version", "impaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/impaas/interconnections/files/upload"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new UploadFileResponse());
}
/**
* summary :
* 互联互通上传文件
*
* @param request UploadFileRequest
* @return UploadFileResponse
*/
public UploadFileResponse uploadFile(UploadFileRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UploadFileHeaders headers = new UploadFileHeaders();
return this.uploadFileWithOptions(request, headers, runtime);
}
}