All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.dingtalksns_storage_1_0.Client Maven / Gradle / Ivy

There is a newer version: 2.1.67
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalksns_storage_1_0;

import com.aliyun.tea.*;
import com.aliyun.dingtalksns_storage_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 GetDentriesRequest * @param headers GetDentriesHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDentriesResponse */ public GetDentriesResponse getDentriesWithOptions(String spaceId, GetDentriesRequest request, GetDentriesHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.dentryIds)) { body.put("dentryIds", request.dentryIds); } if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } 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", "GetDentries"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/dentries/batchQuery"), 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 GetDentriesResponse()); } /** * summary : *

三方个人应用批量获取文件或文件夹信息

* * @param request GetDentriesRequest * @return GetDentriesResponse */ public GetDentriesResponse getDentries(String spaceId, GetDentriesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetDentriesHeaders headers = new GetDentriesHeaders(); return this.getDentriesWithOptions(spaceId, request, headers, runtime); } /** * summary : *

三方个人应用获取文件(夹)信息

* * @param request GetDentryRequest * @param headers GetDentryHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDentryResponse */ public GetDentryResponse getDentryWithOptions(String spaceId, String dentryId, GetDentryRequest request, GetDentryHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } 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", "GetDentry"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/dentries/" + dentryId + "/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 GetDentryResponse()); } /** * summary : *

三方个人应用获取文件(夹)信息

* * @param request GetDentryRequest * @return GetDentryResponse */ public GetDentryResponse getDentry(String spaceId, String dentryId, GetDentryRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetDentryHeaders headers = new GetDentryHeaders(); return this.getDentryWithOptions(spaceId, dentryId, request, headers, runtime); } /** * summary : *

三方个人应用批量获取文件缩略图

* * @param request GetDentryThumbnailsRequest * @param headers GetDentryThumbnailsHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDentryThumbnailsResponse */ public GetDentryThumbnailsResponse getDentryThumbnailsWithOptions(String spaceId, GetDentryThumbnailsRequest request, GetDentryThumbnailsHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.dentryIds)) { body.put("dentryIds", request.dentryIds); } 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", "GetDentryThumbnails"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/thumbnails/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 GetDentryThumbnailsResponse()); } /** * summary : *

三方个人应用批量获取文件缩略图

* * @param request GetDentryThumbnailsRequest * @return GetDentryThumbnailsResponse */ public GetDentryThumbnailsResponse getDentryThumbnails(String spaceId, GetDentryThumbnailsRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetDentryThumbnailsHeaders headers = new GetDentryThumbnailsHeaders(); return this.getDentryThumbnailsWithOptions(spaceId, request, headers, runtime); } /** * summary : *

三方个人应用获取文件下载信息

* * @param request GetFileDownloadInfoRequest * @param headers GetFileDownloadInfoHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetFileDownloadInfoResponse */ public GetFileDownloadInfoResponse getFileDownloadInfoWithOptions(String spaceId, String dentryId, GetFileDownloadInfoRequest request, GetFileDownloadInfoHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } 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", "GetFileDownloadInfo"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/dentries/" + dentryId + "/downloadInfos/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 GetFileDownloadInfoResponse()); } /** * summary : *

三方个人应用获取文件下载信息

