diff --git a/VERSION b/VERSION index 243b61e9f..63f8c3134 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2051 \ No newline at end of file +1.36.2052 \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h index e094a8ff3..c56ce38aa 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h @@ -34,6 +34,8 @@ public: }; ListInstancesRequest(); ~ListInstancesRequest(); + std::string getPlanType() const; + void setPlanType(const std::string &planType); int getPageNumber() const; void setPageNumber(int pageNumber); std::string getResourceGroupId() const; @@ -56,6 +58,7 @@ public: void setStatus(const std::string &status); private: + std::string planType_; int pageNumber_; std::string resourceGroupId_; std::string regionId_; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h b/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h index 830804ab0..52961bda3 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h @@ -78,6 +78,13 @@ namespace AlibabaCloud std::string regionId; std::string diskId; }; + struct NetworkAttribute + { + std::string publicIpAddress; + std::string privateIpAddress; + int peakBandwidth; + std::string publicIpDdosStatus; + }; std::string status; std::string disableReason; std::string resourceGroupId; @@ -90,6 +97,7 @@ namespace AlibabaCloud std::string businessStatus; std::string publicIpAddress; std::string instanceName; + std::vector networkAttributes; std::string innerIpAddress; std::string uuid; std::string chargeType; @@ -97,6 +105,7 @@ namespace AlibabaCloud std::string expiredTime; std::string creationTime; std::string imageId; + std::string planType; std::vector disks; std::string regionId; std::vector tags; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListPlansResult.h b/swas-open/include/alibabacloud/swas-open/model/ListPlansResult.h index 12aac7312..04b75d320 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListPlansResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListPlansResult.h @@ -34,17 +34,26 @@ namespace AlibabaCloud public: struct Plan { - std::string diskType; - double originPrice; + struct Tag + { + std::string color; + std::string cnTitle; + std::string enTitle; + }; std::string supportPlatform; - int memory; - int bandwidth; + std::string publicIpNum; + float memory; std::string planId; + int flow; + std::string diskType; + std::string originPrice; + std::string ispType; + int bandwidth; std::string currency; int diskSize; std::string planType; + std::vector tags; int core; - int flow; }; diff --git a/swas-open/src/model/ListInstancesRequest.cc b/swas-open/src/model/ListInstancesRequest.cc index 7b86b7b2a..d6c89d814 100644 --- a/swas-open/src/model/ListInstancesRequest.cc +++ b/swas-open/src/model/ListInstancesRequest.cc @@ -25,6 +25,15 @@ ListInstancesRequest::ListInstancesRequest() ListInstancesRequest::~ListInstancesRequest() {} +std::string ListInstancesRequest::getPlanType() const { + return planType_; +} + +void ListInstancesRequest::setPlanType(const std::string &planType) { + planType_ = planType; + setParameter(std::string("PlanType"), planType); +} + int ListInstancesRequest::getPageNumber() const { return pageNumber_; } diff --git a/swas-open/src/model/ListInstancesResult.cc b/swas-open/src/model/ListInstancesResult.cc index fed72da36..61ff5f9d0 100644 --- a/swas-open/src/model/ListInstancesResult.cc +++ b/swas-open/src/model/ListInstancesResult.cc @@ -79,6 +79,8 @@ void ListInstancesResult::parse(const std::string &payload) instancesObject.uuid = valueInstancesInstance["Uuid"].asString(); if(!valueInstancesInstance["ResourceGroupId"].isNull()) instancesObject.resourceGroupId = valueInstancesInstance["ResourceGroupId"].asString(); + if(!valueInstancesInstance["PlanType"].isNull()) + instancesObject.planType = valueInstancesInstance["PlanType"].asString(); auto allTagsNode = valueInstancesInstance["Tags"]["tag"]; for (auto valueInstancesInstanceTagstag : allTagsNode) { @@ -129,6 +131,20 @@ void ListInstancesResult::parse(const std::string &payload) } instancesObject.disks.push_back(disksObject); } + auto allNetworkAttributesNode = valueInstancesInstance["NetworkAttributes"]["networkAttribute"]; + for (auto valueInstancesInstanceNetworkAttributesnetworkAttribute : allNetworkAttributesNode) + { + Instance::NetworkAttribute networkAttributesObject; + if(!valueInstancesInstanceNetworkAttributesnetworkAttribute["PublicIpAddress"].isNull()) + networkAttributesObject.publicIpAddress = valueInstancesInstanceNetworkAttributesnetworkAttribute["PublicIpAddress"].asString(); + if(!valueInstancesInstanceNetworkAttributesnetworkAttribute["PrivateIpAddress"].isNull()) + networkAttributesObject.privateIpAddress = valueInstancesInstanceNetworkAttributesnetworkAttribute["PrivateIpAddress"].asString(); + if(!valueInstancesInstanceNetworkAttributesnetworkAttribute["PeakBandwidth"].isNull()) + networkAttributesObject.peakBandwidth = std::stoi(valueInstancesInstanceNetworkAttributesnetworkAttribute["PeakBandwidth"].asString()); + if(!valueInstancesInstanceNetworkAttributesnetworkAttribute["PublicIpDdosStatus"].isNull()) + networkAttributesObject.publicIpDdosStatus = valueInstancesInstanceNetworkAttributesnetworkAttribute["PublicIpDdosStatus"].asString(); + instancesObject.networkAttributes.push_back(networkAttributesObject); + } auto resourceSpecNode = value["ResourceSpec"]; if(!resourceSpecNode["DiskCategory"].isNull()) instancesObject.resourceSpec.diskCategory = resourceSpecNode["DiskCategory"].asString(); diff --git a/swas-open/src/model/ListPlansResult.cc b/swas-open/src/model/ListPlansResult.cc index e2d61a260..bac2d0f21 100644 --- a/swas-open/src/model/ListPlansResult.cc +++ b/swas-open/src/model/ListPlansResult.cc @@ -51,20 +51,36 @@ void ListPlansResult::parse(const std::string &payload) plansObject.diskSize = std::stoi(valuePlansPlan["DiskSize"].asString()); if(!valuePlansPlan["Flow"].isNull()) plansObject.flow = std::stoi(valuePlansPlan["Flow"].asString()); - if(!valuePlansPlan["Memory"].isNull()) - plansObject.memory = std::stoi(valuePlansPlan["Memory"].asString()); if(!valuePlansPlan["PlanId"].isNull()) plansObject.planId = valuePlansPlan["PlanId"].asString(); if(!valuePlansPlan["DiskType"].isNull()) plansObject.diskType = valuePlansPlan["DiskType"].asString(); - if(!valuePlansPlan["OriginPrice"].isNull()) - plansObject.originPrice = valuePlansPlan["OriginPrice"].asString(); if(!valuePlansPlan["Currency"].isNull()) plansObject.currency = valuePlansPlan["Currency"].asString(); if(!valuePlansPlan["SupportPlatform"].isNull()) plansObject.supportPlatform = valuePlansPlan["SupportPlatform"].asString(); if(!valuePlansPlan["PlanType"].isNull()) plansObject.planType = valuePlansPlan["PlanType"].asString(); + if(!valuePlansPlan["PublicIpNum"].isNull()) + plansObject.publicIpNum = valuePlansPlan["PublicIpNum"].asString(); + if(!valuePlansPlan["IspType"].isNull()) + plansObject.ispType = valuePlansPlan["IspType"].asString(); + if(!valuePlansPlan["Memory"].isNull()) + plansObject.memory = std::stof(valuePlansPlan["Memory"].asString()); + if(!valuePlansPlan["OriginPrice"].isNull()) + plansObject.originPrice = valuePlansPlan["OriginPrice"].asString(); + auto allTagsNode = valuePlansPlan["Tags"]["Tag"]; + for (auto valuePlansPlanTagsTag : allTagsNode) + { + Plan::Tag tagsObject; + if(!valuePlansPlanTagsTag["CnTitle"].isNull()) + tagsObject.cnTitle = valuePlansPlanTagsTag["CnTitle"].asString(); + if(!valuePlansPlanTagsTag["EnTitle"].isNull()) + tagsObject.enTitle = valuePlansPlanTagsTag["EnTitle"].asString(); + if(!valuePlansPlanTagsTag["Color"].isNull()) + tagsObject.color = valuePlansPlanTagsTag["Color"].asString(); + plansObject.tags.push_back(tagsObject); + } plans_.push_back(plansObject); }