com.aliyun.dingtalkcard_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.dingtalkcard_1_0;
import com.aliyun.tea.*;
import com.aliyun.dingtalkcard_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 AppendSpaceRequest
* @param headers AppendSpaceHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AppendSpaceResponse
*/
public AppendSpaceResponse appendSpaceWithOptions(AppendSpaceRequest request, AppendSpaceHeaders 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.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
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", "AppendSpace"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/instances/spaces"),
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 AppendSpaceResponse());
}
/**
* summary :
* 新增或更新卡片的场域信息
*
* @param request AppendSpaceRequest
* @return AppendSpaceResponse
*/
public AppendSpaceResponse appendSpace(AppendSpaceRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AppendSpaceHeaders headers = new AppendSpaceHeaders();
return this.appendSpaceWithOptions(request, headers, runtime);
}
/**
* summary :
* 新增或更新卡片的场域信息
*
* @param request AppendSpaceWithDelegateRequest
* @param headers AppendSpaceWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return AppendSpaceWithDelegateResponse
*/
public AppendSpaceWithDelegateResponse appendSpaceWithDelegateWithOptions(AppendSpaceWithDelegateRequest request, AppendSpaceWithDelegateHeaders 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.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
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", "AppendSpaceWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/instances/spaces"),
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 AppendSpaceWithDelegateResponse());
}
/**
* summary :
* 新增或更新卡片的场域信息
*
* @param request AppendSpaceWithDelegateRequest
* @return AppendSpaceWithDelegateResponse
*/
public AppendSpaceWithDelegateResponse appendSpaceWithDelegate(AppendSpaceWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
AppendSpaceWithDelegateHeaders headers = new AppendSpaceWithDelegateHeaders();
return this.appendSpaceWithDelegateWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建并投放卡片
*
* @param request CreateAndDeliverRequest
* @param headers CreateAndDeliverHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateAndDeliverResponse
*/
public CreateAndDeliverResponse createAndDeliverWithOptions(CreateAndDeliverRequest request, CreateAndDeliverHeaders 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.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackType)) {
body.put("callbackType", request.callbackType);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardTemplateId)) {
body.put("cardTemplateId", request.cardTemplateId);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenDeliverModel)) {
body.put("coFeedOpenDeliverModel", request.coFeedOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.docOpenDeliverModel)) {
body.put("docOpenDeliverModel", request.docOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenDeliverModel)) {
body.put("imGroupOpenDeliverModel", request.imGroupOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenDeliverModel)) {
body.put("imRobotOpenDeliverModel", request.imRobotOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenDeliverModel)) {
body.put("imSingleOpenDeliverModel", request.imSingleOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenSpaceModel)) {
body.put("imSingleOpenSpaceModel", request.imSingleOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openDynamicDataConfig)) {
body.put("openDynamicDataConfig", request.openDynamicDataConfig);
}
if (!com.aliyun.teautil.Common.isUnset(request.openSpaceId)) {
body.put("openSpaceId", request.openSpaceId);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenDeliverModel)) {
body.put("topOpenDeliverModel", request.topOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "CreateAndDeliver"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/instances/createAndDeliver"),
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 CreateAndDeliverResponse());
}
/**
* summary :
* 创建并投放卡片
*
* @param request CreateAndDeliverRequest
* @return CreateAndDeliverResponse
*/
public CreateAndDeliverResponse createAndDeliver(CreateAndDeliverRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateAndDeliverHeaders headers = new CreateAndDeliverHeaders();
return this.createAndDeliverWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建并投放卡片
*
* @param request CreateAndDeliverWithDelegateRequest
* @param headers CreateAndDeliverWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateAndDeliverWithDelegateResponse
*/
public CreateAndDeliverWithDelegateResponse createAndDeliverWithDelegateWithOptions(CreateAndDeliverWithDelegateRequest request, CreateAndDeliverWithDelegateHeaders 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.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackType)) {
body.put("callbackType", request.callbackType);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardTemplateId)) {
body.put("cardTemplateId", request.cardTemplateId);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenDeliverModel)) {
body.put("coFeedOpenDeliverModel", request.coFeedOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.docOpenDeliverModel)) {
body.put("docOpenDeliverModel", request.docOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenDeliverModel)) {
body.put("imGroupOpenDeliverModel", request.imGroupOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenDeliverModel)) {
body.put("imRobotOpenDeliverModel", request.imRobotOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenDeliverModel)) {
body.put("imSingleOpenDeliverModel", request.imSingleOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenSpaceModel)) {
body.put("imSingleOpenSpaceModel", request.imSingleOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openDynamicDataConfig)) {
body.put("openDynamicDataConfig", request.openDynamicDataConfig);
}
if (!com.aliyun.teautil.Common.isUnset(request.openSpaceId)) {
body.put("openSpaceId", request.openSpaceId);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenDeliverModel)) {
body.put("topOpenDeliverModel", request.topOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "CreateAndDeliverWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/instances/createAndDeliver"),
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 CreateAndDeliverWithDelegateResponse());
}
/**
* summary :
* 创建并投放卡片
*
* @param request CreateAndDeliverWithDelegateRequest
* @return CreateAndDeliverWithDelegateResponse
*/
public CreateAndDeliverWithDelegateResponse createAndDeliverWithDelegate(CreateAndDeliverWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateAndDeliverWithDelegateHeaders headers = new CreateAndDeliverWithDelegateHeaders();
return this.createAndDeliverWithDelegateWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建卡片
*
* @param request CreateCardRequest
* @param headers CreateCardHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateCardResponse
*/
public CreateCardResponse createCardWithOptions(CreateCardRequest request, CreateCardHeaders 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.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackType)) {
body.put("callbackType", request.callbackType);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardTemplateId)) {
body.put("cardTemplateId", request.cardTemplateId);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenSpaceModel)) {
body.put("imSingleOpenSpaceModel", request.imSingleOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openDynamicDataConfig)) {
body.put("openDynamicDataConfig", request.openDynamicDataConfig);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "CreateCard"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/instances"),
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 CreateCardResponse());
}
/**
* summary :
* 创建卡片
*
* @param request CreateCardRequest
* @return CreateCardResponse
*/
public CreateCardResponse createCard(CreateCardRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateCardHeaders headers = new CreateCardHeaders();
return this.createCardWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建卡片
*
* @param request CreateCardWithDelegateRequest
* @param headers CreateCardWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateCardWithDelegateResponse
*/
public CreateCardWithDelegateResponse createCardWithDelegateWithOptions(CreateCardWithDelegateRequest request, CreateCardWithDelegateHeaders 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.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackType)) {
body.put("callbackType", request.callbackType);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardTemplateId)) {
body.put("cardTemplateId", request.cardTemplateId);
}
if (!com.aliyun.teautil.Common.isUnset(request.coFeedOpenSpaceModel)) {
body.put("coFeedOpenSpaceModel", request.coFeedOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenSpaceModel)) {
body.put("imGroupOpenSpaceModel", request.imGroupOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenSpaceModel)) {
body.put("imRobotOpenSpaceModel", request.imRobotOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenSpaceModel)) {
body.put("imSingleOpenSpaceModel", request.imSingleOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openDynamicDataConfig)) {
body.put("openDynamicDataConfig", request.openDynamicDataConfig);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenSpaceModel)) {
body.put("topOpenSpaceModel", request.topOpenSpaceModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "CreateCardWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/instances"),
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 CreateCardWithDelegateResponse());
}
/**
* summary :
* 创建卡片
*
* @param request CreateCardWithDelegateRequest
* @return CreateCardWithDelegateResponse
*/
public CreateCardWithDelegateResponse createCardWithDelegate(CreateCardWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateCardWithDelegateHeaders headers = new CreateCardWithDelegateHeaders();
return this.createCardWithDelegateWithOptions(request, headers, runtime);
}
/**
* summary :
* 投放卡片
*
* @param request DeliverCardRequest
* @param headers DeliverCardHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return DeliverCardResponse
*/
public DeliverCardResponse deliverCardWithOptions(DeliverCardRequest request, DeliverCardHeaders 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.coFeedOpenDeliverModel)) {
body.put("coFeedOpenDeliverModel", request.coFeedOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.docOpenDeliverModel)) {
body.put("docOpenDeliverModel", request.docOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenDeliverModel)) {
body.put("imGroupOpenDeliverModel", request.imGroupOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenDeliverModel)) {
body.put("imRobotOpenDeliverModel", request.imRobotOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenDeliverModel)) {
body.put("imSingleOpenDeliverModel", request.imSingleOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openSpaceId)) {
body.put("openSpaceId", request.openSpaceId);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenDeliverModel)) {
body.put("topOpenDeliverModel", request.topOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "DeliverCard"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/instances/deliver"),
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 DeliverCardResponse());
}
/**
* summary :
* 投放卡片
*
* @param request DeliverCardRequest
* @return DeliverCardResponse
*/
public DeliverCardResponse deliverCard(DeliverCardRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
DeliverCardHeaders headers = new DeliverCardHeaders();
return this.deliverCardWithOptions(request, headers, runtime);
}
/**
* summary :
* 投放卡片
*
* @param request DeliverCardWithDelegateRequest
* @param headers DeliverCardWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return DeliverCardWithDelegateResponse
*/
public DeliverCardWithDelegateResponse deliverCardWithDelegateWithOptions(DeliverCardWithDelegateRequest request, DeliverCardWithDelegateHeaders 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.coFeedOpenDeliverModel)) {
body.put("coFeedOpenDeliverModel", request.coFeedOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.docOpenDeliverModel)) {
body.put("docOpenDeliverModel", request.docOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imGroupOpenDeliverModel)) {
body.put("imGroupOpenDeliverModel", request.imGroupOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imRobotOpenDeliverModel)) {
body.put("imRobotOpenDeliverModel", request.imRobotOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.imSingleOpenDeliverModel)) {
body.put("imSingleOpenDeliverModel", request.imSingleOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.openSpaceId)) {
body.put("openSpaceId", request.openSpaceId);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.topOpenDeliverModel)) {
body.put("topOpenDeliverModel", request.topOpenDeliverModel);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "DeliverCardWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/instances/deliver"),
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 DeliverCardWithDelegateResponse());
}
/**
* summary :
* 投放卡片
*
* @param request DeliverCardWithDelegateRequest
* @return DeliverCardWithDelegateResponse
*/
public DeliverCardWithDelegateResponse deliverCardWithDelegate(DeliverCardWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
DeliverCardWithDelegateHeaders headers = new DeliverCardWithDelegateHeaders();
return this.deliverCardWithDelegateWithOptions(request, headers, runtime);
}
/**
* summary :
* 注册卡片回调地址
*
* @param request RegisterCallbackRequest
* @param headers RegisterCallbackHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return RegisterCallbackResponse
*/
public RegisterCallbackResponse registerCallbackWithOptions(RegisterCallbackRequest request, RegisterCallbackHeaders 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.apiSecret)) {
body.put("apiSecret", request.apiSecret);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackUrl)) {
body.put("callbackUrl", request.callbackUrl);
}
if (!com.aliyun.teautil.Common.isUnset(request.forceUpdate)) {
body.put("forceUpdate", request.forceUpdate);
}
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", "RegisterCallback"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/callbacks/register"),
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 RegisterCallbackResponse());
}
/**
* summary :
* 注册卡片回调地址
*
* @param request RegisterCallbackRequest
* @return RegisterCallbackResponse
*/
public RegisterCallbackResponse registerCallback(RegisterCallbackRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
RegisterCallbackHeaders headers = new RegisterCallbackHeaders();
return this.registerCallbackWithOptions(request, headers, runtime);
}
/**
* summary :
* 注册卡片回调地址
*
* @param request RegisterCallbackWithDelegateRequest
* @param headers RegisterCallbackWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return RegisterCallbackWithDelegateResponse
*/
public RegisterCallbackWithDelegateResponse registerCallbackWithDelegateWithOptions(RegisterCallbackWithDelegateRequest request, RegisterCallbackWithDelegateHeaders 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.apiSecret)) {
body.put("apiSecret", request.apiSecret);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackRouteKey)) {
body.put("callbackRouteKey", request.callbackRouteKey);
}
if (!com.aliyun.teautil.Common.isUnset(request.callbackUrl)) {
body.put("callbackUrl", request.callbackUrl);
}
if (!com.aliyun.teautil.Common.isUnset(request.forceUpdate)) {
body.put("forceUpdate", request.forceUpdate);
}
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", "RegisterCallbackWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/callbacks/register"),
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 RegisterCallbackWithDelegateResponse());
}
/**
* summary :
* 注册卡片回调地址
*
* @param request RegisterCallbackWithDelegateRequest
* @return RegisterCallbackWithDelegateResponse
*/
public RegisterCallbackWithDelegateResponse registerCallbackWithDelegate(RegisterCallbackWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
RegisterCallbackWithDelegateHeaders headers = new RegisterCallbackWithDelegateHeaders();
return this.registerCallbackWithDelegateWithOptions(request, headers, runtime);
}
/**
* summary :
* AI互动卡片流式更新
*
* @param request StreamingUpdateRequest
* @param headers StreamingUpdateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return StreamingUpdateResponse
*/
public StreamingUpdateResponse streamingUpdateWithOptions(StreamingUpdateRequest request, StreamingUpdateHeaders 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.guid)) {
body.put("guid", request.guid);
}
if (!com.aliyun.teautil.Common.isUnset(request.isError)) {
body.put("isError", request.isError);
}
if (!com.aliyun.teautil.Common.isUnset(request.isFinalize)) {
body.put("isFinalize", request.isFinalize);
}
if (!com.aliyun.teautil.Common.isUnset(request.isFull)) {
body.put("isFull", request.isFull);
}
if (!com.aliyun.teautil.Common.isUnset(request.key)) {
body.put("key", request.key);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
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", "StreamingUpdate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/streaming"),
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 StreamingUpdateResponse());
}
/**
* summary :
* AI互动卡片流式更新
*
* @param request StreamingUpdateRequest
* @return StreamingUpdateResponse
*/
public StreamingUpdateResponse streamingUpdate(StreamingUpdateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
StreamingUpdateHeaders headers = new StreamingUpdateHeaders();
return this.streamingUpdateWithOptions(request, headers, runtime);
}
/**
* summary :
* 更新卡片
*
* @param request UpdateCardRequest
* @param headers UpdateCardHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateCardResponse
*/
public UpdateCardResponse updateCardWithOptions(UpdateCardRequest request, UpdateCardHeaders 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.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardUpdateOptions)) {
body.put("cardUpdateOptions", request.cardUpdateOptions);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "UpdateCard"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/instances"),
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 UpdateCardResponse());
}
/**
* summary :
* 更新卡片
*
* @param request UpdateCardRequest
* @return UpdateCardResponse
*/
public UpdateCardResponse updateCard(UpdateCardRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateCardHeaders headers = new UpdateCardHeaders();
return this.updateCardWithOptions(request, headers, runtime);
}
/**
* summary :
* 更新卡片
*
* @param request UpdateCardWithDelegateRequest
* @param headers UpdateCardWithDelegateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateCardWithDelegateResponse
*/
public UpdateCardWithDelegateResponse updateCardWithDelegateWithOptions(UpdateCardWithDelegateRequest request, UpdateCardWithDelegateHeaders 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.cardData)) {
body.put("cardData", request.cardData);
}
if (!com.aliyun.teautil.Common.isUnset(request.cardUpdateOptions)) {
body.put("cardUpdateOptions", request.cardUpdateOptions);
}
if (!com.aliyun.teautil.Common.isUnset(request.outTrackId)) {
body.put("outTrackId", request.outTrackId);
}
if (!com.aliyun.teautil.Common.isUnset(request.privateData)) {
body.put("privateData", request.privateData);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdType)) {
body.put("userIdType", request.userIdType);
}
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", "UpdateCardWithDelegate"),
new TeaPair("version", "card_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/card/me/instances"),
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 UpdateCardWithDelegateResponse());
}
/**
* summary :
* 更新卡片
*
* @param request UpdateCardWithDelegateRequest
* @return UpdateCardWithDelegateResponse
*/
public UpdateCardWithDelegateResponse updateCardWithDelegate(UpdateCardWithDelegateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateCardWithDelegateHeaders headers = new UpdateCardWithDelegateHeaders();
return this.updateCardWithDelegateWithOptions(request, headers, runtime);
}
}