Skip to content

Commit 0700253

Browse files
committed
Add QueryReadableResourcesListByUserIdV2 API.
1 parent 8e06520 commit 0700253

File tree

8 files changed

+352
-1
lines changed

8 files changed

+352
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36.2086
1+
1.36.2087

quickbi-public/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ set(quickbi-public_public_header_model
175175
include/alibabacloud/quickbi-public/model/QueryOrganizationWorkspaceListResult.h
176176
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdRequest.h
177177
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdResult.h
178+
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h
179+
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.h
178180
include/alibabacloud/quickbi-public/model/QueryReportPerformanceRequest.h
179181
include/alibabacloud/quickbi-public/model/QueryReportPerformanceResult.h
180182
include/alibabacloud/quickbi-public/model/QueryShareListRequest.h
@@ -406,6 +408,8 @@ set(quickbi-public_src
406408
src/model/QueryOrganizationWorkspaceListResult.cc
407409
src/model/QueryReadableResourcesListByUserIdRequest.cc
408410
src/model/QueryReadableResourcesListByUserIdResult.cc
411+
src/model/QueryReadableResourcesListByUserIdV2Request.cc
412+
src/model/QueryReadableResourcesListByUserIdV2Result.cc
409413
src/model/QueryReportPerformanceRequest.cc
410414
src/model/QueryReportPerformanceResult.cc
411415
src/model/QueryShareListRequest.cc

quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
#include "model/QueryOrganizationWorkspaceListResult.h"
177177
#include "model/QueryReadableResourcesListByUserIdRequest.h"
178178
#include "model/QueryReadableResourcesListByUserIdResult.h"
179+
#include "model/QueryReadableResourcesListByUserIdV2Request.h"
180+
#include "model/QueryReadableResourcesListByUserIdV2Result.h"
179181
#include "model/QueryReportPerformanceRequest.h"
180182
#include "model/QueryReportPerformanceResult.h"
181183
#include "model/QueryShareListRequest.h"
@@ -490,6 +492,9 @@ namespace AlibabaCloud
490492
typedef Outcome<Error, Model::QueryReadableResourcesListByUserIdResult> QueryReadableResourcesListByUserIdOutcome;
491493
typedef std::future<QueryReadableResourcesListByUserIdOutcome> QueryReadableResourcesListByUserIdOutcomeCallable;
492494
typedef std::function<void(const Quickbi_publicClient*, const Model::QueryReadableResourcesListByUserIdRequest&, const QueryReadableResourcesListByUserIdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryReadableResourcesListByUserIdAsyncHandler;
495+
typedef Outcome<Error, Model::QueryReadableResourcesListByUserIdV2Result> QueryReadableResourcesListByUserIdV2Outcome;
496+
typedef std::future<QueryReadableResourcesListByUserIdV2Outcome> QueryReadableResourcesListByUserIdV2OutcomeCallable;
497+
typedef std::function<void(const Quickbi_publicClient*, const Model::QueryReadableResourcesListByUserIdV2Request&, const QueryReadableResourcesListByUserIdV2Outcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryReadableResourcesListByUserIdV2AsyncHandler;
493498
typedef Outcome<Error, Model::QueryReportPerformanceResult> QueryReportPerformanceOutcome;
494499
typedef std::future<QueryReportPerformanceOutcome> QueryReportPerformanceOutcomeCallable;
495500
typedef std::function<void(const Quickbi_publicClient*, const Model::QueryReportPerformanceRequest&, const QueryReportPerformanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryReportPerformanceAsyncHandler;
@@ -837,6 +842,9 @@ namespace AlibabaCloud
837842
QueryReadableResourcesListByUserIdOutcome queryReadableResourcesListByUserId(const Model::QueryReadableResourcesListByUserIdRequest &request)const;
838843
void queryReadableResourcesListByUserIdAsync(const Model::QueryReadableResourcesListByUserIdRequest& request, const QueryReadableResourcesListByUserIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
839844
QueryReadableResourcesListByUserIdOutcomeCallable queryReadableResourcesListByUserIdCallable(const Model::QueryReadableResourcesListByUserIdRequest& request) const;
845+
QueryReadableResourcesListByUserIdV2Outcome queryReadableResourcesListByUserIdV2(const Model::QueryReadableResourcesListByUserIdV2Request &request)const;
846+
void queryReadableResourcesListByUserIdV2Async(const Model::QueryReadableResourcesListByUserIdV2Request& request, const QueryReadableResourcesListByUserIdV2AsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
847+
QueryReadableResourcesListByUserIdV2OutcomeCallable queryReadableResourcesListByUserIdV2Callable(const Model::QueryReadableResourcesListByUserIdV2Request& request) const;
840848
QueryReportPerformanceOutcome queryReportPerformance(const Model::QueryReportPerformanceRequest &request)const;
841849
void queryReportPerformanceAsync(const Model::QueryReportPerformanceRequest& request, const QueryReportPerformanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
842850
QueryReportPerformanceOutcomeCallable queryReportPerformanceCallable(const Model::QueryReportPerformanceRequest& request) const;
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
18+
#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
19+
20+
#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace Quickbi_public {
28+
namespace Model {
29+
class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryReadableResourcesListByUserIdV2Request : public RpcServiceRequest {
30+
public:
31+
QueryReadableResourcesListByUserIdV2Request();
32+
~QueryReadableResourcesListByUserIdV2Request();
33+
std::string getAccessPoint() const;
34+
void setAccessPoint(const std::string &accessPoint);
35+
std::string getUserId() const;
36+
void setUserId(const std::string &userId);
37+
std::string getWorkType() const;
38+
void setWorkType(const std::string &workType);
39+
std::string getSignType() const;
40+
void setSignType(const std::string &signType);
41+
std::string getWorkspaceId() const;
42+
void setWorkspaceId(const std::string &workspaceId);
43+
44+
private:
45+
std::string accessPoint_;
46+
std::string userId_;
47+
std::string workType_;
48+
std::string signType_;
49+
std::string workspaceId_;
50+
};
51+
} // namespace Model
52+
} // namespace Quickbi_public
53+
} // namespace AlibabaCloud
54+
#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_
18+
#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace Quickbi_public
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryReadableResourcesListByUserIdV2Result : public ServiceResult
33+
{
34+
public:
35+
struct Data
36+
{
37+
struct Directory
38+
{
39+
std::string pathId;
40+
std::string id;
41+
std::string pathName;
42+
std::string name;
43+
};
44+
int status;
45+
std::string modifyTime;
46+
std::string ownerName;
47+
std::string description;
48+
std::string workType;
49+
std::string modifyName;
50+
std::string createTime;
51+
std::string workspaceId;
52+
int thirdPartAuthFlag;
53+
std::string ownerId;
54+
std::string securityLevel;
55+
std::string workName;
56+
std::string workspaceName;
57+
std::string worksId;
58+
Directory directory;
59+
};
60+
61+
62+
QueryReadableResourcesListByUserIdV2Result();
63+
explicit QueryReadableResourcesListByUserIdV2Result(const std::string &payload);
64+
~QueryReadableResourcesListByUserIdV2Result();
65+
bool getSuccess()const;
66+
std::vector<Data> getResult()const;
67+
68+
protected:
69+
void parse(const std::string &payload);
70+
private:
71+
bool success_;
72+
std::vector<Data> result_;
73+
74+
};
75+
}
76+
}
77+
}
78+
#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_

quickbi-public/src/Quickbi-publicClient.cc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,6 +2823,42 @@ Quickbi_publicClient::QueryReadableResourcesListByUserIdOutcomeCallable Quickbi_
28232823
return task->get_future();
28242824
}
28252825

2826+
Quickbi_publicClient::QueryReadableResourcesListByUserIdV2Outcome Quickbi_publicClient::queryReadableResourcesListByUserIdV2(const QueryReadableResourcesListByUserIdV2Request &request) const
2827+
{
2828+
auto endpointOutcome = endpointProvider_->getEndpoint();
2829+
if (!endpointOutcome.isSuccess())
2830+
return QueryReadableResourcesListByUserIdV2Outcome(endpointOutcome.error());
2831+
2832+
auto outcome = makeRequest(endpointOutcome.result(), request);
2833+
2834+
if (outcome.isSuccess())
2835+
return QueryReadableResourcesListByUserIdV2Outcome(QueryReadableResourcesListByUserIdV2Result(outcome.result()));
2836+
else
2837+
return QueryReadableResourcesListByUserIdV2Outcome(outcome.error());
2838+
}
2839+
2840+
void Quickbi_publicClient::queryReadableResourcesListByUserIdV2Async(const QueryReadableResourcesListByUserIdV2Request& request, const QueryReadableResourcesListByUserIdV2AsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
2841+
{
2842+
auto fn = [this, request, handler, context]()
2843+
{
2844+
handler(this, request, queryReadableResourcesListByUserIdV2(request), context);
2845+
};
2846+
2847+
asyncExecute(new Runnable(fn));
2848+
}
2849+
2850+
Quickbi_publicClient::QueryReadableResourcesListByUserIdV2OutcomeCallable Quickbi_publicClient::queryReadableResourcesListByUserIdV2Callable(const QueryReadableResourcesListByUserIdV2Request &request) const
2851+
{
2852+
auto task = std::make_shared<std::packaged_task<QueryReadableResourcesListByUserIdV2Outcome()>>(
2853+
[this, request]()
2854+
{
2855+
return this->queryReadableResourcesListByUserIdV2(request);
2856+
});
2857+
2858+
asyncExecute(new Runnable([task]() { (*task)(); }));
2859+
return task->get_future();
2860+
}
2861+
28262862
Quickbi_publicClient::QueryReportPerformanceOutcome Quickbi_publicClient::queryReportPerformance(const QueryReportPerformanceRequest &request) const
28272863
{
28282864
auto endpointOutcome = endpointProvider_->getEndpoint();
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h>
18+
19+
using AlibabaCloud::Quickbi_public::Model::QueryReadableResourcesListByUserIdV2Request;
20+
21+
QueryReadableResourcesListByUserIdV2Request::QueryReadableResourcesListByUserIdV2Request()
22+
: RpcServiceRequest("quickbi-public", "2022-01-01", "QueryReadableResourcesListByUserIdV2") {
23+
setMethod(HttpRequest::Method::Post);
24+
}
25+
26+
QueryReadableResourcesListByUserIdV2Request::~QueryReadableResourcesListByUserIdV2Request() {}
27+
28+
std::string QueryReadableResourcesListByUserIdV2Request::getAccessPoint() const {
29+
return accessPoint_;
30+
}
31+
32+
void QueryReadableResourcesListByUserIdV2Request::setAccessPoint(const std::string &accessPoint) {
33+
accessPoint_ = accessPoint;
34+
setParameter(std::string("AccessPoint"), accessPoint);
35+
}
36+
37+
std::string QueryReadableResourcesListByUserIdV2Request::getUserId() const {
38+
return userId_;
39+
}
40+
41+
void QueryReadableResourcesListByUserIdV2Request::setUserId(const std::string &userId) {
42+
userId_ = userId;
43+
setParameter(std::string("UserId"), userId);
44+
}
45+
46+
std::string QueryReadableResourcesListByUserIdV2Request::getWorkType() const {
47+
return workType_;
48+
}
49+
50+
void QueryReadableResourcesListByUserIdV2Request::setWorkType(const std::string &workType) {
51+
workType_ = workType;
52+
setParameter(std::string("WorkType"), workType);
53+
}
54+
55+
std::string QueryReadableResourcesListByUserIdV2Request::getSignType() const {
56+
return signType_;
57+
}
58+
59+
void QueryReadableResourcesListByUserIdV2Request::setSignType(const std::string &signType) {
60+
signType_ = signType;
61+
setParameter(std::string("SignType"), signType);
62+
}
63+
64+
std::string QueryReadableResourcesListByUserIdV2Request::getWorkspaceId() const {
65+
return workspaceId_;
66+
}
67+
68+
void QueryReadableResourcesListByUserIdV2Request::setWorkspaceId(const std::string &workspaceId) {
69+
workspaceId_ = workspaceId;
70+
setParameter(std::string("WorkspaceId"), workspaceId);
71+
}
72+

0 commit comments

Comments
 (0)