Add QueryReadableResourcesListByUserIdV2 API.
This commit is contained in:
@@ -175,6 +175,8 @@ set(quickbi-public_public_header_model
|
||||
include/alibabacloud/quickbi-public/model/QueryOrganizationWorkspaceListResult.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdRequest.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdResult.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReportPerformanceRequest.h
|
||||
include/alibabacloud/quickbi-public/model/QueryReportPerformanceResult.h
|
||||
include/alibabacloud/quickbi-public/model/QueryShareListRequest.h
|
||||
@@ -406,6 +408,8 @@ set(quickbi-public_src
|
||||
src/model/QueryOrganizationWorkspaceListResult.cc
|
||||
src/model/QueryReadableResourcesListByUserIdRequest.cc
|
||||
src/model/QueryReadableResourcesListByUserIdResult.cc
|
||||
src/model/QueryReadableResourcesListByUserIdV2Request.cc
|
||||
src/model/QueryReadableResourcesListByUserIdV2Result.cc
|
||||
src/model/QueryReportPerformanceRequest.cc
|
||||
src/model/QueryReportPerformanceResult.cc
|
||||
src/model/QueryShareListRequest.cc
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
#include "model/QueryOrganizationWorkspaceListResult.h"
|
||||
#include "model/QueryReadableResourcesListByUserIdRequest.h"
|
||||
#include "model/QueryReadableResourcesListByUserIdResult.h"
|
||||
#include "model/QueryReadableResourcesListByUserIdV2Request.h"
|
||||
#include "model/QueryReadableResourcesListByUserIdV2Result.h"
|
||||
#include "model/QueryReportPerformanceRequest.h"
|
||||
#include "model/QueryReportPerformanceResult.h"
|
||||
#include "model/QueryShareListRequest.h"
|
||||
@@ -490,6 +492,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::QueryReadableResourcesListByUserIdResult> QueryReadableResourcesListByUserIdOutcome;
|
||||
typedef std::future<QueryReadableResourcesListByUserIdOutcome> QueryReadableResourcesListByUserIdOutcomeCallable;
|
||||
typedef std::function<void(const Quickbi_publicClient*, const Model::QueryReadableResourcesListByUserIdRequest&, const QueryReadableResourcesListByUserIdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryReadableResourcesListByUserIdAsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryReadableResourcesListByUserIdV2Result> QueryReadableResourcesListByUserIdV2Outcome;
|
||||
typedef std::future<QueryReadableResourcesListByUserIdV2Outcome> QueryReadableResourcesListByUserIdV2OutcomeCallable;
|
||||
typedef std::function<void(const Quickbi_publicClient*, const Model::QueryReadableResourcesListByUserIdV2Request&, const QueryReadableResourcesListByUserIdV2Outcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryReadableResourcesListByUserIdV2AsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryReportPerformanceResult> QueryReportPerformanceOutcome;
|
||||
typedef std::future<QueryReportPerformanceOutcome> QueryReportPerformanceOutcomeCallable;
|
||||
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
|
||||
QueryReadableResourcesListByUserIdOutcome queryReadableResourcesListByUserId(const Model::QueryReadableResourcesListByUserIdRequest &request)const;
|
||||
void queryReadableResourcesListByUserIdAsync(const Model::QueryReadableResourcesListByUserIdRequest& request, const QueryReadableResourcesListByUserIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryReadableResourcesListByUserIdOutcomeCallable queryReadableResourcesListByUserIdCallable(const Model::QueryReadableResourcesListByUserIdRequest& request) const;
|
||||
QueryReadableResourcesListByUserIdV2Outcome queryReadableResourcesListByUserIdV2(const Model::QueryReadableResourcesListByUserIdV2Request &request)const;
|
||||
void queryReadableResourcesListByUserIdV2Async(const Model::QueryReadableResourcesListByUserIdV2Request& request, const QueryReadableResourcesListByUserIdV2AsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryReadableResourcesListByUserIdV2OutcomeCallable queryReadableResourcesListByUserIdV2Callable(const Model::QueryReadableResourcesListByUserIdV2Request& request) const;
|
||||
QueryReportPerformanceOutcome queryReportPerformance(const Model::QueryReportPerformanceRequest &request)const;
|
||||
void queryReportPerformanceAsync(const Model::QueryReportPerformanceRequest& request, const QueryReportPerformanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryReportPerformanceOutcomeCallable queryReportPerformanceCallable(const Model::QueryReportPerformanceRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
|
||||
#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
|
||||
|
||||
#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Quickbi_public {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryReadableResourcesListByUserIdV2Request : public RpcServiceRequest {
|
||||
public:
|
||||
QueryReadableResourcesListByUserIdV2Request();
|
||||
~QueryReadableResourcesListByUserIdV2Request();
|
||||
std::string getAccessPoint() const;
|
||||
void setAccessPoint(const std::string &accessPoint);
|
||||
std::string getUserId() const;
|
||||
void setUserId(const std::string &userId);
|
||||
std::string getWorkType() const;
|
||||
void setWorkType(const std::string &workType);
|
||||
std::string getSignType() const;
|
||||
void setSignType(const std::string &signType);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string accessPoint_;
|
||||
std::string userId_;
|
||||
std::string workType_;
|
||||
std::string signType_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Quickbi_public
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2REQUEST_H_
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_
|
||||
#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Quickbi_public
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryReadableResourcesListByUserIdV2Result : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Directory
|
||||
{
|
||||
std::string pathId;
|
||||
std::string id;
|
||||
std::string pathName;
|
||||
std::string name;
|
||||
};
|
||||
int status;
|
||||
std::string modifyTime;
|
||||
std::string ownerName;
|
||||
std::string description;
|
||||
std::string workType;
|
||||
std::string modifyName;
|
||||
std::string createTime;
|
||||
std::string workspaceId;
|
||||
int thirdPartAuthFlag;
|
||||
std::string ownerId;
|
||||
std::string securityLevel;
|
||||
std::string workName;
|
||||
std::string workspaceName;
|
||||
std::string worksId;
|
||||
Directory directory;
|
||||
};
|
||||
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Result();
|
||||
explicit QueryReadableResourcesListByUserIdV2Result(const std::string &payload);
|
||||
~QueryReadableResourcesListByUserIdV2Result();
|
||||
bool getSuccess()const;
|
||||
std::vector<Data> getResult()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
bool success_;
|
||||
std::vector<Data> result_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_
|
||||
@@ -2823,6 +2823,42 @@ Quickbi_publicClient::QueryReadableResourcesListByUserIdOutcomeCallable Quickbi_
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::QueryReadableResourcesListByUserIdV2Outcome Quickbi_publicClient::queryReadableResourcesListByUserIdV2(const QueryReadableResourcesListByUserIdV2Request &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryReadableResourcesListByUserIdV2Outcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryReadableResourcesListByUserIdV2Outcome(QueryReadableResourcesListByUserIdV2Result(outcome.result()));
|
||||
else
|
||||
return QueryReadableResourcesListByUserIdV2Outcome(outcome.error());
|
||||
}
|
||||
|
||||
void Quickbi_publicClient::queryReadableResourcesListByUserIdV2Async(const QueryReadableResourcesListByUserIdV2Request& request, const QueryReadableResourcesListByUserIdV2AsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryReadableResourcesListByUserIdV2(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Quickbi_publicClient::QueryReadableResourcesListByUserIdV2OutcomeCallable Quickbi_publicClient::queryReadableResourcesListByUserIdV2Callable(const QueryReadableResourcesListByUserIdV2Request &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryReadableResourcesListByUserIdV2Outcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryReadableResourcesListByUserIdV2(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::QueryReportPerformanceOutcome Quickbi_publicClient::queryReportPerformance(const QueryReportPerformanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h>
|
||||
|
||||
using AlibabaCloud::Quickbi_public::Model::QueryReadableResourcesListByUserIdV2Request;
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Request::QueryReadableResourcesListByUserIdV2Request()
|
||||
: RpcServiceRequest("quickbi-public", "2022-01-01", "QueryReadableResourcesListByUserIdV2") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Request::~QueryReadableResourcesListByUserIdV2Request() {}
|
||||
|
||||
std::string QueryReadableResourcesListByUserIdV2Request::getAccessPoint() const {
|
||||
return accessPoint_;
|
||||
}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Request::setAccessPoint(const std::string &accessPoint) {
|
||||
accessPoint_ = accessPoint;
|
||||
setParameter(std::string("AccessPoint"), accessPoint);
|
||||
}
|
||||
|
||||
std::string QueryReadableResourcesListByUserIdV2Request::getUserId() const {
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Request::setUserId(const std::string &userId) {
|
||||
userId_ = userId;
|
||||
setParameter(std::string("UserId"), userId);
|
||||
}
|
||||
|
||||
std::string QueryReadableResourcesListByUserIdV2Request::getWorkType() const {
|
||||
return workType_;
|
||||
}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Request::setWorkType(const std::string &workType) {
|
||||
workType_ = workType;
|
||||
setParameter(std::string("WorkType"), workType);
|
||||
}
|
||||
|
||||
std::string QueryReadableResourcesListByUserIdV2Request::getSignType() const {
|
||||
return signType_;
|
||||
}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Request::setSignType(const std::string &signType) {
|
||||
signType_ = signType;
|
||||
setParameter(std::string("SignType"), signType);
|
||||
}
|
||||
|
||||
std::string QueryReadableResourcesListByUserIdV2Request::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Request::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setParameter(std::string("WorkspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Quickbi_public;
|
||||
using namespace AlibabaCloud::Quickbi_public::Model;
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Result::QueryReadableResourcesListByUserIdV2Result() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Result::QueryReadableResourcesListByUserIdV2Result(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryReadableResourcesListByUserIdV2Result::~QueryReadableResourcesListByUserIdV2Result()
|
||||
{}
|
||||
|
||||
void QueryReadableResourcesListByUserIdV2Result::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["Data"];
|
||||
for (auto valueResultData : allResultNode)
|
||||
{
|
||||
Data resultObject;
|
||||
if(!valueResultData["Status"].isNull())
|
||||
resultObject.status = std::stoi(valueResultData["Status"].asString());
|
||||
if(!valueResultData["ModifyTime"].isNull())
|
||||
resultObject.modifyTime = valueResultData["ModifyTime"].asString();
|
||||
if(!valueResultData["OwnerName"].isNull())
|
||||
resultObject.ownerName = valueResultData["OwnerName"].asString();
|
||||
if(!valueResultData["Description"].isNull())
|
||||
resultObject.description = valueResultData["Description"].asString();
|
||||
if(!valueResultData["WorkType"].isNull())
|
||||
resultObject.workType = valueResultData["WorkType"].asString();
|
||||
if(!valueResultData["ModifyName"].isNull())
|
||||
resultObject.modifyName = valueResultData["ModifyName"].asString();
|
||||
if(!valueResultData["CreateTime"].isNull())
|
||||
resultObject.createTime = valueResultData["CreateTime"].asString();
|
||||
if(!valueResultData["WorkspaceId"].isNull())
|
||||
resultObject.workspaceId = valueResultData["WorkspaceId"].asString();
|
||||
if(!valueResultData["ThirdPartAuthFlag"].isNull())
|
||||
resultObject.thirdPartAuthFlag = std::stoi(valueResultData["ThirdPartAuthFlag"].asString());
|
||||
if(!valueResultData["OwnerId"].isNull())
|
||||
resultObject.ownerId = valueResultData["OwnerId"].asString();
|
||||
if(!valueResultData["SecurityLevel"].isNull())
|
||||
resultObject.securityLevel = valueResultData["SecurityLevel"].asString();
|
||||
if(!valueResultData["WorkName"].isNull())
|
||||
resultObject.workName = valueResultData["WorkName"].asString();
|
||||
if(!valueResultData["WorkspaceName"].isNull())
|
||||
resultObject.workspaceName = valueResultData["WorkspaceName"].asString();
|
||||
if(!valueResultData["WorksId"].isNull())
|
||||
resultObject.worksId = valueResultData["WorksId"].asString();
|
||||
auto directoryNode = value["Directory"];
|
||||
if(!directoryNode["PathId"].isNull())
|
||||
resultObject.directory.pathId = directoryNode["PathId"].asString();
|
||||
if(!directoryNode["Id"].isNull())
|
||||
resultObject.directory.id = directoryNode["Id"].asString();
|
||||
if(!directoryNode["PathName"].isNull())
|
||||
resultObject.directory.pathName = directoryNode["PathName"].asString();
|
||||
if(!directoryNode["Name"].isNull())
|
||||
resultObject.directory.name = directoryNode["Name"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool QueryReadableResourcesListByUserIdV2Result::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::vector<QueryReadableResourcesListByUserIdV2Result::Data> QueryReadableResourcesListByUserIdV2Result::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user