![JAR search and dependency download from the Maven repository](/logo.png)
com.aliyun.dingtalkdingmi_1_0.Client Maven / Gradle / Ivy
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkdingmi_1_0;
import com.aliyun.tea.*;
import com.aliyun.dingtalkdingmi_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 AddRobotInstanceToGroupRequest
* @param headers AddRobotInstanceToGroupHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AddRobotInstanceToGroupResponse
*/
public AddRobotInstanceToGroupResponse addRobotInstanceToGroupWithOptions(AddRobotInstanceToGroupRequest request, AddRobotInstanceToGroupHeaders 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.chatbotId)) {
body.put("chatbotId", request.chatbotId);
}
if (!com.aliyun.teautil.Common.isUnset(request.openConversationId)) {
body.put("openConversationId", request.openConversationId);
}
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", "AddRobotInstanceToGroup"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/intelligentRobots/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 AddRobotInstanceToGroupResponse());
}
/**
* summary :
* 添加智能客服机器人到钉钉群
*
* @param request AddRobotInstanceToGroupRequest
* @return AddRobotInstanceToGroupResponse
*/
public AddRobotInstanceToGroupResponse addRobotInstanceToGroup(AddRobotInstanceToGroupRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AddRobotInstanceToGroupHeaders headers = new AddRobotInstanceToGroupHeaders();
return this.addRobotInstanceToGroupWithOptions(request, headers, runtime);
}
/**
* summary :
* 调用小蜜机器人的问答能力
*
* @param request AskRobotRequest
* @param headers AskRobotHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AskRobotResponse
*/
public AskRobotResponse askRobotWithOptions(AskRobotRequest request, AskRobotHeaders 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.dingUserId)) {
body.put("dingUserId", request.dingUserId);
}
if (!com.aliyun.teautil.Common.isUnset(request.question)) {
body.put("question", request.question);
}
if (!com.aliyun.teautil.Common.isUnset(request.robotAppKey)) {
body.put("robotAppKey", request.robotAppKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.sessionUuid)) {
body.put("sessionUuid", request.sessionUuid);
}
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", "AskRobot"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/robots/ask"),
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 AskRobotResponse());
}
/**
* summary :
* 调用小蜜机器人的问答能力
*
* @param request AskRobotRequest
* @return AskRobotResponse
*/
public AskRobotResponse askRobot(AskRobotRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AskRobotHeaders headers = new AskRobotHeaders();
return this.askRobotWithOptions(request, headers, runtime);
}
/**
* summary :
* 小蜜机器人数据统计指标
*
* @param request GetDingMeBaseDataRequest
* @param headers GetDingMeBaseDataHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetDingMeBaseDataResponse
*/
public GetDingMeBaseDataResponse getDingMeBaseDataWithOptions(GetDingMeBaseDataRequest request, GetDingMeBaseDataHeaders 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.appKey)) {
query.put("appKey", request.appKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.byDay)) {
query.put("byDay", request.byDay);
}
if (!com.aliyun.teautil.Common.isUnset(request.endDay)) {
query.put("endDay", request.endDay);
}
if (!com.aliyun.teautil.Common.isUnset(request.startDay)) {
query.put("startDay", request.startDay);
}
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", "GetDingMeBaseData"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/robots/data"),
new TeaPair("method", "GET"),
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 GetDingMeBaseDataResponse());
}
/**
* summary :
* 小蜜机器人数据统计指标
*
* @param request GetDingMeBaseDataRequest
* @return GetDingMeBaseDataResponse
*/
public GetDingMeBaseDataResponse getDingMeBaseData(GetDingMeBaseDataRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetDingMeBaseDataHeaders headers = new GetDingMeBaseDataHeaders();
return this.getDingMeBaseDataWithOptions(request, headers, runtime);
}
/**
* summary :
* 获取智能客服机器人信息
*
* @param request GetIntelligentRobotInfoRequest
* @param headers GetIntelligentRobotInfoHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetIntelligentRobotInfoResponse
*/
public GetIntelligentRobotInfoResponse getIntelligentRobotInfoWithOptions(GetIntelligentRobotInfoRequest request, GetIntelligentRobotInfoHeaders 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.robotAppKey)) {
query.put("robotAppKey", request.robotAppKey);
}
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", "GetIntelligentRobotInfo"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/intelligentRobots/infos"),
new TeaPair("method", "GET"),
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 GetIntelligentRobotInfoResponse());
}
/**
* summary :
* 获取智能客服机器人信息
*
* @param request GetIntelligentRobotInfoRequest
* @return GetIntelligentRobotInfoResponse
*/
public GetIntelligentRobotInfoResponse getIntelligentRobotInfo(GetIntelligentRobotInfoRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetIntelligentRobotInfoHeaders headers = new GetIntelligentRobotInfoHeaders();
return this.getIntelligentRobotInfoWithOptions(request, headers, runtime);
}
/**
* summary :
* 获取服务窗机器人信息
*
* @param request GetOfficialAccountRobotInfoRequest
* @param headers GetOfficialAccountRobotInfoHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetOfficialAccountRobotInfoResponse
*/
public GetOfficialAccountRobotInfoResponse getOfficialAccountRobotInfoWithOptions(GetOfficialAccountRobotInfoRequest request, GetOfficialAccountRobotInfoHeaders 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.type)) {
query.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.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", "GetOfficialAccountRobotInfo"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/officialAccounts/robots"),
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 GetOfficialAccountRobotInfoResponse());
}
/**
* summary :
* 获取服务窗机器人信息
*
* @param request GetOfficialAccountRobotInfoRequest
* @return GetOfficialAccountRobotInfoResponse
*/
public GetOfficialAccountRobotInfoResponse getOfficialAccountRobotInfo(GetOfficialAccountRobotInfoRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetOfficialAccountRobotInfoHeaders headers = new GetOfficialAccountRobotInfoHeaders();
return this.getOfficialAccountRobotInfoWithOptions(request, headers, runtime);
}
/**
* summary :
* 小蜜客服网页渠道获取三方用户token
*
* @param request GetWebChannelUserTokenRequest
* @param headers GetWebChannelUserTokenHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return GetWebChannelUserTokenResponse
*/
public GetWebChannelUserTokenResponse getWebChannelUserTokenWithOptions(GetWebChannelUserTokenRequest request, GetWebChannelUserTokenHeaders 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.foreignId)) {
body.put("foreignId", request.foreignId);
}
if (!com.aliyun.teautil.Common.isUnset(request.nick)) {
body.put("nick", request.nick);
}
if (!com.aliyun.teautil.Common.isUnset(request.source)) {
body.put("source", request.source);
}
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", "GetWebChannelUserToken"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/webChannels/userTokens"),
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 GetWebChannelUserTokenResponse());
}
/**
* summary :
* 小蜜客服网页渠道获取三方用户token
*
* @param request GetWebChannelUserTokenRequest
* @return GetWebChannelUserTokenResponse
*/
public GetWebChannelUserTokenResponse getWebChannelUserToken(GetWebChannelUserTokenRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
GetWebChannelUserTokenHeaders headers = new GetWebChannelUserTokenHeaders();
return this.getWebChannelUserTokenWithOptions(request, headers, runtime);
}
/**
* summary :
* 通过小蜜机器人在客户群内推送消息
*
* @param request PushCustomerGroupMessageRequest
* @param headers PushCustomerGroupMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return PushCustomerGroupMessageResponse
*/
public PushCustomerGroupMessageResponse pushCustomerGroupMessageWithOptions(PushCustomerGroupMessageRequest request, PushCustomerGroupMessageHeaders 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.msgKey)) {
body.put("msgKey", request.msgKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParam)) {
body.put("msgParam", request.msgParam);
}
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", "PushCustomerGroupMessage"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/officialAccounts/robots/groupMessages/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 PushCustomerGroupMessageResponse());
}
/**
* summary :
* 通过小蜜机器人在客户群内推送消息
*
* @param request PushCustomerGroupMessageRequest
* @return PushCustomerGroupMessageResponse
*/
public PushCustomerGroupMessageResponse pushCustomerGroupMessage(PushCustomerGroupMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
PushCustomerGroupMessageHeaders headers = new PushCustomerGroupMessageHeaders();
return this.pushCustomerGroupMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 推送智能客服机器人钉钉群聊消息
*
* @param request PushIntelligentRobotGroupMessageRequest
* @param headers PushIntelligentRobotGroupMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return PushIntelligentRobotGroupMessageResponse
*/
public PushIntelligentRobotGroupMessageResponse pushIntelligentRobotGroupMessageWithOptions(PushIntelligentRobotGroupMessageRequest request, PushIntelligentRobotGroupMessageHeaders 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.chatbotId)) {
body.put("chatbotId", request.chatbotId);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgKey)) {
body.put("msgKey", request.msgKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParam)) {
body.put("msgParam", request.msgParam);
}
if (!com.aliyun.teautil.Common.isUnset(request.openConversationId)) {
body.put("openConversationId", request.openConversationId);
}
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", "PushIntelligentRobotGroupMessage"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/intelligentRobots/groupMessages/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 PushIntelligentRobotGroupMessageResponse());
}
/**
* summary :
* 推送智能客服机器人钉钉群聊消息
*
* @param request PushIntelligentRobotGroupMessageRequest
* @return PushIntelligentRobotGroupMessageResponse
*/
public PushIntelligentRobotGroupMessageResponse pushIntelligentRobotGroupMessage(PushIntelligentRobotGroupMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
PushIntelligentRobotGroupMessageHeaders headers = new PushIntelligentRobotGroupMessageHeaders();
return this.pushIntelligentRobotGroupMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 智能客服机器人推送消息
*
* @param request PushIntelligentRobotMessageRequest
* @param headers PushIntelligentRobotMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return PushIntelligentRobotMessageResponse
*/
public PushIntelligentRobotMessageResponse pushIntelligentRobotMessageWithOptions(PushIntelligentRobotMessageRequest request, PushIntelligentRobotMessageHeaders 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.chatbotId)) {
body.put("chatbotId", request.chatbotId);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgKey)) {
body.put("msgKey", request.msgKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParam)) {
body.put("msgParam", request.msgParam);
}
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", "PushIntelligentRobotMessage"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/intelligentRobots/oToMessages/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 PushIntelligentRobotMessageResponse());
}
/**
* summary :
* 智能客服机器人推送消息
*
* @param request PushIntelligentRobotMessageRequest
* @return PushIntelligentRobotMessageResponse
*/
public PushIntelligentRobotMessageResponse pushIntelligentRobotMessage(PushIntelligentRobotMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
PushIntelligentRobotMessageHeaders headers = new PushIntelligentRobotMessageHeaders();
return this.pushIntelligentRobotMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 通过服务窗机器人推送单聊消息
*
* @param request PushOfficialAccountMessageRequest
* @param headers PushOfficialAccountMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return PushOfficialAccountMessageResponse
*/
public PushOfficialAccountMessageResponse pushOfficialAccountMessageWithOptions(PushOfficialAccountMessageRequest request, PushOfficialAccountMessageHeaders 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.msgKey)) {
body.put("msgKey", request.msgKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParam)) {
body.put("msgParam", request.msgParam);
}
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", "PushOfficialAccountMessage"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/officialAccounts/robots/oToMessages/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 PushOfficialAccountMessageResponse());
}
/**
* summary :
* 通过服务窗机器人推送单聊消息
*
* @param request PushOfficialAccountMessageRequest
* @return PushOfficialAccountMessageResponse
*/
public PushOfficialAccountMessageResponse pushOfficialAccountMessage(PushOfficialAccountMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
PushOfficialAccountMessageHeaders headers = new PushOfficialAccountMessageHeaders();
return this.pushOfficialAccountMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 通过小蜜客服机器人推送单聊消息
*
* @param request PushRobotMessageRequest
* @param headers PushRobotMessageHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return PushRobotMessageResponse
*/
public PushRobotMessageResponse pushRobotMessageWithOptions(PushRobotMessageRequest request, PushRobotMessageHeaders 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.chatbotId)) {
body.put("chatbotId", request.chatbotId);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgKey)) {
body.put("msgKey", request.msgKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgParam)) {
body.put("msgParam", request.msgParam);
}
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", "PushRobotMessage"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/robots/oToMessages/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 PushRobotMessageResponse());
}
/**
* summary :
* 通过小蜜客服机器人推送单聊消息
*
* @param request PushRobotMessageRequest
* @return PushRobotMessageResponse
*/
public PushRobotMessageResponse pushRobotMessage(PushRobotMessageRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
PushRobotMessageHeaders headers = new PushRobotMessageHeaders();
return this.pushRobotMessageWithOptions(request, headers, runtime);
}
/**
* summary :
* 异步回复机器人消息
*
* @param request ReplyRobotRequest
* @param headers ReplyRobotHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return ReplyRobotResponse
*/
public ReplyRobotResponse replyRobotWithOptions(ReplyRobotRequest request, ReplyRobotHeaders 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.proxyMessageStr)) {
body.put("proxyMessageStr", request.proxyMessageStr);
}
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", "ReplyRobot"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/robots/reply"),
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 ReplyRobotResponse());
}
/**
* summary :
* 异步回复机器人消息
*
* @param request ReplyRobotRequest
* @return ReplyRobotResponse
*/
public ReplyRobotResponse replyRobot(ReplyRobotRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
ReplyRobotHeaders headers = new ReplyRobotHeaders();
return this.replyRobotWithOptions(request, headers, runtime);
}
/**
* summary :
* 更新服务窗机器人信息
*
* @param request UpdateOfficialAccountRobotInfoRequest
* @param headers UpdateOfficialAccountRobotInfoHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateOfficialAccountRobotInfoResponse
*/
public UpdateOfficialAccountRobotInfoResponse updateOfficialAccountRobotInfoWithOptions(UpdateOfficialAccountRobotInfoRequest request, UpdateOfficialAccountRobotInfoHeaders 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.type)) {
query.put("type", request.type);
}
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.avatar)) {
body.put("avatar", request.avatar);
}
if (!com.aliyun.teautil.Common.isUnset(request.brief)) {
body.put("brief", request.brief);
}
if (!com.aliyun.teautil.Common.isUnset(request.description)) {
body.put("description", request.description);
}
if (!com.aliyun.teautil.Common.isUnset(request.name)) {
body.put("name", request.name);
}
if (!com.aliyun.teautil.Common.isUnset(request.previewMediaUrl)) {
body.put("previewMediaUrl", request.previewMediaUrl);
}
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)),
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", "UpdateOfficialAccountRobotInfo"),
new TeaPair("version", "dingmi_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/dingmi/officialAccounts/robots"),
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 UpdateOfficialAccountRobotInfoResponse());
}
/**
* summary :
* 更新服务窗机器人信息
*
* @param request UpdateOfficialAccountRobotInfoRequest
* @return UpdateOfficialAccountRobotInfoResponse
*/
public UpdateOfficialAccountRobotInfoResponse updateOfficialAccountRobotInfo(UpdateOfficialAccountRobotInfoRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateOfficialAccountRobotInfoHeaders headers = new UpdateOfficialAccountRobotInfoHeaders();
return this.updateOfficialAccountRobotInfoWithOptions(request, headers, runtime);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy