From 8a89fa30ffe9ca68d691c367d42a1e2c3a432290 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 15 May 2023 07:07:20 +0000 Subject: [PATCH] Support SkipDataCorrectRowCheck API. --- VERSION | 2 +- dms-enterprise/CMakeLists.txt | 4 ++ .../dms-enterprise/Dms_enterpriseClient.h | 8 +++ .../model/SkipDataCorrectRowCheckRequest.h | 48 ++++++++++++++ .../model/SkipDataCorrectRowCheckResult.h | 55 ++++++++++++++++ dms-enterprise/src/Dms-enterpriseClient.cc | 36 ++++++++++ .../model/SkipDataCorrectRowCheckRequest.cc | 54 +++++++++++++++ .../model/SkipDataCorrectRowCheckResult.cc | 65 +++++++++++++++++++ 8 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.h create mode 100644 dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h create mode 100644 dms-enterprise/src/model/SkipDataCorrectRowCheckRequest.cc create mode 100644 dms-enterprise/src/model/SkipDataCorrectRowCheckResult.cc diff --git a/VERSION b/VERSION index 704fa58e2..de8f6468c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1569 \ No newline at end of file +1.36.1570 \ No newline at end of file diff --git a/dms-enterprise/CMakeLists.txt b/dms-enterprise/CMakeLists.txt index f603f2d66..d6c5d9b25 100644 --- a/dms-enterprise/CMakeLists.txt +++ b/dms-enterprise/CMakeLists.txt @@ -377,6 +377,8 @@ set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/SearchTableResult.h include/alibabacloud/dms-enterprise/model/SetOwnersRequest.h include/alibabacloud/dms-enterprise/model/SetOwnersResult.h + include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.h + include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h include/alibabacloud/dms-enterprise/model/StopTaskFlowInstanceRequest.h include/alibabacloud/dms-enterprise/model/StopTaskFlowInstanceResult.h include/alibabacloud/dms-enterprise/model/SubmitOrderApprovalRequest.h @@ -786,6 +788,8 @@ set(dms-enterprise_src src/model/SearchTableResult.cc src/model/SetOwnersRequest.cc src/model/SetOwnersResult.cc + src/model/SkipDataCorrectRowCheckRequest.cc + src/model/SkipDataCorrectRowCheckResult.cc src/model/StopTaskFlowInstanceRequest.cc src/model/StopTaskFlowInstanceResult.cc src/model/SubmitOrderApprovalRequest.cc diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h index e933a291d..6e90b3db2 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h @@ -378,6 +378,8 @@ #include "model/SearchTableResult.h" #include "model/SetOwnersRequest.h" #include "model/SetOwnersResult.h" +#include "model/SkipDataCorrectRowCheckRequest.h" +#include "model/SkipDataCorrectRowCheckResult.h" #include "model/StopTaskFlowInstanceRequest.h" #include "model/StopTaskFlowInstanceResult.h" #include "model/SubmitOrderApprovalRequest.h" @@ -971,6 +973,9 @@ namespace AlibabaCloud typedef Outcome SetOwnersOutcome; typedef std::future SetOwnersOutcomeCallable; typedef std::function&)> SetOwnersAsyncHandler; + typedef Outcome SkipDataCorrectRowCheckOutcome; + typedef std::future SkipDataCorrectRowCheckOutcomeCallable; + typedef std::function&)> SkipDataCorrectRowCheckAsyncHandler; typedef Outcome StopTaskFlowInstanceOutcome; typedef std::future StopTaskFlowInstanceOutcomeCallable; typedef std::function&)> StopTaskFlowInstanceAsyncHandler; @@ -1585,6 +1590,9 @@ namespace AlibabaCloud SetOwnersOutcome setOwners(const Model::SetOwnersRequest &request)const; void setOwnersAsync(const Model::SetOwnersRequest& request, const SetOwnersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SetOwnersOutcomeCallable setOwnersCallable(const Model::SetOwnersRequest& request) const; + SkipDataCorrectRowCheckOutcome skipDataCorrectRowCheck(const Model::SkipDataCorrectRowCheckRequest &request)const; + void skipDataCorrectRowCheckAsync(const Model::SkipDataCorrectRowCheckRequest& request, const SkipDataCorrectRowCheckAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SkipDataCorrectRowCheckOutcomeCallable skipDataCorrectRowCheckCallable(const Model::SkipDataCorrectRowCheckRequest& request) const; StopTaskFlowInstanceOutcome stopTaskFlowInstance(const Model::StopTaskFlowInstanceRequest &request)const; void stopTaskFlowInstanceAsync(const Model::StopTaskFlowInstanceRequest& request, const StopTaskFlowInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StopTaskFlowInstanceOutcomeCallable stopTaskFlowInstanceCallable(const Model::StopTaskFlowInstanceRequest& request) const; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.h new file mode 100644 index 000000000..e6fc6d5c7 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.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_SKIPDATACORRECTROWCHECKREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_SKIPDATACORRECTROWCHECKREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_enterprise { +namespace Model { +class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT SkipDataCorrectRowCheckRequest : public RpcServiceRequest { +public: + SkipDataCorrectRowCheckRequest(); + ~SkipDataCorrectRowCheckRequest(); + std::string getReason() const; + void setReason(const std::string &reason); + long getTid() const; + void setTid(long tid); + long getOrderId() const; + void setOrderId(long orderId); + +private: + std::string reason_; + long tid_; + long orderId_; +}; +} // namespace Model +} // namespace Dms_enterprise +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_SKIPDATACORRECTROWCHECKREQUEST_H_ diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h new file mode 100644 index 000000000..06dad3c93 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h @@ -0,0 +1,55 @@ +/* + * 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_SKIPDATACORRECTROWCHECKRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_SKIPDATACORRECTROWCHECKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT SkipDataCorrectRowCheckResult : public ServiceResult + { + public: + + + SkipDataCorrectRowCheckResult(); + explicit SkipDataCorrectRowCheckResult(const std::string &payload); + ~SkipDataCorrectRowCheckResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_SKIPDATACORRECTROWCHECKRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/src/Dms-enterpriseClient.cc b/dms-enterprise/src/Dms-enterpriseClient.cc index db28329cd..f81d71654 100644 --- a/dms-enterprise/src/Dms-enterpriseClient.cc +++ b/dms-enterprise/src/Dms-enterpriseClient.cc @@ -6459,6 +6459,42 @@ Dms_enterpriseClient::SetOwnersOutcomeCallable Dms_enterpriseClient::setOwnersCa return task->get_future(); } +Dms_enterpriseClient::SkipDataCorrectRowCheckOutcome Dms_enterpriseClient::skipDataCorrectRowCheck(const SkipDataCorrectRowCheckRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SkipDataCorrectRowCheckOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SkipDataCorrectRowCheckOutcome(SkipDataCorrectRowCheckResult(outcome.result())); + else + return SkipDataCorrectRowCheckOutcome(outcome.error()); +} + +void Dms_enterpriseClient::skipDataCorrectRowCheckAsync(const SkipDataCorrectRowCheckRequest& request, const SkipDataCorrectRowCheckAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, skipDataCorrectRowCheck(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::SkipDataCorrectRowCheckOutcomeCallable Dms_enterpriseClient::skipDataCorrectRowCheckCallable(const SkipDataCorrectRowCheckRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->skipDataCorrectRowCheck(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::StopTaskFlowInstanceOutcome Dms_enterpriseClient::stopTaskFlowInstance(const StopTaskFlowInstanceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dms-enterprise/src/model/SkipDataCorrectRowCheckRequest.cc b/dms-enterprise/src/model/SkipDataCorrectRowCheckRequest.cc new file mode 100644 index 000000000..23a2746bb --- /dev/null +++ b/dms-enterprise/src/model/SkipDataCorrectRowCheckRequest.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::SkipDataCorrectRowCheckRequest; + +SkipDataCorrectRowCheckRequest::SkipDataCorrectRowCheckRequest() + : RpcServiceRequest("dms-enterprise", "2018-11-01", "SkipDataCorrectRowCheck") { + setMethod(HttpRequest::Method::Post); +} + +SkipDataCorrectRowCheckRequest::~SkipDataCorrectRowCheckRequest() {} + +std::string SkipDataCorrectRowCheckRequest::getReason() const { + return reason_; +} + +void SkipDataCorrectRowCheckRequest::setReason(const std::string &reason) { + reason_ = reason; + setParameter(std::string("Reason"), reason); +} + +long SkipDataCorrectRowCheckRequest::getTid() const { + return tid_; +} + +void SkipDataCorrectRowCheckRequest::setTid(long tid) { + tid_ = tid; + setParameter(std::string("Tid"), std::to_string(tid)); +} + +long SkipDataCorrectRowCheckRequest::getOrderId() const { + return orderId_; +} + +void SkipDataCorrectRowCheckRequest::setOrderId(long orderId) { + orderId_ = orderId; + setParameter(std::string("OrderId"), std::to_string(orderId)); +} + diff --git a/dms-enterprise/src/model/SkipDataCorrectRowCheckResult.cc b/dms-enterprise/src/model/SkipDataCorrectRowCheckResult.cc new file mode 100644 index 000000000..311f6553b --- /dev/null +++ b/dms-enterprise/src/model/SkipDataCorrectRowCheckResult.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; + +SkipDataCorrectRowCheckResult::SkipDataCorrectRowCheckResult() : + ServiceResult() +{} + +SkipDataCorrectRowCheckResult::SkipDataCorrectRowCheckResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SkipDataCorrectRowCheckResult::~SkipDataCorrectRowCheckResult() +{} + +void SkipDataCorrectRowCheckResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].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(); + +} + +std::string SkipDataCorrectRowCheckResult::getErrorCode()const +{ + return errorCode_; +} + +std::string SkipDataCorrectRowCheckResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool SkipDataCorrectRowCheckResult::getSuccess()const +{ + return success_; +} +