Browse Source

Support SkipDataCorrectRowCheck API.

sdk-team 3 years ago
parent
commit
8a89fa30ff

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1569
+1.36.1570

+ 4 - 0
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

+ 8 - 0
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<Error, Model::SetOwnersResult> SetOwnersOutcome;
 			typedef std::future<SetOwnersOutcome> SetOwnersOutcomeCallable;
 			typedef std::function<void(const Dms_enterpriseClient*, const Model::SetOwnersRequest&, const SetOwnersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetOwnersAsyncHandler;
+			typedef Outcome<Error, Model::SkipDataCorrectRowCheckResult> SkipDataCorrectRowCheckOutcome;
+			typedef std::future<SkipDataCorrectRowCheckOutcome> SkipDataCorrectRowCheckOutcomeCallable;
+			typedef std::function<void(const Dms_enterpriseClient*, const Model::SkipDataCorrectRowCheckRequest&, const SkipDataCorrectRowCheckOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SkipDataCorrectRowCheckAsyncHandler;
 			typedef Outcome<Error, Model::StopTaskFlowInstanceResult> StopTaskFlowInstanceOutcome;
 			typedef std::future<StopTaskFlowInstanceOutcome> StopTaskFlowInstanceOutcomeCallable;
 			typedef std::function<void(const Dms_enterpriseClient*, const Model::StopTaskFlowInstanceRequest&, const StopTaskFlowInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
 			StopTaskFlowInstanceOutcomeCallable stopTaskFlowInstanceCallable(const Model::StopTaskFlowInstanceRequest& request) const;

+ 48 - 0
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 <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+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_

+ 55 - 0
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 <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
+
+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_

+ 36 - 0
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<const AsyncCallerContext>& 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<std::packaged_task<SkipDataCorrectRowCheckOutcome()>>(
+			[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();

+ 54 - 0
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 <alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckRequest.h>
+
+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));
+}
+

+ 65 - 0
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 <alibabacloud/dms-enterprise/model/SkipDataCorrectRowCheckResult.h>
+#include <json/json.h>
+
+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_;
+}
+