Change API CreateDataArchiveOrder and GetDataArchiveCount to public.
This commit is contained in:
@@ -45,6 +45,8 @@ set(dms-enterprise_public_header_model
|
||||
include/alibabacloud/dms-enterprise/model/CloseOrderResult.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateAuthorityTemplateRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateAuthorityTemplateResult.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateDataArchiveOrderRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateDataArchiveOrderResult.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateDataCorrectOrderRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateDataCorrectOrderResult.h
|
||||
include/alibabacloud/dms-enterprise/model/CreateDataCronClearOrderRequest.h
|
||||
@@ -137,6 +139,8 @@ set(dms-enterprise_public_header_model
|
||||
include/alibabacloud/dms-enterprise/model/GetDBTaskSQLJobLogResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDBTopologyRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDBTopologyResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataArchiveCountRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataArchiveCountResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataArchiveOrderDetailRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataArchiveOrderDetailResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataCorrectBackupFilesRequest.h
|
||||
@@ -460,6 +464,8 @@ set(dms-enterprise_src
|
||||
src/model/CloseOrderResult.cc
|
||||
src/model/CreateAuthorityTemplateRequest.cc
|
||||
src/model/CreateAuthorityTemplateResult.cc
|
||||
src/model/CreateDataArchiveOrderRequest.cc
|
||||
src/model/CreateDataArchiveOrderResult.cc
|
||||
src/model/CreateDataCorrectOrderRequest.cc
|
||||
src/model/CreateDataCorrectOrderResult.cc
|
||||
src/model/CreateDataCronClearOrderRequest.cc
|
||||
@@ -552,6 +558,8 @@ set(dms-enterprise_src
|
||||
src/model/GetDBTaskSQLJobLogResult.cc
|
||||
src/model/GetDBTopologyRequest.cc
|
||||
src/model/GetDBTopologyResult.cc
|
||||
src/model/GetDataArchiveCountRequest.cc
|
||||
src/model/GetDataArchiveCountResult.cc
|
||||
src/model/GetDataArchiveOrderDetailRequest.cc
|
||||
src/model/GetDataArchiveOrderDetailResult.cc
|
||||
src/model/GetDataCorrectBackupFilesRequest.cc
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "model/CloseOrderResult.h"
|
||||
#include "model/CreateAuthorityTemplateRequest.h"
|
||||
#include "model/CreateAuthorityTemplateResult.h"
|
||||
#include "model/CreateDataArchiveOrderRequest.h"
|
||||
#include "model/CreateDataArchiveOrderResult.h"
|
||||
#include "model/CreateDataCorrectOrderRequest.h"
|
||||
#include "model/CreateDataCorrectOrderResult.h"
|
||||
#include "model/CreateDataCronClearOrderRequest.h"
|
||||
@@ -138,6 +140,8 @@
|
||||
#include "model/GetDBTaskSQLJobLogResult.h"
|
||||
#include "model/GetDBTopologyRequest.h"
|
||||
#include "model/GetDBTopologyResult.h"
|
||||
#include "model/GetDataArchiveCountRequest.h"
|
||||
#include "model/GetDataArchiveCountResult.h"
|
||||
#include "model/GetDataArchiveOrderDetailRequest.h"
|
||||
#include "model/GetDataArchiveOrderDetailResult.h"
|
||||
#include "model/GetDataCorrectBackupFilesRequest.h"
|
||||
@@ -479,6 +483,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CreateAuthorityTemplateResult> CreateAuthorityTemplateOutcome;
|
||||
typedef std::future<CreateAuthorityTemplateOutcome> CreateAuthorityTemplateOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::CreateAuthorityTemplateRequest&, const CreateAuthorityTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAuthorityTemplateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateDataArchiveOrderResult> CreateDataArchiveOrderOutcome;
|
||||
typedef std::future<CreateDataArchiveOrderOutcome> CreateDataArchiveOrderOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::CreateDataArchiveOrderRequest&, const CreateDataArchiveOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDataArchiveOrderAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateDataCorrectOrderResult> CreateDataCorrectOrderOutcome;
|
||||
typedef std::future<CreateDataCorrectOrderOutcome> CreateDataCorrectOrderOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::CreateDataCorrectOrderRequest&, const CreateDataCorrectOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDataCorrectOrderAsyncHandler;
|
||||
@@ -617,6 +624,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetDBTopologyResult> GetDBTopologyOutcome;
|
||||
typedef std::future<GetDBTopologyOutcome> GetDBTopologyOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetDBTopologyRequest&, const GetDBTopologyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDBTopologyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDataArchiveCountResult> GetDataArchiveCountOutcome;
|
||||
typedef std::future<GetDataArchiveCountOutcome> GetDataArchiveCountOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetDataArchiveCountRequest&, const GetDataArchiveCountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDataArchiveCountAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDataArchiveOrderDetailResult> GetDataArchiveOrderDetailOutcome;
|
||||
typedef std::future<GetDataArchiveOrderDetailOutcome> GetDataArchiveOrderDetailOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetDataArchiveOrderDetailRequest&, const GetDataArchiveOrderDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDataArchiveOrderDetailAsyncHandler;
|
||||
@@ -1102,6 +1112,9 @@ namespace AlibabaCloud
|
||||
CreateAuthorityTemplateOutcome createAuthorityTemplate(const Model::CreateAuthorityTemplateRequest &request)const;
|
||||
void createAuthorityTemplateAsync(const Model::CreateAuthorityTemplateRequest& request, const CreateAuthorityTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAuthorityTemplateOutcomeCallable createAuthorityTemplateCallable(const Model::CreateAuthorityTemplateRequest& request) const;
|
||||
CreateDataArchiveOrderOutcome createDataArchiveOrder(const Model::CreateDataArchiveOrderRequest &request)const;
|
||||
void createDataArchiveOrderAsync(const Model::CreateDataArchiveOrderRequest& request, const CreateDataArchiveOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateDataArchiveOrderOutcomeCallable createDataArchiveOrderCallable(const Model::CreateDataArchiveOrderRequest& request) const;
|
||||
CreateDataCorrectOrderOutcome createDataCorrectOrder(const Model::CreateDataCorrectOrderRequest &request)const;
|
||||
void createDataCorrectOrderAsync(const Model::CreateDataCorrectOrderRequest& request, const CreateDataCorrectOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateDataCorrectOrderOutcomeCallable createDataCorrectOrderCallable(const Model::CreateDataCorrectOrderRequest& request) const;
|
||||
@@ -1240,6 +1253,9 @@ namespace AlibabaCloud
|
||||
GetDBTopologyOutcome getDBTopology(const Model::GetDBTopologyRequest &request)const;
|
||||
void getDBTopologyAsync(const Model::GetDBTopologyRequest& request, const GetDBTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDBTopologyOutcomeCallable getDBTopologyCallable(const Model::GetDBTopologyRequest& request) const;
|
||||
GetDataArchiveCountOutcome getDataArchiveCount(const Model::GetDataArchiveCountRequest &request)const;
|
||||
void getDataArchiveCountAsync(const Model::GetDataArchiveCountRequest& request, const GetDataArchiveCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDataArchiveCountOutcomeCallable getDataArchiveCountCallable(const Model::GetDataArchiveCountRequest& request) const;
|
||||
GetDataArchiveOrderDetailOutcome getDataArchiveOrderDetail(const Model::GetDataArchiveOrderDetailRequest &request)const;
|
||||
void getDataArchiveOrderDetailAsync(const Model::GetDataArchiveOrderDetailRequest& request, const GetDataArchiveOrderDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDataArchiveOrderDetailOutcomeCallable getDataArchiveOrderDetailCallable(const Model::GetDataArchiveOrderDetailRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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_CREATEDATAARCHIVEORDERREQUEST_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAARCHIVEORDERREQUEST_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 CreateDataArchiveOrderRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Param {
|
||||
std::string string;
|
||||
std::vector<std::string> variables;
|
||||
std::string targetInstanceId;
|
||||
std::string string;
|
||||
std::vector<std::string> tableMapping;
|
||||
std::string string;
|
||||
std::vector<std::string> orderAfter;
|
||||
long sourceDatabaseId;
|
||||
std::string dbSchema;
|
||||
std::string runMethod;
|
||||
bool logic;
|
||||
std::string archiveMethod;
|
||||
struct TableIncludesItem {
|
||||
std::string tableWhere;
|
||||
std::string tableName;
|
||||
};
|
||||
TableIncludesItem tableIncludesItem;
|
||||
std::vector<TableIncludesItem> tableIncludes;
|
||||
};
|
||||
CreateDataArchiveOrderRequest();
|
||||
~CreateDataArchiveOrderRequest();
|
||||
long getTid() const;
|
||||
void setTid(long tid);
|
||||
long getParentId() const;
|
||||
void setParentId(long parentId);
|
||||
std::string getPluginType() const;
|
||||
void setPluginType(const std::string &pluginType);
|
||||
Param getParam() const;
|
||||
void setParam(const Param ¶m);
|
||||
std::vector<std::string> getRelatedUserList() const;
|
||||
void setRelatedUserList(const std::vector<std::string> &relatedUserList);
|
||||
std::string getComment() const;
|
||||
void setComment(const std::string &comment);
|
||||
|
||||
private:
|
||||
long tid_;
|
||||
long parentId_;
|
||||
std::string pluginType_;
|
||||
Param param_;
|
||||
std::vector<std::string> relatedUserList_;
|
||||
std::string comment_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dms_enterprise
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAARCHIVEORDERREQUEST_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_CREATEDATAARCHIVEORDERRESULT_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAARCHIVEORDERRESULT_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 CreateDataArchiveOrderResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateDataArchiveOrderResult();
|
||||
explicit CreateDataArchiveOrderResult(const std::string &payload);
|
||||
~CreateDataArchiveOrderResult();
|
||||
std::vector<std::string> getCreateOrderResult()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<std::string> createOrderResult_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CREATEDATAARCHIVEORDERRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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_GETDATAARCHIVECOUNTREQUEST_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDATAARCHIVECOUNTREQUEST_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 GetDataArchiveCountRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetDataArchiveCountRequest();
|
||||
~GetDataArchiveCountRequest();
|
||||
std::string getSearchDateType() const;
|
||||
void setSearchDateType(const std::string &searchDateType);
|
||||
long getTid() const;
|
||||
void setTid(long tid);
|
||||
std::string getPluginType() const;
|
||||
void setPluginType(const std::string &pluginType);
|
||||
std::string getOrderResultType() const;
|
||||
void setOrderResultType(const std::string &orderResultType);
|
||||
|
||||
private:
|
||||
std::string searchDateType_;
|
||||
long tid_;
|
||||
std::string pluginType_;
|
||||
std::string orderResultType_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dms_enterprise
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDATAARCHIVECOUNTREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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_GETDATAARCHIVECOUNTRESULT_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDATAARCHIVECOUNTRESULT_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 GetDataArchiveCountResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
long processingCount;
|
||||
long totalCount;
|
||||
long failCount;
|
||||
long successCount;
|
||||
};
|
||||
|
||||
|
||||
GetDataArchiveCountResult();
|
||||
explicit GetDataArchiveCountResult(const std::string &payload);
|
||||
~GetDataArchiveCountResult();
|
||||
Data getData()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDATAARCHIVECOUNTRESULT_H_
|
||||
@@ -483,6 +483,42 @@ Dms_enterpriseClient::CreateAuthorityTemplateOutcomeCallable Dms_enterpriseClien
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::CreateDataArchiveOrderOutcome Dms_enterpriseClient::createDataArchiveOrder(const CreateDataArchiveOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateDataArchiveOrderOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateDataArchiveOrderOutcome(CreateDataArchiveOrderResult(outcome.result()));
|
||||
else
|
||||
return CreateDataArchiveOrderOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dms_enterpriseClient::createDataArchiveOrderAsync(const CreateDataArchiveOrderRequest& request, const CreateDataArchiveOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createDataArchiveOrder(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::CreateDataArchiveOrderOutcomeCallable Dms_enterpriseClient::createDataArchiveOrderCallable(const CreateDataArchiveOrderRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateDataArchiveOrderOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createDataArchiveOrder(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::CreateDataCorrectOrderOutcome Dms_enterpriseClient::createDataCorrectOrder(const CreateDataCorrectOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2139,6 +2175,42 @@ Dms_enterpriseClient::GetDBTopologyOutcomeCallable Dms_enterpriseClient::getDBTo
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDataArchiveCountOutcome Dms_enterpriseClient::getDataArchiveCount(const GetDataArchiveCountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetDataArchiveCountOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetDataArchiveCountOutcome(GetDataArchiveCountResult(outcome.result()));
|
||||
else
|
||||
return GetDataArchiveCountOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dms_enterpriseClient::getDataArchiveCountAsync(const GetDataArchiveCountRequest& request, const GetDataArchiveCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getDataArchiveCount(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDataArchiveCountOutcomeCallable Dms_enterpriseClient::getDataArchiveCountCallable(const GetDataArchiveCountRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetDataArchiveCountOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getDataArchiveCount(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDataArchiveOrderDetailOutcome Dms_enterpriseClient::getDataArchiveOrderDetail(const GetDataArchiveOrderDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
101
dms-enterprise/src/model/CreateDataArchiveOrderRequest.cc
Normal file
101
dms-enterprise/src/model/CreateDataArchiveOrderRequest.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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/CreateDataArchiveOrderRequest.h>
|
||||
|
||||
using AlibabaCloud::Dms_enterprise::Model::CreateDataArchiveOrderRequest;
|
||||
|
||||
CreateDataArchiveOrderRequest::CreateDataArchiveOrderRequest()
|
||||
: RpcServiceRequest("dms-enterprise", "2018-11-01", "CreateDataArchiveOrder") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateDataArchiveOrderRequest::~CreateDataArchiveOrderRequest() {}
|
||||
|
||||
long CreateDataArchiveOrderRequest::getTid() const {
|
||||
return tid_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setTid(long tid) {
|
||||
tid_ = tid;
|
||||
setParameter(std::string("Tid"), std::to_string(tid));
|
||||
}
|
||||
|
||||
long CreateDataArchiveOrderRequest::getParentId() const {
|
||||
return parentId_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setParentId(long parentId) {
|
||||
parentId_ = parentId;
|
||||
setParameter(std::string("ParentId"), std::to_string(parentId));
|
||||
}
|
||||
|
||||
std::string CreateDataArchiveOrderRequest::getPluginType() const {
|
||||
return pluginType_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setPluginType(const std::string &pluginType) {
|
||||
pluginType_ = pluginType;
|
||||
setParameter(std::string("PluginType"), pluginType);
|
||||
}
|
||||
|
||||
CreateDataArchiveOrderRequest::Param CreateDataArchiveOrderRequest::getParam() const {
|
||||
return param_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setParam(const CreateDataArchiveOrderRequest::Param ¶m) {
|
||||
param_ = param;
|
||||
for(int dep1 = 0; dep1 != param.variables.size(); dep1++) {
|
||||
setParameter(std::string("Param") + ".Variables." + std::to_string(dep1 + 1), param.variables[dep1]);
|
||||
}
|
||||
setParameter(std::string("Param") + ".TargetInstanceId", param.targetInstanceId);
|
||||
for(int dep1 = 0; dep1 != param.tableMapping.size(); dep1++) {
|
||||
setParameter(std::string("Param") + ".TableMapping." + std::to_string(dep1 + 1), param.tableMapping[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != param.orderAfter.size(); dep1++) {
|
||||
setParameter(std::string("Param") + ".OrderAfter." + std::to_string(dep1 + 1), param.orderAfter[dep1]);
|
||||
}
|
||||
setParameter(std::string("Param") + ".SourceDatabaseId", std::to_string(param.sourceDatabaseId));
|
||||
setParameter(std::string("Param") + ".DbSchema", param.dbSchema);
|
||||
setParameter(std::string("Param") + ".RunMethod", param.runMethod);
|
||||
setParameter(std::string("Param") + ".Logic", param.logic ? "true" : "false");
|
||||
setParameter(std::string("Param") + ".ArchiveMethod", param.archiveMethod);
|
||||
for(int dep1 = 0; dep1 != param.tableIncludes.size(); dep1++) {
|
||||
setParameter(std::string("Param") + ".TableIncludes." + std::to_string(dep1 + 1) + ".TableWhere", param.tableIncludes[dep1].tableWhere);
|
||||
setParameter(std::string("Param") + ".TableIncludes." + std::to_string(dep1 + 1) + ".TableName", param.tableIncludes[dep1].tableName);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateDataArchiveOrderRequest::std::string> CreateDataArchiveOrderRequest::getRelatedUserList() const {
|
||||
return relatedUserList_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setRelatedUserList(const std::vector<CreateDataArchiveOrderRequest::std::string> &relatedUserList) {
|
||||
relatedUserList_ = relatedUserList;
|
||||
for(int dep1 = 0; dep1 != relatedUserList.size(); dep1++) {
|
||||
setParameter(std::string("RelatedUserList") + "." + std::to_string(dep1 + 1), relatedUserList[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateDataArchiveOrderRequest::getComment() const {
|
||||
return comment_;
|
||||
}
|
||||
|
||||
void CreateDataArchiveOrderRequest::setComment(const std::string &comment) {
|
||||
comment_ = comment;
|
||||
setParameter(std::string("Comment"), comment);
|
||||
}
|
||||
|
||||
73
dms-enterprise/src/model/CreateDataArchiveOrderResult.cc
Normal file
73
dms-enterprise/src/model/CreateDataArchiveOrderResult.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dms-enterprise/model/CreateDataArchiveOrderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dms_enterprise;
|
||||
using namespace AlibabaCloud::Dms_enterprise::Model;
|
||||
|
||||
CreateDataArchiveOrderResult::CreateDataArchiveOrderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateDataArchiveOrderResult::CreateDataArchiveOrderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateDataArchiveOrderResult::~CreateDataArchiveOrderResult()
|
||||
{}
|
||||
|
||||
void CreateDataArchiveOrderResult::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();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateDataArchiveOrderResult::getCreateOrderResult()const
|
||||
{
|
||||
return createOrderResult_;
|
||||
}
|
||||
|
||||
std::string CreateDataArchiveOrderResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CreateDataArchiveOrderResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CreateDataArchiveOrderResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
63
dms-enterprise/src/model/GetDataArchiveCountRequest.cc
Normal file
63
dms-enterprise/src/model/GetDataArchiveCountRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/GetDataArchiveCountRequest.h>
|
||||
|
||||
using AlibabaCloud::Dms_enterprise::Model::GetDataArchiveCountRequest;
|
||||
|
||||
GetDataArchiveCountRequest::GetDataArchiveCountRequest()
|
||||
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetDataArchiveCount") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDataArchiveCountRequest::~GetDataArchiveCountRequest() {}
|
||||
|
||||
std::string GetDataArchiveCountRequest::getSearchDateType() const {
|
||||
return searchDateType_;
|
||||
}
|
||||
|
||||
void GetDataArchiveCountRequest::setSearchDateType(const std::string &searchDateType) {
|
||||
searchDateType_ = searchDateType;
|
||||
setParameter(std::string("SearchDateType"), searchDateType);
|
||||
}
|
||||
|
||||
long GetDataArchiveCountRequest::getTid() const {
|
||||
return tid_;
|
||||
}
|
||||
|
||||
void GetDataArchiveCountRequest::setTid(long tid) {
|
||||
tid_ = tid;
|
||||
setParameter(std::string("Tid"), std::to_string(tid));
|
||||
}
|
||||
|
||||
std::string GetDataArchiveCountRequest::getPluginType() const {
|
||||
return pluginType_;
|
||||
}
|
||||
|
||||
void GetDataArchiveCountRequest::setPluginType(const std::string &pluginType) {
|
||||
pluginType_ = pluginType;
|
||||
setParameter(std::string("PluginType"), pluginType);
|
||||
}
|
||||
|
||||
std::string GetDataArchiveCountRequest::getOrderResultType() const {
|
||||
return orderResultType_;
|
||||
}
|
||||
|
||||
void GetDataArchiveCountRequest::setOrderResultType(const std::string &orderResultType) {
|
||||
orderResultType_ = orderResultType;
|
||||
setParameter(std::string("OrderResultType"), orderResultType);
|
||||
}
|
||||
|
||||
65
dms-enterprise/src/model/GetDataArchiveCountResult.cc
Normal file
65
dms-enterprise/src/model/GetDataArchiveCountResult.cc
Normal 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/GetDataArchiveCountResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dms_enterprise;
|
||||
using namespace AlibabaCloud::Dms_enterprise::Model;
|
||||
|
||||
GetDataArchiveCountResult::GetDataArchiveCountResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDataArchiveCountResult::GetDataArchiveCountResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDataArchiveCountResult::~GetDataArchiveCountResult()
|
||||
{}
|
||||
|
||||
void GetDataArchiveCountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["FailCount"].isNull())
|
||||
data_.failCount = std::stol(dataNode["FailCount"].asString());
|
||||
if(!dataNode["ProcessingCount"].isNull())
|
||||
data_.processingCount = std::stol(dataNode["ProcessingCount"].asString());
|
||||
if(!dataNode["SuccessCount"].isNull())
|
||||
data_.successCount = std::stol(dataNode["SuccessCount"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stol(dataNode["TotalCount"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
GetDataArchiveCountResult::Data GetDataArchiveCountResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
bool GetDataArchiveCountResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user