Add DisableBackupLog.
This commit is contained in:
@@ -699,6 +699,78 @@ DbsClient::DescribeRestoreTaskListOutcomeCallable DbsClient::describeRestoreTask
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::DisableBackupLogOutcome DbsClient::disableBackupLog(const DisableBackupLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DisableBackupLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DisableBackupLogOutcome(DisableBackupLogResult(outcome.result()));
|
||||
else
|
||||
return DisableBackupLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DbsClient::disableBackupLogAsync(const DisableBackupLogRequest& request, const DisableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, disableBackupLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DbsClient::DisableBackupLogOutcomeCallable DbsClient::disableBackupLogCallable(const DisableBackupLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DisableBackupLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->disableBackupLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::EnableBackupLogOutcome DbsClient::enableBackupLog(const EnableBackupLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EnableBackupLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EnableBackupLogOutcome(EnableBackupLogResult(outcome.result()));
|
||||
else
|
||||
return EnableBackupLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DbsClient::enableBackupLogAsync(const EnableBackupLogRequest& request, const EnableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, enableBackupLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DbsClient::EnableBackupLogOutcomeCallable DbsClient::enableBackupLogCallable(const EnableBackupLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EnableBackupLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->enableBackupLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::GetDBListFromAgentOutcome DbsClient::getDBListFromAgent(const GetDBListFromAgentRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -915,6 +987,78 @@ DbsClient::ModifyBackupStrategyOutcomeCallable DbsClient::modifyBackupStrategyCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::ModifyStorageStrategyOutcome DbsClient::modifyStorageStrategy(const ModifyStorageStrategyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyStorageStrategyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyStorageStrategyOutcome(ModifyStorageStrategyResult(outcome.result()));
|
||||
else
|
||||
return ModifyStorageStrategyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DbsClient::modifyStorageStrategyAsync(const ModifyStorageStrategyRequest& request, const ModifyStorageStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyStorageStrategy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DbsClient::ModifyStorageStrategyOutcomeCallable DbsClient::modifyStorageStrategyCallable(const ModifyStorageStrategyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyStorageStrategyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyStorageStrategy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::ReleaseBackupPlanOutcome DbsClient::releaseBackupPlan(const ReleaseBackupPlanRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReleaseBackupPlanOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReleaseBackupPlanOutcome(ReleaseBackupPlanResult(outcome.result()));
|
||||
else
|
||||
return ReleaseBackupPlanOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DbsClient::releaseBackupPlanAsync(const ReleaseBackupPlanRequest& request, const ReleaseBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, releaseBackupPlan(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DbsClient::ReleaseBackupPlanOutcomeCallable DbsClient::releaseBackupPlanCallable(const ReleaseBackupPlanRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReleaseBackupPlanOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->releaseBackupPlan(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DbsClient::RenewBackupPlanOutcome DbsClient::renewBackupPlan(const RenewBackupPlanRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -45,6 +45,8 @@ void DescribeIncrementBackupListResult::parse(const std::string &payload)
|
||||
IncrementBackupFile itemsObject;
|
||||
if(!valueItemsIncrementBackupFile["BackupSetId"].isNull())
|
||||
itemsObject.backupSetId = valueItemsIncrementBackupFile["BackupSetId"].asString();
|
||||
if(!valueItemsIncrementBackupFile["BackupSetJobId"].isNull())
|
||||
itemsObject.backupSetJobId = valueItemsIncrementBackupFile["BackupSetJobId"].asString();
|
||||
if(!valueItemsIncrementBackupFile["SourceEndpointIpPort"].isNull())
|
||||
itemsObject.sourceEndpointIpPort = valueItemsIncrementBackupFile["SourceEndpointIpPort"].asString();
|
||||
if(!valueItemsIncrementBackupFile["StartTime"].isNull())
|
||||
|
||||
62
dbs/src/model/DisableBackupLogRequest.cc
Normal file
62
dbs/src/model/DisableBackupLogRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/DisableBackupLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Dbs::Model::DisableBackupLogRequest;
|
||||
|
||||
DisableBackupLogRequest::DisableBackupLogRequest() :
|
||||
RpcServiceRequest("dbs", "2019-03-06", "DisableBackupLog")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DisableBackupLogRequest::~DisableBackupLogRequest()
|
||||
{}
|
||||
|
||||
std::string DisableBackupLogRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DisableBackupLogRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DisableBackupLogRequest::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
void DisableBackupLogRequest::setBackupPlanId(const std::string& backupPlanId)
|
||||
{
|
||||
backupPlanId_ = backupPlanId;
|
||||
setParameter("BackupPlanId", backupPlanId);
|
||||
}
|
||||
|
||||
std::string DisableBackupLogRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DisableBackupLogRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
86
dbs/src/model/DisableBackupLogResult.cc
Normal file
86
dbs/src/model/DisableBackupLogResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/DisableBackupLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dbs;
|
||||
using namespace AlibabaCloud::Dbs::Model;
|
||||
|
||||
DisableBackupLogResult::DisableBackupLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DisableBackupLogResult::DisableBackupLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DisableBackupLogResult::~DisableBackupLogResult()
|
||||
{}
|
||||
|
||||
void DisableBackupLogResult::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 DisableBackupLogResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DisableBackupLogResult::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
bool DisableBackupLogResult::getNeedPrecheck()const
|
||||
{
|
||||
return needPrecheck_;
|
||||
}
|
||||
|
||||
std::string DisableBackupLogResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool DisableBackupLogResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string DisableBackupLogResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
62
dbs/src/model/EnableBackupLogRequest.cc
Normal file
62
dbs/src/model/EnableBackupLogRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/EnableBackupLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Dbs::Model::EnableBackupLogRequest;
|
||||
|
||||
EnableBackupLogRequest::EnableBackupLogRequest() :
|
||||
RpcServiceRequest("dbs", "2019-03-06", "EnableBackupLog")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EnableBackupLogRequest::~EnableBackupLogRequest()
|
||||
{}
|
||||
|
||||
std::string EnableBackupLogRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void EnableBackupLogRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string EnableBackupLogRequest::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
void EnableBackupLogRequest::setBackupPlanId(const std::string& backupPlanId)
|
||||
{
|
||||
backupPlanId_ = backupPlanId;
|
||||
setParameter("BackupPlanId", backupPlanId);
|
||||
}
|
||||
|
||||
std::string EnableBackupLogRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void EnableBackupLogRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
86
dbs/src/model/EnableBackupLogResult.cc
Normal file
86
dbs/src/model/EnableBackupLogResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/EnableBackupLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dbs;
|
||||
using namespace AlibabaCloud::Dbs::Model;
|
||||
|
||||
EnableBackupLogResult::EnableBackupLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EnableBackupLogResult::EnableBackupLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EnableBackupLogResult::~EnableBackupLogResult()
|
||||
{}
|
||||
|
||||
void EnableBackupLogResult::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 EnableBackupLogResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string EnableBackupLogResult::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
bool EnableBackupLogResult::getNeedPrecheck()const
|
||||
{
|
||||
return needPrecheck_;
|
||||
}
|
||||
|
||||
std::string EnableBackupLogResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool EnableBackupLogResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string EnableBackupLogResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,17 @@ void ModifyBackupSetDownloadRulesRequest::setIncrementDataFormat(const std::stri
|
||||
setParameter("IncrementDataFormat", incrementDataFormat);
|
||||
}
|
||||
|
||||
std::string ModifyBackupSetDownloadRulesRequest::getBackupSetDownloadTargetTypeLocation()const
|
||||
{
|
||||
return backupSetDownloadTargetTypeLocation_;
|
||||
}
|
||||
|
||||
void ModifyBackupSetDownloadRulesRequest::setBackupSetDownloadTargetTypeLocation(const std::string& backupSetDownloadTargetTypeLocation)
|
||||
{
|
||||
backupSetDownloadTargetTypeLocation_ = backupSetDownloadTargetTypeLocation;
|
||||
setParameter("BackupSetDownloadTargetTypeLocation", backupSetDownloadTargetTypeLocation);
|
||||
}
|
||||
|
||||
std::string ModifyBackupSetDownloadRulesRequest::getBackupSetDownloadDir()const
|
||||
{
|
||||
return backupSetDownloadDir_;
|
||||
|
||||
@@ -27,6 +27,17 @@ ModifyBackupStrategyRequest::ModifyBackupStrategyRequest() :
|
||||
ModifyBackupStrategyRequest::~ModifyBackupStrategyRequest()
|
||||
{}
|
||||
|
||||
int ModifyBackupStrategyRequest::getBackupLogIntervalSeconds()const
|
||||
{
|
||||
return backupLogIntervalSeconds_;
|
||||
}
|
||||
|
||||
void ModifyBackupStrategyRequest::setBackupLogIntervalSeconds(int backupLogIntervalSeconds)
|
||||
{
|
||||
backupLogIntervalSeconds_ = backupLogIntervalSeconds;
|
||||
setParameter("BackupLogIntervalSeconds", std::to_string(backupLogIntervalSeconds));
|
||||
}
|
||||
|
||||
std::string ModifyBackupStrategyRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
|
||||
95
dbs/src/model/ModifyStorageStrategyRequest.cc
Normal file
95
dbs/src/model/ModifyStorageStrategyRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/ModifyStorageStrategyRequest.h>
|
||||
|
||||
using AlibabaCloud::Dbs::Model::ModifyStorageStrategyRequest;
|
||||
|
||||
ModifyStorageStrategyRequest::ModifyStorageStrategyRequest() :
|
||||
RpcServiceRequest("dbs", "2019-03-06", "ModifyStorageStrategy")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyStorageStrategyRequest::~ModifyStorageStrategyRequest()
|
||||
{}
|
||||
|
||||
int ModifyStorageStrategyRequest::getDuplicationArchivePeriod()const
|
||||
{
|
||||
return duplicationArchivePeriod_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setDuplicationArchivePeriod(int duplicationArchivePeriod)
|
||||
{
|
||||
duplicationArchivePeriod_ = duplicationArchivePeriod;
|
||||
setParameter("DuplicationArchivePeriod", std::to_string(duplicationArchivePeriod));
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyRequest::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setBackupPlanId(const std::string& backupPlanId)
|
||||
{
|
||||
backupPlanId_ = backupPlanId;
|
||||
setParameter("BackupPlanId", backupPlanId);
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
int ModifyStorageStrategyRequest::getBackupRetentionPeriod()const
|
||||
{
|
||||
return backupRetentionPeriod_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setBackupRetentionPeriod(int backupRetentionPeriod)
|
||||
{
|
||||
backupRetentionPeriod_ = backupRetentionPeriod;
|
||||
setParameter("BackupRetentionPeriod", std::to_string(backupRetentionPeriod));
|
||||
}
|
||||
|
||||
int ModifyStorageStrategyRequest::getDuplicationInfrequentAccessPeriod()const
|
||||
{
|
||||
return duplicationInfrequentAccessPeriod_;
|
||||
}
|
||||
|
||||
void ModifyStorageStrategyRequest::setDuplicationInfrequentAccessPeriod(int duplicationInfrequentAccessPeriod)
|
||||
{
|
||||
duplicationInfrequentAccessPeriod_ = duplicationInfrequentAccessPeriod;
|
||||
setParameter("DuplicationInfrequentAccessPeriod", std::to_string(duplicationInfrequentAccessPeriod));
|
||||
}
|
||||
|
||||
86
dbs/src/model/ModifyStorageStrategyResult.cc
Normal file
86
dbs/src/model/ModifyStorageStrategyResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/ModifyStorageStrategyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dbs;
|
||||
using namespace AlibabaCloud::Dbs::Model;
|
||||
|
||||
ModifyStorageStrategyResult::ModifyStorageStrategyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyStorageStrategyResult::ModifyStorageStrategyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyStorageStrategyResult::~ModifyStorageStrategyResult()
|
||||
{}
|
||||
|
||||
void ModifyStorageStrategyResult::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 ModifyStorageStrategyResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyResult::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
bool ModifyStorageStrategyResult::getNeedPrecheck()const
|
||||
{
|
||||
return needPrecheck_;
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool ModifyStorageStrategyResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ModifyStorageStrategyResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
62
dbs/src/model/ReleaseBackupPlanRequest.cc
Normal file
62
dbs/src/model/ReleaseBackupPlanRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/ReleaseBackupPlanRequest.h>
|
||||
|
||||
using AlibabaCloud::Dbs::Model::ReleaseBackupPlanRequest;
|
||||
|
||||
ReleaseBackupPlanRequest::ReleaseBackupPlanRequest() :
|
||||
RpcServiceRequest("dbs", "2019-03-06", "ReleaseBackupPlan")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReleaseBackupPlanRequest::~ReleaseBackupPlanRequest()
|
||||
{}
|
||||
|
||||
std::string ReleaseBackupPlanRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ReleaseBackupPlanRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string ReleaseBackupPlanRequest::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
void ReleaseBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
|
||||
{
|
||||
backupPlanId_ = backupPlanId;
|
||||
setParameter("BackupPlanId", backupPlanId);
|
||||
}
|
||||
|
||||
std::string ReleaseBackupPlanRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ReleaseBackupPlanRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
79
dbs/src/model/ReleaseBackupPlanResult.cc
Normal file
79
dbs/src/model/ReleaseBackupPlanResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/ReleaseBackupPlanResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dbs;
|
||||
using namespace AlibabaCloud::Dbs::Model;
|
||||
|
||||
ReleaseBackupPlanResult::ReleaseBackupPlanResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReleaseBackupPlanResult::ReleaseBackupPlanResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReleaseBackupPlanResult::~ReleaseBackupPlanResult()
|
||||
{}
|
||||
|
||||
void ReleaseBackupPlanResult::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 ReleaseBackupPlanResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ReleaseBackupPlanResult::getBackupPlanId()const
|
||||
{
|
||||
return backupPlanId_;
|
||||
}
|
||||
|
||||
std::string ReleaseBackupPlanResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool ReleaseBackupPlanResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ReleaseBackupPlanResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user