CreateNetworkInterface supports to allocate Ipv6.

This commit is contained in:
sdk-team
2021-07-19 07:27:01 +00:00
parent 9013d93d95
commit e6194c11ed
33 changed files with 486 additions and 294 deletions

View File

@@ -1,3 +1,6 @@
2021-07-19 Version: 1.36.820
- CreateNetworkInterface supports to allocate Ipv6.
2021-07-19 Version: 1.36.819
- Update ScreenChestCT.

View File

@@ -1 +1 @@
1.36.819
1.36.820

View File

@@ -37,10 +37,14 @@ namespace AlibabaCloud
AssignIpv6AddressesResult();
explicit AssignIpv6AddressesResult(const std::string &payload);
~AssignIpv6AddressesResult();
std::vector<std::string> getIpv6Sets()const;
std::string getNetworkInterfaceId()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> ipv6Sets_;
std::string networkInterfaceId_;
};
}

View File

@@ -69,6 +69,8 @@ namespace AlibabaCloud
void setVisible(bool visible);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
int getIpv6AddressCount()const;
void setIpv6AddressCount(int ipv6AddressCount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
int getQueuePairNumber()const;
@@ -85,6 +87,8 @@ namespace AlibabaCloud
void setPrivateIpAddress(const std::vector<std::string>& privateIpAddress);
std::string getPrimaryIpAddress()const;
void setPrimaryIpAddress(const std::string& primaryIpAddress);
std::vector<std::string> getIpv6Address()const;
void setIpv6Address(const std::vector<std::string>& ipv6Address);
private:
int queueNumber_;
@@ -101,6 +105,7 @@ namespace AlibabaCloud
std::string networkInterfaceName_;
bool visible_;
std::string resourceOwnerAccount_;
int ipv6AddressCount_;
std::string ownerAccount_;
int queuePairNumber_;
long ownerId_;
@@ -109,6 +114,7 @@ namespace AlibabaCloud
std::string vSwitchId_;
std::vector<std::string> privateIpAddress_;
std::string primaryIpAddress_;
std::vector<std::string> ipv6Address_;
};
}

View File

@@ -42,24 +42,29 @@ namespace AlibabaCloud
std::string tagKey;
std::string tagValue;
};
struct Ipv6Set
{
std::string ipv6Address;
};
CreateNetworkInterfaceResult();
explicit CreateNetworkInterfaceResult(const std::string &payload);
~CreateNetworkInterfaceResult();
std::string getStatus()const;
std::string getPrivateIpAddress()const;
std::string getDescription()const;
std::string getZoneId()const;
std::string getResourceGroupId()const;
std::string getPrivateIpAddress()const;
bool getServiceManaged()const;
std::string getResourceGroupId()const;
std::string getZoneId()const;
std::string getVSwitchId()const;
std::string getNetworkInterfaceName()const;
std::string getNetworkInterfaceId()const;
std::string getMacAddress()const;
std::string getNetworkInterfaceId()const;
std::vector<std::string> getSecurityGroupIds()const;
long getServiceID()const;
std::string getType()const;
std::vector<Ipv6Set> getIpv6Sets()const;
std::string getVpcId()const;
std::string getOwnerId()const;
std::vector<Tag> getTags()const;
@@ -69,18 +74,19 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string status_;
std::string privateIpAddress_;
std::string description_;
std::string zoneId_;
std::string resourceGroupId_;
std::string privateIpAddress_;
bool serviceManaged_;
std::string resourceGroupId_;
std::string zoneId_;
std::string vSwitchId_;
std::string networkInterfaceName_;
std::string networkInterfaceId_;
std::string macAddress_;
std::string networkInterfaceId_;
std::vector<std::string> securityGroupIds_;
long serviceID_;
std::string type_;
std::vector<Ipv6Set> ipv6Sets_;
std::string vpcId_;
std::string ownerId_;
std::vector<Tag> tags_;

View File

@@ -49,8 +49,8 @@ namespace AlibabaCloud
std::string status;
std::string description;
std::string endTime;
std::string platform;
std::string resourceGroupId;
std::string platform;
std::string privatePoolOptionsName;
std::string instanceChargeType;
std::string startTime;

View File

@@ -55,6 +55,8 @@ namespace AlibabaCloud
void setRegionId(const std::string& regionId);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getDedicatedHostClusterId()const;
void setDedicatedHostClusterId(const std::string& dedicatedHostClusterId);
std::string getDedicatedHostType()const;
void setDedicatedHostType(const std::string& dedicatedHostType);
std::vector<Tag> getTag()const;
@@ -82,6 +84,7 @@ namespace AlibabaCloud
std::string lockReason_;
std::string regionId_;
int pageSize_;
std::string dedicatedHostClusterId_;
std::string dedicatedHostType_;
std::vector<Tag> tag_;
std::string needHostDetail_;

View File

@@ -36,11 +36,11 @@ namespace AlibabaCloud
{
struct Capacity
{
int availableVgpus;
std::string localStorageCategory;
int availableVgpus;
int totalVgpus;
float totalMemory;
float availableMemory;
float totalMemory;
int availableVcpus;
int totalVcpus;
int availableLocalStorage;
@@ -79,8 +79,8 @@ namespace AlibabaCloud
std::string gPUSpec;
Capacity capacity;
std::string dedicatedHostName;
std::string expiredTime;
float cpuOverCommitRatio;
std::string expiredTime;
std::string saleCycle;
std::vector<DedicatedHost::Tag> tags;
HostDetailInfo hostDetailInfo;
@@ -94,8 +94,8 @@ namespace AlibabaCloud
int sockets;
std::string chargeType;
std::vector<std::string> supportedInstanceTypeFamilies;
std::string actionOnMaintenance;
std::string creationTime;
std::string actionOnMaintenance;
std::string regionId;
std::vector<std::string> supportedInstanceTypesList;
std::string dedicatedHostClusterId;

View File

@@ -40,8 +40,8 @@ namespace AlibabaCloud
std::string type;
std::string progress;
std::string format;
std::string size;
std::string device;
std::string size;
std::string importOSSBucket;
std::string importOSSObject;
int remainTime;
@@ -52,10 +52,10 @@ namespace AlibabaCloud
std::string tagValue;
};
std::string imageOwnerAlias;
std::string description;
std::string isSelfShared;
std::string platform;
std::string description;
std::string resourceGroupId;
std::string platform;
int size;
bool isSubscribed;
std::string oSName;

View File

@@ -30,6 +30,12 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_ECS_EXPORT DescribeInstanceHistoryEventsRequest : public RpcServiceRequest
{
public:
struct Tag
{
std::string key;
std::string value;
};
public:
DescribeInstanceHistoryEventsRequest();
@@ -45,12 +51,16 @@ namespace AlibabaCloud
void setPageNumber(int pageNumber);
std::string getImpactLevel()const;
void setImpactLevel(const std::string& impactLevel);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
int getPageSize()const;
void setPageSize(int pageSize);
std::vector<std::string> getInstanceEventCycleStatus()const;
void setInstanceEventCycleStatus(const std::vector<std::string>& instanceEventCycleStatus);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getEventPublishTimeEnd()const;
void setEventPublishTimeEnd(const std::string& eventPublishTimeEnd);
std::vector<std::string> getResourceId()const;
@@ -82,9 +92,11 @@ namespace AlibabaCloud
std::string eventCycleStatus_;
int pageNumber_;
std::string impactLevel_;
std::string resourceGroupId_;
std::string regionId_;
int pageSize_;
std::vector<std::string> instanceEventCycleStatus_;
std::vector<Tag> tag_;
std::string eventPublishTimeEnd_;
std::vector<std::string> resourceId_;
std::vector<std::string> instanceEventType_;

View File

@@ -54,7 +54,9 @@ namespace AlibabaCloud
std::string creationTime;
std::string deviceCategory;
};
std::string hostType;
std::string device;
std::string hostId;
std::vector<InactiveDisk> inactiveDisks;
std::string diskId;
};

View File

