Explorar el Código

DBS SDK Auto Released By wanxin,Version:1.36.7

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao hace 7 años
padre
commit
bcea2432e3

+ 4 - 0
CHANGELOG

@@ -1,3 +1,7 @@
+2019-04-15 Version: 1.36.7
+1, Add CreateRestoreTask DBS interface.
+2, Add StartRestoreTask DBS interface.
+
 2019-04-15 Version: 1.36.6
 1, add arns parameter to CreateDisk/CreateInstance API in order to support disk encryption by performing a sts role play.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.6
+1.36.7

+ 10 - 2
dbs/CMakeLists.txt

@@ -31,12 +31,16 @@ set(dbs_public_header_model
 	include/alibabacloud/dbs/model/StartBackupPlanResult.h
 	include/alibabacloud/dbs/model/DescribeBackupGatewayListRequest.h
 	include/alibabacloud/dbs/model/DescribeBackupGatewayListResult.h
+	include/alibabacloud/dbs/model/CreateRestoreTaskRequest.h
+	include/alibabacloud/dbs/model/CreateRestoreTaskResult.h
 	include/alibabacloud/dbs/model/DescribeIncrementBackupListRequest.h
 	include/alibabacloud/dbs/model/DescribeIncrementBackupListResult.h
 	include/alibabacloud/dbs/model/ConfigureBackupPlanRequest.h
 	include/alibabacloud/dbs/model/ConfigureBackupPlanResult.h
 	include/alibabacloud/dbs/model/DescribeFullBackupListRequest.h
-	include/alibabacloud/dbs/model/DescribeFullBackupListResult.h )
+	include/alibabacloud/dbs/model/DescribeFullBackupListResult.h
+	include/alibabacloud/dbs/model/StartRestoreTaskRequest.h
+	include/alibabacloud/dbs/model/StartRestoreTaskResult.h )
 
 set(dbs_src 
 	src/DbsClient.cc
@@ -50,12 +54,16 @@ set(dbs_src
 	src/model/StartBackupPlanResult.cc
 	src/model/DescribeBackupGatewayListRequest.cc
 	src/model/DescribeBackupGatewayListResult.cc
+	src/model/CreateRestoreTaskRequest.cc
+	src/model/CreateRestoreTaskResult.cc
 	src/model/DescribeIncrementBackupListRequest.cc
 	src/model/DescribeIncrementBackupListResult.cc
 	src/model/ConfigureBackupPlanRequest.cc
 	src/model/ConfigureBackupPlanResult.cc
 	src/model/DescribeFullBackupListRequest.cc
-	src/model/DescribeFullBackupListResult.cc )
+	src/model/DescribeFullBackupListResult.cc
+	src/model/StartRestoreTaskRequest.cc
+	src/model/StartRestoreTaskResult.cc )
 
 add_library(dbs ${LIB_TYPE}
 	${dbs_public_header}

+ 16 - 0
dbs/include/alibabacloud/dbs/DbsClient.h

@@ -32,12 +32,16 @@
 #include "model/StartBackupPlanResult.h"
 #include "model/DescribeBackupGatewayListRequest.h"
 #include "model/DescribeBackupGatewayListResult.h"
+#include "model/CreateRestoreTaskRequest.h"
+#include "model/CreateRestoreTaskResult.h"
 #include "model/DescribeIncrementBackupListRequest.h"
 #include "model/DescribeIncrementBackupListResult.h"
 #include "model/ConfigureBackupPlanRequest.h"
 #include "model/ConfigureBackupPlanResult.h"
 #include "model/DescribeFullBackupListRequest.h"
 #include "model/DescribeFullBackupListResult.h"
+#include "model/StartRestoreTaskRequest.h"
+#include "model/StartRestoreTaskResult.h"
 
 
 namespace AlibabaCloud
@@ -62,6 +66,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::DescribeBackupGatewayListResult> DescribeBackupGatewayListOutcome;
 			typedef std::future<DescribeBackupGatewayListOutcome> DescribeBackupGatewayListOutcomeCallable;
 			typedef std::function<void(const DbsClient*, const Model::DescribeBackupGatewayListRequest&, const DescribeBackupGatewayListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeBackupGatewayListAsyncHandler;
+			typedef Outcome<Error, Model::CreateRestoreTaskResult> CreateRestoreTaskOutcome;
+			typedef std::future<CreateRestoreTaskOutcome> CreateRestoreTaskOutcomeCallable;
+			typedef std::function<void(const DbsClient*, const Model::CreateRestoreTaskRequest&, const CreateRestoreTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateRestoreTaskAsyncHandler;
 			typedef Outcome<Error, Model::DescribeIncrementBackupListResult> DescribeIncrementBackupListOutcome;
 			typedef std::future<DescribeIncrementBackupListOutcome> DescribeIncrementBackupListOutcomeCallable;
 			typedef std::function<void(const DbsClient*, const Model::DescribeIncrementBackupListRequest&, const DescribeIncrementBackupListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeIncrementBackupListAsyncHandler;
@@ -71,6 +78,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::DescribeFullBackupListResult> DescribeFullBackupListOutcome;
 			typedef std::future<DescribeFullBackupListOutcome> DescribeFullBackupListOutcomeCallable;
 			typedef std::function<void(const DbsClient*, const Model::DescribeFullBackupListRequest&, const DescribeFullBackupListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeFullBackupListAsyncHandler;
+			typedef Outcome<Error, Model::StartRestoreTaskResult> StartRestoreTaskOutcome;
+			typedef std::future<StartRestoreTaskOutcome> StartRestoreTaskOutcomeCallable;
+			typedef std::function<void(const DbsClient*, const Model::StartRestoreTaskRequest&, const StartRestoreTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartRestoreTaskAsyncHandler;
 
 			DbsClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			DbsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -91,6 +101,9 @@ namespace AlibabaCloud
 			DescribeBackupGatewayListOutcome describeBackupGatewayList(const Model::DescribeBackupGatewayListRequest &request)const;
 			void describeBackupGatewayListAsync(const Model::DescribeBackupGatewayListRequest& request, const DescribeBackupGatewayListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeBackupGatewayListOutcomeCallable describeBackupGatewayListCallable(const Model::DescribeBackupGatewayListRequest& request) const;
+			CreateRestoreTaskOutcome createRestoreTask(const Model::CreateRestoreTaskRequest &request)const;
+			void createRestoreTaskAsync(const Model::CreateRestoreTaskRequest& request, const CreateRestoreTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			CreateRestoreTaskOutcomeCallable createRestoreTaskCallable(const Model::CreateRestoreTaskRequest& request) const;
 			DescribeIncrementBackupListOutcome describeIncrementBackupList(const Model::DescribeIncrementBackupListRequest &request)const;
 			void describeIncrementBackupListAsync(const Model::DescribeIncrementBackupListRequest& request, const DescribeIncrementBackupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeIncrementBackupListOutcomeCallable describeIncrementBackupListCallable(const Model::DescribeIncrementBackupListRequest& request) const;
@@ -100,6 +113,9 @@ namespace AlibabaCloud
 			DescribeFullBackupListOutcome describeFullBackupList(const Model::DescribeFullBackupListRequest &request)const;
 			void describeFullBackupListAsync(const Model::DescribeFullBackupListRequest& request, const DescribeFullBackupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeFullBackupListOutcomeCallable describeFullBackupListCallable(const Model::DescribeFullBackupListRequest& request) const;
+			StartRestoreTaskOutcome startRestoreTask(const Model::StartRestoreTaskRequest &request)const;
+			void startRestoreTaskAsync(const Model::StartRestoreTaskRequest& request, const StartRestoreTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			StartRestoreTaskOutcomeCallable startRestoreTaskCallable(const Model::StartRestoreTaskRequest& request) const;
 	
 		private:
 			std::shared_ptr<EndpointProvider> endpointProvider_;

+ 102 - 0
dbs/include/alibabacloud/dbs/model/CreateRestoreTaskRequest.h

@@ -0,0 +1,102 @@
+/*
+ * 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_DBS_MODEL_CREATERESTORETASKREQUEST_H_
+#define ALIBABACLOUD_DBS_MODEL_CREATERESTORETASKREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/dbs/DbsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Dbs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DBS_EXPORT CreateRestoreTaskRequest : public RpcServiceRequest
+			{
+
+			public:
+				CreateRestoreTaskRequest();
+				~CreateRestoreTaskRequest();
+
+				long getBackupGatewayId()const;
+				void setBackupGatewayId(long backupGatewayId);
+				std::string getDestinationEndpointOracleSID()const;
+				void setDestinationEndpointOracleSID(const std::string& destinationEndpointOracleSID);
+				long getRestoreTime()const;
+				void setRestoreTime(long restoreTime);
+				std::string getDestinationEndpointInstanceType()const;
+				void setDestinationEndpointInstanceType(const std::string& destinationEndpointInstanceType);
+				std::string getClientToken()const;
+				void setClientToken(const std::string& clientToken);
+				std::string getDestinationEndpointInstanceID()const;
+				void setDestinationEndpointInstanceID(const std::string& destinationEndpointInstanceID);
+				int getDestinationEndpointPort()const;
+				void setDestinationEndpointPort(int destinationEndpointPort);
+				std::string getBackupPlanId()const;
+				void setBackupPlanId(const std::string& backupPlanId);
+				std::string getBackupSetId()const;
+				void setBackupSetId(const std::string& backupSetId);
+				std::string getOwnerId()const;
+				void setOwnerId(const std::string& ownerId);
+				std::string getDestinationEndpointRegion()const;
+				void setDestinationEndpointRegion(const std::string& destinationEndpointRegion);
+				std::string getRestoreDir()const;
+				void setRestoreDir(const std::string& restoreDir);
+				std::string getDestinationEndpointIP()const;
+				void setDestinationEndpointIP(const std::string& destinationEndpointIP);
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getDestinationEndpointDatabaseName()const;
+				void setDestinationEndpointDatabaseName(const std::string& destinationEndpointDatabaseName);
+				std::string getDestinationEndpointUserName()const;
+				void setDestinationEndpointUserName(const std::string& destinationEndpointUserName);
+				std::string getRestoreObjects()const;
+				void setRestoreObjects(const std::string& restoreObjects);
+				std::string getRestoreTaskName()const;
+				void setRestoreTaskName(const std::string& restoreTaskName);
+				std::string getDestinationEndpointPassword()const;
+				void setDestinationEndpointPassword(const std::string& destinationEndpointPassword);
+
+            private:
+				long backupGatewayId_;
+				std::string destinationEndpointOracleSID_;
+				long restoreTime_;
+				std::string destinationEndpointInstanceType_;
+				std::string clientToken_;
+				std::string destinationEndpointInstanceID_;
+				int destinationEndpointPort_;
+				std::string backupPlanId_;
+				std::string backupSetId_;
+				std::string ownerId_;
+				std::string destinationEndpointRegion_;
+				std::string restoreDir_;
+				std::string destinationEndpointIP_;
+				std::string regionId_;
+				std::string destinationEndpointDatabaseName_;
+				std::string destinationEndpointUserName_;
+				std::string restoreObjects_;
+				std::string restoreTaskName_;
+				std::string destinationEndpointPassword_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_DBS_MODEL_CREATERESTORETASKREQUEST_H_

+ 59 - 0
dbs/include/alibabacloud/dbs/model/CreateRestoreTaskResult.h

@@ -0,0 +1,59 @@
+/*
+ * 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_DBS_MODEL_CREATERESTORETASKRESULT_H_
+#define ALIBABACLOUD_DBS_MODEL_CREATERESTORETASKRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/dbs/DbsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Dbs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DBS_EXPORT CreateRestoreTaskResult : public ServiceResult
+			{
+			public:
+
+
+				CreateRestoreTaskResult();
+				explicit CreateRestoreTaskResult(const std::string &payload);
+				~CreateRestoreTaskResult();
+				std::string getRestoreTaskId()const;
+				int getHttpStatusCode()const;
+				std::string getErrMessage()const;
+				bool getSuccess()const;
+				std::string getErrCode()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string restoreTaskId_;
+				int httpStatusCode_;
+				std::string errMessage_;
+				bool success_;
+				std::string errCode_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_DBS_MODEL_CREATERESTORETASKRESULT_H_

+ 57 - 0
dbs/include/alibabacloud/dbs/model/StartRestoreTaskRequest.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_DBS_MODEL_STARTRESTORETASKREQUEST_H_
+#define ALIBABACLOUD_DBS_MODEL_STARTRESTORETASKREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/dbs/DbsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Dbs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DBS_EXPORT StartRestoreTaskRequest : public RpcServiceRequest
+			{
+
+			public:
+				StartRestoreTaskRequest();
+				~StartRestoreTaskRequest();
+
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getClientToken()const;
+				void setClientToken(const std::string& clientToken);
+				std::string getRestoreTaskId()const;
+				void setRestoreTaskId(const std::string& restoreTaskId);
+				std::string getOwnerId()const;
+				void setOwnerId(const std::string& ownerId);
+
+            private:
+				std::string regionId_;
+				std::string clientToken_;
+				std::string restoreTaskId_;
+				std::string ownerId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_DBS_MODEL_STARTRESTORETASKREQUEST_H_

+ 59 - 0
dbs/include/alibabacloud/dbs/model/StartRestoreTaskResult.h

@@ -0,0 +1,59 @@
+/*
+ * 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_DBS_MODEL_STARTRESTORETASKRESULT_H_
+#define ALIBABACLOUD_DBS_MODEL_STARTRESTORETASKRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/dbs/DbsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Dbs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DBS_EXPORT StartRestoreTaskResult : public ServiceResult
+			{
+			public:
+
+
+				StartRestoreTaskResult();
+				explicit StartRestoreTaskResult(const std::string &payload);
+				~StartRestoreTaskResult();
+				std::string getRestoreTaskId()const;
+				int getHttpStatusCode()const;
+				std::string getErrMessage()const;
+				bool getSuccess()const;
+				std::string getErrCode()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string restoreTaskId_;
+				int httpStatusCode_;
+				std::string errMessage_;
+				bool success_;
+				std::string errCode_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_DBS_MODEL_STARTRESTORETASKRESULT_H_

+ 72 - 0
dbs/src/DbsClient.cc

@@ -231,6 +231,42 @@ DbsClient::DescribeBackupGatewayListOutcomeCallable DbsClient::describeBackupGat
 	return task->get_future();
 }
 
+DbsClient::CreateRestoreTaskOutcome DbsClient::createRestoreTask(const CreateRestoreTaskRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return CreateRestoreTaskOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return CreateRestoreTaskOutcome(CreateRestoreTaskResult(outcome.result()));
+	else
+		return CreateRestoreTaskOutcome(outcome.error());
+}
+
+void DbsClient::createRestoreTaskAsync(const CreateRestoreTaskRequest& request, const CreateRestoreTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, createRestoreTask(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+DbsClient::CreateRestoreTaskOutcomeCallable DbsClient::createRestoreTaskCallable(const CreateRestoreTaskRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<CreateRestoreTaskOutcome()>>(
+			[this, request]()
+			{
+			return this->createRestoreTask(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 DbsClient::DescribeIncrementBackupListOutcome DbsClient::describeIncrementBackupList(const DescribeIncrementBackupListRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -339,3 +375,39 @@ DbsClient::DescribeFullBackupListOutcomeCallable DbsClient::describeFullBackupLi
 	return task->get_future();
 }
 
+DbsClient::StartRestoreTaskOutcome DbsClient::startRestoreTask(const StartRestoreTaskRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return StartRestoreTaskOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return StartRestoreTaskOutcome(StartRestoreTaskResult(outcome.result()));
+	else
+		return StartRestoreTaskOutcome(outcome.error());
+}
+
+void DbsClient::startRestoreTaskAsync(const StartRestoreTaskRequest& request, const StartRestoreTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, startRestoreTask(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+DbsClient::StartRestoreTaskOutcomeCallable DbsClient::startRestoreTaskCallable(const StartRestoreTaskRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<StartRestoreTaskOutcome()>>(
+			[this, request]()
+			{
+			return this->startRestoreTask(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+

+ 236 - 0
dbs/src/model/CreateRestoreTaskRequest.cc

@@ -0,0 +1,236 @@
+/*
+ * 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/dbs/model/CreateRestoreTaskRequest.h>
+
+using AlibabaCloud::Dbs::Model::CreateRestoreTaskRequest;
+
+CreateRestoreTaskRequest::CreateRestoreTaskRequest() :
+	RpcServiceRequest("dbs", "2019-03-06", "CreateRestoreTask")
+{}
+
+CreateRestoreTaskRequest::~CreateRestoreTaskRequest()
+{}
+
+long CreateRestoreTaskRequest::getBackupGatewayId()const
+{
+	return backupGatewayId_;
+}
+
+void CreateRestoreTaskRequest::setBackupGatewayId(long backupGatewayId)
+{
+	backupGatewayId_ = backupGatewayId;
+	setCoreParameter("BackupGatewayId", std::to_string(backupGatewayId));
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointOracleSID()const
+{
+	return destinationEndpointOracleSID_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointOracleSID(const std::string& destinationEndpointOracleSID)
+{
+	destinationEndpointOracleSID_ = destinationEndpointOracleSID;
+	setCoreParameter("DestinationEndpointOracleSID", destinationEndpointOracleSID);
+}
+
+long CreateRestoreTaskRequest::getRestoreTime()const
+{
+	return restoreTime_;
+}
+
+void CreateRestoreTaskRequest::setRestoreTime(long restoreTime)
+{
+	restoreTime_ = restoreTime;
+	setCoreParameter("RestoreTime", std::to_string(restoreTime));
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointInstanceType()const
+{
+	return destinationEndpointInstanceType_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointInstanceType(const std::string& destinationEndpointInstanceType)
+{
+	destinationEndpointInstanceType_ = destinationEndpointInstanceType;
+	setCoreParameter("DestinationEndpointInstanceType", destinationEndpointInstanceType);
+}
+
+std::string CreateRestoreTaskRequest::getClientToken()const
+{
+	return clientToken_;
+}
+
+void CreateRestoreTaskRequest::setClientToken(const std::string& clientToken)
+{
+	clientToken_ = clientToken;
+	setCoreParameter("ClientToken", clientToken);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointInstanceID()const
+{
+	return destinationEndpointInstanceID_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointInstanceID(const std::string& destinationEndpointInstanceID)
+{
+	destinationEndpointInstanceID_ = destinationEndpointInstanceID;
+	setCoreParameter("DestinationEndpointInstanceID", destinationEndpointInstanceID);
+}
+
+int CreateRestoreTaskRequest::getDestinationEndpointPort()const
+{
+	return destinationEndpointPort_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointPort(int destinationEndpointPort)
+{
+	destinationEndpointPort_ = destinationEndpointPort;
+	setCoreParameter("DestinationEndpointPort", std::to_string(destinationEndpointPort));
+}
+
+std::string CreateRestoreTaskRequest::getBackupPlanId()const
+{
+	return backupPlanId_;
+}
+
+void CreateRestoreTaskRequest::setBackupPlanId(const std::string& backupPlanId)
+{
+	backupPlanId_ = backupPlanId;
+	setCoreParameter("BackupPlanId", backupPlanId);
+}
+
+std::string CreateRestoreTaskRequest::getBackupSetId()const
+{
+	return backupSetId_;
+}
+
+void CreateRestoreTaskRequest::setBackupSetId(const std::string& backupSetId)
+{
+	backupSetId_ = backupSetId;
+	setCoreParameter("BackupSetId", backupSetId);
+}
+
+std::string CreateRestoreTaskRequest::getOwnerId()const
+{
+	return ownerId_;
+}
+
+void CreateRestoreTaskRequest::setOwnerId(const std::string& ownerId)
+{
+	ownerId_ = ownerId;
+	setCoreParameter("OwnerId", ownerId);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointRegion()const
+{
+	return destinationEndpointRegion_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointRegion(const std::string& destinationEndpointRegion)
+{
+	destinationEndpointRegion_ = destinationEndpointRegion;
+	setCoreParameter("DestinationEndpointRegion", destinationEndpointRegion);
+}
+
+std::string CreateRestoreTaskRequest::getRestoreDir()const
+{
+	return restoreDir_;
+}
+
+void CreateRestoreTaskRequest::setRestoreDir(const std::string& restoreDir)
+{
+	restoreDir_ = restoreDir;
+	setCoreParameter("RestoreDir", restoreDir);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointIP()const
+{
+	return destinationEndpointIP_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointIP(const std::string& destinationEndpointIP)
+{
+	destinationEndpointIP_ = destinationEndpointIP;
+	setCoreParameter("DestinationEndpointIP", destinationEndpointIP);
+}
+
+std::string CreateRestoreTaskRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void CreateRestoreTaskRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setCoreParameter("RegionId", regionId);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointDatabaseName()const
+{
+	return destinationEndpointDatabaseName_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointDatabaseName(const std::string& destinationEndpointDatabaseName)
+{
+	destinationEndpointDatabaseName_ = destinationEndpointDatabaseName;
+	setCoreParameter("DestinationEndpointDatabaseName", destinationEndpointDatabaseName);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointUserName()const
+{
+	return destinationEndpointUserName_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointUserName(const std::string& destinationEndpointUserName)
+{
+	destinationEndpointUserName_ = destinationEndpointUserName;
+	setCoreParameter("DestinationEndpointUserName", destinationEndpointUserName);
+}
+
+std::string CreateRestoreTaskRequest::getRestoreObjects()const
+{
+	return restoreObjects_;
+}
+
+void CreateRestoreTaskRequest::setRestoreObjects(const std::string& restoreObjects)
+{
+	restoreObjects_ = restoreObjects;
+	setCoreParameter("RestoreObjects", restoreObjects);
+}
+
+std::string CreateRestoreTaskRequest::getRestoreTaskName()const
+{
+	return restoreTaskName_;
+}
+
+void CreateRestoreTaskRequest::setRestoreTaskName(const std::string& restoreTaskName)
+{
+	restoreTaskName_ = restoreTaskName;
+	setCoreParameter("RestoreTaskName", restoreTaskName);
+}
+
+std::string CreateRestoreTaskRequest::getDestinationEndpointPassword()const
+{
+	return destinationEndpointPassword_;
+}
+
+void CreateRestoreTaskRequest::setDestinationEndpointPassword(const std::string& destinationEndpointPassword)
+{
+	destinationEndpointPassword_ = destinationEndpointPassword;
+	setCoreParameter("DestinationEndpointPassword", destinationEndpointPassword);
+}
+

+ 80 - 0
dbs/src/model/CreateRestoreTaskResult.cc

@@ -0,0 +1,80 @@
+/*
+ * 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/dbs/model/CreateRestoreTaskResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Dbs;
+using namespace AlibabaCloud::Dbs::Model;
+
+CreateRestoreTaskResult::CreateRestoreTaskResult() :
+	ServiceResult()
+{}
+
+CreateRestoreTaskResult::CreateRestoreTaskResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+CreateRestoreTaskResult::~CreateRestoreTaskResult()
+{}
+
+void CreateRestoreTaskResult::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["ErrCode"].isNull())
+		errCode_ = value["ErrCode"].asString();
+	if(!value["ErrMessage"].isNull())
+		errMessage_ = value["ErrMessage"].asString();
+	if(!value["HttpStatusCode"].isNull())
+		httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
+	if(!value["RestoreTaskId"].isNull())
+		restoreTaskId_ = value["RestoreTaskId"].asString();
+
+}
+
+std::string CreateRestoreTaskResult::getRestoreTaskId()const
+{
+	return restoreTaskId_;
+}
+
+int CreateRestoreTaskResult::getHttpStatusCode()const
+{
+	return httpStatusCode_;
+}
+
+std::string CreateRestoreTaskResult::getErrMessage()const
+{
+	return errMessage_;
+}
+
+bool CreateRestoreTaskResult::getSuccess()const
+{
+	return success_;
+}
+
+std::string CreateRestoreTaskResult::getErrCode()const
+{
+	return errCode_;
+}
+

+ 71 - 0
dbs/src/model/StartRestoreTaskRequest.cc

@@ -0,0 +1,71 @@
+/*
+ * 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/dbs/model/StartRestoreTaskRequest.h>
+
+using AlibabaCloud::Dbs::Model::StartRestoreTaskRequest;
+
+StartRestoreTaskRequest::StartRestoreTaskRequest() :
+	RpcServiceRequest("dbs", "2019-03-06", "StartRestoreTask")
+{}
+
+StartRestoreTaskRequest::~StartRestoreTaskRequest()
+{}
+
+std::string StartRestoreTaskRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void StartRestoreTaskRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setCoreParameter("RegionId", regionId);
+}
+
+std::string StartRestoreTaskRequest::getClientToken()const
+{
+	return clientToken_;
+}
+
+void StartRestoreTaskRequest::setClientToken(const std::string& clientToken)
+{
+	clientToken_ = clientToken;
+	setCoreParameter("ClientToken", clientToken);
+}
+
+std::string StartRestoreTaskRequest::getRestoreTaskId()const
+{
+	return restoreTaskId_;
+}
+
+void StartRestoreTaskRequest::setRestoreTaskId(const std::string& restoreTaskId)
+{
+	restoreTaskId_ = restoreTaskId;
+	setCoreParameter("RestoreTaskId", restoreTaskId);
+}
+
+std::string StartRestoreTaskRequest::getOwnerId()const
+{
+	return ownerId_;
+}
+
+void StartRestoreTaskRequest::setOwnerId(const std::string& ownerId)
+{
+	ownerId_ = ownerId;
+	setCoreParameter("OwnerId", ownerId);
+}
+

+ 80 - 0
dbs/src/model/StartRestoreTaskResult.cc

@@ -0,0 +1,80 @@
+/*
+ * 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/dbs/model/StartRestoreTaskResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Dbs;
+using namespace AlibabaCloud::Dbs::Model;
+
+StartRestoreTaskResult::StartRestoreTaskResult() :
+	ServiceResult()
+{}
+
+StartRestoreTaskResult::StartRestoreTaskResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+StartRestoreTaskResult::~StartRestoreTaskResult()
+{}
+
+void StartRestoreTaskResult::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["ErrCode"].isNull())
+		errCode_ = value["ErrCode"].asString();
+	if(!value["ErrMessage"].isNull())
+		errMessage_ = value["ErrMessage"].asString();
+	if(!value["HttpStatusCode"].isNull())
+		httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
+	if(!value["RestoreTaskId"].isNull())
+		restoreTaskId_ = value["RestoreTaskId"].asString();
+
+}
+
+std::string StartRestoreTaskResult::getRestoreTaskId()const
+{
+	return restoreTaskId_;
+}
+
+int StartRestoreTaskResult::getHttpStatusCode()const
+{
+	return httpStatusCode_;
+}
+
+std::string StartRestoreTaskResult::getErrMessage()const
+{
+	return errMessage_;
+}
+
+bool StartRestoreTaskResult::getSuccess()const
+{
+	return success_;
+}
+
+std::string StartRestoreTaskResult::getErrCode()const
+{
+	return errCode_;
+}
+