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

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT CreateApiGroupRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
CreateApiGroupRequest();
@@ -43,6 +48,8 @@ namespace AlibabaCloud
void setDescription(const std::string& description);
std::string getSource()const;
void setSource(const std::string& source);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getGroupName()const;
void setGroupName(const std::string& groupName);
std::string getAccessKeyId()const;
@@ -53,6 +60,7 @@ namespace AlibabaCloud
std::string securityToken_;
std::string description_;
std::string source_;
std::vector<Tag> tag_;
std::string groupName_;
std::string accessKeyId_;

View File

@@ -41,6 +41,7 @@ namespace AlibabaCloud
std::string getSubDomain()const;
std::string getDescription()const;
std::string getInstanceId()const;
bool getTagStatus()const;
std::string getInstanceType()const;
std::string getGroupId()const;
@@ -51,6 +52,7 @@ namespace AlibabaCloud
std::string subDomain_;
std::string description_;
std::string instanceId_;
bool tagStatus_;
std::string instanceType_;
std::string groupId_;

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT CreateAppRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
CreateAppRequest();
@@ -41,6 +46,8 @@ namespace AlibabaCloud
void setSecurityToken(const std::string& securityToken);
std::string getDescription()const;
void setDescription(const std::string& description);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
@@ -48,6 +55,7 @@ namespace AlibabaCloud
std::string appName_;
std::string securityToken_;
std::string description_;
std::vector<Tag> tag_;
std::string accessKeyId_;
};

View File

@@ -38,11 +38,13 @@ namespace AlibabaCloud
explicit CreateAppResult(const std::string &payload);
~CreateAppResult();
long getAppId()const;
bool getTagStatus()const;
protected:
void parse(const std::string &payload);
private:
long appId_;
bool tagStatus_;
};
}

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT DeleteApiGroupRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
DeleteApiGroupRequest();
@@ -39,12 +44,15 @@ namespace AlibabaCloud
void setSecurityToken(const std::string& securityToken);
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string securityToken_;
std::string groupId_;
std::vector<Tag> tag_;
std::string accessKeyId_;
};

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT DescribeApiGroupRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
DescribeApiGroupRequest();
@@ -39,12 +44,15 @@ namespace AlibabaCloud
void setSecurityToken(const std::string& securityToken);
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string securityToken_;
std::string groupId_;
std::vector<Tag> tag_;
std::string accessKeyId_;
};

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT DescribeApiGroupsRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
DescribeApiGroupsRequest();
@@ -41,6 +46,10 @@ namespace AlibabaCloud
void setGroupId(const std::string& groupId);
int getPageSize()const;
void setPageSize(int pageSize);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
bool getEnableTagAuth()const;
void setEnableTagAuth(bool enableTagAuth);
std::string getGroupName()const;
void setGroupName(const std::string& groupName);
int getPageNumber()const;
@@ -52,6 +61,8 @@ namespace AlibabaCloud
std::string securityToken_;
std::string groupId_;
int pageSize_;
std::vector<Tag> tag_;
bool enableTagAuth_;
std::string groupName_;
int pageNumber_;
std::string accessKeyId_;

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT DescribeApisRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
DescribeApisRequest();
@@ -47,6 +52,10 @@ namespace AlibabaCloud
void setGroupId(const std::string& groupId);
int getPageSize()const;
void setPageSize(int pageSize);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
bool getEnableTagAuth()const;
void setEnableTagAuth(bool enableTagAuth);
std::string getApiId()const;
void setApiId(const std::string& apiId);
int getPageNumber()const;
@@ -61,6 +70,8 @@ namespace AlibabaCloud
std::string securityToken_;
std::string groupId_;
int pageSize_;
std::vector<Tag> tag_;
bool enableTagAuth_;
std::string apiId_;
int pageNumber_;
std::string accessKeyId_;

View File

@@ -50,6 +50,8 @@ namespace AlibabaCloud
void setPageSize(int pageSize);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
bool getEnableTagAuth()const;
void setEnableTagAuth(bool enableTagAuth);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getAccessKeyId()const;
@@ -61,6 +63,7 @@ namespace AlibabaCloud
long appId_;
int pageSize_;
std::vector<Tag> tag_;
bool enableTagAuth_;
int pageNumber_;
std::string accessKeyId_;

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT DescribeDeployedApisRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
DescribeDeployedApisRequest();
@@ -45,6 +50,10 @@ namespace AlibabaCloud
void setGroupId(const std::string& groupId);
int getPageSize()const;
void setPageSize(int pageSize);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
bool getEnableTagAuth()const;
void setEnableTagAuth(bool enableTagAuth);
std::string getApiId()const;
void setApiId(const std::string& apiId);
int getPageNumber()const;
@@ -58,6 +67,8 @@ namespace AlibabaCloud
std::string securityToken_;
std::string groupId_;
int pageSize_;
std::vector<Tag> tag_;
bool enableTagAuth_;
std::string apiId_;
int pageNumber_;
std::string accessKeyId_;

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_CLOUDAPI_EXPORT ModifyApiGroupRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
ModifyApiGroupRequest();
@@ -41,6 +46,8 @@ namespace AlibabaCloud
void setGroupId(const std::string& groupId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getGroupName()const;
void setGroupName(const std::string& groupName);
std::string getAccessKeyId()const;
@@ -50,6 +57,7 @@ namespace AlibabaCloud
std::string securityToken_;
std::string groupId_;
std::string description_;
std::vector<Tag> tag_;
std::string groupName_;
std::string accessKeyId_;

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_;