Compare commits

..

10 Commits

Author SHA1 Message Date
sdk-team
2a0fc860e2 Support event type in timeline of resource properties. 2020-11-17 10:35:28 +00:00
sdk-team
4dea5b58b8 Support ModifyDBClusterPrimaryZone. 2020-11-17 09:16:08 +00:00
sdk-team
d6ea0cf35d Supported International-26888 Sites Region Endpoints. 2020-11-17 03:58:02 +00:00
sdk-team
f66ec181b6 Supported International-26888 Sites Region Endpoints. 2020-11-17 03:44:13 +00:00
sdk-team
db4cdcbeb0 Nat public IP supports the ISP attribute. 2020-11-16 09:55:53 +00:00
sdk-team
80fbf35ea7 Add a new interface for asynchronous image translation. 2020-11-16 08:05:20 +00:00
sdk-team
5c14e9a77f Update videoenhan. 2020-11-16 03:11:25 +00:00
sdk-team
528d90a5e0 Update videoseg. 2020-11-16 03:10:27 +00:00
sdk-team
fb8137a8d3 Update videorecog. 2020-11-16 03:09:13 +00:00
sdk-team
e54c1961cb Update objectdet. 2020-11-16 02:59:10 +00:00
179 changed files with 8635 additions and 551 deletions

View File

@@ -1,3 +1,37 @@
2020-11-17 Version: patch
- Support event type in timeline of resource properties.
- Support resourceOwnerId in evaluation result.
- Support resource directory in config rule scene.
- Fix terraform related bugs.
2020-11-17 Version: patch
- Support ModifyDBClusterPrimaryZone.
- Support DescribeGlobalDatabaseNetworks.
2020-11-17 Version: patch
- Supported International-26888 Sites Region Endpoints.
2020-11-17 Version: patch
- Supported International-26888 Sites Region Endpoints.
2020-11-16 Version: patch
- Nat public IP supports the ISP attribute.
2020-11-16 Version: patch
- Add a new interface for asynchronous image translation.
2020-11-16 Version: patch
- Update videoenhan.
2020-11-16 Version: patch
- Update videoseg.
2020-11-16 Version: patch
- Update videorecog.
2020-11-16 Version: patch
- Update objectdet.
2020-11-16 Version: patch
- Update imgsearch.

View File

@@ -35,6 +35,7 @@ namespace AlibabaCloud
struct Data
{
std::string orc;
std::string pictureEditor;
std::string url;
};

View File

@@ -44,6 +44,8 @@ void GetImageTranslateResult::parse(const std::string &payload)
data_.url = dataNode["Url"].asString();
if(!dataNode["Orc"].isNull())
data_.orc = dataNode["Orc"].asString();
if(!dataNode["PictureEditor"].isNull())
data_.pictureEditor = dataNode["PictureEditor"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())

View File

@@ -103,6 +103,7 @@ namespace AlibabaCloud
ConfigRuleEvaluationStatus configRuleEvaluationStatus;
Source source;
std::string configRuleState;
std::string maximumExecutionFrequency;
std::string configRuleId;
Scope scope;
std::string configRuleArn;

View File

@@ -37,16 +37,17 @@ namespace AlibabaCloud
struct ConfigurationListItem
{
long accountId;
std::string resourceName;
std::string availabilityZone;
std::string resourceType;
std::string resourceEventType;
std::string resourceCreateTime;
std::string relationshipDiff;
std::string captureTime;
std::string configurationDiff;
std::string resourceId;
std::string resourceName;
std::string relationship;
std::string availabilityZone;
std::string region;
std::string resourceType;
std::string resourceCreateTime;
std::string relationshipDiff;
std::string tags;
};
long totalCount;

View File

@@ -41,14 +41,16 @@ namespace AlibabaCloud
void setMessageType(const std::string& messageType);
std::string getConfigRuleState()const;
void setConfigRuleState(const std::string& configRuleState);
int getRiskLevel()const;
void setRiskLevel(int riskLevel);
int getPageNumber()const;
void setPageNumber(int pageNumber);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getComplianceType()const;
void setComplianceType(const std::string& complianceType);
std::string getConfigRuleSceneId()const;
void setConfigRuleSceneId(const std::string& configRuleSceneId);
int getRiskLevel()const;
void setRiskLevel(int riskLevel);
long getMemberId()const;
void setMemberId(long memberId);
@@ -56,10 +58,11 @@ namespace AlibabaCloud
bool multiAccount_;
std::string messageType_;
std::string configRuleState_;
int riskLevel_;
int pageNumber_;
int pageSize_;
std::string complianceType_;
std::string configRuleSceneId_;
int riskLevel_;
long memberId_;
};

View File

@@ -31,21 +31,21 @@ ConfigClient::ConfigClient(const Credentials &credentials, const ClientConfigura
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "config");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "Config");
}
ConfigClient::ConfigClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "config");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "Config");
}
ConfigClient::ConfigClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "config");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "Config");
}
ConfigClient::~ConfigClient()

View File

@@ -58,6 +58,8 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
configRule_.modifiedTimestamp = std::stol(configRuleNode["ModifiedTimestamp"].asString());
if(!configRuleNode["RiskLevel"].isNull())
configRule_.riskLevel = std::stoi(configRuleNode["RiskLevel"].asString());
if(!configRuleNode["MaximumExecutionFrequency"].isNull())
configRule_.maximumExecutionFrequency = configRuleNode["MaximumExecutionFrequency"].asString();
auto createByNode = configRuleNode["CreateBy"];
if(!createByNode["CreatorType"].isNull())
configRule_.createBy.creatorType = createByNode["CreatorType"].asString();

View File

@@ -74,6 +74,8 @@ void GetResourceConfigurationTimelineResult::parse(const std::string &payload)
configurationListItemObject.resourceType = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceType"].asString();
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Tags"].isNull())
configurationListItemObject.tags = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Tags"].asString();
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceEventType"].isNull())
configurationListItemObject.resourceEventType = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceEventType"].asString();
resourceConfigurationTimeline_.configurationList.push_back(configurationListItemObject);
}

View File

@@ -60,17 +60,6 @@ void ListConfigRulesRequest::setConfigRuleState(const std::string& configRuleSta
setParameter("ConfigRuleState", configRuleState);
}
int ListConfigRulesRequest::getRiskLevel()const
{
return riskLevel_;
}
void ListConfigRulesRequest::setRiskLevel(int riskLevel)
{
riskLevel_ = riskLevel;
setParameter("RiskLevel", std::to_string(riskLevel));
}
int ListConfigRulesRequest::getPageNumber()const
{
return pageNumber_;
@@ -104,6 +93,28 @@ void ListConfigRulesRequest::setComplianceType(const std::string& complianceType
setParameter("ComplianceType", complianceType);
}
std::string ListConfigRulesRequest::getConfigRuleSceneId()const
{
return configRuleSceneId_;
}
void ListConfigRulesRequest::setConfigRuleSceneId(const std::string& configRuleSceneId)
{
configRuleSceneId_ = configRuleSceneId;
setParameter("ConfigRuleSceneId", configRuleSceneId);
}
int ListConfigRulesRequest::getRiskLevel()const
{
return riskLevel_;
}
void ListConfigRulesRequest::setRiskLevel(int riskLevel)
{
riskLevel_ = riskLevel;
setParameter("RiskLevel", std::to_string(riskLevel));
}
long ListConfigRulesRequest::getMemberId()const
{
return memberId_;

View File

@@ -73,6 +73,8 @@ namespace AlibabaCloud
void setResourceType(const std::string& resourceType);
std::string getPeriodUnit()const;
void setPeriodUnit(const std::string& periodUnit);
std::string getTimeSlot()const;
void setTimeSlot(const std::string& timeSlot);
std::vector<std::string> getZoneId()const;
void setZoneId(const std::vector<std::string>& zoneId);
std::string getChargeType()const;
@@ -102,6 +104,7 @@ namespace AlibabaCloud
long ownerId_;
std::string resourceType_;
std::string periodUnit_;
std::string timeSlot_;
std::vector<std::string> zoneId_;
std::string chargeType_;
std::string packageType_;

View File

@@ -143,6 +143,7 @@ namespace AlibabaCloud
std::string zoneId;
std::string clusterId;
std::string hpcClusterId;
std::string iSP;
int deploymentSetGroupNo;
EcsCapacityReservationAttr ecsCapacityReservationAttr;
DedicatedHostAttribute dedicatedHostAttribute;

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setResourceOwnerId(long resourceOwnerId);
std::string getDataDisk3Category()const;
void setDataDisk3Category(const std::string& dataDisk3Category);
std::string getIsp()const;
void setIsp(const std::string& isp);
int getDataDisk4Size()const;
void setDataDisk4Size(int dataDisk4Size);
std::string getPriceUnit()const;
@@ -116,6 +118,7 @@ namespace AlibabaCloud
int dataDisk3Size_;
long resourceOwnerId_;
std::string dataDisk3Category_;
std::string isp_;
int dataDisk4Size_;
std::string priceUnit_;
int period_;

View File

@@ -39,6 +39,8 @@ namespace AlibabaCloud
void setResourceOwnerId(long resourceOwnerId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getISP()const;
void setISP(const std::string& iSP);
int getInternetMaxBandwidthOut()const;
void setInternetMaxBandwidthOut(int internetMaxBandwidthOut);
std::string getStartTime()const;
@@ -65,6 +67,7 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string clientToken_;
std::string iSP_;
int internetMaxBandwidthOut_;
std::string startTime_;
bool autoPay_;

View File

@@ -160,6 +160,8 @@ namespace AlibabaCloud
void setHpcClusterId(const std::string& hpcClusterId);
int getHttpPutResponseHopLimit()const;
void setHttpPutResponseHopLimit(int httpPutResponseHopLimit);
std::string getIsp()const;
void setIsp(const std::string& isp);
std::string getKeyPairName()const;
void setKeyPairName(const std::string& keyPairName);
float getSpotPriceLimit()const;
@@ -280,6 +282,7 @@ namespace AlibabaCloud
long resourceOwnerId_;
std::string hpcClusterId_;
int httpPutResponseHopLimit_;
std::string isp_;
std::string keyPairName_;
float spotPriceLimit_;
int storageSetPartitionNumber_;

View File

@@ -31,21 +31,21 @@ EcsClient::EcsClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ecs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EcsClient::EcsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ecs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EcsClient::EcsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ecs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EcsClient::~EcsClient()

View File

@@ -236,6 +236,17 @@ void CreateCapacityReservationRequest::setPeriodUnit(const std::string& periodUn
setParameter("PeriodUnit", periodUnit);
}
std::string CreateCapacityReservationRequest::getTimeSlot()const
{
return timeSlot_;
}
void CreateCapacityReservationRequest::setTimeSlot(const std::string& timeSlot)
{
timeSlot_ = timeSlot;
setParameter("TimeSlot", timeSlot);
}
std::vector<std::string> CreateCapacityReservationRequest::getZoneId()const
{
return zoneId_;

View File

@@ -45,24 +45,24 @@ void DescribeAccountAttributesResult::parse(const std::string &payload)
AccountAttributeItem accountAttributeItemsObject;
if(!valueAccountAttributeItemsAccountAttributeItem["AttributeName"].isNull())
accountAttributeItemsObject.attributeName = valueAccountAttributeItemsAccountAttributeItem["AttributeName"].asString();
auto allAttributeValuesNode = allAccountAttributeItemsNode["AttributeValues"]["ValueItem"];
for (auto allAccountAttributeItemsNodeAttributeValuesValueItem : allAttributeValuesNode)
auto allAttributeValuesNode = valueAccountAttributeItemsAccountAttributeItem["AttributeValues"]["ValueItem"];
for (auto valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem : allAttributeValuesNode)
{
AccountAttributeItem::ValueItem attributeValuesObject;
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["Value"].isNull())
attributeValuesObject.value = allAccountAttributeItemsNodeAttributeValuesValueItem["Value"].asString();
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["ExpiredTime"].isNull())
attributeValuesObject.expiredTime = allAccountAttributeItemsNodeAttributeValuesValueItem["ExpiredTime"].asString();
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["ZoneId"].isNull())
attributeValuesObject.zoneId = allAccountAttributeItemsNodeAttributeValuesValueItem["ZoneId"].asString();
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["InstanceChargeType"].isNull())
attributeValuesObject.instanceChargeType = allAccountAttributeItemsNodeAttributeValuesValueItem["InstanceChargeType"].asString();
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["InstanceType"].isNull())
attributeValuesObject.instanceType = allAccountAttributeItemsNodeAttributeValuesValueItem["InstanceType"].asString();
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["Count"].isNull())
attributeValuesObject.count = std::stoi(allAccountAttributeItemsNodeAttributeValuesValueItem["Count"].asString());
if(!allAccountAttributeItemsNodeAttributeValuesValueItem["DiskCategory"].isNull())
attributeValuesObject.diskCategory = allAccountAttributeItemsNodeAttributeValuesValueItem["DiskCategory"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["Value"].isNull())
attributeValuesObject.value = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["Value"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["ExpiredTime"].isNull())
attributeValuesObject.expiredTime = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["ExpiredTime"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["ZoneId"].isNull())
attributeValuesObject.zoneId = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["ZoneId"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["InstanceChargeType"].isNull())
attributeValuesObject.instanceChargeType = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["InstanceChargeType"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["InstanceType"].isNull())
attributeValuesObject.instanceType = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["InstanceType"].asString();
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["Count"].isNull())
attributeValuesObject.count = std::stoi(valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["Count"].asString());
if(!valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["DiskCategory"].isNull())
attributeValuesObject.diskCategory = valueAccountAttributeItemsAccountAttributeItemAttributeValuesValueItem["DiskCategory"].asString();
accountAttributeItemsObject.attributeValues.push_back(attributeValuesObject);
}
accountAttributeItems_.push_back(accountAttributeItemsObject);

View File

