|
|
@@ -39,13 +39,142 @@ void CreateNetworkInterfaceResult::parse(const std::string &payload)
|
|
|
Json::Value value;
|
|
|
reader.parse(payload, value);
|
|
|
setRequestId(value["RequestId"].asString());
|
|
|
+ auto allPrivateIpSetsNode = value["PrivateIpSets"]["PrivateIpSet"];
|
|
|
+ for (auto valuePrivateIpSetsPrivateIpSet : allPrivateIpSetsNode)
|
|
|
+ {
|
|
|
+ PrivateIpSet privateIpSetsObject;
|
|
|
+ if(!valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].isNull())
|
|
|
+ privateIpSetsObject.privateIpAddress = valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].asString();
|
|
|
+ if(!valuePrivateIpSetsPrivateIpSet["Primary"].isNull())
|
|
|
+ privateIpSetsObject.primary = valuePrivateIpSetsPrivateIpSet["Primary"].asString() == "true";
|
|
|
+ privateIpSets_.push_back(privateIpSetsObject);
|
|
|
+ }
|
|
|
+ auto allTagsNode = value["Tags"]["Tag"];
|
|
|
+ for (auto valueTagsTag : allTagsNode)
|
|
|
+ {
|
|
|
+ Tag tagsObject;
|
|
|
+ if(!valueTagsTag["TagKey"].isNull())
|
|
|
+ tagsObject.tagKey = valueTagsTag["TagKey"].asString();
|
|
|
+ if(!valueTagsTag["TagValue"].isNull())
|
|
|
+ tagsObject.tagValue = valueTagsTag["TagValue"].asString();
|
|
|
+ tags_.push_back(tagsObject);
|
|
|
+ }
|
|
|
+ auto allSecurityGroupIds = value["SecurityGroupIds"]["SecurityGroupId"];
|
|
|
+ for (const auto &item : allSecurityGroupIds)
|
|
|
+ securityGroupIds_.push_back(item.asString());
|
|
|
if(!value["NetworkInterfaceId"].isNull())
|
|
|
networkInterfaceId_ = value["NetworkInterfaceId"].asString();
|
|
|
+ if(!value["Status"].isNull())
|
|
|
+ status_ = value["Status"].asString();
|
|
|
+ if(!value["Type"].isNull())
|
|
|
+ type_ = value["Type"].asString();
|
|
|
+ if(!value["VpcId"].isNull())
|
|
|
+ vpcId_ = value["VpcId"].asString();
|
|
|
+ if(!value["VSwitchId"].isNull())
|
|
|
+ vSwitchId_ = value["VSwitchId"].asString();
|
|
|
+ if(!value["ZoneId"].isNull())
|
|
|
+ zoneId_ = value["ZoneId"].asString();
|
|
|
+ if(!value["PrivateIpAddress"].isNull())
|
|
|
+ privateIpAddress_ = value["PrivateIpAddress"].asString();
|
|
|
+ if(!value["MacAddress"].isNull())
|
|
|
+ macAddress_ = value["MacAddress"].asString();
|
|
|
+ if(!value["NetworkInterfaceName"].isNull())
|
|
|
+ networkInterfaceName_ = value["NetworkInterfaceName"].asString();
|
|
|
+ if(!value["Description"].isNull())
|
|
|
+ description_ = value["Description"].asString();
|
|
|
+ if(!value["ResourceGroupId"].isNull())
|
|
|
+ resourceGroupId_ = value["ResourceGroupId"].asString();
|
|
|
+ if(!value["ServiceID"].isNull())
|
|
|
+ serviceID_ = std::stol(value["ServiceID"].asString());
|
|
|
+ if(!value["ServiceManaged"].isNull())
|
|
|
+ serviceManaged_ = value["ServiceManaged"].asString() == "true";
|
|
|
+ if(!value["OwnerId"].isNull())
|
|
|
+ ownerId_ = value["OwnerId"].asString();
|
|
|
|
|
|
}
|
|
|
|
|
|
+std::string CreateNetworkInterfaceResult::getStatus()const
|
|
|
+{
|
|
|
+ return status_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getPrivateIpAddress()const
|
|
|
+{
|
|
|
+ return privateIpAddress_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getDescription()const
|
|
|
+{
|
|
|
+ return description_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getZoneId()const
|
|
|
+{
|
|
|
+ return zoneId_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getResourceGroupId()const
|
|
|
+{
|
|
|
+ return resourceGroupId_;
|
|
|
+}
|
|
|
+
|
|
|
+bool CreateNetworkInterfaceResult::getServiceManaged()const
|
|
|
+{
|
|
|
+ return serviceManaged_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getVSwitchId()const
|
|
|
+{
|
|
|
+ return vSwitchId_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getNetworkInterfaceName()const
|
|
|
+{
|
|
|
+ return networkInterfaceName_;
|
|
|
+}
|
|
|
+
|
|
|
std::string CreateNetworkInterfaceResult::getNetworkInterfaceId()const
|
|
|
{
|
|
|
return networkInterfaceId_;
|
|
|
}
|
|
|
|
|
|
+std::string CreateNetworkInterfaceResult::getMacAddress()const
|
|
|
+{
|
|
|
+ return macAddress_;
|
|
|
+}
|
|
|
+
|
|
|
+std::vector<std::string> CreateNetworkInterfaceResult::getSecurityGroupIds()const
|
|
|
+{
|
|
|
+ return securityGroupIds_;
|
|
|
+}
|
|
|
+
|
|
|
+long CreateNetworkInterfaceResult::getServiceID()const
|
|
|
+{
|
|
|
+ return serviceID_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getType()const
|
|
|
+{
|
|
|
+ return type_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getVpcId()const
|
|
|
+{
|
|
|
+ return vpcId_;
|
|
|
+}
|
|
|
+
|
|
|
+std::string CreateNetworkInterfaceResult::getOwnerId()const
|
|
|
+{
|
|
|
+ return ownerId_;
|
|
|
+}
|
|
|
+
|
|
|
+std::vector<CreateNetworkInterfaceResult::Tag> CreateNetworkInterfaceResult::getTags()const
|
|
|
+{
|
|
|
+ return tags_;
|
|
|
+}
|
|
|
+
|
|
|
+std::vector<CreateNetworkInterfaceResult::PrivateIpSet> CreateNetworkInterfaceResult::getPrivateIpSets()const
|
|
|
+{
|
|
|
+ return privateIpSets_;
|
|
|
+}
|
|
|
+
|