|
|
@@ -39,6 +39,25 @@ void CreateAutoProvisioningGroupResult::parse(const std::string &payload)
|
|
|
Json::Value value;
|
|
|
reader.parse(payload, value);
|
|
|
setRequestId(value["RequestId"].asString());
|
|
|
+ auto allLaunchResultsNode = value["LaunchResults"]["LaunchResult"];
|
|
|
+ for (auto valueLaunchResultsLaunchResult : allLaunchResultsNode)
|
|
|
+ {
|
|
|
+ LaunchResult launchResultsObject;
|
|
|
+ if(!valueLaunchResultsLaunchResult["SpotStrategy"].isNull())
|
|
|
+ launchResultsObject.spotStrategy = valueLaunchResultsLaunchResult["SpotStrategy"].asString();
|
|
|
+ if(!valueLaunchResultsLaunchResult["InstanceType"].isNull())
|
|
|
+ launchResultsObject.instanceType = valueLaunchResultsLaunchResult["InstanceType"].asString();
|
|
|
+ if(!valueLaunchResultsLaunchResult["ZoneId"].isNull())
|
|
|
+ launchResultsObject.zoneId = valueLaunchResultsLaunchResult["ZoneId"].asString();
|
|
|
+ if(!valueLaunchResultsLaunchResult["ErrorCode"].isNull())
|
|
|
+ launchResultsObject.errorCode = valueLaunchResultsLaunchResult["ErrorCode"].asString();
|
|
|
+ if(!valueLaunchResultsLaunchResult["ErrorMsg"].isNull())
|
|
|
+ launchResultsObject.errorMsg = valueLaunchResultsLaunchResult["ErrorMsg"].asString();
|
|
|
+ auto allInstanceIds = value["InstanceIds"]["InstanceId"];
|
|
|
+ for (auto value : allInstanceIds)
|
|
|
+ launchResultsObject.instanceIds.push_back(value.asString());
|
|
|
+ launchResults_.push_back(launchResultsObject);
|
|
|
+ }
|
|
|
if(!value["AutoProvisioningGroupId"].isNull())
|
|
|
autoProvisioningGroupId_ = value["AutoProvisioningGroupId"].asString();
|
|
|
|
|
|
@@ -49,3 +68,8 @@ std::string CreateAutoProvisioningGroupResult::getAutoProvisioningGroupId()const
|
|
|
return autoProvisioningGroupId_;
|
|
|
}
|
|
|
|
|
|
+std::vector<CreateAutoProvisioningGroupResult::LaunchResult> CreateAutoProvisioningGroupResult::getLaunchResults()const
|
|
|
+{
|
|
|
+ return launchResults_;
|
|
|
+}
|
|
|
+
|