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

com.aliyun.dingtalkwiki_2_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.dingtalkwiki_2_0;

import com.aliyun.tea.*;
import com.aliyun.dingtalkwiki_2_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 AddTeamRequest * @param headers AddTeamHeaders * @param runtime runtime options for this request RuntimeOptions * @return AddTeamResponse */ public AddTeamResponse addTeamWithOptions(AddTeamRequest request, AddTeamHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.name)) { body.put("name", request.name); } 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", "AddTeam"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/teams"), 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 AddTeamResponse()); } /** * summary : *

新建知识小组

* * @param request AddTeamRequest * @return AddTeamResponse */ public AddTeamResponse addTeam(AddTeamRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); AddTeamHeaders headers = new AddTeamHeaders(); return this.addTeamWithOptions(request, headers, runtime); } /** * summary : *

新建知识库

* * @param request AddWorkspaceRequest * @param headers AddWorkspaceHeaders * @param runtime runtime options for this request RuntimeOptions * @return AddWorkspaceResponse */ public AddWorkspaceResponse addWorkspaceWithOptions(AddWorkspaceRequest request, AddWorkspaceHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.name)) { body.put("name", request.name); } 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", "AddWorkspace"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/workspaces"), 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 AddWorkspaceResponse()); } /** * summary : *

新建知识库

* * @param request AddWorkspaceRequest * @return AddWorkspaceResponse */ public AddWorkspaceResponse addWorkspace(AddWorkspaceRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); AddWorkspaceHeaders headers = new AddWorkspaceHeaders(); return this.addWorkspaceWithOptions(request, headers, runtime); } /** * summary : *

删除知识小组

* * @param request DeleteTeamRequest * @param headers DeleteTeamHeaders * @param runtime runtime options for this request RuntimeOptions * @return DeleteTeamResponse */ public DeleteTeamResponse deleteTeamWithOptions(String teamId, DeleteTeamRequest request, DeleteTeamHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } 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", "DeleteTeam"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/teams/" + teamId + ""), new TeaPair("method", "DELETE"), 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 DeleteTeamResponse()); } /** * summary : *

删除知识小组

* * @param request DeleteTeamRequest * @return DeleteTeamResponse */ public DeleteTeamResponse deleteTeam(String teamId, DeleteTeamRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); DeleteTeamHeaders headers = new DeleteTeamHeaders(); return this.deleteTeamWithOptions(teamId, request, headers, runtime); } /** * summary : *

查询员工离职时知识库默认转交人

* * @param request GetDefaultHandOverUserRequest * @param headers GetDefaultHandOverUserHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetDefaultHandOverUserResponse */ public GetDefaultHandOverUserResponse getDefaultHandOverUserWithOptions(GetDefaultHandOverUserRequest request, GetDefaultHandOverUserHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } 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", "GetDefaultHandOverUser"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/managementSettings/defaultHandOverUsers"), 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 GetDefaultHandOverUserResponse()); } /** * summary : *

查询员工离职时知识库默认转交人

* * @param request GetDefaultHandOverUserRequest * @return GetDefaultHandOverUserResponse */ public GetDefaultHandOverUserResponse getDefaultHandOverUser(GetDefaultHandOverUserRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetDefaultHandOverUserHeaders headers = new GetDefaultHandOverUserHeaders(); return this.getDefaultHandOverUserWithOptions(request, headers, runtime); } /** * summary : *

获取我的文档

* * @param request GetMineWorkspaceRequest * @param headers GetMineWorkspaceHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetMineWorkspaceResponse */ public GetMineWorkspaceResponse getMineWorkspaceWithOptions(GetMineWorkspaceRequest request, GetMineWorkspaceHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } 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", "GetMineWorkspace"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/mineWorkspaces"), 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 GetMineWorkspaceResponse()); } /** * summary : *

获取我的文档

* * @param request GetMineWorkspaceRequest * @return GetMineWorkspaceResponse */ public GetMineWorkspaceResponse getMineWorkspace(GetMineWorkspaceRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetMineWorkspaceHeaders headers = new GetMineWorkspaceHeaders(); return this.getMineWorkspaceWithOptions(request, headers, runtime); } /** * summary : *

获取节点

* * @param request GetNodeRequest * @param headers GetNodeHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetNodeResponse */ public GetNodeResponse getNodeWithOptions(String nodeId, GetNodeRequest request, GetNodeHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } if (!com.aliyun.teautil.Common.isUnset(request.withPermissionRole)) { query.put("withPermissionRole", request.withPermissionRole); } if (!com.aliyun.teautil.Common.isUnset(request.withStatisticalInfo)) { query.put("withStatisticalInfo", request.withStatisticalInfo); } 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", "GetNode"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/nodes/" + nodeId + ""), 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 GetNodeResponse()); } /** * summary : *

获取节点

* * @param request GetNodeRequest * @return GetNodeResponse */ public GetNodeResponse getNode(String nodeId, GetNodeRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetNodeHeaders headers = new GetNodeHeaders(); return this.getNodeWithOptions(nodeId, request, headers, runtime); } /** * summary : *

通过链接获取节点

* * @param request GetNodeByUrlRequest * @param headers GetNodeByUrlHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetNodeByUrlResponse */ public GetNodeByUrlResponse getNodeByUrlWithOptions(GetNodeByUrlRequest request, GetNodeByUrlHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } if (!com.aliyun.teautil.Common.isUnset(request.url)) { body.put("url", request.url); } 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", "GetNodeByUrl"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/nodes/queryByUrl"), 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 GetNodeByUrlResponse()); } /** * summary : *

通过链接获取节点

* * @param request GetNodeByUrlRequest * @return GetNodeByUrlResponse */ public GetNodeByUrlResponse getNodeByUrl(GetNodeByUrlRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetNodeByUrlHeaders headers = new GetNodeByUrlHeaders(); return this.getNodeByUrlWithOptions(request, headers, runtime); } /** * summary : *

批量获取节点

* * @param request GetNodesRequest * @param headers GetNodesHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetNodesResponse */ public GetNodesResponse getNodesWithOptions(GetNodesRequest request, GetNodesHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.nodeIds)) { body.put("nodeIds", request.nodeIds); } 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", "GetNodes"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/nodes/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 GetNodesResponse()); } /** * summary : *

批量获取节点

* * @param request GetNodesRequest * @return GetNodesResponse */ public GetNodesResponse getNodes(GetNodesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetNodesHeaders headers = new GetNodesHeaders(); return this.getNodesWithOptions(request, headers, runtime); } /** * summary : *

获取知识小组

* * @param request GetTeamRequest * @param headers GetTeamHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetTeamResponse */ public GetTeamResponse getTeamWithOptions(String teamId, GetTeamRequest request, GetTeamHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } 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", "GetTeam"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/teams/" + teamId + ""), 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 GetTeamResponse()); } /** * summary : *

获取知识小组

* * @param request GetTeamRequest * @return GetTeamResponse */ public GetTeamResponse getTeam(String teamId, GetTeamRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetTeamHeaders headers = new GetTeamHeaders(); return this.getTeamWithOptions(teamId, request, headers, runtime); } /** * summary : *

获取知识库

* * @param request GetWorkspaceRequest * @param headers GetWorkspaceHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetWorkspaceResponse */ public GetWorkspaceResponse getWorkspaceWithOptions(String workspaceId, GetWorkspaceRequest request, GetWorkspaceHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } if (!com.aliyun.teautil.Common.isUnset(request.withPermissionRole)) { query.put("withPermissionRole", request.withPermissionRole); } 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", "GetWorkspace"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/workspaces/" + workspaceId + ""), 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 GetWorkspaceResponse()); } /** * summary : *

获取知识库

* * @param request GetWorkspaceRequest * @return GetWorkspaceResponse */ public GetWorkspaceResponse getWorkspace(String workspaceId, GetWorkspaceRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetWorkspaceHeaders headers = new GetWorkspaceHeaders(); return this.getWorkspaceWithOptions(workspaceId, request, headers, runtime); } /** * summary : *

批量获取知识库

* * @param request GetWorkspacesRequest * @param headers GetWorkspacesHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetWorkspacesResponse */ public GetWorkspacesResponse getWorkspacesWithOptions(GetWorkspacesRequest request, GetWorkspacesHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.option)) { body.put("option", request.option); } if (!com.aliyun.teautil.Common.isUnset(request.workspaceIds)) { body.put("workspaceIds", request.workspaceIds); } 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", "GetWorkspaces"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/workspaces/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 GetWorkspacesResponse()); } /** * summary : *

批量获取知识库

