Supported ScaleApp totalPartitions.
This commit is contained in:
@@ -40,60 +40,60 @@ void DescribeDeployOrderDetailResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["AppInstanceType"].isNull())
|
||||
result_.appInstanceType = resultNode["AppInstanceType"].asString();
|
||||
if(!resultNode["CurrentPartitionNum"].isNull())
|
||||
result_.currentPartitionNum = std::stoi(resultNode["CurrentPartitionNum"].asString());
|
||||
if(!resultNode["DeployOrderId"].isNull())
|
||||
result_.deployOrderId = std::stol(resultNode["DeployOrderId"].asString());
|
||||
if(!resultNode["DeployPauseType"].isNull())
|
||||
result_.deployPauseType = resultNode["DeployPauseType"].asString();
|
||||
if(!resultNode["DeployPauseTypeName"].isNull())
|
||||
result_.deployPauseTypeName = resultNode["DeployPauseTypeName"].asString();
|
||||
if(!resultNode["DeployType"].isNull())
|
||||
result_.deployType = resultNode["DeployType"].asString();
|
||||
if(!resultNode["DeployTypeName"].isNull())
|
||||
result_.deployTypeName = resultNode["DeployTypeName"].asString();
|
||||
if(!resultNode["Description"].isNull())
|
||||
result_.description = resultNode["Description"].asString();
|
||||
if(!resultNode["ElapsedTime"].isNull())
|
||||
result_.elapsedTime = std::stoi(resultNode["ElapsedTime"].asString());
|
||||
if(!resultNode["EndTime"].isNull())
|
||||
result_.endTime = resultNode["EndTime"].asString();
|
||||
if(!resultNode["EnvId"].isNull())
|
||||
result_.envId = std::stol(resultNode["EnvId"].asString());
|
||||
if(!resultNode["EnvType"].isNull())
|
||||
result_.envType = resultNode["EnvType"].asString();
|
||||
if(!resultNode["FailureRate"].isNull())
|
||||
result_.failureRate = resultNode["FailureRate"].asString();
|
||||
if(!resultNode["FinishAppInstanceCt"].isNull())
|
||||
result_.finishAppInstanceCt = std::stoi(resultNode["FinishAppInstanceCt"].asString());
|
||||
if(!resultNode["Name"].isNull())
|
||||
result_.name = resultNode["Name"].asString();
|
||||
if(!resultNode["PartitionType"].isNull())
|
||||
result_.partitionType = resultNode["PartitionType"].asString();
|
||||
if(!resultNode["PartitionTypeName"].isNull())
|
||||
result_.partitionTypeName = resultNode["PartitionTypeName"].asString();
|
||||
if(!resultNode["Result"].isNull())
|
||||
result_.result = std::stoi(resultNode["Result"].asString());
|
||||
if(!resultNode["ResultName"].isNull())
|
||||
result_.resultName = resultNode["ResultName"].asString();
|
||||
if(!resultNode["SchemaId"].isNull())
|
||||
result_.schemaId = std::stol(resultNode["SchemaId"].asString());
|
||||
if(!resultNode["StartTime"].isNull())
|
||||
result_.startTime = resultNode["StartTime"].asString();
|
||||
if(!resultNode["Status"].isNull())
|
||||
result_.status = std::stoi(resultNode["Status"].asString());
|
||||
if(!resultNode["StatusName"].isNull())
|
||||
result_.statusName = resultNode["StatusName"].asString();
|
||||
if(!resultNode["TotalAppInstanceCt"].isNull())
|
||||
result_.totalAppInstanceCt = std::stoi(resultNode["TotalAppInstanceCt"].asString());
|
||||
if(!resultNode["TotalPartitions"].isNull())
|
||||
result_.totalPartitions = std::stoi(resultNode["TotalPartitions"].asString());
|
||||
if(!resultNode["AppInstanceType"].isNull())
|
||||
result_.appInstanceType = resultNode["AppInstanceType"].asString();
|
||||
if(!resultNode["DeployType"].isNull())
|
||||
result_.deployType = resultNode["DeployType"].asString();
|
||||
if(!resultNode["UserId"].isNull())
|
||||
result_.userId = resultNode["UserId"].asString();
|
||||
if(!resultNode["PartitionTypeName"].isNull())
|
||||
result_.partitionTypeName = resultNode["PartitionTypeName"].asString();
|
||||
if(!resultNode["StatusName"].isNull())
|
||||
result_.statusName = resultNode["StatusName"].asString();
|
||||
if(!resultNode["EnvType"].isNull())
|
||||
result_.envType = resultNode["EnvType"].asString();
|
||||
if(!resultNode["TotalAppInstanceCt"].isNull())
|
||||
result_.totalAppInstanceCt = std::stoi(resultNode["TotalAppInstanceCt"].asString());
|
||||
if(!resultNode["ElapsedTime"].isNull())
|
||||
result_.elapsedTime = std::stoi(resultNode["ElapsedTime"].asString());
|
||||
if(!resultNode["Description"].isNull())
|
||||
result_.description = resultNode["Description"].asString();
|
||||
if(!resultNode["Name"].isNull())
|
||||
result_.name = resultNode["Name"].asString();
|
||||
if(!resultNode["DeployTypeName"].isNull())
|
||||
result_.deployTypeName = resultNode["DeployTypeName"].asString();
|
||||
if(!resultNode["FinishAppInstanceCt"].isNull())
|
||||
result_.finishAppInstanceCt = std::stoi(resultNode["FinishAppInstanceCt"].asString());
|
||||
if(!resultNode["SchemaId"].isNull())
|
||||
result_.schemaId = std::stol(resultNode["SchemaId"].asString());
|
||||
if(!resultNode["DeployPauseType"].isNull())
|
||||
result_.deployPauseType = resultNode["DeployPauseType"].asString();
|
||||
if(!resultNode["Result"].isNull())
|
||||
result_.result = std::stoi(resultNode["Result"].asString());
|
||||
if(!resultNode["FailureRate"].isNull())
|
||||
result_.failureRate = resultNode["FailureRate"].asString();
|
||||
if(!resultNode["TotalPartitions"].isNull())
|
||||
result_.totalPartitions = std::stoi(resultNode["TotalPartitions"].asString());
|
||||
if(!resultNode["UserNick"].isNull())
|
||||
result_.userNick = resultNode["UserNick"].asString();
|
||||
if(!resultNode["EndTime"].isNull())
|
||||
result_.endTime = resultNode["EndTime"].asString();
|
||||
if(!resultNode["StartTime"].isNull())
|
||||
result_.startTime = resultNode["StartTime"].asString();
|
||||
if(!resultNode["DeployOrderId"].isNull())
|
||||
result_.deployOrderId = std::stol(resultNode["DeployOrderId"].asString());
|
||||
if(!resultNode["DeployPauseTypeName"].isNull())
|
||||
result_.deployPauseTypeName = resultNode["DeployPauseTypeName"].asString();
|
||||
if(!resultNode["ResultName"].isNull())
|
||||
result_.resultName = resultNode["ResultName"].asString();
|
||||
if(!resultNode["CurrentPartitionNum"].isNull())
|
||||
result_.currentPartitionNum = std::stoi(resultNode["CurrentPartitionNum"].asString());
|
||||
if(!resultNode["PartitionType"].isNull())
|
||||
result_.partitionType = resultNode["PartitionType"].asString();
|
||||
if(!resultNode["EnvId"].isNull())
|
||||
result_.envId = std::stol(resultNode["EnvId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["ErrMsg"].isNull())
|
||||
|
||||
@@ -27,6 +27,17 @@ ScaleAppRequest::ScaleAppRequest() :
|
||||
ScaleAppRequest::~ScaleAppRequest()
|
||||
{}
|
||||
|
||||
int ScaleAppRequest::getTotalPartitions()const
|
||||
{
|
||||
return totalPartitions_;
|
||||
}
|
||||
|
||||
void ScaleAppRequest::setTotalPartitions(int totalPartitions)
|
||||
{
|
||||
totalPartitions_ = totalPartitions;
|
||||
setParameter("TotalPartitions", std::to_string(totalPartitions));
|
||||
}
|
||||
|
||||
int ScaleAppRequest::getReplicas()const
|
||||
{
|
||||
return replicas_;
|
||||
|
||||
@@ -40,12 +40,12 @@ void ScaleAppResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["Admitted"].isNull())
|
||||
result_.admitted = resultNode["Admitted"].asString() == "true";
|
||||
if(!resultNode["BusinessCode"].isNull())
|
||||
result_.businessCode = resultNode["BusinessCode"].asString();
|
||||
if(!resultNode["DeployOrderId"].isNull())
|
||||
result_.deployOrderId = std::stol(resultNode["DeployOrderId"].asString());
|
||||
if(!resultNode["Admitted"].isNull())
|
||||
result_.admitted = resultNode["Admitted"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["ErrMsg"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user