* * @param request GetFileDownloadInfoRequest * @return GetFileDownloadInfoResponse */ public GetFileDownloadInfoResponse getFileDownloadInfo(String spaceId, String dentryId, GetFileDownloadInfoRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetFileDownloadInfoHeaders headers = new GetFileDownloadInfoHeaders(); return this.getFileDownloadInfoWithOptions(spaceId, dentryId, request, headers, runtime); } /** * summary : *

三方个人应用获取IM会话存储空间信息

* * @param request GetSpaceRequest * @param headers GetSpaceHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetSpaceResponse */ public GetSpaceResponse getSpaceWithOptions(GetSpaceRequest request, GetSpaceHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); 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("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", "GetSpace"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/conversations/spaces/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 GetSpaceResponse()); } /** * summary : *

三方个人应用获取IM会话存储空间信息

* * @param request GetSpaceRequest * @return GetSpaceResponse */ public GetSpaceResponse getSpace(GetSpaceRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetSpaceHeaders headers = new GetSpaceHeaders(); return this.getSpaceWithOptions(request, headers, runtime); } /** * summary : *

三方个人应用获取全部文件或文件夹列表

* * @param request ListAllDentriesRequest * @param headers ListAllDentriesHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListAllDentriesResponse */ public ListAllDentriesResponse listAllDentriesWithOptions(String spaceId, ListAllDentriesRequest request, ListAllDentriesHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } 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", "ListAllDentries"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/dentries/listAll"), 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 ListAllDentriesResponse()); } /** * summary : *

三方个人应用获取全部文件或文件夹列表

* * @param request ListAllDentriesRequest * @return ListAllDentriesResponse */ public ListAllDentriesResponse listAllDentries(String spaceId, ListAllDentriesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListAllDentriesHeaders headers = new ListAllDentriesHeaders(); return this.listAllDentriesWithOptions(spaceId, request, headers, runtime); } /** * summary : *

三方个人应用获取文件列表

* * @param request ListDentriesRequest * @param headers ListDentriesHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListDentriesResponse */ public ListDentriesResponse listDentriesWithOptions(String spaceId, ListDentriesRequest request, ListDentriesHeaders 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.maxResults)) { query.put("maxResults", request.maxResults); } if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { query.put("nextToken", request.nextToken); } if (!com.aliyun.teautil.Common.isUnset(request.order)) { query.put("order", request.order); } if (!com.aliyun.teautil.Common.isUnset(request.orderBy)) { query.put("orderBy", request.orderBy); } if (!com.aliyun.teautil.Common.isUnset(request.parentId)) { query.put("parentId", request.parentId); } if (!com.aliyun.teautil.Common.isUnset(request.unionId)) { query.put("unionId", request.unionId); } if (!com.aliyun.teautil.Common.isUnset(request.withThumbnail)) { query.put("withThumbnail", request.withThumbnail); } 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", "ListDentries"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/spaces/" + spaceId + "/dentries"), 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 ListDentriesResponse()); } /** * summary : *

三方个人应用获取文件列表

* * @param request ListDentriesRequest * @return ListDentriesResponse */ public ListDentriesResponse listDentries(String spaceId, ListDentriesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListDentriesHeaders headers = new ListDentriesHeaders(); return this.listDentriesWithOptions(spaceId, request, headers, runtime); } /** * summary : *

获取会话过期文件列表

* * @param request ListExpiredRequest * @param headers ListExpiredHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListExpiredResponse */ public ListExpiredResponse listExpiredWithOptions(ListExpiredRequest request, ListExpiredHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.openConversationId)) { body.put("openConversationId", request.openConversationId); } if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } 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", "ListExpired"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/conversations/expiredFileLists/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 ListExpiredResponse()); } /** * summary : *

获取会话过期文件列表

* * @param request ListExpiredRequest * @return ListExpiredResponse */ public ListExpiredResponse listExpired(ListExpiredRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListExpiredHeaders headers = new ListExpiredHeaders(); return this.listExpiredWithOptions(request, headers, runtime); } /** * summary : *

三方个人应用订阅文件变更事件

* * @param request SubscribeEventRequest * @param headers SubscribeEventHeaders * @param runtime runtime options for this request RuntimeOptions * @return SubscribeEventResponse */ public SubscribeEventResponse subscribeEventWithOptions(SubscribeEventRequest request, SubscribeEventHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.scope)) { body.put("scope", request.scope); } if (!com.aliyun.teautil.Common.isUnset(request.scopeId)) { body.put("scopeId", request.scopeId); } 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", "SubscribeEvent"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/events/subscribe"), 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 SubscribeEventResponse()); } /** * summary : *

三方个人应用订阅文件变更事件

* * @param request SubscribeEventRequest * @return SubscribeEventResponse */ public SubscribeEventResponse subscribeEvent(SubscribeEventRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); SubscribeEventHeaders headers = new SubscribeEventHeaders(); return this.subscribeEventWithOptions(request, headers, runtime); } /** * summary : *

三方个人应用取消订阅文件变更事件

* * @param request UnsubscribeEventRequest * @param headers UnsubscribeEventHeaders * @param runtime runtime options for this request RuntimeOptions * @return UnsubscribeEventResponse */ public UnsubscribeEventResponse unsubscribeEventWithOptions(UnsubscribeEventRequest request, UnsubscribeEventHeaders 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.unionId)) { query.put("unionId", request.unionId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.scope)) { body.put("scope", request.scope); } if (!com.aliyun.teautil.Common.isUnset(request.scopeId)) { body.put("scopeId", request.scopeId); } 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", "UnsubscribeEvent"), new TeaPair("version", "snsStorage_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/snsStorage/events/unsubscribe"), 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 UnsubscribeEventResponse()); } /** * summary : *

三方个人应用取消订阅文件变更事件

* * @param request UnsubscribeEventRequest * @return UnsubscribeEventResponse */ public UnsubscribeEventResponse unsubscribeEvent(UnsubscribeEventRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); UnsubscribeEventHeaders headers = new UnsubscribeEventHeaders(); return this.unsubscribeEventWithOptions(request, headers, runtime); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy