Compare commits

..

5 Commits

Author SHA1 Message Date
yixiong.jxy
f6d7b208a9 MOPEN SDK Auto Released By everettli.ll,Version:1.20.4
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
2018-08-01 00:50:16 +08:00
yixiong.jxy
076567c0c7 ECS SDK Auto Released By zemin.lzm,Version:1.20.3
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
2018-07-31 22:00:17 +08:00
yixiong.jxy
20195cdd92 TESLASTREAM SDK Auto Released By tony.ly,Version:1.20.2
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
2018-07-26 09:26:49 +08:00
yixiong.jxy
7e24ec0ded RTC SDK Auto Released By renrang.yl,Version:1.20.1
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
2018-07-25 16:31:51 +08:00
yixiong.jxy
6443abbf11 2018-07-22 19:12:49 +08:00
104 changed files with 5137 additions and 2 deletions

View File

@@ -1,3 +1,18 @@
2018-08-01 Version: 1.20.4
1, Add api: MoPenQueryCanvas, MoPenDoRecognize, MoPenSendMqttMessage, MoPenFindGroup
2018-07-31 Version: 1.20.3
1, Support describePrice for market image, add return detailInfo in interface describePrice
2018-07-26 Version: 1.20.2
1, Add BatchGetJobMetricInfo API.
2, Add BatchGetPluginConfigInfo API.
3, Add GetJobTopology API.
2018-07-25 Version: 1.20.1
1, Add RemoveTerminals API.
2018-07-13 Version: 1.20.0
1, New APIs for batch executing commands in cluster: InvokeShellCommand, ListCommands, etc.
2, New APIs for HybridCluster (link E-HPC with cluster in local IDC): CreateHybridCluster, etc.

View File

@@ -79,4 +79,6 @@ add_subdirectory(jarvis)
add_subdirectory(scdn)
add_subdirectory(live)
add_subdirectory(rtc)
add_subdirectory(chatbot)
add_subdirectory(chatbot)
add_subdirectory(teslastream)
add_subdirectory(mopen)

View File

@@ -1 +1 @@
1.20.0
1.20.4

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
int getMemory()const;
void setMemory(int memory);
long getCallerParentId()const;
void setCallerParentId(long callerParentId);
std::string getIoOptimized()const;
@@ -53,6 +55,8 @@ namespace AlibabaCloud
void setCallerType(const std::string& callerType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
int getCores()const;
void setCores(int cores);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getRegionId()const;
@@ -104,6 +108,7 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
int memory_;
long callerParentId_;
std::string ioOptimized_;
bool proxy_original_security_transport_;
@@ -112,6 +117,7 @@ namespace AlibabaCloud
std::string ownerIdLoginEmail_;
std::string callerType_;
std::string accessKeyId_;
int cores_;
std::string securityToken_;
std::string regionId_;
bool enable_;

View File

@@ -57,6 +57,7 @@ namespace AlibabaCloud
std::string isSelfShared;
std::string architecture;
std::string platform;
std::string resourceGroupId;
std::string productCode;
int size;
bool isSubscribed;

View File

@@ -45,8 +45,14 @@ namespace AlibabaCloud
void setRegionId(const std::string& regionId);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
std::string getRenewalStatus()const;
void setRenewalStatus(const std::string& renewalStatus);
std::string getPageSize()const;
void setPageSize(const std::string& pageSize);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getPageNumber()const;
void setPageNumber(const std::string& pageNumber);
private:
long resourceOwnerId_;
@@ -54,7 +60,10 @@ namespace AlibabaCloud
std::string resourceOwnerAccount_;
std::string regionId_;
std::string ownerAccount_;
std::string renewalStatus_;
std::string pageSize_;
long ownerId_;
std::string pageNumber_;
};
}

View File

@@ -45,12 +45,18 @@ namespace AlibabaCloud
DescribeInstanceAutoRenewAttributeResult();
explicit DescribeInstanceAutoRenewAttributeResult(const std::string &payload);
~DescribeInstanceAutoRenewAttributeResult();
int getTotalCount()const;
std::vector<InstanceRenewAttribute> getInstanceRenewAttributes()const;
int getPageSize()const;
int getPageNumber()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
std::vector<InstanceRenewAttribute> instanceRenewAttributes_;
int pageSize_;
int pageNumber_;
};
}

View File

@@ -49,6 +49,7 @@ namespace AlibabaCloud
std::string localStorageCategory;
std::string gPUSpec;
int baselineCredit;
std::string instanceFamilyLevel;
std::string instanceTypeId;
};

View File

@@ -34,8 +34,15 @@ namespace AlibabaCloud
public:
struct KeyPair
{
struct Tag
{
std::string tagKey;
std::string tagValue;
};
std::string keyPairFingerPrint;
std::string keyPairName;
std::string resourceGroupId;
std::vector<KeyPair::Tag> tags;
};

View File

@@ -34,13 +34,20 @@ namespace AlibabaCloud
public:
struct LaunchTemplateSet
{
struct Tag
{
std::string tagKey;
std::string tagValue;
};
std::string launchTemplateName;
std::string createdBy;
std::string modifiedTime;
std::string resourceGroupId;
long latestVersionNumber;
std::string createTime;
std::string launchTemplateId;
long defaultVersionNumber;
std::vector<LaunchTemplateSet::Tag> tags;
};

View File

@@ -50,10 +50,16 @@ namespace AlibabaCloud
std::string privateIpAddress;
bool primary;
};
struct Tag
{
std::string tagKey;
std::string tagValue;
};
std::string status;
std::string privateIpAddress;
std::string description;
std::string zoneId;
std::string resourceGroupId;
std::string instanceId;
std::string vSwitchId;
std::string networkInterfaceName;
@@ -64,6 +70,7 @@ namespace AlibabaCloud
std::string vpcId;
AssociatedPublicIp associatedPublicIp;
std::string creationTime;
std::vector<NetworkInterfaceSet::Tag> tags;
std::vector<NetworkInterfaceSet::PrivateIpSet> privateIpSets;
};

View File

