Group, Plugin support tag authentication.

This commit is contained in:
sdk-team
2019-08-08 11:58:23 +08:00
parent 14b6a27113
commit 1f20945851
24 changed files with 278 additions and 1 deletions

View File

@@ -69,6 +69,23 @@ void CreateApiGroupRequest::setSource(const std::string& source)
setCoreParameter("Source", source);
}
std::vector<CreateApiGroupRequest::Tag> CreateApiGroupRequest::getTag()const
{
return tag_;
}
void CreateApiGroupRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
std::string CreateApiGroupRequest::getGroupName()const
{
return groupName_;

View File

@@ -52,6 +52,8 @@ void CreateApiGroupResult::parse(const std::string &payload)
instanceId_ = value["InstanceId"].asString();
if(!value["InstanceType"].isNull())
instanceType_ = value["InstanceType"].asString();
if(!value["TagStatus"].isNull())
tagStatus_ = value["TagStatus"].asString() == "true";
}
@@ -75,6 +77,11 @@ std::string CreateApiGroupResult::getInstanceId()const
return instanceId_;
}
bool CreateApiGroupResult::getTagStatus()const
{
return tagStatus_;
}
std::string CreateApiGroupResult::getInstanceType()const
{
return instanceType_;

View File

@@ -58,6 +58,23 @@ void CreateAppRequest::setDescription(const std::string& description)
setCoreParameter("Description", description);
}
std::vector<CreateAppRequest::Tag> CreateAppRequest::getTag()const
{
return tag_;
}
void CreateAppRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
std::string CreateAppRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -42,6 +42,8 @@ void CreateAppResult::parse(const std::string &payload)
setRequestId(value["RequestId"].asString());
if(!value["AppId"].isNull())
appId_ = std::stol(value["AppId"].asString());
if(!value["TagStatus"].isNull())
tagStatus_ = value["TagStatus"].asString() == "true";
}
@@ -50,3 +52,8 @@ long CreateAppResult::getAppId()const
return appId_;
}
bool CreateAppResult::getTagStatus()const
{
return tagStatus_;
}

View File

@@ -47,6 +47,23 @@ void DeleteApiGroupRequest::setGroupId(const std::string& groupId)
setCoreParameter("GroupId", groupId);
}
std::vector<DeleteApiGroupRequest::Tag> DeleteApiGroupRequest::getTag()const
{
return tag_;
}
void DeleteApiGroupRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
std::string DeleteApiGroupRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -47,6 +47,23 @@ void DescribeApiGroupRequest::setGroupId(const std::string& groupId)
setCoreParameter("GroupId", groupId);
}
std::vector<DescribeApiGroupRequest::Tag> DescribeApiGroupRequest::getTag()const
{
return tag_;
}
void DescribeApiGroupRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
std::string DescribeApiGroupRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -58,6 +58,34 @@ void DescribeApiGroupsRequest::setPageSize(int pageSize)
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::vector<DescribeApiGroupsRequest::Tag> DescribeApiGroupsRequest::getTag()const
{
return tag_;
}
void DescribeApiGroupsRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
bool DescribeApiGroupsRequest::getEnableTagAuth()const
{
return enableTagAuth_;
}
void DescribeApiGroupsRequest::setEnableTagAuth(bool enableTagAuth)
{
enableTagAuth_ = enableTagAuth;
setCoreParameter("EnableTagAuth", enableTagAuth ? "true" : "false");
}
std::string DescribeApiGroupsRequest::getGroupName()const
{
return groupName_;

View File

@@ -91,6 +91,34 @@ void DescribeApisRequest::setPageSize(int pageSize)
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::vector<DescribeApisRequest::Tag> DescribeApisRequest::getTag()const
{
return tag_;
}
void DescribeApisRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
bool DescribeApisRequest::getEnableTagAuth()const
{
return enableTagAuth_;
}
void DescribeApisRequest::setEnableTagAuth(bool enableTagAuth)
{
enableTagAuth_ = enableTagAuth;
setCoreParameter("EnableTagAuth", enableTagAuth ? "true" : "false");
}
std::string DescribeApisRequest::getApiId()const
{
return apiId_;

View File

@@ -86,6 +86,17 @@ void DescribeAppAttributesRequest::setTag(const std::vector<Tag>& tag)
}
}
bool DescribeAppAttributesRequest::getEnableTagAuth()const
{
return enableTagAuth_;
}
void DescribeAppAttributesRequest::setEnableTagAuth(bool enableTagAuth)
{
enableTagAuth_ = enableTagAuth;
setCoreParameter("EnableTagAuth", enableTagAuth ? "true" : "false");
}
int DescribeAppAttributesRequest::getPageNumber()const
{
return pageNumber_;

View File

@@ -80,6 +80,34 @@ void DescribeDeployedApisRequest::setPageSize(int pageSize)
setCoreParameter("PageSize", std::to_string(pageSize));
}
std::vector<DescribeDeployedApisRequest::Tag> DescribeDeployedApisRequest::getTag()const
{
return tag_;
}
void DescribeDeployedApisRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
bool DescribeDeployedApisRequest::getEnableTagAuth()const
{
return enableTagAuth_;
}
void DescribeDeployedApisRequest::setEnableTagAuth(bool enableTagAuth)
{
enableTagAuth_ = enableTagAuth;
setCoreParameter("EnableTagAuth", enableTagAuth ? "true" : "false");
}
std::string DescribeDeployedApisRequest::getApiId()const
{
return apiId_;

View File

@@ -58,6 +58,23 @@ void ModifyApiGroupRequest::setDescription(const std::string& description)
setCoreParameter("Description", description);
}
std::vector<ModifyApiGroupRequest::Tag> ModifyApiGroupRequest::getTag()const
{
return tag_;
}
void ModifyApiGroupRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
std::string ModifyApiGroupRequest::getGroupName()const
{
return groupName_;