Generated 2017-08-01 for polardb.
This commit is contained in:
@@ -2823,42 +2823,6 @@ PolardbClient::DescribeSlowLogsOutcomeCallable PolardbClient::describeSlowLogsCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeStoragePlanOutcome PolardbClient::describeStoragePlan(const DescribeStoragePlanRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeStoragePlanOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeStoragePlanOutcome(DescribeStoragePlanResult(outcome.result()));
|
||||
else
|
||||
return DescribeStoragePlanOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::describeStoragePlanAsync(const DescribeStoragePlanRequest& request, const DescribeStoragePlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeStoragePlan(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::DescribeStoragePlanOutcomeCallable PolardbClient::describeStoragePlanCallable(const DescribeStoragePlanRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeStoragePlanOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeStoragePlan(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeTasksOutcome PolardbClient::describeTasks(const DescribeTasksRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2895,6 +2859,42 @@ PolardbClient::DescribeTasksOutcomeCallable PolardbClient::describeTasksCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeVSwitchesOutcome PolardbClient::describeVSwitches(const DescribeVSwitchesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeVSwitchesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeVSwitchesOutcome(DescribeVSwitchesResult(outcome.result()));
|
||||
else
|
||||
return DescribeVSwitchesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::describeVSwitchesAsync(const DescribeVSwitchesRequest& request, const DescribeVSwitchesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeVSwitches(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::DescribeVSwitchesOutcomeCallable PolardbClient::describeVSwitchesCallable(const DescribeVSwitchesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeVSwitchesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeVSwitches(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::EnableFirewallRulesOutcome PolardbClient::enableFirewallRules(const EnableFirewallRulesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -192,6 +192,15 @@ void CreateDBClusterRequest::setAutoRenew(bool autoRenew) {
|
||||
setParameter(std::string("AutoRenew"), autoRenew ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateDBClusterRequest::getHotStandbyCluster() const {
|
||||
return hotStandbyCluster_;
|
||||
}
|
||||
|
||||
void CreateDBClusterRequest::setHotStandbyCluster(const std::string &hotStandbyCluster) {
|
||||
hotStandbyCluster_ = hotStandbyCluster;
|
||||
setParameter(std::string("HotStandbyCluster"), hotStandbyCluster);
|
||||
}
|
||||
|
||||
std::string CreateDBClusterRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
@@ -390,6 +399,15 @@ void CreateDBClusterRequest::setPayType(const std::string &payType) {
|
||||
setParameter(std::string("PayType"), payType);
|
||||
}
|
||||
|
||||
long CreateDBClusterRequest::getStorageSpace() const {
|
||||
return storageSpace_;
|
||||
}
|
||||
|
||||
void CreateDBClusterRequest::setStorageSpace(long storageSpace) {
|
||||
storageSpace_ = storageSpace;
|
||||
setParameter(std::string("StorageSpace"), std::to_string(storageSpace));
|
||||
}
|
||||
|
||||
std::string CreateDBClusterRequest::getServerlessType() const {
|
||||
return serverlessType_;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ void DescribeClassListResult::parse(const std::string &payload)
|
||||
for (auto valueItemsItemsItem : allItemsNode)
|
||||
{
|
||||
ItemsItem itemsObject;
|
||||
if(!valueItemsItemsItem["MaxIOPS"].isNull())
|
||||
itemsObject.maxIOPS = valueItemsItemsItem["MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["Psl4MaxIOPS"].isNull())
|
||||
itemsObject.psl4MaxIOPS = valueItemsItemsItem["Psl4MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["ClassTypeLevel"].isNull())
|
||||
itemsObject.classTypeLevel = valueItemsItemsItem["ClassTypeLevel"].asString();
|
||||
if(!valueItemsItemsItem["Cpu"].isNull())
|
||||
@@ -59,6 +59,18 @@ void DescribeClassListResult::parse(const std::string &payload)
|
||||
itemsObject.classCode = valueItemsItemsItem["ClassCode"].asString();
|
||||
if(!valueItemsItemsItem["ClassGroup"].isNull())
|
||||
itemsObject.classGroup = valueItemsItemsItem["ClassGroup"].asString();
|
||||
if(!valueItemsItemsItem["Psl5MaxIOPS"].isNull())
|
||||
itemsObject.psl5MaxIOPS = valueItemsItemsItem["Psl5MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["MaxIOPS"].isNull())
|
||||
itemsObject.maxIOPS = valueItemsItemsItem["MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["MaxStorageCapacity"].isNull())
|
||||
itemsObject.maxStorageCapacity = valueItemsItemsItem["MaxStorageCapacity"].asString();
|
||||
if(!valueItemsItemsItem["Pl1MaxIOPS"].isNull())
|
||||
itemsObject.pl1MaxIOPS = valueItemsItemsItem["Pl1MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["Pl2MaxIOPS"].isNull())
|
||||
itemsObject.pl2MaxIOPS = valueItemsItemsItem["Pl2MaxIOPS"].asString();
|
||||
if(!valueItemsItemsItem["Pl3MaxIOPS"].isNull())
|
||||
itemsObject.pl3MaxIOPS = valueItemsItemsItem["Pl3MaxIOPS"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["RegionId"].isNull())
|
||||
|
||||
@@ -51,6 +51,8 @@ void DescribeDatabasesResult::parse(const std::string &payload)
|
||||
databasesObject.dBName = valueDatabasesDatabase["DBName"].asString();
|
||||
if(!valueDatabasesDatabase["Engine"].isNull())
|
||||
databasesObject.engine = valueDatabasesDatabase["Engine"].asString();
|
||||
if(!valueDatabasesDatabase["MasterID"].isNull())
|
||||
databasesObject.masterID = valueDatabasesDatabase["MasterID"].asString();
|
||||
if(!valueDatabasesDatabase["CharacterSetName"].isNull())
|
||||
databasesObject.characterSetName = valueDatabasesDatabase["CharacterSetName"].asString();
|
||||
auto allAccountsNode = valueDatabasesDatabase["Accounts"]["Account"];
|
||||
|
||||
@@ -119,6 +119,10 @@ void DescribeGlobalDatabaseNetworkResult::parse(const std::string &payload)
|
||||
dBType_ = value["DBType"].asString();
|
||||
if(!value["GDNDescription"].isNull())
|
||||
gDNDescription_ = value["GDNDescription"].asString();
|
||||
if(!value["DBClusterId"].isNull())
|
||||
dBClusterId_ = value["DBClusterId"].asString();
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -142,11 +146,21 @@ std::string DescribeGlobalDatabaseNetworkResult::getGDNId()const
|
||||
return gDNId_;
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworkResult::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworkResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworkResult::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworkResult::getDBType()const
|
||||
{
|
||||
return dBType_;
|
||||
|
||||
@@ -61,6 +61,15 @@ void DescribeGlobalDatabaseNetworksRequest::setResourceGroupId(const std::string
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getFilterRegion() const {
|
||||
return filterRegion_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setFilterRegion(const std::string &filterRegion) {
|
||||
filterRegion_ = filterRegion;
|
||||
setParameter(std::string("FilterRegion"), filterRegion);
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getSecurityToken() const {
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
@@ -1,99 +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/DescribeStoragePlanRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::DescribeStoragePlanRequest;
|
||||
|
||||
DescribeStoragePlanRequest::DescribeStoragePlanRequest()
|
||||
: RpcServiceRequest("polardb", "2017-08-01", "DescribeStoragePlan") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeStoragePlanRequest::~DescribeStoragePlanRequest() {}
|
||||
|
||||
long DescribeStoragePlanRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
int DescribeStoragePlanRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeStoragePlanRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeStoragePlanRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
int DescribeStoragePlanRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeStoragePlanRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeStoragePlanRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeStoragePlanRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeStoragePlanRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
@@ -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/DescribeStoragePlanResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
DescribeStoragePlanResult::DescribeStoragePlanResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeStoragePlanResult::DescribeStoragePlanResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeStoragePlanResult::~DescribeStoragePlanResult()
|
||||
{}
|
||||
|
||||
void DescribeStoragePlanResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItemsNode = value["Items"]["DescribeStoragePlanResponses"];
|
||||
for (auto valueItemsDescribeStoragePlanResponses : allItemsNode)
|
||||
{
|
||||
DescribeStoragePlanResponses itemsObject;
|
||||
if(!valueItemsDescribeStoragePlanResponses["ProdCode"].isNull())
|
||||
itemsObject.prodCode = valueItemsDescribeStoragePlanResponses["ProdCode"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["AliUid"].isNull())
|
||||
itemsObject.aliUid = valueItemsDescribeStoragePlanResponses["AliUid"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["CommodityCode"].isNull())
|
||||
itemsObject.commodityCode = valueItemsDescribeStoragePlanResponses["CommodityCode"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["TemplateName"].isNull())
|
||||
itemsObject.templateName = valueItemsDescribeStoragePlanResponses["TemplateName"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["StorageType"].isNull())
|
||||
itemsObject.storageType = valueItemsDescribeStoragePlanResponses["StorageType"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["Status"].isNull())
|
||||
itemsObject.status = valueItemsDescribeStoragePlanResponses["Status"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["StartTimes"].isNull())
|
||||
itemsObject.startTimes = valueItemsDescribeStoragePlanResponses["StartTimes"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["EndTimes"].isNull())
|
||||
itemsObject.endTimes = valueItemsDescribeStoragePlanResponses["EndTimes"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["PurchaseTimes"].isNull())
|
||||
itemsObject.purchaseTimes = valueItemsDescribeStoragePlanResponses["PurchaseTimes"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["InstanceId"].isNull())
|
||||
itemsObject.instanceId = valueItemsDescribeStoragePlanResponses["InstanceId"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["InitCapacityViewValue"].isNull())
|
||||
itemsObject.initCapacityViewValue = valueItemsDescribeStoragePlanResponses["InitCapacityViewValue"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["InitCapaCityViewUnit"].isNull())
|
||||
itemsObject.initCapaCityViewUnit = valueItemsDescribeStoragePlanResponses["InitCapaCityViewUnit"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["PeriodCapacityViewValue"].isNull())
|
||||
itemsObject.periodCapacityViewValue = valueItemsDescribeStoragePlanResponses["PeriodCapacityViewValue"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["PeriodCapaCityViewUnit"].isNull())
|
||||
itemsObject.periodCapaCityViewUnit = valueItemsDescribeStoragePlanResponses["PeriodCapaCityViewUnit"].asString();
|
||||
if(!valueItemsDescribeStoragePlanResponses["PeriodTime"].isNull())
|
||||
itemsObject.periodTime = valueItemsDescribeStoragePlanResponses["PeriodTime"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stol(value["TotalRecordCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stol(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stol(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
long DescribeStoragePlanResult::getTotalRecordCount()const
|
||||
{
|
||||
return totalRecordCount_;
|
||||
}
|
||||
|
||||
long DescribeStoragePlanResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
long DescribeStoragePlanResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<DescribeStoragePlanResult::DescribeStoragePlanResponses> DescribeStoragePlanResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
144
polardb/src/model/DescribeVSwitchesRequest.cc
Normal file
144
polardb/src/model/DescribeVSwitchesRequest.cc
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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/DescribeVSwitchesRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::DescribeVSwitchesRequest;
|
||||
|
||||
DescribeVSwitchesRequest::DescribeVSwitchesRequest()
|
||||
: RpcServiceRequest("polardb", "2017-08-01", "DescribeVSwitches") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeVSwitchesRequest::~DescribeVSwitchesRequest() {}
|
||||
|
||||
long DescribeVSwitchesRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
int DescribeVSwitchesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getSecurityToken() const {
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setSecurityToken(const std::string &securityToken) {
|
||||
securityToken_ = securityToken;
|
||||
setParameter(std::string("SecurityToken"), securityToken);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
int DescribeVSwitchesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getDedicatedHostGroupId() const {
|
||||
return dedicatedHostGroupId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setDedicatedHostGroupId(const std::string &dedicatedHostGroupId) {
|
||||
dedicatedHostGroupId_ = dedicatedHostGroupId;
|
||||
setParameter(std::string("DedicatedHostGroupId"), dedicatedHostGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeVSwitchesRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
std::string DescribeVSwitchesRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void DescribeVSwitchesRequest::setZoneId(const std::string &zoneId) {
|
||||
zoneId_ = zoneId;
|
||||
setParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
102
polardb/src/model/DescribeVSwitchesResult.cc
Normal file
102
polardb/src/model/DescribeVSwitchesResult.cc
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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/DescribeVSwitchesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
DescribeVSwitchesResult::DescribeVSwitchesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeVSwitchesResult::DescribeVSwitchesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeVSwitchesResult::~DescribeVSwitchesResult()
|
||||
{}
|
||||
|
||||
void DescribeVSwitchesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allVSwitchsNode = value["VSwitchs"]["VSwitch"];
|
||||
for (auto valueVSwitchsVSwitch : allVSwitchsNode)
|
||||
{
|
||||
VSwitch vSwitchsObject;
|
||||
if(!valueVSwitchsVSwitch["AliUid"].isNull())
|
||||
vSwitchsObject.aliUid = valueVSwitchsVSwitch["AliUid"].asString();
|
||||
if(!valueVSwitchsVSwitch["Bid"].isNull())
|
||||
vSwitchsObject.bid = valueVSwitchsVSwitch["Bid"].asString();
|
||||
if(!valueVSwitchsVSwitch["CidrBlock"].isNull())
|
||||
vSwitchsObject.cidrBlock = valueVSwitchsVSwitch["CidrBlock"].asString();
|
||||
if(!valueVSwitchsVSwitch["Description"].isNull())
|
||||
vSwitchsObject.description = valueVSwitchsVSwitch["Description"].asString();
|
||||
if(!valueVSwitchsVSwitch["GmtCreate"].isNull())
|
||||
vSwitchsObject.gmtCreate = valueVSwitchsVSwitch["GmtCreate"].asString();
|
||||
if(!valueVSwitchsVSwitch["GmtModified"].isNull())
|
||||
vSwitchsObject.gmtModified = valueVSwitchsVSwitch["GmtModified"].asString();
|
||||
if(!valueVSwitchsVSwitch["IsDefault"].isNull())
|
||||
vSwitchsObject.isDefault = valueVSwitchsVSwitch["IsDefault"].asString() == "true";
|
||||
if(!valueVSwitchsVSwitch["IzNo"].isNull())
|
||||
vSwitchsObject.izNo = valueVSwitchsVSwitch["IzNo"].asString();
|
||||
if(!valueVSwitchsVSwitch["RegionNo"].isNull())
|
||||
vSwitchsObject.regionNo = valueVSwitchsVSwitch["RegionNo"].asString();
|
||||
if(!valueVSwitchsVSwitch["Status"].isNull())
|
||||
vSwitchsObject.status = valueVSwitchsVSwitch["Status"].asString();
|
||||
if(!valueVSwitchsVSwitch["VSwitchId"].isNull())
|
||||
vSwitchsObject.vSwitchId = valueVSwitchsVSwitch["VSwitchId"].asString();
|
||||
if(!valueVSwitchsVSwitch["VSwitchName"].isNull())
|
||||
vSwitchsObject.vSwitchName = valueVSwitchsVSwitch["VSwitchName"].asString();
|
||||
if(!valueVSwitchsVSwitch["AvailableIpAddressCount"].isNull())
|
||||
vSwitchsObject.availableIpAddressCount = std::stol(valueVSwitchsVSwitch["AvailableIpAddressCount"].asString());
|
||||
vSwitchs_.push_back(vSwitchsObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeVSwitchesResult::VSwitch> DescribeVSwitchesResult::getVSwitchs()const
|
||||
{
|
||||
return vSwitchs_;
|
||||
}
|
||||
|
||||
int DescribeVSwitchesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeVSwitchesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeVSwitchesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user