Support DescribeDatabases for page query.

This commit is contained in:
sdk-team
2020-12-21 02:43:26 +00:00
parent cf63bd74d6
commit 6dd27ba3df
30 changed files with 390 additions and 773 deletions

View File

@@ -1563,42 +1563,6 @@ PolardbClient::DescribeGlobalDatabaseNetworksOutcomeCallable PolardbClient::desc
return task->get_future();
}
PolardbClient::DescribeLocalAvailableRecoveryTimeOutcome PolardbClient::describeLocalAvailableRecoveryTime(const DescribeLocalAvailableRecoveryTimeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeLocalAvailableRecoveryTimeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeLocalAvailableRecoveryTimeOutcome(DescribeLocalAvailableRecoveryTimeResult(outcome.result()));
else
return DescribeLocalAvailableRecoveryTimeOutcome(outcome.error());
}
void PolardbClient::describeLocalAvailableRecoveryTimeAsync(const DescribeLocalAvailableRecoveryTimeRequest& request, const DescribeLocalAvailableRecoveryTimeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeLocalAvailableRecoveryTime(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeLocalAvailableRecoveryTimeOutcomeCallable PolardbClient::describeLocalAvailableRecoveryTimeCallable(const DescribeLocalAvailableRecoveryTimeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeLocalAvailableRecoveryTimeOutcome()>>(
[this, request]()
{
return this->describeLocalAvailableRecoveryTime(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeLogBackupPolicyOutcome PolardbClient::describeLogBackupPolicy(const DescribeLogBackupPolicyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1815,42 +1779,6 @@ PolardbClient::DescribeSlowLogRecordsOutcomeCallable PolardbClient::describeSlow
return task->get_future();
}
PolardbClient::DescribeSlowLogsOutcome PolardbClient::describeSlowLogs(const DescribeSlowLogsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeSlowLogsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeSlowLogsOutcome(DescribeSlowLogsResult(outcome.result()));
else
return DescribeSlowLogsOutcome(outcome.error());
}
void PolardbClient::describeSlowLogsAsync(const DescribeSlowLogsRequest& request, const DescribeSlowLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeSlowLogs(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeSlowLogsOutcomeCallable PolardbClient::describeSlowLogsCallable(const DescribeSlowLogsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeSlowLogsOutcome()>>(
[this, request]()
{
return this->describeSlowLogs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeTasksOutcome PolardbClient::describeTasks(const DescribeTasksRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2931,3 +2859,39 @@ PolardbClient::UntagResourcesOutcomeCallable PolardbClient::untagResourcesCallab
return task->get_future();
}
PolardbClient::UpgradeDBClusterMinorVersionOutcome PolardbClient::upgradeDBClusterMinorVersion(const UpgradeDBClusterMinorVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpgradeDBClusterMinorVersionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpgradeDBClusterMinorVersionOutcome(UpgradeDBClusterMinorVersionResult(outcome.result()));
else
return UpgradeDBClusterMinorVersionOutcome(outcome.error());
}
void PolardbClient::upgradeDBClusterMinorVersionAsync(const UpgradeDBClusterMinorVersionRequest& request, const UpgradeDBClusterMinorVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, upgradeDBClusterMinorVersion(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::UpgradeDBClusterMinorVersionOutcomeCallable PolardbClient::upgradeDBClusterMinorVersionCallable(const UpgradeDBClusterMinorVersionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpgradeDBClusterMinorVersionOutcome()>>(
[this, request]()
{
return this->upgradeDBClusterMinorVersion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -71,6 +71,28 @@ void CreateDBLinkRequest::setTargetDBName(const std::string& targetDBName)
setParameter("TargetDBName", targetDBName);
}
std::string CreateDBLinkRequest::getTargetIp()const
{
return targetIp_;
}
void CreateDBLinkRequest::setTargetIp(const std::string& targetIp)
{
targetIp_ = targetIp;
setParameter("TargetIp", targetIp);
}
std::string CreateDBLinkRequest::getRegionId()const
{
return regionId_;
}
void CreateDBLinkRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateDBLinkRequest::getDBLinkName()const
{
return dBLinkName_;
@@ -82,6 +104,17 @@ void CreateDBLinkRequest::setDBLinkName(const std::string& dBLinkName)
setParameter("DBLinkName", dBLinkName);
}
std::string CreateDBLinkRequest::getTargetPort()const
{
return targetPort_;
}
void CreateDBLinkRequest::setTargetPort(const std::string& targetPort)
{
targetPort_ = targetPort;
setParameter("TargetPort", targetPort);
}
std::string CreateDBLinkRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
@@ -159,3 +192,14 @@ void CreateDBLinkRequest::setTargetDBAccount(const std::string& targetDBAccount)
setParameter("TargetDBAccount", targetDBAccount);
}
std::string CreateDBLinkRequest::getVpcId()const
{
return vpcId_;
}
void CreateDBLinkRequest::setVpcId(const std::string& vpcId)
{
vpcId_ = vpcId;
setParameter("VpcId", vpcId);
}

View File

@@ -49,6 +49,17 @@ void CreateDBNodesRequest::setClientToken(const std::string& clientToken)
setParameter("ClientToken", clientToken);
}
std::string CreateDBNodesRequest::getEndpointBindList()const
{
return endpointBindList_;
}
void CreateDBNodesRequest::setEndpointBindList(const std::string& endpointBindList)
{
endpointBindList_ = endpointBindList;
setParameter("EndpointBindList", endpointBindList);
}
std::string CreateDBNodesRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -38,6 +38,17 @@ void DescribeAccountsRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeAccountsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeAccountsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeAccountsRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -60,6 +71,17 @@ void DescribeAccountsRequest::setAccountName(const std::string& accountName)
setParameter("AccountName", accountName);
}
int DescribeAccountsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeAccountsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeAccountsRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;

View File

@@ -69,9 +69,23 @@ void DescribeAccountsResult::parse(const std::string &payload)
}
accounts_.push_back(accountsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
}
int DescribeAccountsResult::getPageRecordCount()const
{
return pageRecordCount_;
}
int DescribeAccountsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeAccountsResult::DBAccount> DescribeAccountsResult::getAccounts()const
{
return accounts_;

View File

@@ -45,22 +45,15 @@ void DescribeDBClusterVersionResult::parse(const std::string &payload)
dBVersion_ = value["DBVersion"].asString();
if(!value["DBMinorVersion"].isNull())
dBMinorVersion_ = value["DBMinorVersion"].asString();
if(!value["DBRevisionVersion"].isNull())
dBRevisionVersion_ = value["DBRevisionVersion"].asString();
if(!value["DBVersionStatus"].isNull())
dBVersionStatus_ = value["DBVersionStatus"].asString();
if(!value["IsLatestVersion"].isNull())
isLatestVersion_ = value["IsLatestVersion"].asString();
if(!value["LatestRevisionVersion"].isNull())
latestRevisionVersion_ = value["LatestRevisionVersion"].asString();
if(!value["DBRevisionVersion"].isNull())
dBRevisionVersion_ = value["DBRevisionVersion"].asString();
}
std::string DescribeDBClusterVersionResult::getLatestRevisionVersion()const
{
return latestRevisionVersion_;
}
std::string DescribeDBClusterVersionResult::getIsLatestVersion()const
{
return isLatestVersion_;

View File

@@ -38,6 +38,17 @@ void DescribeDatabasesRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeDatabasesRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDatabasesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeDatabasesRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -49,6 +60,17 @@ void DescribeDatabasesRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
int DescribeDatabasesRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDatabasesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeDatabasesRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;

View File

@@ -69,6 +69,10 @@ void DescribeDatabasesResult::parse(const std::string &payload)
}
databases_.push_back(databasesObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
}
@@ -77,3 +81,13 @@ std::vector<DescribeDatabasesResult::Database> DescribeDatabasesResult::getDatab
return databases_;
}
int DescribeDatabasesResult::getPageRecordCount()const
{
return pageRecordCount_;
}
int DescribeDatabasesResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -1,106 +0,0 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/DescribeLocalAvailableRecoveryTimeRequest.h>
using AlibabaCloud::Polardb::Model::DescribeLocalAvailableRecoveryTimeRequest;
DescribeLocalAvailableRecoveryTimeRequest::DescribeLocalAvailableRecoveryTimeRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeLocalAvailableRecoveryTime")
{
setMethod(HttpRequest::Method::Post);
}
DescribeLocalAvailableRecoveryTimeRequest::~DescribeLocalAvailableRecoveryTimeRequest()
{}
long DescribeLocalAvailableRecoveryTimeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getSecurityToken()const
{
return securityToken_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DescribeLocalAvailableRecoveryTimeRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -1,65 +0,0 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/DescribeLocalAvailableRecoveryTimeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeLocalAvailableRecoveryTimeResult::DescribeLocalAvailableRecoveryTimeResult() :
ServiceResult()
{}
DescribeLocalAvailableRecoveryTimeResult::DescribeLocalAvailableRecoveryTimeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeLocalAvailableRecoveryTimeResult::~DescribeLocalAvailableRecoveryTimeResult()
{}
void DescribeLocalAvailableRecoveryTimeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["RecoveryEndTime"].isNull())
recoveryEndTime_ = value["RecoveryEndTime"].asString();
if(!value["RecoveryBeginTime"].isNull())
recoveryBeginTime_ = value["RecoveryBeginTime"].asString();
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
}
std::string DescribeLocalAvailableRecoveryTimeResult::getRecoveryEndTime()const
{
return recoveryEndTime_;
}
std::string DescribeLocalAvailableRecoveryTimeResult::getRecoveryBeginTime()const
{
return recoveryBeginTime_;
}
std::string DescribeLocalAvailableRecoveryTimeResult::getDBClusterId()const
{
return dBClusterId_;
}

View File

@@ -1,161 +0,0 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/DescribeSlowLogsRequest.h>
using AlibabaCloud::Polardb::Model::DescribeSlowLogsRequest;
DescribeSlowLogsRequest::DescribeSlowLogsRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeSlowLogs")
{
setMethod(HttpRequest::Method::Post);
}
DescribeSlowLogsRequest::~DescribeSlowLogsRequest()
{}
long DescribeSlowLogsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeSlowLogsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeSlowLogsRequest::getStartTime()const
{
return startTime_;
}
void DescribeSlowLogsRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setParameter("StartTime", startTime);
}
int DescribeSlowLogsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeSlowLogsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeSlowLogsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeSlowLogsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeSlowLogsRequest::getRegionId()const
{
return regionId_;
}
void DescribeSlowLogsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
int DescribeSlowLogsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeSlowLogsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeSlowLogsRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeSlowLogsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeSlowLogsRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeSlowLogsRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeSlowLogsRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeSlowLogsRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DescribeSlowLogsRequest::getEndTime()const
{
return endTime_;
}
void DescribeSlowLogsRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setParameter("EndTime", endTime);
}
long DescribeSlowLogsRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeSlowLogsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeSlowLogsRequest::getDBName()const
{
return dBName_;
}
void DescribeSlowLogsRequest::setDBName(const std::string& dBName)
{
dBName_ = dBName;
setParameter("DBName", dBName);
}

View File

@@ -1,132 +0,0 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/DescribeSlowLogsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeSlowLogsResult::DescribeSlowLogsResult() :
ServiceResult()
{}
DescribeSlowLogsResult::DescribeSlowLogsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeSlowLogsResult::~DescribeSlowLogsResult()
{}
void DescribeSlowLogsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItemsNode = value["Items"]["SQLSlowLog"];
for (auto valueItemsSQLSlowLog : allItemsNode)
{
SQLSlowLog itemsObject;
if(!valueItemsSQLSlowLog["DBNodeId"].isNull())
itemsObject.dBNodeId = valueItemsSQLSlowLog["DBNodeId"].asString();
if(!valueItemsSQLSlowLog["ParseMaxRowCount"].isNull())
itemsObject.parseMaxRowCount = std::stol(valueItemsSQLSlowLog["ParseMaxRowCount"].asString());
if(!valueItemsSQLSlowLog["TotalLockTimes"].isNull())
itemsObject.totalLockTimes = std::stol(valueItemsSQLSlowLog["TotalLockTimes"].asString());
if(!valueItemsSQLSlowLog["DBName"].isNull())
itemsObject.dBName = valueItemsSQLSlowLog["DBName"].asString();
if(!valueItemsSQLSlowLog["MaxExecutionTime"].isNull())
itemsObject.maxExecutionTime = std::stol(valueItemsSQLSlowLog["MaxExecutionTime"].asString());
if(!valueItemsSQLSlowLog["SQLHASH"].isNull())
itemsObject.sQLHASH = valueItemsSQLSlowLog["SQLHASH"].asString();
if(!valueItemsSQLSlowLog["SQLText"].isNull())
itemsObject.sQLText = valueItemsSQLSlowLog["SQLText"].asString();
if(!valueItemsSQLSlowLog["CreateTime"].isNull())
itemsObject.createTime = valueItemsSQLSlowLog["CreateTime"].asString();
if(!valueItemsSQLSlowLog["TotalExecutionTimes"].isNull())
itemsObject.totalExecutionTimes = std::stol(valueItemsSQLSlowLog["TotalExecutionTimes"].asString());
if(!valueItemsSQLSlowLog["ReturnTotalRowCounts"].isNull())
itemsObject.returnTotalRowCounts = std::stol(valueItemsSQLSlowLog["ReturnTotalRowCounts"].asString());
if(!valueItemsSQLSlowLog["TotalExecutionCounts"].isNull())
itemsObject.totalExecutionCounts = std::stol(valueItemsSQLSlowLog["TotalExecutionCounts"].asString());
if(!valueItemsSQLSlowLog["MaxLockTime"].isNull())
itemsObject.maxLockTime = std::stol(valueItemsSQLSlowLog["MaxLockTime"].asString());
if(!valueItemsSQLSlowLog["ReturnMaxRowCount"].isNull())
itemsObject.returnMaxRowCount = std::stol(valueItemsSQLSlowLog["ReturnMaxRowCount"].asString());
if(!valueItemsSQLSlowLog["ParseTotalRowCounts"].isNull())
itemsObject.parseTotalRowCounts = std::stol(valueItemsSQLSlowLog["ParseTotalRowCounts"].asString());
items_.push_back(itemsObject);
}
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
if(!value["StartTime"].isNull())
startTime_ = value["StartTime"].asString();
if(!value["EndTime"].isNull())
endTime_ = value["EndTime"].asString();
if(!value["Engine"].isNull())
engine_ = value["Engine"].asString();
if(!value["TotalRecordCount"].isNull())
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
}
int DescribeSlowLogsResult::getTotalRecordCount()const
{
return totalRecordCount_;
}
int DescribeSlowLogsResult::getPageRecordCount()const
{
return pageRecordCount_;
}
std::string DescribeSlowLogsResult::getEndTime()const
{
return endTime_;
}
int DescribeSlowLogsResult::getPageNumber()const
{
return pageNumber_;
}
std::string DescribeSlowLogsResult::getDBClusterId()const
{
return dBClusterId_;
}
std::string DescribeSlowLogsResult::getStartTime()const
{
return startTime_;
}
std::vector<DescribeSlowLogsResult::SQLSlowLog> DescribeSlowLogsResult::getItems()const
{
return items_;
}
std::string DescribeSlowLogsResult::getEngine()const
{
return engine_;
}

View File

@@ -83,10 +83,8 @@ void DescribeTasksResult::parse(const std::string &payload)
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
if(!value["DBInstanceName"].isNull())
dBInstanceName_ = value["DBInstanceName"].asString();
if(!value["DBInstanceId"].isNull())
dBInstanceId_ = value["DBInstanceId"].asString();
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
}
@@ -115,18 +113,13 @@ int DescribeTasksResult::getPageNumber()const
return pageNumber_;
}
std::string DescribeTasksResult::getDBInstanceId()const
{
return dBInstanceId_;
}
std::string DescribeTasksResult::getStartTime()const
{
return startTime_;
}
std::string DescribeTasksResult::getDBInstanceName()const
std::string DescribeTasksResult::getDBClusterId()const
{
return dBInstanceName_;
return dBClusterId_;
}

View File

@@ -0,0 +1,106 @@
/*
* 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/polardb/model/UpgradeDBClusterMinorVersionRequest.h>
using AlibabaCloud::Polardb::Model::UpgradeDBClusterMinorVersionRequest;
UpgradeDBClusterMinorVersionRequest::UpgradeDBClusterMinorVersionRequest() :
RpcServiceRequest("polardb", "2017-08-01", "UpgradeDBClusterMinorVersion")
{
setMethod(HttpRequest::Method::Post);
}
UpgradeDBClusterMinorVersionRequest::~UpgradeDBClusterMinorVersionRequest()
{}
long UpgradeDBClusterMinorVersionRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void UpgradeDBClusterMinorVersionRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string UpgradeDBClusterMinorVersionRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void UpgradeDBClusterMinorVersionRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string UpgradeDBClusterMinorVersionRequest::getSwitchTimeMode()const
{
return switchTimeMode_;
}
void UpgradeDBClusterMinorVersionRequest::setSwitchTimeMode(const std::string& switchTimeMode)
{
switchTimeMode_ = switchTimeMode;
setParameter("SwitchTimeMode", switchTimeMode);
}
std::string UpgradeDBClusterMinorVersionRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void UpgradeDBClusterMinorVersionRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string UpgradeDBClusterMinorVersionRequest::getDBClusterId()const
{
return dBClusterId_;
}
void UpgradeDBClusterMinorVersionRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string UpgradeDBClusterMinorVersionRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void UpgradeDBClusterMinorVersionRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long UpgradeDBClusterMinorVersionRequest::getOwnerId()const
{
return ownerId_;
}
void UpgradeDBClusterMinorVersionRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,44 @@
/*
* 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/polardb/model/UpgradeDBClusterMinorVersionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
UpgradeDBClusterMinorVersionResult::UpgradeDBClusterMinorVersionResult() :
ServiceResult()
{}
UpgradeDBClusterMinorVersionResult::UpgradeDBClusterMinorVersionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpgradeDBClusterMinorVersionResult::~UpgradeDBClusterMinorVersionResult()
{}
void UpgradeDBClusterMinorVersionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}