Supported GetStructSyncOrderDetail OrderId param required.

This commit is contained in:
sdk-team
2022-12-02 01:18:54 +00:00
parent a3322bd82b
commit 48cf4804fb
12 changed files with 317 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1360
1.36.1361

View File

@@ -153,6 +153,8 @@ set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/GetMetaTableColumnResult.h
include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoRequest.h
include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoResult.h
include/alibabacloud/dms-enterprise/model/GetOnlineDDLProgressRequest.h
include/alibabacloud/dms-enterprise/model/GetOnlineDDLProgressResult.h
include/alibabacloud/dms-enterprise/model/GetOpLogRequest.h
include/alibabacloud/dms-enterprise/model/GetOpLogResult.h
include/alibabacloud/dms-enterprise/model/GetOrderAttachmentFileRequest.h
@@ -518,6 +520,8 @@ set(dms-enterprise_src
src/model/GetMetaTableColumnResult.cc
src/model/GetMetaTableDetailInfoRequest.cc
src/model/GetMetaTableDetailInfoResult.cc
src/model/GetOnlineDDLProgressRequest.cc
src/model/GetOnlineDDLProgressResult.cc
src/model/GetOpLogRequest.cc
src/model/GetOpLogResult.cc
src/model/GetOrderAttachmentFileRequest.cc

View File

@@ -154,6 +154,8 @@
#include "model/GetMetaTableColumnResult.h"
#include "model/GetMetaTableDetailInfoRequest.h"
#include "model/GetMetaTableDetailInfoResult.h"
#include "model/GetOnlineDDLProgressRequest.h"
#include "model/GetOnlineDDLProgressResult.h"
#include "model/GetOpLogRequest.h"
#include "model/GetOpLogResult.h"
#include "model/GetOrderAttachmentFileRequest.h"
@@ -591,6 +593,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetMetaTableDetailInfoResult> GetMetaTableDetailInfoOutcome;
typedef std::future<GetMetaTableDetailInfoOutcome> GetMetaTableDetailInfoOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetMetaTableDetailInfoRequest&, const GetMetaTableDetailInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMetaTableDetailInfoAsyncHandler;
typedef Outcome<Error, Model::GetOnlineDDLProgressResult> GetOnlineDDLProgressOutcome;
typedef std::future<GetOnlineDDLProgressOutcome> GetOnlineDDLProgressOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetOnlineDDLProgressRequest&, const GetOnlineDDLProgressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOnlineDDLProgressAsyncHandler;
typedef Outcome<Error, Model::GetOpLogResult> GetOpLogOutcome;
typedef std::future<GetOpLogOutcome> GetOpLogOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetOpLogRequest&, const GetOpLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOpLogAsyncHandler;
@@ -1139,6 +1144,9 @@ namespace AlibabaCloud
GetMetaTableDetailInfoOutcome getMetaTableDetailInfo(const Model::GetMetaTableDetailInfoRequest &request)const;
void getMetaTableDetailInfoAsync(const Model::GetMetaTableDetailInfoRequest& request, const GetMetaTableDetailInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetMetaTableDetailInfoOutcomeCallable getMetaTableDetailInfoCallable(const Model::GetMetaTableDetailInfoRequest& request) const;
GetOnlineDDLProgressOutcome getOnlineDDLProgress(const Model::GetOnlineDDLProgressRequest &request)const;
void getOnlineDDLProgressAsync(const Model::GetOnlineDDLProgressRequest& request, const GetOnlineDDLProgressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOnlineDDLProgressOutcomeCallable getOnlineDDLProgressCallable(const Model::GetOnlineDDLProgressRequest& request) const;
GetOpLogOutcome getOpLog(const Model::GetOpLogRequest &request)const;
void getOpLogAsync(const Model::GetOpLogRequest& request, const GetOpLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOpLogOutcomeCallable getOpLogCallable(const Model::GetOpLogRequest& request) const;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string schemaName;
std::string envType;
std::vector<std::string> ownerIdList;
std::vector<std::string> databaseIds;
};

View File

@@ -0,0 +1,45 @@
/*
* 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_GETONLINEDDLPROGRESSREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETONLINEDDLPROGRESSREQUEST_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 GetOnlineDDLProgressRequest : public RpcServiceRequest {
public:
GetOnlineDDLProgressRequest();
~GetOnlineDDLProgressRequest();
long getTid() const;
void setTid(long tid);
long getJobDetailId() const;
void setJobDetailId(long jobDetailId);
private:
long tid_;
long jobDetailId_;
};
} // namespace Model
} // namespace Dms_enterprise
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETONLINEDDLPROGRESSREQUEST_H_

View File

@@ -0,0 +1,73 @@
/*
* 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_GETONLINEDDLPROGRESSRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETONLINEDDLPROGRESSRESULT_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 GetOnlineDDLProgressResult : public ServiceResult
{
public:
struct OnlineDDLTaskDetail
{
std::string cleanStrategy;
long cutoverLockTimeSeconds;
long copyChunkSize;
std::string copyChunkMode;
std::string cutoverWindowEndTime;
std::string cutoverWindowStartTime;
std::string jobStatus;
std::string statusDesc;
std::string progressRatio;
long delaySeconds;
long cutoverFailRetryTimes;
long copyTotal;
long copyCount;
};
GetOnlineDDLProgressResult();
explicit GetOnlineDDLProgressResult(const std::string &payload);
~GetOnlineDDLProgressResult();
OnlineDDLTaskDetail getOnlineDDLTaskDetail()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
OnlineDDLTaskDetail onlineDDLTaskDetail_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETONLINEDDLPROGRESSRESULT_H_

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string schemaName;
std::string envType;
std::vector<std::string> ownerIdList;
std::vector<std::string> databaseIds;
};

View File

@@ -2427,6 +2427,42 @@ Dms_enterpriseClient::GetMetaTableDetailInfoOutcomeCallable Dms_enterpriseClient
return task->get_future();
}
Dms_enterpriseClient::GetOnlineDDLProgressOutcome Dms_enterpriseClient::getOnlineDDLProgress(const GetOnlineDDLProgressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetOnlineDDLProgressOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetOnlineDDLProgressOutcome(GetOnlineDDLProgressResult(outcome.result()));
else
return GetOnlineDDLProgressOutcome(outcome.error());
}
void Dms_enterpriseClient::getOnlineDDLProgressAsync(const GetOnlineDDLProgressRequest& request, const GetOnlineDDLProgressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getOnlineDDLProgress(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetOnlineDDLProgressOutcomeCallable Dms_enterpriseClient::getOnlineDDLProgressCallable(const GetOnlineDDLProgressRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetOnlineDDLProgressOutcome()>>(
[this, request]()
{
return this->getOnlineDDLProgress(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetOpLogOutcome Dms_enterpriseClient::getOpLog(const GetOpLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -60,6 +60,9 @@ void GetLogicDatabaseResult::parse(const std::string &payload)
auto allOwnerNameList = logicDatabaseNode["OwnerNameList"]["OwnerNames"];
for (auto value : allOwnerNameList)
logicDatabase_.ownerNameList.push_back(value.asString());
auto allDatabaseIds = logicDatabaseNode["DatabaseIds"]["DatabaseIds"];
for (auto value : allDatabaseIds)
logicDatabase_.databaseIds.push_back(value.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())

View File

@@ -0,0 +1,45 @@
/*
* 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/GetOnlineDDLProgressRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetOnlineDDLProgressRequest;
GetOnlineDDLProgressRequest::GetOnlineDDLProgressRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetOnlineDDLProgress") {
setMethod(HttpRequest::Method::Post);
}
GetOnlineDDLProgressRequest::~GetOnlineDDLProgressRequest() {}
long GetOnlineDDLProgressRequest::getTid() const {
return tid_;
}
void GetOnlineDDLProgressRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GetOnlineDDLProgressRequest::getJobDetailId() const {
return jobDetailId_;
}
void GetOnlineDDLProgressRequest::setJobDetailId(long jobDetailId) {
jobDetailId_ = jobDetailId;
setParameter(std::string("JobDetailId"), std::to_string(jobDetailId));
}

View File

@@ -0,0 +1,97 @@
/*
* 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/GetOnlineDDLProgressResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetOnlineDDLProgressResult::GetOnlineDDLProgressResult() :
ServiceResult()
{}
GetOnlineDDLProgressResult::GetOnlineDDLProgressResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetOnlineDDLProgressResult::~GetOnlineDDLProgressResult()
{}
void GetOnlineDDLProgressResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto onlineDDLTaskDetailNode = value["OnlineDDLTaskDetail"];
if(!onlineDDLTaskDetailNode["JobStatus"].isNull())
onlineDDLTaskDetail_.jobStatus = onlineDDLTaskDetailNode["JobStatus"].asString();
if(!onlineDDLTaskDetailNode["StatusDesc"].isNull())
onlineDDLTaskDetail_.statusDesc = onlineDDLTaskDetailNode["StatusDesc"].asString();
if(!onlineDDLTaskDetailNode["DelaySeconds"].isNull())
onlineDDLTaskDetail_.delaySeconds = std::stol(onlineDDLTaskDetailNode["DelaySeconds"].asString());
if(!onlineDDLTaskDetailNode["CopyTotal"].isNull())
onlineDDLTaskDetail_.copyTotal = std::stol(onlineDDLTaskDetailNode["CopyTotal"].asString());
if(!onlineDDLTaskDetailNode["CopyCount"].isNull())
onlineDDLTaskDetail_.copyCount = std::stol(onlineDDLTaskDetailNode["CopyCount"].asString());
if(!onlineDDLTaskDetailNode["ProgressRatio"].isNull())
onlineDDLTaskDetail_.progressRatio = onlineDDLTaskDetailNode["ProgressRatio"].asString();
if(!onlineDDLTaskDetailNode["CutoverLockTimeSeconds"].isNull())
onlineDDLTaskDetail_.cutoverLockTimeSeconds = std::stol(onlineDDLTaskDetailNode["CutoverLockTimeSeconds"].asString());
if(!onlineDDLTaskDetailNode["CutoverFailRetryTimes"].isNull())
onlineDDLTaskDetail_.cutoverFailRetryTimes = std::stol(onlineDDLTaskDetailNode["CutoverFailRetryTimes"].asString());
if(!onlineDDLTaskDetailNode["CleanStrategy"].isNull())
onlineDDLTaskDetail_.cleanStrategy = onlineDDLTaskDetailNode["CleanStrategy"].asString();
if(!onlineDDLTaskDetailNode["CopyChunkSize"].isNull())
onlineDDLTaskDetail_.copyChunkSize = std::stol(onlineDDLTaskDetailNode["CopyChunkSize"].asString());
if(!onlineDDLTaskDetailNode["CopyChunkMode"].isNull())
onlineDDLTaskDetail_.copyChunkMode = onlineDDLTaskDetailNode["CopyChunkMode"].asString();
if(!onlineDDLTaskDetailNode["CutoverWindowStartTime"].isNull())
onlineDDLTaskDetail_.cutoverWindowStartTime = onlineDDLTaskDetailNode["CutoverWindowStartTime"].asString();
if(!onlineDDLTaskDetailNode["CutoverWindowEndTime"].isNull())
onlineDDLTaskDetail_.cutoverWindowEndTime = onlineDDLTaskDetailNode["CutoverWindowEndTime"].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();
}
GetOnlineDDLProgressResult::OnlineDDLTaskDetail GetOnlineDDLProgressResult::getOnlineDDLTaskDetail()const
{
return onlineDDLTaskDetail_;
}
std::string GetOnlineDDLProgressResult::getErrorCode()const
{
return errorCode_;
}
std::string GetOnlineDDLProgressResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetOnlineDDLProgressResult::getSuccess()const
{
return success_;
}

View File

@@ -63,6 +63,9 @@ void ListLogicDatabasesResult::parse(const std::string &payload)
auto allOwnerNameList = value["OwnerNameList"]["OwnerNames"];
for (auto value : allOwnerNameList)
logicDatabaseListObject.ownerNameList.push_back(value.asString());
auto allDatabaseIds = value["DatabaseIds"]["DatabaseIds"];
for (auto value : allDatabaseIds)
logicDatabaseListObject.databaseIds.push_back(value.asString());
logicDatabaseList_.push_back(logicDatabaseListObject);
}
if(!value["TotalCount"].isNull())