Update CreateAndStartBackupPlan Response with createBackupSet.

This commit is contained in:
sdk-team
2021-03-08 12:03:04 +00:00
parent a4e8a24f48
commit 3293c5bfce
10 changed files with 12 additions and 374 deletions

View File

@@ -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`.

View File

@@ -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

View File

@@ -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<Error, Model::DescribeRestoreTaskListResult> DescribeRestoreTaskListOutcome;
typedef std::future<DescribeRestoreTaskListOutcome> DescribeRestoreTaskListOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::DescribeRestoreTaskListRequest&, const DescribeRestoreTaskListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreTaskListAsyncHandler;
typedef Outcome<Error, Model::DescribeSandboxFromRDSResult> DescribeSandboxFromRDSOutcome;
typedef std::future<DescribeSandboxFromRDSOutcome> DescribeSandboxFromRDSOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::DescribeSandboxFromRDSRequest&, const DescribeSandboxFromRDSOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeSandboxFromRDSAsyncHandler;
typedef Outcome<Error, Model::DisableBackupLogResult> DisableBackupLogOutcome;
typedef std::future<DisableBackupLogOutcome> DisableBackupLogOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::DisableBackupLogRequest&, const DisableBackupLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
DisableBackupLogOutcomeCallable disableBackupLogCallable(const Model::DisableBackupLogRequest& request) const;

View File

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

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dbs/DbsExport.h>
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_

View File

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

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<DescribeSandboxFromRDSOutcome()>>(
[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();

View File

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

View File

@@ -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 <alibabacloud/dbs/model/DescribeSandboxFromRDSRequest.h>
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);
}

View File

@@ -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 <alibabacloud/dbs/model/DescribeSandboxFromRDSResult.h>
#include <json/json.h>
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_;
}