Support SkipDataCorrectRowCheck API.

This commit is contained in:
sdk-team
2023-05-15 07:07:20 +00:00
parent 705a4d512f
commit 8a89fa30ff
8 changed files with 271 additions and 1 deletions

View File

@@ -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();

View File

@@ -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));
}

View File

@@ -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_;
}