@@ -36,9 +36,23 @@ namespace AlibabaCloud
{
struct Price
{
struct ResourcePriceModel
{
struct Rule1
{
std::string description;
long ruleId;
};
float originalPrice;
float discountPrice;
std::vector<ResourcePriceModel::Rule1> subRules;
std::string resource;
float tradePrice;
};
float originalPrice;
float discountPrice;
std::string currency;
std::vector<ResourcePriceModel> detailInfos;
float tradePrice;
};
struct Rule

View File

@@ -36,9 +36,23 @@ namespace AlibabaCloud
{
struct Price
{
struct ResourcePriceModel
{
struct Rule1
{
std::string description;
long ruleId;
};
float originalPrice;
float discountPrice;
std::vector<ResourcePriceModel::Rule1> subRules;
std::string resource;
float tradePrice;
};
float originalPrice;
float discountPrice;
std::string currency;
std::vector<ResourcePriceModel> detailInfos;
float tradePrice;
};
struct Rule

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
int getMemory()const;
void setMemory(int memory);
long getCallerParentId()const;
void setCallerParentId(long callerParentId);
bool getProxy_original_security_transport()const;
@@ -49,6 +51,8 @@ namespace AlibabaCloud
void setCallerType(const std::string& callerType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
int getCores()const;
void setCores(int cores);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getRegionId()const;
@@ -94,12 +98,14 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
int memory_;
long callerParentId_;
bool proxy_original_security_transport_;
std::string proxy_original_source_ip_;
std::string ownerIdLoginEmail_;
std::string callerType_;
std::string accessKeyId_;
int cores_;
std::string securityToken_;
std::string regionId_;
bool enable_;

View File

@@ -37,6 +37,7 @@ namespace AlibabaCloud
std::string sourceGroupId;
std::string policy;
std::string description;
std::string sourcePortRange;
std::string priority;
std::string createTime;
std::string nicType;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string description;
std::string securityGroupName;
std::string vpcId;
std::string resourceGroupId;
std::string securityGroupId;
std::string creationTime;
std::vector<SecurityGroup::Tag> tags;

View File

@@ -57,6 +57,8 @@ namespace AlibabaCloud
void setPageNumber(int pageNumber);
std::string getTag1Value()const;
void setTag1Value(const std::string& tag1Value);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getFilter1Key()const;
void setFilter1Key(const std::string& filter1Key);
std::string getRegionId()const;
@@ -112,6 +114,7 @@ namespace AlibabaCloud
std::string tag3Key_;
int pageNumber_;
std::string tag1Value_;
std::string resourceGroupId_;
std::string filter1Key_;
std::string regionId_;
int pageSize_;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string progress;
std::string usage;
std::string description;
std::string resourceGroupId;
std::string productCode;
bool encrypted;
int retentionDays;

View File

@@ -37,9 +37,13 @@ namespace AlibabaCloud
struct ResourceTypeCount
{
int snapshot;
int eni;
int keyPair;
int instance;
int volume;
int launchTemplate;
int securitygroup;
int ddh;
int image;
int disk;
};

View File

@@ -63,6 +63,8 @@ namespace AlibabaCloud
void setLaunchTemplateName(const std::string& launchTemplateName);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
bool getUniqueSuffix()const;
void setUniqueSuffix(bool uniqueSuffix);
std::string getHpcClusterId()const;
void setHpcClusterId(const std::string& hpcClusterId);
long getCallerParentId()const;
@@ -195,6 +197,7 @@ namespace AlibabaCloud
private:
std::string launchTemplateName_;
long resourceOwnerId_;
bool uniqueSuffix_;
std::string hpcClusterId_;
long callerParentId_;
std::string securityEnhancementStrategy_;

View File

@@ -36,6 +36,17 @@ void DescribeAvailableResourceRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeAvailableResourceRequest::getMemory()const
{
return memory_;
}
void DescribeAvailableResourceRequest::setMemory(int memory)
{
memory_ = memory;
setParameter("Memory", std::to_string(memory));
}
long DescribeAvailableResourceRequest::getCallerParentId()const
{
return callerParentId_;
@@ -124,6 +135,17 @@ void DescribeAvailableResourceRequest::setAccessKeyId(const std::string& accessK
setParameter("AccessKeyId", accessKeyId);
}
int DescribeAvailableResourceRequest::getCores()const
{
return cores_;
}
void DescribeAvailableResourceRequest::setCores(int cores)
{
cores_ = cores;
setParameter("Cores", std::to_string(cores));
}
std::string DescribeAvailableResourceRequest::getSecurityToken()const
{
return securityToken_;

View File

@@ -84,6 +84,8 @@ void DescribeImagesResult::parse(const std::string &payload)
imagesObject.usage = value["Usage"].asString();
if(!value["IsCopied"].isNull())
imagesObject.isCopied = value["IsCopied"].asString() == "true";
if(!value["ResourceGroupId"].isNull())
imagesObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allDiskDeviceMappings = value["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto value : allDiskDeviceMappings)
{

View File

@@ -80,6 +80,28 @@ void DescribeInstanceAutoRenewAttributeRequest::setOwnerAccount(const std::strin
setParameter("OwnerAccount", ownerAccount);
}
std::string DescribeInstanceAutoRenewAttributeRequest::getRenewalStatus()const
{
return renewalStatus_;
}
void DescribeInstanceAutoRenewAttributeRequest::setRenewalStatus(const std::string& renewalStatus)
{
renewalStatus_ = renewalStatus;
setParameter("RenewalStatus", renewalStatus);
}
std::string DescribeInstanceAutoRenewAttributeRequest::getPageSize()const
{
return pageSize_;
}
void DescribeInstanceAutoRenewAttributeRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", pageSize);
}
long DescribeInstanceAutoRenewAttributeRequest::getOwnerId()const
{
return ownerId_;
@@ -91,3 +113,14 @@ void DescribeInstanceAutoRenewAttributeRequest::setOwnerId(long ownerId)
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeInstanceAutoRenewAttributeRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeInstanceAutoRenewAttributeRequest::setPageNumber(const std::string& pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", pageNumber);
}

View File

@@ -56,11 +56,32 @@ void DescribeInstanceAutoRenewAttributeResult::parse(const std::string &payload)
instanceRenewAttributesObject.renewalStatus = value["RenewalStatus"].asString();
instanceRenewAttributes_.push_back(instanceRenewAttributesObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int DescribeInstanceAutoRenewAttributeResult::getTotalCount()const
{
return totalCount_;
}
std::vector<DescribeInstanceAutoRenewAttributeResult::InstanceRenewAttribute> DescribeInstanceAutoRenewAttributeResult::getInstanceRenewAttributes()const
{
return instanceRenewAttributes_;
}
int DescribeInstanceAutoRenewAttributeResult::getPageSize()const
{
return pageSize_;
}
int DescribeInstanceAutoRenewAttributeResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -76,6 +76,8 @@ void DescribeInstanceTypesResult::parse(const std::string &payload)
instanceTypesObject.instancePpsRx = std::stol(value["InstancePpsRx"].asString());
if(!value["InstancePpsTx"].isNull())
instanceTypesObject.instancePpsTx = std::stol(value["InstancePpsTx"].asString());
if(!value["InstanceFamilyLevel"].isNull())
instanceTypesObject.instanceFamilyLevel = value["InstanceFamilyLevel"].asString();
instanceTypes_.push_back(instanceTypesObject);
}

View File

@@ -48,6 +48,18 @@ void DescribeKeyPairsResult::parse(const std::string &payload)
keyPairsObject.keyPairName = value["KeyPairName"].asString();
if(!value["KeyPairFingerPrint"].isNull())
keyPairsObject.keyPairFingerPrint = value["KeyPairFingerPrint"].asString();
if(!value["ResourceGroupId"].isNull())
keyPairsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
KeyPair::Tag tagsObject;
if(!value["TagKey"].isNull())
tagsObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagsObject.tagValue = value["TagValue"].asString();
keyPairsObject.tags.push_back(tagsObject);
}
keyPairs_.push_back(keyPairsObject);
}
if(!value["TotalCount"].isNull())

View File

@@ -58,6 +58,18 @@ void DescribeLaunchTemplatesResult::parse(const std::string &payload)
launchTemplateSetsObject.latestVersionNumber = std::stol(value["LatestVersionNumber"].asString());
if(!value["CreatedBy"].isNull())
launchTemplateSetsObject.createdBy = value["CreatedBy"].asString();
if(!value["ResourceGroupId"].isNull())
launchTemplateSetsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
LaunchTemplateSet::Tag tagsObject;
if(!value["TagKey"].isNull())
tagsObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagsObject.tagValue = value["TagValue"].asString();
launchTemplateSetsObject.tags.push_back(tagsObject);
}
launchTemplateSets_.push_back(launchTemplateSetsObject);
}
if(!value["TotalCount"].isNull())

View File

@@ -68,6 +68,8 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
networkInterfaceSetsObject.instanceId = value["InstanceId"].asString();
if(!value["CreationTime"].isNull())
networkInterfaceSetsObject.creationTime = value["CreationTime"].asString();
if(!value["ResourceGroupId"].isNull())
networkInterfaceSetsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allPrivateIpSets = value["PrivateIpSets"]["PrivateIpSet"];
for (auto value : allPrivateIpSets)
{
@@ -83,6 +85,16 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
privateIpSetsObject.associatedPublicIp1.allocationId = associatedPublicIp1Node["AllocationId"].asString();
networkInterfaceSetsObject.privateIpSets.push_back(privateIpSetsObject);
}
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
NetworkInterfaceSet::Tag tagsObject;
if(!value["TagKey"].isNull())
tagsObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagsObject.tagValue = value["TagValue"].asString();
networkInterfaceSetsObject.tags.push_back(tagsObject);
}
auto associatedPublicIpNode = value["AssociatedPublicIp"];
if(!associatedPublicIpNode["PublicIpAddress"].isNull())
networkInterfaceSetsObject.associatedPublicIp.publicIpAddress = associatedPublicIpNode["PublicIpAddress"].asString();

View File

@@ -60,6 +60,30 @@ void DescribePriceResult::parse(const std::string &payload)
priceInfo_.price.tradePrice = std::stof(priceNode["TradePrice"].asString());
if(!priceNode["Currency"].isNull())
priceInfo_.price.currency = priceNode["Currency"].asString();
auto allDetailInfos = value["DetailInfos"]["ResourcePriceModel"];
for (auto value : allDetailInfos)
{
PriceInfo::Price::ResourcePriceModel resourcePriceModelObject;
if(!value["Resource"].isNull())
resourcePriceModelObject.resource = value["Resource"].asString();
if(!value["OriginalPrice"].isNull())
resourcePriceModelObject.originalPrice = std::stof(value["OriginalPrice"].asString());
if(!value["DiscountPrice"].isNull())
resourcePriceModelObject.discountPrice = std::stof(value["DiscountPrice"].asString());
if(!value["TradePrice"].isNull())
resourcePriceModelObject.tradePrice = std::stof(value["TradePrice"].asString());
auto allSubRules = value["SubRules"]["Rule"];
for (auto value : allSubRules)
{
PriceInfo::Price::ResourcePriceModel::Rule1 subRulesObject;
if(!value["RuleId"].isNull())
subRulesObject.ruleId = std::stol(value["RuleId"].asString());
if(!value["Description"].isNull())
subRulesObject.description = value["Description"].asString();
resourcePriceModelObject.subRules.push_back(subRulesObject);
}
priceInfo_.price.detailInfos.push_back(resourcePriceModelObject);
}
}

View File

@@ -60,6 +60,30 @@ void DescribeRenewalPriceResult::parse(const std::string &payload)
priceInfo_.price.tradePrice = std::stof(priceNode["TradePrice"].asString());
if(!priceNode["Currency"].isNull())
priceInfo_.price.currency = priceNode["Currency"].asString();
auto allDetailInfos = value["DetailInfos"]["ResourcePriceModel"];
for (auto value : allDetailInfos)
{
PriceInfo::Price::ResourcePriceModel resourcePriceModelObject;
if(!value["Resource"].isNull())
resourcePriceModelObject.resource = value["Resource"].asString();
if(!value["OriginalPrice"].isNull())
resourcePriceModelObject.originalPrice = std::stof(value["OriginalPrice"].asString());
if(!value["DiscountPrice"].isNull())
resourcePriceModelObject.discountPrice = std::stof(value["DiscountPrice"].asString());
if(!value["TradePrice"].isNull())
resourcePriceModelObject.tradePrice = std::stof(value["TradePrice"].asString());
auto allSubRules = value["SubRules"]["Rule"];
for (auto value : allSubRules)
{
PriceInfo::Price::ResourcePriceModel::Rule1 subRulesObject;
if(!value["RuleId"].isNull())
subRulesObject.ruleId = std::stol(value["RuleId"].asString());
if(!value["Description"].isNull())
subRulesObject.description = value["Description"].asString();
resourcePriceModelObject.subRules.push_back(subRulesObject);
}
priceInfo_.price.detailInfos.push_back(resourcePriceModelObject);
}
}

View File