* * @param request GetWorkspacesRequest * @return GetWorkspacesResponse */ public GetWorkspacesResponse getWorkspaces(GetWorkspacesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetWorkspacesHeaders headers = new GetWorkspacesHeaders(); return this.getWorkspacesWithOptions(request, headers, runtime); } /** * summary : *

转交知识库

* * @param request HandOverWorkspaceRequest * @param headers HandOverWorkspaceHeaders * @param runtime runtime options for this request RuntimeOptions * @return HandOverWorkspaceResponse */ public HandOverWorkspaceResponse handOverWorkspaceWithOptions(HandOverWorkspaceRequest request, HandOverWorkspaceHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.sourceOwnerId)) { body.put("sourceOwnerId", request.sourceOwnerId); } if (!com.aliyun.teautil.Common.isUnset(request.targetOwnerId)) { body.put("targetOwnerId", request.targetOwnerId); } if (!com.aliyun.teautil.Common.isUnset(request.workspaceId)) { body.put("workspaceId", request.workspaceId); } 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", "HandOverWorkspace"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/managementOperations/workspaces/handOver"), 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 HandOverWorkspaceResponse()); } /** * summary : *

转交知识库

* * @param request HandOverWorkspaceRequest * @return HandOverWorkspaceResponse */ public HandOverWorkspaceResponse handOverWorkspace(HandOverWorkspaceRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); HandOverWorkspaceHeaders headers = new HandOverWorkspaceHeaders(); return this.handOverWorkspaceWithOptions(request, headers, runtime); } /** * summary : *

获取节点列表

* * @param request ListNodesRequest * @param headers ListNodesHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListNodesResponse */ public ListNodesResponse listNodesWithOptions(ListNodesRequest request, ListNodesHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } if (!com.aliyun.teautil.Common.isUnset(request.parentNodeId)) { query.put("parentNodeId", request.parentNodeId); } if (!com.aliyun.teautil.Common.isUnset(request.withPermissionRole)) { query.put("withPermissionRole", request.withPermissionRole); } 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", "ListNodes"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/nodes"), 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 ListNodesResponse()); } /** * summary : *

获取节点列表

* * @param request ListNodesRequest * @return ListNodesResponse */ public ListNodesResponse listNodes(ListNodesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListNodesHeaders headers = new ListNodesHeaders(); return this.listNodesWithOptions(request, headers, runtime); } /** * summary : *

获取知识小组列表

* * @param request ListTeamsRequest * @param headers ListTeamsHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListTeamsResponse */ public ListTeamsResponse listTeamsWithOptions(ListTeamsRequest request, ListTeamsHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } 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", "ListTeams"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/teams"), 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 ListTeamsResponse()); } /** * summary : *

获取知识小组列表

* * @param request ListTeamsRequest * @return ListTeamsResponse */ public ListTeamsResponse listTeams(ListTeamsRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListTeamsHeaders headers = new ListTeamsHeaders(); return this.listTeamsWithOptions(request, headers, runtime); } /** * summary : *

获取知识库列表

* * @param request ListWorkspacesRequest * @param headers ListWorkspacesHeaders * @param runtime runtime options for this request RuntimeOptions * @return ListWorkspacesResponse */ public ListWorkspacesResponse listWorkspacesWithOptions(ListWorkspacesRequest request, ListWorkspacesHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } if (!com.aliyun.teautil.Common.isUnset(request.orderBy)) { query.put("orderBy", request.orderBy); } if (!com.aliyun.teautil.Common.isUnset(request.teamId)) { query.put("teamId", request.teamId); } if (!com.aliyun.teautil.Common.isUnset(request.withPermissionRole)) { query.put("withPermissionRole", request.withPermissionRole); } 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", "ListWorkspaces"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/workspaces"), 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 ListWorkspacesResponse()); } /** * summary : *

获取知识库列表

* * @param request ListWorkspacesRequest * @return ListWorkspacesResponse */ public ListWorkspacesResponse listWorkspaces(ListWorkspacesRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ListWorkspacesHeaders headers = new ListWorkspacesHeaders(); return this.listWorkspacesWithOptions(request, headers, runtime); } /** * summary : *

设置员工离职时知识库默认转交人

* * @param request SetDefaultHandOverUserRequest * @param headers SetDefaultHandOverUserHeaders * @param runtime runtime options for this request RuntimeOptions * @return SetDefaultHandOverUserResponse */ public SetDefaultHandOverUserResponse setDefaultHandOverUserWithOptions(SetDefaultHandOverUserRequest request, SetDefaultHandOverUserHeaders 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.operatorId)) { query.put("operatorId", request.operatorId); } java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.defaultHandoverUserId)) { body.put("defaultHandoverUserId", request.defaultHandoverUserId); } 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", "SetDefaultHandOverUser"), new TeaPair("version", "wiki_2.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v2.0/wiki/managementSettings/defaultHandOverUsers/set"), 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 SetDefaultHandOverUserResponse()); } /** * summary : *

设置员工离职时知识库默认转交人

* * @param request SetDefaultHandOverUserRequest * @return SetDefaultHandOverUserResponse */ public SetDefaultHandOverUserResponse setDefaultHandOverUser(SetDefaultHandOverUserRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); SetDefaultHandOverUserHeaders headers = new SetDefaultHandOverUserHeaders(); return this.setDefaultHandOverUserWithOptions(request, headers, runtime); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy