Fix DescribeInstances clusterId.
This commit is contained in:
@@ -98,6 +98,17 @@ void DescribeInstancesRequest::setTag(const std::vector<Tag>& tag)
|
||||
}
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getDbType()const
|
||||
{
|
||||
return dbType_;
|
||||
|
||||
@@ -43,80 +43,80 @@ void DescribeInstancesResult::parse(const std::string &payload)
|
||||
for (auto valueInstancesInstance : allInstancesNode)
|
||||
{
|
||||
Instance instancesObject;
|
||||
if(!valueInstancesInstance["InstanceId"].isNull())
|
||||
instancesObject.instanceId = valueInstancesInstance["InstanceId"].asString();
|
||||
if(!valueInstancesInstance["InstanceName"].isNull())
|
||||
instancesObject.instanceName = valueInstancesInstance["InstanceName"].asString();
|
||||
if(!valueInstancesInstance["Status"].isNull())
|
||||
instancesObject.status = valueInstancesInstance["Status"].asString();
|
||||
if(!valueInstancesInstance["PayType"].isNull())
|
||||
instancesObject.payType = valueInstancesInstance["PayType"].asString();
|
||||
if(!valueInstancesInstance["CreatedTime"].isNull())
|
||||
instancesObject.createdTime = valueInstancesInstance["CreatedTime"].asString();
|
||||
if(!valueInstancesInstance["ExpireTime"].isNull())
|
||||
instancesObject.expireTime = valueInstancesInstance["ExpireTime"].asString();
|
||||
if(!valueInstancesInstance["MajorVersion"].isNull())
|
||||
instancesObject.majorVersion = valueInstancesInstance["MajorVersion"].asString();
|
||||
if(!valueInstancesInstance["Engine"].isNull())
|
||||
instancesObject.engine = valueInstancesInstance["Engine"].asString();
|
||||
if(!valueInstancesInstance["IsHa"].isNull())
|
||||
instancesObject.isHa = valueInstancesInstance["IsHa"].asString() == "true";
|
||||
if(!valueInstancesInstance["NetworkType"].isNull())
|
||||
instancesObject.networkType = valueInstancesInstance["NetworkType"].asString();
|
||||
if(!valueInstancesInstance["VpcId"].isNull())
|
||||
instancesObject.vpcId = valueInstancesInstance["VpcId"].asString();
|
||||
if(!valueInstancesInstance["VswitchId"].isNull())
|
||||
instancesObject.vswitchId = valueInstancesInstance["VswitchId"].asString();
|
||||
if(!valueInstancesInstance["MasterInstanceType"].isNull())
|
||||
instancesObject.masterInstanceType = valueInstancesInstance["MasterInstanceType"].asString();
|
||||
if(!valueInstancesInstance["MasterNodeCount"].isNull())
|
||||
instancesObject.masterNodeCount = std::stoi(valueInstancesInstance["MasterNodeCount"].asString());
|
||||
if(!valueInstancesInstance["MasterDiskType"].isNull())
|
||||
instancesObject.masterDiskType = valueInstancesInstance["MasterDiskType"].asString();
|
||||
if(!valueInstancesInstance["MasterDiskSize"].isNull())
|
||||
instancesObject.masterDiskSize = std::stoi(valueInstancesInstance["MasterDiskSize"].asString());
|
||||
if(!valueInstancesInstance["CoreInstanceType"].isNull())
|
||||
instancesObject.coreInstanceType = valueInstancesInstance["CoreInstanceType"].asString();
|
||||
if(!valueInstancesInstance["CoreNodeCount"].isNull())
|
||||
instancesObject.coreNodeCount = std::stoi(valueInstancesInstance["CoreNodeCount"].asString());
|
||||
if(!valueInstancesInstance["CoreDiskType"].isNull())
|
||||
instancesObject.coreDiskType = valueInstancesInstance["CoreDiskType"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskSize"].isNull())
|
||||
instancesObject.coreDiskSize = std::stoi(valueInstancesInstance["CoreDiskSize"].asString());
|
||||
if(!valueInstancesInstance["RegionId"].isNull())
|
||||
instancesObject.regionId = valueInstancesInstance["RegionId"].asString();
|
||||
if(!valueInstancesInstance["ZoneId"].isNull())
|
||||
instancesObject.zoneId = valueInstancesInstance["ZoneId"].asString();
|
||||
if(!valueInstancesInstance["ColdStorageStatus"].isNull())
|
||||
instancesObject.coldStorageStatus = valueInstancesInstance["ColdStorageStatus"].asString();
|
||||
if(!valueInstancesInstance["BackupStatus"].isNull())
|
||||
instancesObject.backupStatus = valueInstancesInstance["BackupStatus"].asString();
|
||||
if(!valueInstancesInstance["ClusterType"].isNull())
|
||||
instancesObject.clusterType = valueInstancesInstance["ClusterType"].asString();
|
||||
if(!valueInstancesInstance["CreatedTimeUTC"].isNull())
|
||||
instancesObject.createdTimeUTC = valueInstancesInstance["CreatedTimeUTC"].asString();
|
||||
if(!valueInstancesInstance["ExpireTimeUTC"].isNull())
|
||||
instancesObject.expireTimeUTC = valueInstancesInstance["ExpireTimeUTC"].asString();
|
||||
if(!valueInstancesInstance["ClusterId"].isNull())
|
||||
instancesObject.clusterId = valueInstancesInstance["ClusterId"].asString();
|
||||
if(!valueInstancesInstance["ClusterName"].isNull())
|
||||
instancesObject.clusterName = valueInstancesInstance["ClusterName"].asString();
|
||||
if(!valueInstancesInstance["IsDeletionProtection"].isNull())
|
||||
instancesObject.isDeletionProtection = valueInstancesInstance["IsDeletionProtection"].asString() == "true";
|
||||
if(!valueInstancesInstance["ParentId"].isNull())
|
||||
instancesObject.parentId = valueInstancesInstance["ParentId"].asString();
|
||||
if(!valueInstancesInstance["Status"].isNull())
|
||||
instancesObject.status = valueInstancesInstance["Status"].asString();
|
||||
if(!valueInstancesInstance["ModuleId"].isNull())
|
||||
instancesObject.moduleId = std::stoi(valueInstancesInstance["ModuleId"].asString());
|
||||
if(!valueInstancesInstance["ModuleStackVersion"].isNull())
|
||||
instancesObject.moduleStackVersion = valueInstancesInstance["ModuleStackVersion"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskCount"].isNull())
|
||||
instancesObject.coreDiskCount = valueInstancesInstance["CoreDiskCount"].asString();
|
||||
if(!valueInstancesInstance["VswitchId"].isNull())
|
||||
instancesObject.vswitchId = valueInstancesInstance["VswitchId"].asString();
|
||||
if(!valueInstancesInstance["BackupStatus"].isNull())
|
||||
instancesObject.backupStatus = valueInstancesInstance["BackupStatus"].asString();
|
||||
if(!valueInstancesInstance["PayType"].isNull())
|
||||
instancesObject.payType = valueInstancesInstance["PayType"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskType"].isNull())
|
||||
instancesObject.coreDiskType = valueInstancesInstance["CoreDiskType"].asString();
|
||||
if(!valueInstancesInstance["MasterNodeCount"].isNull())
|
||||
instancesObject.masterNodeCount = std::stoi(valueInstancesInstance["MasterNodeCount"].asString());
|
||||
if(!valueInstancesInstance["NetworkType"].isNull())
|
||||
instancesObject.networkType = valueInstancesInstance["NetworkType"].asString();
|
||||
if(!valueInstancesInstance["CreatedTimeUTC"].isNull())
|
||||
instancesObject.createdTimeUTC = valueInstancesInstance["CreatedTimeUTC"].asString();
|
||||
if(!valueInstancesInstance["ParentId"].isNull())
|
||||
instancesObject.parentId = valueInstancesInstance["ParentId"].asString();
|
||||
if(!valueInstancesInstance["ExpireTimeUTC"].isNull())
|
||||
instancesObject.expireTimeUTC = valueInstancesInstance["ExpireTimeUTC"].asString();
|
||||
if(!valueInstancesInstance["InstanceName"].isNull())
|
||||
instancesObject.instanceName = valueInstancesInstance["InstanceName"].asString();
|
||||
if(!valueInstancesInstance["MasterInstanceType"].isNull())
|
||||
instancesObject.masterInstanceType = valueInstancesInstance["MasterInstanceType"].asString();
|
||||
if(!valueInstancesInstance["CoreInstanceType"].isNull())
|
||||
instancesObject.coreInstanceType = valueInstancesInstance["CoreInstanceType"].asString();
|
||||
if(!valueInstancesInstance["CreatedTime"].isNull())
|
||||
instancesObject.createdTime = valueInstancesInstance["CreatedTime"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskSize"].isNull())
|
||||
instancesObject.coreDiskSize = std::stoi(valueInstancesInstance["CoreDiskSize"].asString());
|
||||
if(!valueInstancesInstance["ClusterId"].isNull())
|
||||
instancesObject.clusterId = valueInstancesInstance["ClusterId"].asString();
|
||||
if(!valueInstancesInstance["ExpireTime"].isNull())
|
||||
instancesObject.expireTime = valueInstancesInstance["ExpireTime"].asString();
|
||||
if(!valueInstancesInstance["IsHa"].isNull())
|
||||
instancesObject.isHa = valueInstancesInstance["IsHa"].asString() == "true";
|
||||
if(!valueInstancesInstance["InstanceId"].isNull())
|
||||
instancesObject.instanceId = valueInstancesInstance["InstanceId"].asString();
|
||||
if(!valueInstancesInstance["ColdStorageStatus"].isNull())
|
||||
instancesObject.coldStorageStatus = valueInstancesInstance["ColdStorageStatus"].asString();
|
||||
if(!valueInstancesInstance["IsDeletionProtection"].isNull())
|
||||
instancesObject.isDeletionProtection = valueInstancesInstance["IsDeletionProtection"].asString() == "true";
|
||||
if(!valueInstancesInstance["RegionId"].isNull())
|
||||
instancesObject.regionId = valueInstancesInstance["RegionId"].asString();
|
||||
if(!valueInstancesInstance["MasterDiskSize"].isNull())
|
||||
instancesObject.masterDiskSize = std::stoi(valueInstancesInstance["MasterDiskSize"].asString());
|
||||
if(!valueInstancesInstance["MasterDiskType"].isNull())
|
||||
instancesObject.masterDiskType = valueInstancesInstance["MasterDiskType"].asString();
|
||||
if(!valueInstancesInstance["AutoRenewal"].isNull())
|
||||
instancesObject.autoRenewal = valueInstancesInstance["AutoRenewal"].asString() == "true";
|
||||
if(!valueInstancesInstance["Duration"].isNull())
|
||||
instancesObject.duration = std::stoi(valueInstancesInstance["Duration"].asString());
|
||||
if(!valueInstancesInstance["ClusterType"].isNull())
|
||||
instancesObject.clusterType = valueInstancesInstance["ClusterType"].asString();
|
||||
if(!valueInstancesInstance["ResourceGroupId"].isNull())
|
||||
instancesObject.resourceGroupId = valueInstancesInstance["ResourceGroupId"].asString();
|
||||
if(!valueInstancesInstance["ClusterName"].isNull())
|
||||
instancesObject.clusterName = valueInstancesInstance["ClusterName"].asString();
|
||||
if(!valueInstancesInstance["ZoneId"].isNull())
|
||||
instancesObject.zoneId = valueInstancesInstance["ZoneId"].asString();
|
||||
if(!valueInstancesInstance["Duration"].isNull())
|
||||
instancesObject.duration = std::stoi(valueInstancesInstance["Duration"].asString());
|
||||
if(!valueInstancesInstance["ModuleStackVersion"].isNull())
|
||||
instancesObject.moduleStackVersion = valueInstancesInstance["ModuleStackVersion"].asString();
|
||||
if(!valueInstancesInstance["Engine"].isNull())
|
||||
instancesObject.engine = valueInstancesInstance["Engine"].asString();
|
||||
if(!valueInstancesInstance["MajorVersion"].isNull())
|
||||
instancesObject.majorVersion = valueInstancesInstance["MajorVersion"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskCount"].isNull())
|
||||
instancesObject.coreDiskCount = valueInstancesInstance["CoreDiskCount"].asString();
|
||||
if(!valueInstancesInstance["CoreNodeCount"].isNull())
|
||||
instancesObject.coreNodeCount = std::stoi(valueInstancesInstance["CoreNodeCount"].asString());
|
||||
auto allTagsNode = valueInstancesInstance["Tags"]["Tag"];
|
||||
for (auto valueInstancesInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
@@ -129,12 +129,12 @@ void DescribeInstancesResult::parse(const std::string &payload)
|
||||
}
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user