@@ -51,14 +51,14 @@ void DescribeAutoProvisioningGroupHistoryResult::parse(const std::string &payloa
autoProvisioningGroupHistoriesObject.lastEventTime = valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistory["LastEventTime"].asString();
if(!valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistory["StartTime"].isNull())
autoProvisioningGroupHistoriesObject.startTime = valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistory["StartTime"].asString();
auto allActivityDetailsNode = allAutoProvisioningGroupHistoriesNode["ActivityDetails"]["ActivityDetail"];
for (auto allAutoProvisioningGroupHistoriesNodeActivityDetailsActivityDetail : allActivityDetailsNode)
auto allActivityDetailsNode = valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistory["ActivityDetails"]["ActivityDetail"];
for (auto valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistoryActivityDetailsActivityDetail : allActivityDetailsNode)
{
AutoProvisioningGroupHistory::ActivityDetail activityDetailsObject;
if(!allAutoProvisioningGroupHistoriesNodeActivityDetailsActivityDetail["Detail"].isNull())
activityDetailsObject.detail = allAutoProvisioningGroupHistoriesNodeActivityDetailsActivityDetail["Detail"].asString();
if(!allAutoProvisioningGroupHistoriesNodeActivityDetailsActivityDetail["Status"].isNull())
activityDetailsObject.status = allAutoProvisioningGroupHistoriesNodeActivityDetailsActivityDetail["Status"].asString();
if(!valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistoryActivityDetailsActivityDetail["Detail"].isNull())
activityDetailsObject.detail = valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistoryActivityDetailsActivityDetail["Detail"].asString();
if(!valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistoryActivityDetailsActivityDetail["Status"].isNull())
activityDetailsObject.status = valueAutoProvisioningGroupHistoriesAutoProvisioningGroupHistoryActivityDetailsActivityDetail["Status"].asString();
autoProvisioningGroupHistoriesObject.activityDetails.push_back(activityDetailsObject);
}
autoProvisioningGroupHistories_.push_back(autoProvisioningGroupHistoriesObject);

View File

@@ -73,20 +73,20 @@ void DescribeAutoProvisioningGroupsResult::parse(const std::string &payload)
autoProvisioningGroupsObject.terminateInstancesWithExpiration = valueAutoProvisioningGroupsAutoProvisioningGroup["TerminateInstancesWithExpiration"].asString() == "true";
if(!valueAutoProvisioningGroupsAutoProvisioningGroup["CreationTime"].isNull())
autoProvisioningGroupsObject.creationTime = valueAutoProvisioningGroupsAutoProvisioningGroup["CreationTime"].asString();
auto allLaunchTemplateConfigsNode = allAutoProvisioningGroupsNode["LaunchTemplateConfigs"]["LaunchTemplateConfig"];
for (auto allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig : allLaunchTemplateConfigsNode)
auto allLaunchTemplateConfigsNode = valueAutoProvisioningGroupsAutoProvisioningGroup["LaunchTemplateConfigs"]["LaunchTemplateConfig"];
for (auto valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig : allLaunchTemplateConfigsNode)
{
AutoProvisioningGroup::LaunchTemplateConfig launchTemplateConfigsObject;
if(!allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["InstanceType"].isNull())
launchTemplateConfigsObject.instanceType = allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["InstanceType"].asString();
if(!allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["MaxPrice"].isNull())
launchTemplateConfigsObject.maxPrice = std::stof(allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["MaxPrice"].asString());
if(!allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["VSwitchId"].isNull())
launchTemplateConfigsObject.vSwitchId = allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["VSwitchId"].asString();
if(!allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["WeightedCapacity"].isNull())
launchTemplateConfigsObject.weightedCapacity = std::stof(allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["WeightedCapacity"].asString());
if(!allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["Priority"].isNull())
launchTemplateConfigsObject.priority = std::stof(allAutoProvisioningGroupsNodeLaunchTemplateConfigsLaunchTemplateConfig["Priority"].asString());
if(!valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["InstanceType"].isNull())
launchTemplateConfigsObject.instanceType = valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["InstanceType"].asString();
if(!valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["MaxPrice"].isNull())
launchTemplateConfigsObject.maxPrice = std::stof(valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["MaxPrice"].asString());
if(!valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["VSwitchId"].isNull())
launchTemplateConfigsObject.vSwitchId = valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["VSwitchId"].asString();
if(!valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["WeightedCapacity"].isNull())
launchTemplateConfigsObject.weightedCapacity = std::stof(valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["WeightedCapacity"].asString());
if(!valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["Priority"].isNull())
launchTemplateConfigsObject.priority = std::stof(valueAutoProvisioningGroupsAutoProvisioningGroupLaunchTemplateConfigsLaunchTemplateConfig["Priority"].asString());
autoProvisioningGroupsObject.launchTemplateConfigs.push_back(launchTemplateConfigsObject);
}
auto spotOptionsNode = value["SpotOptions"];

View File

@@ -69,14 +69,14 @@ void DescribeAutoSnapshotPolicyExResult::parse(const std::string &payload)
autoSnapshotPoliciesObject.targetCopyRegions = valueAutoSnapshotPoliciesAutoSnapshotPolicy["TargetCopyRegions"].asString();
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicy["CopiedSnapshotsRetentionDays"].isNull())
autoSnapshotPoliciesObject.copiedSnapshotsRetentionDays = std::stoi(valueAutoSnapshotPoliciesAutoSnapshotPolicy["CopiedSnapshotsRetentionDays"].asString());
auto allTagsNode = allAutoSnapshotPoliciesNode["Tags"]["Tag"];
for (auto allAutoSnapshotPoliciesNodeTagsTag : allTagsNode)
auto allTagsNode = valueAutoSnapshotPoliciesAutoSnapshotPolicy["Tags"]["Tag"];
for (auto valueAutoSnapshotPoliciesAutoSnapshotPolicyTagsTag : allTagsNode)
{
AutoSnapshotPolicy::Tag tagsObject;
if(!allAutoSnapshotPoliciesNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allAutoSnapshotPoliciesNodeTagsTag["TagKey"].asString();
if(!allAutoSnapshotPoliciesNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allAutoSnapshotPoliciesNodeTagsTag["TagValue"].asString();
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicyTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueAutoSnapshotPoliciesAutoSnapshotPolicyTagsTag["TagKey"].asString();
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicyTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueAutoSnapshotPoliciesAutoSnapshotPolicyTagsTag["TagValue"].asString();
autoSnapshotPoliciesObject.tags.push_back(tagsObject);
}
autoSnapshotPolicies_.push_back(autoSnapshotPoliciesObject);

View File

@@ -51,28 +51,28 @@ void DescribeAvailableResourceResult::parse(const std::string &payload)
availableZonesObject.status = valueAvailableZonesAvailableZone["Status"].asString();
if(!valueAvailableZonesAvailableZone["StatusCategory"].isNull())
availableZonesObject.statusCategory = valueAvailableZonesAvailableZone["StatusCategory"].asString();
auto allAvailableResourcesNode = allAvailableZonesNode["AvailableResources"]["AvailableResource"];
for (auto allAvailableZonesNodeAvailableResourcesAvailableResource : allAvailableResourcesNode)
auto allAvailableResourcesNode = valueAvailableZonesAvailableZone["AvailableResources"]["AvailableResource"];
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource : allAvailableResourcesNode)
{
AvailableZone::AvailableResource availableResourcesObject;
if(!allAvailableZonesNodeAvailableResourcesAvailableResource["Type"].isNull())
availableResourcesObject.type = allAvailableZonesNodeAvailableResourcesAvailableResource["Type"].asString();
auto allSupportedResourcesNode = allAvailableResourcesNode["SupportedResources"]["SupportedResource"];
for (auto allAvailableResourcesNodeSupportedResourcesSupportedResource : allSupportedResourcesNode)
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["Type"].isNull())
availableResourcesObject.type = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["Type"].asString();
auto allSupportedResourcesNode = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["SupportedResources"]["SupportedResource"];
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource : allSupportedResourcesNode)
{
AvailableZone::AvailableResource::SupportedResource supportedResourcesObject;
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Value"].isNull())
supportedResourcesObject.value = allAvailableResourcesNodeSupportedResourcesSupportedResource["Value"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Status"].isNull())
supportedResourcesObject.status = allAvailableResourcesNodeSupportedResourcesSupportedResource["Status"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["StatusCategory"].isNull())
supportedResourcesObject.statusCategory = allAvailableResourcesNodeSupportedResourcesSupportedResource["StatusCategory"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Min"].isNull())
supportedResourcesObject.min = std::stoi(allAvailableResourcesNodeSupportedResourcesSupportedResource["Min"].asString());
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Max"].isNull())
supportedResourcesObject.max = std::stoi(allAvailableResourcesNodeSupportedResourcesSupportedResource["Max"].asString());
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Unit"].isNull())
supportedResourcesObject.unit = allAvailableResourcesNodeSupportedResourcesSupportedResource["Unit"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Value"].isNull())
supportedResourcesObject.value = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Value"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Status"].isNull())
supportedResourcesObject.status = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Status"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["StatusCategory"].isNull())
supportedResourcesObject.statusCategory = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["StatusCategory"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Min"].isNull())
supportedResourcesObject.min = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Min"].asString());
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Max"].isNull())
supportedResourcesObject.max = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Max"].asString());
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Unit"].isNull())
supportedResourcesObject.unit = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Unit"].asString();
availableResourcesObject.supportedResources.push_back(supportedResourcesObject);
}
availableZonesObject.availableResources.push_back(availableResourcesObject);

View File

@@ -71,14 +71,14 @@ void DescribeBandwidthPackagesResult::parse(const std::string &payload)
bandwidthPackagesObject.creationTime = valueBandwidthPackagesBandwidthPackage["CreationTime"].asString();
if(!valueBandwidthPackagesBandwidthPackage["Status"].isNull())
bandwidthPackagesObject.status = valueBandwidthPackagesBandwidthPackage["Status"].asString();
auto allPublicIpAddressesNode = allBandwidthPackagesNode["PublicIpAddresses"]["PublicIpAddresse"];
for (auto allBandwidthPackagesNodePublicIpAddressesPublicIpAddresse : allPublicIpAddressesNode)
auto allPublicIpAddressesNode = valueBandwidthPackagesBandwidthPackage["PublicIpAddresses"]["PublicIpAddresse"];
for (auto valueBandwidthPackagesBandwidthPackagePublicIpAddressesPublicIpAddresse : allPublicIpAddressesNode)
{
BandwidthPackage::PublicIpAddresse publicIpAddressesObject;
if(!allBandwidthPackagesNodePublicIpAddressesPublicIpAddresse["AllocationId"].isNull())
publicIpAddressesObject.allocationId = allBandwidthPackagesNodePublicIpAddressesPublicIpAddresse["AllocationId"].asString();
if(!allBandwidthPackagesNodePublicIpAddressesPublicIpAddresse["IpAddress"].isNull())
publicIpAddressesObject.ipAddress = allBandwidthPackagesNodePublicIpAddressesPublicIpAddresse["IpAddress"].asString();
if(!valueBandwidthPackagesBandwidthPackagePublicIpAddressesPublicIpAddresse["AllocationId"].isNull())
publicIpAddressesObject.allocationId = valueBandwidthPackagesBandwidthPackagePublicIpAddressesPublicIpAddresse["AllocationId"].asString();
if(!valueBandwidthPackagesBandwidthPackagePublicIpAddressesPublicIpAddresse["IpAddress"].isNull())
publicIpAddressesObject.ipAddress = valueBandwidthPackagesBandwidthPackagePublicIpAddressesPublicIpAddresse["IpAddress"].asString();
bandwidthPackagesObject.publicIpAddresses.push_back(publicIpAddressesObject);
}
bandwidthPackages_.push_back(bandwidthPackagesObject);

View File

@@ -65,18 +65,18 @@ void DescribeCapacityReservationsResult::parse(const std::string &payload)
capacityReservationSetObject.instanceChargeType = valueCapacityReservationSetCapacityReservationItem["InstanceChargeType"].asString();
if(!valueCapacityReservationSetCapacityReservationItem["Platform"].isNull())
capacityReservationSetObject.platform = valueCapacityReservationSetCapacityReservationItem["Platform"].asString();
auto allAllocatedResourcesNode = allCapacityReservationSetNode["AllocatedResources"]["AllocatedResource"];
for (auto allCapacityReservationSetNodeAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
auto allAllocatedResourcesNode = valueCapacityReservationSetCapacityReservationItem["AllocatedResources"]["AllocatedResource"];
for (auto valueCapacityReservationSetCapacityReservationItemAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
{
CapacityReservationItem::AllocatedResource allocatedResourcesObject;
if(!allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["zoneId"].isNull())
allocatedResourcesObject.zoneId = allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["zoneId"].asString();
if(!allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["InstanceType"].isNull())
allocatedResourcesObject.instanceType = allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["InstanceType"].asString();
if(!allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
allocatedResourcesObject.totalAmount = std::stoi(allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["TotalAmount"].asString());
if(!allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["UsedAmount"].isNull())
allocatedResourcesObject.usedAmount = std::stoi(allCapacityReservationSetNodeAllocatedResourcesAllocatedResource["UsedAmount"].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);
}
capacityReservationSet_.push_back(capacityReservationSetObject);

View File

@@ -55,14 +55,14 @@ void DescribeDedicatedHostClustersResult::parse(const std::string &payload)
dedicatedHostClustersObject.description = valueDedicatedHostClustersDedicatedHostCluster["Description"].asString();
if(!valueDedicatedHostClustersDedicatedHostCluster["ResourceGroupId"].isNull())
dedicatedHostClustersObject.resourceGroupId = valueDedicatedHostClustersDedicatedHostCluster["ResourceGroupId"].asString();
auto allTagsNode = allDedicatedHostClustersNode["Tags"]["Tag"];
for (auto allDedicatedHostClustersNodeTagsTag : allTagsNode)
auto allTagsNode = valueDedicatedHostClustersDedicatedHostCluster["Tags"]["Tag"];
for (auto valueDedicatedHostClustersDedicatedHostClusterTagsTag : allTagsNode)
{
DedicatedHostCluster::Tag tagsObject;
if(!allDedicatedHostClustersNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allDedicatedHostClustersNodeTagsTag["TagKey"].asString();
if(!allDedicatedHostClustersNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allDedicatedHostClustersNodeTagsTag["TagValue"].asString();
if(!valueDedicatedHostClustersDedicatedHostClusterTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueDedicatedHostClustersDedicatedHostClusterTagsTag["TagKey"].asString();
if(!valueDedicatedHostClustersDedicatedHostClusterTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueDedicatedHostClustersDedicatedHostClusterTagsTag["TagValue"].asString();
dedicatedHostClustersObject.tags.push_back(tagsObject);
}
auto dedicatedHostClusterCapacityNode = value["DedicatedHostClusterCapacity"];

View File

@@ -87,32 +87,32 @@ void DescribeDedicatedHostsResult::parse(const std::string &payload)
dedicatedHostsObject.dedicatedHostClusterId = valueDedicatedHostsDedicatedHost["DedicatedHostClusterId"].asString();
if(!valueDedicatedHostsDedicatedHost["CpuOverCommitRatio"].isNull())
dedicatedHostsObject.cpuOverCommitRatio = std::stof(valueDedicatedHostsDedicatedHost["CpuOverCommitRatio"].asString());
auto allInstancesNode = allDedicatedHostsNode["Instances"]["Instance"];
for (auto allDedicatedHostsNodeInstancesInstance : allInstancesNode)
auto allInstancesNode = valueDedicatedHostsDedicatedHost["Instances"]["Instance"];
for (auto valueDedicatedHostsDedicatedHostInstancesInstance : allInstancesNode)
{
DedicatedHost::Instance instancesObject;
if(!allDedicatedHostsNodeInstancesInstance["InstanceId"].isNull())
instancesObject.instanceId = allDedicatedHostsNodeInstancesInstance["InstanceId"].asString();
if(!allDedicatedHostsNodeInstancesInstance["InstanceType"].isNull())
instancesObject.instanceType = allDedicatedHostsNodeInstancesInstance["InstanceType"].asString();
if(!valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].isNull())
instancesObject.instanceId = valueDedicatedHostsDedicatedHostInstancesInstance["InstanceId"].asString();
if(!valueDedicatedHostsDedicatedHostInstancesInstance["InstanceType"].isNull())
instancesObject.instanceType = valueDedicatedHostsDedicatedHostInstancesInstance["InstanceType"].asString();
dedicatedHostsObject.instances.push_back(instancesObject);
}
auto allOperationLocksNode = allDedicatedHostsNode["OperationLocks"]["OperationLock"];
for (auto allDedicatedHostsNodeOperationLocksOperationLock : allOperationLocksNode)
auto allOperationLocksNode = valueDedicatedHostsDedicatedHost["OperationLocks"]["OperationLock"];
for (auto valueDedicatedHostsDedicatedHostOperationLocksOperationLock : allOperationLocksNode)
{
DedicatedHost::OperationLock operationLocksObject;
if(!allDedicatedHostsNodeOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = allDedicatedHostsNodeOperationLocksOperationLock["LockReason"].asString();
if(!valueDedicatedHostsDedicatedHostOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = valueDedicatedHostsDedicatedHostOperationLocksOperationLock["LockReason"].asString();
dedicatedHostsObject.operationLocks.push_back(operationLocksObject);
}
auto allTagsNode = allDedicatedHostsNode["Tags"]["Tag"];
for (auto allDedicatedHostsNodeTagsTag : allTagsNode)
auto allTagsNode = valueDedicatedHostsDedicatedHost["Tags"]["Tag"];
for (auto valueDedicatedHostsDedicatedHostTagsTag : allTagsNode)
{
DedicatedHost::Tag tagsObject;
if(!allDedicatedHostsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allDedicatedHostsNodeTagsTag["TagKey"].asString();
if(!allDedicatedHostsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allDedicatedHostsNodeTagsTag["TagValue"].asString();
if(!valueDedicatedHostsDedicatedHostTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueDedicatedHostsDedicatedHostTagsTag["TagKey"].asString();
if(!valueDedicatedHostsDedicatedHostTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueDedicatedHostsDedicatedHostTagsTag["TagValue"].asString();
dedicatedHostsObject.tags.push_back(tagsObject);
}
auto capacityNode = value["Capacity"];

View File

@@ -79,18 +79,18 @@ void DescribeDemandsResult::parse(const std::string &payload)
demandsObject.usedAmount = std::stoi(valueDemandsDemand["UsedAmount"].asString());
if(!valueDemandsDemand["DeliveringAmount"].isNull())
demandsObject.deliveringAmount = std::stoi(valueDemandsDemand["DeliveringAmount"].asString());
auto allSupplyInfosNode = allDemandsNode["SupplyInfos"]["SupplyInfo"];
for (auto allDemandsNodeSupplyInfosSupplyInfo : allSupplyInfosNode)
auto allSupplyInfosNode = valueDemandsDemand["SupplyInfos"]["SupplyInfo"];
for (auto valueDemandsDemandSupplyInfosSupplyInfo : allSupplyInfosNode)
{
Demand::SupplyInfo supplyInfosObject;
if(!allDemandsNodeSupplyInfosSupplyInfo["Amount"].isNull())
supplyInfosObject.amount = std::stoi(allDemandsNodeSupplyInfosSupplyInfo["Amount"].asString());
if(!allDemandsNodeSupplyInfosSupplyInfo["SupplyStatus"].isNull())
supplyInfosObject.supplyStatus = allDemandsNodeSupplyInfosSupplyInfo["SupplyStatus"].asString();
if(!allDemandsNodeSupplyInfosSupplyInfo["SupplyStartTime"].isNull())
supplyInfosObject.supplyStartTime = allDemandsNodeSupplyInfosSupplyInfo["SupplyStartTime"].asString();
if(!allDemandsNodeSupplyInfosSupplyInfo["SupplyEndTime"].isNull())
supplyInfosObject.supplyEndTime = allDemandsNodeSupplyInfosSupplyInfo["SupplyEndTime"].asString();
if(!valueDemandsDemandSupplyInfosSupplyInfo["Amount"].isNull())
supplyInfosObject.amount = std::stoi(valueDemandsDemandSupplyInfosSupplyInfo["Amount"].asString());
if(!valueDemandsDemandSupplyInfosSupplyInfo["SupplyStatus"].isNull())
supplyInfosObject.supplyStatus = valueDemandsDemandSupplyInfosSupplyInfo["SupplyStatus"].asString();
if(!valueDemandsDemandSupplyInfosSupplyInfo["SupplyStartTime"].isNull())
supplyInfosObject.supplyStartTime = valueDemandsDemandSupplyInfosSupplyInfo["SupplyStartTime"].asString();
if(!valueDemandsDemandSupplyInfosSupplyInfo["SupplyEndTime"].isNull())
supplyInfosObject.supplyEndTime = valueDemandsDemandSupplyInfosSupplyInfo["SupplyEndTime"].asString();
demandsObject.supplyInfos.push_back(supplyInfosObject);
}
demands_.push_back(demandsObject);

View File

@@ -49,18 +49,18 @@ void DescribeDisksFullStatusResult::parse(const std::string &payload)
diskFullStatusSetObject.instanceId = valueDiskFullStatusSetDiskFullStatusType["InstanceId"].asString();
if(!valueDiskFullStatusSetDiskFullStatusType["Device"].isNull())
diskFullStatusSetObject.device = valueDiskFullStatusSetDiskFullStatusType["Device"].asString();
auto allDiskEventSetNode = allDiskFullStatusSetNode["DiskEventSet"]["DiskEventType"];
for (auto allDiskFullStatusSetNodeDiskEventSetDiskEventType : allDiskEventSetNode)
auto allDiskEventSetNode = valueDiskFullStatusSetDiskFullStatusType["DiskEventSet"]["DiskEventType"];
for (auto valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType : allDiskEventSetNode)
{
DiskFullStatusType::DiskEventType diskEventSetObject;
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventId"].isNull())
diskEventSetObject.eventId = allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventId"].asString();
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventTime"].isNull())
diskEventSetObject.eventTime = allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventTime"].asString();
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventEndTime"].isNull())
diskEventSetObject.eventEndTime = allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventEndTime"].asString();
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["ImpactLevel"].isNull())
diskEventSetObject.impactLevel = allDiskFullStatusSetNodeDiskEventSetDiskEventType["ImpactLevel"].asString();
if(!valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventId"].isNull())
diskEventSetObject.eventId = valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventId"].asString();
if(!valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventTime"].isNull())
diskEventSetObject.eventTime = valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventTime"].asString();
if(!valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventEndTime"].isNull())
diskEventSetObject.eventEndTime = valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["EventEndTime"].asString();
if(!valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["ImpactLevel"].isNull())
diskEventSetObject.impactLevel = valueDiskFullStatusSetDiskFullStatusTypeDiskEventSetDiskEventType["ImpactLevel"].asString();
auto eventTypeNode = value["EventType"];
if(!eventTypeNode["Code"].isNull())
diskEventSetObject.eventType.code = std::stoi(eventTypeNode["Code"].asString());

View File

@@ -117,34 +117,34 @@ void DescribeDisksResult::parse(const std::string &payload)
disksObject.bdfId = valueDisksDisk["BdfId"].asString();
if(!valueDisksDisk["SerialNumber"].isNull())
disksObject.serialNumber = valueDisksDisk["SerialNumber"].asString();
auto allOperationLocksNode = allDisksNode["OperationLocks"]["OperationLock"];
for (auto allDisksNodeOperationLocksOperationLock : allOperationLocksNode)
auto allOperationLocksNode = valueDisksDisk["OperationLocks"]["OperationLock"];
for (auto valueDisksDiskOperationLocksOperationLock : allOperationLocksNode)
{
Disk::OperationLock operationLocksObject;
if(!allDisksNodeOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = allDisksNodeOperationLocksOperationLock["LockReason"].asString();
if(!valueDisksDiskOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = valueDisksDiskOperationLocksOperationLock["LockReason"].asString();
disksObject.operationLocks.push_back(operationLocksObject);
}
auto allMountInstancesNode = allDisksNode["MountInstances"]["MountInstance"];
for (auto allDisksNodeMountInstancesMountInstance : allMountInstancesNode)
auto allMountInstancesNode = valueDisksDisk["MountInstances"]["MountInstance"];
for (auto valueDisksDiskMountInstancesMountInstance : allMountInstancesNode)
{
Disk::MountInstance mountInstancesObject;
if(!allDisksNodeMountInstancesMountInstance["InstanceId"].isNull())
mountInstancesObject.instanceId = allDisksNodeMountInstancesMountInstance["InstanceId"].asString();
if(!allDisksNodeMountInstancesMountInstance["Device"].isNull())
mountInstancesObject.device = allDisksNodeMountInstancesMountInstance["Device"].asString();
if(!allDisksNodeMountInstancesMountInstance["AttachedTime"].isNull())
mountInstancesObject.attachedTime = allDisksNodeMountInstancesMountInstance["AttachedTime"].asString();
if(!valueDisksDiskMountInstancesMountInstance["InstanceId"].isNull())
mountInstancesObject.instanceId = valueDisksDiskMountInstancesMountInstance["InstanceId"].asString();
if(!valueDisksDiskMountInstancesMountInstance["Device"].isNull())
mountInstancesObject.device = valueDisksDiskMountInstancesMountInstance["Device"].asString();
if(!valueDisksDiskMountInstancesMountInstance["AttachedTime"].isNull())
mountInstancesObject.attachedTime = valueDisksDiskMountInstancesMountInstance["AttachedTime"].asString();
disksObject.mountInstances.push_back(mountInstancesObject);
}
auto allTagsNode = allDisksNode["Tags"]["Tag"];
for (auto allDisksNodeTagsTag : allTagsNode)
auto allTagsNode = valueDisksDisk["Tags"]["Tag"];
for (auto valueDisksDiskTagsTag : allTagsNode)
{
Disk::Tag tagsObject;
if(!allDisksNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allDisksNodeTagsTag["TagKey"].asString();
if(!allDisksNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allDisksNodeTagsTag["TagValue"].asString();
if(!valueDisksDiskTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueDisksDiskTagsTag["TagKey"].asString();
if(!valueDisksDiskTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueDisksDiskTagsTag["TagValue"].asString();
disksObject.tags.push_back(tagsObject);
}
disks_.push_back(disksObject);

View File

@@ -67,12 +67,12 @@ void DescribeEipAddressesResult::parse(const std::string &payload)
eipAddressesObject.chargeType = valueEipAddressesEipAddress["ChargeType"].asString();
if(!valueEipAddressesEipAddress["ExpiredTime"].isNull())
eipAddressesObject.expiredTime = valueEipAddressesEipAddress["ExpiredTime"].asString();
auto allOperationLocksNode = allEipAddressesNode["OperationLocks"]["LockReason"];
for (auto allEipAddressesNodeOperationLocksLockReason : allOperationLocksNode)
auto allOperationLocksNode = valueEipAddressesEipAddress["OperationLocks"]["LockReason"];
for (auto valueEipAddressesEipAddressOperationLocksLockReason : allOperationLocksNode)
{
EipAddress::LockReason operationLocksObject;
if(!allEipAddressesNodeOperationLocksLockReason["LockReason"].isNull())
operationLocksObject.lockReason = allEipAddressesNodeOperationLocksLockReason["LockReason"].asString();
if(!valueEipAddressesEipAddressOperationLocksLockReason["LockReason"].isNull())
operationLocksObject.lockReason = valueEipAddressesEipAddressOperationLocksLockReason["LockReason"].asString();
eipAddressesObject.operationLocks.push_back(operationLocksObject);
}
eipAddresses_.push_back(eipAddressesObject);

View File

@@ -65,18 +65,18 @@ void DescribeElasticityAssurancesResult::parse(const std::string &payload)
elasticityAssuranceSetObject.endTime = valueElasticityAssuranceSetElasticityAssuranceItem["EndTime"].asString();
if(!valueElasticityAssuranceSetElasticityAssuranceItem["LatestStartTime"].isNull())
elasticityAssuranceSetObject.latestStartTime = valueElasticityAssuranceSetElasticityAssuranceItem["LatestStartTime"].asString();
auto allAllocatedResourcesNode = allElasticityAssuranceSetNode["AllocatedResources"]["AllocatedResource"];
for (auto allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
auto allAllocatedResourcesNode = valueElasticityAssuranceSetElasticityAssuranceItem["AllocatedResources"]["AllocatedResource"];
for (auto valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
{
ElasticityAssuranceItem::AllocatedResource allocatedResourcesObject;
if(!allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["zoneId"].isNull())
allocatedResourcesObject.zoneId = allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["zoneId"].asString();
if(!allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["InstanceType"].isNull())
allocatedResourcesObject.instanceType = allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["InstanceType"].asString();
if(!allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
allocatedResourcesObject.totalAmount = std::stoi(allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["TotalAmount"].asString());
if(!allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["UsedAmount"].isNull())
allocatedResourcesObject.usedAmount = std::stoi(allElasticityAssuranceSetNodeAllocatedResourcesAllocatedResource["UsedAmount"].asString());
if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].isNull())
allocatedResourcesObject.zoneId = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].asString();
if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].isNull())
allocatedResourcesObject.instanceType = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].asString();
if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
allocatedResourcesObject.totalAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].asString());
if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["UsedAmount"].isNull())
allocatedResourcesObject.usedAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["UsedAmount"].asString());
elasticityAssuranceSetObject.allocatedResources.push_back(allocatedResourcesObject);
}
elasticityAssuranceSet_.push_back(elasticityAssuranceSetObject);

View File

@@ -89,38 +89,38 @@ void DescribeImagesResult::parse(const std::string &payload)
imagesObject.isCopied = valueImagesImage["IsCopied"].asString() == "true";
if(!valueImagesImage["ResourceGroupId"].isNull())
imagesObject.resourceGroupId = valueImagesImage["ResourceGroupId"].asString();
auto allDiskDeviceMappingsNode = allImagesNode["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto allImagesNodeDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
{
Image::DiskDeviceMapping diskDeviceMappingsObject;
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].isNull())
diskDeviceMappingsObject.snapshotId = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["SnapshotId"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Size"].isNull())
diskDeviceMappingsObject.size = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Size"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Device"].isNull())
diskDeviceMappingsObject.device = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Device"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Type"].isNull())
diskDeviceMappingsObject.type = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Type"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Format"].isNull())
diskDeviceMappingsObject.format = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Format"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["ImportOSSBucket"].isNull())
diskDeviceMappingsObject.importOSSBucket = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["ImportOSSBucket"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].isNull())
diskDeviceMappingsObject.importOSSObject = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["ImportOSSObject"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Progress"].isNull())
diskDeviceMappingsObject.progress = allImagesNodeDiskDeviceMappingsDiskDeviceMapping["Progress"].asString();
if(!allImagesNodeDiskDeviceMappingsDiskDeviceMapping["RemainTime"].isNull())
diskDeviceMappingsObject.remainTime = std::stoi(allImagesNodeDiskDeviceMappingsDiskDeviceMapping["RemainTime"].asString());
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["RemainTime"].isNull())
diskDeviceMappingsObject.remainTime = std::stoi(valueImagesImageDiskDeviceMappingsDiskDeviceMapping["RemainTime"].asString());
imagesObject.diskDeviceMappings.push_back(diskDeviceMappingsObject);
}
auto allTagsNode = allImagesNode["Tags"]["Tag"];
for (auto allImagesNodeTagsTag : allTagsNode)
auto allTagsNode = valueImagesImage["Tags"]["Tag"];
for (auto valueImagesImageTagsTag : allTagsNode)
{
Image::Tag tagsObject;
if(!allImagesNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allImagesNodeTagsTag["TagKey"].asString();
if(!allImagesNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allImagesNodeTagsTag["TagValue"].asString();
if(!valueImagesImageTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueImagesImageTagsTag["TagKey"].asString();
if(!valueImagesImageTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueImagesImageTagsTag["TagValue"].asString();
imagesObject.tags.push_back(tagsObject);
}
images_.push_back(imagesObject);

View File

@@ -45,14 +45,14 @@ void DescribeInstanceMaintenanceAttributesResult::parse(const std::string &paylo
MaintenanceAttribute maintenanceAttributesObject;
if(!valueMaintenanceAttributesMaintenanceAttribute["InstanceId"].isNull())
maintenanceAttributesObject.instanceId = valueMaintenanceAttributesMaintenanceAttribute["InstanceId"].asString();
auto allMaintenanceWindowsNode = allMaintenanceAttributesNode["MaintenanceWindows"]["MaintenanceWindow"];
for (auto allMaintenanceAttributesNodeMaintenanceWindowsMaintenanceWindow : allMaintenanceWindowsNode)
auto allMaintenanceWindowsNode = valueMaintenanceAttributesMaintenanceAttribute["MaintenanceWindows"]["MaintenanceWindow"];
for (auto valueMaintenanceAttributesMaintenanceAttributeMaintenanceWindowsMaintenanceWindow : allMaintenanceWindowsNode)
{
MaintenanceAttribute::MaintenanceWindow maintenanceWindowsObject;
if(!allMaintenanceAttributesNodeMaintenanceWindowsMaintenanceWindow["StartTime"].isNull())
maintenanceWindowsObject.startTime = allMaintenanceAttributesNodeMaintenanceWindowsMaintenanceWindow["StartTime"].asString();
if(!allMaintenanceAttributesNodeMaintenanceWindowsMaintenanceWindow["EndTime"].isNull())
maintenanceWindowsObject.endTime = allMaintenanceAttributesNodeMaintenanceWindowsMaintenanceWindow["EndTime"].asString();
if(!valueMaintenanceAttributesMaintenanceAttributeMaintenanceWindowsMaintenanceWindow["StartTime"].isNull())
maintenanceWindowsObject.startTime = valueMaintenanceAttributesMaintenanceAttributeMaintenanceWindowsMaintenanceWindow["StartTime"].asString();
if(!valueMaintenanceAttributesMaintenanceAttributeMaintenanceWindowsMaintenanceWindow["EndTime"].isNull())
maintenanceWindowsObject.endTime = valueMaintenanceAttributesMaintenanceAttributeMaintenanceWindowsMaintenanceWindow["EndTime"].asString();
maintenanceAttributesObject.maintenanceWindows.push_back(maintenanceWindowsObject);
}
auto actionOnMaintenanceNode = value["ActionOnMaintenance"];

View File

@@ -45,20 +45,20 @@ void DescribeInstancesFullStatusResult::parse(const std::string &payload)
InstanceFullStatusType instanceFullStatusSetObject;
if(!valueInstanceFullStatusSetInstanceFullStatusType["InstanceId"].isNull())
instanceFullStatusSetObject.instanceId = valueInstanceFullStatusSetInstanceFullStatusType["InstanceId"].asString();
auto allScheduledSystemEventSetNode = allInstanceFullStatusSetNode["ScheduledSystemEventSet"]["ScheduledSystemEventType"];
for (auto allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType : allScheduledSystemEventSetNode)
auto allScheduledSystemEventSetNode = valueInstanceFullStatusSetInstanceFullStatusType["ScheduledSystemEventSet"]["ScheduledSystemEventType"];
for (auto valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType : allScheduledSystemEventSetNode)
{
InstanceFullStatusType::ScheduledSystemEventType scheduledSystemEventSetObject;
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["EventId"].isNull())
scheduledSystemEventSetObject.eventId = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["EventId"].asString();
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["EventPublishTime"].isNull())
scheduledSystemEventSetObject.eventPublishTime = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["EventPublishTime"].asString();
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["NotBefore"].isNull())
scheduledSystemEventSetObject.notBefore = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["NotBefore"].asString();
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["Reason"].isNull())
scheduledSystemEventSetObject.reason = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["Reason"].asString();
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].isNull())
scheduledSystemEventSetObject.impactLevel = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].asString();
if(!valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["EventId"].isNull())
scheduledSystemEventSetObject.eventId = valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["EventId"].asString();
if(!valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["EventPublishTime"].isNull())
scheduledSystemEventSetObject.eventPublishTime = valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["EventPublishTime"].asString();
if(!valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["NotBefore"].isNull())
scheduledSystemEventSetObject.notBefore = valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["NotBefore"].asString();
if(!valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["Reason"].isNull())
scheduledSystemEventSetObject.reason = valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["Reason"].asString();
if(!valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].isNull())
scheduledSystemEventSetObject.impactLevel = valueInstanceFullStatusSetInstanceFullStatusTypeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].asString();
auto eventCycleStatusNode = value["EventCycleStatus"];
if(!eventCycleStatusNode["Code"].isNull())
scheduledSystemEventSetObject.eventCycleStatus.code = std::stoi(eventCycleStatusNode["Code"].asString());

View File

@@ -135,36 +135,38 @@ void DescribeInstancesResult::parse(const std::string &payload)
instancesObject.creditSpecification = valueInstancesInstance["CreditSpecification"].asString();
if(!valueInstancesInstance["DeletionProtection"].isNull())
instancesObject.deletionProtection = valueInstancesInstance["DeletionProtection"].asString() == "true";
auto allNetworkInterfacesNode = allInstancesNode["NetworkInterfaces"]["NetworkInterface"];
for (auto allInstancesNodeNetworkInterfacesNetworkInterface : allNetworkInterfacesNode)
if(!valueInstancesInstance["ISP"].isNull())
instancesObject.iSP = valueInstancesInstance["ISP"].asString();
auto allNetworkInterfacesNode = valueInstancesInstance["NetworkInterfaces"]["NetworkInterface"];
for (auto valueInstancesInstanceNetworkInterfacesNetworkInterface : allNetworkInterfacesNode)
{
Instance::NetworkInterface networkInterfacesObject;
if(!allInstancesNodeNetworkInterfacesNetworkInterface["NetworkInterfaceId"].isNull())
networkInterfacesObject.networkInterfaceId = allInstancesNodeNetworkInterfacesNetworkInterface["NetworkInterfaceId"].asString();
if(!allInstancesNodeNetworkInterfacesNetworkInterface["MacAddress"].isNull())
networkInterfacesObject.macAddress = allInstancesNodeNetworkInterfacesNetworkInterface["MacAddress"].asString();
if(!allInstancesNodeNetworkInterfacesNetworkInterface["PrimaryIpAddress"].isNull())
networkInterfacesObject.primaryIpAddress = allInstancesNodeNetworkInterfacesNetworkInterface["PrimaryIpAddress"].asString();
if(!valueInstancesInstanceNetworkInterfacesNetworkInterface["NetworkInterfaceId"].isNull())
networkInterfacesObject.networkInterfaceId = valueInstancesInstanceNetworkInterfacesNetworkInterface["NetworkInterfaceId"].asString();
if(!valueInstancesInstanceNetworkInterfacesNetworkInterface["MacAddress"].isNull())
networkInterfacesObject.macAddress = valueInstancesInstanceNetworkInterfacesNetworkInterface["MacAddress"].asString();
if(!valueInstancesInstanceNetworkInterfacesNetworkInterface["PrimaryIpAddress"].isNull())
networkInterfacesObject.primaryIpAddress = valueInstancesInstanceNetworkInterfacesNetworkInterface["PrimaryIpAddress"].asString();
instancesObject.networkInterfaces.push_back(networkInterfacesObject);
}
auto allOperationLocksNode = allInstancesNode["OperationLocks"]["LockReason"];
for (auto allInstancesNodeOperationLocksLockReason : allOperationLocksNode)
auto allOperationLocksNode = valueInstancesInstance["OperationLocks"]["LockReason"];
for (auto valueInstancesInstanceOperationLocksLockReason : allOperationLocksNode)
{
Instance::LockReason operationLocksObject;
if(!allInstancesNodeOperationLocksLockReason["LockReason"].isNull())
operationLocksObject.lockReason = allInstancesNodeOperationLocksLockReason["LockReason"].asString();
if(!allInstancesNodeOperationLocksLockReason["LockMsg"].isNull())
operationLocksObject.lockMsg = allInstancesNodeOperationLocksLockReason["LockMsg"].asString();
if(!valueInstancesInstanceOperationLocksLockReason["LockReason"].isNull())
operationLocksObject.lockReason = valueInstancesInstanceOperationLocksLockReason["LockReason"].asString();
if(!valueInstancesInstanceOperationLocksLockReason["LockMsg"].isNull())
operationLocksObject.lockMsg = valueInstancesInstanceOperationLocksLockReason["LockMsg"].asString();
instancesObject.operationLocks.push_back(operationLocksObject);
}
auto allTagsNode = allInstancesNode["Tags"]["Tag"];
for (auto allInstancesNodeTagsTag : allTagsNode)
auto allTagsNode = valueInstancesInstance["Tags"]["Tag"];
for (auto valueInstancesInstanceTagsTag : allTagsNode)
{
Instance::Tag tagsObject;
if(!allInstancesNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allInstancesNodeTagsTag["TagKey"].asString();
if(!allInstancesNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allInstancesNodeTagsTag["TagValue"].asString();
if(!valueInstancesInstanceTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueInstancesInstanceTagsTag["TagKey"].asString();
if(!valueInstancesInstanceTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueInstancesInstanceTagsTag["TagValue"].asString();
instancesObject.tags.push_back(tagsObject);
}
auto vpcAttributesNode = value["VpcAttributes"];

View File

@@ -65,38 +65,38 @@ void DescribeInvocationsResult::parse(const std::string &payload)
invocationsObject.invocationStatus = valueInvocationsInvocation["InvocationStatus"].asString();
if(!valueInvocationsInvocation["Parameters"].isNull())
invocationsObject.parameters = valueInvocationsInvocation["Parameters"].asString();
auto allInvokeInstancesNode = allInvocationsNode["InvokeInstances"]["InvokeInstance"];
for (auto allInvocationsNodeInvokeInstancesInvokeInstance : allInvokeInstancesNode)
auto allInvokeInstancesNode = valueInvocationsInvocation["InvokeInstances"]["InvokeInstance"];
for (auto valueInvocationsInvocationInvokeInstancesInvokeInstance : allInvokeInstancesNode)
{
Invocation::InvokeInstance invokeInstancesObject;
if(!allInvocationsNodeInvokeInstancesInvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = allInvocationsNodeInvokeInstancesInvokeInstance["InstanceId"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["Repeats"].isNull())
invokeInstancesObject.repeats = std::stoi(allInvocationsNodeInvokeInstancesInvokeInstance["Repeats"].asString());
if(!allInvocationsNodeInvokeInstancesInvokeInstance["InstanceInvokeStatus"].isNull())
invokeInstancesObject.instanceInvokeStatus = allInvocationsNodeInvokeInstancesInvokeInstance["InstanceInvokeStatus"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["InvocationStatus"].isNull())
invokeInstancesObject.invocationStatus = allInvocationsNodeInvokeInstancesInvokeInstance["InvocationStatus"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["Output"].isNull())
invokeInstancesObject.output = allInvocationsNodeInvokeInstancesInvokeInstance["Output"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["ExitCode"].isNull())
invokeInstancesObject.exitCode = std::stol(allInvocationsNodeInvokeInstancesInvokeInstance["ExitCode"].asString());
if(!allInvocationsNodeInvokeInstancesInvokeInstance["Dropped"].isNull())
invokeInstancesObject.dropped = std::stoi(allInvocationsNodeInvokeInstancesInvokeInstance["Dropped"].asString());
if(!allInvocationsNodeInvokeInstancesInvokeInstance["ErrorCode"].isNull())
invokeInstancesObject.errorCode = allInvocationsNodeInvokeInstancesInvokeInstance["ErrorCode"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["ErrorInfo"].isNull())
invokeInstancesObject.errorInfo = allInvocationsNodeInvokeInstancesInvokeInstance["ErrorInfo"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["CreationTime"].isNull())
invokeInstancesObject.creationTime = allInvocationsNodeInvokeInstancesInvokeInstance["CreationTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["StartTime"].isNull())
invokeInstancesObject.startTime = allInvocationsNodeInvokeInstancesInvokeInstance["StartTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["StopTime"].isNull())
invokeInstancesObject.stopTime = allInvocationsNodeInvokeInstancesInvokeInstance["StopTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["FinishTime"].isNull())
invokeInstancesObject.finishTime = allInvocationsNodeInvokeInstancesInvokeInstance["FinishTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["UpdateTime"].isNull())
invokeInstancesObject.updateTime = allInvocationsNodeInvokeInstancesInvokeInstance["UpdateTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceId"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["Repeats"].isNull())
invokeInstancesObject.repeats = std::stoi(valueInvocationsInvocationInvokeInstancesInvokeInstance["Repeats"].asString());
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceInvokeStatus"].isNull())
invokeInstancesObject.instanceInvokeStatus = valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceInvokeStatus"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["InvocationStatus"].isNull())
invokeInstancesObject.invocationStatus = valueInvocationsInvocationInvokeInstancesInvokeInstance["InvocationStatus"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["Output"].isNull())
invokeInstancesObject.output = valueInvocationsInvocationInvokeInstancesInvokeInstance["Output"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["ExitCode"].isNull())
invokeInstancesObject.exitCode = std::stol(valueInvocationsInvocationInvokeInstancesInvokeInstance["ExitCode"].asString());
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["Dropped"].isNull())
invokeInstancesObject.dropped = std::stoi(valueInvocationsInvocationInvokeInstancesInvokeInstance["Dropped"].asString());
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorCode"].isNull())
invokeInstancesObject.errorCode = valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorCode"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorInfo"].isNull())
invokeInstancesObject.errorInfo = valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorInfo"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["CreationTime"].isNull())
invokeInstancesObject.creationTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["CreationTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["StartTime"].isNull())
invokeInstancesObject.startTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["StartTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["StopTime"].isNull())
invokeInstancesObject.stopTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["StopTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["FinishTime"].isNull())
invokeInstancesObject.finishTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["FinishTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["UpdateTime"].isNull())
invokeInstancesObject.updateTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["UpdateTime"].asString();
invocationsObject.invokeInstances.push_back(invokeInstancesObject);
}
invocations_.push_back(invocationsObject);

View File

@@ -51,14 +51,14 @@ void DescribeKeyPairsResult::parse(const std::string &payload)
keyPairsObject.creationTime = valueKeyPairsKeyPair["CreationTime"].asString();
if(!valueKeyPairsKeyPair["ResourceGroupId"].isNull())
keyPairsObject.resourceGroupId = valueKeyPairsKeyPair["ResourceGroupId"].asString();
auto allTagsNode = allKeyPairsNode["Tags"]["Tag"];
for (auto allKeyPairsNodeTagsTag : allTagsNode)
auto allTagsNode = valueKeyPairsKeyPair["Tags"]["Tag"];
for (auto valueKeyPairsKeyPairTagsTag : allTagsNode)
{
KeyPair::Tag tagsObject;
if(!allKeyPairsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allKeyPairsNodeTagsTag["TagKey"].asString();
if(!allKeyPairsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allKeyPairsNodeTagsTag["TagValue"].asString();
if(!valueKeyPairsKeyPairTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueKeyPairsKeyPairTagsTag["TagKey"].asString();
if(!valueKeyPairsKeyPairTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueKeyPairsKeyPairTagsTag["TagValue"].asString();
keyPairsObject.tags.push_back(tagsObject);
}
keyPairs_.push_back(keyPairsObject);

View File

@@ -59,14 +59,14 @@ void DescribeLaunchTemplatesResult::parse(const std::string &payload)
launchTemplateSetsObject.createdBy = valueLaunchTemplateSetsLaunchTemplateSet["CreatedBy"].asString();
if(!valueLaunchTemplateSetsLaunchTemplateSet["ResourceGroupId"].isNull())
launchTemplateSetsObject.resourceGroupId = valueLaunchTemplateSetsLaunchTemplateSet["ResourceGroupId"].asString();
auto allTagsNode = allLaunchTemplateSetsNode["Tags"]["Tag"];
for (auto allLaunchTemplateSetsNodeTagsTag : allTagsNode)
auto allTagsNode = valueLaunchTemplateSetsLaunchTemplateSet["Tags"]["Tag"];
for (auto valueLaunchTemplateSetsLaunchTemplateSetTagsTag : allTagsNode)
{
LaunchTemplateSet::Tag tagsObject;
if(!allLaunchTemplateSetsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allLaunchTemplateSetsNodeTagsTag["TagKey"].asString();
if(!allLaunchTemplateSetsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allLaunchTemplateSetsNodeTagsTag["TagValue"].asString();
if(!valueLaunchTemplateSetsLaunchTemplateSetTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueLaunchTemplateSetsLaunchTemplateSetTagsTag["TagKey"].asString();
if(!valueLaunchTemplateSetsLaunchTemplateSetTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueLaunchTemplateSetsLaunchTemplateSetTagsTag["TagValue"].asString();
launchTemplateSetsObject.tags.push_back(tagsObject);
}
launchTemplateSets_.push_back(launchTemplateSetsObject);

View File

@@ -77,14 +77,14 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
networkInterfaceSetsObject.queueNumber = std::stoi(valueNetworkInterfaceSetsNetworkInterfaceSet["QueueNumber"].asString());
if(!valueNetworkInterfaceSetsNetworkInterfaceSet["OwnerId"].isNull())
networkInterfaceSetsObject.ownerId = valueNetworkInterfaceSetsNetworkInterfaceSet["OwnerId"].asString();
auto allPrivateIpSetsNode = allNetworkInterfaceSetsNode["PrivateIpSets"]["PrivateIpSet"];
for (auto allNetworkInterfaceSetsNodePrivateIpSetsPrivateIpSet : allPrivateIpSetsNode)
auto allPrivateIpSetsNode = valueNetworkInterfaceSetsNetworkInterfaceSet["PrivateIpSets"]["PrivateIpSet"];
for (auto valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet : allPrivateIpSetsNode)
{
NetworkInterfaceSet::PrivateIpSet privateIpSetsObject;
if(!allNetworkInterfaceSetsNodePrivateIpSetsPrivateIpSet["PrivateIpAddress"].isNull())
privateIpSetsObject.privateIpAddress = allNetworkInterfaceSetsNodePrivateIpSetsPrivateIpSet["PrivateIpAddress"].asString();
if(!allNetworkInterfaceSetsNodePrivateIpSetsPrivateIpSet["Primary"].isNull())
privateIpSetsObject.primary = allNetworkInterfaceSetsNodePrivateIpSetsPrivateIpSet["Primary"].asString() == "true";
if(!valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet["PrivateIpAddress"].isNull())
privateIpSetsObject.privateIpAddress = valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet["PrivateIpAddress"].asString();
if(!valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet["Primary"].isNull())
privateIpSetsObject.primary = valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet["Primary"].asString() == "true";
auto associatedPublicIp1Node = value["AssociatedPublicIp"];
if(!associatedPublicIp1Node["PublicIpAddress"].isNull())
privateIpSetsObject.associatedPublicIp1.publicIpAddress = associatedPublicIp1Node["PublicIpAddress"].asString();
@@ -92,22 +92,22 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
privateIpSetsObject.associatedPublicIp1.allocationId = associatedPublicIp1Node["AllocationId"].asString();
networkInterfaceSetsObject.privateIpSets.push_back(privateIpSetsObject);
}
auto allIpv6SetsNode = allNetworkInterfaceSetsNode["Ipv6Sets"]["Ipv6Set"];
for (auto allNetworkInterfaceSetsNodeIpv6SetsIpv6Set : allIpv6SetsNode)
auto allIpv6SetsNode = valueNetworkInterfaceSetsNetworkInterfaceSet["Ipv6Sets"]["Ipv6Set"];
for (auto valueNetworkInterfaceSetsNetworkInterfaceSetIpv6SetsIpv6Set : allIpv6SetsNode)
{
NetworkInterfaceSet::Ipv6Set ipv6SetsObject;
if(!allNetworkInterfaceSetsNodeIpv6SetsIpv6Set["Ipv6Address"].isNull())
ipv6SetsObject.ipv6Address = allNetworkInterfaceSetsNodeIpv6SetsIpv6Set["Ipv6Address"].asString();
if(!valueNetworkInterfaceSetsNetworkInterfaceSetIpv6SetsIpv6Set["Ipv6Address"].isNull())
ipv6SetsObject.ipv6Address = valueNetworkInterfaceSetsNetworkInterfaceSetIpv6SetsIpv6Set["Ipv6Address"].asString();
networkInterfaceSetsObject.ipv6Sets.push_back(ipv6SetsObject);
}
auto allTagsNode = allNetworkInterfaceSetsNode["Tags"]["Tag"];
for (auto allNetworkInterfaceSetsNodeTagsTag : allTagsNode)
auto allTagsNode = valueNetworkInterfaceSetsNetworkInterfaceSet["Tags"]["Tag"];
for (auto valueNetworkInterfaceSetsNetworkInterfaceSetTagsTag : allTagsNode)
{
NetworkInterfaceSet::Tag tagsObject;
if(!allNetworkInterfaceSetsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allNetworkInterfaceSetsNodeTagsTag["TagKey"].asString();
if(!allNetworkInterfaceSetsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allNetworkInterfaceSetsNodeTagsTag["TagValue"].asString();
if(!valueNetworkInterfaceSetsNetworkInterfaceSetTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueNetworkInterfaceSetsNetworkInterfaceSetTagsTag["TagKey"].asString();
if(!valueNetworkInterfaceSetsNetworkInterfaceSetTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueNetworkInterfaceSetsNetworkInterfaceSetTagsTag["TagValue"].asString();
networkInterfaceSetsObject.tags.push_back(tagsObject);
}
auto associatedPublicIpNode = value["AssociatedPublicIp"];

View File

@@ -60,6 +60,17 @@ void DescribePriceRequest::setDataDisk3Category(const std::string& dataDisk3Cate
setParameter("DataDisk3Category", dataDisk3Category);
}
std::string DescribePriceRequest::getIsp()const
{
return isp_;
}
void DescribePriceRequest::setIsp(const std::string& isp)
{
isp_ = isp;
setParameter("Isp", isp);
}
int DescribePriceRequest::getDataDisk4Size()const
{
return dataDisk4Size_;

View File

@@ -73,14 +73,14 @@ void DescribePriceResult::parse(const std::string &payload)
resourcePriceModelObject.discountPrice = std::stof(priceNodeDetailInfosResourcePriceModel["DiscountPrice"].asString());
if(!priceNodeDetailInfosResourcePriceModel["TradePrice"].isNull())
resourcePriceModelObject.tradePrice = std::stof(priceNodeDetailInfosResourcePriceModel["TradePrice"].asString());
auto allSubRulesNode = allDetailInfosNode["SubRules"]["Rule"];
for (auto allDetailInfosNodeSubRulesRule : allSubRulesNode)
auto allSubRulesNode = priceNodeDetailInfosResourcePriceModel["SubRules"]["Rule"];
for (auto priceNodeDetailInfosResourcePriceModelSubRulesRule : allSubRulesNode)
{
PriceInfo::Price::ResourcePriceModel::Rule1 subRulesObject;
if(!allDetailInfosNodeSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(allDetailInfosNodeSubRulesRule["RuleId"].asString());
if(!allDetailInfosNodeSubRulesRule["Description"].isNull())
subRulesObject.description = allDetailInfosNodeSubRulesRule["Description"].asString();
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].asString());
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].isNull())
subRulesObject.description = priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].asString();
resourcePriceModelObject.subRules.push_back(subRulesObject);
}
priceInfo_.price.detailInfos.push_back(resourcePriceModelObject);

View File

@@ -55,12 +55,12 @@ void DescribeRecommendInstanceTypeResult::parse(const std::string &payload)
dataObject.spotStrategy = valueDataRecommendInstanceType["SpotStrategy"].asString();
if(!valueDataRecommendInstanceType["Priority"].isNull())
dataObject.priority = std::stoi(valueDataRecommendInstanceType["Priority"].asString());
auto allZonesNode = allDataNode["Zones"]["zone"];
for (auto allDataNodeZoneszone : allZonesNode)
auto allZonesNode = valueDataRecommendInstanceType["Zones"]["zone"];
for (auto valueDataRecommendInstanceTypeZoneszone : allZonesNode)
{
RecommendInstanceType::Zone zonesObject;
if(!allDataNodeZoneszone["ZoneNo"].isNull())
zonesObject.zoneNo = allDataNodeZoneszone["ZoneNo"].asString();
if(!valueDataRecommendInstanceTypeZoneszone["ZoneNo"].isNull())
zonesObject.zoneNo = valueDataRecommendInstanceTypeZoneszone["ZoneNo"].asString();
auto allNetworkTypes = value["NetworkTypes"]["NetworkType"];
for (auto value : allNetworkTypes)
zonesObject.networkTypes.push_back(value.asString());

View File

@@ -71,14 +71,14 @@ void DescribeRenewalPriceResult::parse(const std::string &payload)
resourcePriceModelObject.discountPrice = std::stof(priceNodeDetailInfosResourcePriceModel["DiscountPrice"].asString());
if(!priceNodeDetailInfosResourcePriceModel["TradePrice"].isNull())
resourcePriceModelObject.tradePrice = std::stof(priceNodeDetailInfosResourcePriceModel["TradePrice"].asString());
auto allSubRulesNode = allDetailInfosNode["SubRules"]["Rule"];
for (auto allDetailInfosNodeSubRulesRule : allSubRulesNode)
auto allSubRulesNode = priceNodeDetailInfosResourcePriceModel["SubRules"]["Rule"];
for (auto priceNodeDetailInfosResourcePriceModelSubRulesRule : allSubRulesNode)
{
PriceInfo::Price::ResourcePriceModel::Rule1 subRulesObject;
if(!allDetailInfosNodeSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(allDetailInfosNodeSubRulesRule["RuleId"].asString());
if(!allDetailInfosNodeSubRulesRule["Description"].isNull())
subRulesObject.description = allDetailInfosNodeSubRulesRule["Description"].asString();
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].isNull())
subRulesObject.ruleId = std::stol(priceNodeDetailInfosResourcePriceModelSubRulesRule["RuleId"].asString());
if(!priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].isNull())
subRulesObject.description = priceNodeDetailInfosResourcePriceModelSubRulesRule["Description"].asString();
resourcePriceModelObject.subRules.push_back(subRulesObject);
}
priceInfo_.price.detailInfos.push_back(resourcePriceModelObject);

View File

@@ -75,22 +75,22 @@ void DescribeReservedInstancesResult::parse(const std::string &payload)
reservedInstancesObject.resourceGroupId = valueReservedInstancesReservedInstance["ResourceGroupId"].asString();
if(!valueReservedInstancesReservedInstance["AllocationStatus"].isNull())
reservedInstancesObject.allocationStatus = valueReservedInstancesReservedInstance["AllocationStatus"].asString();
auto allOperationLocksNode = allReservedInstancesNode["OperationLocks"]["OperationLock"];
for (auto allReservedInstancesNodeOperationLocksOperationLock : allOperationLocksNode)
auto allOperationLocksNode = valueReservedInstancesReservedInstance["OperationLocks"]["OperationLock"];
for (auto valueReservedInstancesReservedInstanceOperationLocksOperationLock : allOperationLocksNode)
{
ReservedInstance::OperationLock operationLocksObject;
if(!allReservedInstancesNodeOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = allReservedInstancesNodeOperationLocksOperationLock["LockReason"].asString();
if(!valueReservedInstancesReservedInstanceOperationLocksOperationLock["LockReason"].isNull())
operationLocksObject.lockReason = valueReservedInstancesReservedInstanceOperationLocksOperationLock["LockReason"].asString();
reservedInstancesObject.operationLocks.push_back(operationLocksObject);
}
auto allTagsNode = allReservedInstancesNode["Tags"]["Tag"];
for (auto allReservedInstancesNodeTagsTag : allTagsNode)
auto allTagsNode = valueReservedInstancesReservedInstance["Tags"]["Tag"];
for (auto valueReservedInstancesReservedInstanceTagsTag : allTagsNode)
{
ReservedInstance::Tag tagsObject;
if(!allReservedInstancesNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allReservedInstancesNodeTagsTag["TagKey"].asString();
if(!allReservedInstancesNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allReservedInstancesNodeTagsTag["TagValue"].asString();
if(!valueReservedInstancesReservedInstanceTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueReservedInstancesReservedInstanceTagsTag["TagKey"].asString();
if(!valueReservedInstancesReservedInstanceTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueReservedInstancesReservedInstanceTagsTag["TagValue"].asString();
reservedInstancesObject.tags.push_back(tagsObject);
}
reservedInstances_.push_back(reservedInstancesObject);

View File

@@ -51,28 +51,28 @@ void DescribeResourcesModificationResult::parse(const std::string &payload)
availableZonesObject.status = valueAvailableZonesAvailableZone["Status"].asString();
if(!valueAvailableZonesAvailableZone["StatusCategory"].isNull())
availableZonesObject.statusCategory = valueAvailableZonesAvailableZone["StatusCategory"].asString();
auto allAvailableResourcesNode = allAvailableZonesNode["AvailableResources"]["AvailableResource"];
for (auto allAvailableZonesNodeAvailableResourcesAvailableResource : allAvailableResourcesNode)
auto allAvailableResourcesNode = valueAvailableZonesAvailableZone["AvailableResources"]["AvailableResource"];
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource : allAvailableResourcesNode)
{
AvailableZone::AvailableResource availableResourcesObject;
if(!allAvailableZonesNodeAvailableResourcesAvailableResource["Type"].isNull())
availableResourcesObject.type = allAvailableZonesNodeAvailableResourcesAvailableResource["Type"].asString();
auto allSupportedResourcesNode = allAvailableResourcesNode["SupportedResources"]["SupportedResource"];
for (auto allAvailableResourcesNodeSupportedResourcesSupportedResource : allSupportedResourcesNode)
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["Type"].isNull())
availableResourcesObject.type = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["Type"].asString();
auto allSupportedResourcesNode = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["SupportedResources"]["SupportedResource"];
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource : allSupportedResourcesNode)
{
AvailableZone::AvailableResource::SupportedResource supportedResourcesObject;
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Value"].isNull())
supportedResourcesObject.value = allAvailableResourcesNodeSupportedResourcesSupportedResource["Value"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Status"].isNull())
supportedResourcesObject.status = allAvailableResourcesNodeSupportedResourcesSupportedResource["Status"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["StatusCategory"].isNull())
supportedResourcesObject.statusCategory = allAvailableResourcesNodeSupportedResourcesSupportedResource["StatusCategory"].asString();
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Min"].isNull())
supportedResourcesObject.min = std::stoi(allAvailableResourcesNodeSupportedResourcesSupportedResource["Min"].asString());
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Max"].isNull())
supportedResourcesObject.max = std::stoi(allAvailableResourcesNodeSupportedResourcesSupportedResource["Max"].asString());
if(!allAvailableResourcesNodeSupportedResourcesSupportedResource["Unit"].isNull())
supportedResourcesObject.unit = allAvailableResourcesNodeSupportedResourcesSupportedResource["Unit"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Value"].isNull())
supportedResourcesObject.value = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Value"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Status"].isNull())
supportedResourcesObject.status = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Status"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["StatusCategory"].isNull())
supportedResourcesObject.statusCategory = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["StatusCategory"].asString();
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Min"].isNull())
supportedResourcesObject.min = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Min"].asString());
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Max"].isNull())
supportedResourcesObject.max = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Max"].asString());
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Unit"].isNull())
supportedResourcesObject.unit = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Unit"].asString();
availableResourcesObject.supportedResources.push_back(supportedResourcesObject);
}
availableZonesObject.availableResources.push_back(availableResourcesObject);

View File

@@ -53,34 +53,34 @@ void DescribeRouteTablesResult::parse(const std::string &payload)
routeTablesObject.creationTime = valueRouteTablesRouteTable["CreationTime"].asString();
if(!valueRouteTablesRouteTable["ResourceGroupId"].isNull())
routeTablesObject.resourceGroupId = valueRouteTablesRouteTable["ResourceGroupId"].asString();
auto allRouteEntrysNode = allRouteTablesNode["RouteEntrys"]["RouteEntry"];
for (auto allRouteTablesNodeRouteEntrysRouteEntry : allRouteEntrysNode)
auto allRouteEntrysNode = valueRouteTablesRouteTable["RouteEntrys"]["RouteEntry"];
for (auto valueRouteTablesRouteTableRouteEntrysRouteEntry : allRouteEntrysNode)
{
RouteTable::RouteEntry routeEntrysObject;
if(!allRouteTablesNodeRouteEntrysRouteEntry["RouteTableId"].isNull())
routeEntrysObject.routeTableId = allRouteTablesNodeRouteEntrysRouteEntry["RouteTableId"].asString();
if(!allRouteTablesNodeRouteEntrysRouteEntry["DestinationCidrBlock"].isNull())
routeEntrysObject.destinationCidrBlock = allRouteTablesNodeRouteEntrysRouteEntry["DestinationCidrBlock"].asString();
if(!allRouteTablesNodeRouteEntrysRouteEntry["Type"].isNull())
routeEntrysObject.type = allRouteTablesNodeRouteEntrysRouteEntry["Type"].asString();
if(!allRouteTablesNodeRouteEntrysRouteEntry["Status"].isNull())
routeEntrysObject.status = allRouteTablesNodeRouteEntrysRouteEntry["Status"].asString();
if(!allRouteTablesNodeRouteEntrysRouteEntry["InstanceId"].isNull())
routeEntrysObject.instanceId = allRouteTablesNodeRouteEntrysRouteEntry["InstanceId"].asString();
if(!allRouteTablesNodeRouteEntrysRouteEntry["NextHopType"].isNull())
routeEntrysObject.nextHopType = allRouteTablesNodeRouteEntrysRouteEntry["NextHopType"].asString();
auto allNextHopsNode = allRouteEntrysNode["NextHops"]["NextHop"];
for (auto allRouteEntrysNodeNextHopsNextHop : allNextHopsNode)
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["RouteTableId"].isNull())
routeEntrysObject.routeTableId = valueRouteTablesRouteTableRouteEntrysRouteEntry["RouteTableId"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["DestinationCidrBlock"].isNull())
routeEntrysObject.destinationCidrBlock = valueRouteTablesRouteTableRouteEntrysRouteEntry["DestinationCidrBlock"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["Type"].isNull())
routeEntrysObject.type = valueRouteTablesRouteTableRouteEntrysRouteEntry["Type"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["Status"].isNull())
routeEntrysObject.status = valueRouteTablesRouteTableRouteEntrysRouteEntry["Status"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["InstanceId"].isNull())
routeEntrysObject.instanceId = valueRouteTablesRouteTableRouteEntrysRouteEntry["InstanceId"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntry["NextHopType"].isNull())
routeEntrysObject.nextHopType = valueRouteTablesRouteTableRouteEntrysRouteEntry["NextHopType"].asString();
auto allNextHopsNode = valueRouteTablesRouteTableRouteEntrysRouteEntry["NextHops"]["NextHop"];
for (auto valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop : allNextHopsNode)
{
RouteTable::RouteEntry::NextHop nextHopsObject;
if(!allRouteEntrysNodeNextHopsNextHop["NextHopType"].isNull())
nextHopsObject.nextHopType = allRouteEntrysNodeNextHopsNextHop["NextHopType"].asString();
if(!allRouteEntrysNodeNextHopsNextHop["NextHopId"].isNull())
nextHopsObject.nextHopId = allRouteEntrysNodeNextHopsNextHop["NextHopId"].asString();
if(!allRouteEntrysNodeNextHopsNextHop["Enabled"].isNull())
nextHopsObject.enabled = std::stoi(allRouteEntrysNodeNextHopsNextHop["Enabled"].asString());
if(!allRouteEntrysNodeNextHopsNextHop["Weight"].isNull())
nextHopsObject.weight = std::stoi(allRouteEntrysNodeNextHopsNextHop["Weight"].asString());
if(!valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["NextHopType"].isNull())
nextHopsObject.nextHopType = valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["NextHopType"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["NextHopId"].isNull())
nextHopsObject.nextHopId = valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["NextHopId"].asString();
if(!valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["Enabled"].isNull())
nextHopsObject.enabled = std::stoi(valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["Enabled"].asString());
if(!valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["Weight"].isNull())
nextHopsObject.weight = std::stoi(valueRouteTablesRouteTableRouteEntrysRouteEntryNextHopsNextHop["Weight"].asString());
routeEntrysObject.nextHops.push_back(nextHopsObject);
}
routeTablesObject.routeEntrys.push_back(routeEntrysObject);

View File

@@ -45,14 +45,14 @@ void DescribeSecurityGroupReferencesResult::parse(const std::string &payload)
SecurityGroupReference securityGroupReferencesObject;
if(!valueSecurityGroupReferencesSecurityGroupReference["SecurityGroupId"].isNull())
securityGroupReferencesObject.securityGroupId = valueSecurityGroupReferencesSecurityGroupReference["SecurityGroupId"].asString();
auto allReferencingSecurityGroupsNode = allSecurityGroupReferencesNode["ReferencingSecurityGroups"]["ReferencingSecurityGroup"];
for (auto allSecurityGroupReferencesNodeReferencingSecurityGroupsReferencingSecurityGroup : allReferencingSecurityGroupsNode)
auto allReferencingSecurityGroupsNode = valueSecurityGroupReferencesSecurityGroupReference["ReferencingSecurityGroups"]["ReferencingSecurityGroup"];
for (auto valueSecurityGroupReferencesSecurityGroupReferenceReferencingSecurityGroupsReferencingSecurityGroup : allReferencingSecurityGroupsNode)
{
SecurityGroupReference::ReferencingSecurityGroup referencingSecurityGroupsObject;
if(!allSecurityGroupReferencesNodeReferencingSecurityGroupsReferencingSecurityGroup["AliUid"].isNull())
referencingSecurityGroupsObject.aliUid = allSecurityGroupReferencesNodeReferencingSecurityGroupsReferencingSecurityGroup["AliUid"].asString();
if(!allSecurityGroupReferencesNodeReferencingSecurityGroupsReferencingSecurityGroup["SecurityGroupId"].isNull())
referencingSecurityGroupsObject.securityGroupId = allSecurityGroupReferencesNodeReferencingSecurityGroupsReferencingSecurityGroup["SecurityGroupId"].asString();
if(!valueSecurityGroupReferencesSecurityGroupReferenceReferencingSecurityGroupsReferencingSecurityGroup["AliUid"].isNull())
referencingSecurityGroupsObject.aliUid = valueSecurityGroupReferencesSecurityGroupReferenceReferencingSecurityGroupsReferencingSecurityGroup["AliUid"].asString();
if(!valueSecurityGroupReferencesSecurityGroupReferenceReferencingSecurityGroupsReferencingSecurityGroup["SecurityGroupId"].isNull())
referencingSecurityGroupsObject.securityGroupId = valueSecurityGroupReferencesSecurityGroupReferenceReferencingSecurityGroupsReferencingSecurityGroup["SecurityGroupId"].asString();
securityGroupReferencesObject.referencingSecurityGroups.push_back(referencingSecurityGroupsObject);
}
securityGroupReferences_.push_back(securityGroupReferencesObject);

View File

@@ -65,14 +65,14 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
securityGroupsObject.serviceID = std::stol(valueSecurityGroupsSecurityGroup["ServiceID"].asString());
if(!valueSecurityGroupsSecurityGroup["ServiceManaged"].isNull())
securityGroupsObject.serviceManaged = valueSecurityGroupsSecurityGroup["ServiceManaged"].asString() == "true";
auto allTagsNode = allSecurityGroupsNode["Tags"]["Tag"];
for (auto allSecurityGroupsNodeTagsTag : allTagsNode)
auto allTagsNode = valueSecurityGroupsSecurityGroup["Tags"]["Tag"];
for (auto valueSecurityGroupsSecurityGroupTagsTag : allTagsNode)
{
SecurityGroup::Tag tagsObject;
if(!allSecurityGroupsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allSecurityGroupsNodeTagsTag["TagKey"].asString();
if(!allSecurityGroupsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allSecurityGroupsNodeTagsTag["TagValue"].asString();
if(!valueSecurityGroupsSecurityGroupTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueSecurityGroupsSecurityGroupTagsTag["TagKey"].asString();
if(!valueSecurityGroupsSecurityGroupTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueSecurityGroupsSecurityGroupTagsTag["TagValue"].asString();
securityGroupsObject.tags.push_back(tagsObject);
}
securityGroups_.push_back(securityGroupsObject);

View File

@@ -69,26 +69,26 @@ void DescribeSendFileResultsResult::parse(const std::string &payload)
invocationsObject.creationTime = valueInvocationsInvocation["CreationTime"].asString();
if(!valueInvocationsInvocation["InvocationStatus"].isNull())
invocationsObject.invocationStatus = valueInvocationsInvocation["InvocationStatus"].asString();
auto allInvokeInstancesNode = allInvocationsNode["InvokeInstances"]["InvokeInstance"];
for (auto allInvocationsNodeInvokeInstancesInvokeInstance : allInvokeInstancesNode)
auto allInvokeInstancesNode = valueInvocationsInvocation["InvokeInstances"]["InvokeInstance"];
for (auto valueInvocationsInvocationInvokeInstancesInvokeInstance : allInvokeInstancesNode)
{
Invocation::InvokeInstance invokeInstancesObject;
if(!allInvocationsNodeInvokeInstancesInvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = allInvocationsNodeInvokeInstancesInvokeInstance["InstanceId"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["InvocationStatus"].isNull())
invokeInstancesObject.invocationStatus = allInvocationsNodeInvokeInstancesInvokeInstance["InvocationStatus"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["CreationTime"].isNull())
invokeInstancesObject.creationTime = allInvocationsNodeInvokeInstancesInvokeInstance["CreationTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["StartTime"].isNull())
invokeInstancesObject.startTime = allInvocationsNodeInvokeInstancesInvokeInstance["StartTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["FinishTime"].isNull())
invokeInstancesObject.finishTime = allInvocationsNodeInvokeInstancesInvokeInstance["FinishTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["UpdateTime"].isNull())
invokeInstancesObject.updateTime = allInvocationsNodeInvokeInstancesInvokeInstance["UpdateTime"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["ErrorCode"].isNull())
invokeInstancesObject.errorCode = allInvocationsNodeInvokeInstancesInvokeInstance["ErrorCode"].asString();
if(!allInvocationsNodeInvokeInstancesInvokeInstance["ErrorInfo"].isNull())
invokeInstancesObject.errorInfo = allInvocationsNodeInvokeInstancesInvokeInstance["ErrorInfo"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = valueInvocationsInvocationInvokeInstancesInvokeInstance["InstanceId"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["InvocationStatus"].isNull())
invokeInstancesObject.invocationStatus = valueInvocationsInvocationInvokeInstancesInvokeInstance["InvocationStatus"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["CreationTime"].isNull())
invokeInstancesObject.creationTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["CreationTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["StartTime"].isNull())
invokeInstancesObject.startTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["StartTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["FinishTime"].isNull())
invokeInstancesObject.finishTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["FinishTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["UpdateTime"].isNull())
invokeInstancesObject.updateTime = valueInvocationsInvocationInvokeInstancesInvokeInstance["UpdateTime"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorCode"].isNull())
invokeInstancesObject.errorCode = valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorCode"].asString();
if(!valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorInfo"].isNull())
invokeInstancesObject.errorInfo = valueInvocationsInvocationInvokeInstancesInvokeInstance["ErrorInfo"].asString();
invocationsObject.invokeInstances.push_back(invokeInstancesObject);
}
invocations_.push_back(invocationsObject);

View File

@@ -85,14 +85,14 @@ void DescribeSnapshotsResult::parse(const std::string &payload)
snapshotsObject.category = valueSnapshotsSnapshot["Category"].asString();
if(!valueSnapshotsSnapshot["SnapshotType"].isNull())
snapshotsObject.snapshotType = valueSnapshotsSnapshot["SnapshotType"].asString();
auto allTagsNode = allSnapshotsNode["Tags"]["Tag"];
for (auto allSnapshotsNodeTagsTag : allTagsNode)
auto allTagsNode = valueSnapshotsSnapshot["Tags"]["Tag"];
for (auto valueSnapshotsSnapshotTagsTag : allTagsNode)
{
Snapshot::Tag tagsObject;
if(!allSnapshotsNodeTagsTag["TagKey"].isNull())
tagsObject.tagKey = allSnapshotsNodeTagsTag["TagKey"].asString();
if(!allSnapshotsNodeTagsTag["TagValue"].isNull())
tagsObject.tagValue = allSnapshotsNodeTagsTag["TagValue"].asString();
if(!valueSnapshotsSnapshotTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueSnapshotsSnapshotTagsTag["TagKey"].asString();
if(!valueSnapshotsSnapshotTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueSnapshotsSnapshotTagsTag["TagValue"].asString();
snapshotsObject.tags.push_back(tagsObject);
}
snapshots_.push_back(snapshotsObject);

View File

@@ -49,14 +49,14 @@ void DescribeTaskAttributeResult::parse(const std::string &payload)
operationProgressSetObject.errorCode = valueOperationProgressSetOperationProgress["ErrorCode"].asString();
if(!valueOperationProgressSetOperationProgress["ErrorMsg"].isNull())
operationProgressSetObject.errorMsg = valueOperationProgressSetOperationProgress["ErrorMsg"].asString();
auto allRelatedItemSetNode = allOperationProgressSetNode["RelatedItemSet"]["RelatedItem"];
for (auto allOperationProgressSetNodeRelatedItemSetRelatedItem : allRelatedItemSetNode)
auto allRelatedItemSetNode = valueOperationProgressSetOperationProgress["RelatedItemSet"]["RelatedItem"];
for (auto valueOperationProgressSetOperationProgressRelatedItemSetRelatedItem : allRelatedItemSetNode)
{
OperationProgress::RelatedItem relatedItemSetObject;
if(!allOperationProgressSetNodeRelatedItemSetRelatedItem["Name"].isNull())
relatedItemSetObject.name = allOperationProgressSetNodeRelatedItemSetRelatedItem["Name"].asString();
if(!allOperationProgressSetNodeRelatedItemSetRelatedItem["Value"].isNull())
relatedItemSetObject.value = allOperationProgressSetNodeRelatedItemSetRelatedItem["Value"].asString();
if(!valueOperationProgressSetOperationProgressRelatedItemSetRelatedItem["Name"].isNull())
relatedItemSetObject.name = valueOperationProgressSetOperationProgressRelatedItemSetRelatedItem["Name"].asString();
if(!valueOperationProgressSetOperationProgressRelatedItemSetRelatedItem["Value"].isNull())
relatedItemSetObject.value = valueOperationProgressSetOperationProgressRelatedItemSetRelatedItem["Value"].asString();
operationProgressSetObject.relatedItemSet.push_back(relatedItemSetObject);
}
operationProgressSet_.push_back(operationProgressSetObject);

View File

@@ -47,12 +47,12 @@ void DescribeZonesResult::parse(const std::string &payload)
zonesObject.zoneId = valueZonesZone["ZoneId"].asString();
if(!valueZonesZone["LocalName"].isNull())
zonesObject.localName = valueZonesZone["LocalName"].asString();
auto allAvailableResourcesNode = allZonesNode["AvailableResources"]["ResourcesInfo"];
for (auto allZonesNodeAvailableResourcesResourcesInfo : allAvailableResourcesNode)
auto allAvailableResourcesNode = valueZonesZone["AvailableResources"]["ResourcesInfo"];
for (auto valueZonesZoneAvailableResourcesResourcesInfo : allAvailableResourcesNode)
{
Zone::ResourcesInfo availableResourcesObject;
if(!allZonesNodeAvailableResourcesResourcesInfo["IoOptimized"].isNull())
availableResourcesObject.ioOptimized = allZonesNodeAvailableResourcesResourcesInfo["IoOptimized"].asString() == "true";
if(!valueZonesZoneAvailableResourcesResourcesInfo["IoOptimized"].isNull())
availableResourcesObject.ioOptimized = valueZonesZoneAvailableResourcesResourcesInfo["IoOptimized"].asString() == "true";
auto allSystemDiskCategories = value["SystemDiskCategories"]["supportedSystemDiskCategory"];
for (auto value : allSystemDiskCategories)
availableResourcesObject.systemDiskCategories.push_back(value.asString());

View File

@@ -51,14 +51,14 @@ void DetachInstanceRamRoleResult::parse(const std::string &payload)
detachInstanceRamRoleResultsObject.code = valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResult["Code"].asString();
if(!valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResult["Message"].isNull())
detachInstanceRamRoleResultsObject.message = valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResult["Message"].asString();
auto allInstanceRamRoleSetsNode = allDetachInstanceRamRoleResultsNode["InstanceRamRoleSets"]["InstanceRamRoleSet"];
for (auto allDetachInstanceRamRoleResultsNodeInstanceRamRoleSetsInstanceRamRoleSet : allInstanceRamRoleSetsNode)
auto allInstanceRamRoleSetsNode = valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResult["InstanceRamRoleSets"]["InstanceRamRoleSet"];
for (auto valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResultInstanceRamRoleSetsInstanceRamRoleSet : allInstanceRamRoleSetsNode)
{
Result::InstanceRamRoleSet instanceRamRoleSetsObject;
if(!allDetachInstanceRamRoleResultsNodeInstanceRamRoleSetsInstanceRamRoleSet["InstanceId"].isNull())
instanceRamRoleSetsObject.instanceId = allDetachInstanceRamRoleResultsNodeInstanceRamRoleSetsInstanceRamRoleSet["InstanceId"].asString();
if(!allDetachInstanceRamRoleResultsNodeInstanceRamRoleSetsInstanceRamRoleSet["RamRoleName"].isNull())
instanceRamRoleSetsObject.ramRoleName = allDetachInstanceRamRoleResultsNodeInstanceRamRoleSetsInstanceRamRoleSet["RamRoleName"].asString();
if(!valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResultInstanceRamRoleSetsInstanceRamRoleSet["InstanceId"].isNull())
instanceRamRoleSetsObject.instanceId = valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResultInstanceRamRoleSetsInstanceRamRoleSet["InstanceId"].asString();
if(!valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResultInstanceRamRoleSetsInstanceRamRoleSet["RamRoleName"].isNull())
instanceRamRoleSetsObject.ramRoleName = valueDetachInstanceRamRoleResultsDetachInstanceRamRoleResultInstanceRamRoleSetsInstanceRamRoleSet["RamRoleName"].asString();
detachInstanceRamRoleResultsObject.instanceRamRoleSets.push_back(instanceRamRoleSetsObject);
}
detachInstanceRamRoleResults_.push_back(detachInstanceRamRoleResultsObject);

View File

@@ -49,6 +49,17 @@ void ModifyInstanceNetworkSpecRequest::setClientToken(const std::string& clientT
setParameter("ClientToken", clientToken);
}
std::string ModifyInstanceNetworkSpecRequest::getISP()const
{
return iSP_;
}
void ModifyInstanceNetworkSpecRequest::setISP(const std::string& iSP)
{
iSP_ = iSP;
setParameter("ISP", iSP);
}
int ModifyInstanceNetworkSpecRequest::getInternetMaxBandwidthOut()const
{
return internetMaxBandwidthOut_;

View File

@@ -519,6 +519,17 @@ void RunInstancesRequest::setHttpPutResponseHopLimit(int httpPutResponseHopLimit
setParameter("HttpPutResponseHopLimit", std::to_string(httpPutResponseHopLimit));
}
std::string RunInstancesRequest::getIsp()const
{
return isp_;
}
void RunInstancesRequest::setIsp(const std::string& isp)
{
isp_ = isp;
setParameter("Isp", isp);
}
std::string RunInstancesRequest::getKeyPairName()const
{
return keyPairName_;

View File

@@ -90,14 +90,14 @@ void DescribeCollectorResult::parse(const std::string &payload)
extendConfigsItemObject.type = resultNodeextendConfigsextendConfigsItem["type"].asString();
if(!resultNodeextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsItemObject.groupId = resultNodeextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
auto allmachinesNode = resultNodeextendConfigsextendConfigsItem["machines"]["machinesItem"];
for (auto resultNodeextendConfigsextendConfigsItemmachinesmachinesItem : allmachinesNode)
{
Result::ExtendConfigsItem::MachinesItem machinesObject;
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].asString();
extendConfigsItemObject.machines.push_back(machinesObject);
}
auto allHosts = value["hosts"]["hosts"];

View File

@@ -127,14 +127,14 @@ void GetRegionConfigurationResult::parse(const std::string &payload)
Result::CategoryEntity categoryEntityObject;
if(!resultNodesupportVersionsCategoryEntity["instanceCategory"].isNull())
categoryEntityObject.instanceCategory = resultNodesupportVersionsCategoryEntity["instanceCategory"].asString();
auto allsupportVersionListNode = allsupportVersionsNode["supportVersionList"]["VersionEntity"];
for (auto allsupportVersionsNodesupportVersionListVersionEntity : allsupportVersionListNode)
auto allsupportVersionListNode = resultNodesupportVersionsCategoryEntity["supportVersionList"]["VersionEntity"];
for (auto resultNodesupportVersionsCategoryEntitysupportVersionListVersionEntity : allsupportVersionListNode)
{
Result::CategoryEntity::VersionEntity supportVersionListObject;
if(!allsupportVersionsNodesupportVersionListVersionEntity["key"].isNull())
supportVersionListObject.key = allsupportVersionsNodesupportVersionListVersionEntity["key"].asString();
if(!allsupportVersionsNodesupportVersionListVersionEntity["value"].isNull())
supportVersionListObject.value = allsupportVersionsNodesupportVersionListVersionEntity["value"].asString();
if(!resultNodesupportVersionsCategoryEntitysupportVersionListVersionEntity["key"].isNull())
supportVersionListObject.key = resultNodesupportVersionsCategoryEntitysupportVersionListVersionEntity["key"].asString();
if(!resultNodesupportVersionsCategoryEntitysupportVersionListVersionEntity["value"].isNull())
supportVersionListObject.value = resultNodesupportVersionsCategoryEntitysupportVersionListVersionEntity["value"].asString();
categoryEntityObject.supportVersionList.push_back(supportVersionListObject);
}
result_.supportVersions.push_back(categoryEntityObject);

View File

@@ -63,44 +63,44 @@ void ListCollectorsResult::parse(const std::string &payload)
resultObject.status = valueResultResultItem["status"].asString();
if(!valueResultResultItem["dryRun"].isNull())
resultObject.dryRun = valueResultResultItem["dryRun"].asString() == "true";
auto allconfigsNode = allResultNode["configs"]["configsItem"];
for (auto allResultNodeconfigsconfigsItem : allconfigsNode)
auto allconfigsNode = valueResultResultItem["configs"]["configsItem"];
for (auto valueResultResultItemconfigsconfigsItem : allconfigsNode)
{
ResultItem::ConfigsItem configsObject;
if(!allResultNodeconfigsconfigsItem["fileName"].isNull())
configsObject.fileName = allResultNodeconfigsconfigsItem["fileName"].asString();
if(!allResultNodeconfigsconfigsItem["content"].isNull())
configsObject.content = allResultNodeconfigsconfigsItem["content"].asString();
if(!valueResultResultItemconfigsconfigsItem["fileName"].isNull())
configsObject.fileName = valueResultResultItemconfigsconfigsItem["fileName"].asString();
if(!valueResultResultItemconfigsconfigsItem["content"].isNull())
configsObject.content = valueResultResultItemconfigsconfigsItem["content"].asString();
resultObject.configs.push_back(configsObject);
}
auto allextendConfigsNode = allResultNode["extendConfigs"]["extendConfigsItem"];
for (auto allResultNodeextendConfigsextendConfigsItem : allextendConfigsNode)
auto allextendConfigsNode = valueResultResultItem["extendConfigs"]["extendConfigsItem"];
for (auto valueResultResultItemextendConfigsextendConfigsItem : allextendConfigsNode)
{
ResultItem::ExtendConfigsItem extendConfigsObject;
if(!allResultNodeextendConfigsextendConfigsItem["configType"].isNull())
extendConfigsObject.configType = allResultNodeextendConfigsextendConfigsItem["configType"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["instanceId"].isNull())
extendConfigsObject.instanceId = allResultNodeextendConfigsextendConfigsItem["instanceId"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["instanceType"].isNull())
extendConfigsObject.instanceType = allResultNodeextendConfigsextendConfigsItem["instanceType"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["protocol"].isNull())
extendConfigsObject.protocol = allResultNodeextendConfigsextendConfigsItem["protocol"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["userName"].isNull())
extendConfigsObject.userName = allResultNodeextendConfigsextendConfigsItem["userName"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
extendConfigsObject.enableMonitoring = allResultNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
if(!allResultNodeextendConfigsextendConfigsItem["type"].isNull())
extendConfigsObject.type = allResultNodeextendConfigsextendConfigsItem["type"].asString();
if(!allResultNodeextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsObject.groupId = allResultNodeextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
if(!valueResultResultItemextendConfigsextendConfigsItem["configType"].isNull())
extendConfigsObject.configType = valueResultResultItemextendConfigsextendConfigsItem["configType"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["instanceId"].isNull())
extendConfigsObject.instanceId = valueResultResultItemextendConfigsextendConfigsItem["instanceId"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["instanceType"].isNull())
extendConfigsObject.instanceType = valueResultResultItemextendConfigsextendConfigsItem["instanceType"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["protocol"].isNull())
extendConfigsObject.protocol = valueResultResultItemextendConfigsextendConfigsItem["protocol"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["userName"].isNull())
extendConfigsObject.userName = valueResultResultItemextendConfigsextendConfigsItem["userName"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["enableMonitoring"].isNull())
extendConfigsObject.enableMonitoring = valueResultResultItemextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
if(!valueResultResultItemextendConfigsextendConfigsItem["type"].isNull())
extendConfigsObject.type = valueResultResultItemextendConfigsextendConfigsItem["type"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsObject.groupId = valueResultResultItemextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = valueResultResultItemextendConfigsextendConfigsItem["machines"]["machinesItem"];
for (auto valueResultResultItemextendConfigsextendConfigsItemmachinesmachinesItem : allmachinesNode)
{
ResultItem::ExtendConfigsItem::MachinesItem machinesObject;
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = valueResultResultItemextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].asString();
if(!valueResultResultItemextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = valueResultResultItemextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].asString();
extendConfigsObject.machines.push_back(machinesObject);
}
auto allHosts = value["hosts"]["hosts"];

View File

@@ -55,14 +55,14 @@ void ListDiagnoseReportResult::parse(const std::string &payload)
resultObject.health = valueResultResultItem["health"].asString();
if(!valueResultResultItem["createTime"].isNull())
resultObject.createTime = std::stol(valueResultResultItem["createTime"].asString());
auto alldiagnoseItemsNode = allResultNode["diagnoseItems"]["diagnoseItemsItem"];
for (auto allResultNodediagnoseItemsdiagnoseItemsItem : alldiagnoseItemsNode)
auto alldiagnoseItemsNode = valueResultResultItem["diagnoseItems"]["diagnoseItemsItem"];
for (auto valueResultResultItemdiagnoseItemsdiagnoseItemsItem : alldiagnoseItemsNode)
{
ResultItem::DiagnoseItemsItem diagnoseItemsObject;
if(!allResultNodediagnoseItemsdiagnoseItemsItem["item"].isNull())
diagnoseItemsObject.item = allResultNodediagnoseItemsdiagnoseItemsItem["item"].asString();
if(!allResultNodediagnoseItemsdiagnoseItemsItem["health"].isNull())
diagnoseItemsObject.health = allResultNodediagnoseItemsdiagnoseItemsItem["health"].asString();
if(!valueResultResultItemdiagnoseItemsdiagnoseItemsItem["item"].isNull())
diagnoseItemsObject.item = valueResultResultItemdiagnoseItemsdiagnoseItemsItem["item"].asString();
if(!valueResultResultItemdiagnoseItemsdiagnoseItemsItem["health"].isNull())
diagnoseItemsObject.health = valueResultResultItemdiagnoseItemsdiagnoseItemsItem["health"].asString();
auto detailNode = value["detail"];
if(!detailNode["name"].isNull())
diagnoseItemsObject.detail.name = detailNode["name"].asString();

View File

@@ -55,78 +55,78 @@ void ListEcsInstancesResult::parse(const std::string &payload)
resultObject.osType = valueResultResultItem["osType"].asString();
if(!valueResultResultItem["cloudAssistantStatus"].isNull())
resultObject.cloudAssistantStatus = valueResultResultItem["cloudAssistantStatus"].asString();
auto allipAddressNode = allResultNode["ipAddress"]["ipAddressItem"];
for (auto allResultNodeipAddressipAddressItem : allipAddressNode)
auto allipAddressNode = valueResultResultItem["ipAddress"]["ipAddressItem"];
for (auto valueResultResultItemipAddressipAddressItem : allipAddressNode)
{
ResultItem::IpAddressItem ipAddressObject;
if(!allResultNodeipAddressipAddressItem["host"].isNull())
ipAddressObject.host = allResultNodeipAddressipAddressItem["host"].asString();
if(!allResultNodeipAddressipAddressItem["ipType"].isNull())
ipAddressObject.ipType = allResultNodeipAddressipAddressItem["ipType"].asString();
if(!valueResultResultItemipAddressipAddressItem["host"].isNull())
ipAddressObject.host = valueResultResultItemipAddressipAddressItem["host"].asString();
if(!valueResultResultItemipAddressipAddressItem["ipType"].isNull())
ipAddressObject.ipType = valueResultResultItemipAddressipAddressItem["ipType"].asString();
resultObject.ipAddress.push_back(ipAddressObject);
}
auto allcollectorsNode = allResultNode["collectors"]["collectorsItem"];
for (auto allResultNodecollectorscollectorsItem : allcollectorsNode)
auto allcollectorsNode = valueResultResultItem["collectors"]["collectorsItem"];
for (auto valueResultResultItemcollectorscollectorsItem : allcollectorsNode)
{
ResultItem::CollectorsItem collectorsObject;
if(!allResultNodecollectorscollectorsItem["gmtCreatedTime"].isNull())
collectorsObject.gmtCreatedTime = allResultNodecollectorscollectorsItem["gmtCreatedTime"].asString();
if(!allResultNodecollectorscollectorsItem["gmtUpdateTime"].isNull())
collectorsObject.gmtUpdateTime = allResultNodecollectorscollectorsItem["gmtUpdateTime"].asString();
if(!allResultNodecollectorscollectorsItem["name"].isNull())
collectorsObject.name = allResultNodecollectorscollectorsItem["name"].asString();
if(!allResultNodecollectorscollectorsItem["resId"].isNull())
collectorsObject.resId = allResultNodecollectorscollectorsItem["resId"].asString();
if(!allResultNodecollectorscollectorsItem["resVersion"].isNull())
collectorsObject.resVersion = allResultNodecollectorscollectorsItem["resVersion"].asString();
if(!allResultNodecollectorscollectorsItem["vpcId"].isNull())
collectorsObject.vpcId = allResultNodecollectorscollectorsItem["vpcId"].asString();
if(!allResultNodecollectorscollectorsItem["resType"].isNull())
collectorsObject.resType = allResultNodecollectorscollectorsItem["resType"].asString();
if(!allResultNodecollectorscollectorsItem["ownerId"].isNull())
collectorsObject.ownerId = allResultNodecollectorscollectorsItem["ownerId"].asString();
if(!allResultNodecollectorscollectorsItem["status"].isNull())
collectorsObject.status = allResultNodecollectorscollectorsItem["status"].asString();
if(!allResultNodecollectorscollectorsItem["dryRun"].isNull())
collectorsObject.dryRun = allResultNodecollectorscollectorsItem["dryRun"].asString() == "true";
auto allconfigsNode = allcollectorsNode["configs"]["configsItem"];
for (auto allcollectorsNodeconfigsconfigsItem : allconfigsNode)
if(!valueResultResultItemcollectorscollectorsItem["gmtCreatedTime"].isNull())
collectorsObject.gmtCreatedTime = valueResultResultItemcollectorscollectorsItem["gmtCreatedTime"].asString();
if(!valueResultResultItemcollectorscollectorsItem["gmtUpdateTime"].isNull())
collectorsObject.gmtUpdateTime = valueResultResultItemcollectorscollectorsItem["gmtUpdateTime"].asString();
if(!valueResultResultItemcollectorscollectorsItem["name"].isNull())
collectorsObject.name = valueResultResultItemcollectorscollectorsItem["name"].asString();
if(!valueResultResultItemcollectorscollectorsItem["resId"].isNull())
collectorsObject.resId = valueResultResultItemcollectorscollectorsItem["resId"].asString();
if(!valueResultResultItemcollectorscollectorsItem["resVersion"].isNull())
collectorsObject.resVersion = valueResultResultItemcollectorscollectorsItem["resVersion"].asString();
if(!valueResultResultItemcollectorscollectorsItem["vpcId"].isNull())
collectorsObject.vpcId = valueResultResultItemcollectorscollectorsItem["vpcId"].asString();
if(!valueResultResultItemcollectorscollectorsItem["resType"].isNull())
collectorsObject.resType = valueResultResultItemcollectorscollectorsItem["resType"].asString();
if(!valueResultResultItemcollectorscollectorsItem["ownerId"].isNull())
collectorsObject.ownerId = valueResultResultItemcollectorscollectorsItem["ownerId"].asString();
if(!valueResultResultItemcollectorscollectorsItem["status"].isNull())
collectorsObject.status = valueResultResultItemcollectorscollectorsItem["status"].asString();
if(!valueResultResultItemcollectorscollectorsItem["dryRun"].isNull())
collectorsObject.dryRun = valueResultResultItemcollectorscollectorsItem["dryRun"].asString() == "true";
auto allconfigsNode = valueResultResultItemcollectorscollectorsItem["configs"]["configsItem"];
for (auto valueResultResultItemcollectorscollectorsItemconfigsconfigsItem : allconfigsNode)
{
ResultItem::CollectorsItem::ConfigsItem configsObject;
if(!allcollectorsNodeconfigsconfigsItem["fileName"].isNull())
configsObject.fileName = allcollectorsNodeconfigsconfigsItem["fileName"].asString();
if(!allcollectorsNodeconfigsconfigsItem["content"].isNull())
configsObject.content = allcollectorsNodeconfigsconfigsItem["content"].asString();
if(!valueResultResultItemcollectorscollectorsItemconfigsconfigsItem["fileName"].isNull())
configsObject.fileName = valueResultResultItemcollectorscollectorsItemconfigsconfigsItem["fileName"].asString();
if(!valueResultResultItemcollectorscollectorsItemconfigsconfigsItem["content"].isNull())
configsObject.content = valueResultResultItemcollectorscollectorsItemconfigsconfigsItem["content"].asString();
collectorsObject.configs.push_back(configsObject);
}
auto allextendConfigsNode = allcollectorsNode["extendConfigs"]["extendConfigsItem"];
for (auto allcollectorsNodeextendConfigsextendConfigsItem : allextendConfigsNode)
auto allextendConfigsNode = valueResultResultItemcollectorscollectorsItem["extendConfigs"]["extendConfigsItem"];
for (auto valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem : allextendConfigsNode)
{
ResultItem::CollectorsItem::ExtendConfigsItem extendConfigsObject;
if(!allcollectorsNodeextendConfigsextendConfigsItem["configType"].isNull())
extendConfigsObject.configType = allcollectorsNodeextendConfigsextendConfigsItem["configType"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["instanceId"].isNull())
extendConfigsObject.instanceId = allcollectorsNodeextendConfigsextendConfigsItem["instanceId"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["instanceType"].isNull())
extendConfigsObject.instanceType = allcollectorsNodeextendConfigsextendConfigsItem["instanceType"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["protocol"].isNull())
extendConfigsObject.protocol = allcollectorsNodeextendConfigsextendConfigsItem["protocol"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["userName"].isNull())
extendConfigsObject.userName = allcollectorsNodeextendConfigsextendConfigsItem["userName"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
extendConfigsObject.enableMonitoring = allcollectorsNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
if(!allcollectorsNodeextendConfigsextendConfigsItem["type"].isNull())
extendConfigsObject.type = allcollectorsNodeextendConfigsextendConfigsItem["type"].asString();
if(!allcollectorsNodeextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsObject.groupId = allcollectorsNodeextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["configType"].isNull())
extendConfigsObject.configType = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["configType"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["instanceId"].isNull())
extendConfigsObject.instanceId = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["instanceId"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["instanceType"].isNull())
extendConfigsObject.instanceType = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["instanceType"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["protocol"].isNull())
extendConfigsObject.protocol = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["protocol"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["userName"].isNull())
extendConfigsObject.userName = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["userName"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["enableMonitoring"].isNull())
extendConfigsObject.enableMonitoring = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["type"].isNull())
extendConfigsObject.type = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["type"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsObject.groupId = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItem["machines"]["machinesItem"];
for (auto valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItemmachinesmachinesItem : allmachinesNode)
{
ResultItem::CollectorsItem::ExtendConfigsItem::MachinesItem machinesObject;
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].asString();
if(!valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = valueResultResultItemcollectorscollectorsItemextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].asString();
extendConfigsObject.machines.push_back(machinesObject);
}
auto allHosts = value["hosts"]["hosts"];

View File

@@ -65,14 +65,14 @@ void ListInstanceResult::parse(const std::string &payload)
resultObject.dedicateMaster = valueResultInstance["dedicateMaster"].asString() == "true";
if(!valueResultInstance["resourceGroupId"].isNull())
resultObject.resourceGroupId = valueResultInstance["resourceGroupId"].asString();
auto alltagsNode = allResultNode["tags"]["Tag"];
for (auto allResultNodetagsTag : alltagsNode)
auto alltagsNode = valueResultInstance["tags"]["Tag"];
for (auto valueResultInstancetagsTag : alltagsNode)
{
Instance::Tag tagsObject;
if(!allResultNodetagsTag["tagKey"].isNull())
tagsObject.tagKey = allResultNodetagsTag["tagKey"].asString();
if(!allResultNodetagsTag["tagValue"].isNull())
tagsObject.tagValue = allResultNodetagsTag["tagValue"].asString();
if(!valueResultInstancetagsTag["tagKey"].isNull())
tagsObject.tagKey = valueResultInstancetagsTag["tagKey"].asString();
if(!valueResultInstancetagsTag["tagValue"].isNull())
tagsObject.tagValue = valueResultInstancetagsTag["tagValue"].asString();
resultObject.tags.push_back(tagsObject);
}
auto nodeSpecNode = value["nodeSpec"];

View File

@@ -55,24 +55,24 @@ void ListNodesResult::parse(const std::string &payload)
resultObject.cloudAssistantStatus = valueResultResultItem["cloudAssistantStatus"].asString();
if(!valueResultResultItem["agentStatus"].isNull())
resultObject.agentStatus = valueResultResultItem["agentStatus"].asString();
auto alltagsNode = allResultNode["tags"]["tagsItem"];
for (auto allResultNodetagstagsItem : alltagsNode)
auto alltagsNode = valueResultResultItem["tags"]["tagsItem"];
for (auto valueResultResultItemtagstagsItem : alltagsNode)
{
ResultItem::TagsItem tagsObject;
if(!allResultNodetagstagsItem["tagKey"].isNull())
tagsObject.tagKey = allResultNodetagstagsItem["tagKey"].asString();
if(!allResultNodetagstagsItem["tagValue"].isNull())
tagsObject.tagValue = allResultNodetagstagsItem["tagValue"].asString();
if(!valueResultResultItemtagstagsItem["tagKey"].isNull())
tagsObject.tagKey = valueResultResultItemtagstagsItem["tagKey"].asString();
if(!valueResultResultItemtagstagsItem["tagValue"].isNull())
tagsObject.tagValue = valueResultResultItemtagstagsItem["tagValue"].asString();
resultObject.tags.push_back(tagsObject);
}
auto allipAddressNode = allResultNode["ipAddress"]["ipAddressItem"];
for (auto allResultNodeipAddressipAddressItem : allipAddressNode)
auto allipAddressNode = valueResultResultItem["ipAddress"]["ipAddressItem"];
for (auto valueResultResultItemipAddressipAddressItem : allipAddressNode)
{
ResultItem::IpAddressItem ipAddressObject;
if(!allResultNodeipAddressipAddressItem["host"].isNull())
ipAddressObject.host = allResultNodeipAddressipAddressItem["host"].asString();
if(!allResultNodeipAddressipAddressItem["ipType"].isNull())
ipAddressObject.ipType = allResultNodeipAddressipAddressItem["ipType"].asString();
if(!valueResultResultItemipAddressipAddressItem["host"].isNull())
ipAddressObject.host = valueResultResultItemipAddressipAddressItem["host"].asString();
if(!valueResultResultItemipAddressipAddressItem["ipType"].isNull())
ipAddressObject.ipType = valueResultResultItemipAddressipAddressItem["ipType"].asString();
resultObject.ipAddress.push_back(ipAddressObject);
}
result_.push_back(resultObject);

View File

@@ -94,14 +94,14 @@ void UpdateCollectorNameResult::parse(const std::string &payload)
extendConfigsItemObject.host = resultNodeextendConfigsextendConfigsItem["host"].asString();
if(!resultNodeextendConfigsextendConfigsItem["kibanaHost"].isNull())
extendConfigsItemObject.kibanaHost = resultNodeextendConfigsextendConfigsItem["kibanaHost"].asString();
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
auto allmachinesNode = resultNodeextendConfigsextendConfigsItem["machines"]["machinesItem"];
for (auto resultNodeextendConfigsextendConfigsItemmachinesmachinesItem : allmachinesNode)
{
Result::ExtendConfigsItem::MachinesItem machinesObject;
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].asString();
extendConfigsItemObject.machines.push_back(machinesObject);
}
auto allHosts = value["hosts"]["hosts"];

View File

@@ -90,14 +90,14 @@ void UpdateCollectorResult::parse(const std::string &payload)
extendConfigsItemObject.type = resultNodeextendConfigsextendConfigsItem["type"].asString();
if(!resultNodeextendConfigsextendConfigsItem["groupId"].isNull())
extendConfigsItemObject.groupId = resultNodeextendConfigsextendConfigsItem["groupId"].asString();
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
auto allmachinesNode = resultNodeextendConfigsextendConfigsItem["machines"]["machinesItem"];
for (auto resultNodeextendConfigsextendConfigsItemmachinesmachinesItem : allmachinesNode)
{
Result::ExtendConfigsItem::MachinesItem machinesObject;
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].isNull())
machinesObject.instanceId = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["instanceId"].asString();
if(!resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].isNull())
machinesObject.agentStatus = resultNodeextendConfigsextendConfigsItemmachinesmachinesItem["agentStatus"].asString();
extendConfigsItemObject.machines.push_back(machinesObject);
}
auto allHosts = value["hosts"]["hosts"];

126
objectdet/CMakeLists.txt Normal file
View File

@@ -0,0 +1,126 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(objectdet_public_header
include/alibabacloud/objectdet/ObjectdetClient.h
include/alibabacloud/objectdet/ObjectdetExport.h )
set(objectdet_public_header_model
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceRequest.h
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceResult.h
include/alibabacloud/objectdet/model/DetectMainBodyRequest.h
include/alibabacloud/objectdet/model/DetectMainBodyResult.h
include/alibabacloud/objectdet/model/DetectObjectRequest.h
include/alibabacloud/objectdet/model/DetectObjectResult.h
include/alibabacloud/objectdet/model/DetectTransparentImageRequest.h
include/alibabacloud/objectdet/model/DetectTransparentImageResult.h
include/alibabacloud/objectdet/model/DetectVehicleRequest.h
include/alibabacloud/objectdet/model/DetectVehicleResult.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageRequest.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageResult.h
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanRequest.h
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanResult.h
include/alibabacloud/objectdet/model/GetVehicleRepairPlanRequest.h
include/alibabacloud/objectdet/model/GetVehicleRepairPlanResult.h
include/alibabacloud/objectdet/model/RecognizeVehicleDamageRequest.h
include/alibabacloud/objectdet/model/RecognizeVehicleDamageResult.h
include/alibabacloud/objectdet/model/RecognizeVehicleDashboardRequest.h
include/alibabacloud/objectdet/model/RecognizeVehicleDashboardResult.h
include/alibabacloud/objectdet/model/RecognizeVehiclePartsRequest.h
include/alibabacloud/objectdet/model/RecognizeVehiclePartsResult.h )
set(objectdet_src
src/ObjectdetClient.cc
src/model/ClassifyVehicleInsuranceRequest.cc
src/model/ClassifyVehicleInsuranceResult.cc
src/model/DetectMainBodyRequest.cc
src/model/DetectMainBodyResult.cc
src/model/DetectObjectRequest.cc
src/model/DetectObjectResult.cc
src/model/DetectTransparentImageRequest.cc
src/model/DetectTransparentImageResult.cc
src/model/DetectVehicleRequest.cc
src/model/DetectVehicleResult.cc
src/model/DetectWhiteBaseImageRequest.cc
src/model/DetectWhiteBaseImageResult.cc
src/model/GenerateVehicleRepairPlanRequest.cc
src/model/GenerateVehicleRepairPlanResult.cc
src/model/GetVehicleRepairPlanRequest.cc
src/model/GetVehicleRepairPlanResult.cc
src/model/RecognizeVehicleDamageRequest.cc
src/model/RecognizeVehicleDamageResult.cc
src/model/RecognizeVehicleDashboardRequest.cc
src/model/RecognizeVehicleDashboardResult.cc
src/model/RecognizeVehiclePartsRequest.cc
src/model/RecognizeVehiclePartsResult.cc )
add_library(objectdet ${LIB_TYPE}
${objectdet_public_header}
${objectdet_public_header_model}
${objectdet_src})
set_target_properties(objectdet
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}objectdet
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(objectdet
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_OBJECTDET_LIBRARY)
endif()
target_include_directories(objectdet
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(objectdet
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(objectdet
jsoncpp)
target_include_directories(objectdet
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(objectdet
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(objectdet
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(objectdet
PRIVATE /usr/include/jsoncpp)
target_link_libraries(objectdet
jsoncpp)
endif()
install(FILES ${objectdet_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/objectdet)
install(FILES ${objectdet_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/objectdet/model)
install(TARGETS objectdet
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,134 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_OBJECTDETCLIENT_H_
#define ALIBABACLOUD_OBJECTDET_OBJECTDETCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "ObjectdetExport.h"
#include "model/ClassifyVehicleInsuranceRequest.h"
#include "model/ClassifyVehicleInsuranceResult.h"
#include "model/DetectMainBodyRequest.h"
#include "model/DetectMainBodyResult.h"
#include "model/DetectObjectRequest.h"
#include "model/DetectObjectResult.h"
#include "model/DetectTransparentImageRequest.h"
#include "model/DetectTransparentImageResult.h"
#include "model/DetectVehicleRequest.h"
#include "model/DetectVehicleResult.h"
#include "model/DetectWhiteBaseImageRequest.h"
#include "model/DetectWhiteBaseImageResult.h"
#include "model/GenerateVehicleRepairPlanRequest.h"
#include "model/GenerateVehicleRepairPlanResult.h"
#include "model/GetVehicleRepairPlanRequest.h"
#include "model/GetVehicleRepairPlanResult.h"
#include "model/RecognizeVehicleDamageRequest.h"
#include "model/RecognizeVehicleDamageResult.h"
#include "model/RecognizeVehicleDashboardRequest.h"
#include "model/RecognizeVehicleDashboardResult.h"
#include "model/RecognizeVehiclePartsRequest.h"
#include "model/RecognizeVehiclePartsResult.h"
namespace AlibabaCloud
{
namespace Objectdet
{
class ALIBABACLOUD_OBJECTDET_EXPORT ObjectdetClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::ClassifyVehicleInsuranceResult> ClassifyVehicleInsuranceOutcome;
typedef std::future<ClassifyVehicleInsuranceOutcome> ClassifyVehicleInsuranceOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::ClassifyVehicleInsuranceRequest&, const ClassifyVehicleInsuranceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyVehicleInsuranceAsyncHandler;
typedef Outcome<Error, Model::DetectMainBodyResult> DetectMainBodyOutcome;
typedef std::future<DetectMainBodyOutcome> DetectMainBodyOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectMainBodyRequest&, const DetectMainBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectMainBodyAsyncHandler;
typedef Outcome<Error, Model::DetectObjectResult> DetectObjectOutcome;
typedef std::future<DetectObjectOutcome> DetectObjectOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectObjectRequest&, const DetectObjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectObjectAsyncHandler;
typedef Outcome<Error, Model::DetectTransparentImageResult> DetectTransparentImageOutcome;
typedef std::future<DetectTransparentImageOutcome> DetectTransparentImageOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectTransparentImageRequest&, const DetectTransparentImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectTransparentImageAsyncHandler;
typedef Outcome<Error, Model::DetectVehicleResult> DetectVehicleOutcome;
typedef std::future<DetectVehicleOutcome> DetectVehicleOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleRequest&, const DetectVehicleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleAsyncHandler;
typedef Outcome<Error, Model::DetectWhiteBaseImageResult> DetectWhiteBaseImageOutcome;
typedef std::future<DetectWhiteBaseImageOutcome> DetectWhiteBaseImageOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectWhiteBaseImageRequest&, const DetectWhiteBaseImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectWhiteBaseImageAsyncHandler;
typedef Outcome<Error, Model::GenerateVehicleRepairPlanResult> GenerateVehicleRepairPlanOutcome;
typedef std::future<GenerateVehicleRepairPlanOutcome> GenerateVehicleRepairPlanOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::GenerateVehicleRepairPlanRequest&, const GenerateVehicleRepairPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateVehicleRepairPlanAsyncHandler;
typedef Outcome<Error, Model::GetVehicleRepairPlanResult> GetVehicleRepairPlanOutcome;
typedef std::future<GetVehicleRepairPlanOutcome> GetVehicleRepairPlanOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::GetVehicleRepairPlanRequest&, const GetVehicleRepairPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetVehicleRepairPlanAsyncHandler;
typedef Outcome<Error, Model::RecognizeVehicleDamageResult> RecognizeVehicleDamageOutcome;
typedef std::future<RecognizeVehicleDamageOutcome> RecognizeVehicleDamageOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehicleDamageRequest&, const RecognizeVehicleDamageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehicleDamageAsyncHandler;
typedef Outcome<Error, Model::RecognizeVehicleDashboardResult> RecognizeVehicleDashboardOutcome;
typedef std::future<RecognizeVehicleDashboardOutcome> RecognizeVehicleDashboardOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehicleDashboardRequest&, const RecognizeVehicleDashboardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehicleDashboardAsyncHandler;
typedef Outcome<Error, Model::RecognizeVehiclePartsResult> RecognizeVehiclePartsOutcome;
typedef std::future<RecognizeVehiclePartsOutcome> RecognizeVehiclePartsOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehiclePartsRequest&, const RecognizeVehiclePartsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehiclePartsAsyncHandler;
ObjectdetClient(const Credentials &credentials, const ClientConfiguration &configuration);
ObjectdetClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
ObjectdetClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~ObjectdetClient();
ClassifyVehicleInsuranceOutcome classifyVehicleInsurance(const Model::ClassifyVehicleInsuranceRequest &request)const;
void classifyVehicleInsuranceAsync(const Model::ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ClassifyVehicleInsuranceOutcomeCallable classifyVehicleInsuranceCallable(const Model::ClassifyVehicleInsuranceRequest& request) const;
DetectMainBodyOutcome detectMainBody(const Model::DetectMainBodyRequest &request)const;
void detectMainBodyAsync(const Model::DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectMainBodyOutcomeCallable detectMainBodyCallable(const Model::DetectMainBodyRequest& request) const;
DetectObjectOutcome detectObject(const Model::DetectObjectRequest &request)const;
void detectObjectAsync(const Model::DetectObjectRequest& request, const DetectObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectObjectOutcomeCallable detectObjectCallable(const Model::DetectObjectRequest& request) const;
DetectTransparentImageOutcome detectTransparentImage(const Model::DetectTransparentImageRequest &request)const;
void detectTransparentImageAsync(const Model::DetectTransparentImageRequest& request, const DetectTransparentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectTransparentImageOutcomeCallable detectTransparentImageCallable(const Model::DetectTransparentImageRequest& request) const;
DetectVehicleOutcome detectVehicle(const Model::DetectVehicleRequest &request)const;
void detectVehicleAsync(const Model::DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleOutcomeCallable detectVehicleCallable(const Model::DetectVehicleRequest& request) const;
DetectWhiteBaseImageOutcome detectWhiteBaseImage(const Model::DetectWhiteBaseImageRequest &request)const;
void detectWhiteBaseImageAsync(const Model::DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectWhiteBaseImageOutcomeCallable detectWhiteBaseImageCallable(const Model::DetectWhiteBaseImageRequest& request) const;
GenerateVehicleRepairPlanOutcome generateVehicleRepairPlan(const Model::GenerateVehicleRepairPlanRequest &request)const;
void generateVehicleRepairPlanAsync(const Model::GenerateVehicleRepairPlanRequest& request, const GenerateVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenerateVehicleRepairPlanOutcomeCallable generateVehicleRepairPlanCallable(const Model::GenerateVehicleRepairPlanRequest& request) const;
GetVehicleRepairPlanOutcome getVehicleRepairPlan(const Model::GetVehicleRepairPlanRequest &request)const;
void getVehicleRepairPlanAsync(const Model::GetVehicleRepairPlanRequest& request, const GetVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetVehicleRepairPlanOutcomeCallable getVehicleRepairPlanCallable(const Model::GetVehicleRepairPlanRequest& request) const;
RecognizeVehicleDamageOutcome recognizeVehicleDamage(const Model::RecognizeVehicleDamageRequest &request)const;
void recognizeVehicleDamageAsync(const Model::RecognizeVehicleDamageRequest& request, const RecognizeVehicleDamageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVehicleDamageOutcomeCallable recognizeVehicleDamageCallable(const Model::RecognizeVehicleDamageRequest& request) const;
RecognizeVehicleDashboardOutcome recognizeVehicleDashboard(const Model::RecognizeVehicleDashboardRequest &request)const;
void recognizeVehicleDashboardAsync(const Model::RecognizeVehicleDashboardRequest& request, const RecognizeVehicleDashboardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVehicleDashboardOutcomeCallable recognizeVehicleDashboardCallable(const Model::RecognizeVehicleDashboardRequest& request) const;
RecognizeVehiclePartsOutcome recognizeVehicleParts(const Model::RecognizeVehiclePartsRequest &request)const;
void recognizeVehiclePartsAsync(const Model::RecognizeVehiclePartsRequest& request, const RecognizeVehiclePartsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVehiclePartsOutcomeCallable recognizeVehiclePartsCallable(const Model::RecognizeVehiclePartsRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_OBJECTDET_OBJECTDETCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_OBJECTDETEXPORT_H_
#define ALIBABACLOUD_OBJECTDET_OBJECTDETEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_OBJECTDET_LIBRARY)
# define ALIBABACLOUD_OBJECTDET_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_OBJECTDET_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_OBJECTDET_EXPORT
#endif
#endif // !ALIBABACLOUD_OBJECTDET_OBJECTDETEXPORT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT ClassifyVehicleInsuranceRequest : public RpcServiceRequest
{
public:
ClassifyVehicleInsuranceRequest();
~ClassifyVehicleInsuranceRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT ClassifyVehicleInsuranceResult : public ServiceResult
{
public:
struct Data
{
struct Label
{
float score;
std::string name;
};
std::vector<Label> labels;
float threshold;
};
ClassifyVehicleInsuranceResult();
explicit ClassifyVehicleInsuranceResult(const std::string &payload);
~ClassifyVehicleInsuranceResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectMainBodyRequest : public RpcServiceRequest
{
public:
DetectMainBodyRequest();
~DetectMainBodyRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectMainBodyResult : public ServiceResult
{
public:
struct Data
{
struct Location
{
int x;
int y;
int height;
int width;
};
Location location;
};
DetectMainBodyResult();
explicit DetectMainBodyResult(const std::string &payload);
~DetectMainBodyResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectObjectRequest : public RpcServiceRequest
{
public:
DetectObjectRequest();
~DetectObjectRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectObjectResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string type;
std::vector<std::string> boxes;
};
int height;
std::vector<Element> elements;
int width;
};
DetectObjectResult();
explicit DetectObjectResult(const std::string &payload);
~DetectObjectResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectTransparentImageRequest : public RpcServiceRequest
{
public:
DetectTransparentImageRequest();
~DetectTransparentImageRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectTransparentImageResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
int transparentImage;
};
std::vector<Element> elements;
};
DetectTransparentImageResult();
explicit DetectTransparentImageResult(const std::string &payload);
~DetectTransparentImageResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleRequest : public RpcServiceRequest
{
public:
DetectVehicleRequest();
~DetectVehicleRequest();
int getImageType()const;
void setImageType(int imageType);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
int imageType_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleResult : public ServiceResult
{
public:
struct Data
{
struct DetectObjectInfo
{
float score;
std::string type;
int id;
std::vector<std::string> boxes;
};
std::vector<DetectObjectInfo> detectObjectInfoList;
int height;
int width;
};
DetectVehicleResult();
explicit DetectVehicleResult(const std::string &payload);
~DetectVehicleResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectWhiteBaseImageRequest : public RpcServiceRequest
{
public:
DetectWhiteBaseImageRequest();
~DetectWhiteBaseImageRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectWhiteBaseImageResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
int whiteBase;
};
std::vector<Element> elements;
};
DetectWhiteBaseImageResult();
explicit DetectWhiteBaseImageResult(const std::string &payload);
~DetectWhiteBaseImageResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT GenerateVehicleRepairPlanRequest : public RpcServiceRequest
{
public:
struct DamageImageList
{
std::string imageUrl;
std::string createTimeStamp;
};
public:
GenerateVehicleRepairPlanRequest();
~GenerateVehicleRepairPlanRequest();
std::vector<DamageImageList> getDamageImageList()const;
void setDamageImageList(const std::vector<DamageImageList>& damageImageList);
private:
std::vector<DamageImageList> damageImageList_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT GenerateVehicleRepairPlanResult : public ServiceResult
{
public:
struct Data
{
std::string taskId;
};
GenerateVehicleRepairPlanResult();
explicit GenerateVehicleRepairPlanResult(const std::string &payload);
~GenerateVehicleRepairPlanResult();
int getHttpCode()const;
Data getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
int httpCode_;
Data data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT GetVehicleRepairPlanRequest : public RpcServiceRequest
{
public:
GetVehicleRepairPlanRequest();
~GetVehicleRepairPlanRequest();
std::string getVinCodeImage()const;
void setVinCodeImage(const std::string& vinCodeImage);
std::string getCarNumberImage()const;
void setCarNumberImage(const std::string& carNumberImage);
std::string getTaskId()const;
void setTaskId(const std::string& taskId);
private:
std::string vinCodeImage_;
std::string carNumberImage_;
std::string taskId_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT GetVehicleRepairPlanResult : public ServiceResult
{
public:
struct Data
{
struct RepairItems
{
bool partNameMatch;
std::string partsStdCode;
std::string outStandardPartsName;
std::string repairType;
std::string relationType;
std::string repairFee;
std::string garageType;
std::string partsStdName;
std::string outStandardPartsId;
std::string repairTypeName;
bool oeMatch;
};
std::string frameNo;
std::vector<RepairItems> repairParts;
};
GetVehicleRepairPlanResult();
explicit GetVehicleRepairPlanResult(const std::string &payload);
~GetVehicleRepairPlanResult();
int getHttpCode()const;
Data getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
int httpCode_;
Data data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDamageRequest : public RpcServiceRequest
{
public:
RecognizeVehicleDamageRequest();
~RecognizeVehicleDamageRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDamageResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string type;
std::vector<std::string> scores;
std::vector<std::string> boxes;
};
std::vector<Element> elements;
};
RecognizeVehicleDamageResult();
explicit RecognizeVehicleDamageResult(const std::string &payload);
~RecognizeVehicleDamageResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDashboardRequest : public RpcServiceRequest
{
public:
RecognizeVehicleDashboardRequest();
~RecognizeVehicleDashboardRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDashboardResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string className;
std::string label;
std::vector<std::string> boxes;
};
std::vector<Element> elements;
};
RecognizeVehicleDashboardResult();
explicit RecognizeVehicleDashboardResult(const std::string &payload);
~RecognizeVehicleDashboardResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehiclePartsRequest : public RpcServiceRequest
{
public:
RecognizeVehiclePartsRequest();
~RecognizeVehiclePartsRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehiclePartsResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string type;
std::vector<std::string> boxes;
};
std::vector<Element> elements;
std::vector<std::string> originShapes;
};
RecognizeVehiclePartsResult();
explicit RecognizeVehiclePartsResult(const std::string &payload);
~RecognizeVehiclePartsResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_

View File

@@ -0,0 +1,449 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/ObjectdetClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
namespace
{
const std::string SERVICE_NAME = "objectdet";
}
ObjectdetClient::ObjectdetClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "objectdet");
}
ObjectdetClient::ObjectdetClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "objectdet");
}
ObjectdetClient::ObjectdetClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "objectdet");
}
ObjectdetClient::~ObjectdetClient()
{}
ObjectdetClient::ClassifyVehicleInsuranceOutcome ObjectdetClient::classifyVehicleInsurance(const ClassifyVehicleInsuranceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ClassifyVehicleInsuranceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ClassifyVehicleInsuranceOutcome(ClassifyVehicleInsuranceResult(outcome.result()));
else
return ClassifyVehicleInsuranceOutcome(outcome.error());
}
void ObjectdetClient::classifyVehicleInsuranceAsync(const ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, classifyVehicleInsurance(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::ClassifyVehicleInsuranceOutcomeCallable ObjectdetClient::classifyVehicleInsuranceCallable(const ClassifyVehicleInsuranceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ClassifyVehicleInsuranceOutcome()>>(
[this, request]()
{
return this->classifyVehicleInsurance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectMainBodyOutcome ObjectdetClient::detectMainBody(const DetectMainBodyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectMainBodyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectMainBodyOutcome(DetectMainBodyResult(outcome.result()));
else
return DetectMainBodyOutcome(outcome.error());
}
void ObjectdetClient::detectMainBodyAsync(const DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectMainBody(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectMainBodyOutcomeCallable ObjectdetClient::detectMainBodyCallable(const DetectMainBodyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectMainBodyOutcome()>>(
[this, request]()
{
return this->detectMainBody(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectObjectOutcome ObjectdetClient::detectObject(const DetectObjectRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectObjectOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectObjectOutcome(DetectObjectResult(outcome.result()));
else
return DetectObjectOutcome(outcome.error());
}
void ObjectdetClient::detectObjectAsync(const DetectObjectRequest& request, const DetectObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectObject(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectObjectOutcomeCallable ObjectdetClient::detectObjectCallable(const DetectObjectRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectObjectOutcome()>>(
[this, request]()
{
return this->detectObject(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectTransparentImageOutcome ObjectdetClient::detectTransparentImage(const DetectTransparentImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectTransparentImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectTransparentImageOutcome(DetectTransparentImageResult(outcome.result()));
else
return DetectTransparentImageOutcome(outcome.error());
}
void ObjectdetClient::detectTransparentImageAsync(const DetectTransparentImageRequest& request, const DetectTransparentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectTransparentImage(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectTransparentImageOutcomeCallable ObjectdetClient::detectTransparentImageCallable(const DetectTransparentImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectTransparentImageOutcome()>>(
[this, request]()
{
return this->detectTransparentImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectVehicleOutcome ObjectdetClient::detectVehicle(const DetectVehicleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectVehicleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectVehicleOutcome(DetectVehicleResult(outcome.result()));
else
return DetectVehicleOutcome(outcome.error());
}
void ObjectdetClient::detectVehicleAsync(const DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectVehicle(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectVehicleOutcomeCallable ObjectdetClient::detectVehicleCallable(const DetectVehicleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectVehicleOutcome()>>(
[this, request]()
{
return this->detectVehicle(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectWhiteBaseImageOutcome ObjectdetClient::detectWhiteBaseImage(const DetectWhiteBaseImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectWhiteBaseImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectWhiteBaseImageOutcome(DetectWhiteBaseImageResult(outcome.result()));
else
return DetectWhiteBaseImageOutcome(outcome.error());
}
void ObjectdetClient::detectWhiteBaseImageAsync(const DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectWhiteBaseImage(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectWhiteBaseImageOutcomeCallable ObjectdetClient::detectWhiteBaseImageCallable(const DetectWhiteBaseImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectWhiteBaseImageOutcome()>>(
[this, request]()
{
return this->detectWhiteBaseImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::GenerateVehicleRepairPlanOutcome ObjectdetClient::generateVehicleRepairPlan(const GenerateVehicleRepairPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenerateVehicleRepairPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenerateVehicleRepairPlanOutcome(GenerateVehicleRepairPlanResult(outcome.result()));
else
return GenerateVehicleRepairPlanOutcome(outcome.error());
}
void ObjectdetClient::generateVehicleRepairPlanAsync(const GenerateVehicleRepairPlanRequest& request, const GenerateVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, generateVehicleRepairPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::GenerateVehicleRepairPlanOutcomeCallable ObjectdetClient::generateVehicleRepairPlanCallable(const GenerateVehicleRepairPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenerateVehicleRepairPlanOutcome()>>(
[this, request]()
{
return this->generateVehicleRepairPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::GetVehicleRepairPlanOutcome ObjectdetClient::getVehicleRepairPlan(const GetVehicleRepairPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetVehicleRepairPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetVehicleRepairPlanOutcome(GetVehicleRepairPlanResult(outcome.result()));
else
return GetVehicleRepairPlanOutcome(outcome.error());
}
void ObjectdetClient::getVehicleRepairPlanAsync(const GetVehicleRepairPlanRequest& request, const GetVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getVehicleRepairPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::GetVehicleRepairPlanOutcomeCallable ObjectdetClient::getVehicleRepairPlanCallable(const GetVehicleRepairPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetVehicleRepairPlanOutcome()>>(
[this, request]()
{
return this->getVehicleRepairPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::RecognizeVehicleDamageOutcome ObjectdetClient::recognizeVehicleDamage(const RecognizeVehicleDamageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeVehicleDamageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeVehicleDamageOutcome(RecognizeVehicleDamageResult(outcome.result()));
else
return RecognizeVehicleDamageOutcome(outcome.error());
}
void ObjectdetClient::recognizeVehicleDamageAsync(const RecognizeVehicleDamageRequest& request, const RecognizeVehicleDamageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeVehicleDamage(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::RecognizeVehicleDamageOutcomeCallable ObjectdetClient::recognizeVehicleDamageCallable(const RecognizeVehicleDamageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeVehicleDamageOutcome()>>(
[this, request]()
{
return this->recognizeVehicleDamage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::RecognizeVehicleDashboardOutcome ObjectdetClient::recognizeVehicleDashboard(const RecognizeVehicleDashboardRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeVehicleDashboardOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeVehicleDashboardOutcome(RecognizeVehicleDashboardResult(outcome.result()));
else
return RecognizeVehicleDashboardOutcome(outcome.error());
}
void ObjectdetClient::recognizeVehicleDashboardAsync(const RecognizeVehicleDashboardRequest& request, const RecognizeVehicleDashboardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeVehicleDashboard(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::RecognizeVehicleDashboardOutcomeCallable ObjectdetClient::recognizeVehicleDashboardCallable(const RecognizeVehicleDashboardRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeVehicleDashboardOutcome()>>(
[this, request]()
{
return this->recognizeVehicleDashboard(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::RecognizeVehiclePartsOutcome ObjectdetClient::recognizeVehicleParts(const RecognizeVehiclePartsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeVehiclePartsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeVehiclePartsOutcome(RecognizeVehiclePartsResult(outcome.result()));
else
return RecognizeVehiclePartsOutcome(outcome.error());
}
void ObjectdetClient::recognizeVehiclePartsAsync(const RecognizeVehiclePartsRequest& request, const RecognizeVehiclePartsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeVehicleParts(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::RecognizeVehiclePartsOutcomeCallable ObjectdetClient::recognizeVehiclePartsCallable(const RecognizeVehiclePartsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeVehiclePartsOutcome()>>(
[this, request]()
{
return this->recognizeVehicleParts(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/ClassifyVehicleInsuranceRequest.h>
using AlibabaCloud::Objectdet::Model::ClassifyVehicleInsuranceRequest;
ClassifyVehicleInsuranceRequest::ClassifyVehicleInsuranceRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "ClassifyVehicleInsurance")
{
setMethod(HttpRequest::Method::Post);
}
ClassifyVehicleInsuranceRequest::~ClassifyVehicleInsuranceRequest()
{}
std::string ClassifyVehicleInsuranceRequest::getImageURL()const
{
return imageURL_;
}
void ClassifyVehicleInsuranceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/ClassifyVehicleInsuranceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
ClassifyVehicleInsuranceResult::ClassifyVehicleInsuranceResult() :
ServiceResult()
{}
ClassifyVehicleInsuranceResult::ClassifyVehicleInsuranceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ClassifyVehicleInsuranceResult::~ClassifyVehicleInsuranceResult()
{}
void ClassifyVehicleInsuranceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Threshold"].isNull())
data_.threshold = std::stof(dataNode["Threshold"].asString());
auto allLabelsNode = dataNode["Labels"]["Label"];
for (auto dataNodeLabelsLabel : allLabelsNode)
{
Data::Label labelObject;
if(!dataNodeLabelsLabel["Score"].isNull())
labelObject.score = std::stof(dataNodeLabelsLabel["Score"].asString());
if(!dataNodeLabelsLabel["Name"].isNull())
labelObject.name = dataNodeLabelsLabel["Name"].asString();
data_.labels.push_back(labelObject);
}
}
ClassifyVehicleInsuranceResult::Data ClassifyVehicleInsuranceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectMainBodyRequest.h>
using AlibabaCloud::Objectdet::Model::DetectMainBodyRequest;
DetectMainBodyRequest::DetectMainBodyRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectMainBody")
{
setMethod(HttpRequest::Method::Post);
}
DetectMainBodyRequest::~DetectMainBodyRequest()
{}
std::string DetectMainBodyRequest::getImageURL()const
{
return imageURL_;
}
void DetectMainBodyRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectMainBodyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectMainBodyResult::DetectMainBodyResult() :
ServiceResult()
{}
DetectMainBodyResult::DetectMainBodyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectMainBodyResult::~DetectMainBodyResult()
{}
void DetectMainBodyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto locationNode = dataNode["Location"];
if(!locationNode["X"].isNull())
data_.location.x = std::stoi(locationNode["X"].asString());
if(!locationNode["Y"].isNull())
data_.location.y = std::stoi(locationNode["Y"].asString());
if(!locationNode["Width"].isNull())
data_.location.width = std::stoi(locationNode["Width"].asString());
if(!locationNode["Height"].isNull())
data_.location.height = std::stoi(locationNode["Height"].asString());
}
DetectMainBodyResult::Data DetectMainBodyResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectObjectRequest.h>
using AlibabaCloud::Objectdet::Model::DetectObjectRequest;
DetectObjectRequest::DetectObjectRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectObject")
{
setMethod(HttpRequest::Method::Post);
}
DetectObjectRequest::~DetectObjectRequest()
{}
std::string DetectObjectRequest::getImageURL()const
{
return imageURL_;
}
void DetectObjectRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectObjectResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectObjectResult::DetectObjectResult() :
ServiceResult()
{}
DetectObjectResult::DetectObjectResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectObjectResult::~DetectObjectResult()
{}
void DetectObjectResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Width"].isNull())
data_.width = std::stoi(dataNode["Width"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stoi(dataNode["Height"].asString());
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
if(!dataNodeElementsElement["Type"].isNull())
elementObject.type = dataNodeElementsElement["Type"].asString();
auto allBoxes = value["Boxes"]["Box"];
for (auto value : allBoxes)
elementObject.boxes.push_back(value.asString());
data_.elements.push_back(elementObject);
}
}
DetectObjectResult::Data DetectObjectResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectTransparentImageRequest.h>
using AlibabaCloud::Objectdet::Model::DetectTransparentImageRequest;
DetectTransparentImageRequest::DetectTransparentImageRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectTransparentImage")
{
setMethod(HttpRequest::Method::Post);
}
DetectTransparentImageRequest::~DetectTransparentImageRequest()
{}
std::string DetectTransparentImageRequest::getImageURL()const
{
return imageURL_;
}
void DetectTransparentImageRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectTransparentImageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectTransparentImageResult::DetectTransparentImageResult() :
ServiceResult()
{}
DetectTransparentImageResult::DetectTransparentImageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectTransparentImageResult::~DetectTransparentImageResult()
{}
void DetectTransparentImageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TransparentImage"].isNull())
elementObject.transparentImage = std::stoi(dataNodeElementsElement["TransparentImage"].asString());
data_.elements.push_back(elementObject);
}
}
DetectTransparentImageResult::Data DetectTransparentImageResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectVehicleRequest.h>
using AlibabaCloud::Objectdet::Model::DetectVehicleRequest;
DetectVehicleRequest::DetectVehicleRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicle")
{
setMethod(HttpRequest::Method::Post);
}
DetectVehicleRequest::~DetectVehicleRequest()
{}
int DetectVehicleRequest::getImageType()const
{
return imageType_;
}
void DetectVehicleRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}
std::string DetectVehicleRequest::getImageURL()const
{
return imageURL_;
}
void DetectVehicleRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,69 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectVehicleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectVehicleResult::DetectVehicleResult() :
ServiceResult()
{}
DetectVehicleResult::DetectVehicleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVehicleResult::~DetectVehicleResult()
{}
void DetectVehicleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Width"].isNull())
data_.width = std::stoi(dataNode["Width"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stoi(dataNode["Height"].asString());
auto allDetectObjectInfoListNode = dataNode["DetectObjectInfoList"]["DetectObjectInfo"];
for (auto dataNodeDetectObjectInfoListDetectObjectInfo : allDetectObjectInfoListNode)
{
Data::DetectObjectInfo detectObjectInfoObject;
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Score"].isNull())
detectObjectInfoObject.score = std::stof(dataNodeDetectObjectInfoListDetectObjectInfo["Score"].asString());
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Type"].isNull())
detectObjectInfoObject.type = dataNodeDetectObjectInfoListDetectObjectInfo["Type"].asString();
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Id"].isNull())
detectObjectInfoObject.id = std::stoi(dataNodeDetectObjectInfoListDetectObjectInfo["Id"].asString());
auto allBoxes = value["Boxes"]["Box"];
for (auto value : allBoxes)
detectObjectInfoObject.boxes.push_back(value.asString());
data_.detectObjectInfoList.push_back(detectObjectInfoObject);
}
}
DetectVehicleResult::Data DetectVehicleResult::getData()const
{
return data_;
}

Some files were not shown because too many files have changed in this diff Show More