@@ -36,6 +36,17 @@ void DescribeResourcesModificationRequest::setResourceOwnerId(long resourceOwner
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeResourcesModificationRequest::getMemory()const
{
return memory_;
}
void DescribeResourcesModificationRequest::setMemory(int memory)
{
memory_ = memory;
setParameter("Memory", std::to_string(memory));
}
long DescribeResourcesModificationRequest::getCallerParentId()const
{
return callerParentId_;
@@ -102,6 +113,17 @@ void DescribeResourcesModificationRequest::setAccessKeyId(const std::string& acc
setParameter("AccessKeyId", accessKeyId);
}
int DescribeResourcesModificationRequest::getCores()const
{
return cores_;
}
void DescribeResourcesModificationRequest::setCores(int cores)
{
cores_ = cores;
setParameter("Cores", std::to_string(cores));
}
std::string DescribeResourcesModificationRequest::getSecurityToken()const
{
return securityToken_;

View File

@@ -48,6 +48,8 @@ void DescribeSecurityGroupAttributeResult::parse(const std::string &payload)
permissionsObject.ipProtocol = value["IpProtocol"].asString();
if(!value["PortRange"].isNull())
permissionsObject.portRange = value["PortRange"].asString();
if(!value["SourcePortRange"].isNull())
permissionsObject.sourcePortRange = value["SourcePortRange"].asString();
if(!value["SourceGroupId"].isNull())
permissionsObject.sourceGroupId = value["SourceGroupId"].asString();
if(!value["SourceGroupName"].isNull())

View File

@@ -58,6 +58,8 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
securityGroupsObject.availableInstanceAmount = std::stoi(value["AvailableInstanceAmount"].asString());
if(!value["EcsCount"].isNull())
securityGroupsObject.ecsCount = std::stoi(value["EcsCount"].asString());
if(!value["ResourceGroupId"].isNull())
securityGroupsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{

View File

@@ -146,6 +146,17 @@ void DescribeSnapshotsRequest::setTag1Value(const std::string& tag1Value)
setParameter("Tag1Value", tag1Value);
}
std::string DescribeSnapshotsRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void DescribeSnapshotsRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string DescribeSnapshotsRequest::getFilter1Key()const
{
return filter1Key_;

View File

@@ -74,6 +74,8 @@ void DescribeSnapshotsResult::parse(const std::string &payload)
snapshotsObject.sourceStorageType = value["SourceStorageType"].asString();
if(!value["RemainTime"].isNull())
snapshotsObject.remainTime = std::stoi(value["RemainTime"].asString());
if(!value["ResourceGroupId"].isNull())
snapshotsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{

View File

@@ -61,6 +61,14 @@ void DescribeTagsResult::parse(const std::string &payload)
tagsObject.resourceTypeCount.snapshot = std::stoi(resourceTypeCountNode["Snapshot"].asString());
if(!resourceTypeCountNode["Securitygroup"].isNull())
tagsObject.resourceTypeCount.securitygroup = std::stoi(resourceTypeCountNode["Securitygroup"].asString());
if(!resourceTypeCountNode["LaunchTemplate"].isNull())
tagsObject.resourceTypeCount.launchTemplate = std::stoi(resourceTypeCountNode["LaunchTemplate"].asString());
if(!resourceTypeCountNode["Eni"].isNull())
tagsObject.resourceTypeCount.eni = std::stoi(resourceTypeCountNode["Eni"].asString());
if(!resourceTypeCountNode["Ddh"].isNull())
tagsObject.resourceTypeCount.ddh = std::stoi(resourceTypeCountNode["Ddh"].asString());
if(!resourceTypeCountNode["KeyPair"].isNull())
tagsObject.resourceTypeCount.keyPair = std::stoi(resourceTypeCountNode["KeyPair"].asString());
tags_.push_back(tagsObject);
}
if(!value["PageSize"].isNull())

View File

@@ -47,6 +47,17 @@ void RunInstancesRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
bool RunInstancesRequest::getUniqueSuffix()const
{
return uniqueSuffix_;
}
void RunInstancesRequest::setUniqueSuffix(bool uniqueSuffix)
{
uniqueSuffix_ = uniqueSuffix;
setParameter("UniqueSuffix", std::to_string(uniqueSuffix));
}
std::string RunInstancesRequest::getHpcClusterId()const
{
return hpcClusterId_;

122
mopen/CMakeLists.txt Normal file
View File

@@ -0,0 +1,122 @@
#
# 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(mopen_public_header
include/alibabacloud/mopen/MoPenClient.h
include/alibabacloud/mopen/MoPenExport.h )
set(mopen_public_header_model
include/alibabacloud/mopen/model/MopenCreateGroupRequest.h
include/alibabacloud/mopen/model/MopenCreateGroupResult.h
include/alibabacloud/mopen/model/MoPenQueryCanvasRequest.h
include/alibabacloud/mopen/model/MoPenQueryCanvasResult.h
include/alibabacloud/mopen/model/MoPenDeleteGroupMemberRequest.h
include/alibabacloud/mopen/model/MoPenDeleteGroupMemberResult.h
include/alibabacloud/mopen/model/MoPenDoRecognizeRequest.h
include/alibabacloud/mopen/model/MoPenDoRecognizeResult.h
include/alibabacloud/mopen/model/MoPenBindIsvRequest.h
include/alibabacloud/mopen/model/MoPenBindIsvResult.h
include/alibabacloud/mopen/model/MoPenAddGroupMemberRequest.h
include/alibabacloud/mopen/model/MoPenAddGroupMemberResult.h
include/alibabacloud/mopen/model/MoPenCreateDeviceRequest.h
include/alibabacloud/mopen/model/MoPenCreateDeviceResult.h
include/alibabacloud/mopen/model/MoPenSendMqttMessageRequest.h
include/alibabacloud/mopen/model/MoPenSendMqttMessageResult.h
include/alibabacloud/mopen/model/MoPenFindGroupRequest.h
include/alibabacloud/mopen/model/MoPenFindGroupResult.h
include/alibabacloud/mopen/model/MoPenDeleteGroupRequest.h
include/alibabacloud/mopen/model/MoPenDeleteGroupResult.h )
set(mopen_src
src/MoPenClient.cc
src/model/MopenCreateGroupRequest.cc
src/model/MopenCreateGroupResult.cc
src/model/MoPenQueryCanvasRequest.cc
src/model/MoPenQueryCanvasResult.cc
src/model/MoPenDeleteGroupMemberRequest.cc
src/model/MoPenDeleteGroupMemberResult.cc
src/model/MoPenDoRecognizeRequest.cc
src/model/MoPenDoRecognizeResult.cc
src/model/MoPenBindIsvRequest.cc
src/model/MoPenBindIsvResult.cc
src/model/MoPenAddGroupMemberRequest.cc
src/model/MoPenAddGroupMemberResult.cc
src/model/MoPenCreateDeviceRequest.cc
src/model/MoPenCreateDeviceResult.cc
src/model/MoPenSendMqttMessageRequest.cc
src/model/MoPenSendMqttMessageResult.cc
src/model/MoPenFindGroupRequest.cc
src/model/MoPenFindGroupResult.cc
src/model/MoPenDeleteGroupRequest.cc
src/model/MoPenDeleteGroupResult.cc )
add_library(mopen ${LIB_TYPE}
${mopen_public_header}
${mopen_public_header_model}
${mopen_src})
set_target_properties(mopen
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}mopen
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(mopen
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_MOPEN_LIBRARY)
endif()
target_include_directories(mopen
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(mopen
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(mopen
jsoncpp)
target_include_directories(mopen
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(mopen
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(mopen
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(mopen
PRIVATE /usr/include/jsoncpp)
target_link_libraries(mopen
jsoncpp)
endif()
install(FILES ${mopen_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mopen)
install(FILES ${mopen_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mopen/model)
install(TARGETS mopen
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

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.
*/
#ifndef ALIBABACLOUD_MOPEN_MOPENCLIENT_H_
#define ALIBABACLOUD_MOPEN_MOPENCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "MoPenExport.h"
#include "model/MopenCreateGroupRequest.h"
#include "model/MopenCreateGroupResult.h"
#include "model/MoPenQueryCanvasRequest.h"
#include "model/MoPenQueryCanvasResult.h"
#include "model/MoPenDeleteGroupMemberRequest.h"
#include "model/MoPenDeleteGroupMemberResult.h"
#include "model/MoPenDoRecognizeRequest.h"
#include "model/MoPenDoRecognizeResult.h"
#include "model/MoPenBindIsvRequest.h"
#include "model/MoPenBindIsvResult.h"
#include "model/MoPenAddGroupMemberRequest.h"
#include "model/MoPenAddGroupMemberResult.h"
#include "model/MoPenCreateDeviceRequest.h"
#include "model/MoPenCreateDeviceResult.h"
#include "model/MoPenSendMqttMessageRequest.h"
#include "model/MoPenSendMqttMessageResult.h"
#include "model/MoPenFindGroupRequest.h"
#include "model/MoPenFindGroupResult.h"
#include "model/MoPenDeleteGroupRequest.h"
#include "model/MoPenDeleteGroupResult.h"
namespace AlibabaCloud
{
namespace MoPen
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::MopenCreateGroupResult> MopenCreateGroupOutcome;
typedef std::future<MopenCreateGroupOutcome> MopenCreateGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MopenCreateGroupRequest&, const MopenCreateGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MopenCreateGroupAsyncHandler;
typedef Outcome<Error, Model::MoPenQueryCanvasResult> MoPenQueryCanvasOutcome;
typedef std::future<MoPenQueryCanvasOutcome> MoPenQueryCanvasOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenQueryCanvasRequest&, const MoPenQueryCanvasOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenQueryCanvasAsyncHandler;
typedef Outcome<Error, Model::MoPenDeleteGroupMemberResult> MoPenDeleteGroupMemberOutcome;
typedef std::future<MoPenDeleteGroupMemberOutcome> MoPenDeleteGroupMemberOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDeleteGroupMemberRequest&, const MoPenDeleteGroupMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDeleteGroupMemberAsyncHandler;
typedef Outcome<Error, Model::MoPenDoRecognizeResult> MoPenDoRecognizeOutcome;
typedef std::future<MoPenDoRecognizeOutcome> MoPenDoRecognizeOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDoRecognizeRequest&, const MoPenDoRecognizeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDoRecognizeAsyncHandler;
typedef Outcome<Error, Model::MoPenBindIsvResult> MoPenBindIsvOutcome;
typedef std::future<MoPenBindIsvOutcome> MoPenBindIsvOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenBindIsvRequest&, const MoPenBindIsvOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenBindIsvAsyncHandler;
typedef Outcome<Error, Model::MoPenAddGroupMemberResult> MoPenAddGroupMemberOutcome;
typedef std::future<MoPenAddGroupMemberOutcome> MoPenAddGroupMemberOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenAddGroupMemberRequest&, const MoPenAddGroupMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenAddGroupMemberAsyncHandler;
typedef Outcome<Error, Model::MoPenCreateDeviceResult> MoPenCreateDeviceOutcome;
typedef std::future<MoPenCreateDeviceOutcome> MoPenCreateDeviceOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenCreateDeviceRequest&, const MoPenCreateDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenCreateDeviceAsyncHandler;
typedef Outcome<Error, Model::MoPenSendMqttMessageResult> MoPenSendMqttMessageOutcome;
typedef std::future<MoPenSendMqttMessageOutcome> MoPenSendMqttMessageOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenSendMqttMessageRequest&, const MoPenSendMqttMessageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenSendMqttMessageAsyncHandler;
typedef Outcome<Error, Model::MoPenFindGroupResult> MoPenFindGroupOutcome;
typedef std::future<MoPenFindGroupOutcome> MoPenFindGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenFindGroupRequest&, const MoPenFindGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenFindGroupAsyncHandler;
typedef Outcome<Error, Model::MoPenDeleteGroupResult> MoPenDeleteGroupOutcome;
typedef std::future<MoPenDeleteGroupOutcome> MoPenDeleteGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDeleteGroupRequest&, const MoPenDeleteGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDeleteGroupAsyncHandler;
MoPenClient(const Credentials &credentials, const ClientConfiguration &configuration);
MoPenClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
MoPenClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~MoPenClient();
MopenCreateGroupOutcome mopenCreateGroup(const Model::MopenCreateGroupRequest &request)const;
void mopenCreateGroupAsync(const Model::MopenCreateGroupRequest& request, const MopenCreateGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MopenCreateGroupOutcomeCallable mopenCreateGroupCallable(const Model::MopenCreateGroupRequest& request) const;
MoPenQueryCanvasOutcome moPenQueryCanvas(const Model::MoPenQueryCanvasRequest &request)const;
void moPenQueryCanvasAsync(const Model::MoPenQueryCanvasRequest& request, const MoPenQueryCanvasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenQueryCanvasOutcomeCallable moPenQueryCanvasCallable(const Model::MoPenQueryCanvasRequest& request) const;
MoPenDeleteGroupMemberOutcome moPenDeleteGroupMember(const Model::MoPenDeleteGroupMemberRequest &request)const;
void moPenDeleteGroupMemberAsync(const Model::MoPenDeleteGroupMemberRequest& request, const MoPenDeleteGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDeleteGroupMemberOutcomeCallable moPenDeleteGroupMemberCallable(const Model::MoPenDeleteGroupMemberRequest& request) const;
MoPenDoRecognizeOutcome moPenDoRecognize(const Model::MoPenDoRecognizeRequest &request)const;
void moPenDoRecognizeAsync(const Model::MoPenDoRecognizeRequest& request, const MoPenDoRecognizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDoRecognizeOutcomeCallable moPenDoRecognizeCallable(const Model::MoPenDoRecognizeRequest& request) const;
MoPenBindIsvOutcome moPenBindIsv(const Model::MoPenBindIsvRequest &request)const;
void moPenBindIsvAsync(const Model::MoPenBindIsvRequest& request, const MoPenBindIsvAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenBindIsvOutcomeCallable moPenBindIsvCallable(const Model::MoPenBindIsvRequest& request) const;
MoPenAddGroupMemberOutcome moPenAddGroupMember(const Model::MoPenAddGroupMemberRequest &request)const;
void moPenAddGroupMemberAsync(const Model::MoPenAddGroupMemberRequest& request, const MoPenAddGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenAddGroupMemberOutcomeCallable moPenAddGroupMemberCallable(const Model::MoPenAddGroupMemberRequest& request) const;
MoPenCreateDeviceOutcome moPenCreateDevice(const Model::MoPenCreateDeviceRequest &request)const;
void moPenCreateDeviceAsync(const Model::MoPenCreateDeviceRequest& request, const MoPenCreateDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenCreateDeviceOutcomeCallable moPenCreateDeviceCallable(const Model::MoPenCreateDeviceRequest& request) const;
MoPenSendMqttMessageOutcome moPenSendMqttMessage(const Model::MoPenSendMqttMessageRequest &request)const;
void moPenSendMqttMessageAsync(const Model::MoPenSendMqttMessageRequest& request, const MoPenSendMqttMessageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenSendMqttMessageOutcomeCallable moPenSendMqttMessageCallable(const Model::MoPenSendMqttMessageRequest& request) const;
MoPenFindGroupOutcome moPenFindGroup(const Model::MoPenFindGroupRequest &request)const;
void moPenFindGroupAsync(const Model::MoPenFindGroupRequest& request, const MoPenFindGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenFindGroupOutcomeCallable moPenFindGroupCallable(const Model::MoPenFindGroupRequest& request) const;
MoPenDeleteGroupOutcome moPenDeleteGroup(const Model::MoPenDeleteGroupRequest &request)const;
void moPenDeleteGroupAsync(const Model::MoPenDeleteGroupRequest& request, const MoPenDeleteGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDeleteGroupOutcomeCallable moPenDeleteGroupCallable(const Model::MoPenDeleteGroupRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_MOPEN_MOPENCLIENT_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_MOPEN_MOPENEXPORT_H_
#define ALIBABACLOUD_MOPEN_MOPENEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_MOPEN_LIBRARY)
# define ALIBABACLOUD_MOPEN_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_MOPEN_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_MOPEN_EXPORT
#endif
#endif // !ALIBABACLOUD_MOPEN_MOPENEXPORT_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_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenAddGroupMemberRequest : public RpcServiceRequest
{
public:
MoPenAddGroupMemberRequest();
~MoPenAddGroupMemberRequest();
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string groupId_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenAddGroupMemberResult : public ServiceResult
{
public:
MoPenAddGroupMemberResult();
explicit MoPenAddGroupMemberResult(const std::string &payload);
~MoPenAddGroupMemberResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_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_MOPEN_MODEL_MOPENBINDISVREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenBindIsvRequest : public RpcServiceRequest
{
public:
MoPenBindIsvRequest();
~MoPenBindIsvRequest();
std::string getOrderKey()const;
void setOrderKey(const std::string& orderKey);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string orderKey_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENBINDISVRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenBindIsvResult : public ServiceResult
{
public:
MoPenBindIsvResult();
explicit MoPenBindIsvResult(const std::string &payload);
~MoPenBindIsvResult();
std::string getDescription()const;
std::string getMessage()const;
bool getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
bool code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVRESULT_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_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenCreateDeviceRequest : public RpcServiceRequest
{
public:
MoPenCreateDeviceRequest();
~MoPenCreateDeviceRequest();
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
int getDeviceType()const;
void setDeviceType(int deviceType);
private:
std::string deviceName_;
int deviceType_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_MOPEN_MODEL_MOPENCREATEDEVICERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenCreateDeviceResult : public ServiceResult
{
public:
struct Data
{
std::string deviceSecret;
std::string product;
std::string deviceName;
};
MoPenCreateDeviceResult();
explicit MoPenCreateDeviceResult(const std::string &payload);
~MoPenCreateDeviceResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
bool getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
bool code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICERESULT_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_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupMemberRequest : public RpcServiceRequest
{
public:
MoPenDeleteGroupMemberRequest();
~MoPenDeleteGroupMemberRequest();
long getGroupId()const;
void setGroupId(long groupId);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
long groupId_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupMemberResult : public ServiceResult
{
public:
MoPenDeleteGroupMemberResult();
explicit MoPenDeleteGroupMemberResult(const std::string &payload);
~MoPenDeleteGroupMemberResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_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_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupRequest : public RpcServiceRequest
{
public:
MoPenDeleteGroupRequest();
~MoPenDeleteGroupRequest();
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
private:
std::string groupId_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupResult : public ServiceResult
{
public:
MoPenDeleteGroupResult();
explicit MoPenDeleteGroupResult(const std::string &payload);
~MoPenDeleteGroupResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_

View File

@@ -0,0 +1,66 @@
/*
* 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_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDoRecognizeRequest : public RpcServiceRequest
{
public:
MoPenDoRecognizeRequest();
~MoPenDoRecognizeRequest();
long getCanvasId()const;
void setCanvasId(long canvasId);
int getEndY()const;
void setEndY(int endY);
int getEndX()const;
void setEndX(int endX);
std::string getJsonConf()const;
void setJsonConf(const std::string& jsonConf);
std::string getExportType()const;
void setExportType(const std::string& exportType);
int getStartY()const;
void setStartY(int startY);
int getStartX()const;
void setStartX(int startX);
private:
long canvasId_;
int endY_;
int endX_;
std::string jsonConf_;
std::string exportType_;
int startY_;
int startX_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_MOPEN_MODEL_MOPENDORECOGNIZERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDoRecognizeResult : public ServiceResult
{
public:
struct Data
{
std::string resultType;
std::string result;
long canvasId;
};
MoPenDoRecognizeResult();
explicit MoPenDoRecognizeResult(const std::string &payload);
~MoPenDoRecognizeResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZERESULT_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_MOPEN_MODEL_MOPENFINDGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenFindGroupRequest : public RpcServiceRequest
{
public:
MoPenFindGroupRequest();
~MoPenFindGroupRequest();
std::string getCreator()const;
void setCreator(const std::string& creator);
private:
std::string creator_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPREQUEST_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_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenFindGroupResult : public ServiceResult
{
public:
struct Data
{
std::string creator;
std::string groupId;
};
MoPenFindGroupResult();
explicit MoPenFindGroupResult(const std::string &payload);
~MoPenFindGroupResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
int getCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
int code_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenQueryCanvasRequest : public RpcServiceRequest
{
public:
MoPenQueryCanvasRequest();
~MoPenQueryCanvasRequest();
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
std::string getSessionId()const;
void setSessionId(const std::string& sessionId);
int getPageId()const;
void setPageId(int pageId);
int getStatus()const;
void setStatus(int status);
private:
std::string deviceName_;
std::string sessionId_;
int pageId_;
int status_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_

View File

@@ -0,0 +1,75 @@
/*
* 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_MOPEN_MODEL_MOPENQUERYCANVASRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenQueryCanvasResult : public ServiceResult
{
public:
struct Data
{
struct Canvas
{
int pageId;
std::string lastModified;
int status;
std::string attribute;
std::string createTime;
long id;
std::string sessionId;
std::string url;
std::string deviceName;
};
std::vector<Canvas> canvasList;
};
MoPenQueryCanvasResult();
explicit MoPenQueryCanvasResult(const std::string &payload);
~MoPenQueryCanvasResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASRESULT_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_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenSendMqttMessageRequest : public RpcServiceRequest
{
public:
MoPenSendMqttMessageRequest();
~MoPenSendMqttMessageRequest();
std::string getPayload()const;
void setPayload(const std::string& payload);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string payload_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenSendMqttMessageResult : public ServiceResult
{
public:
MoPenSendMqttMessageResult();
explicit MoPenSendMqttMessageResult(const std::string &payload);
~MoPenSendMqttMessageResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_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_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MopenCreateGroupRequest : public RpcServiceRequest
{
public:
MopenCreateGroupRequest();
~MopenCreateGroupRequest();
std::string getCreator()const;
void setCreator(const std::string& creator);
private:
std::string creator_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MopenCreateGroupResult : public ServiceResult
{
public:
struct Data
{
std::string groupId;
};
MopenCreateGroupResult();
explicit MopenCreateGroupResult(const std::string &payload);
~MopenCreateGroupResult();
std::string getResqusetId()const;
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
int getCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string resqusetId_;
std::string description_;
std::string message_;
Data data_;
int code_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_

413
mopen/src/MoPenClient.cc Normal file
View File

@@ -0,0 +1,413 @@
/*
* 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/mopen/MoPenClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
namespace
{
const std::string SERVICE_NAME = "MoPen";
}
MoPenClient::MoPenClient(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, "");
}
MoPenClient::MoPenClient(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, "");
}
MoPenClient::MoPenClient(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, "");
}
MoPenClient::~MoPenClient()
{}
MoPenClient::MopenCreateGroupOutcome MoPenClient::mopenCreateGroup(const MopenCreateGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MopenCreateGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MopenCreateGroupOutcome(MopenCreateGroupResult(outcome.result()));
else
return MopenCreateGroupOutcome(outcome.error());
}
void MoPenClient::mopenCreateGroupAsync(const MopenCreateGroupRequest& request, const MopenCreateGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, mopenCreateGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MopenCreateGroupOutcomeCallable MoPenClient::mopenCreateGroupCallable(const MopenCreateGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MopenCreateGroupOutcome()>>(
[this, request]()
{
return this->mopenCreateGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenQueryCanvasOutcome MoPenClient::moPenQueryCanvas(const MoPenQueryCanvasRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenQueryCanvasOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenQueryCanvasOutcome(MoPenQueryCanvasResult(outcome.result()));
else
return MoPenQueryCanvasOutcome(outcome.error());
}
void MoPenClient::moPenQueryCanvasAsync(const MoPenQueryCanvasRequest& request, const MoPenQueryCanvasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenQueryCanvas(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenQueryCanvasOutcomeCallable MoPenClient::moPenQueryCanvasCallable(const MoPenQueryCanvasRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenQueryCanvasOutcome()>>(
[this, request]()
{
return this->moPenQueryCanvas(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDeleteGroupMemberOutcome MoPenClient::moPenDeleteGroupMember(const MoPenDeleteGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDeleteGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDeleteGroupMemberOutcome(MoPenDeleteGroupMemberResult(outcome.result()));
else
return MoPenDeleteGroupMemberOutcome(outcome.error());
}
void MoPenClient::moPenDeleteGroupMemberAsync(const MoPenDeleteGroupMemberRequest& request, const MoPenDeleteGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDeleteGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDeleteGroupMemberOutcomeCallable MoPenClient::moPenDeleteGroupMemberCallable(const MoPenDeleteGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDeleteGroupMemberOutcome()>>(
[this, request]()
{
return this->moPenDeleteGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDoRecognizeOutcome MoPenClient::moPenDoRecognize(const MoPenDoRecognizeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDoRecognizeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDoRecognizeOutcome(MoPenDoRecognizeResult(outcome.result()));
else
return MoPenDoRecognizeOutcome(outcome.error());
}
void MoPenClient::moPenDoRecognizeAsync(const MoPenDoRecognizeRequest& request, const MoPenDoRecognizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDoRecognize(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDoRecognizeOutcomeCallable MoPenClient::moPenDoRecognizeCallable(const MoPenDoRecognizeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDoRecognizeOutcome()>>(
[this, request]()
{
return this->moPenDoRecognize(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenBindIsvOutcome MoPenClient::moPenBindIsv(const MoPenBindIsvRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenBindIsvOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenBindIsvOutcome(MoPenBindIsvResult(outcome.result()));
else
return MoPenBindIsvOutcome(outcome.error());
}
void MoPenClient::moPenBindIsvAsync(const MoPenBindIsvRequest& request, const MoPenBindIsvAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenBindIsv(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenBindIsvOutcomeCallable MoPenClient::moPenBindIsvCallable(const MoPenBindIsvRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenBindIsvOutcome()>>(
[this, request]()
{
return this->moPenBindIsv(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenAddGroupMemberOutcome MoPenClient::moPenAddGroupMember(const MoPenAddGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenAddGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenAddGroupMemberOutcome(MoPenAddGroupMemberResult(outcome.result()));
else
return MoPenAddGroupMemberOutcome(outcome.error());
}
void MoPenClient::moPenAddGroupMemberAsync(const MoPenAddGroupMemberRequest& request, const MoPenAddGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenAddGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenAddGroupMemberOutcomeCallable MoPenClient::moPenAddGroupMemberCallable(const MoPenAddGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenAddGroupMemberOutcome()>>(
[this, request]()
{
return this->moPenAddGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenCreateDeviceOutcome MoPenClient::moPenCreateDevice(const MoPenCreateDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenCreateDeviceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenCreateDeviceOutcome(MoPenCreateDeviceResult(outcome.result()));
else
return MoPenCreateDeviceOutcome(outcome.error());
}
void MoPenClient::moPenCreateDeviceAsync(const MoPenCreateDeviceRequest& request, const MoPenCreateDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenCreateDevice(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenCreateDeviceOutcomeCallable MoPenClient::moPenCreateDeviceCallable(const MoPenCreateDeviceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenCreateDeviceOutcome()>>(
[this, request]()
{
return this->moPenCreateDevice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenSendMqttMessageOutcome MoPenClient::moPenSendMqttMessage(const MoPenSendMqttMessageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenSendMqttMessageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenSendMqttMessageOutcome(MoPenSendMqttMessageResult(outcome.result()));
else
return MoPenSendMqttMessageOutcome(outcome.error());
}
void MoPenClient::moPenSendMqttMessageAsync(const MoPenSendMqttMessageRequest& request, const MoPenSendMqttMessageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenSendMqttMessage(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenSendMqttMessageOutcomeCallable MoPenClient::moPenSendMqttMessageCallable(const MoPenSendMqttMessageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenSendMqttMessageOutcome()>>(
[this, request]()
{
return this->moPenSendMqttMessage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenFindGroupOutcome MoPenClient::moPenFindGroup(const MoPenFindGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenFindGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenFindGroupOutcome(MoPenFindGroupResult(outcome.result()));
else
return MoPenFindGroupOutcome(outcome.error());
}
void MoPenClient::moPenFindGroupAsync(const MoPenFindGroupRequest& request, const MoPenFindGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenFindGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenFindGroupOutcomeCallable MoPenClient::moPenFindGroupCallable(const MoPenFindGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenFindGroupOutcome()>>(
[this, request]()
{
return this->moPenFindGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDeleteGroupOutcome MoPenClient::moPenDeleteGroup(const MoPenDeleteGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDeleteGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDeleteGroupOutcome(MoPenDeleteGroupResult(outcome.result()));
else
return MoPenDeleteGroupOutcome(outcome.error());
}
void MoPenClient::moPenDeleteGroupAsync(const MoPenDeleteGroupRequest& request, const MoPenDeleteGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDeleteGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDeleteGroupOutcomeCallable MoPenClient::moPenDeleteGroupCallable(const MoPenDeleteGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDeleteGroupOutcome()>>(
[this, request]()
{
return this->moPenDeleteGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,49 @@
/*
* 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/mopen/model/MoPenAddGroupMemberRequest.h>
using AlibabaCloud::MoPen::Model::MoPenAddGroupMemberRequest;
MoPenAddGroupMemberRequest::MoPenAddGroupMemberRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenAddGroupMember")
{}
MoPenAddGroupMemberRequest::~MoPenAddGroupMemberRequest()
{}
std::string MoPenAddGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void MoPenAddGroupMemberRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string MoPenAddGroupMemberRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenAddGroupMemberRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenAddGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenAddGroupMemberResult::MoPenAddGroupMemberResult() :
ServiceResult()
{}
MoPenAddGroupMemberResult::MoPenAddGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenAddGroupMemberResult::~MoPenAddGroupMemberResult()
{}
void MoPenAddGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenAddGroupMemberResult::getDescription()const
{
return description_;
}
std::string MoPenAddGroupMemberResult::getMessage()const
{
return message_;
}
std::string MoPenAddGroupMemberResult::getCode()const
{
return code_;
}
bool MoPenAddGroupMemberResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/mopen/model/MoPenBindIsvRequest.h>
using AlibabaCloud::MoPen::Model::MoPenBindIsvRequest;
MoPenBindIsvRequest::MoPenBindIsvRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenBindIsv")
{}
MoPenBindIsvRequest::~MoPenBindIsvRequest()
{}
std::string MoPenBindIsvRequest::getOrderKey()const
{
return orderKey_;
}
void MoPenBindIsvRequest::setOrderKey(const std::string& orderKey)
{
orderKey_ = orderKey;
setParameter("OrderKey", orderKey);
}
std::string MoPenBindIsvRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenBindIsvRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenBindIsvResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenBindIsvResult::MoPenBindIsvResult() :
ServiceResult()
{}
MoPenBindIsvResult::MoPenBindIsvResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenBindIsvResult::~MoPenBindIsvResult()
{}
void MoPenBindIsvResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenBindIsvResult::getDescription()const
{
return description_;
}
std::string MoPenBindIsvResult::getMessage()const
{
return message_;
}
bool MoPenBindIsvResult::getCode()const
{
return code_;
}
bool MoPenBindIsvResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/mopen/model/MoPenCreateDeviceRequest.h>
using AlibabaCloud::MoPen::Model::MoPenCreateDeviceRequest;
MoPenCreateDeviceRequest::MoPenCreateDeviceRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenCreateDevice")
{}
MoPenCreateDeviceRequest::~MoPenCreateDeviceRequest()
{}
std::string MoPenCreateDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenCreateDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
int MoPenCreateDeviceRequest::getDeviceType()const
{
return deviceType_;
}
void MoPenCreateDeviceRequest::setDeviceType(int deviceType)
{
deviceType_ = deviceType;
setParameter("DeviceType", std::to_string(deviceType));
}

View File

@@ -0,0 +1,85 @@
/*
* 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/mopen/model/MoPenCreateDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenCreateDeviceResult::MoPenCreateDeviceResult() :
ServiceResult()
{}
MoPenCreateDeviceResult::MoPenCreateDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenCreateDeviceResult::~MoPenCreateDeviceResult()
{}
void MoPenCreateDeviceResult::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["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["Product"].isNull())
data_.product = dataNode["Product"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenCreateDeviceResult::getDescription()const
{
return description_;
}
std::string MoPenCreateDeviceResult::getMessage()const
{
return message_;
}
MoPenCreateDeviceResult::Data MoPenCreateDeviceResult::getData()const
{
return data_;
}
bool MoPenCreateDeviceResult::getCode()const
{
return code_;
}
bool MoPenCreateDeviceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/mopen/model/MoPenDeleteGroupMemberRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDeleteGroupMemberRequest;
MoPenDeleteGroupMemberRequest::MoPenDeleteGroupMemberRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDeleteGroupMember")
{}
MoPenDeleteGroupMemberRequest::~MoPenDeleteGroupMemberRequest()
{}
long MoPenDeleteGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void MoPenDeleteGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string MoPenDeleteGroupMemberRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenDeleteGroupMemberRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenDeleteGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDeleteGroupMemberResult::MoPenDeleteGroupMemberResult() :
ServiceResult()
{}
MoPenDeleteGroupMemberResult::MoPenDeleteGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDeleteGroupMemberResult::~MoPenDeleteGroupMemberResult()
{}
void MoPenDeleteGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenDeleteGroupMemberResult::getDescription()const
{
return description_;
}
std::string MoPenDeleteGroupMemberResult::getMessage()const
{
return message_;
}
std::string MoPenDeleteGroupMemberResult::getCode()const
{
return code_;
}
bool MoPenDeleteGroupMemberResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* 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/mopen/model/MoPenDeleteGroupRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDeleteGroupRequest;
MoPenDeleteGroupRequest::MoPenDeleteGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDeleteGroup")
{}
MoPenDeleteGroupRequest::~MoPenDeleteGroupRequest()
{}
std::string MoPenDeleteGroupRequest::getGroupId()const
{
return groupId_;
}
void MoPenDeleteGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenDeleteGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDeleteGroupResult::MoPenDeleteGroupResult() :
ServiceResult()
{}
MoPenDeleteGroupResult::MoPenDeleteGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDeleteGroupResult::~MoPenDeleteGroupResult()
{}
void MoPenDeleteGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenDeleteGroupResult::getDescription()const
{
return description_;
}
std::string MoPenDeleteGroupResult::getMessage()const
{
return message_;
}
std::string MoPenDeleteGroupResult::getCode()const
{
return code_;
}
bool MoPenDeleteGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,104 @@
/*
* 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/mopen/model/MoPenDoRecognizeRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDoRecognizeRequest;
MoPenDoRecognizeRequest::MoPenDoRecognizeRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDoRecognize")
{}
MoPenDoRecognizeRequest::~MoPenDoRecognizeRequest()
{}
long MoPenDoRecognizeRequest::getCanvasId()const
{
return canvasId_;
}
void MoPenDoRecognizeRequest::setCanvasId(long canvasId)
{
canvasId_ = canvasId;
setParameter("CanvasId", std::to_string(canvasId));
}
int MoPenDoRecognizeRequest::getEndY()const
{
return endY_;
}
void MoPenDoRecognizeRequest::setEndY(int endY)
{
endY_ = endY;
setParameter("EndY", std::to_string(endY));
}
int MoPenDoRecognizeRequest::getEndX()const
{
return endX_;
}
void MoPenDoRecognizeRequest::setEndX(int endX)
{
endX_ = endX;
setParameter("EndX", std::to_string(endX));
}
std::string MoPenDoRecognizeRequest::getJsonConf()const
{
return jsonConf_;
}
void MoPenDoRecognizeRequest::setJsonConf(const std::string& jsonConf)
{
jsonConf_ = jsonConf;
setParameter("JsonConf", jsonConf);
}
std::string MoPenDoRecognizeRequest::getExportType()const
{
return exportType_;
}
void MoPenDoRecognizeRequest::setExportType(const std::string& exportType)
{
exportType_ = exportType;
setParameter("ExportType", exportType);
}
int MoPenDoRecognizeRequest::getStartY()const
{
return startY_;
}
void MoPenDoRecognizeRequest::setStartY(int startY)
{
startY_ = startY;
setParameter("StartY", std::to_string(startY));
}
int MoPenDoRecognizeRequest::getStartX()const
{
return startX_;
}
void MoPenDoRecognizeRequest::setStartX(int startX)
{
startX_ = startX;
setParameter("StartX", std::to_string(startX));
}

View File

@@ -0,0 +1,85 @@
/*
* 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/mopen/model/MoPenDoRecognizeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDoRecognizeResult::MoPenDoRecognizeResult() :
ServiceResult()
{}
MoPenDoRecognizeResult::MoPenDoRecognizeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDoRecognizeResult::~MoPenDoRecognizeResult()
{}
void MoPenDoRecognizeResult::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["Result"].isNull())
data_.result = dataNode["Result"].asString();
if(!dataNode["ResultType"].isNull())
data_.resultType = dataNode["ResultType"].asString();
if(!dataNode["CanvasId"].isNull())
data_.canvasId = std::stol(dataNode["CanvasId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenDoRecognizeResult::getDescription()const
{
return description_;
}
std::string MoPenDoRecognizeResult::getMessage()const
{
return message_;
}
MoPenDoRecognizeResult::Data MoPenDoRecognizeResult::getData()const
{
return data_;
}
std::string MoPenDoRecognizeResult::getCode()const
{
return code_;
}
bool MoPenDoRecognizeResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* 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/mopen/model/MoPenFindGroupRequest.h>
using AlibabaCloud::MoPen::Model::MoPenFindGroupRequest;
MoPenFindGroupRequest::MoPenFindGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenFindGroup")
{}
MoPenFindGroupRequest::~MoPenFindGroupRequest()
{}
std::string MoPenFindGroupRequest::getCreator()const
{
return creator_;
}
void MoPenFindGroupRequest::setCreator(const std::string& creator)
{
creator_ = creator;
setParameter("Creator", creator);
}

View File

@@ -0,0 +1,83 @@
/*
* 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/mopen/model/MoPenFindGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenFindGroupResult::MoPenFindGroupResult() :
ServiceResult()
{}
MoPenFindGroupResult::MoPenFindGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenFindGroupResult::~MoPenFindGroupResult()
{}
void MoPenFindGroupResult::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["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!dataNode["Creator"].isNull())
data_.creator = dataNode["Creator"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenFindGroupResult::getDescription()const
{
return description_;
}
std::string MoPenFindGroupResult::getMessage()const
{
return message_;
}
MoPenFindGroupResult::Data MoPenFindGroupResult::getData()const
{
return data_;
}
int MoPenFindGroupResult::getCode()const
{
return code_;
}
std::string MoPenFindGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/mopen/model/MoPenQueryCanvasRequest.h>
using AlibabaCloud::MoPen::Model::MoPenQueryCanvasRequest;
MoPenQueryCanvasRequest::MoPenQueryCanvasRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenQueryCanvas")
{}
MoPenQueryCanvasRequest::~MoPenQueryCanvasRequest()
{}
std::string MoPenQueryCanvasRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenQueryCanvasRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string MoPenQueryCanvasRequest::getSessionId()const
{
return sessionId_;
}
void MoPenQueryCanvasRequest::setSessionId(const std::string& sessionId)
{
sessionId_ = sessionId;
setParameter("SessionId", sessionId);
}
int MoPenQueryCanvasRequest::getPageId()const
{
return pageId_;
}
void MoPenQueryCanvasRequest::setPageId(int pageId)
{
pageId_ = pageId;
setParameter("PageId", std::to_string(pageId));
}
int MoPenQueryCanvasRequest::getStatus()const
{
return status_;
}
void MoPenQueryCanvasRequest::setStatus(int status)
{
status_ = status;
setParameter("Status", std::to_string(status));
}

View File

@@ -0,0 +1,103 @@
/*
* 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/mopen/model/MoPenQueryCanvasResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenQueryCanvasResult::MoPenQueryCanvasResult() :
ServiceResult()
{}
MoPenQueryCanvasResult::MoPenQueryCanvasResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenQueryCanvasResult::~MoPenQueryCanvasResult()
{}
void MoPenQueryCanvasResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allCanvasList = value["CanvasList"]["Canvas"];
for (auto value : allCanvasList)
{
Data::Canvas canvasObject;
if(!value["Id"].isNull())
canvasObject.id = std::stol(value["Id"].asString());
if(!value["DeviceName"].isNull())
canvasObject.deviceName = value["DeviceName"].asString();
if(!value["Url"].isNull())
canvasObject.url = value["Url"].asString();
if(!value["PageId"].isNull())
canvasObject.pageId = std::stoi(value["PageId"].asString());
if(!value["SessionId"].isNull())
canvasObject.sessionId = value["SessionId"].asString();
if(!value["CreateTime"].isNull())
canvasObject.createTime = value["CreateTime"].asString();
if(!value["LastModified"].isNull())
canvasObject.lastModified = value["LastModified"].asString();
if(!value["Status"].isNull())
canvasObject.status = std::stoi(value["Status"].asString());
if(!value["Attribute"].isNull())
canvasObject.attribute = value["Attribute"].asString();
data_.canvasList.push_back(canvasObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenQueryCanvasResult::getDescription()const
{
return description_;
}
std::string MoPenQueryCanvasResult::getMessage()const
{
return message_;
}
MoPenQueryCanvasResult::Data MoPenQueryCanvasResult::getData()const
{
return data_;
}
std::string MoPenQueryCanvasResult::getCode()const
{
return code_;
}
bool MoPenQueryCanvasResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/mopen/model/MoPenSendMqttMessageRequest.h>
using AlibabaCloud::MoPen::Model::MoPenSendMqttMessageRequest;
MoPenSendMqttMessageRequest::MoPenSendMqttMessageRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenSendMqttMessage")
{}
MoPenSendMqttMessageRequest::~MoPenSendMqttMessageRequest()
{}
std::string MoPenSendMqttMessageRequest::getPayload()const
{
return payload_;
}
void MoPenSendMqttMessageRequest::setPayload(const std::string& payload)
{
payload_ = payload;
setParameter("Payload", payload);
}
std::string MoPenSendMqttMessageRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenSendMqttMessageRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenSendMqttMessageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenSendMqttMessageResult::MoPenSendMqttMessageResult() :
ServiceResult()
{}
MoPenSendMqttMessageResult::MoPenSendMqttMessageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenSendMqttMessageResult::~MoPenSendMqttMessageResult()
{}
void MoPenSendMqttMessageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenSendMqttMessageResult::getDescription()const
{
return description_;
}
std::string MoPenSendMqttMessageResult::getMessage()const
{
return message_;
}
std::string MoPenSendMqttMessageResult::getCode()const
{
return code_;
}
bool MoPenSendMqttMessageResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* 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/mopen/model/MopenCreateGroupRequest.h>
using AlibabaCloud::MoPen::Model::MopenCreateGroupRequest;
MopenCreateGroupRequest::MopenCreateGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MopenCreateGroup")
{}
MopenCreateGroupRequest::~MopenCreateGroupRequest()
{}
std::string MopenCreateGroupRequest::getCreator()const
{
return creator_;
}
void MopenCreateGroupRequest::setCreator(const std::string& creator)
{
creator_ = creator;
setParameter("Creator", creator);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/mopen/model/MopenCreateGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MopenCreateGroupResult::MopenCreateGroupResult() :
ServiceResult()
{}
MopenCreateGroupResult::MopenCreateGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MopenCreateGroupResult::~MopenCreateGroupResult()
{}
void MopenCreateGroupResult::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["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["ResqusetId"].isNull())
resqusetId_ = value["ResqusetId"].asString();
}
std::string MopenCreateGroupResult::getResqusetId()const
{
return resqusetId_;
}
std::string MopenCreateGroupResult::getDescription()const
{
return description_;
}
std::string MopenCreateGroupResult::getMessage()const
{
return message_;
}
MopenCreateGroupResult::Data MopenCreateGroupResult::getData()const
{
return data_;
}
int MopenCreateGroupResult::getCode()const
{
return code_;
}
std::string MopenCreateGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -55,6 +55,8 @@ set(rtc_public_header_model
include/alibabacloud/rtc/model/DescribeRealTimeRecordListResult.h
include/alibabacloud/rtc/model/StopAppRequest.h
include/alibabacloud/rtc/model/StopAppResult.h
include/alibabacloud/rtc/model/RemoveTerminalsRequest.h
include/alibabacloud/rtc/model/RemoveTerminalsResult.h
include/alibabacloud/rtc/model/DeleteConferenceRequest.h
include/alibabacloud/rtc/model/DeleteConferenceResult.h
include/alibabacloud/rtc/model/UpdateChannelRequest.h
@@ -100,6 +102,8 @@ set(rtc_src
src/model/DescribeRealTimeRecordListResult.cc
src/model/StopAppRequest.cc
src/model/StopAppResult.cc
src/model/RemoveTerminalsRequest.cc
src/model/RemoveTerminalsResult.cc
src/model/DeleteConferenceRequest.cc
src/model/DeleteConferenceResult.cc
src/model/UpdateChannelRequest.cc

View File

@@ -56,6 +56,8 @@
#include "model/DescribeRealTimeRecordListResult.h"
#include "model/StopAppRequest.h"
#include "model/StopAppResult.h"
#include "model/RemoveTerminalsRequest.h"
#include "model/RemoveTerminalsResult.h"
#include "model/DeleteConferenceRequest.h"
#include "model/DeleteConferenceResult.h"
#include "model/UpdateChannelRequest.h"
@@ -124,6 +126,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::StopAppResult> StopAppOutcome;
typedef std::future<StopAppOutcome> StopAppOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::StopAppRequest&, const StopAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopAppAsyncHandler;
typedef Outcome<Error, Model::RemoveTerminalsResult> RemoveTerminalsOutcome;
typedef std::future<RemoveTerminalsOutcome> RemoveTerminalsOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::RemoveTerminalsRequest&, const RemoveTerminalsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RemoveTerminalsAsyncHandler;
typedef Outcome<Error, Model::DeleteConferenceResult> DeleteConferenceOutcome;
typedef std::future<DeleteConferenceOutcome> DeleteConferenceOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::DeleteConferenceRequest&, const DeleteConferenceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteConferenceAsyncHandler;
@@ -192,6 +197,9 @@ namespace AlibabaCloud
StopAppOutcome stopApp(const Model::StopAppRequest &request)const;
void stopAppAsync(const Model::StopAppRequest& request, const StopAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopAppOutcomeCallable stopAppCallable(const Model::StopAppRequest& request) const;
RemoveTerminalsOutcome removeTerminals(const Model::RemoveTerminalsRequest &request)const;
void removeTerminalsAsync(const Model::RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RemoveTerminalsOutcomeCallable removeTerminalsCallable(const Model::RemoveTerminalsRequest& request) const;
DeleteConferenceOutcome deleteConference(const Model::DeleteConferenceRequest &request)const;
void deleteConferenceAsync(const Model::DeleteConferenceRequest& request, const DeleteConferenceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteConferenceOutcomeCallable deleteConferenceCallable(const Model::DeleteConferenceRequest& request) const;

View File

@@ -0,0 +1,117 @@
/*
* 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_RTC_MODEL_REMOVETERMINALSREQUEST_H_
#define ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/rtc/RtcExport.h>
namespace AlibabaCloud
{
namespace Rtc
{
namespace Model
{
class ALIBABACLOUD_RTC_EXPORT RemoveTerminalsRequest : public RpcServiceRequest
{
public:
RemoveTerminalsRequest();
~RemoveTerminalsRequest();
long getCallerParentId()const;
void setCallerParentId(long callerParentId);
bool getProxy_original_security_transport()const;
void setProxy_original_security_transport(bool proxy_original_security_transport);
std::string getProxy_original_source_ip()const;
void setProxy_original_source_ip(const std::string& proxy_original_source_ip);
std::string getOwnerIdLoginEmail()const;
void setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail);
std::string getCallerType()const;
void setCallerType(const std::string& callerType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getRequestContent()const;
void setRequestContent(const std::string& requestContent);
std::string getCallerBidEmail()const;
void setCallerBidEmail(const std::string& callerBidEmail);
std::vector<std::string> getTerminalIds()const;
void setTerminalIds(const std::vector<std::string>& terminalIds);
std::string getCallerUidEmail()const;
void setCallerUidEmail(const std::string& callerUidEmail);
long getCallerUid()const;
void setCallerUid(long callerUid);
std::string getApp_ip()const;
void setApp_ip(const std::string& app_ip);
std::string getPopProduct()const;
void setPopProduct(const std::string& popProduct);
std::string getProduct()const;
void setProduct(const std::string& product);
std::string getCallerBid()const;
void setCallerBid(const std::string& callerBid);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getVersion()const;
void setVersion(const std::string& version);
bool getProxy_trust_transport_info()const;
void setProxy_trust_transport_info(bool proxy_trust_transport_info);
bool getAk_mfa_present()const;
void setAk_mfa_present(bool ak_mfa_present);
bool getSecurity_transport()const;
void setSecurity_transport(bool security_transport);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
std::string getAppId()const;
void setAppId(const std::string& appId);
std::string getChannelId()const;
void setChannelId(const std::string& channelId);
private:
long callerParentId_;
bool proxy_original_security_transport_;
std::string proxy_original_source_ip_;
std::string ownerIdLoginEmail_;
std::string callerType_;
std::string accessKeyId_;
std::string securityToken_;
std::string requestContent_;
std::string callerBidEmail_;
std::vector<std::string> terminalIds_;
std::string callerUidEmail_;
long callerUid_;
std::string app_ip_;
std::string popProduct_;
std::string product_;
std::string callerBid_;
long ownerId_;
std::string version_;
bool proxy_trust_transport_info_;
bool ak_mfa_present_;
bool security_transport_;
std::string requestId_;
std::string appId_;
std::string channelId_;
};
}
}
}
#endif // !ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_RTC_MODEL_REMOVETERMINALSRESULT_H_
#define ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/rtc/RtcExport.h>
namespace AlibabaCloud
{
namespace Rtc
{
namespace Model
{
class ALIBABACLOUD_RTC_EXPORT RemoveTerminalsResult : public ServiceResult
{
public:
struct Terminal
{
std::string message;
std::string id;
int code;
};
RemoveTerminalsResult();
explicit RemoveTerminalsResult(const std::string &payload);
~RemoveTerminalsResult();
std::vector<Terminal> getTerminals()const;
protected:
void parse(const std::string &payload);
private:
std::vector<Terminal> terminals_;
};
}
}
}
#endif // !ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSRESULT_H_

View File

@@ -663,6 +663,42 @@ RtcClient::StopAppOutcomeCallable RtcClient::stopAppCallable(const StopAppReques
return task->get_future();
}
RtcClient::RemoveTerminalsOutcome RtcClient::removeTerminals(const RemoveTerminalsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RemoveTerminalsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RemoveTerminalsOutcome(RemoveTerminalsResult(outcome.result()));
else
return RemoveTerminalsOutcome(outcome.error());
}
void RtcClient::removeTerminalsAsync(const RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, removeTerminals(request), context);
};
asyncExecute(new Runnable(fn));
}
RtcClient::RemoveTerminalsOutcomeCallable RtcClient::removeTerminalsCallable(const RemoveTerminalsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RemoveTerminalsOutcome()>>(
[this, request]()
{
return this->removeTerminals(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RtcClient::DeleteConferenceOutcome RtcClient::deleteConference(const DeleteConferenceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,292 @@
/*
* 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/rtc/model/RemoveTerminalsRequest.h>
using AlibabaCloud::Rtc::Model::RemoveTerminalsRequest;
RemoveTerminalsRequest::RemoveTerminalsRequest() :
RpcServiceRequest("rtc", "2018-01-11", "RemoveTerminals")
{}
RemoveTerminalsRequest::~RemoveTerminalsRequest()
{}
long RemoveTerminalsRequest::getCallerParentId()const
{
return callerParentId_;
}
void RemoveTerminalsRequest::setCallerParentId(long callerParentId)
{
callerParentId_ = callerParentId;
setParameter("CallerParentId", std::to_string(callerParentId));
}
bool RemoveTerminalsRequest::getProxy_original_security_transport()const
{
return proxy_original_security_transport_;
}
void RemoveTerminalsRequest::setProxy_original_security_transport(bool proxy_original_security_transport)
{
proxy_original_security_transport_ = proxy_original_security_transport;
setParameter("Proxy_original_security_transport", std::to_string(proxy_original_security_transport));
}
std::string RemoveTerminalsRequest::getProxy_original_source_ip()const
{
return proxy_original_source_ip_;
}
void RemoveTerminalsRequest::setProxy_original_source_ip(const std::string& proxy_original_source_ip)
{
proxy_original_source_ip_ = proxy_original_source_ip;
setParameter("Proxy_original_source_ip", proxy_original_source_ip);
}
std::string RemoveTerminalsRequest::getOwnerIdLoginEmail()const
{
return ownerIdLoginEmail_;
}
void RemoveTerminalsRequest::setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail)
{
ownerIdLoginEmail_ = ownerIdLoginEmail;
setParameter("OwnerIdLoginEmail", ownerIdLoginEmail);
}
std::string RemoveTerminalsRequest::getCallerType()const
{
return callerType_;
}
void RemoveTerminalsRequest::setCallerType(const std::string& callerType)
{
callerType_ = callerType;
setParameter("CallerType", callerType);
}
std::string RemoveTerminalsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RemoveTerminalsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string RemoveTerminalsRequest::getSecurityToken()const
{
return securityToken_;
}
void RemoveTerminalsRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string RemoveTerminalsRequest::getRequestContent()const
{
return requestContent_;
}
void RemoveTerminalsRequest::setRequestContent(const std::string& requestContent)
{
requestContent_ = requestContent;
setParameter("RequestContent", requestContent);
}
std::string RemoveTerminalsRequest::getCallerBidEmail()const
{
return callerBidEmail_;
}
void RemoveTerminalsRequest::setCallerBidEmail(const std::string& callerBidEmail)
{
callerBidEmail_ = callerBidEmail;
setParameter("CallerBidEmail", callerBidEmail);
}
std::vector<std::string> RemoveTerminalsRequest::getTerminalIds()const
{
return terminalIds_;
}
void RemoveTerminalsRequest::setTerminalIds(const std::vector<std::string>& terminalIds)
{
terminalIds_ = terminalIds;
for(int i = 0; i!= terminalIds.size(); i++)
setParameter("TerminalIds."+ std::to_string(i), terminalIds.at(i));
}
std::string RemoveTerminalsRequest::getCallerUidEmail()const
{
return callerUidEmail_;
}
void RemoveTerminalsRequest::setCallerUidEmail(const std::string& callerUidEmail)
{
callerUidEmail_ = callerUidEmail;
setParameter("CallerUidEmail", callerUidEmail);
}
long RemoveTerminalsRequest::getCallerUid()const
{
return callerUid_;
}
void RemoveTerminalsRequest::setCallerUid(long callerUid)
{
callerUid_ = callerUid;
setParameter("CallerUid", std::to_string(callerUid));
}
std::string RemoveTerminalsRequest::getApp_ip()const
{
return app_ip_;
}
void RemoveTerminalsRequest::setApp_ip(const std::string& app_ip)
{
app_ip_ = app_ip;
setParameter("App_ip", app_ip);
}
std::string RemoveTerminalsRequest::getPopProduct()const
{
return popProduct_;
}
void RemoveTerminalsRequest::setPopProduct(const std::string& popProduct)
{
popProduct_ = popProduct;
setParameter("PopProduct", popProduct);
}
std::string RemoveTerminalsRequest::getProduct()const
{
return product_;
}
void RemoveTerminalsRequest::setProduct(const std::string& product)
{
product_ = product;
setParameter("Product", product);
}
std::string RemoveTerminalsRequest::getCallerBid()const
{
return callerBid_;
}
void RemoveTerminalsRequest::setCallerBid(const std::string& callerBid)
{
callerBid_ = callerBid;
setParameter("CallerBid", callerBid);
}
long RemoveTerminalsRequest::getOwnerId()const
{
return ownerId_;
}
void RemoveTerminalsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string RemoveTerminalsRequest::getVersion()const
{
return version_;
}
void RemoveTerminalsRequest::setVersion(const std::string& version)
{
version_ = version;
setParameter("Version", version);
}
bool RemoveTerminalsRequest::getProxy_trust_transport_info()const
{
return proxy_trust_transport_info_;
}
void RemoveTerminalsRequest::setProxy_trust_transport_info(bool proxy_trust_transport_info)
{
proxy_trust_transport_info_ = proxy_trust_transport_info;
setParameter("Proxy_trust_transport_info", std::to_string(proxy_trust_transport_info));
}
bool RemoveTerminalsRequest::getAk_mfa_present()const
{
return ak_mfa_present_;
}
void RemoveTerminalsRequest::setAk_mfa_present(bool ak_mfa_present)
{
ak_mfa_present_ = ak_mfa_present;
setParameter("Ak_mfa_present", std::to_string(ak_mfa_present));
}
bool RemoveTerminalsRequest::getSecurity_transport()const
{
return security_transport_;
}
void RemoveTerminalsRequest::setSecurity_transport(bool security_transport)
{
security_transport_ = security_transport;
setParameter("Security_transport", std::to_string(security_transport));
}
std::string RemoveTerminalsRequest::getRequestId()const
{
return requestId_;
}
void RemoveTerminalsRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
std::string RemoveTerminalsRequest::getAppId()const
{
return appId_;
}
void RemoveTerminalsRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}
std::string RemoveTerminalsRequest::getChannelId()const
{
return channelId_;
}
void RemoveTerminalsRequest::setChannelId(const std::string& channelId)
{
channelId_ = channelId;
setParameter("ChannelId", channelId);
}

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/rtc/model/RemoveTerminalsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Rtc;
using namespace AlibabaCloud::Rtc::Model;
RemoveTerminalsResult::RemoveTerminalsResult() :
ServiceResult()
{}
RemoveTerminalsResult::RemoveTerminalsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RemoveTerminalsResult::~RemoveTerminalsResult()
{}
void RemoveTerminalsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTerminals = value["Terminals"]["Terminal"];
for (auto value : allTerminals)
{
Terminal terminalsObject;
if(!value["Id"].isNull())
terminalsObject.id = value["Id"].asString();
if(!value["Code"].isNull())
terminalsObject.code = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
terminalsObject.message = value["Message"].asString();
terminals_.push_back(terminalsObject);
}
}
std::vector<RemoveTerminalsResult::Terminal> RemoveTerminalsResult::getTerminals()const
{
return terminals_;
}

View File

@@ -0,0 +1,94 @@
#
# 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(teslastream_public_header
include/alibabacloud/teslastream/TeslaStreamClient.h
include/alibabacloud/teslastream/TeslaStreamExport.h )
set(teslastream_public_header_model
include/alibabacloud/teslastream/model/GetJobTopologyRequest.h
include/alibabacloud/teslastream/model/GetJobTopologyResult.h
include/alibabacloud/teslastream/model/BatchGetJobMetricInfoRequest.h
include/alibabacloud/teslastream/model/BatchGetJobMetricInfoResult.h
include/alibabacloud/teslastream/model/BatchGetPluginConfigInfoRequest.h
include/alibabacloud/teslastream/model/BatchGetPluginConfigInfoResult.h )
set(teslastream_src
src/TeslaStreamClient.cc
src/model/GetJobTopologyRequest.cc
src/model/GetJobTopologyResult.cc
src/model/BatchGetJobMetricInfoRequest.cc
src/model/BatchGetJobMetricInfoResult.cc
src/model/BatchGetPluginConfigInfoRequest.cc
src/model/BatchGetPluginConfigInfoResult.cc )
add_library(teslastream ${LIB_TYPE}
${teslastream_public_header}
${teslastream_public_header_model}
${teslastream_src})
set_target_properties(teslastream
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}teslastream
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(teslastream
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_TESLASTREAM_LIBRARY)
endif()
target_include_directories(teslastream
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(teslastream
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(teslastream
jsoncpp)
target_include_directories(teslastream
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(teslastream
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(teslastream
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(teslastream
PRIVATE /usr/include/jsoncpp)
target_link_libraries(teslastream
jsoncpp)
endif()
install(FILES ${teslastream_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/teslastream)
install(FILES ${teslastream_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/teslastream/model)
install(TARGETS teslastream
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,70 @@
/*
* 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_TESLASTREAM_TESLASTREAMCLIENT_H_
#define ALIBABACLOUD_TESLASTREAM_TESLASTREAMCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "TeslaStreamExport.h"
#include "model/GetJobTopologyRequest.h"
#include "model/GetJobTopologyResult.h"
#include "model/BatchGetJobMetricInfoRequest.h"
#include "model/BatchGetJobMetricInfoResult.h"
#include "model/BatchGetPluginConfigInfoRequest.h"
#include "model/BatchGetPluginConfigInfoResult.h"
namespace AlibabaCloud
{
namespace TeslaStream
{
class ALIBABACLOUD_TESLASTREAM_EXPORT TeslaStreamClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GetJobTopologyResult> GetJobTopologyOutcome;
typedef std::future<GetJobTopologyOutcome> GetJobTopologyOutcomeCallable;
typedef std::function<void(const TeslaStreamClient*, const Model::GetJobTopologyRequest&, const GetJobTopologyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobTopologyAsyncHandler;
typedef Outcome<Error, Model::BatchGetJobMetricInfoResult> BatchGetJobMetricInfoOutcome;
typedef std::future<BatchGetJobMetricInfoOutcome> BatchGetJobMetricInfoOutcomeCallable;
typedef std::function<void(const TeslaStreamClient*, const Model::BatchGetJobMetricInfoRequest&, const BatchGetJobMetricInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchGetJobMetricInfoAsyncHandler;
typedef Outcome<Error, Model::BatchGetPluginConfigInfoResult> BatchGetPluginConfigInfoOutcome;
typedef std::future<BatchGetPluginConfigInfoOutcome> BatchGetPluginConfigInfoOutcomeCallable;
typedef std::function<void(const TeslaStreamClient*, const Model::BatchGetPluginConfigInfoRequest&, const BatchGetPluginConfigInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchGetPluginConfigInfoAsyncHandler;
TeslaStreamClient(const Credentials &credentials, const ClientConfiguration &configuration);
TeslaStreamClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
TeslaStreamClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~TeslaStreamClient();
GetJobTopologyOutcome getJobTopology(const Model::GetJobTopologyRequest &request)const;
void getJobTopologyAsync(const Model::GetJobTopologyRequest& request, const GetJobTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetJobTopologyOutcomeCallable getJobTopologyCallable(const Model::GetJobTopologyRequest& request) const;
BatchGetJobMetricInfoOutcome batchGetJobMetricInfo(const Model::BatchGetJobMetricInfoRequest &request)const;
void batchGetJobMetricInfoAsync(const Model::BatchGetJobMetricInfoRequest& request, const BatchGetJobMetricInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BatchGetJobMetricInfoOutcomeCallable batchGetJobMetricInfoCallable(const Model::BatchGetJobMetricInfoRequest& request) const;
BatchGetPluginConfigInfoOutcome batchGetPluginConfigInfo(const Model::BatchGetPluginConfigInfoRequest &request)const;
void batchGetPluginConfigInfoAsync(const Model::BatchGetPluginConfigInfoRequest& request, const BatchGetPluginConfigInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BatchGetPluginConfigInfoOutcomeCallable batchGetPluginConfigInfoCallable(const Model::BatchGetPluginConfigInfoRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_TESLASTREAMCLIENT_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_TESLASTREAM_TESLASTREAMEXPORT_H_
#define ALIBABACLOUD_TESLASTREAM_TESLASTREAMEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_TESLASTREAM_LIBRARY)
# define ALIBABACLOUD_TESLASTREAM_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_TESLASTREAM_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_TESLASTREAM_EXPORT
#endif
#endif // !ALIBABACLOUD_TESLASTREAM_TESLASTREAMEXPORT_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_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFOREQUEST_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT BatchGetJobMetricInfoRequest : public RpcServiceRequest
{
public:
BatchGetJobMetricInfoRequest();
~BatchGetJobMetricInfoRequest();
std::string getJobInfos()const;
void setJobInfos(const std::string& jobInfos);
private:
std::string jobInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFOREQUEST_H_

View File

@@ -0,0 +1,68 @@
/*
* 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_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFORESULT_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT BatchGetJobMetricInfoResult : public ServiceResult
{
public:
struct Job
{
int tpsOut;
float memUsed;
int memRequest;
std::string priority;
int tpsIn;
float cpuUsed;
std::string jobUniqKey;
int cpuRequest;
int delay;
std::string nickname;
};
BatchGetJobMetricInfoResult();
explicit BatchGetJobMetricInfoResult(const std::string &payload);
~BatchGetJobMetricInfoResult();
std::string getMessage()const;
std::vector<Job> getData()const;
int getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<Job> data_;
int code_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETJOBMETRICINFORESULT_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_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFOREQUEST_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT BatchGetPluginConfigInfoRequest : public RpcServiceRequest
{
public:
BatchGetPluginConfigInfoRequest();
~BatchGetPluginConfigInfoRequest();
std::string getPluginInfos()const;
void setPluginInfos(const std::string& pluginInfos);
private:
std::string pluginInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFOREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* 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_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFORESULT_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT BatchGetPluginConfigInfoResult : public ServiceResult
{
public:
struct Plugin
{
std::string pluginUniqKey;
std::string pluginProperties;
};
BatchGetPluginConfigInfoResult();
explicit BatchGetPluginConfigInfoResult(const std::string &payload);
~BatchGetPluginConfigInfoResult();
std::string getMessage()const;
std::vector<Plugin> getData()const;
int getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<Plugin> data_;
int code_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_BATCHGETPLUGINCONFIGINFORESULT_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_TESLASTREAM_MODEL_GETJOBTOPOLOGYREQUEST_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_GETJOBTOPOLOGYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT GetJobTopologyRequest : public RpcServiceRequest
{
public:
GetJobTopologyRequest();
~GetJobTopologyRequest();
std::string getJobName()const;
void setJobName(const std::string& jobName);
private:
std::string jobName_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_GETJOBTOPOLOGYREQUEST_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_TESLASTREAM_MODEL_GETJOBTOPOLOGYRESULT_H_
#define ALIBABACLOUD_TESLASTREAM_MODEL_GETJOBTOPOLOGYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/teslastream/TeslaStreamExport.h>
namespace AlibabaCloud
{
namespace TeslaStream
{
namespace Model
{
class ALIBABACLOUD_TESLASTREAM_EXPORT GetJobTopologyResult : public ServiceResult
{
public:
struct Job
{
std::string pluginRelation;
std::string type;
std::vector<std::string> parents;
std::vector<std::string> childrens;
std::string text;
};
GetJobTopologyResult();
explicit GetJobTopologyResult(const std::string &payload);
~GetJobTopologyResult();
std::string getMessage()const;
std::vector<Job> getData()const;
int getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<Job> data_;
int code_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLASTREAM_MODEL_GETJOBTOPOLOGYRESULT_H_

View File

@@ -0,0 +1,161 @@
/*
* 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/teslastream/TeslaStreamClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::TeslaStream;
using namespace AlibabaCloud::TeslaStream::Model;
namespace
{
const std::string SERVICE_NAME = "TeslaStream";
}
TeslaStreamClient::TeslaStreamClient(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, "");
}
TeslaStreamClient::TeslaStreamClient(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, "");
}
TeslaStreamClient::TeslaStreamClient(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, "");
}
TeslaStreamClient::~TeslaStreamClient()
{}
TeslaStreamClient::GetJobTopologyOutcome TeslaStreamClient::getJobTopology(const GetJobTopologyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetJobTopologyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetJobTopologyOutcome(GetJobTopologyResult(outcome.result()));
else
return GetJobTopologyOutcome(outcome.error());
}
void TeslaStreamClient::getJobTopologyAsync(const GetJobTopologyRequest& request, const GetJobTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getJobTopology(request), context);
};
asyncExecute(new Runnable(fn));
}
TeslaStreamClient::GetJobTopologyOutcomeCallable TeslaStreamClient::getJobTopologyCallable(const GetJobTopologyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetJobTopologyOutcome()>>(
[this, request]()
{
return this->getJobTopology(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
TeslaStreamClient::BatchGetJobMetricInfoOutcome TeslaStreamClient::batchGetJobMetricInfo(const BatchGetJobMetricInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BatchGetJobMetricInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BatchGetJobMetricInfoOutcome(BatchGetJobMetricInfoResult(outcome.result()));
else
return BatchGetJobMetricInfoOutcome(outcome.error());
}
void TeslaStreamClient::batchGetJobMetricInfoAsync(const BatchGetJobMetricInfoRequest& request, const BatchGetJobMetricInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, batchGetJobMetricInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
TeslaStreamClient::BatchGetJobMetricInfoOutcomeCallable TeslaStreamClient::batchGetJobMetricInfoCallable(const BatchGetJobMetricInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BatchGetJobMetricInfoOutcome()>>(
[this, request]()
{
return this->batchGetJobMetricInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
TeslaStreamClient::BatchGetPluginConfigInfoOutcome TeslaStreamClient::batchGetPluginConfigInfo(const BatchGetPluginConfigInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BatchGetPluginConfigInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BatchGetPluginConfigInfoOutcome(BatchGetPluginConfigInfoResult(outcome.result()));
else
return BatchGetPluginConfigInfoOutcome(outcome.error());
}
void TeslaStreamClient::batchGetPluginConfigInfoAsync(const BatchGetPluginConfigInfoRequest& request, const BatchGetPluginConfigInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, batchGetPluginConfigInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
TeslaStreamClient::BatchGetPluginConfigInfoOutcomeCallable TeslaStreamClient::batchGetPluginConfigInfoCallable(const BatchGetPluginConfigInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BatchGetPluginConfigInfoOutcome()>>(
[this, request]()
{
return this->batchGetPluginConfigInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,38 @@
/*
* 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/teslastream/model/BatchGetJobMetricInfoRequest.h>
using AlibabaCloud::TeslaStream::Model::BatchGetJobMetricInfoRequest;
BatchGetJobMetricInfoRequest::BatchGetJobMetricInfoRequest() :
RpcServiceRequest("teslastream", "2018-01-15", "BatchGetJobMetricInfo")
{}
BatchGetJobMetricInfoRequest::~BatchGetJobMetricInfoRequest()
{}
std::string BatchGetJobMetricInfoRequest::getJobInfos()const
{
return jobInfos_;
}
void BatchGetJobMetricInfoRequest::setJobInfos(const std::string& jobInfos)
{
jobInfos_ = jobInfos;
setParameter("JobInfos", jobInfos);
}

View File

@@ -0,0 +1,90 @@
/*
* 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/teslastream/model/BatchGetJobMetricInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::TeslaStream;
using namespace AlibabaCloud::TeslaStream::Model;
BatchGetJobMetricInfoResult::BatchGetJobMetricInfoResult() :
ServiceResult()
{}
BatchGetJobMetricInfoResult::BatchGetJobMetricInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGetJobMetricInfoResult::~BatchGetJobMetricInfoResult()
{}
void BatchGetJobMetricInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["Job"];
for (auto value : allData)
{
Job dataObject;
if(!value["Delay"].isNull())
dataObject.delay = std::stoi(value["Delay"].asString());
if(!value["TpsOut"].isNull())
dataObject.tpsOut = std::stoi(value["TpsOut"].asString());
if(!value["MemRequest"].isNull())
dataObject.memRequest = std::stoi(value["MemRequest"].asString());
if(!value["JobUniqKey"].isNull())
dataObject.jobUniqKey = value["JobUniqKey"].asString();
if(!value["MemUsed"].isNull())
dataObject.memUsed = std::stof(value["MemUsed"].asString());
if(!value["CpuUsed"].isNull())
dataObject.cpuUsed = std::stof(value["CpuUsed"].asString());
if(!value["CpuRequest"].isNull())
dataObject.cpuRequest = std::stoi(value["CpuRequest"].asString());
if(!value["Nickname"].isNull())
dataObject.nickname = value["Nickname"].asString();
if(!value["TpsIn"].isNull())
dataObject.tpsIn = std::stoi(value["TpsIn"].asString());
if(!value["Priority"].isNull())
dataObject.priority = value["Priority"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string BatchGetJobMetricInfoResult::getMessage()const
{
return message_;
}
std::vector<BatchGetJobMetricInfoResult::Job> BatchGetJobMetricInfoResult::getData()const
{
return data_;
}
int BatchGetJobMetricInfoResult::getCode()const
{
return code_;
}

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