diff --git a/VERSION b/VERSION index 44e679834..06fc57828 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2086 \ No newline at end of file +1.36.2087 \ No newline at end of file diff --git a/quickbi-public/CMakeLists.txt b/quickbi-public/CMakeLists.txt index eab9ac8ce..5747220fd 100644 --- a/quickbi-public/CMakeLists.txt +++ b/quickbi-public/CMakeLists.txt @@ -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 diff --git a/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h b/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h index 280a7c304..34098e8e6 100644 --- a/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h +++ b/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h @@ -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 QueryReadableResourcesListByUserIdOutcome; typedef std::future QueryReadableResourcesListByUserIdOutcomeCallable; typedef std::function&)> QueryReadableResourcesListByUserIdAsyncHandler; + typedef Outcome QueryReadableResourcesListByUserIdV2Outcome; + typedef std::future QueryReadableResourcesListByUserIdV2OutcomeCallable; + typedef std::function&)> QueryReadableResourcesListByUserIdV2AsyncHandler; typedef Outcome QueryReportPerformanceOutcome; typedef std::future QueryReportPerformanceOutcomeCallable; typedef std::function&)> 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& 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& 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& context = nullptr) const; QueryReportPerformanceOutcomeCallable queryReportPerformanceCallable(const Model::QueryReportPerformanceRequest& request) const; diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h b/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h new file mode 100644 index 000000000..995d3331e --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Request.h @@ -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 +#include +#include +#include +#include + +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_ diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.h b/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.h new file mode 100644 index 000000000..2d056b9a1 --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdV2Result.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 +#include +#include +#include +#include + +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 getResult()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + std::vector result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYREADABLERESOURCESLISTBYUSERIDV2RESULT_H_ \ No newline at end of file diff --git a/quickbi-public/src/Quickbi-publicClient.cc b/quickbi-public/src/Quickbi-publicClient.cc index be1eaad23..e970fcb76 100644 --- a/quickbi-public/src/Quickbi-publicClient.cc +++ b/quickbi-public/src/Quickbi-publicClient.cc @@ -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& 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>( + [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(); diff --git a/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Request.cc b/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Request.cc new file mode 100644 index 000000000..7bc93f993 --- /dev/null +++ b/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Request.cc @@ -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 + +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); +} + diff --git a/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Result.cc b/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Result.cc new file mode 100644 index 000000000..36f30d2e9 --- /dev/null +++ b/quickbi-public/src/model/QueryReadableResourcesListByUserIdV2Result.cc @@ -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 +#include + +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::getResult()const +{ + return result_; +} +