com.aliyun.dingtalkapaas_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
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkapaas_1_0;
import com.aliyun.tea.*;
import com.aliyun.dingtalkapaas_1_0.models.*;
public class Client extends com.aliyun.teaopenapi.Client {
public com.aliyun.gateway.spi.Client _client;
public Client(com.aliyun.teaopenapi.models.Config config) throws Exception {
super(config);
this._client = new com.aliyun.gateway.dingtalk.Client();
this._spi = _client;
this._endpointRule = "";
if (com.aliyun.teautil.Common.empty(_endpoint)) {
this._endpoint = "api.dingtalk.com";
}
}
/**
* @summary 批量创建模板
*
* @param request BatchCreateTemplateRequest
* @param headers BatchCreateTemplateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return BatchCreateTemplateResponse
*/
public BatchCreateTemplateResponse batchCreateTemplateWithOptions(BatchCreateTemplateRequest request, BatchCreateTemplateHeaders 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.templateList)) {
body.put("templateList", request.templateList);
}
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", "BatchCreateTemplate"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates"),
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 BatchCreateTemplateResponse());
}
/**
* @summary 批量创建模板
*
* @param request BatchCreateTemplateRequest
* @return BatchCreateTemplateResponse
*/
public BatchCreateTemplateResponse batchCreateTemplate(BatchCreateTemplateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
BatchCreateTemplateHeaders headers = new BatchCreateTemplateHeaders();
return this.batchCreateTemplateWithOptions(request, headers, runtime);
}
/**
* @summary 批量查询模板
*
* @param request BatchQueryByTemplateKeyRequest
* @param headers BatchQueryByTemplateKeyHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return BatchQueryByTemplateKeyResponse
*/
public BatchQueryByTemplateKeyResponse batchQueryByTemplateKeyWithOptions(BatchQueryByTemplateKeyRequest request, BatchQueryByTemplateKeyHeaders 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.templateKeys)) {
body.put("templateKeys", request.templateKeys);
}
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", "BatchQueryByTemplateKey"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates/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 BatchQueryByTemplateKeyResponse());
}
/**
* @summary 批量查询模板
*
* @param request BatchQueryByTemplateKeyRequest
* @return BatchQueryByTemplateKeyResponse
*/
public BatchQueryByTemplateKeyResponse batchQueryByTemplateKey(BatchQueryByTemplateKeyRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
BatchQueryByTemplateKeyHeaders headers = new BatchQueryByTemplateKeyHeaders();
return this.batchQueryByTemplateKeyWithOptions(request, headers, runtime);
}
/**
* @summary 批量修改模板
*
* @param request BatchUpdateTemplateRequest
* @param headers BatchUpdateTemplateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return BatchUpdateTemplateResponse
*/
public BatchUpdateTemplateResponse batchUpdateTemplateWithOptions(BatchUpdateTemplateRequest request, BatchUpdateTemplateHeaders 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.templateList)) {
body.put("templateList", request.templateList);
}
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", "BatchUpdateTemplate"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates"),
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 BatchUpdateTemplateResponse());
}
/**
* @summary 批量修改模板
*
* @param request BatchUpdateTemplateRequest
* @return BatchUpdateTemplateResponse
*/
public BatchUpdateTemplateResponse batchUpdateTemplate(BatchUpdateTemplateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
BatchUpdateTemplateHeaders headers = new BatchUpdateTemplateHeaders();
return this.batchUpdateTemplateWithOptions(request, headers, runtime);
}
/**
* @summary 查询行业标签
*
* @param headers QueryIndustryTagListHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return QueryIndustryTagListResponse
*/
public QueryIndustryTagListResponse queryIndustryTagListWithOptions(QueryIndustryTagListHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
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)
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "QueryIndustryTagList"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates/industries"),
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 QueryIndustryTagListResponse());
}
/**
* @summary 查询行业标签
*
* @return QueryIndustryTagListResponse
*/
public QueryIndustryTagListResponse queryIndustryTagList() throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
QueryIndustryTagListHeaders headers = new QueryIndustryTagListHeaders();
return this.queryIndustryTagListWithOptions(headers, runtime);
}
/**
* @summary 查询角色
*
* @param headers QueryRoleTagListHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return QueryRoleTagListResponse
*/
public QueryRoleTagListResponse queryRoleTagListWithOptions(QueryRoleTagListHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
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)
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "QueryRoleTagList"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates/roles"),
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 QueryRoleTagListResponse());
}
/**
* @summary 查询角色
*
* @return QueryRoleTagListResponse
*/
public QueryRoleTagListResponse queryRoleTagList() throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
QueryRoleTagListHeaders headers = new QueryRoleTagListHeaders();
return this.queryRoleTagListWithOptions(headers, runtime);
}
/**
* @summary 查询模板分类
*
* @param headers QueryTemplateCategorysHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return QueryTemplateCategorysResponse
*/
public QueryTemplateCategorysResponse queryTemplateCategorysWithOptions(QueryTemplateCategorysHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
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)
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "QueryTemplateCategorys"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates/categories"),
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 QueryTemplateCategorysResponse());
}
/**
* @summary 查询模板分类
*
* @return QueryTemplateCategorysResponse
*/
public QueryTemplateCategorysResponse queryTemplateCategorys() throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
QueryTemplateCategorysHeaders headers = new QueryTemplateCategorysHeaders();
return this.queryTemplateCategorysWithOptions(headers, runtime);
}
/**
* @summary 撤回模板审核
*
* @param request RecallAuditTemplateRequest
* @param headers RecallAuditTemplateHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return RecallAuditTemplateResponse
*/
public RecallAuditTemplateResponse recallAuditTemplateWithOptions(RecallAuditTemplateRequest request, RecallAuditTemplateHeaders 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.templateKeys)) {
body.put("templateKeys", request.templateKeys);
}
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", "RecallAuditTemplate"),
new TeaPair("version", "apaas_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/apaas/templates/audits/recall"),
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 RecallAuditTemplateResponse());
}
/**
* @summary 撤回模板审核
*
* @param request RecallAuditTemplateRequest
* @return RecallAuditTemplateResponse
*/
public RecallAuditTemplateResponse recallAuditTemplate(RecallAuditTemplateRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
RecallAuditTemplateHeaders headers = new RecallAuditTemplateHeaders();
return this.recallAuditTemplateWithOptions(request, headers, runtime);
}
}