diff --git a/VERSION b/VERSION index 4440302a4..4da727e8b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1996 \ No newline at end of file +1.36.1997 \ No newline at end of file diff --git a/quickbi-public/CMakeLists.txt b/quickbi-public/CMakeLists.txt index bad5ad436..2e52f90a9 100644 --- a/quickbi-public/CMakeLists.txt +++ b/quickbi-public/CMakeLists.txt @@ -85,8 +85,12 @@ set(quickbi-public_public_header_model include/alibabacloud/quickbi-public/model/DeleteUserGroupMembersResult.h include/alibabacloud/quickbi-public/model/DeleteUserTagMetaRequest.h include/alibabacloud/quickbi-public/model/DeleteUserTagMetaResult.h + include/alibabacloud/quickbi-public/model/GetMailTaskStatusRequest.h + include/alibabacloud/quickbi-public/model/GetMailTaskStatusResult.h include/alibabacloud/quickbi-public/model/GetUserGroupInfoRequest.h include/alibabacloud/quickbi-public/model/GetUserGroupInfoResult.h + include/alibabacloud/quickbi-public/model/GetWorksEmbedListRequest.h + include/alibabacloud/quickbi-public/model/GetWorksEmbedListResult.h include/alibabacloud/quickbi-public/model/ListApiDatasourceRequest.h include/alibabacloud/quickbi-public/model/ListApiDatasourceResult.h include/alibabacloud/quickbi-public/model/ListByUserGroupIdRequest.h @@ -117,6 +121,8 @@ set(quickbi-public_public_header_model include/alibabacloud/quickbi-public/model/ListWorkspaceRoleUsersResult.h include/alibabacloud/quickbi-public/model/ListWorkspaceRolesRequest.h include/alibabacloud/quickbi-public/model/ListWorkspaceRolesResult.h + include/alibabacloud/quickbi-public/model/ManualRunMailTaskRequest.h + include/alibabacloud/quickbi-public/model/ManualRunMailTaskResult.h include/alibabacloud/quickbi-public/model/ModifyApiDatasourceParametersRequest.h include/alibabacloud/quickbi-public/model/ModifyApiDatasourceParametersResult.h include/alibabacloud/quickbi-public/model/ModifyCopilotEmbedConfigRequest.h @@ -292,8 +298,12 @@ set(quickbi-public_src src/model/DeleteUserGroupMembersResult.cc src/model/DeleteUserTagMetaRequest.cc src/model/DeleteUserTagMetaResult.cc + src/model/GetMailTaskStatusRequest.cc + src/model/GetMailTaskStatusResult.cc src/model/GetUserGroupInfoRequest.cc src/model/GetUserGroupInfoResult.cc + src/model/GetWorksEmbedListRequest.cc + src/model/GetWorksEmbedListResult.cc src/model/ListApiDatasourceRequest.cc src/model/ListApiDatasourceResult.cc src/model/ListByUserGroupIdRequest.cc @@ -324,6 +334,8 @@ set(quickbi-public_src src/model/ListWorkspaceRoleUsersResult.cc src/model/ListWorkspaceRolesRequest.cc src/model/ListWorkspaceRolesResult.cc + src/model/ManualRunMailTaskRequest.cc + src/model/ManualRunMailTaskResult.cc src/model/ModifyApiDatasourceParametersRequest.cc src/model/ModifyApiDatasourceParametersResult.cc src/model/ModifyCopilotEmbedConfigRequest.cc diff --git a/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h b/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h index 17706bf2e..061d61bb0 100644 --- a/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h +++ b/quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h @@ -86,8 +86,12 @@ #include "model/DeleteUserGroupMembersResult.h" #include "model/DeleteUserTagMetaRequest.h" #include "model/DeleteUserTagMetaResult.h" +#include "model/GetMailTaskStatusRequest.h" +#include "model/GetMailTaskStatusResult.h" #include "model/GetUserGroupInfoRequest.h" #include "model/GetUserGroupInfoResult.h" +#include "model/GetWorksEmbedListRequest.h" +#include "model/GetWorksEmbedListResult.h" #include "model/ListApiDatasourceRequest.h" #include "model/ListApiDatasourceResult.h" #include "model/ListByUserGroupIdRequest.h" @@ -118,6 +122,8 @@ #include "model/ListWorkspaceRoleUsersResult.h" #include "model/ListWorkspaceRolesRequest.h" #include "model/ListWorkspaceRolesResult.h" +#include "model/ManualRunMailTaskRequest.h" +#include "model/ManualRunMailTaskResult.h" #include "model/ModifyApiDatasourceParametersRequest.h" #include "model/ModifyApiDatasourceParametersResult.h" #include "model/ModifyCopilotEmbedConfigRequest.h" @@ -331,9 +337,15 @@ namespace AlibabaCloud typedef Outcome DeleteUserTagMetaOutcome; typedef std::future DeleteUserTagMetaOutcomeCallable; typedef std::function&)> DeleteUserTagMetaAsyncHandler; + typedef Outcome GetMailTaskStatusOutcome; + typedef std::future GetMailTaskStatusOutcomeCallable; + typedef std::function&)> GetMailTaskStatusAsyncHandler; typedef Outcome GetUserGroupInfoOutcome; typedef std::future GetUserGroupInfoOutcomeCallable; typedef std::function&)> GetUserGroupInfoAsyncHandler; + typedef Outcome GetWorksEmbedListOutcome; + typedef std::future GetWorksEmbedListOutcomeCallable; + typedef std::function&)> GetWorksEmbedListAsyncHandler; typedef Outcome ListApiDatasourceOutcome; typedef std::future ListApiDatasourceOutcomeCallable; typedef std::function&)> ListApiDatasourceAsyncHandler; @@ -379,6 +391,9 @@ namespace AlibabaCloud typedef Outcome ListWorkspaceRolesOutcome; typedef std::future ListWorkspaceRolesOutcomeCallable; typedef std::function&)> ListWorkspaceRolesAsyncHandler; + typedef Outcome ManualRunMailTaskOutcome; + typedef std::future ManualRunMailTaskOutcomeCallable; + typedef std::function&)> ManualRunMailTaskAsyncHandler; typedef Outcome ModifyApiDatasourceParametersOutcome; typedef std::future ModifyApiDatasourceParametersOutcomeCallable; typedef std::function&)> ModifyApiDatasourceParametersAsyncHandler; @@ -642,9 +657,15 @@ namespace AlibabaCloud DeleteUserTagMetaOutcome deleteUserTagMeta(const Model::DeleteUserTagMetaRequest &request)const; void deleteUserTagMetaAsync(const Model::DeleteUserTagMetaRequest& request, const DeleteUserTagMetaAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteUserTagMetaOutcomeCallable deleteUserTagMetaCallable(const Model::DeleteUserTagMetaRequest& request) const; + GetMailTaskStatusOutcome getMailTaskStatus(const Model::GetMailTaskStatusRequest &request)const; + void getMailTaskStatusAsync(const Model::GetMailTaskStatusRequest& request, const GetMailTaskStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMailTaskStatusOutcomeCallable getMailTaskStatusCallable(const Model::GetMailTaskStatusRequest& request) const; GetUserGroupInfoOutcome getUserGroupInfo(const Model::GetUserGroupInfoRequest &request)const; void getUserGroupInfoAsync(const Model::GetUserGroupInfoRequest& request, const GetUserGroupInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetUserGroupInfoOutcomeCallable getUserGroupInfoCallable(const Model::GetUserGroupInfoRequest& request) const; + GetWorksEmbedListOutcome getWorksEmbedList(const Model::GetWorksEmbedListRequest &request)const; + void getWorksEmbedListAsync(const Model::GetWorksEmbedListRequest& request, const GetWorksEmbedListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetWorksEmbedListOutcomeCallable getWorksEmbedListCallable(const Model::GetWorksEmbedListRequest& request) const; ListApiDatasourceOutcome listApiDatasource(const Model::ListApiDatasourceRequest &request)const; void listApiDatasourceAsync(const Model::ListApiDatasourceRequest& request, const ListApiDatasourceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListApiDatasourceOutcomeCallable listApiDatasourceCallable(const Model::ListApiDatasourceRequest& request) const; @@ -690,6 +711,9 @@ namespace AlibabaCloud ListWorkspaceRolesOutcome listWorkspaceRoles(const Model::ListWorkspaceRolesRequest &request)const; void listWorkspaceRolesAsync(const Model::ListWorkspaceRolesRequest& request, const ListWorkspaceRolesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListWorkspaceRolesOutcomeCallable listWorkspaceRolesCallable(const Model::ListWorkspaceRolesRequest& request) const; + ManualRunMailTaskOutcome manualRunMailTask(const Model::ManualRunMailTaskRequest &request)const; + void manualRunMailTaskAsync(const Model::ManualRunMailTaskRequest& request, const ManualRunMailTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ManualRunMailTaskOutcomeCallable manualRunMailTaskCallable(const Model::ManualRunMailTaskRequest& request) const; ModifyApiDatasourceParametersOutcome modifyApiDatasourceParameters(const Model::ModifyApiDatasourceParametersRequest &request)const; void modifyApiDatasourceParametersAsync(const Model::ModifyApiDatasourceParametersRequest& request, const ModifyApiDatasourceParametersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyApiDatasourceParametersOutcomeCallable modifyApiDatasourceParametersCallable(const Model::ModifyApiDatasourceParametersRequest& request) const; diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusRequest.h b/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusRequest.h new file mode 100644 index 000000000..56d0ca006 --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusRequest.h @@ -0,0 +1,51 @@ +/* + * 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_GETMAILTASKSTATUSREQUEST_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETMAILTASKSTATUSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Quickbi_public { +namespace Model { +class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT GetMailTaskStatusRequest : public RpcServiceRequest { +public: + GetMailTaskStatusRequest(); + ~GetMailTaskStatusRequest(); + std::string getAccessPoint() const; + void setAccessPoint(const std::string &accessPoint); + std::string getSignType() const; + void setSignType(const std::string &signType); + std::string getMailId() const; + void setMailId(const std::string &mailId); + long getTaskId() const; + void setTaskId(long taskId); + +private: + std::string accessPoint_; + std::string signType_; + std::string mailId_; + long taskId_; +}; +} // namespace Model +} // namespace Quickbi_public +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETMAILTASKSTATUSREQUEST_H_ diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusResult.h b/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusResult.h new file mode 100644 index 000000000..ae46972b8 --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/GetMailTaskStatusResult.h @@ -0,0 +1,60 @@ +/* + * 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_GETMAILTASKSTATUSRESULT_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETMAILTASKSTATUSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Quickbi_public + { + namespace Model + { + class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT GetMailTaskStatusResult : public ServiceResult + { + public: + struct DATA + { + std::string status; + long taskId; + std::string execTime; + std::string mailId; + }; + + + GetMailTaskStatusResult(); + explicit GetMailTaskStatusResult(const std::string &payload); + ~GetMailTaskStatusResult(); + 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_GETMAILTASKSTATUSRESULT_H_ \ No newline at end of file diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListRequest.h b/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListRequest.h new file mode 100644 index 000000000..60a81af9d --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListRequest.h @@ -0,0 +1,60 @@ +/* + * 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_GETWORKSEMBEDLISTREQUEST_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETWORKSEMBEDLISTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Quickbi_public { +namespace Model { +class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT GetWorksEmbedListRequest : public RpcServiceRequest { +public: + GetWorksEmbedListRequest(); + ~GetWorksEmbedListRequest(); + std::string getWsId() const; + void setWsId(const std::string &wsId); + std::string getAccessPoint() const; + void setAccessPoint(const std::string &accessPoint); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getKeyword() const; + void setKeyword(const std::string &keyword); + std::string getWorksType() const; + void setWorksType(const std::string &worksType); + std::string getSignType() const; + void setSignType(const std::string &signType); + int getPageNo() const; + void setPageNo(int pageNo); + +private: + std::string wsId_; + std::string accessPoint_; + int pageSize_; + std::string keyword_; + std::string worksType_; + std::string signType_; + int pageNo_; +}; +} // namespace Model +} // namespace Quickbi_public +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETWORKSEMBEDLISTREQUEST_H_ diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListResult.h b/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListResult.h new file mode 100644 index 000000000..2bcbdf883 --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/GetWorksEmbedListResult.h @@ -0,0 +1,69 @@ +/* + * 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_GETWORKSEMBEDLISTRESULT_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETWORKSEMBEDLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Quickbi_public + { + namespace Model + { + class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT GetWorksEmbedListResult : public ServiceResult + { + public: + struct Result + { + struct DataItem + { + std::string embedTime; + std::string worksType; + std::string worksName; + std::string workspaceId; + std::string worksId; + }; + long totalNum; + long pageSize; + std::vector data; + long pageNo; + long totalPages; + }; + + + GetWorksEmbedListResult(); + explicit GetWorksEmbedListResult(const std::string &payload); + ~GetWorksEmbedListResult(); + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_GETWORKSEMBEDLISTRESULT_H_ \ No newline at end of file diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskRequest.h b/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskRequest.h new file mode 100644 index 000000000..2f0760b8d --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskRequest.h @@ -0,0 +1,48 @@ +/* + * 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_MANUALRUNMAILTASKREQUEST_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_MANUALRUNMAILTASKREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Quickbi_public { +namespace Model { +class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT ManualRunMailTaskRequest : public RpcServiceRequest { +public: + ManualRunMailTaskRequest(); + ~ManualRunMailTaskRequest(); + std::string getAccessPoint() const; + void setAccessPoint(const std::string &accessPoint); + std::string getSignType() const; + void setSignType(const std::string &signType); + std::string getMailId() const; + void setMailId(const std::string &mailId); + +private: + std::string accessPoint_; + std::string signType_; + std::string mailId_; +}; +} // namespace Model +} // namespace Quickbi_public +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_MANUALRUNMAILTASKREQUEST_H_ diff --git a/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskResult.h b/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskResult.h new file mode 100644 index 000000000..f9b663eec --- /dev/null +++ b/quickbi-public/include/alibabacloud/quickbi-public/model/ManualRunMailTaskResult.h @@ -0,0 +1,53 @@ +/* + * 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_MANUALRUNMAILTASKRESULT_H_ +#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_MANUALRUNMAILTASKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Quickbi_public + { + namespace Model + { + class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT ManualRunMailTaskResult : public ServiceResult + { + public: + + + ManualRunMailTaskResult(); + explicit ManualRunMailTaskResult(const std::string &payload); + ~ManualRunMailTaskResult(); + bool getSuccess()const; + bool getResult()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + bool result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_MANUALRUNMAILTASKRESULT_H_ \ No newline at end of file diff --git a/quickbi-public/src/Quickbi-publicClient.cc b/quickbi-public/src/Quickbi-publicClient.cc index a3cedf203..56836a359 100644 --- a/quickbi-public/src/Quickbi-publicClient.cc +++ b/quickbi-public/src/Quickbi-publicClient.cc @@ -1203,6 +1203,42 @@ Quickbi_publicClient::DeleteUserTagMetaOutcomeCallable Quickbi_publicClient::del return task->get_future(); } +Quickbi_publicClient::GetMailTaskStatusOutcome Quickbi_publicClient::getMailTaskStatus(const GetMailTaskStatusRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMailTaskStatusOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMailTaskStatusOutcome(GetMailTaskStatusResult(outcome.result())); + else + return GetMailTaskStatusOutcome(outcome.error()); +} + +void Quickbi_publicClient::getMailTaskStatusAsync(const GetMailTaskStatusRequest& request, const GetMailTaskStatusAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMailTaskStatus(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Quickbi_publicClient::GetMailTaskStatusOutcomeCallable Quickbi_publicClient::getMailTaskStatusCallable(const GetMailTaskStatusRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMailTaskStatus(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Quickbi_publicClient::GetUserGroupInfoOutcome Quickbi_publicClient::getUserGroupInfo(const GetUserGroupInfoRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1239,6 +1275,42 @@ Quickbi_publicClient::GetUserGroupInfoOutcomeCallable Quickbi_publicClient::getU return task->get_future(); } +Quickbi_publicClient::GetWorksEmbedListOutcome Quickbi_publicClient::getWorksEmbedList(const GetWorksEmbedListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetWorksEmbedListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetWorksEmbedListOutcome(GetWorksEmbedListResult(outcome.result())); + else + return GetWorksEmbedListOutcome(outcome.error()); +} + +void Quickbi_publicClient::getWorksEmbedListAsync(const GetWorksEmbedListRequest& request, const GetWorksEmbedListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getWorksEmbedList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Quickbi_publicClient::GetWorksEmbedListOutcomeCallable Quickbi_publicClient::getWorksEmbedListCallable(const GetWorksEmbedListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getWorksEmbedList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Quickbi_publicClient::ListApiDatasourceOutcome Quickbi_publicClient::listApiDatasource(const ListApiDatasourceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1779,6 +1851,42 @@ Quickbi_publicClient::ListWorkspaceRolesOutcomeCallable Quickbi_publicClient::li return task->get_future(); } +Quickbi_publicClient::ManualRunMailTaskOutcome Quickbi_publicClient::manualRunMailTask(const ManualRunMailTaskRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ManualRunMailTaskOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ManualRunMailTaskOutcome(ManualRunMailTaskResult(outcome.result())); + else + return ManualRunMailTaskOutcome(outcome.error()); +} + +void Quickbi_publicClient::manualRunMailTaskAsync(const ManualRunMailTaskRequest& request, const ManualRunMailTaskAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, manualRunMailTask(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Quickbi_publicClient::ManualRunMailTaskOutcomeCallable Quickbi_publicClient::manualRunMailTaskCallable(const ManualRunMailTaskRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->manualRunMailTask(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Quickbi_publicClient::ModifyApiDatasourceParametersOutcome Quickbi_publicClient::modifyApiDatasourceParameters(const ModifyApiDatasourceParametersRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/quickbi-public/src/model/GetMailTaskStatusRequest.cc b/quickbi-public/src/model/GetMailTaskStatusRequest.cc new file mode 100644 index 000000000..a3f6f87ee --- /dev/null +++ b/quickbi-public/src/model/GetMailTaskStatusRequest.cc @@ -0,0 +1,63 @@ +/* + * 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::GetMailTaskStatusRequest; + +GetMailTaskStatusRequest::GetMailTaskStatusRequest() + : RpcServiceRequest("quickbi-public", "2022-01-01", "GetMailTaskStatus") { + setMethod(HttpRequest::Method::Post); +} + +GetMailTaskStatusRequest::~GetMailTaskStatusRequest() {} + +std::string GetMailTaskStatusRequest::getAccessPoint() const { + return accessPoint_; +} + +void GetMailTaskStatusRequest::setAccessPoint(const std::string &accessPoint) { + accessPoint_ = accessPoint; + setParameter(std::string("AccessPoint"), accessPoint); +} + +std::string GetMailTaskStatusRequest::getSignType() const { + return signType_; +} + +void GetMailTaskStatusRequest::setSignType(const std::string &signType) { + signType_ = signType; + setParameter(std::string("SignType"), signType); +} + +std::string GetMailTaskStatusRequest::getMailId() const { + return mailId_; +} + +void GetMailTaskStatusRequest::setMailId(const std::string &mailId) { + mailId_ = mailId; + setParameter(std::string("MailId"), mailId); +} + +long GetMailTaskStatusRequest::getTaskId() const { + return taskId_; +} + +void GetMailTaskStatusRequest::setTaskId(long taskId) { + taskId_ = taskId; + setParameter(std::string("TaskId"), std::to_string(taskId)); +} + diff --git a/quickbi-public/src/model/GetMailTaskStatusResult.cc b/quickbi-public/src/model/GetMailTaskStatusResult.cc new file mode 100644 index 000000000..338423b65 --- /dev/null +++ b/quickbi-public/src/model/GetMailTaskStatusResult.cc @@ -0,0 +1,70 @@ +/* + * 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; + +GetMailTaskStatusResult::GetMailTaskStatusResult() : + ServiceResult() +{} + +GetMailTaskStatusResult::GetMailTaskStatusResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMailTaskStatusResult::~GetMailTaskStatusResult() +{} + +void GetMailTaskStatusResult::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["execTime"].isNull()) + resultObject.execTime = valueResultDATA["execTime"].asString(); + if(!valueResultDATA["mailId"].isNull()) + resultObject.mailId = valueResultDATA["mailId"].asString(); + if(!valueResultDATA["status"].isNull()) + resultObject.status = valueResultDATA["status"].asString(); + if(!valueResultDATA["taskId"].isNull()) + resultObject.taskId = std::stol(valueResultDATA["taskId"].asString()); + result_.push_back(resultObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +bool GetMailTaskStatusResult::getSuccess()const +{ + return success_; +} + +std::vector GetMailTaskStatusResult::getResult()const +{ + return result_; +} + diff --git a/quickbi-public/src/model/GetWorksEmbedListRequest.cc b/quickbi-public/src/model/GetWorksEmbedListRequest.cc new file mode 100644 index 000000000..df9bc1834 --- /dev/null +++ b/quickbi-public/src/model/GetWorksEmbedListRequest.cc @@ -0,0 +1,90 @@ +/* + * 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::GetWorksEmbedListRequest; + +GetWorksEmbedListRequest::GetWorksEmbedListRequest() + : RpcServiceRequest("quickbi-public", "2022-01-01", "GetWorksEmbedList") { + setMethod(HttpRequest::Method::Post); +} + +GetWorksEmbedListRequest::~GetWorksEmbedListRequest() {} + +std::string GetWorksEmbedListRequest::getWsId() const { + return wsId_; +} + +void GetWorksEmbedListRequest::setWsId(const std::string &wsId) { + wsId_ = wsId; + setParameter(std::string("WsId"), wsId); +} + +std::string GetWorksEmbedListRequest::getAccessPoint() const { + return accessPoint_; +} + +void GetWorksEmbedListRequest::setAccessPoint(const std::string &accessPoint) { + accessPoint_ = accessPoint; + setParameter(std::string("AccessPoint"), accessPoint); +} + +int GetWorksEmbedListRequest::getPageSize() const { + return pageSize_; +} + +void GetWorksEmbedListRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + +std::string GetWorksEmbedListRequest::getKeyword() const { + return keyword_; +} + +void GetWorksEmbedListRequest::setKeyword(const std::string &keyword) { + keyword_ = keyword; + setParameter(std::string("Keyword"), keyword); +} + +std::string GetWorksEmbedListRequest::getWorksType() const { + return worksType_; +} + +void GetWorksEmbedListRequest::setWorksType(const std::string &worksType) { + worksType_ = worksType; + setParameter(std::string("WorksType"), worksType); +} + +std::string GetWorksEmbedListRequest::getSignType() const { + return signType_; +} + +void GetWorksEmbedListRequest::setSignType(const std::string &signType) { + signType_ = signType; + setParameter(std::string("SignType"), signType); +} + +int GetWorksEmbedListRequest::getPageNo() const { + return pageNo_; +} + +void GetWorksEmbedListRequest::setPageNo(int pageNo) { + pageNo_ = pageNo; + setParameter(std::string("PageNo"), std::to_string(pageNo)); +} + diff --git a/quickbi-public/src/model/GetWorksEmbedListResult.cc b/quickbi-public/src/model/GetWorksEmbedListResult.cc new file mode 100644 index 000000000..e0a31d058 --- /dev/null +++ b/quickbi-public/src/model/GetWorksEmbedListResult.cc @@ -0,0 +1,81 @@ +/* + * 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; + +GetWorksEmbedListResult::GetWorksEmbedListResult() : + ServiceResult() +{} + +GetWorksEmbedListResult::GetWorksEmbedListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetWorksEmbedListResult::~GetWorksEmbedListResult() +{} + +void GetWorksEmbedListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resultNode = value["Result"]; + if(!resultNode["PageNo"].isNull()) + result_.pageNo = std::stol(resultNode["PageNo"].asString()); + if(!resultNode["PageSize"].isNull()) + result_.pageSize = std::stol(resultNode["PageSize"].asString()); + if(!resultNode["TotalNum"].isNull()) + result_.totalNum = std::stol(resultNode["TotalNum"].asString()); + if(!resultNode["TotalPages"].isNull()) + result_.totalPages = std::stol(resultNode["TotalPages"].asString()); + auto allDataNode = resultNode["Data"]["DataItem"]; + for (auto resultNodeDataDataItem : allDataNode) + { + Result::DataItem dataItemObject; + if(!resultNodeDataDataItem["EmbedTime"].isNull()) + dataItemObject.embedTime = resultNodeDataDataItem["EmbedTime"].asString(); + if(!resultNodeDataDataItem["WorksId"].isNull()) + dataItemObject.worksId = resultNodeDataDataItem["WorksId"].asString(); + if(!resultNodeDataDataItem["WorksName"].isNull()) + dataItemObject.worksName = resultNodeDataDataItem["WorksName"].asString(); + if(!resultNodeDataDataItem["WorksType"].isNull()) + dataItemObject.worksType = resultNodeDataDataItem["WorksType"].asString(); + if(!resultNodeDataDataItem["WorkspaceId"].isNull()) + dataItemObject.workspaceId = resultNodeDataDataItem["WorkspaceId"].asString(); + result_.data.push_back(dataItemObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +bool GetWorksEmbedListResult::getSuccess()const +{ + return success_; +} + +GetWorksEmbedListResult::Result GetWorksEmbedListResult::getResult()const +{ + return result_; +} + diff --git a/quickbi-public/src/model/ManualRunMailTaskRequest.cc b/quickbi-public/src/model/ManualRunMailTaskRequest.cc new file mode 100644 index 000000000..67297f704 --- /dev/null +++ b/quickbi-public/src/model/ManualRunMailTaskRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Quickbi_public::Model::ManualRunMailTaskRequest; + +ManualRunMailTaskRequest::ManualRunMailTaskRequest() + : RpcServiceRequest("quickbi-public", "2022-01-01", "ManualRunMailTask") { + setMethod(HttpRequest::Method::Post); +} + +ManualRunMailTaskRequest::~ManualRunMailTaskRequest() {} + +std::string ManualRunMailTaskRequest::getAccessPoint() const { + return accessPoint_; +} + +void ManualRunMailTaskRequest::setAccessPoint(const std::string &accessPoint) { + accessPoint_ = accessPoint; + setParameter(std::string("AccessPoint"), accessPoint); +} + +std::string ManualRunMailTaskRequest::getSignType() const { + return signType_; +} + +void ManualRunMailTaskRequest::setSignType(const std::string &signType) { + signType_ = signType; + setParameter(std::string("SignType"), signType); +} + +std::string ManualRunMailTaskRequest::getMailId() const { + return mailId_; +} + +void ManualRunMailTaskRequest::setMailId(const std::string &mailId) { + mailId_ = mailId; + setParameter(std::string("MailId"), mailId); +} + diff --git a/quickbi-public/src/model/ManualRunMailTaskResult.cc b/quickbi-public/src/model/ManualRunMailTaskResult.cc new file mode 100644 index 000000000..d1d7bd52c --- /dev/null +++ b/quickbi-public/src/model/ManualRunMailTaskResult.cc @@ -0,0 +1,58 @@ +/* + * 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; + +ManualRunMailTaskResult::ManualRunMailTaskResult() : + ServiceResult() +{} + +ManualRunMailTaskResult::ManualRunMailTaskResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ManualRunMailTaskResult::~ManualRunMailTaskResult() +{} + +void ManualRunMailTaskResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +bool ManualRunMailTaskResult::getSuccess()const +{ + return success_; +} + +bool ManualRunMailTaskResult::getResult()const +{ + return result_; +} +