@@ -57,8 +57,12 @@ namespace AlibabaCloud
void setOwnerId(long ownerId);
int getInstanceCpuCoreCount()const;
void setInstanceCpuCoreCount(int instanceCpuCoreCount);
std::string getSpotStrategy()const;
void setSpotStrategy(const std::string& spotStrategy);
std::string getInternetChargeType()const;
void setInternetChargeType(const std::string& internetChargeType);
std::string getZoneId()const;
void setZoneId(const std::string& zoneId);
std::string getInstanceNetworkType()const;
void setInstanceNetworkType(const std::string& instanceNetworkType);
int getInstanceAmount()const;
@@ -105,6 +109,8 @@ namespace AlibabaCloud
void setOwnerAccount(const std::string& ownerAccount);
int getDataDisk2Size()const;
void setDataDisk2Size(int dataDisk2Size);
int getSpotDuration()const;
void setSpotDuration(int spotDuration);
std::string getResourceType()const;
void setResourceType(const std::string& resourceType);
std::string getDataDisk1Category()const;
@@ -128,7 +134,9 @@ namespace AlibabaCloud
std::string assuranceTimes_;
long ownerId_;
int instanceCpuCoreCount_;
std::string spotStrategy_;
std::string internetChargeType_;
std::string zoneId_;
std::string instanceNetworkType_;
int instanceAmount_;
std::vector<std::string> instanceTypeList_;
@@ -152,6 +160,7 @@ namespace AlibabaCloud
std::string resourceOwnerAccount_;
std::string ownerAccount_;
int dataDisk2Size_;
int spotDuration_;
std::string resourceType_;
std::string dataDisk1Category_;
std::string dataDisk2PerformanceLevel_;

View File

@@ -39,30 +39,32 @@ namespace AlibabaCloud
std::string tagKey;
std::string tagValue;
};
std::string status;
bool instantAccess;
std::string progress;
std::string usage;
std::string description;
std::string kMSKeyId;
std::string category;
std::string kMSKeyId;
std::string resourceGroupId;
std::string productCode;
bool encrypted;
int retentionDays;
std::string snapshotName;
int instantAccessRetentionDays;
std::string sourceDiskId;
std::string snapshotSN;
std::string sourceRegionId;
std::vector<Snapshot::Tag> tags;
std::string status;
std::string progress;
std::string usage;
std::string productCode;
std::string sourceSnapshotId;
int retentionDays;
std::string sourceStorageType;
std::string snapshotId;
std::string snapshotSN;
std::string sourceDiskSize;
std::string creationTime;
std::string lastModifiedTime;
std::string snapshotType;
std::string sourceDiskType;
int remainTime;
std::vector<Snapshot::Tag> tags;
std::string sourceDiskType;
};
@@ -70,8 +72,8 @@ namespace AlibabaCloud
explicit DescribeSnapshotsResult(const std::string &payload);
~DescribeSnapshotsResult();
int getTotalCount()const;
int getPageSize()const;
std::string getNextToken()const;
int getPageSize()const;
int getPageNumber()const;
std::vector<Snapshot> getSnapshots()const;
@@ -79,8 +81,8 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
int totalCount_;
int pageSize_;
std::string nextToken_;
int pageSize_;
int pageNumber_;
std::vector<Snapshot> snapshots_;

View File

@@ -38,8 +38,8 @@ namespace AlibabaCloud
};
struct TagFilter
{
std::string tagKey;
std::vector<std::string> tagValues;
std::string tagKey;
};
public:

View File

@@ -35,8 +35,8 @@ namespace AlibabaCloud
struct FeeOfInstance
{
std::string instanceId;
std::string fee;
std::string currency;
std::string fee;
};

View File

@@ -190,6 +190,8 @@ namespace AlibabaCloud
void setZoneId(const std::string& zoneId);
std::vector<std::string> getIpv6Address()const;
void setIpv6Address(const std::vector<std::string>& ipv6Address);
std::string getSecurityOptionsConfidentialComputingMode()const;
void setSecurityOptionsConfidentialComputingMode(const std::string& securityOptionsConfidentialComputingMode);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
int getInternetMaxBandwidthOut()const;
@@ -301,6 +303,7 @@ namespace AlibabaCloud
std::string instanceName_;
std::string zoneId_;
std::vector<std::string> ipv6Address_;
std::string securityOptionsConfidentialComputingMode_;
std::string clientToken_;
int internetMaxBandwidthOut_;
std::string description_;

View File

@@ -39,6 +39,21 @@ void AssignIpv6AddressesResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allIpv6Sets = value["Ipv6Sets"]["Ipv6Address"];
for (const auto &item : allIpv6Sets)
ipv6Sets_.push_back(item.asString());
if(!value["NetworkInterfaceId"].isNull())
networkInterfaceId_ = value["NetworkInterfaceId"].asString();
}
std::vector<std::string> AssignIpv6AddressesResult::getIpv6Sets()const
{
return ipv6Sets_;
}
std::string AssignIpv6AddressesResult::getNetworkInterfaceId()const
{
return networkInterfaceId_;
}

View File

