Modify CreateBackupPlan.

This commit is contained in:
sdk-team
2019-07-11 15:36:56 +08:00
parent d9d4b6f085
commit 79d7afefd8
33 changed files with 2136 additions and 150 deletions

View File

@@ -87,42 +87,6 @@ DbsClient::DescribeBackupPlanListOutcomeCallable DbsClient::describeBackupPlanLi
return task->get_future();
}
DbsClient::StopBackupPlanOutcome DbsClient::stopBackupPlan(const StopBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StopBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StopBackupPlanOutcome(StopBackupPlanResult(outcome.result()));
else
return StopBackupPlanOutcome(outcome.error());
}
void DbsClient::stopBackupPlanAsync(const StopBackupPlanRequest& request, const StopBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, stopBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::StopBackupPlanOutcomeCallable DbsClient::stopBackupPlanCallable(const StopBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StopBackupPlanOutcome()>>(
[this, request]()
{
return this->stopBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::CreateBackupPlanOutcome DbsClient::createBackupPlan(const CreateBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -195,6 +159,222 @@ DbsClient::StartBackupPlanOutcomeCallable DbsClient::startBackupPlanCallable(con
return task->get_future();
}
DbsClient::RenewBackupPlanOutcome DbsClient::renewBackupPlan(const RenewBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RenewBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RenewBackupPlanOutcome(RenewBackupPlanResult(outcome.result()));
else
return RenewBackupPlanOutcome(outcome.error());
}
void DbsClient::renewBackupPlanAsync(const RenewBackupPlanRequest& request, const RenewBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, renewBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::RenewBackupPlanOutcomeCallable DbsClient::renewBackupPlanCallable(const RenewBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RenewBackupPlanOutcome()>>(
[this, request]()
{
return this->renewBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::DescribeFullBackupListOutcome DbsClient::describeFullBackupList(const DescribeFullBackupListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeFullBackupListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeFullBackupListOutcome(DescribeFullBackupListResult(outcome.result()));
else
return DescribeFullBackupListOutcome(outcome.error());
}
void DbsClient::describeFullBackupListAsync(const DescribeFullBackupListRequest& request, const DescribeFullBackupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeFullBackupList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeFullBackupListOutcomeCallable DbsClient::describeFullBackupListCallable(const DescribeFullBackupListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeFullBackupListOutcome()>>(
[this, request]()
{
return this->describeFullBackupList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::DescribeRestoreTaskListOutcome DbsClient::describeRestoreTaskList(const DescribeRestoreTaskListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeRestoreTaskListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeRestoreTaskListOutcome(DescribeRestoreTaskListResult(outcome.result()));
else
return DescribeRestoreTaskListOutcome(outcome.error());
}
void DbsClient::describeRestoreTaskListAsync(const DescribeRestoreTaskListRequest& request, const DescribeRestoreTaskListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeRestoreTaskList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeRestoreTaskListOutcomeCallable DbsClient::describeRestoreTaskListCallable(const DescribeRestoreTaskListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeRestoreTaskListOutcome()>>(
[this, request]()
{
return this->describeRestoreTaskList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::ModifyBackupPlanNameOutcome DbsClient::modifyBackupPlanName(const ModifyBackupPlanNameRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyBackupPlanNameOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyBackupPlanNameOutcome(ModifyBackupPlanNameResult(outcome.result()));
else
return ModifyBackupPlanNameOutcome(outcome.error());
}
void DbsClient::modifyBackupPlanNameAsync(const ModifyBackupPlanNameRequest& request, const ModifyBackupPlanNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyBackupPlanName(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ModifyBackupPlanNameOutcomeCallable DbsClient::modifyBackupPlanNameCallable(const ModifyBackupPlanNameRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyBackupPlanNameOutcome()>>(
[this, request]()
{
return this->modifyBackupPlanName(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::StopBackupPlanOutcome DbsClient::stopBackupPlan(const StopBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StopBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StopBackupPlanOutcome(StopBackupPlanResult(outcome.result()));
else
return StopBackupPlanOutcome(outcome.error());
}
void DbsClient::stopBackupPlanAsync(const StopBackupPlanRequest& request, const StopBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, stopBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::StopBackupPlanOutcomeCallable DbsClient::stopBackupPlanCallable(const StopBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StopBackupPlanOutcome()>>(
[this, request]()
{
return this->stopBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::ModifyBackupSourceEndpointOutcome DbsClient::modifyBackupSourceEndpoint(const ModifyBackupSourceEndpointRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyBackupSourceEndpointOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyBackupSourceEndpointOutcome(ModifyBackupSourceEndpointResult(outcome.result()));
else
return ModifyBackupSourceEndpointOutcome(outcome.error());
}
void DbsClient::modifyBackupSourceEndpointAsync(const ModifyBackupSourceEndpointRequest& request, const ModifyBackupSourceEndpointAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyBackupSourceEndpoint(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ModifyBackupSourceEndpointOutcomeCallable DbsClient::modifyBackupSourceEndpointCallable(const ModifyBackupSourceEndpointRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyBackupSourceEndpointOutcome()>>(
[this, request]()
{
return this->modifyBackupSourceEndpoint(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::DescribeBackupGatewayListOutcome DbsClient::describeBackupGatewayList(const DescribeBackupGatewayListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,6 +411,42 @@ DbsClient::DescribeBackupGatewayListOutcomeCallable DbsClient::describeBackupGat
return task->get_future();
}
DbsClient::ModifyBackupObjectsOutcome DbsClient::modifyBackupObjects(const ModifyBackupObjectsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyBackupObjectsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyBackupObjectsOutcome(ModifyBackupObjectsResult(outcome.result()));
else
return ModifyBackupObjectsOutcome(outcome.error());
}
void DbsClient::modifyBackupObjectsAsync(const ModifyBackupObjectsRequest& request, const ModifyBackupObjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyBackupObjects(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ModifyBackupObjectsOutcomeCallable DbsClient::modifyBackupObjectsCallable(const ModifyBackupObjectsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyBackupObjectsOutcome()>>(
[this, request]()
{
return this->modifyBackupObjects(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::CreateRestoreTaskOutcome DbsClient::createRestoreTask(const CreateRestoreTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -339,36 +555,36 @@ DbsClient::ConfigureBackupPlanOutcomeCallable DbsClient::configureBackupPlanCall
return task->get_future();
}
DbsClient::DescribeFullBackupListOutcome DbsClient::describeFullBackupList(const DescribeFullBackupListRequest &request) const
DbsClient::ModifyBackupStrategyOutcome DbsClient::modifyBackupStrategy(const ModifyBackupStrategyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeFullBackupListOutcome(endpointOutcome.error());
return ModifyBackupStrategyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeFullBackupListOutcome(DescribeFullBackupListResult(outcome.result()));
return ModifyBackupStrategyOutcome(ModifyBackupStrategyResult(outcome.result()));
else
return DescribeFullBackupListOutcome(outcome.error());
return ModifyBackupStrategyOutcome(outcome.error());
}
void DbsClient::describeFullBackupListAsync(const DescribeFullBackupListRequest& request, const DescribeFullBackupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
void DbsClient::modifyBackupStrategyAsync(const ModifyBackupStrategyRequest& request, const ModifyBackupStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeFullBackupList(request), context);
handler(this, request, modifyBackupStrategy(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeFullBackupListOutcomeCallable DbsClient::describeFullBackupListCallable(const DescribeFullBackupListRequest &request) const
DbsClient::ModifyBackupStrategyOutcomeCallable DbsClient::modifyBackupStrategyCallable(const ModifyBackupStrategyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeFullBackupListOutcome()>>(
auto task = std::make_shared<std::packaged_task<ModifyBackupStrategyOutcome()>>(
[this, request]()
{
return this->describeFullBackupList(request);
return this->modifyBackupStrategy(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
@@ -447,39 +663,3 @@ DbsClient::DescribeNodeCidrListOutcomeCallable DbsClient::describeNodeCidrListCa
return task->get_future();
}
DbsClient::DescribeRestoreTaskListOutcome DbsClient::describeRestoreTaskList(const DescribeRestoreTaskListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeRestoreTaskListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeRestoreTaskListOutcome(DescribeRestoreTaskListResult(outcome.result()));
else
return DescribeRestoreTaskListOutcome(outcome.error());
}
void DbsClient::describeRestoreTaskListAsync(const DescribeRestoreTaskListRequest& request, const DescribeRestoreTaskListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeRestoreTaskList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeRestoreTaskListOutcomeCallable DbsClient::describeRestoreTaskListCallable(const DescribeRestoreTaskListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeRestoreTaskListOutcome()>>(
[this, request]()
{
return this->describeRestoreTaskList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -25,17 +25,6 @@ CreateBackupPlanRequest::CreateBackupPlanRequest() :
CreateBackupPlanRequest::~CreateBackupPlanRequest()
{}
std::string CreateBackupPlanRequest::getBackupMethod()const
{
return backupMethod_;
}
void CreateBackupPlanRequest::setBackupMethod(const std::string& backupMethod)
{
backupMethod_ = backupMethod;
setCoreParameter("BackupMethod", backupMethod);
}
std::string CreateBackupPlanRequest::getDatabaseType()const
{
return databaseType_;
@@ -58,17 +47,6 @@ void CreateBackupPlanRequest::setPeriod(const std::string& period)
setCoreParameter("Period", period);
}
std::string CreateBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void CreateBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string CreateBackupPlanRequest::getClientToken()const
{
return clientToken_;
@@ -80,17 +58,6 @@ void CreateBackupPlanRequest::setClientToken(const std::string& clientToken)
setCoreParameter("ClientToken", clientToken);
}
std::string CreateBackupPlanRequest::getRegion()const
{
return region_;
}
void CreateBackupPlanRequest::setRegion(const std::string& region)
{
region_ = region;
setCoreParameter("Region", region);
}
std::string CreateBackupPlanRequest::getOwnerId()const
{
return ownerId_;
@@ -124,3 +91,91 @@ void CreateBackupPlanRequest::setInstanceClass(const std::string& instanceClass)
setCoreParameter("InstanceClass", instanceClass);
}
std::string CreateBackupPlanRequest::getStorageType()const
{
return storageType_;
}
void CreateBackupPlanRequest::setStorageType(const std::string& storageType)
{
storageType_ = storageType;
setCoreParameter("StorageType", storageType);
}
std::string CreateBackupPlanRequest::getBackupMethod()const
{
return backupMethod_;
}
void CreateBackupPlanRequest::setBackupMethod(const std::string& backupMethod)
{
backupMethod_ = backupMethod;
setCoreParameter("BackupMethod", backupMethod);
}
std::string CreateBackupPlanRequest::getDatabaseRegion()const
{
return databaseRegion_;
}
void CreateBackupPlanRequest::setDatabaseRegion(const std::string& databaseRegion)
{
databaseRegion_ = databaseRegion;
setCoreParameter("DatabaseRegion", databaseRegion);
}
std::string CreateBackupPlanRequest::getStorageRegion()const
{
return storageRegion_;
}
void CreateBackupPlanRequest::setStorageRegion(const std::string& storageRegion)
{
storageRegion_ = storageRegion;
setCoreParameter("StorageRegion", storageRegion);
}
std::string CreateBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void CreateBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string CreateBackupPlanRequest::getInstanceType()const
{
return instanceType_;
}
void CreateBackupPlanRequest::setInstanceType(const std::string& instanceType)
{
instanceType_ = instanceType;
setCoreParameter("InstanceType", instanceType);
}
std::string CreateBackupPlanRequest::getRegion()const
{
return region_;
}
void CreateBackupPlanRequest::setRegion(const std::string& region)
{
region_ = region;
setCoreParameter("Region", region);
}
std::string CreateBackupPlanRequest::getPayType()const
{
return payType_;
}
void CreateBackupPlanRequest::setPayType(const std::string& payType)
{
payType_ = payType;
setCoreParameter("PayType", payType);
}

View File

@@ -223,6 +223,17 @@ void CreateRestoreTaskRequest::setRestoreTaskName(const std::string& restoreTask
setCoreParameter("RestoreTaskName", restoreTaskName);
}
std::string CreateRestoreTaskRequest::getDuplicateConflict()const
{
return duplicateConflict_;
}
void CreateRestoreTaskRequest::setDuplicateConflict(const std::string& duplicateConflict)
{
duplicateConflict_ = duplicateConflict;
setCoreParameter("DuplicateConflict", duplicateConflict);
}
std::string CreateRestoreTaskRequest::getDestinationEndpointPassword()const
{
return destinationEndpointPassword_;

View File

@@ -60,6 +60,10 @@ void DescribeFullBackupListResult::parse(const std::string &payload)
itemsObject.backupSize = std::stol(value["BackupSize"].asString());
if(!value["StorageMethod"].isNull())
itemsObject.storageMethod = value["StorageMethod"].asString();
if(!value["ErrMessage"].isNull())
itemsObject.errMessage = value["ErrMessage"].asString();
if(!value["BackupObjects"].isNull())
itemsObject.backupObjects = value["BackupObjects"].asString();
items_.push_back(itemsObject);
}
if(!value["Success"].isNull())

View File

@@ -74,6 +74,8 @@ void DescribeRestoreTaskListResult::parse(const std::string &payload)
itemsObject.restoreTime = std::stol(value["RestoreTime"].asString());
if(!value["RestoreTaskCreateTime"].isNull())
itemsObject.restoreTaskCreateTime = std::stol(value["RestoreTaskCreateTime"].asString());
if(!value["RestoreTaskFinishTime"].isNull())
itemsObject.restoreTaskFinishTime = std::stol(value["RestoreTaskFinishTime"].asString());
if(!value["RestoreStatus"].isNull())
itemsObject.restoreStatus = value["RestoreStatus"].asString();
if(!value["RestoreTaskId"].isNull())
@@ -86,6 +88,8 @@ void DescribeRestoreTaskListResult::parse(const std::string &payload)
itemsObject.continuousRestoreProgress = std::stoi(value["ContinuousRestoreProgress"].asString());
if(!value["FullStruAfterRestoreProgress"].isNull())
itemsObject.fullStruAfterRestoreProgress = std::stoi(value["FullStruAfterRestoreProgress"].asString());
if(!value["ErrMessage"].isNull())
itemsObject.errMessage = value["ErrMessage"].asString();
items_.push_back(itemsObject);
}
if(!value["Success"].isNull())

View File

@@ -0,0 +1,82 @@
/*
* 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/ModifyBackupObjectsRequest.h>
using AlibabaCloud::Dbs::Model::ModifyBackupObjectsRequest;
ModifyBackupObjectsRequest::ModifyBackupObjectsRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ModifyBackupObjects")
{}
ModifyBackupObjectsRequest::~ModifyBackupObjectsRequest()
{}
std::string ModifyBackupObjectsRequest::getRegionId()const
{
return regionId_;
}
void ModifyBackupObjectsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ModifyBackupObjectsRequest::getClientToken()const
{
return clientToken_;
}
void ModifyBackupObjectsRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string ModifyBackupObjectsRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ModifyBackupObjectsRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string ModifyBackupObjectsRequest::getBackupObjects()const
{
return backupObjects_;
}
void ModifyBackupObjectsRequest::setBackupObjects(const std::string& backupObjects)
{
backupObjects_ = backupObjects;
setCoreParameter("BackupObjects", backupObjects);
}
std::string ModifyBackupObjectsRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyBackupObjectsRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/ModifyBackupObjectsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ModifyBackupObjectsResult::ModifyBackupObjectsResult() :
ServiceResult()
{}
ModifyBackupObjectsResult::ModifyBackupObjectsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyBackupObjectsResult::~ModifyBackupObjectsResult()
{}
void ModifyBackupObjectsResult::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["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int ModifyBackupObjectsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ModifyBackupObjectsResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool ModifyBackupObjectsResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string ModifyBackupObjectsResult::getErrMessage()const
{
return errMessage_;
}
bool ModifyBackupObjectsResult::getSuccess()const
{
return success_;
}
std::string ModifyBackupObjectsResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/ModifyBackupPlanNameRequest.h>
using AlibabaCloud::Dbs::Model::ModifyBackupPlanNameRequest;
ModifyBackupPlanNameRequest::ModifyBackupPlanNameRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ModifyBackupPlanName")
{}
ModifyBackupPlanNameRequest::~ModifyBackupPlanNameRequest()
{}
std::string ModifyBackupPlanNameRequest::getBackupPlanName()const
{
return backupPlanName_;
}
void ModifyBackupPlanNameRequest::setBackupPlanName(const std::string& backupPlanName)
{
backupPlanName_ = backupPlanName;
setCoreParameter("BackupPlanName", backupPlanName);
}
std::string ModifyBackupPlanNameRequest::getRegionId()const
{
return regionId_;
}
void ModifyBackupPlanNameRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ModifyBackupPlanNameRequest::getClientToken()const
{
return clientToken_;
}
void ModifyBackupPlanNameRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string ModifyBackupPlanNameRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ModifyBackupPlanNameRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string ModifyBackupPlanNameRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyBackupPlanNameRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -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/ModifyBackupPlanNameResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ModifyBackupPlanNameResult::ModifyBackupPlanNameResult() :
ServiceResult()
{}
ModifyBackupPlanNameResult::ModifyBackupPlanNameResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyBackupPlanNameResult::~ModifyBackupPlanNameResult()
{}
void ModifyBackupPlanNameResult::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["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
}
int ModifyBackupPlanNameResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ModifyBackupPlanNameResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string ModifyBackupPlanNameResult::getErrMessage()const
{
return errMessage_;
}
bool ModifyBackupPlanNameResult::getSuccess()const
{
return success_;
}
std::string ModifyBackupPlanNameResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,192 @@
/*
* 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/ModifyBackupSourceEndpointRequest.h>
using AlibabaCloud::Dbs::Model::ModifyBackupSourceEndpointRequest;
ModifyBackupSourceEndpointRequest::ModifyBackupSourceEndpointRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ModifyBackupSourceEndpoint")
{}
ModifyBackupSourceEndpointRequest::~ModifyBackupSourceEndpointRequest()
{}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointRegion()const
{
return sourceEndpointRegion_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointRegion(const std::string& sourceEndpointRegion)
{
sourceEndpointRegion_ = sourceEndpointRegion;
setCoreParameter("SourceEndpointRegion", sourceEndpointRegion);
}
long ModifyBackupSourceEndpointRequest::getBackupGatewayId()const
{
return backupGatewayId_;
}
void ModifyBackupSourceEndpointRequest::setBackupGatewayId(long backupGatewayId)
{
backupGatewayId_ = backupGatewayId;
setCoreParameter("BackupGatewayId", std::to_string(backupGatewayId));
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointInstanceID()const
{
return sourceEndpointInstanceID_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointInstanceID(const std::string& sourceEndpointInstanceID)
{
sourceEndpointInstanceID_ = sourceEndpointInstanceID;
setCoreParameter("SourceEndpointInstanceID", sourceEndpointInstanceID);
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointUserName()const
{
return sourceEndpointUserName_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointUserName(const std::string& sourceEndpointUserName)
{
sourceEndpointUserName_ = sourceEndpointUserName;
setCoreParameter("SourceEndpointUserName", sourceEndpointUserName);
}
std::string ModifyBackupSourceEndpointRequest::getClientToken()const
{
return clientToken_;
}
void ModifyBackupSourceEndpointRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointPassword()const
{
return sourceEndpointPassword_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointPassword(const std::string& sourceEndpointPassword)
{
sourceEndpointPassword_ = sourceEndpointPassword;
setCoreParameter("SourceEndpointPassword", sourceEndpointPassword);
}
std::string ModifyBackupSourceEndpointRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ModifyBackupSourceEndpointRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string ModifyBackupSourceEndpointRequest::getBackupObjects()const
{
return backupObjects_;
}
void ModifyBackupSourceEndpointRequest::setBackupObjects(const std::string& backupObjects)
{
backupObjects_ = backupObjects;
setCoreParameter("BackupObjects", backupObjects);
}
std::string ModifyBackupSourceEndpointRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyBackupSourceEndpointRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}
int ModifyBackupSourceEndpointRequest::getSourceEndpointPort()const
{
return sourceEndpointPort_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointPort(int sourceEndpointPort)
{
sourceEndpointPort_ = sourceEndpointPort;
setCoreParameter("SourceEndpointPort", std::to_string(sourceEndpointPort));
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointDatabaseName()const
{
return sourceEndpointDatabaseName_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointDatabaseName(const std::string& sourceEndpointDatabaseName)
{
sourceEndpointDatabaseName_ = sourceEndpointDatabaseName;
setCoreParameter("SourceEndpointDatabaseName", sourceEndpointDatabaseName);
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointInstanceType()const
{
return sourceEndpointInstanceType_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointInstanceType(const std::string& sourceEndpointInstanceType)
{
sourceEndpointInstanceType_ = sourceEndpointInstanceType;
setCoreParameter("SourceEndpointInstanceType", sourceEndpointInstanceType);
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointIP()const
{
return sourceEndpointIP_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointIP(const std::string& sourceEndpointIP)
{
sourceEndpointIP_ = sourceEndpointIP;
setCoreParameter("SourceEndpointIP", sourceEndpointIP);
}
std::string ModifyBackupSourceEndpointRequest::getRegionId()const
{
return regionId_;
}
void ModifyBackupSourceEndpointRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ModifyBackupSourceEndpointRequest::getSourceEndpointOracleSID()const
{
return sourceEndpointOracleSID_;
}
void ModifyBackupSourceEndpointRequest::setSourceEndpointOracleSID(const std::string& sourceEndpointOracleSID)
{
sourceEndpointOracleSID_ = sourceEndpointOracleSID;
setCoreParameter("SourceEndpointOracleSID", sourceEndpointOracleSID);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/ModifyBackupSourceEndpointResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ModifyBackupSourceEndpointResult::ModifyBackupSourceEndpointResult() :
ServiceResult()
{}
ModifyBackupSourceEndpointResult::ModifyBackupSourceEndpointResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyBackupSourceEndpointResult::~ModifyBackupSourceEndpointResult()
{}
void ModifyBackupSourceEndpointResult::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["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int ModifyBackupSourceEndpointResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ModifyBackupSourceEndpointResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool ModifyBackupSourceEndpointResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string ModifyBackupSourceEndpointResult::getErrMessage()const
{
return errMessage_;
}
bool ModifyBackupSourceEndpointResult::getSuccess()const
{
return success_;
}
std::string ModifyBackupSourceEndpointResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/ModifyBackupStrategyRequest.h>
using AlibabaCloud::Dbs::Model::ModifyBackupStrategyRequest;
ModifyBackupStrategyRequest::ModifyBackupStrategyRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ModifyBackupStrategy")
{}
ModifyBackupStrategyRequest::~ModifyBackupStrategyRequest()
{}
std::string ModifyBackupStrategyRequest::getBackupPeriod()const
{
return backupPeriod_;
}
void ModifyBackupStrategyRequest::setBackupPeriod(const std::string& backupPeriod)
{
backupPeriod_ = backupPeriod;
setCoreParameter("BackupPeriod", backupPeriod);
}
std::string ModifyBackupStrategyRequest::getBackupStartTime()const
{
return backupStartTime_;
}
void ModifyBackupStrategyRequest::setBackupStartTime(const std::string& backupStartTime)
{
backupStartTime_ = backupStartTime;
setCoreParameter("BackupStartTime", backupStartTime);
}
std::string ModifyBackupStrategyRequest::getRegionId()const
{
return regionId_;
}
void ModifyBackupStrategyRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ModifyBackupStrategyRequest::getClientToken()const
{
return clientToken_;
}
void ModifyBackupStrategyRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string ModifyBackupStrategyRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ModifyBackupStrategyRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string ModifyBackupStrategyRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyBackupStrategyRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/ModifyBackupStrategyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ModifyBackupStrategyResult::ModifyBackupStrategyResult() :
ServiceResult()
{}
ModifyBackupStrategyResult::ModifyBackupStrategyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyBackupStrategyResult::~ModifyBackupStrategyResult()
{}
void ModifyBackupStrategyResult::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["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int ModifyBackupStrategyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ModifyBackupStrategyResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool ModifyBackupStrategyResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string ModifyBackupStrategyResult::getErrMessage()const
{
return errMessage_;
}
bool ModifyBackupStrategyResult::getSuccess()const
{
return success_;
}
std::string ModifyBackupStrategyResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/RenewBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::RenewBackupPlanRequest;
RenewBackupPlanRequest::RenewBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "RenewBackupPlan")
{}
RenewBackupPlanRequest::~RenewBackupPlanRequest()
{}
std::string RenewBackupPlanRequest::getPeriod()const
{
return period_;
}
void RenewBackupPlanRequest::setPeriod(const std::string& period)
{
period_ = period;
setCoreParameter("Period", period);
}
std::string RenewBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void RenewBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string RenewBackupPlanRequest::getClientToken()const
{
return clientToken_;
}
void RenewBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string RenewBackupPlanRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void RenewBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string RenewBackupPlanRequest::getOwnerId()const
{
return ownerId_;
}
void RenewBackupPlanRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}
int RenewBackupPlanRequest::getUsedTime()const
{
return usedTime_;
}
void RenewBackupPlanRequest::setUsedTime(int usedTime)
{
usedTime_ = usedTime;
setCoreParameter("UsedTime", std::to_string(usedTime));
}

View File

@@ -0,0 +1,87 @@
/*
* 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/RenewBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
RenewBackupPlanResult::RenewBackupPlanResult() :
ServiceResult()
{}
RenewBackupPlanResult::RenewBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RenewBackupPlanResult::~RenewBackupPlanResult()
{}
void RenewBackupPlanResult::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["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["OrderId"].isNull())
orderId_ = value["OrderId"].asString();
}
int RenewBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string RenewBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string RenewBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
std::string RenewBackupPlanResult::getOrderId()const
{
return orderId_;
}
bool RenewBackupPlanResult::getSuccess()const
{
return success_;
}
std::string RenewBackupPlanResult::getErrCode()const
{
return errCode_;
}