From 3293c5bfceb699c7e7a7d44dd60219909ffa82d9 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 8 Mar 2021 12:03:04 +0000 Subject: [PATCH] Update CreateAndStartBackupPlan Response with createBackupSet. --- CHANGELOG | 3 + dbs/CMakeLists.txt | 4 - dbs/include/alibabacloud/dbs/DbsClient.h | 8 -- .../model/CreateAndStartBackupPlanResult.h | 2 + .../dbs/model/DescribeSandboxFromRDSRequest.h | 54 ------- .../dbs/model/DescribeSandboxFromRDSResult.h | 75 ---------- dbs/src/DbsClient.cc | 36 ----- .../model/CreateAndStartBackupPlanResult.cc | 7 + .../model/DescribeSandboxFromRDSRequest.cc | 62 -------- dbs/src/model/DescribeSandboxFromRDSResult.cc | 135 ------------------ 10 files changed, 12 insertions(+), 374 deletions(-) delete mode 100644 dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h delete mode 100644 dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h delete mode 100644 dbs/src/model/DescribeSandboxFromRDSRequest.cc delete mode 100644 dbs/src/model/DescribeSandboxFromRDSResult.cc diff --git a/CHANGELOG b/CHANGELOG index 81fc88cbe..10fefeb25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-03-08 Version: patch +- Update CreateAndStartBackupPlan Response with createBackupSet. + 2021-03-08 Version: patch - Generated 2020-05-18 for `dataworks-public`. diff --git a/dbs/CMakeLists.txt b/dbs/CMakeLists.txt index e6bcc8bd6..47056c225 100644 --- a/dbs/CMakeLists.txt +++ b/dbs/CMakeLists.txt @@ -65,8 +65,6 @@ set(dbs_public_header_model include/alibabacloud/dbs/model/DescribeRestoreRangeInfoResult.h include/alibabacloud/dbs/model/DescribeRestoreTaskListRequest.h include/alibabacloud/dbs/model/DescribeRestoreTaskListResult.h - include/alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h - include/alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h include/alibabacloud/dbs/model/DisableBackupLogRequest.h include/alibabacloud/dbs/model/DisableBackupLogResult.h include/alibabacloud/dbs/model/EnableBackupLogRequest.h @@ -146,8 +144,6 @@ set(dbs_src src/model/DescribeRestoreRangeInfoResult.cc src/model/DescribeRestoreTaskListRequest.cc src/model/DescribeRestoreTaskListResult.cc - src/model/DescribeSandboxFromRDSRequest.cc - src/model/DescribeSandboxFromRDSResult.cc src/model/DisableBackupLogRequest.cc src/model/DisableBackupLogResult.cc src/model/EnableBackupLogRequest.cc diff --git a/dbs/include/alibabacloud/dbs/DbsClient.h b/dbs/include/alibabacloud/dbs/DbsClient.h index 138662239..f333d6911 100644 --- a/dbs/include/alibabacloud/dbs/DbsClient.h +++ b/dbs/include/alibabacloud/dbs/DbsClient.h @@ -66,8 +66,6 @@ #include "model/DescribeRestoreRangeInfoResult.h" #include "model/DescribeRestoreTaskListRequest.h" #include "model/DescribeRestoreTaskListResult.h" -#include "model/DescribeSandboxFromRDSRequest.h" -#include "model/DescribeSandboxFromRDSResult.h" #include "model/DisableBackupLogRequest.h" #include "model/DisableBackupLogResult.h" #include "model/EnableBackupLogRequest.h" @@ -175,9 +173,6 @@ namespace AlibabaCloud typedef Outcome DescribeRestoreTaskListOutcome; typedef std::future DescribeRestoreTaskListOutcomeCallable; typedef std::function&)> DescribeRestoreTaskListAsyncHandler; - typedef Outcome DescribeSandboxFromRDSOutcome; - typedef std::future DescribeSandboxFromRDSOutcomeCallable; - typedef std::function&)> DescribeSandboxFromRDSAsyncHandler; typedef Outcome DisableBackupLogOutcome; typedef std::future DisableBackupLogOutcomeCallable; typedef std::function&)> DisableBackupLogAsyncHandler; @@ -297,9 +292,6 @@ namespace AlibabaCloud DescribeRestoreTaskListOutcome describeRestoreTaskList(const Model::DescribeRestoreTaskListRequest &request)const; void describeRestoreTaskListAsync(const Model::DescribeRestoreTaskListRequest& request, const DescribeRestoreTaskListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeRestoreTaskListOutcomeCallable describeRestoreTaskListCallable(const Model::DescribeRestoreTaskListRequest& request) const; - DescribeSandboxFromRDSOutcome describeSandboxFromRDS(const Model::DescribeSandboxFromRDSRequest &request)const; - void describeSandboxFromRDSAsync(const Model::DescribeSandboxFromRDSRequest& request, const DescribeSandboxFromRDSAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - DescribeSandboxFromRDSOutcomeCallable describeSandboxFromRDSCallable(const Model::DescribeSandboxFromRDSRequest& request) const; DisableBackupLogOutcome disableBackupLog(const Model::DisableBackupLogRequest &request)const; void disableBackupLogAsync(const Model::DisableBackupLogRequest& request, const DisableBackupLogAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DisableBackupLogOutcomeCallable disableBackupLogCallable(const Model::DisableBackupLogRequest& request) const; diff --git a/dbs/include/alibabacloud/dbs/model/CreateAndStartBackupPlanResult.h b/dbs/include/alibabacloud/dbs/model/CreateAndStartBackupPlanResult.h index ecda44867..0052aff88 100644 --- a/dbs/include/alibabacloud/dbs/model/CreateAndStartBackupPlanResult.h +++ b/dbs/include/alibabacloud/dbs/model/CreateAndStartBackupPlanResult.h @@ -37,6 +37,7 @@ namespace AlibabaCloud CreateAndStartBackupPlanResult(); explicit CreateAndStartBackupPlanResult(const std::string &payload); ~CreateAndStartBackupPlanResult(); + bool getCreateBackupSet()const; int getHttpStatusCode()const; std::string getBackupPlanId()const; std::string getErrMessage()const; @@ -47,6 +48,7 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: + bool createBackupSet_; int httpStatusCode_; std::string backupPlanId_; std::string errMessage_; diff --git a/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h b/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h deleted file mode 100644 index 36f22e9dc..000000000 --- a/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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_DESCRIBESANDBOXFROMRDSREQUEST_H_ -#define ALIBABACLOUD_DBS_MODEL_DESCRIBESANDBOXFROMRDSREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Dbs - { - namespace Model - { - class ALIBABACLOUD_DBS_EXPORT DescribeSandboxFromRDSRequest : public RpcServiceRequest - { - - public: - DescribeSandboxFromRDSRequest(); - ~DescribeSandboxFromRDSRequest(); - - std::string getClientToken()const; - void setClientToken(const std::string& clientToken); - std::string getRdsInstanceID()const; - void setRdsInstanceID(const std::string& rdsInstanceID); - std::string getOwnerId()const; - void setOwnerId(const std::string& ownerId); - - private: - std::string clientToken_; - std::string rdsInstanceID_; - std::string ownerId_; - - }; - } - } -} -#endif // !ALIBABACLOUD_DBS_MODEL_DESCRIBESANDBOXFROMRDSREQUEST_H_ \ No newline at end of file diff --git a/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h b/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h deleted file mode 100644 index 143e8f961..000000000 --- a/dbs/include/alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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_DESCRIBESANDBOXFROMRDSRESULT_H_ -#define ALIBABACLOUD_DBS_MODEL_DESCRIBESANDBOXFROMRDSRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Dbs - { - namespace Model - { - class ALIBABACLOUD_DBS_EXPORT DescribeSandboxFromRDSResult : public ServiceResult - { - public: - - - DescribeSandboxFromRDSResult(); - explicit DescribeSandboxFromRDSResult(const std::string &payload); - ~DescribeSandboxFromRDSResult(); - std::string getBackupPlanName()const; - std::string getDbsInstanceId()const; - std::string getSourceId()const; - bool getSupportSandbox()const; - long getSandboxRecoverEndTime()const; - std::string getErrMessage()const; - bool getSuccess()const; - std::string getErrCode()const; - bool getEnabledSandbox()const; - long getSandboxRecoverStartTime()const; - int getHttpStatusCode()const; - std::string getBackupLog()const; - int getSandboxInstanceCount()const; - - protected: - void parse(const std::string &payload); - private: - std::string backupPlanName_; - std::string dbsInstanceId_; - std::string sourceId_; - bool supportSandbox_; - long sandboxRecoverEndTime_; - std::string errMessage_; - bool success_; - std::string errCode_; - bool enabledSandbox_; - long sandboxRecoverStartTime_; - int httpStatusCode_; - std::string backupLog_; - int sandboxInstanceCount_; - - }; - } - } -} -#endif // !ALIBABACLOUD_DBS_MODEL_DESCRIBESANDBOXFROMRDSRESULT_H_ \ No newline at end of file diff --git a/dbs/src/DbsClient.cc b/dbs/src/DbsClient.cc index 9abcd4666..1bef7e90f 100644 --- a/dbs/src/DbsClient.cc +++ b/dbs/src/DbsClient.cc @@ -843,42 +843,6 @@ DbsClient::DescribeRestoreTaskListOutcomeCallable DbsClient::describeRestoreTask return task->get_future(); } -DbsClient::DescribeSandboxFromRDSOutcome DbsClient::describeSandboxFromRDS(const DescribeSandboxFromRDSRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return DescribeSandboxFromRDSOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return DescribeSandboxFromRDSOutcome(DescribeSandboxFromRDSResult(outcome.result())); - else - return DescribeSandboxFromRDSOutcome(outcome.error()); -} - -void DbsClient::describeSandboxFromRDSAsync(const DescribeSandboxFromRDSRequest& request, const DescribeSandboxFromRDSAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, describeSandboxFromRDS(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -DbsClient::DescribeSandboxFromRDSOutcomeCallable DbsClient::describeSandboxFromRDSCallable(const DescribeSandboxFromRDSRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->describeSandboxFromRDS(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - DbsClient::DisableBackupLogOutcome DbsClient::disableBackupLog(const DisableBackupLogRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dbs/src/model/CreateAndStartBackupPlanResult.cc b/dbs/src/model/CreateAndStartBackupPlanResult.cc index 9e20abca5..10ebef0fe 100644 --- a/dbs/src/model/CreateAndStartBackupPlanResult.cc +++ b/dbs/src/model/CreateAndStartBackupPlanResult.cc @@ -49,11 +49,18 @@ void CreateAndStartBackupPlanResult::parse(const std::string &payload) httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString()); if(!value["BackupPlanId"].isNull()) backupPlanId_ = value["BackupPlanId"].asString(); + if(!value["CreateBackupSet"].isNull()) + createBackupSet_ = value["CreateBackupSet"].asString() == "true"; if(!value["OrderId"].isNull()) orderId_ = value["OrderId"].asString(); } +bool CreateAndStartBackupPlanResult::getCreateBackupSet()const +{ + return createBackupSet_; +} + int CreateAndStartBackupPlanResult::getHttpStatusCode()const { return httpStatusCode_; diff --git a/dbs/src/model/DescribeSandboxFromRDSRequest.cc b/dbs/src/model/DescribeSandboxFromRDSRequest.cc deleted file mode 100644 index 891e13110..000000000 --- a/dbs/src/model/DescribeSandboxFromRDSRequest.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 - -using AlibabaCloud::Dbs::Model::DescribeSandboxFromRDSRequest; - -DescribeSandboxFromRDSRequest::DescribeSandboxFromRDSRequest() : - RpcServiceRequest("dbs", "2019-03-06", "DescribeSandboxFromRDS") -{ - setMethod(HttpRequest::Method::Post); -} - -DescribeSandboxFromRDSRequest::~DescribeSandboxFromRDSRequest() -{} - -std::string DescribeSandboxFromRDSRequest::getClientToken()const -{ - return clientToken_; -} - -void DescribeSandboxFromRDSRequest::setClientToken(const std::string& clientToken) -{ - clientToken_ = clientToken; - setParameter("ClientToken", clientToken); -} - -std::string DescribeSandboxFromRDSRequest::getRdsInstanceID()const -{ - return rdsInstanceID_; -} - -void DescribeSandboxFromRDSRequest::setRdsInstanceID(const std::string& rdsInstanceID) -{ - rdsInstanceID_ = rdsInstanceID; - setParameter("RdsInstanceID", rdsInstanceID); -} - -std::string DescribeSandboxFromRDSRequest::getOwnerId()const -{ - return ownerId_; -} - -void DescribeSandboxFromRDSRequest::setOwnerId(const std::string& ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", ownerId); -} - diff --git a/dbs/src/model/DescribeSandboxFromRDSResult.cc b/dbs/src/model/DescribeSandboxFromRDSResult.cc deleted file mode 100644 index 8038b304d..000000000 --- a/dbs/src/model/DescribeSandboxFromRDSResult.cc +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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 -#include - -using namespace AlibabaCloud::Dbs; -using namespace AlibabaCloud::Dbs::Model; - -DescribeSandboxFromRDSResult::DescribeSandboxFromRDSResult() : - ServiceResult() -{} - -DescribeSandboxFromRDSResult::DescribeSandboxFromRDSResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -DescribeSandboxFromRDSResult::~DescribeSandboxFromRDSResult() -{} - -void DescribeSandboxFromRDSResult::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["SourceId"].isNull()) - sourceId_ = value["SourceId"].asString(); - if(!value["BackupPlanName"].isNull()) - backupPlanName_ = value["BackupPlanName"].asString(); - if(!value["BackupLog"].isNull()) - backupLog_ = value["BackupLog"].asString(); - if(!value["DbsInstanceId"].isNull()) - dbsInstanceId_ = value["DbsInstanceId"].asString(); - if(!value["SupportSandbox"].isNull()) - supportSandbox_ = value["SupportSandbox"].asString() == "true"; - if(!value["SandboxInstanceCount"].isNull()) - sandboxInstanceCount_ = std::stoi(value["SandboxInstanceCount"].asString()); - if(!value["SandboxRecoverStartTime"].isNull()) - sandboxRecoverStartTime_ = std::stol(value["SandboxRecoverStartTime"].asString()); - if(!value["SandboxRecoverEndTime"].isNull()) - sandboxRecoverEndTime_ = std::stol(value["SandboxRecoverEndTime"].asString()); - if(!value["EnabledSandbox"].isNull()) - enabledSandbox_ = value["EnabledSandbox"].asString() == "true"; - -} - -std::string DescribeSandboxFromRDSResult::getBackupPlanName()const -{ - return backupPlanName_; -} - -std::string DescribeSandboxFromRDSResult::getDbsInstanceId()const -{ - return dbsInstanceId_; -} - -std::string DescribeSandboxFromRDSResult::getSourceId()const -{ - return sourceId_; -} - -bool DescribeSandboxFromRDSResult::getSupportSandbox()const -{ - return supportSandbox_; -} - -long DescribeSandboxFromRDSResult::getSandboxRecoverEndTime()const -{ - return sandboxRecoverEndTime_; -} - -std::string DescribeSandboxFromRDSResult::getErrMessage()const -{ - return errMessage_; -} - -bool DescribeSandboxFromRDSResult::getSuccess()const -{ - return success_; -} - -std::string DescribeSandboxFromRDSResult::getErrCode()const -{ - return errCode_; -} - -bool DescribeSandboxFromRDSResult::getEnabledSandbox()const -{ - return enabledSandbox_; -} - -long DescribeSandboxFromRDSResult::getSandboxRecoverStartTime()const -{ - return sandboxRecoverStartTime_; -} - -int DescribeSandboxFromRDSResult::getHttpStatusCode()const -{ - return httpStatusCode_; -} - -std::string DescribeSandboxFromRDSResult::getBackupLog()const -{ - return backupLog_; -} - -int DescribeSandboxFromRDSResult::getSandboxInstanceCount()const -{ - return sandboxInstanceCount_; -} -