DBS SDK Auto Released By wanxin,Version:1.35.6

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2019-04-08 17:05:17 +08:00
parent d1cf7d3344
commit 861713f586
39 changed files with 3376 additions and 1 deletions

341
dbs/src/DbsClient.cc Normal file
View File

@@ -0,0 +1,341 @@
/*
* 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/DbsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
namespace
{
const std::string SERVICE_NAME = "Dbs";
}
DbsClient::DbsClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cbs");
}
DbsClient::DbsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cbs");
}
DbsClient::DbsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cbs");
}
DbsClient::~DbsClient()
{}
DbsClient::DescribeBackupPlanListOutcome DbsClient::describeBackupPlanList(const DescribeBackupPlanListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeBackupPlanListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeBackupPlanListOutcome(DescribeBackupPlanListResult(outcome.result()));
else
return DescribeBackupPlanListOutcome(outcome.error());
}
void DbsClient::describeBackupPlanListAsync(const DescribeBackupPlanListRequest& request, const DescribeBackupPlanListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeBackupPlanList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeBackupPlanListOutcomeCallable DbsClient::describeBackupPlanListCallable(const DescribeBackupPlanListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeBackupPlanListOutcome()>>(
[this, request]()
{
return this->describeBackupPlanList(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::CreateBackupPlanOutcome DbsClient::createBackupPlan(const CreateBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateBackupPlanOutcome(CreateBackupPlanResult(outcome.result()));
else
return CreateBackupPlanOutcome(outcome.error());
}
void DbsClient::createBackupPlanAsync(const CreateBackupPlanRequest& request, const CreateBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::CreateBackupPlanOutcomeCallable DbsClient::createBackupPlanCallable(const CreateBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateBackupPlanOutcome()>>(
[this, request]()
{
return this->createBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::StartBackupPlanOutcome DbsClient::startBackupPlan(const StartBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StartBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StartBackupPlanOutcome(StartBackupPlanResult(outcome.result()));
else
return StartBackupPlanOutcome(outcome.error());
}
void DbsClient::startBackupPlanAsync(const StartBackupPlanRequest& request, const StartBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, startBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::StartBackupPlanOutcomeCallable DbsClient::startBackupPlanCallable(const StartBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StartBackupPlanOutcome()>>(
[this, request]()
{
return this->startBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::DescribeBackupGatewayListOutcome DbsClient::describeBackupGatewayList(const DescribeBackupGatewayListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeBackupGatewayListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeBackupGatewayListOutcome(DescribeBackupGatewayListResult(outcome.result()));
else
return DescribeBackupGatewayListOutcome(outcome.error());
}
void DbsClient::describeBackupGatewayListAsync(const DescribeBackupGatewayListRequest& request, const DescribeBackupGatewayListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeBackupGatewayList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeBackupGatewayListOutcomeCallable DbsClient::describeBackupGatewayListCallable(const DescribeBackupGatewayListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeBackupGatewayListOutcome()>>(
[this, request]()
{
return this->describeBackupGatewayList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::DescribeIncrementBackupListOutcome DbsClient::describeIncrementBackupList(const DescribeIncrementBackupListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeIncrementBackupListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeIncrementBackupListOutcome(DescribeIncrementBackupListResult(outcome.result()));
else
return DescribeIncrementBackupListOutcome(outcome.error());
}
void DbsClient::describeIncrementBackupListAsync(const DescribeIncrementBackupListRequest& request, const DescribeIncrementBackupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeIncrementBackupList(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DescribeIncrementBackupListOutcomeCallable DbsClient::describeIncrementBackupListCallable(const DescribeIncrementBackupListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeIncrementBackupListOutcome()>>(
[this, request]()
{
return this->describeIncrementBackupList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::ConfigureBackupPlanOutcome DbsClient::configureBackupPlan(const ConfigureBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ConfigureBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ConfigureBackupPlanOutcome(ConfigureBackupPlanResult(outcome.result()));
else
return ConfigureBackupPlanOutcome(outcome.error());
}
void DbsClient::configureBackupPlanAsync(const ConfigureBackupPlanRequest& request, const ConfigureBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, configureBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ConfigureBackupPlanOutcomeCallable DbsClient::configureBackupPlanCallable(const ConfigureBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ConfigureBackupPlanOutcome()>>(
[this, request]()
{
return this->configureBackupPlan(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();
}

View File

@@ -0,0 +1,280 @@
/*
* 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/ConfigureBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::ConfigureBackupPlanRequest;
ConfigureBackupPlanRequest::ConfigureBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ConfigureBackupPlan")
{}
ConfigureBackupPlanRequest::~ConfigureBackupPlanRequest()
{}
std::string ConfigureBackupPlanRequest::getSourceEndpointRegion()const
{
return sourceEndpointRegion_;
}
void ConfigureBackupPlanRequest::setSourceEndpointRegion(const std::string& sourceEndpointRegion)
{
sourceEndpointRegion_ = sourceEndpointRegion;
setCoreParameter("SourceEndpointRegion", sourceEndpointRegion);
}
int ConfigureBackupPlanRequest::getDuplicationArchivePeriod()const
{
return duplicationArchivePeriod_;
}
void ConfigureBackupPlanRequest::setDuplicationArchivePeriod(int duplicationArchivePeriod)
{
duplicationArchivePeriod_ = duplicationArchivePeriod;
setCoreParameter("DuplicationArchivePeriod", std::to_string(duplicationArchivePeriod));
}
long ConfigureBackupPlanRequest::getBackupGatewayId()const
{
return backupGatewayId_;
}
void ConfigureBackupPlanRequest::setBackupGatewayId(long backupGatewayId)
{
backupGatewayId_ = backupGatewayId;
setCoreParameter("BackupGatewayId", std::to_string(backupGatewayId));
}
std::string ConfigureBackupPlanRequest::getSourceEndpointInstanceID()const
{
return sourceEndpointInstanceID_;
}
void ConfigureBackupPlanRequest::setSourceEndpointInstanceID(const std::string& sourceEndpointInstanceID)
{
sourceEndpointInstanceID_ = sourceEndpointInstanceID;
setCoreParameter("SourceEndpointInstanceID", sourceEndpointInstanceID);
}
std::string ConfigureBackupPlanRequest::getSourceEndpointUserName()const
{
return sourceEndpointUserName_;
}
void ConfigureBackupPlanRequest::setSourceEndpointUserName(const std::string& sourceEndpointUserName)
{
sourceEndpointUserName_ = sourceEndpointUserName;
setCoreParameter("SourceEndpointUserName", sourceEndpointUserName);
}
std::string ConfigureBackupPlanRequest::getClientToken()const
{
return clientToken_;
}
void ConfigureBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string ConfigureBackupPlanRequest::getSourceEndpointPassword()const
{
return sourceEndpointPassword_;
}
void ConfigureBackupPlanRequest::setSourceEndpointPassword(const std::string& sourceEndpointPassword)
{
sourceEndpointPassword_ = sourceEndpointPassword;
setCoreParameter("SourceEndpointPassword", sourceEndpointPassword);
}
std::string ConfigureBackupPlanRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ConfigureBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string ConfigureBackupPlanRequest::getBackupObjects()const
{
return backupObjects_;
}
void ConfigureBackupPlanRequest::setBackupObjects(const std::string& backupObjects)
{
backupObjects_ = backupObjects;
setCoreParameter("BackupObjects", backupObjects);
}
std::string ConfigureBackupPlanRequest::getOwnerId()const
{
return ownerId_;
}
void ConfigureBackupPlanRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}
int ConfigureBackupPlanRequest::getSourceEndpointPort()const
{
return sourceEndpointPort_;
}
void ConfigureBackupPlanRequest::setSourceEndpointPort(int sourceEndpointPort)
{
sourceEndpointPort_ = sourceEndpointPort;
setCoreParameter("SourceEndpointPort", std::to_string(sourceEndpointPort));
}
std::string ConfigureBackupPlanRequest::getSourceEndpointDatabaseName()const
{
return sourceEndpointDatabaseName_;
}
void ConfigureBackupPlanRequest::setSourceEndpointDatabaseName(const std::string& sourceEndpointDatabaseName)
{
sourceEndpointDatabaseName_ = sourceEndpointDatabaseName;
setCoreParameter("SourceEndpointDatabaseName", sourceEndpointDatabaseName);
}
int ConfigureBackupPlanRequest::getBackupRetentionPeriod()const
{
return backupRetentionPeriod_;
}
void ConfigureBackupPlanRequest::setBackupRetentionPeriod(int backupRetentionPeriod)
{
backupRetentionPeriod_ = backupRetentionPeriod;
setCoreParameter("BackupRetentionPeriod", std::to_string(backupRetentionPeriod));
}
int ConfigureBackupPlanRequest::getDuplicationInfrequentAccessPeriod()const
{
return duplicationInfrequentAccessPeriod_;
}
void ConfigureBackupPlanRequest::setDuplicationInfrequentAccessPeriod(int duplicationInfrequentAccessPeriod)
{
duplicationInfrequentAccessPeriod_ = duplicationInfrequentAccessPeriod;
setCoreParameter("DuplicationInfrequentAccessPeriod", std::to_string(duplicationInfrequentAccessPeriod));
}
std::string ConfigureBackupPlanRequest::getBackupPeriod()const
{
return backupPeriod_;
}
void ConfigureBackupPlanRequest::setBackupPeriod(const std::string& backupPeriod)
{
backupPeriod_ = backupPeriod;
setCoreParameter("BackupPeriod", backupPeriod);
}
std::string ConfigureBackupPlanRequest::getBackupStartTime()const
{
return backupStartTime_;
}
void ConfigureBackupPlanRequest::setBackupStartTime(const std::string& backupStartTime)
{
backupStartTime_ = backupStartTime;
setCoreParameter("BackupStartTime", backupStartTime);
}
std::string ConfigureBackupPlanRequest::getSourceEndpointInstanceType()const
{
return sourceEndpointInstanceType_;
}
void ConfigureBackupPlanRequest::setSourceEndpointInstanceType(const std::string& sourceEndpointInstanceType)
{
sourceEndpointInstanceType_ = sourceEndpointInstanceType;
setCoreParameter("SourceEndpointInstanceType", sourceEndpointInstanceType);
}
std::string ConfigureBackupPlanRequest::getSourceEndpointIP()const
{
return sourceEndpointIP_;
}
void ConfigureBackupPlanRequest::setSourceEndpointIP(const std::string& sourceEndpointIP)
{
sourceEndpointIP_ = sourceEndpointIP;
setCoreParameter("SourceEndpointIP", sourceEndpointIP);
}
std::string ConfigureBackupPlanRequest::getBackupPlanName()const
{
return backupPlanName_;
}
void ConfigureBackupPlanRequest::setBackupPlanName(const std::string& backupPlanName)
{
backupPlanName_ = backupPlanName;
setCoreParameter("BackupPlanName", backupPlanName);
}
std::string ConfigureBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void ConfigureBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ConfigureBackupPlanRequest::getSourceEndpointOracleSID()const
{
return sourceEndpointOracleSID_;
}
void ConfigureBackupPlanRequest::setSourceEndpointOracleSID(const std::string& sourceEndpointOracleSID)
{
sourceEndpointOracleSID_ = sourceEndpointOracleSID;
setCoreParameter("SourceEndpointOracleSID", sourceEndpointOracleSID);
}
std::string ConfigureBackupPlanRequest::getOSSBucketName()const
{
return oSSBucketName_;
}
void ConfigureBackupPlanRequest::setOSSBucketName(const std::string& oSSBucketName)
{
oSSBucketName_ = oSSBucketName;
setCoreParameter("OSSBucketName", oSSBucketName);
}
bool ConfigureBackupPlanRequest::getEnableBackupLog()const
{
return enableBackupLog_;
}
void ConfigureBackupPlanRequest::setEnableBackupLog(bool enableBackupLog)
{
enableBackupLog_ = enableBackupLog;
setCoreParameter("EnableBackupLog", enableBackupLog ? "true" : "false");
}

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/ConfigureBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ConfigureBackupPlanResult::ConfigureBackupPlanResult() :
ServiceResult()
{}
ConfigureBackupPlanResult::ConfigureBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ConfigureBackupPlanResult::~ConfigureBackupPlanResult()
{}
void ConfigureBackupPlanResult::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 ConfigureBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ConfigureBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string ConfigureBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
bool ConfigureBackupPlanResult::getSuccess()const
{
return success_;
}
std::string ConfigureBackupPlanResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,126 @@
/*
* 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/CreateBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::CreateBackupPlanRequest;
CreateBackupPlanRequest::CreateBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "CreateBackupPlan")
{}
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_;
}
void CreateBackupPlanRequest::setDatabaseType(const std::string& databaseType)
{
databaseType_ = databaseType;
setCoreParameter("DatabaseType", databaseType);
}
std::string CreateBackupPlanRequest::getPeriod()const
{
return period_;
}
void CreateBackupPlanRequest::setPeriod(const std::string& period)
{
period_ = 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_;
}
void CreateBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = 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_;
}
void CreateBackupPlanRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}
int CreateBackupPlanRequest::getUsedTime()const
{
return usedTime_;
}
void CreateBackupPlanRequest::setUsedTime(int usedTime)
{
usedTime_ = usedTime;
setCoreParameter("UsedTime", std::to_string(usedTime));
}
std::string CreateBackupPlanRequest::getInstanceClass()const
{
return instanceClass_;
}
void CreateBackupPlanRequest::setInstanceClass(const std::string& instanceClass)
{
instanceClass_ = instanceClass;
setCoreParameter("InstanceClass", instanceClass);
}

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/CreateBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
CreateBackupPlanResult::CreateBackupPlanResult() :
ServiceResult()
{}
CreateBackupPlanResult::CreateBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateBackupPlanResult::~CreateBackupPlanResult()
{}
void CreateBackupPlanResult::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 CreateBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string CreateBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
std::string CreateBackupPlanResult::getOrderId()const
{
return orderId_;
}
bool CreateBackupPlanResult::getSuccess()const
{
return success_;
}
std::string CreateBackupPlanResult::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/DescribeBackupGatewayListRequest.h>
using AlibabaCloud::Dbs::Model::DescribeBackupGatewayListRequest;
DescribeBackupGatewayListRequest::DescribeBackupGatewayListRequest() :
RpcServiceRequest("dbs", "2019-03-06", "DescribeBackupGatewayList")
{}
DescribeBackupGatewayListRequest::~DescribeBackupGatewayListRequest()
{}
std::string DescribeBackupGatewayListRequest::getRegionId()const
{
return regionId_;
}
void DescribeBackupGatewayListRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string DescribeBackupGatewayListRequest::getClientToken()const
{
return clientToken_;
}
void DescribeBackupGatewayListRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
int DescribeBackupGatewayListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeBackupGatewayListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeBackupGatewayListRequest::getRegion()const
{
return region_;
}
void DescribeBackupGatewayListRequest::setRegion(const std::string& region)
{
region_ = region;
setCoreParameter("Region", region);
}
int DescribeBackupGatewayListRequest::getPageNum()const
{
return pageNum_;
}
void DescribeBackupGatewayListRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
std::string DescribeBackupGatewayListRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeBackupGatewayListRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/DescribeBackupGatewayListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
DescribeBackupGatewayListResult::DescribeBackupGatewayListResult() :
ServiceResult()
{}
DescribeBackupGatewayListResult::DescribeBackupGatewayListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeBackupGatewayListResult::~DescribeBackupGatewayListResult()
{}
void DescribeBackupGatewayListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItems = value["Items"]["BackupGateway"];
for (const auto &item : allItems)
items_.push_back(item.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["TotalPages"].isNull())
totalPages_ = std::stoi(value["TotalPages"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["TotalElements"].isNull())
totalElements_ = std::stoi(value["TotalElements"].asString());
}
int DescribeBackupGatewayListResult::getPageSize()const
{
return pageSize_;
}
int DescribeBackupGatewayListResult::getPageNum()const
{
return pageNum_;
}
int DescribeBackupGatewayListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
int DescribeBackupGatewayListResult::getTotalElements()const
{
return totalElements_;
}
std::vector<std::string> DescribeBackupGatewayListResult::getItems()const
{
return items_;
}
int DescribeBackupGatewayListResult::getTotalPages()const
{
return totalPages_;
}
std::string DescribeBackupGatewayListResult::getErrMessage()const
{
return errMessage_;
}
bool DescribeBackupGatewayListResult::getSuccess()const
{
return success_;
}
std::string DescribeBackupGatewayListResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,104 @@
/*
* 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/DescribeBackupPlanListRequest.h>
using AlibabaCloud::Dbs::Model::DescribeBackupPlanListRequest;
DescribeBackupPlanListRequest::DescribeBackupPlanListRequest() :
RpcServiceRequest("dbs", "2019-03-06", "DescribeBackupPlanList")
{}
DescribeBackupPlanListRequest::~DescribeBackupPlanListRequest()
{}
std::string DescribeBackupPlanListRequest::getRegionId()const
{
return regionId_;
}
void DescribeBackupPlanListRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string DescribeBackupPlanListRequest::getClientToken()const
{
return clientToken_;
}
void DescribeBackupPlanListRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
int DescribeBackupPlanListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeBackupPlanListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeBackupPlanListRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void DescribeBackupPlanListRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string DescribeBackupPlanListRequest::getRegion()const
{
return region_;
}
void DescribeBackupPlanListRequest::setRegion(const std::string& region)
{
region_ = region;
setCoreParameter("Region", region);
}
int DescribeBackupPlanListRequest::getPageNum()const
{
return pageNum_;
}
void DescribeBackupPlanListRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
std::string DescribeBackupPlanListRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeBackupPlanListRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/DescribeBackupPlanListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
DescribeBackupPlanListResult::DescribeBackupPlanListResult() :
ServiceResult()
{}
DescribeBackupPlanListResult::DescribeBackupPlanListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeBackupPlanListResult::~DescribeBackupPlanListResult()
{}
void DescribeBackupPlanListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItems = value["Items"]["BackupPlanDetail"];
for (const auto &item : allItems)
items_.push_back(item.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["TotalPages"].isNull())
totalPages_ = std::stoi(value["TotalPages"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["TotalElements"].isNull())
totalElements_ = std::stoi(value["TotalElements"].asString());
}
int DescribeBackupPlanListResult::getPageSize()const
{
return pageSize_;
}
int DescribeBackupPlanListResult::getPageNum()const
{
return pageNum_;
}
int DescribeBackupPlanListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
int DescribeBackupPlanListResult::getTotalElements()const
{
return totalElements_;
}
std::vector<std::string> DescribeBackupPlanListResult::getItems()const
{
return items_;
}
int DescribeBackupPlanListResult::getTotalPages()const
{
return totalPages_;
}
std::string DescribeBackupPlanListResult::getErrMessage()const
{
return errMessage_;
}
bool DescribeBackupPlanListResult::getSuccess()const
{
return success_;
}
std::string DescribeBackupPlanListResult::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/DescribeFullBackupListRequest.h>
using AlibabaCloud::Dbs::Model::DescribeFullBackupListRequest;
DescribeFullBackupListRequest::DescribeFullBackupListRequest() :
RpcServiceRequest("dbs", "2019-03-06", "DescribeFullBackupList")
{}
DescribeFullBackupListRequest::~DescribeFullBackupListRequest()
{}
std::string DescribeFullBackupListRequest::getRegionId()const
{
return regionId_;
}
void DescribeFullBackupListRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string DescribeFullBackupListRequest::getClientToken()const
{
return clientToken_;
}
void DescribeFullBackupListRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
int DescribeFullBackupListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeFullBackupListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeFullBackupListRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void DescribeFullBackupListRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
int DescribeFullBackupListRequest::getPageNum()const
{
return pageNum_;
}
void DescribeFullBackupListRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
std::string DescribeFullBackupListRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeFullBackupListRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/DescribeFullBackupListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
DescribeFullBackupListResult::DescribeFullBackupListResult() :
ServiceResult()
{}
DescribeFullBackupListResult::DescribeFullBackupListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeFullBackupListResult::~DescribeFullBackupListResult()
{}
void DescribeFullBackupListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItems = value["Items"]["FullBackupFile"];
for (const auto &item : allItems)
items_.push_back(item.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["TotalPages"].isNull())
totalPages_ = std::stoi(value["TotalPages"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["TotalElements"].isNull())
totalElements_ = std::stoi(value["TotalElements"].asString());
}
int DescribeFullBackupListResult::getPageSize()const
{
return pageSize_;
}
int DescribeFullBackupListResult::getPageNum()const
{
return pageNum_;
}
int DescribeFullBackupListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
int DescribeFullBackupListResult::getTotalElements()const
{
return totalElements_;
}
std::vector<std::string> DescribeFullBackupListResult::getItems()const
{
return items_;
}
int DescribeFullBackupListResult::getTotalPages()const
{
return totalPages_;
}
std::string DescribeFullBackupListResult::getErrMessage()const
{
return errMessage_;
}
bool DescribeFullBackupListResult::getSuccess()const
{
return success_;
}
std::string DescribeFullBackupListResult::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/DescribeIncrementBackupListRequest.h>
using AlibabaCloud::Dbs::Model::DescribeIncrementBackupListRequest;
DescribeIncrementBackupListRequest::DescribeIncrementBackupListRequest() :
RpcServiceRequest("dbs", "2019-03-06", "DescribeIncrementBackupList")
{}
DescribeIncrementBackupListRequest::~DescribeIncrementBackupListRequest()
{}
std::string DescribeIncrementBackupListRequest::getRegionId()const
{
return regionId_;
}
void DescribeIncrementBackupListRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string DescribeIncrementBackupListRequest::getClientToken()const
{
return clientToken_;
}
void DescribeIncrementBackupListRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
int DescribeIncrementBackupListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeIncrementBackupListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeIncrementBackupListRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void DescribeIncrementBackupListRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
int DescribeIncrementBackupListRequest::getPageNum()const
{
return pageNum_;
}
void DescribeIncrementBackupListRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
std::string DescribeIncrementBackupListRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeIncrementBackupListRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/DescribeIncrementBackupListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
DescribeIncrementBackupListResult::DescribeIncrementBackupListResult() :
ServiceResult()
{}
DescribeIncrementBackupListResult::DescribeIncrementBackupListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeIncrementBackupListResult::~DescribeIncrementBackupListResult()
{}
void DescribeIncrementBackupListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItems = value["Items"]["IncrementBackupFile"];
for (const auto &item : allItems)
items_.push_back(item.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["TotalPages"].isNull())
totalPages_ = std::stoi(value["TotalPages"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["TotalElements"].isNull())
totalElements_ = std::stoi(value["TotalElements"].asString());
}
int DescribeIncrementBackupListResult::getPageSize()const
{
return pageSize_;
}
int DescribeIncrementBackupListResult::getPageNum()const
{
return pageNum_;
}
int DescribeIncrementBackupListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
int DescribeIncrementBackupListResult::getTotalElements()const
{
return totalElements_;
}
std::vector<std::string> DescribeIncrementBackupListResult::getItems()const
{
return items_;
}
int DescribeIncrementBackupListResult::getTotalPages()const
{
return totalPages_;
}
std::string DescribeIncrementBackupListResult::getErrMessage()const
{
return errMessage_;
}
bool DescribeIncrementBackupListResult::getSuccess()const
{
return success_;
}
std::string DescribeIncrementBackupListResult::getErrCode()const
{
return errCode_;
}

View File

@@ -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/StartBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::StartBackupPlanRequest;
StartBackupPlanRequest::StartBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "StartBackupPlan")
{}
StartBackupPlanRequest::~StartBackupPlanRequest()
{}
std::string StartBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void StartBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string StartBackupPlanRequest::getClientToken()const
{
return clientToken_;
}
void StartBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string StartBackupPlanRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void StartBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string StartBackupPlanRequest::getOwnerId()const
{
return ownerId_;
}
void StartBackupPlanRequest::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/StartBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
StartBackupPlanResult::StartBackupPlanResult() :
ServiceResult()
{}
StartBackupPlanResult::StartBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StartBackupPlanResult::~StartBackupPlanResult()
{}
void StartBackupPlanResult::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 StartBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string StartBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string StartBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
bool StartBackupPlanResult::getSuccess()const
{
return success_;
}
std::string StartBackupPlanResult::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/StopBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::StopBackupPlanRequest;
StopBackupPlanRequest::StopBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "StopBackupPlan")
{}
StopBackupPlanRequest::~StopBackupPlanRequest()
{}
std::string StopBackupPlanRequest::getStopMethod()const
{
return stopMethod_;
}
void StopBackupPlanRequest::setStopMethod(const std::string& stopMethod)
{
stopMethod_ = stopMethod;
setCoreParameter("StopMethod", stopMethod);
}
std::string StopBackupPlanRequest::getRegionId()const
{
return regionId_;
}
void StopBackupPlanRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string StopBackupPlanRequest::getClientToken()const
{
return clientToken_;
}
void StopBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setCoreParameter("ClientToken", clientToken);
}
std::string StopBackupPlanRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void StopBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setCoreParameter("BackupPlanId", backupPlanId);
}
std::string StopBackupPlanRequest::getOwnerId()const
{
return ownerId_;
}
void StopBackupPlanRequest::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/StopBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
StopBackupPlanResult::StopBackupPlanResult() :
ServiceResult()
{}
StopBackupPlanResult::StopBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StopBackupPlanResult::~StopBackupPlanResult()
{}
void StopBackupPlanResult::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 StopBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string StopBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string StopBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
bool StopBackupPlanResult::getSuccess()const
{
return success_;
}
std::string StopBackupPlanResult::getErrCode()const
{
return errCode_;
}