@@ -186,6 +186,17 @@ void CreateNetworkInterfaceRequest::setResourceOwnerAccount(const std::string& r
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
int CreateNetworkInterfaceRequest::getIpv6AddressCount()const
{
return ipv6AddressCount_;
}
void CreateNetworkInterfaceRequest::setIpv6AddressCount(int ipv6AddressCount)
{
ipv6AddressCount_ = ipv6AddressCount;
setParameter("Ipv6AddressCount", std::to_string(ipv6AddressCount));
}
std::string CreateNetworkInterfaceRequest::getOwnerAccount()const
{
return ownerAccount_;
@@ -278,3 +289,16 @@ void CreateNetworkInterfaceRequest::setPrimaryIpAddress(const std::string& prima
setParameter("PrimaryIpAddress", primaryIpAddress);
}
std::vector<std::string> CreateNetworkInterfaceRequest::getIpv6Address()const
{
return ipv6Address_;
}
void CreateNetworkInterfaceRequest::setIpv6Address(const std::vector<std::string>& ipv6Address)
{
ipv6Address_ = ipv6Address;
for(int dep1 = 0; dep1!= ipv6Address.size(); dep1++) {
setParameter("Ipv6Address."+ std::to_string(dep1), ipv6Address.at(dep1));
}
}

View File

@@ -53,43 +53,51 @@ void CreateNetworkInterfaceResult::parse(const std::string &payload)
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueTagsTag["TagKey"].asString();
if(!valueTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueTagsTag["TagValue"].asString();
if(!valueTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueTagsTag["TagKey"].asString();
tags_.push_back(tagsObject);
}
auto allIpv6SetsNode = value["Ipv6Sets"]["Ipv6Set"];
for (auto valueIpv6SetsIpv6Set : allIpv6SetsNode)
{
Ipv6Set ipv6SetsObject;
if(!valueIpv6SetsIpv6Set["Ipv6Address"].isNull())
ipv6SetsObject.ipv6Address = valueIpv6SetsIpv6Set["Ipv6Address"].asString();
ipv6Sets_.push_back(ipv6SetsObject);
}
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["MacAddress"].isNull())
macAddress_ = value["MacAddress"].asString();
if(!value["NetworkInterfaceId"].isNull())
networkInterfaceId_ = value["NetworkInterfaceId"].asString();
if(!value["ServiceID"].isNull())
serviceID_ = std::stol(value["ServiceID"].asString());
if(!value["OwnerId"].isNull())
ownerId_ = value["OwnerId"].asString();
if(!value["ServiceManaged"].isNull())
serviceManaged_ = value["ServiceManaged"].asString() == "true";
if(!value["VSwitchId"].isNull())
vSwitchId_ = value["VSwitchId"].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();
if(!value["ZoneId"].isNull())
zoneId_ = value["ZoneId"].asString();
if(!value["PrivateIpAddress"].isNull())
privateIpAddress_ = value["PrivateIpAddress"].asString();
}
@@ -98,19 +106,19 @@ 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
std::string CreateNetworkInterfaceResult::getPrivateIpAddress()const
{
return zoneId_;
return privateIpAddress_;
}
bool CreateNetworkInterfaceResult::getServiceManaged()const
{
return serviceManaged_;
}
std::string CreateNetworkInterfaceResult::getResourceGroupId()const
@@ -118,9 +126,9 @@ std::string CreateNetworkInterfaceResult::getResourceGroupId()const
return resourceGroupId_;
}
bool CreateNetworkInterfaceResult::getServiceManaged()const
std::string CreateNetworkInterfaceResult::getZoneId()const
{
return serviceManaged_;
return zoneId_;
}
std::string CreateNetworkInterfaceResult::getVSwitchId()const
@@ -133,16 +141,16 @@ std::string CreateNetworkInterfaceResult::getNetworkInterfaceName()const
return networkInterfaceName_;
}
std::string CreateNetworkInterfaceResult::getNetworkInterfaceId()const
{
return networkInterfaceId_;
}
std::string CreateNetworkInterfaceResult::getMacAddress()const
{
return macAddress_;
}
std::string CreateNetworkInterfaceResult::getNetworkInterfaceId()const
{
return networkInterfaceId_;
}
std::vector<std::string> CreateNetworkInterfaceResult::getSecurityGroupIds()const
{
return securityGroupIds_;
@@ -158,6 +166,11 @@ std::string CreateNetworkInterfaceResult::getType()const
return type_;
}
std::vector<CreateNetworkInterfaceResult::Ipv6Set> CreateNetworkInterfaceResult::getIpv6Sets()const
{
return ipv6Sets_;
}
std::string CreateNetworkInterfaceResult::getVpcId()const
{
return vpcId_;

View File

@@ -43,64 +43,64 @@ void DescribeCapacityReservationsResult::parse(const std::string &payload)
for (auto valueCapacityReservationSetCapacityReservationItem : allCapacityReservationSetNode)
{
CapacityReservationItem capacityReservationSetObject;
if(!valueCapacityReservationSetCapacityReservationItem["Status"].isNull())
capacityReservationSetObject.status = valueCapacityReservationSetCapacityReservationItem["Status"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["TimeSlot"].isNull())
capacityReservationSetObject.timeSlot = valueCapacityReservationSetCapacityReservationItem["TimeSlot"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsMatchCriteria"].isNull())
capacityReservationSetObject.privatePoolOptionsMatchCriteria = valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsMatchCriteria"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsId"].isNull())
capacityReservationSetObject.privatePoolOptionsId = valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsId"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsName"].isNull())
capacityReservationSetObject.privatePoolOptionsName = valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsName"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Description"].isNull())
capacityReservationSetObject.description = valueCapacityReservationSetCapacityReservationItem["Description"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["RegionId"].isNull())
capacityReservationSetObject.regionId = valueCapacityReservationSetCapacityReservationItem["RegionId"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsMatchCriteria"].isNull())
capacityReservationSetObject.privatePoolOptionsMatchCriteria = valueCapacityReservationSetCapacityReservationItem["PrivatePoolOptionsMatchCriteria"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Status"].isNull())
capacityReservationSetObject.status = valueCapacityReservationSetCapacityReservationItem["Status"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["StartTime"].isNull())
capacityReservationSetObject.startTime = valueCapacityReservationSetCapacityReservationItem["StartTime"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["EndTime"].isNull())
capacityReservationSetObject.endTime = valueCapacityReservationSetCapacityReservationItem["EndTime"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["EndTimeType"].isNull())
capacityReservationSetObject.endTimeType = valueCapacityReservationSetCapacityReservationItem["EndTimeType"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["InstanceChargeType"].isNull())
capacityReservationSetObject.instanceChargeType = valueCapacityReservationSetCapacityReservationItem["InstanceChargeType"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Platform"].isNull())
capacityReservationSetObject.platform = valueCapacityReservationSetCapacityReservationItem["Platform"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["TimeSlot"].isNull())
capacityReservationSetObject.timeSlot = valueCapacityReservationSetCapacityReservationItem["TimeSlot"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["EndTime"].isNull())
capacityReservationSetObject.endTime = valueCapacityReservationSetCapacityReservationItem["EndTime"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["StartTime"].isNull())
capacityReservationSetObject.startTime = valueCapacityReservationSetCapacityReservationItem["StartTime"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Description"].isNull())
capacityReservationSetObject.description = valueCapacityReservationSetCapacityReservationItem["Description"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["EndTimeType"].isNull())
capacityReservationSetObject.endTimeType = valueCapacityReservationSetCapacityReservationItem["EndTimeType"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["ResourceGroupId"].isNull())
capacityReservationSetObject.resourceGroupId = valueCapacityReservationSetCapacityReservationItem["ResourceGroupId"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Platform"].isNull())
capacityReservationSetObject.platform = valueCapacityReservationSetCapacityReservationItem["Platform"].asString();
auto allAllocatedResourcesNode = valueCapacityReservationSetCapacityReservationItem["AllocatedResources"]["AllocatedResource"];
for (auto valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
{
CapacityReservationItem::AllocatedResource allocatedResourcesObject;
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["UsedAmount"].isNull())
allocatedResourcesObject.usedAmount = std::stoi(valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["UsedAmount"].asString());
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
allocatedResourcesObject.totalAmount = std::stoi(valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["TotalAmount"].asString());
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["zoneId"].isNull())
allocatedResourcesObject.zoneId = valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["zoneId"].asString();
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["InstanceType"].isNull())
allocatedResourcesObject.instanceType = valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["InstanceType"].asString();
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
allocatedResourcesObject.totalAmount = std::stoi(valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["TotalAmount"].asString());
if(!valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["UsedAmount"].isNull())
allocatedResourcesObject.usedAmount = std::stoi(valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource["UsedAmount"].asString());
capacityReservationSetObject.allocatedResources.push_back(allocatedResourcesObject);
}
auto allTagsNode = valueCapacityReservationSetCapacityReservationItem["Tags"]["Tag"];
for (auto valueCapacityReservationSetCapacityReservationItemTagsTag : allTagsNode)
{
CapacityReservationItem::Tag tagsObject;
if(!valueCapacityReservationSetCapacityReservationItemTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueCapacityReservationSetCapacityReservationItemTagsTag["TagKey"].asString();
if(!valueCapacityReservationSetCapacityReservationItemTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueCapacityReservationSetCapacityReservationItemTagsTag["TagValue"].asString();
if(!valueCapacityReservationSetCapacityReservationItemTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueCapacityReservationSetCapacityReservationItemTagsTag["TagKey"].asString();
capacityReservationSetObject.tags.push_back(tagsObject);
}
capacityReservationSet_.push_back(capacityReservationSetObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}

View File

@@ -104,6 +104,17 @@ void DescribeDedicatedHostsRequest::setPageSize(int pageSize)
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeDedicatedHostsRequest::getDedicatedHostClusterId()const
{
return dedicatedHostClusterId_;
}
void DescribeDedicatedHostsRequest::setDedicatedHostClusterId(const std::string& dedicatedHostClusterId)
{
dedicatedHostClusterId_ = dedicatedHostClusterId;
setParameter("DedicatedHostClusterId", dedicatedHostClusterId);
}
std::string DescribeDedicatedHostsRequest::getDedicatedHostType()const
{
return dedicatedHostType_;

View File

@@ -43,58 +43,58 @@ void DescribeDedicatedHostsResult::parse(const std::string &payload)
for (auto valueDedicatedHostsDedicatedHost : allDedicatedHostsNode)
{
DedicatedHost dedicatedHostsObject;
if(!valueDedicatedHostsDedicatedHost["DedicatedHostId"].isNull())
dedicatedHostsObject.dedicatedHostId = valueDedicatedHostsDedicatedHost["DedicatedHostId"].asString();
if(!valueDedicatedHostsDedicatedHost["AutoPlacement"].isNull())
dedicatedHostsObject.autoPlacement = valueDedicatedHostsDedicatedHost["AutoPlacement"].asString();
if(!valueDedicatedHostsDedicatedHost["RegionId"].isNull())
dedicatedHostsObject.regionId = valueDedicatedHostsDedicatedHost["RegionId"].asString();
if(!valueDedicatedHostsDedicatedHost["ZoneId"].isNull())
dedicatedHostsObject.zoneId = valueDedicatedHostsDedicatedHost["ZoneId"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostName"].isNull())
dedicatedHostsObject.dedicatedHostName = valueDedicatedHostsDedicatedHost["DedicatedHostName"].asString();
if(!valueDedicatedHostsDedicatedHost["MachineId"].isNull())
dedicatedHostsObject.machineId = valueDedicatedHostsDedicatedHost["MachineId"].asString();
if(!valueDedicatedHostsDedicatedHost["Description"].isNull())
dedicatedHostsObject.description = valueDedicatedHostsDedicatedHost["Description"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostType"].isNull())
dedicatedHostsObject.dedicatedHostType = valueDedicatedHostsDedicatedHost["DedicatedHostType"].asString();
if(!valueDedicatedHostsDedicatedHost["Sockets"].isNull())
dedicatedHostsObject.sockets = std::stoi(valueDedicatedHostsDedicatedHost["Sockets"].asString());
if(!valueDedicatedHostsDedicatedHost["Cores"].isNull())
dedicatedHostsObject.cores = std::stoi(valueDedicatedHostsDedicatedHost["Cores"].asString());
if(!valueDedicatedHostsDedicatedHost["PhysicalGpus"].isNull())
dedicatedHostsObject.physicalGpus = std::stoi(valueDedicatedHostsDedicatedHost["PhysicalGpus"].asString());
if(!valueDedicatedHostsDedicatedHost["GPUSpec"].isNull())
dedicatedHostsObject.gPUSpec = valueDedicatedHostsDedicatedHost["GPUSpec"].asString();
if(!valueDedicatedHostsDedicatedHost["ActionOnMaintenance"].isNull())
dedicatedHostsObject.actionOnMaintenance = valueDedicatedHostsDedicatedHost["ActionOnMaintenance"].asString();
if(!valueDedicatedHostsDedicatedHost["Status"].isNull())
dedicatedHostsObject.status = valueDedicatedHostsDedicatedHost["Status"].asString();
if(!valueDedicatedHostsDedicatedHost["CreationTime"].isNull())
dedicatedHostsObject.creationTime = valueDedicatedHostsDedicatedHost["CreationTime"].asString();
if(!valueDedicatedHostsDedicatedHost["ChargeType"].isNull())
dedicatedHostsObject.chargeType = valueDedicatedHostsDedicatedHost["ChargeType"].asString();
if(!valueDedicatedHostsDedicatedHost["SaleCycle"].isNull())
dedicatedHostsObject.saleCycle = valueDedicatedHostsDedicatedHost["SaleCycle"].asString();
if(!valueDedicatedHostsDedicatedHost["ExpiredTime"].isNull())
dedicatedHostsObject.expiredTime = valueDedicatedHostsDedicatedHost["ExpiredTime"].asString();
if(!valueDedicatedHostsDedicatedHost["Status"].isNull())
dedicatedHostsObject.status = valueDedicatedHostsDedicatedHost["Status"].asString();
if(!valueDedicatedHostsDedicatedHost["Cores"].isNull())
dedicatedHostsObject.cores = std::stoi(valueDedicatedHostsDedicatedHost["Cores"].asString());
if(!valueDedicatedHostsDedicatedHost["AutoPlacement"].isNull())
dedicatedHostsObject.autoPlacement = valueDedicatedHostsDedicatedHost["AutoPlacement"].asString();
if(!valueDedicatedHostsDedicatedHost["GPUSpec"].isNull())
dedicatedHostsObject.gPUSpec = valueDedicatedHostsDedicatedHost["GPUSpec"].asString();
if(!valueDedicatedHostsDedicatedHost["AutoReleaseTime"].isNull())
dedicatedHostsObject.autoReleaseTime = valueDedicatedHostsDedicatedHost["AutoReleaseTime"].asString();
if(!valueDedicatedHostsDedicatedHost["ResourceGroupId"].isNull())
dedicatedHostsObject.resourceGroupId = valueDedicatedHostsDedicatedHost["ResourceGroupId"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostClusterId"].isNull())
dedicatedHostsObject.dedicatedHostClusterId = valueDedicatedHostsDedicatedHost["DedicatedHostClusterId"].asString();
if(!valueDedicatedHostsDedicatedHost["ChargeType"].isNull())
dedicatedHostsObject.chargeType = valueDedicatedHostsDedicatedHost["ChargeType"].asString();
if(!valueDedicatedHostsDedicatedHost["CpuOverCommitRatio"].isNull())
dedicatedHostsObject.cpuOverCommitRatio = std::stof(valueDedicatedHostsDedicatedHost["CpuOverCommitRatio"].asString());
if(!valueDedicatedHostsDedicatedHost["ActionOnMaintenance"].isNull())
dedicatedHostsObject.actionOnMaintenance = valueDedicatedHostsDedicatedHost["ActionOnMaintenance"].asString();
if(!valueDedicatedHostsDedicatedHost["SaleCycle"].isNull())
dedicatedHostsObject.saleCycle = valueDedicatedHostsDedicatedHost["SaleCycle"].asString();
if(!valueDedicatedHostsDedicatedHost["PhysicalGpus"].isNull())
dedicatedHostsObject.physicalGpus = std::stoi(valueDedicatedHostsDedicatedHost["PhysicalGpus"].asString());
if(!valueDedicatedHostsDedicatedHost["RegionId"].isNull())
dedicatedHostsObject.regionId = valueDedicatedHostsDedicatedHost["RegionId"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostName"].isNull())
dedicatedHostsObject.dedicatedHostName = valueDedicatedHostsDedicatedHost["DedicatedHostName"].asString();
if(!valueDedicatedHostsDedicatedHost["Description"].isNull())
dedicatedHostsObject.description = valueDedicatedHostsDedicatedHost["Description"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostClusterId"].isNull())
dedicatedHostsObject.dedicatedHostClusterId = valueDedicatedHostsDedicatedHost["DedicatedHostClusterId"].asString();
if(!valueDedicatedHostsDedicatedHost["ExpiredTime"].isNull())
dedicatedHostsObject.expiredTime = valueDedicatedHostsDedicatedHost["ExpiredTime"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostType"].isNull())
dedicatedHostsObject.dedicatedHostType = valueDedicatedHostsDedicatedHost["DedicatedHostType"].asString();
if(!valueDedicatedHostsDedicatedHost["ResourceGroupId"].isNull())
dedicatedHostsObject.resourceGroupId = valueDedicatedHostsDedicatedHost["ResourceGroupId"].asString();
if(!valueDedicatedHostsDedicatedHost["ZoneId"].isNull())
dedicatedHostsObject.zoneId = valueDedicatedHostsDedicatedHost["ZoneId"].asString();
if(!valueDedicatedHostsDedicatedHost["DedicatedHostId"].isNull())
dedicatedHostsObject.dedicatedHostId = valueDedicatedHostsDedicatedHost["DedicatedHostId"].asString();
if(!valueDedicatedHostsDedicatedHost["Sockets"].isNull())
dedicatedHostsObject.sockets = std::stoi(valueDedicatedHostsDedicatedHost["Sockets"].asString());
if(!valueDedicatedHostsDedicatedHost["MachineId"].isNull())
dedicatedHostsObject.machineId = valueDedicatedHostsDedicatedHost["MachineId"].asString();
auto allInstancesNode = valueDedicatedHostsDedicatedHost["Instances"]["Instance"];
for (auto valueDedicatedHostsDedicatedHostInstancesInstance : allInstancesNode)
{
DedicatedHost::Instance instancesObject;
if(!valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].isNull())
instancesObject.instanceId = valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].asString();
if(!valueDedicatedHostsDedicatedHostInstancesInstance["InstanceType"].isNull())
instancesObject.instanceType = valueDedicatedHostsDedicatedHostInstancesInstance["InstanceType"].asString();
if(!valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].isNull())
instancesObject.instanceId = valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].asString();
dedicatedHostsObject.instances.push_back(instancesObject);
}
auto allOperationLocksNode = valueDedicatedHostsDedicatedHost["OperationLocks"]["OperationLock"];
@@ -109,36 +109,36 @@ void DescribeDedicatedHostsResult::parse(const std::string &payload)
for (auto valueDedicatedHostsDedicatedHostTagsTag : allTagsNode)
{
DedicatedHost::Tag tagsObject;
if(!valueDedicatedHostsDedicatedHostTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueDedicatedHostsDedicatedHostTagsTag["TagKey"].asString();
if(!valueDedicatedHostsDedicatedHostTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueDedicatedHostsDedicatedHostTagsTag["TagValue"].asString();
if(!valueDedicatedHostsDedicatedHostTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueDedicatedHostsDedicatedHostTagsTag["TagKey"].asString();
dedicatedHostsObject.tags.push_back(tagsObject);
}
auto capacityNode = value["Capacity"];
if(!capacityNode["TotalVcpus"].isNull())
dedicatedHostsObject.capacity.totalVcpus = std::stoi(capacityNode["TotalVcpus"].asString());
if(!capacityNode["AvailableVcpus"].isNull())
dedicatedHostsObject.capacity.availableVcpus = std::stoi(capacityNode["AvailableVcpus"].asString());
if(!capacityNode["TotalVgpus"].isNull())
dedicatedHostsObject.capacity.totalVgpus = std::stoi(capacityNode["TotalVgpus"].asString());
if(!capacityNode["AvailableVgpus"].isNull())
dedicatedHostsObject.capacity.availableVgpus = std::stoi(capacityNode["AvailableVgpus"].asString());
if(!capacityNode["TotalMemory"].isNull())
dedicatedHostsObject.capacity.totalMemory = std::stof(capacityNode["TotalMemory"].asString());
if(!capacityNode["AvailableMemory"].isNull())
dedicatedHostsObject.capacity.availableMemory = std::stof(capacityNode["AvailableMemory"].asString());
if(!capacityNode["TotalLocalStorage"].isNull())
dedicatedHostsObject.capacity.totalLocalStorage = std::stoi(capacityNode["TotalLocalStorage"].asString());
if(!capacityNode["AvailableLocalStorage"].isNull())
dedicatedHostsObject.capacity.availableLocalStorage = std::stoi(capacityNode["AvailableLocalStorage"].asString());
if(!capacityNode["LocalStorageCategory"].isNull())
dedicatedHostsObject.capacity.localStorageCategory = capacityNode["LocalStorageCategory"].asString();
if(!capacityNode["TotalMemory"].isNull())
dedicatedHostsObject.capacity.totalMemory = std::stof(capacityNode["TotalMemory"].asString());
if(!capacityNode["TotalLocalStorage"].isNull())
dedicatedHostsObject.capacity.totalLocalStorage = std::stoi(capacityNode["TotalLocalStorage"].asString());
if(!capacityNode["TotalVcpus"].isNull())
dedicatedHostsObject.capacity.totalVcpus = std::stoi(capacityNode["TotalVcpus"].asString());
if(!capacityNode["TotalVgpus"].isNull())
dedicatedHostsObject.capacity.totalVgpus = std::stoi(capacityNode["TotalVgpus"].asString());
if(!capacityNode["AvailableLocalStorage"].isNull())
dedicatedHostsObject.capacity.availableLocalStorage = std::stoi(capacityNode["AvailableLocalStorage"].asString());
if(!capacityNode["AvailableVcpus"].isNull())
dedicatedHostsObject.capacity.availableVcpus = std::stoi(capacityNode["AvailableVcpus"].asString());
if(!capacityNode["AvailableVgpus"].isNull())
dedicatedHostsObject.capacity.availableVgpus = std::stoi(capacityNode["AvailableVgpus"].asString());
auto networkAttributesNode = value["NetworkAttributes"];
if(!networkAttributesNode["SlbUdpTimeout"].isNull())
dedicatedHostsObject.networkAttributes.slbUdpTimeout = std::stoi(networkAttributesNode["SlbUdpTimeout"].asString());
if(!networkAttributesNode["UdpTimeout"].isNull())
dedicatedHostsObject.networkAttributes.udpTimeout = std::stoi(networkAttributesNode["UdpTimeout"].asString());
if(!networkAttributesNode["SlbUdpTimeout"].isNull())
dedicatedHostsObject.networkAttributes.slbUdpTimeout = std::stoi(networkAttributesNode["SlbUdpTimeout"].asString());
auto hostDetailInfoNode = value["HostDetailInfo"];
if(!hostDetailInfoNode["SerialNumber"].isNull())
dedicatedHostsObject.hostDetailInfo.serialNumber = hostDetailInfoNode["SerialNumber"].asString();
@@ -153,12 +153,12 @@ void DescribeDedicatedHostsResult::parse(const std::string &payload)
dedicatedHostsObject.supportedInstanceTypesList.push_back(value.asString());
dedicatedHosts_.push_back(dedicatedHostsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(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::stoi(value["TotalCount"].asString());
}

View File

@@ -43,96 +43,96 @@ void DescribeImagesResult::parse(const std::string &payload)
for (auto valueImagesImage : allImagesNode)
{
Image imagesObject;
if(!valueImagesImage["Progress"].isNull())
imagesObject.progress = valueImagesImage["Progress"].asString();
if(!valueImagesImage["ImageId"].isNull())
imagesObject.imageId = valueImagesImage["ImageId"].asString();
if(!valueImagesImage["ImageName"].isNull())
imagesObject.imageName = valueImagesImage["ImageName"].asString();
if(!valueImagesImage["CreationTime"].isNull())
imagesObject.creationTime = valueImagesImage["CreationTime"].asString();
if(!valueImagesImage["Status"].isNull())
imagesObject.status = valueImagesImage["Status"].asString();
if(!valueImagesImage["ImageFamily"].isNull())
imagesObject.imageFamily = valueImagesImage["ImageFamily"].asString();
if(!valueImagesImage["Progress"].isNull())
imagesObject.progress = valueImagesImage["Progress"].asString();
if(!valueImagesImage["IsCopied"].isNull())
imagesObject.isCopied = valueImagesImage["IsCopied"].asString() == "true";
if(!valueImagesImage["IsSupportIoOptimized"].isNull())
imagesObject.isSupportIoOptimized = valueImagesImage["IsSupportIoOptimized"].asString() == "true";
if(!valueImagesImage["ImageOwnerAlias"].isNull())
imagesObject.imageOwnerAlias = valueImagesImage["ImageOwnerAlias"].asString();
if(!valueImagesImage["IsSupportCloudinit"].isNull())
imagesObject.isSupportCloudinit = valueImagesImage["IsSupportCloudinit"].asString() == "true";
if(!valueImagesImage["ImageVersion"].isNull())
imagesObject.imageVersion = valueImagesImage["ImageVersion"].asString();
if(!valueImagesImage["Usage"].isNull())
imagesObject.usage = valueImagesImage["Usage"].asString();
if(!valueImagesImage["IsSelfShared"].isNull())
imagesObject.isSelfShared = valueImagesImage["IsSelfShared"].asString();
if(!valueImagesImage["Description"].isNull())
imagesObject.description = valueImagesImage["Description"].asString();
if(!valueImagesImage["Size"].isNull())
imagesObject.size = std::stoi(valueImagesImage["Size"].asString());
if(!valueImagesImage["ImageOwnerAlias"].isNull())
imagesObject.imageOwnerAlias = valueImagesImage["ImageOwnerAlias"].asString();
if(!valueImagesImage["IsSupportIoOptimized"].isNull())
imagesObject.isSupportIoOptimized = valueImagesImage["IsSupportIoOptimized"].asString() == "true";
if(!valueImagesImage["IsSupportCloudinit"].isNull())
imagesObject.isSupportCloudinit = valueImagesImage["IsSupportCloudinit"].asString() == "true";
if(!valueImagesImage["OSName"].isNull())
imagesObject.oSName = valueImagesImage["OSName"].asString();
if(!valueImagesImage["OSNameEn"].isNull())
imagesObject.oSNameEn = valueImagesImage["OSNameEn"].asString();
if(!valueImagesImage["Architecture"].isNull())
imagesObject.architecture = valueImagesImage["Architecture"].asString();
if(!valueImagesImage["Status"].isNull())
imagesObject.status = valueImagesImage["Status"].asString();
if(!valueImagesImage["ProductCode"].isNull())
imagesObject.productCode = valueImagesImage["ProductCode"].asString();
if(!valueImagesImage["IsSubscribed"].isNull())
imagesObject.isSubscribed = valueImagesImage["IsSubscribed"].asString() == "true";
if(!valueImagesImage["CreationTime"].isNull())
imagesObject.creationTime = valueImagesImage["CreationTime"].asString();
if(!valueImagesImage["IsSelfShared"].isNull())
imagesObject.isSelfShared = valueImagesImage["IsSelfShared"].asString();
if(!valueImagesImage["OSType"].isNull())
imagesObject.oSType = valueImagesImage["OSType"].asString();
if(!valueImagesImage["Platform"].isNull())
imagesObject.platform = valueImagesImage["Platform"].asString();
if(!valueImagesImage["Usage"].isNull())
imagesObject.usage = valueImagesImage["Usage"].asString();
if(!valueImagesImage["IsCopied"].isNull())
imagesObject.isCopied = valueImagesImage["IsCopied"].asString() == "true";
if(!valueImagesImage["ResourceGroupId"].isNull())
imagesObject.resourceGroupId = valueImagesImage["ResourceGroupId"].asString();
if(!valueImagesImage["Platform"].isNull())
imagesObject.platform = valueImagesImage["Platform"].asString();
if(!valueImagesImage["OSNameEn"].isNull())
imagesObject.oSNameEn = valueImagesImage["OSNameEn"].asString();
if(!valueImagesImage["ImageName"].isNull())
imagesObject.imageName = valueImagesImage["ImageName"].asString();
if(!valueImagesImage["OSName"].isNull())
imagesObject.oSName = valueImagesImage["OSName"].asString();
if(!valueImagesImage["ImageId"].isNull())
imagesObject.imageId = valueImagesImage["ImageId"].asString();
if(!valueImagesImage["OSType"].isNull())
imagesObject.oSType = valueImagesImage["OSType"].asString();
if(!valueImagesImage["IsSubscribed"].isNull())
imagesObject.isSubscribed = valueImagesImage["IsSubscribed"].asString() == "true";
if(!valueImagesImage["ProductCode"].isNull())
imagesObject.productCode = valueImagesImage["ProductCode"].asString();
if(!valueImagesImage["Architecture"].isNull())
imagesObject.architecture = valueImagesImage["Architecture"].asString();
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
{
Image::DiskDeviceMapping diskDeviceMappingsObject;
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].isNull())
diskDeviceMappingsObject.snapshotId = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Size"].isNull())
diskDeviceMappingsObject.size = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Size"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Device"].isNull())
diskDeviceMappingsObject.device = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Device"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Type"].isNull())
diskDeviceMappingsObject.type = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Type"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Format"].isNull())
diskDeviceMappingsObject.format = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Format"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSBucket"].isNull())
diskDeviceMappingsObject.importOSSBucket = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSBucket"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].isNull())
diskDeviceMappingsObject.importOSSObject = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Progress"].isNull())
diskDeviceMappingsObject.progress = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Progress"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].isNull())
diskDeviceMappingsObject.snapshotId = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].isNull())
diskDeviceMappingsObject.importOSSObject = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Device"].isNull())
diskDeviceMappingsObject.device = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Device"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Size"].isNull())
diskDeviceMappingsObject.size = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Size"].asString();
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["RemainTime"].isNull())
diskDeviceMappingsObject.remainTime = std::stoi(valueImagesImageDiskDeviceMappingsDiskDeviceMapping["RemainTime"].asString());
if(!valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Format"].isNull())
diskDeviceMappingsObject.format = valueImagesImageDiskDeviceMappingsDiskDeviceMapping["Format"].asString();
imagesObject.diskDeviceMappings.push_back(diskDeviceMappingsObject);
}
auto allTagsNode = valueImagesImage["Tags"]["Tag"];
for (auto valueImagesImageTagsTag : allTagsNode)
{
Image::Tag tagsObject;
if(!valueImagesImageTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueImagesImageTagsTag["TagKey"].asString();
if(!valueImagesImageTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueImagesImageTagsTag["TagValue"].asString();
if(!valueImagesImageTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueImagesImageTagsTag["TagKey"].asString();
imagesObject.tags.push_back(tagsObject);
}
images_.push_back(imagesObject);
}
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(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::stoi(value["TotalCount"].asString());
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
}

View File

@@ -84,6 +84,17 @@ void DescribeInstanceHistoryEventsRequest::setImpactLevel(const std::string& imp
setParameter("ImpactLevel", impactLevel);
}
std::string DescribeInstanceHistoryEventsRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void DescribeInstanceHistoryEventsRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string DescribeInstanceHistoryEventsRequest::getRegionId()const
{
return regionId_;
@@ -119,6 +130,22 @@ void DescribeInstanceHistoryEventsRequest::setInstanceEventCycleStatus(const std
}
}
std::vector<DescribeInstanceHistoryEventsRequest::Tag> DescribeInstanceHistoryEventsRequest::getTag()const
{
return tag_;
}
void DescribeInstanceHistoryEventsRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
for(int dep1 = 0; dep1!= tag.size(); dep1++) {
auto tagObj = tag.at(dep1);
std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
setParameter(tagObjStr + ".Key", tagObj.key);
setParameter(tagObjStr + ".Value", tagObj.value);
}
}
std::string DescribeInstanceHistoryEventsRequest::getEventPublishTimeEnd()const
{
return eventPublishTimeEnd_;

View File

@@ -43,61 +43,65 @@ void DescribeInstanceHistoryEventsResult::parse(const std::string &payload)
for (auto valueInstanceSystemEventSetInstanceSystemEventType : allInstanceSystemEventSetNode)
{
InstanceSystemEventType instanceSystemEventSetObject;
if(!valueInstanceSystemEventSetInstanceSystemEventType["InstanceId"].isNull())
instanceSystemEventSetObject.instanceId = valueInstanceSystemEventSetInstanceSystemEventType["InstanceId"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["EventId"].isNull())
instanceSystemEventSetObject.eventId = valueInstanceSystemEventSetInstanceSystemEventType["EventId"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["EventPublishTime"].isNull())
instanceSystemEventSetObject.eventPublishTime = valueInstanceSystemEventSetInstanceSystemEventType["EventPublishTime"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["NotBefore"].isNull())
instanceSystemEventSetObject.notBefore = valueInstanceSystemEventSetInstanceSystemEventType["NotBefore"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["EventFinishTime"].isNull())
instanceSystemEventSetObject.eventFinishTime = valueInstanceSystemEventSetInstanceSystemEventType["EventFinishTime"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["Reason"].isNull())
instanceSystemEventSetObject.reason = valueInstanceSystemEventSetInstanceSystemEventType["Reason"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].isNull())
instanceSystemEventSetObject.impactLevel = valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["ResourceType"].isNull())
instanceSystemEventSetObject.resourceType = valueInstanceSystemEventSetInstanceSystemEventType["ResourceType"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].isNull())
instanceSystemEventSetObject.impactLevel = valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["NotBefore"].isNull())
instanceSystemEventSetObject.notBefore = valueInstanceSystemEventSetInstanceSystemEventType["NotBefore"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["InstanceId"].isNull())
instanceSystemEventSetObject.instanceId = valueInstanceSystemEventSetInstanceSystemEventType["InstanceId"].asString();
if(!valueInstanceSystemEventSetInstanceSystemEventType["Reason"].isNull())
instanceSystemEventSetObject.reason = valueInstanceSystemEventSetInstanceSystemEventType["Reason"].asString();
auto eventTypeNode = value["EventType"];
if(!eventTypeNode["Code"].isNull())
instanceSystemEventSetObject.eventType.code = std::stoi(eventTypeNode["Code"].asString());
if(!eventTypeNode["Name"].isNull())
instanceSystemEventSetObject.eventType.name = eventTypeNode["Name"].asString();
if(!eventTypeNode["Code"].isNull())
instanceSystemEventSetObject.eventType.code = std::stoi(eventTypeNode["Code"].asString());
auto eventCycleStatusNode = value["EventCycleStatus"];
if(!eventCycleStatusNode["Code"].isNull())
instanceSystemEventSetObject.eventCycleStatus.code = std::stoi(eventCycleStatusNode["Code"].asString());
if(!eventCycleStatusNode["Name"].isNull())
instanceSystemEventSetObject.eventCycleStatus.name = eventCycleStatusNode["Name"].asString();
if(!eventCycleStatusNode["Code"].isNull())
instanceSystemEventSetObject.eventCycleStatus.code = std::stoi(eventCycleStatusNode["Code"].asString());
auto extendedAttributeNode = value["ExtendedAttribute"];
if(!extendedAttributeNode["DiskId"].isNull())
instanceSystemEventSetObject.extendedAttribute.diskId = extendedAttributeNode["DiskId"].asString();
if(!extendedAttributeNode["Device"].isNull())
instanceSystemEventSetObject.extendedAttribute.device = extendedAttributeNode["Device"].asString();
if(!extendedAttributeNode["DiskId"].isNull())
instanceSystemEventSetObject.extendedAttribute.diskId = extendedAttributeNode["DiskId"].asString();
if(!extendedAttributeNode["HostType"].isNull())
instanceSystemEventSetObject.extendedAttribute.hostType = extendedAttributeNode["HostType"].asString();
if(!extendedAttributeNode["HostId"].isNull())
instanceSystemEventSetObject.extendedAttribute.hostId = extendedAttributeNode["HostId"].asString();
auto allInactiveDisksNode = extendedAttributeNode["InactiveDisks"]["InactiveDisk"];
for (auto extendedAttributeNodeInactiveDisksInactiveDisk : allInactiveDisksNode)
{
InstanceSystemEventType::ExtendedAttribute::InactiveDisk inactiveDiskObject;
if(!extendedAttributeNodeInactiveDisksInactiveDisk["CreationTime"].isNull())
inactiveDiskObject.creationTime = extendedAttributeNodeInactiveDisksInactiveDisk["CreationTime"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["ReleaseTime"].isNull())
inactiveDiskObject.releaseTime = extendedAttributeNodeInactiveDisksInactiveDisk["ReleaseTime"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["DeviceType"].isNull())
inactiveDiskObject.deviceType = extendedAttributeNodeInactiveDisksInactiveDisk["DeviceType"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["DeviceCategory"].isNull())
inactiveDiskObject.deviceCategory = extendedAttributeNodeInactiveDisksInactiveDisk["DeviceCategory"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["DeviceSize"].isNull())
inactiveDiskObject.deviceSize = extendedAttributeNodeInactiveDisksInactiveDisk["DeviceSize"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["DeviceCategory"].isNull())
inactiveDiskObject.deviceCategory = extendedAttributeNodeInactiveDisksInactiveDisk["DeviceCategory"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["DeviceType"].isNull())
inactiveDiskObject.deviceType = extendedAttributeNodeInactiveDisksInactiveDisk["DeviceType"].asString();
if(!extendedAttributeNodeInactiveDisksInactiveDisk["ReleaseTime"].isNull())
inactiveDiskObject.releaseTime = extendedAttributeNodeInactiveDisksInactiveDisk["ReleaseTime"].asString();
instanceSystemEventSetObject.extendedAttribute.inactiveDisks.push_back(inactiveDiskObject);
}
instanceSystemEventSet_.push_back(instanceSystemEventSetObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(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::stoi(value["TotalCount"].asString());
}

View File

@@ -148,6 +148,17 @@ void DescribePriceRequest::setInstanceCpuCoreCount(int instanceCpuCoreCount)
setParameter("InstanceCpuCoreCount", std::to_string(instanceCpuCoreCount));
}
std::string DescribePriceRequest::getSpotStrategy()const
{
return spotStrategy_;
}
void DescribePriceRequest::setSpotStrategy(const std::string& spotStrategy)
{
spotStrategy_ = spotStrategy;
setParameter("SpotStrategy", spotStrategy);
}
std::string DescribePriceRequest::getInternetChargeType()const
{
return internetChargeType_;
@@ -159,6 +170,17 @@ void DescribePriceRequest::setInternetChargeType(const std::string& internetChar
setParameter("InternetChargeType", internetChargeType);
}
std::string DescribePriceRequest::getZoneId()const
{
return zoneId_;
}
void DescribePriceRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
std::string DescribePriceRequest::getInstanceNetworkType()const
{
return instanceNetworkType_;
@@ -414,6 +436,17 @@ void DescribePriceRequest::setDataDisk2Size(int dataDisk2Size)
setParameter("DataDisk2Size", std::to_string(dataDisk2Size));
}
int DescribePriceRequest::getSpotDuration()const
{
return spotDuration_;
}
void DescribePriceRequest::setSpotDuration(int spotDuration)
{
spotDuration_ = spotDuration;
setParameter("SpotDuration", std::to_string(spotDuration));
}
std::string DescribePriceRequest::getResourceType()const
{
return resourceType_;

View File

@@ -44,23 +44,23 @@ void DescribePriceResult::parse(const std::string &payload)
for (auto priceInfoNodeRulesRule : allRulesNode)
{
PriceInfo::Rule ruleObject;
if(!priceInfoNodeRulesRule["RuleId"].isNull())
ruleObject.ruleId = std::stol(priceInfoNodeRulesRule["RuleId"].asString());
if(!priceInfoNodeRulesRule["Description"].isNull())
ruleObject.description = priceInfoNodeRulesRule["Description"].asString();
if(!priceInfoNodeRulesRule["RuleId"].isNull())
ruleObject.ruleId = std::stol(priceInfoNodeRulesRule["RuleId"].asString());
priceInfo_.rules.push_back(ruleObject);
}
auto priceNode = priceInfoNode["Price"];
if(!priceNode["OriginalPrice"].isNull())
priceInfo_.price.originalPrice = std::stof(priceNode["OriginalPrice"].asString());
if(!priceNode["DiscountPrice"].isNull())
priceInfo_.price.discountPrice = std::stof(priceNode["DiscountPrice"].asString());
if(!priceNode["TradePrice"].isNull())
priceInfo_.price.tradePrice = std::stof(priceNode["TradePrice"].asString());
if(!priceNode["ReservedInstanceHourPrice"].isNull())
priceInfo_.price.reservedInstanceHourPrice = std::stof(priceNode["ReservedInstanceHourPrice"].asString());
if(!priceNode["DiscountPrice"].isNull())
priceInfo_.price.discountPrice = std::stof(priceNode["DiscountPrice"].asString());
if(!priceNode["Currency"].isNull())
priceInfo_.price.currency = priceNode["Currency"].asString();
if(!priceNode["TradePrice"].isNull())
priceInfo_.price.tradePrice = std::stof(priceNode["TradePrice"].asString());
auto allDetailInfosNode = priceNode["DetailInfos"]["ResourcePriceModel"];
for (auto priceNodeDetailInfosResourcePriceModel : allDetailInfosNode)
{
@@ -77,10 +77,10 @@ void DescribePriceResult::parse(const std::string &payload)
for (auto priceNodeDetailInfosResourcePriceModelSubRulesRule : allSubRulesNode)
{
PriceInfo::Price::ResourcePriceModel::Rule1 subRulesObject;
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].asString());
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].isNull())
subRulesObject.description = priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].asString();
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].asString());
resourcePriceModelObject.subRules.push_back(subRulesObject);
}
priceInfo_.price.detailInfos.push_back(resourcePriceModelObject);

