From fe5dcd30f9fc0b5152b336dd567e21d5454b8259 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Thu, 24 Mar 2022 08:22:02 +0000 Subject: [PATCH] Supported CreateLakeHouseSpace,AddLhMembers,DeleteLhMembers,ListLhTaskFlowAndScenario,ChangeLhDagOwner,ReDeployLhDagVersion API. --- CHANGELOG | 3 + VERSION | 2 +- dms-enterprise/CMakeLists.txt | 12 +- .../dms-enterprise/Dms_enterpriseClient.h | 24 ++- .../model/ChangeLhDagOwnerRequest.h | 48 ++++++ ...OrderResult.h => ChangeLhDagOwnerResult.h} | 16 +- .../model/CreateDataExportOrderRequest.h | 64 -------- .../model/ListLhTaskFlowAndScenarioResult.h | 42 ++--- .../model/ReDeployLhDagVersionRequest.h | 48 ++++++ .../model/ReDeployLhDagVersionResult.h | 57 +++++++ dms-enterprise/src/Dms-enterpriseClient.cc | 108 ++++++++----- .../src/model/ChangeLhDagOwnerRequest.cc | 54 +++++++ .../src/model/ChangeLhDagOwnerResult.cc | 65 ++++++++ .../src/model/CreateDataExportOrderRequest.cc | 79 ---------- .../model/ListLhTaskFlowAndScenarioResult.cc | 147 +++++++++--------- .../src/model/ReDeployLhDagVersionRequest.cc | 54 +++++++ ...esult.cc => ReDeployLhDagVersionResult.cc} | 33 ++-- 17 files changed, 546 insertions(+), 310 deletions(-) create mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerRequest.h rename dms-enterprise/include/alibabacloud/dms-enterprise/model/{CreateDataExportOrderResult.h => ChangeLhDagOwnerResult.h} (67%) delete mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderRequest.h create mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionRequest.h create mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h create mode 100644 dms-enterprise/src/model/ChangeLhDagOwnerRequest.cc create mode 100644 dms-enterprise/src/model/ChangeLhDagOwnerResult.cc delete mode 100644 dms-enterprise/src/model/CreateDataExportOrderRequest.cc create mode 100644 dms-enterprise/src/model/ReDeployLhDagVersionRequest.cc rename dms-enterprise/src/model/{CreateDataExportOrderResult.cc => ReDeployLhDagVersionResult.cc} (61%) diff --git a/CHANGELOG b/CHANGELOG index d4bded63a..834dd25d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-03-24 Version: 1.36.1089 +- Supported CreateLakeHouseSpace,AddLhMembers,DeleteLhMembers,ListLhTaskFlowAndScenario,ChangeLhDagOwner,ReDeployLhDagVersion API. + 2022-03-23 Version: 1.36.1088 - Update by sdk platform. diff --git a/VERSION b/VERSION index 91e3aaaa9..71138f9db 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1088 \ No newline at end of file +1.36.1089 \ No newline at end of file diff --git a/dms-enterprise/CMakeLists.txt b/dms-enterprise/CMakeLists.txt index 50d460d74..7a08ab3be 100644 --- a/dms-enterprise/CMakeLists.txt +++ b/dms-enterprise/CMakeLists.txt @@ -29,14 +29,14 @@ set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/ApproveOrderResult.h include/alibabacloud/dms-enterprise/model/ChangeColumnSecLevelRequest.h include/alibabacloud/dms-enterprise/model/ChangeColumnSecLevelResult.h + include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerRequest.h + include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerResult.h include/alibabacloud/dms-enterprise/model/CloseOrderRequest.h include/alibabacloud/dms-enterprise/model/CloseOrderResult.h include/alibabacloud/dms-enterprise/model/CreateDataCorrectOrderRequest.h include/alibabacloud/dms-enterprise/model/CreateDataCorrectOrderResult.h include/alibabacloud/dms-enterprise/model/CreateDataCronClearOrderRequest.h include/alibabacloud/dms-enterprise/model/CreateDataCronClearOrderResult.h - include/alibabacloud/dms-enterprise/model/CreateDataExportOrderRequest.h - include/alibabacloud/dms-enterprise/model/CreateDataExportOrderResult.h include/alibabacloud/dms-enterprise/model/CreateDataImportOrderRequest.h include/alibabacloud/dms-enterprise/model/CreateDataImportOrderResult.h include/alibabacloud/dms-enterprise/model/CreateFreeLockCorrectOrderRequest.h @@ -225,6 +225,8 @@ set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/ModifyDataCorrectExecSQLResult.h include/alibabacloud/dms-enterprise/model/PauseDataCorrectSQLJobRequest.h include/alibabacloud/dms-enterprise/model/PauseDataCorrectSQLJobResult.h + include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionRequest.h + include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h include/alibabacloud/dms-enterprise/model/RegisterInstanceRequest.h include/alibabacloud/dms-enterprise/model/RegisterInstanceResult.h include/alibabacloud/dms-enterprise/model/RegisterUserRequest.h @@ -264,14 +266,14 @@ set(dms-enterprise_src src/model/ApproveOrderResult.cc src/model/ChangeColumnSecLevelRequest.cc src/model/ChangeColumnSecLevelResult.cc + src/model/ChangeLhDagOwnerRequest.cc + src/model/ChangeLhDagOwnerResult.cc src/model/CloseOrderRequest.cc src/model/CloseOrderResult.cc src/model/CreateDataCorrectOrderRequest.cc src/model/CreateDataCorrectOrderResult.cc src/model/CreateDataCronClearOrderRequest.cc src/model/CreateDataCronClearOrderResult.cc - src/model/CreateDataExportOrderRequest.cc - src/model/CreateDataExportOrderResult.cc src/model/CreateDataImportOrderRequest.cc src/model/CreateDataImportOrderResult.cc src/model/CreateFreeLockCorrectOrderRequest.cc @@ -460,6 +462,8 @@ set(dms-enterprise_src src/model/ModifyDataCorrectExecSQLResult.cc src/model/PauseDataCorrectSQLJobRequest.cc src/model/PauseDataCorrectSQLJobResult.cc + src/model/ReDeployLhDagVersionRequest.cc + src/model/ReDeployLhDagVersionResult.cc src/model/RegisterInstanceRequest.cc src/model/RegisterInstanceResult.cc src/model/RegisterUserRequest.cc diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h index 564135814..536525de4 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h @@ -30,14 +30,14 @@ #include "model/ApproveOrderResult.h" #include "model/ChangeColumnSecLevelRequest.h" #include "model/ChangeColumnSecLevelResult.h" +#include "model/ChangeLhDagOwnerRequest.h" +#include "model/ChangeLhDagOwnerResult.h" #include "model/CloseOrderRequest.h" #include "model/CloseOrderResult.h" #include "model/CreateDataCorrectOrderRequest.h" #include "model/CreateDataCorrectOrderResult.h" #include "model/CreateDataCronClearOrderRequest.h" #include "model/CreateDataCronClearOrderResult.h" -#include "model/CreateDataExportOrderRequest.h" -#include "model/CreateDataExportOrderResult.h" #include "model/CreateDataImportOrderRequest.h" #include "model/CreateDataImportOrderResult.h" #include "model/CreateFreeLockCorrectOrderRequest.h" @@ -226,6 +226,8 @@ #include "model/ModifyDataCorrectExecSQLResult.h" #include "model/PauseDataCorrectSQLJobRequest.h" #include "model/PauseDataCorrectSQLJobResult.h" +#include "model/ReDeployLhDagVersionRequest.h" +#include "model/ReDeployLhDagVersionResult.h" #include "model/RegisterInstanceRequest.h" #include "model/RegisterInstanceResult.h" #include "model/RegisterUserRequest.h" @@ -275,6 +277,9 @@ namespace AlibabaCloud typedef Outcome ChangeColumnSecLevelOutcome; typedef std::future ChangeColumnSecLevelOutcomeCallable; typedef std::function&)> ChangeColumnSecLevelAsyncHandler; + typedef Outcome ChangeLhDagOwnerOutcome; + typedef std::future ChangeLhDagOwnerOutcomeCallable; + typedef std::function&)> ChangeLhDagOwnerAsyncHandler; typedef Outcome CloseOrderOutcome; typedef std::future CloseOrderOutcomeCallable; typedef std::function&)> CloseOrderAsyncHandler; @@ -284,9 +289,6 @@ namespace AlibabaCloud typedef Outcome CreateDataCronClearOrderOutcome; typedef std::future CreateDataCronClearOrderOutcomeCallable; typedef std::function&)> CreateDataCronClearOrderAsyncHandler; - typedef Outcome CreateDataExportOrderOutcome; - typedef std::future CreateDataExportOrderOutcomeCallable; - typedef std::function&)> CreateDataExportOrderAsyncHandler; typedef Outcome CreateDataImportOrderOutcome; typedef std::future CreateDataImportOrderOutcomeCallable; typedef std::function&)> CreateDataImportOrderAsyncHandler; @@ -569,6 +571,9 @@ namespace AlibabaCloud typedef Outcome PauseDataCorrectSQLJobOutcome; typedef std::future PauseDataCorrectSQLJobOutcomeCallable; typedef std::function&)> PauseDataCorrectSQLJobAsyncHandler; + typedef Outcome ReDeployLhDagVersionOutcome; + typedef std::future ReDeployLhDagVersionOutcomeCallable; + typedef std::function&)> ReDeployLhDagVersionAsyncHandler; typedef Outcome RegisterInstanceOutcome; typedef std::future RegisterInstanceOutcomeCallable; typedef std::function&)> RegisterInstanceAsyncHandler; @@ -628,6 +633,9 @@ namespace AlibabaCloud ChangeColumnSecLevelOutcome changeColumnSecLevel(const Model::ChangeColumnSecLevelRequest &request)const; void changeColumnSecLevelAsync(const Model::ChangeColumnSecLevelRequest& request, const ChangeColumnSecLevelAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ChangeColumnSecLevelOutcomeCallable changeColumnSecLevelCallable(const Model::ChangeColumnSecLevelRequest& request) const; + ChangeLhDagOwnerOutcome changeLhDagOwner(const Model::ChangeLhDagOwnerRequest &request)const; + void changeLhDagOwnerAsync(const Model::ChangeLhDagOwnerRequest& request, const ChangeLhDagOwnerAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ChangeLhDagOwnerOutcomeCallable changeLhDagOwnerCallable(const Model::ChangeLhDagOwnerRequest& request) const; CloseOrderOutcome closeOrder(const Model::CloseOrderRequest &request)const; void closeOrderAsync(const Model::CloseOrderRequest& request, const CloseOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CloseOrderOutcomeCallable closeOrderCallable(const Model::CloseOrderRequest& request) const; @@ -637,9 +645,6 @@ namespace AlibabaCloud CreateDataCronClearOrderOutcome createDataCronClearOrder(const Model::CreateDataCronClearOrderRequest &request)const; void createDataCronClearOrderAsync(const Model::CreateDataCronClearOrderRequest& request, const CreateDataCronClearOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateDataCronClearOrderOutcomeCallable createDataCronClearOrderCallable(const Model::CreateDataCronClearOrderRequest& request) const; - CreateDataExportOrderOutcome createDataExportOrder(const Model::CreateDataExportOrderRequest &request)const; - void createDataExportOrderAsync(const Model::CreateDataExportOrderRequest& request, const CreateDataExportOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - CreateDataExportOrderOutcomeCallable createDataExportOrderCallable(const Model::CreateDataExportOrderRequest& request) const; CreateDataImportOrderOutcome createDataImportOrder(const Model::CreateDataImportOrderRequest &request)const; void createDataImportOrderAsync(const Model::CreateDataImportOrderRequest& request, const CreateDataImportOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateDataImportOrderOutcomeCallable createDataImportOrderCallable(const Model::CreateDataImportOrderRequest& request) const; @@ -922,6 +927,9 @@ namespace AlibabaCloud PauseDataCorrectSQLJobOutcome pauseDataCorrectSQLJob(const Model::PauseDataCorrectSQLJobRequest &request)const; void pauseDataCorrectSQLJobAsync(const Model::PauseDataCorrectSQLJobRequest& request, const PauseDataCorrectSQLJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; PauseDataCorrectSQLJobOutcomeCallable pauseDataCorrectSQLJobCallable(const Model::PauseDataCorrectSQLJobRequest& request) const; + ReDeployLhDagVersionOutcome reDeployLhDagVersion(const Model::ReDeployLhDagVersionRequest &request)const; + void reDeployLhDagVersionAsync(const Model::ReDeployLhDagVersionRequest& request, const ReDeployLhDagVersionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ReDeployLhDagVersionOutcomeCallable reDeployLhDagVersionCallable(const Model::ReDeployLhDagVersionRequest& request) const; RegisterInstanceOutcome registerInstance(const Model::RegisterInstanceRequest &request)const; void registerInstanceAsync(const Model::RegisterInstanceRequest& request, const RegisterInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RegisterInstanceOutcomeCallable registerInstanceCallable(const Model::RegisterInstanceRequest& request) const; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerRequest.h new file mode 100644 index 000000000..701a8fa31 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerRequest.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_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_enterprise { +namespace Model { +class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ChangeLhDagOwnerRequest : public RpcServiceRequest { +public: + ChangeLhDagOwnerRequest(); + ~ChangeLhDagOwnerRequest(); + long getOwnerUserId() const; + void setOwnerUserId(long ownerUserId); + long getDagId() const; + void setDagId(long dagId); + long getTid() const; + void setTid(long tid); + +private: + long ownerUserId_; + long dagId_; + long tid_; +}; +} // namespace Model +} // namespace Dms_enterprise +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERREQUEST_H_ diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerResult.h similarity index 67% rename from dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderResult.h rename to dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerResult.h index 3ff58ac7f..beb521cee 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ChangeLhDagOwnerResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERRESULT_H_ -#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERRESULT_H_ +#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERRESULT_H_ #include #include @@ -29,15 +29,14 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CreateDataExportOrderResult : public ServiceResult + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ChangeLhDagOwnerResult : public ServiceResult { public: - CreateDataExportOrderResult(); - explicit CreateDataExportOrderResult(const std::string &payload); - ~CreateDataExportOrderResult(); - std::vector getCreateOrderResult()const; + ChangeLhDagOwnerResult(); + explicit ChangeLhDagOwnerResult(const std::string &payload); + ~ChangeLhDagOwnerResult(); std::string getErrorCode()const; std::string getErrorMessage()const; bool getSuccess()const; @@ -45,7 +44,6 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - std::vector createOrderResult_; std::string errorCode_; std::string errorMessage_; bool success_; @@ -54,4 +52,4 @@ namespace AlibabaCloud } } } -#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERRESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHANGELHDAGOWNERRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderRequest.h deleted file mode 100644 index 8c9ef667e..000000000 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CreateDataExportOrderRequest.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERREQUEST_H_ -#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Dms_enterprise { -namespace Model { -class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CreateDataExportOrderRequest : public RpcServiceRequest { -public: - struct Param { - std::string classify; - struct DbItemListItem { - long dbId; - bool logic; - }; - DbItemListItem dbItemListItem; - std::vector dbItemList; - std::string execSQL; - }; - CreateDataExportOrderRequest(); - ~CreateDataExportOrderRequest(); - long getTid() const; - void setTid(long tid); - std::string getAttachmentKey() const; - void setAttachmentKey(const std::string &attachmentKey); - Param getParam() const; - void setParam(const Param ¶m); - std::string getComment() const; - void setComment(const std::string &comment); - std::vector getRelatedUserList() const; - void setRelatedUserList(const std::vector &relatedUserList); - -private: - long tid_; - std::string attachmentKey_; - Param param_; - std::string comment_; - std::vector relatedUserList_; -}; -} // namespace Model -} // namespace Dms_enterprise -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAEXPORTORDERREQUEST_H_ diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLhTaskFlowAndScenarioResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLhTaskFlowAndScenarioResult.h index 9ee884509..f8cb5e685 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLhTaskFlowAndScenarioResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLhTaskFlowAndScenarioResult.h @@ -32,7 +32,24 @@ namespace AlibabaCloud class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListLhTaskFlowAndScenarioResult : public ServiceResult { public: - struct ScenarioDAGList + struct Dag + { + int status; + int latestInstanceTime; + bool isDeleted; + long scenarioId; + std::string creatorId; + long deployId; + long spaceId; + std::string dagOwnerNickName; + bool canEdit; + int latestInstanceStatus; + std::string demoId; + long id; + std::string creatorNickName; + long dataFlowId; + }; + struct ScenarioDAG { struct Scenario { @@ -57,32 +74,15 @@ namespace AlibabaCloud std::string creatorNickName; long dataFlowId; }; - std::vector dagList; + std::vector dagList; Scenario scenario; }; - struct Dag - { - int status; - int latestInstanceTime; - bool isDeleted; - long scenarioId; - std::string creatorId; - long deployId; - long spaceId; - std::string dagOwnerNickName; - bool canEdit; - int latestInstanceStatus; - std::string demoId; - long id; - std::string creatorNickName; - long dataFlowId; - }; ListLhTaskFlowAndScenarioResult(); explicit ListLhTaskFlowAndScenarioResult(const std::string &payload); ~ListLhTaskFlowAndScenarioResult(); - ScenarioDAGList getScenarioDAGList()const; + std::vector getScenarioDAGList()const; std::string getErrorCode()const; std::string getErrorMessage()const; bool getSuccess()const; @@ -91,7 +91,7 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - ScenarioDAGList scenarioDAGList_; + std::vector scenarioDAGList_; std::string errorCode_; std::string errorMessage_; bool success_; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionRequest.h new file mode 100644 index 000000000..936e6f779 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionRequest.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_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_enterprise { +namespace Model { +class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ReDeployLhDagVersionRequest : public RpcServiceRequest { +public: + ReDeployLhDagVersionRequest(); + ~ReDeployLhDagVersionRequest(); + long getDagVersion() const; + void setDagVersion(long dagVersion); + long getDagId() const; + void setDagId(long dagId); + long getTid() const; + void setTid(long tid); + +private: + long dagVersion_; + long dagId_; + long tid_; +}; +} // namespace Model +} // namespace Dms_enterprise +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONREQUEST_H_ diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h new file mode 100644 index 000000000..cd9b72e6e --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h @@ -0,0 +1,57 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ReDeployLhDagVersionResult : public ServiceResult + { + public: + + + ReDeployLhDagVersionResult(); + explicit ReDeployLhDagVersionResult(const std::string &payload); + ~ReDeployLhDagVersionResult(); + long getDeployId()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + long deployId_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_REDEPLOYLHDAGVERSIONRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/src/Dms-enterpriseClient.cc b/dms-enterprise/src/Dms-enterpriseClient.cc index 0fecd98d2..b722580fb 100644 --- a/dms-enterprise/src/Dms-enterpriseClient.cc +++ b/dms-enterprise/src/Dms-enterpriseClient.cc @@ -195,6 +195,42 @@ Dms_enterpriseClient::ChangeColumnSecLevelOutcomeCallable Dms_enterpriseClient:: return task->get_future(); } +Dms_enterpriseClient::ChangeLhDagOwnerOutcome Dms_enterpriseClient::changeLhDagOwner(const ChangeLhDagOwnerRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ChangeLhDagOwnerOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ChangeLhDagOwnerOutcome(ChangeLhDagOwnerResult(outcome.result())); + else + return ChangeLhDagOwnerOutcome(outcome.error()); +} + +void Dms_enterpriseClient::changeLhDagOwnerAsync(const ChangeLhDagOwnerRequest& request, const ChangeLhDagOwnerAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, changeLhDagOwner(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::ChangeLhDagOwnerOutcomeCallable Dms_enterpriseClient::changeLhDagOwnerCallable(const ChangeLhDagOwnerRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->changeLhDagOwner(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::CloseOrderOutcome Dms_enterpriseClient::closeOrder(const CloseOrderRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -303,42 +339,6 @@ Dms_enterpriseClient::CreateDataCronClearOrderOutcomeCallable Dms_enterpriseClie return task->get_future(); } -Dms_enterpriseClient::CreateDataExportOrderOutcome Dms_enterpriseClient::createDataExportOrder(const CreateDataExportOrderRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return CreateDataExportOrderOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return CreateDataExportOrderOutcome(CreateDataExportOrderResult(outcome.result())); - else - return CreateDataExportOrderOutcome(outcome.error()); -} - -void Dms_enterpriseClient::createDataExportOrderAsync(const CreateDataExportOrderRequest& request, const CreateDataExportOrderAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, createDataExportOrder(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -Dms_enterpriseClient::CreateDataExportOrderOutcomeCallable Dms_enterpriseClient::createDataExportOrderCallable(const CreateDataExportOrderRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->createDataExportOrder(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - Dms_enterpriseClient::CreateDataImportOrderOutcome Dms_enterpriseClient::createDataImportOrder(const CreateDataImportOrderRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3723,6 +3723,42 @@ Dms_enterpriseClient::PauseDataCorrectSQLJobOutcomeCallable Dms_enterpriseClient return task->get_future(); } +Dms_enterpriseClient::ReDeployLhDagVersionOutcome Dms_enterpriseClient::reDeployLhDagVersion(const ReDeployLhDagVersionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ReDeployLhDagVersionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ReDeployLhDagVersionOutcome(ReDeployLhDagVersionResult(outcome.result())); + else + return ReDeployLhDagVersionOutcome(outcome.error()); +} + +void Dms_enterpriseClient::reDeployLhDagVersionAsync(const ReDeployLhDagVersionRequest& request, const ReDeployLhDagVersionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, reDeployLhDagVersion(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::ReDeployLhDagVersionOutcomeCallable Dms_enterpriseClient::reDeployLhDagVersionCallable(const ReDeployLhDagVersionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->reDeployLhDagVersion(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::RegisterInstanceOutcome Dms_enterpriseClient::registerInstance(const RegisterInstanceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dms-enterprise/src/model/ChangeLhDagOwnerRequest.cc b/dms-enterprise/src/model/ChangeLhDagOwnerRequest.cc new file mode 100644 index 000000000..15553e9ad --- /dev/null +++ b/dms-enterprise/src/model/ChangeLhDagOwnerRequest.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::Dms_enterprise::Model::ChangeLhDagOwnerRequest; + +ChangeLhDagOwnerRequest::ChangeLhDagOwnerRequest() + : RpcServiceRequest("dms-enterprise", "2018-11-01", "ChangeLhDagOwner") { + setMethod(HttpRequest::Method::Post); +} + +ChangeLhDagOwnerRequest::~ChangeLhDagOwnerRequest() {} + +long ChangeLhDagOwnerRequest::getOwnerUserId() const { + return ownerUserId_; +} + +void ChangeLhDagOwnerRequest::setOwnerUserId(long ownerUserId) { + ownerUserId_ = ownerUserId; + setParameter(std::string("OwnerUserId"), std::to_string(ownerUserId)); +} + +long ChangeLhDagOwnerRequest::getDagId() const { + return dagId_; +} + +void ChangeLhDagOwnerRequest::setDagId(long dagId) { + dagId_ = dagId; + setParameter(std::string("DagId"), std::to_string(dagId)); +} + +long ChangeLhDagOwnerRequest::getTid() const { + return tid_; +} + +void ChangeLhDagOwnerRequest::setTid(long tid) { + tid_ = tid; + setParameter(std::string("Tid"), std::to_string(tid)); +} + diff --git a/dms-enterprise/src/model/ChangeLhDagOwnerResult.cc b/dms-enterprise/src/model/ChangeLhDagOwnerResult.cc new file mode 100644 index 000000000..3ccdb70ab --- /dev/null +++ b/dms-enterprise/src/model/ChangeLhDagOwnerResult.cc @@ -0,0 +1,65 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +ChangeLhDagOwnerResult::ChangeLhDagOwnerResult() : + ServiceResult() +{} + +ChangeLhDagOwnerResult::ChangeLhDagOwnerResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ChangeLhDagOwnerResult::~ChangeLhDagOwnerResult() +{} + +void ChangeLhDagOwnerResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ChangeLhDagOwnerResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ChangeLhDagOwnerResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ChangeLhDagOwnerResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/CreateDataExportOrderRequest.cc b/dms-enterprise/src/model/CreateDataExportOrderRequest.cc deleted file mode 100644 index 4fdca2c98..000000000 --- a/dms-enterprise/src/model/CreateDataExportOrderRequest.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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::Dms_enterprise::Model::CreateDataExportOrderRequest; - -CreateDataExportOrderRequest::CreateDataExportOrderRequest() - : RpcServiceRequest("dms-enterprise", "2018-11-01", "CreateDataExportOrder") { - setMethod(HttpRequest::Method::Post); -} - -CreateDataExportOrderRequest::~CreateDataExportOrderRequest() {} - -long CreateDataExportOrderRequest::getTid() const { - return tid_; -} - -void CreateDataExportOrderRequest::setTid(long tid) { - tid_ = tid; - setParameter(std::string("Tid"), std::to_string(tid)); -} - -std::string CreateDataExportOrderRequest::getAttachmentKey() const { - return attachmentKey_; -} - -void CreateDataExportOrderRequest::setAttachmentKey(const std::string &attachmentKey) { - attachmentKey_ = attachmentKey; - setParameter(std::string("AttachmentKey"), attachmentKey); -} - -CreateDataExportOrderRequest::Param CreateDataExportOrderRequest::getParam() const { - return param_; -} - -void CreateDataExportOrderRequest::setParam(const CreateDataExportOrderRequest::Param ¶m) { - param_ = param; - setParameter(std::string("Param") + ".Classify", param.classify); - for(int dep1 = 0; dep1 != param.dbItemList.size(); dep1++) { - setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".DbId", std::to_string(param.dbItemList[dep1].dbId)); - setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".Logic", param.dbItemList[dep1].logic ? "true" : "false"); - } - setParameter(std::string("Param") + ".ExecSQL", param.execSQL); -} - -std::string CreateDataExportOrderRequest::getComment() const { - return comment_; -} - -void CreateDataExportOrderRequest::setComment(const std::string &comment) { - comment_ = comment; - setParameter(std::string("Comment"), comment); -} - -std::vector CreateDataExportOrderRequest::getRelatedUserList() const { - return relatedUserList_; -} - -void CreateDataExportOrderRequest::setRelatedUserList(const std::vector &relatedUserList) { - relatedUserList_ = relatedUserList; - for(int dep1 = 0; dep1 != relatedUserList.size(); dep1++) { - setParameter(std::string("RelatedUserList") + "." + std::to_string(dep1 + 1), std::to_string(relatedUserList[dep1])); - } -} - diff --git a/dms-enterprise/src/model/ListLhTaskFlowAndScenarioResult.cc b/dms-enterprise/src/model/ListLhTaskFlowAndScenarioResult.cc index 67ff0c49b..ae69a779d 100644 --- a/dms-enterprise/src/model/ListLhTaskFlowAndScenarioResult.cc +++ b/dms-enterprise/src/model/ListLhTaskFlowAndScenarioResult.cc @@ -39,82 +39,87 @@ void ListLhTaskFlowAndScenarioResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allRawDAGListNode = value["RawDAGList"]["dag"]; - for (auto valueRawDAGListdag : allRawDAGListNode) + auto allRawDAGListNode = value["RawDAGList"]["Dag"]; + for (auto valueRawDAGListDag : allRawDAGListNode) { Dag rawDAGListObject; - if(!valueRawDAGListdag["Id"].isNull()) - rawDAGListObject.id = std::stol(valueRawDAGListdag["Id"].asString()); - if(!valueRawDAGListdag["CreatorId"].isNull()) - rawDAGListObject.creatorId = valueRawDAGListdag["CreatorId"].asString(); - if(!valueRawDAGListdag["IsDeleted"].isNull()) - rawDAGListObject.isDeleted = valueRawDAGListdag["IsDeleted"].asString() == "true"; - if(!valueRawDAGListdag["DemoId"].isNull()) - rawDAGListObject.demoId = valueRawDAGListdag["DemoId"].asString(); - if(!valueRawDAGListdag["DeployId"].isNull()) - rawDAGListObject.deployId = std::stol(valueRawDAGListdag["DeployId"].asString()); - if(!valueRawDAGListdag["DataFlowId"].isNull()) - rawDAGListObject.dataFlowId = std::stol(valueRawDAGListdag["DataFlowId"].asString()); - if(!valueRawDAGListdag["ScenarioId"].isNull()) - rawDAGListObject.scenarioId = std::stol(valueRawDAGListdag["ScenarioId"].asString()); - if(!valueRawDAGListdag["SpaceId"].isNull()) - rawDAGListObject.spaceId = std::stol(valueRawDAGListdag["SpaceId"].asString()); - if(!valueRawDAGListdag["CreatorNickName"].isNull()) - rawDAGListObject.creatorNickName = valueRawDAGListdag["CreatorNickName"].asString(); - if(!valueRawDAGListdag["DagOwnerNickName"].isNull()) - rawDAGListObject.dagOwnerNickName = valueRawDAGListdag["DagOwnerNickName"].asString(); - if(!valueRawDAGListdag["CanEdit"].isNull()) - rawDAGListObject.canEdit = valueRawDAGListdag["CanEdit"].asString() == "true"; - if(!valueRawDAGListdag["Status"].isNull()) - rawDAGListObject.status = std::stoi(valueRawDAGListdag["Status"].asString()); - if(!valueRawDAGListdag["LatestInstanceStatus"].isNull()) - rawDAGListObject.latestInstanceStatus = std::stoi(valueRawDAGListdag["LatestInstanceStatus"].asString()); - if(!valueRawDAGListdag["LatestInstanceTime"].isNull()) - rawDAGListObject.latestInstanceTime = std::stoi(valueRawDAGListdag["LatestInstanceTime"].asString()); + if(!valueRawDAGListDag["Id"].isNull()) + rawDAGListObject.id = std::stol(valueRawDAGListDag["Id"].asString()); + if(!valueRawDAGListDag["CreatorId"].isNull()) + rawDAGListObject.creatorId = valueRawDAGListDag["CreatorId"].asString(); + if(!valueRawDAGListDag["IsDeleted"].isNull()) + rawDAGListObject.isDeleted = valueRawDAGListDag["IsDeleted"].asString() == "true"; + if(!valueRawDAGListDag["DemoId"].isNull()) + rawDAGListObject.demoId = valueRawDAGListDag["DemoId"].asString(); + if(!valueRawDAGListDag["DeployId"].isNull()) + rawDAGListObject.deployId = std::stol(valueRawDAGListDag["DeployId"].asString()); + if(!valueRawDAGListDag["DataFlowId"].isNull()) + rawDAGListObject.dataFlowId = std::stol(valueRawDAGListDag["DataFlowId"].asString()); + if(!valueRawDAGListDag["ScenarioId"].isNull()) + rawDAGListObject.scenarioId = std::stol(valueRawDAGListDag["ScenarioId"].asString()); + if(!valueRawDAGListDag["SpaceId"].isNull()) + rawDAGListObject.spaceId = std::stol(valueRawDAGListDag["SpaceId"].asString()); + if(!valueRawDAGListDag["CreatorNickName"].isNull()) + rawDAGListObject.creatorNickName = valueRawDAGListDag["CreatorNickName"].asString(); + if(!valueRawDAGListDag["DagOwnerNickName"].isNull()) + rawDAGListObject.dagOwnerNickName = valueRawDAGListDag["DagOwnerNickName"].asString(); + if(!valueRawDAGListDag["CanEdit"].isNull()) + rawDAGListObject.canEdit = valueRawDAGListDag["CanEdit"].asString() == "true"; + if(!valueRawDAGListDag["Status"].isNull()) + rawDAGListObject.status = std::stoi(valueRawDAGListDag["Status"].asString()); + if(!valueRawDAGListDag["LatestInstanceStatus"].isNull()) + rawDAGListObject.latestInstanceStatus = std::stoi(valueRawDAGListDag["LatestInstanceStatus"].asString()); + if(!valueRawDAGListDag["LatestInstanceTime"].isNull()) + rawDAGListObject.latestInstanceTime = std::stoi(valueRawDAGListDag["LatestInstanceTime"].asString()); rawDAGList_.push_back(rawDAGListObject); } - auto scenarioDAGListNode = value["ScenarioDAGList"]; - auto allDagListNode = scenarioDAGListNode["DagList"]["dag"]; - for (auto scenarioDAGListNodeDagListdag : allDagListNode) + auto allScenarioDAGListNode = value["ScenarioDAGList"]["ScenarioDAG"]; + for (auto valueScenarioDAGListScenarioDAG : allScenarioDAGListNode) { - ScenarioDAGList::Dag1 dag1Object; - if(!scenarioDAGListNodeDagListdag["Id"].isNull()) - dag1Object.id = std::stol(scenarioDAGListNodeDagListdag["Id"].asString()); - if(!scenarioDAGListNodeDagListdag["CreatorId"].isNull()) - dag1Object.creatorId = scenarioDAGListNodeDagListdag["CreatorId"].asString(); - if(!scenarioDAGListNodeDagListdag["IsDeleted"].isNull()) - dag1Object.isDeleted = scenarioDAGListNodeDagListdag["IsDeleted"].asString() == "true"; - if(!scenarioDAGListNodeDagListdag["DemoId"].isNull()) - dag1Object.demoId = scenarioDAGListNodeDagListdag["DemoId"].asString(); - if(!scenarioDAGListNodeDagListdag["DeployId"].isNull()) - dag1Object.deployId = std::stol(scenarioDAGListNodeDagListdag["DeployId"].asString()); - if(!scenarioDAGListNodeDagListdag["DataFlowId"].isNull()) - dag1Object.dataFlowId = std::stol(scenarioDAGListNodeDagListdag["DataFlowId"].asString()); - if(!scenarioDAGListNodeDagListdag["ScenarioId"].isNull()) - dag1Object.scenarioId = std::stol(scenarioDAGListNodeDagListdag["ScenarioId"].asString()); - if(!scenarioDAGListNodeDagListdag["SpaceId"].isNull()) - dag1Object.spaceId = std::stol(scenarioDAGListNodeDagListdag["SpaceId"].asString()); - if(!scenarioDAGListNodeDagListdag["CreatorNickName"].isNull()) - dag1Object.creatorNickName = scenarioDAGListNodeDagListdag["CreatorNickName"].asString(); - if(!scenarioDAGListNodeDagListdag["DagOwnerNickName"].isNull()) - dag1Object.dagOwnerNickName = scenarioDAGListNodeDagListdag["DagOwnerNickName"].asString(); - if(!scenarioDAGListNodeDagListdag["CanEdit"].isNull()) - dag1Object.canEdit = scenarioDAGListNodeDagListdag["CanEdit"].asString() == "true"; - if(!scenarioDAGListNodeDagListdag["Status"].isNull()) - dag1Object.status = std::stoi(scenarioDAGListNodeDagListdag["Status"].asString()); - if(!scenarioDAGListNodeDagListdag["LatestInstanceStatus"].isNull()) - dag1Object.latestInstanceStatus = std::stoi(scenarioDAGListNodeDagListdag["LatestInstanceStatus"].asString()); - if(!scenarioDAGListNodeDagListdag["LatestInstanceTime"].isNull()) - dag1Object.latestInstanceTime = std::stoi(scenarioDAGListNodeDagListdag["LatestInstanceTime"].asString()); - scenarioDAGList_.dagList.push_back(dag1Object); + ScenarioDAG scenarioDAGListObject; + auto allDagListNode = valueScenarioDAGListScenarioDAG["DagList"]["Dag"]; + for (auto valueScenarioDAGListScenarioDAGDagListDag : allDagListNode) + { + ScenarioDAG::Dag1 dagListObject; + if(!valueScenarioDAGListScenarioDAGDagListDag["Id"].isNull()) + dagListObject.id = std::stol(valueScenarioDAGListScenarioDAGDagListDag["Id"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["CreatorId"].isNull()) + dagListObject.creatorId = valueScenarioDAGListScenarioDAGDagListDag["CreatorId"].asString(); + if(!valueScenarioDAGListScenarioDAGDagListDag["IsDeleted"].isNull()) + dagListObject.isDeleted = valueScenarioDAGListScenarioDAGDagListDag["IsDeleted"].asString() == "true"; + if(!valueScenarioDAGListScenarioDAGDagListDag["DemoId"].isNull()) + dagListObject.demoId = valueScenarioDAGListScenarioDAGDagListDag["DemoId"].asString(); + if(!valueScenarioDAGListScenarioDAGDagListDag["DeployId"].isNull()) + dagListObject.deployId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["DeployId"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["DataFlowId"].isNull()) + dagListObject.dataFlowId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["DataFlowId"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["ScenarioId"].isNull()) + dagListObject.scenarioId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["ScenarioId"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["SpaceId"].isNull()) + dagListObject.spaceId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["SpaceId"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["CreatorNickName"].isNull()) + dagListObject.creatorNickName = valueScenarioDAGListScenarioDAGDagListDag["CreatorNickName"].asString(); + if(!valueScenarioDAGListScenarioDAGDagListDag["DagOwnerNickName"].isNull()) + dagListObject.dagOwnerNickName = valueScenarioDAGListScenarioDAGDagListDag["DagOwnerNickName"].asString(); + if(!valueScenarioDAGListScenarioDAGDagListDag["CanEdit"].isNull()) + dagListObject.canEdit = valueScenarioDAGListScenarioDAGDagListDag["CanEdit"].asString() == "true"; + if(!valueScenarioDAGListScenarioDAGDagListDag["Status"].isNull()) + dagListObject.status = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["Status"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceStatus"].isNull()) + dagListObject.latestInstanceStatus = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceStatus"].asString()); + if(!valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceTime"].isNull()) + dagListObject.latestInstanceTime = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceTime"].asString()); + scenarioDAGListObject.dagList.push_back(dagListObject); + } + auto scenarioNode = value["Scenario"]; + if(!scenarioNode["ScenarioName"].isNull()) + scenarioDAGListObject.scenario.scenarioName = scenarioNode["ScenarioName"].asString(); + if(!scenarioNode["CreatorId"].isNull()) + scenarioDAGListObject.scenario.creatorId = scenarioNode["CreatorId"].asString(); + if(!scenarioNode["Description"].isNull()) + scenarioDAGListObject.scenario.description = scenarioNode["Description"].asString(); + scenarioDAGList_.push_back(scenarioDAGListObject); } - auto scenarioNode = scenarioDAGListNode["Scenario"]; - if(!scenarioNode["ScenarioName"].isNull()) - scenarioDAGList_.scenario.scenarioName = scenarioNode["ScenarioName"].asString(); - if(!scenarioNode["CreatorId"].isNull()) - scenarioDAGList_.scenario.creatorId = scenarioNode["CreatorId"].asString(); - if(!scenarioNode["Description"].isNull()) - scenarioDAGList_.scenario.description = scenarioNode["Description"].asString(); if(!value["ErrorCode"].isNull()) errorCode_ = value["ErrorCode"].asString(); if(!value["ErrorMessage"].isNull()) @@ -124,7 +129,7 @@ void ListLhTaskFlowAndScenarioResult::parse(const std::string &payload) } -ListLhTaskFlowAndScenarioResult::ScenarioDAGList ListLhTaskFlowAndScenarioResult::getScenarioDAGList()const +std::vector ListLhTaskFlowAndScenarioResult::getScenarioDAGList()const { return scenarioDAGList_; } diff --git a/dms-enterprise/src/model/ReDeployLhDagVersionRequest.cc b/dms-enterprise/src/model/ReDeployLhDagVersionRequest.cc new file mode 100644 index 000000000..71e401e5f --- /dev/null +++ b/dms-enterprise/src/model/ReDeployLhDagVersionRequest.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::Dms_enterprise::Model::ReDeployLhDagVersionRequest; + +ReDeployLhDagVersionRequest::ReDeployLhDagVersionRequest() + : RpcServiceRequest("dms-enterprise", "2018-11-01", "ReDeployLhDagVersion") { + setMethod(HttpRequest::Method::Post); +} + +ReDeployLhDagVersionRequest::~ReDeployLhDagVersionRequest() {} + +long ReDeployLhDagVersionRequest::getDagVersion() const { + return dagVersion_; +} + +void ReDeployLhDagVersionRequest::setDagVersion(long dagVersion) { + dagVersion_ = dagVersion; + setParameter(std::string("DagVersion"), std::to_string(dagVersion)); +} + +long ReDeployLhDagVersionRequest::getDagId() const { + return dagId_; +} + +void ReDeployLhDagVersionRequest::setDagId(long dagId) { + dagId_ = dagId; + setParameter(std::string("DagId"), std::to_string(dagId)); +} + +long ReDeployLhDagVersionRequest::getTid() const { + return tid_; +} + +void ReDeployLhDagVersionRequest::setTid(long tid) { + tid_ = tid; + setParameter(std::string("Tid"), std::to_string(tid)); +} + diff --git a/dms-enterprise/src/model/CreateDataExportOrderResult.cc b/dms-enterprise/src/model/ReDeployLhDagVersionResult.cc similarity index 61% rename from dms-enterprise/src/model/CreateDataExportOrderResult.cc rename to dms-enterprise/src/model/ReDeployLhDagVersionResult.cc index aab9ad3c2..1d625e6da 100644 --- a/dms-enterprise/src/model/CreateDataExportOrderResult.cc +++ b/dms-enterprise/src/model/ReDeployLhDagVersionResult.cc @@ -14,59 +14,58 @@ * limitations under the License. */ -#include +#include #include using namespace AlibabaCloud::Dms_enterprise; using namespace AlibabaCloud::Dms_enterprise::Model; -CreateDataExportOrderResult::CreateDataExportOrderResult() : +ReDeployLhDagVersionResult::ReDeployLhDagVersionResult() : ServiceResult() {} -CreateDataExportOrderResult::CreateDataExportOrderResult(const std::string &payload) : +ReDeployLhDagVersionResult::ReDeployLhDagVersionResult(const std::string &payload) : ServiceResult() { parse(payload); } -CreateDataExportOrderResult::~CreateDataExportOrderResult() +ReDeployLhDagVersionResult::~ReDeployLhDagVersionResult() {} -void CreateDataExportOrderResult::parse(const std::string &payload) +void ReDeployLhDagVersionResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allCreateOrderResult = value["CreateOrderResult"]["OrderIds"]; - for (const auto &item : allCreateOrderResult) - createOrderResult_.push_back(item.asString()); - if(!value["Success"].isNull()) - success_ = value["Success"].asString() == "true"; - if(!value["ErrorMessage"].isNull()) - errorMessage_ = value["ErrorMessage"].asString(); if(!value["ErrorCode"].isNull()) errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["DeployId"].isNull()) + deployId_ = std::stol(value["DeployId"].asString()); } -std::vector CreateDataExportOrderResult::getCreateOrderResult()const +long ReDeployLhDagVersionResult::getDeployId()const { - return createOrderResult_; + return deployId_; } -std::string CreateDataExportOrderResult::getErrorCode()const +std::string ReDeployLhDagVersionResult::getErrorCode()const { return errorCode_; } -std::string CreateDataExportOrderResult::getErrorMessage()const +std::string ReDeployLhDagVersionResult::getErrorMessage()const { return errorMessage_; } -bool CreateDataExportOrderResult::getSuccess()const +bool ReDeployLhDagVersionResult::getSuccess()const { return success_; }