| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- /*
- * 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/cassandra/model/DescribeDataCenterResult.h>
- #include <json/json.h>
- using namespace AlibabaCloud::Cassandra;
- using namespace AlibabaCloud::Cassandra::Model;
- DescribeDataCenterResult::DescribeDataCenterResult() :
- ServiceResult()
- {}
- DescribeDataCenterResult::DescribeDataCenterResult(const std::string &payload) :
- ServiceResult()
- {
- parse(payload);
- }
- DescribeDataCenterResult::~DescribeDataCenterResult()
- {}
- void DescribeDataCenterResult::parse(const std::string &payload)
- {
- Json::Reader reader;
- Json::Value value;
- reader.parse(payload, value);
- setRequestId(value["RequestId"].asString());
- if(!value["DataCenterId"].isNull())
- dataCenterId_ = value["DataCenterId"].asString();
- if(!value["RegionId"].isNull())
- regionId_ = value["RegionId"].asString();
- if(!value["ZoneId"].isNull())
- zoneId_ = value["ZoneId"].asString();
- if(!value["ClusterId"].isNull())
- clusterId_ = value["ClusterId"].asString();
- if(!value["DataCenterName"].isNull())
- dataCenterName_ = value["DataCenterName"].asString();
- if(!value["Status"].isNull())
- status_ = value["Status"].asString();
- if(!value["CreatedTime"].isNull())
- createdTime_ = value["CreatedTime"].asString();
- if(!value["InstanceType"].isNull())
- instanceType_ = value["InstanceType"].asString();
- if(!value["NodeCount"].isNull())
- nodeCount_ = std::stoi(value["NodeCount"].asString());
- if(!value["DiskType"].isNull())
- diskType_ = value["DiskType"].asString();
- if(!value["DiskSize"].isNull())
- diskSize_ = std::stoi(value["DiskSize"].asString());
- if(!value["VpcId"].isNull())
- vpcId_ = value["VpcId"].asString();
- if(!value["VswitchId"].isNull())
- vswitchId_ = value["VswitchId"].asString();
- if(!value["PayType"].isNull())
- payType_ = value["PayType"].asString();
- if(!value["CommodityInstance"].isNull())
- commodityInstance_ = value["CommodityInstance"].asString();
- if(!value["ExpireTime"].isNull())
- expireTime_ = value["ExpireTime"].asString();
- if(!value["LockMode"].isNull())
- lockMode_ = value["LockMode"].asString();
- if(!value["AutoRenewal"].isNull())
- autoRenewal_ = value["AutoRenewal"].asString() == "true";
- if(!value["AutoRenewPeriod"].isNull())
- autoRenewPeriod_ = std::stoi(value["AutoRenewPeriod"].asString());
- }
- std::string DescribeDataCenterResult::getStatus()const
- {
- return status_;
- }
- int DescribeDataCenterResult::getAutoRenewPeriod()const
- {
- return autoRenewPeriod_;
- }
- std::string DescribeDataCenterResult::getDataCenterId()const
- {
- return dataCenterId_;
- }
- std::string DescribeDataCenterResult::getCreatedTime()const
- {
- return createdTime_;
- }
- std::string DescribeDataCenterResult::getCommodityInstance()const
- {
- return commodityInstance_;
- }
- std::string DescribeDataCenterResult::getZoneId()const
- {
- return zoneId_;
- }
- int DescribeDataCenterResult::getNodeCount()const
- {
- return nodeCount_;
- }
- std::string DescribeDataCenterResult::getClusterId()const
- {
- return clusterId_;
- }
- std::string DescribeDataCenterResult::getPayType()const
- {
- return payType_;
- }
- std::string DescribeDataCenterResult::getLockMode()const
- {
- return lockMode_;
- }
- std::string DescribeDataCenterResult::getDataCenterName()const
- {
- return dataCenterName_;
- }
- std::string DescribeDataCenterResult::getVswitchId()const
- {
- return vswitchId_;
- }
- std::string DescribeDataCenterResult::getDiskType()const
- {
- return diskType_;
- }
- std::string DescribeDataCenterResult::getVpcId()const
- {
- return vpcId_;
- }
- bool DescribeDataCenterResult::getAutoRenewal()const
- {
- return autoRenewal_;
- }
- int DescribeDataCenterResult::getDiskSize()const
- {
- return diskSize_;
- }
- std::string DescribeDataCenterResult::getRegionId()const
- {
- return regionId_;
- }
- std::string DescribeDataCenterResult::getInstanceType()const
- {
- return instanceType_;
- }
- std::string DescribeDataCenterResult::getExpireTime()const
- {
- return expireTime_;
- }
|