View File

@@ -43,72 +43,76 @@ void DescribeSnapshotsResult::parse(const std::string &payload)
for (auto valueSnapshotsSnapshot : allSnapshotsNode)
{
Snapshot snapshotsObject;
if(!valueSnapshotsSnapshot["SnapshotId"].isNull())
snapshotsObject.snapshotId = valueSnapshotsSnapshot["SnapshotId"].asString();
if(!valueSnapshotsSnapshot["SnapshotSN"].isNull())
snapshotsObject.snapshotSN = valueSnapshotsSnapshot["SnapshotSN"].asString();
if(!valueSnapshotsSnapshot["SnapshotName"].isNull())
snapshotsObject.snapshotName = valueSnapshotsSnapshot["SnapshotName"].asString();
if(!valueSnapshotsSnapshot["Progress"].isNull())
snapshotsObject.progress = valueSnapshotsSnapshot["Progress"].asString();
if(!valueSnapshotsSnapshot["ProductCode"].isNull())
snapshotsObject.productCode = valueSnapshotsSnapshot["ProductCode"].asString();
if(!valueSnapshotsSnapshot["SourceDiskId"].isNull())
snapshotsObject.sourceDiskId = valueSnapshotsSnapshot["SourceDiskId"].asString();
if(!valueSnapshotsSnapshot["SourceDiskType"].isNull())
snapshotsObject.sourceDiskType = valueSnapshotsSnapshot["SourceDiskType"].asString();
if(!valueSnapshotsSnapshot["RetentionDays"].isNull())
snapshotsObject.retentionDays = std::stoi(valueSnapshotsSnapshot["RetentionDays"].asString());
if(!valueSnapshotsSnapshot["Encrypted"].isNull())
snapshotsObject.encrypted = valueSnapshotsSnapshot["Encrypted"].asString() == "true";
if(!valueSnapshotsSnapshot["SourceDiskSize"].isNull())
snapshotsObject.sourceDiskSize = valueSnapshotsSnapshot["SourceDiskSize"].asString();
if(!valueSnapshotsSnapshot["Description"].isNull())
snapshotsObject.description = valueSnapshotsSnapshot["Description"].asString();
if(!valueSnapshotsSnapshot["CreationTime"].isNull())
snapshotsObject.creationTime = valueSnapshotsSnapshot["CreationTime"].asString();
if(!valueSnapshotsSnapshot["LastModifiedTime"].isNull())
snapshotsObject.lastModifiedTime = valueSnapshotsSnapshot["LastModifiedTime"].asString();
if(!valueSnapshotsSnapshot["Status"].isNull())
snapshotsObject.status = valueSnapshotsSnapshot["Status"].asString();
if(!valueSnapshotsSnapshot["Usage"].isNull())
snapshotsObject.usage = valueSnapshotsSnapshot["Usage"].asString();
if(!valueSnapshotsSnapshot["SourceStorageType"].isNull())
snapshotsObject.sourceStorageType = valueSnapshotsSnapshot["SourceStorageType"].asString();
if(!valueSnapshotsSnapshot["RemainTime"].isNull())
snapshotsObject.remainTime = std::stoi(valueSnapshotsSnapshot["RemainTime"].asString());
if(!valueSnapshotsSnapshot["ResourceGroupId"].isNull())
snapshotsObject.resourceGroupId = valueSnapshotsSnapshot["ResourceGroupId"].asString();
if(!valueSnapshotsSnapshot["KMSKeyId"].isNull())
snapshotsObject.kMSKeyId = valueSnapshotsSnapshot["KMSKeyId"].asString();
if(!valueSnapshotsSnapshot["Category"].isNull())
snapshotsObject.category = valueSnapshotsSnapshot["Category"].asString();
if(!valueSnapshotsSnapshot["SnapshotType"].isNull())
snapshotsObject.snapshotType = valueSnapshotsSnapshot["SnapshotType"].asString();
if(!valueSnapshotsSnapshot["CreationTime"].isNull())
snapshotsObject.creationTime = valueSnapshotsSnapshot["CreationTime"].asString();
if(!valueSnapshotsSnapshot["Progress"].isNull())
snapshotsObject.progress = valueSnapshotsSnapshot["Progress"].asString();
if(!valueSnapshotsSnapshot["InstantAccess"].isNull())
snapshotsObject.instantAccess = valueSnapshotsSnapshot["InstantAccess"].asString() == "true";
if(!valueSnapshotsSnapshot["RemainTime"].isNull())
snapshotsObject.remainTime = std::stoi(valueSnapshotsSnapshot["RemainTime"].asString());
if(!valueSnapshotsSnapshot["SourceDiskSize"].isNull())
snapshotsObject.sourceDiskSize = valueSnapshotsSnapshot["SourceDiskSize"].asString();
if(!valueSnapshotsSnapshot["RetentionDays"].isNull())
snapshotsObject.retentionDays = std::stoi(valueSnapshotsSnapshot["RetentionDays"].asString());
if(!valueSnapshotsSnapshot["SourceDiskType"].isNull())
snapshotsObject.sourceDiskType = valueSnapshotsSnapshot["SourceDiskType"].asString();
if(!valueSnapshotsSnapshot["SourceStorageType"].isNull())
snapshotsObject.sourceStorageType = valueSnapshotsSnapshot["SourceStorageType"].asString();
if(!valueSnapshotsSnapshot["Usage"].isNull())
snapshotsObject.usage = valueSnapshotsSnapshot["Usage"].asString();
if(!valueSnapshotsSnapshot["LastModifiedTime"].isNull())
snapshotsObject.lastModifiedTime = valueSnapshotsSnapshot["LastModifiedTime"].asString();
if(!valueSnapshotsSnapshot["Encrypted"].isNull())
snapshotsObject.encrypted = valueSnapshotsSnapshot["Encrypted"].asString() == "true";
if(!valueSnapshotsSnapshot["SnapshotType"].isNull())
snapshotsObject.snapshotType = valueSnapshotsSnapshot["SnapshotType"].asString();
if(!valueSnapshotsSnapshot["SourceDiskId"].isNull())
snapshotsObject.sourceDiskId = valueSnapshotsSnapshot["SourceDiskId"].asString();
if(!valueSnapshotsSnapshot["SnapshotName"].isNull())
snapshotsObject.snapshotName = valueSnapshotsSnapshot["SnapshotName"].asString();
if(!valueSnapshotsSnapshot["InstantAccessRetentionDays"].isNull())
snapshotsObject.instantAccessRetentionDays = std::stoi(valueSnapshotsSnapshot["InstantAccessRetentionDays"].asString());
if(!valueSnapshotsSnapshot["Description"].isNull())
snapshotsObject.description = valueSnapshotsSnapshot["Description"].asString();
if(!valueSnapshotsSnapshot["SnapshotId"].isNull())
snapshotsObject.snapshotId = valueSnapshotsSnapshot["SnapshotId"].asString();
if(!valueSnapshotsSnapshot["ResourceGroupId"].isNull())
snapshotsObject.resourceGroupId = valueSnapshotsSnapshot["ResourceGroupId"].asString();
if(!valueSnapshotsSnapshot["Category"].isNull())
snapshotsObject.category = valueSnapshotsSnapshot["Category"].asString();
if(!valueSnapshotsSnapshot["KMSKeyId"].isNull())
snapshotsObject.kMSKeyId = valueSnapshotsSnapshot["KMSKeyId"].asString();
if(!valueSnapshotsSnapshot["SnapshotSN"].isNull())
snapshotsObject.snapshotSN = valueSnapshotsSnapshot["SnapshotSN"].asString();
if(!valueSnapshotsSnapshot["ProductCode"].isNull())
snapshotsObject.productCode = valueSnapshotsSnapshot["ProductCode"].asString();
if(!valueSnapshotsSnapshot["SourceSnapshotId"].isNull())
snapshotsObject.sourceSnapshotId = valueSnapshotsSnapshot["SourceSnapshotId"].asString();
if(!valueSnapshotsSnapshot["SourceRegionId"].isNull())
snapshotsObject.sourceRegionId = valueSnapshotsSnapshot["SourceRegionId"].asString();
auto allTagsNode = valueSnapshotsSnapshot["Tags"]["Tag"];
for (auto valueSnapshotsSnapshotTagsTag : allTagsNode)
{
Snapshot::Tag tagsObject;
if(!valueSnapshotsSnapshotTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueSnapshotsSnapshotTagsTag["TagKey"].asString();
if(!valueSnapshotsSnapshotTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueSnapshotsSnapshotTagsTag["TagValue"].asString();
if(!valueSnapshotsSnapshotTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueSnapshotsSnapshotTagsTag["TagKey"].asString();
snapshotsObject.tags.push_back(tagsObject);
}
snapshots_.push_back(snapshotsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(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["NextToken"].isNull())
nextToken_ = value["NextToken"].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::stoi(value["TotalCount"].asString());
}
@@ -117,16 +121,16 @@ int DescribeSnapshotsResult::getTotalCount()const
return totalCount_;
}
int DescribeSnapshotsResult::getPageSize()const
{
return pageSize_;
}
std::string DescribeSnapshotsResult::getNextToken()const
{
return nextToken_;
}
int DescribeSnapshotsResult::getPageSize()const
{
return pageSize_;
}
int DescribeSnapshotsResult::getPageNumber()const
{
return pageNumber_;

View File

@@ -39,12 +39,12 @@ void ImportImageResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ImageId"].isNull())
imageId_ = value["ImageId"].asString();
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["ImageId"].isNull())
imageId_ = value["ImageId"].asString();
}

View File

@@ -133,10 +133,10 @@ void ListTagResourcesRequest::setTagFilter(const std::vector<TagFilter>& tagFilt
for(int dep1 = 0; dep1!= tagFilter.size(); dep1++) {
auto tagFilterObj = tagFilter.at(dep1);
std::string tagFilterObjStr = "TagFilter." + std::to_string(dep1 + 1);
setParameter(tagFilterObjStr + ".TagKey", tagFilterObj.tagKey);
for(int dep2 = 0; dep2!= tagFilterObj.tagValues.size(); dep2++) {
setParameter(tagFilterObjStr + ".TagValues."+ std::to_string(dep2), tagFilterObj.tagValues.at(dep2));
}
setParameter(tagFilterObjStr + ".TagKey", tagFilterObj.tagKey);
}
}

View File

@@ -43,14 +43,14 @@ void ListTagResourcesResult::parse(const std::string &payload)
for (auto valueTagResourcesTagResource : allTagResourcesNode)
{
TagResource tagResourcesObject;
if(!valueTagResourcesTagResource["TagValue"].isNull())
tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString();
if(!valueTagResourcesTagResource["ResourceType"].isNull())
tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString();
if(!valueTagResourcesTagResource["ResourceId"].isNull())
tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString();
if(!valueTagResourcesTagResource["TagKey"].isNull())
tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString();
if(!valueTagResourcesTagResource["TagValue"].isNull())
tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString();
tagResources_.push_back(tagResourcesObject);
}
if(!value["NextToken"].isNull())

View File

@@ -45,10 +45,10 @@ void ModifyInstanceChargeTypeResult::parse(const std::string &payload)
FeeOfInstance feeOfInstancesObject;
if(!valueFeeOfInstancesFeeOfInstance["InstanceId"].isNull())
feeOfInstancesObject.instanceId = valueFeeOfInstancesFeeOfInstance["InstanceId"].asString();
if(!valueFeeOfInstancesFeeOfInstance["Fee"].isNull())
feeOfInstancesObject.fee = valueFeeOfInstancesFeeOfInstance["Fee"].asString();
if(!valueFeeOfInstancesFeeOfInstance["Currency"].isNull())
feeOfInstancesObject.currency = valueFeeOfInstancesFeeOfInstance["Currency"].asString();
if(!valueFeeOfInstancesFeeOfInstance["Fee"].isNull())
feeOfInstancesObject.fee = valueFeeOfInstancesFeeOfInstance["Fee"].asString();
feeOfInstances_.push_back(feeOfInstancesObject);
}
if(!value["OrderId"].isNull())

View File

@@ -693,6 +693,17 @@ void RunInstancesRequest::setIpv6Address(const std::vector<std::string>& ipv6Add
}
}
std::string RunInstancesRequest::getSecurityOptionsConfidentialComputingMode()const
{
return securityOptionsConfidentialComputingMode_;
}
void RunInstancesRequest::setSecurityOptionsConfidentialComputingMode(const std::string& securityOptionsConfidentialComputingMode)
{
securityOptionsConfidentialComputingMode_ = securityOptionsConfidentialComputingMode;
setParameter("SecurityOptionsConfidentialComputingMode", securityOptionsConfidentialComputingMode);
}
std::string RunInstancesRequest::getClientToken()const
{
return clientToken_;