Supported more query conditions when searching resource group.

This commit is contained in:
sdk-team
2022-08-03 06:59:11 +00:00
parent 5e824d55da
commit fefb29dee6
59 changed files with 2136 additions and 5 deletions

View File

@@ -1527,6 +1527,42 @@ ResourceManagerClient::GetResourceGroupOutcomeCallable ResourceManagerClient::ge
return task->get_future();
}
ResourceManagerClient::GetResourceGroupListAclModeOutcome ResourceManagerClient::getResourceGroupListAclMode(const GetResourceGroupListAclModeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetResourceGroupListAclModeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetResourceGroupListAclModeOutcome(GetResourceGroupListAclModeResult(outcome.result()));
else
return GetResourceGroupListAclModeOutcome(outcome.error());
}
void ResourceManagerClient::getResourceGroupListAclModeAsync(const GetResourceGroupListAclModeRequest& request, const GetResourceGroupListAclModeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getResourceGroupListAclMode(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::GetResourceGroupListAclModeOutcomeCallable ResourceManagerClient::getResourceGroupListAclModeCallable(const GetResourceGroupListAclModeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetResourceGroupListAclModeOutcome()>>(
[this, request]()
{
return this->getResourceGroupListAclMode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::GetRoleOutcome ResourceManagerClient::getRole(const GetRoleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2247,6 +2283,114 @@ ResourceManagerClient::ListRolesOutcomeCallable ResourceManagerClient::listRoles
return task->get_future();
}
ResourceManagerClient::ListTagKeysOutcome ResourceManagerClient::listTagKeys(const ListTagKeysRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagKeysOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagKeysOutcome(ListTagKeysResult(outcome.result()));
else
return ListTagKeysOutcome(outcome.error());
}
void ResourceManagerClient::listTagKeysAsync(const ListTagKeysRequest& request, const ListTagKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTagKeys(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::ListTagKeysOutcomeCallable ResourceManagerClient::listTagKeysCallable(const ListTagKeysRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagKeysOutcome()>>(
[this, request]()
{
return this->listTagKeys(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::ListTagResourcesOutcome ResourceManagerClient::listTagResources(const ListTagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagResourcesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result()));
else
return ListTagResourcesOutcome(outcome.error());
}
void ResourceManagerClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTagResources(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::ListTagResourcesOutcomeCallable ResourceManagerClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagResourcesOutcome()>>(
[this, request]()
{
return this->listTagResources(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::ListTagValuesOutcome ResourceManagerClient::listTagValues(const ListTagValuesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagValuesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagValuesOutcome(ListTagValuesResult(outcome.result()));
else
return ListTagValuesOutcome(outcome.error());
}
void ResourceManagerClient::listTagValuesAsync(const ListTagValuesRequest& request, const ListTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTagValues(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::ListTagValuesOutcomeCallable ResourceManagerClient::listTagValuesCallable(const ListTagValuesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagValuesOutcome()>>(
[this, request]()
{
return this->listTagValues(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::ListTargetAttachmentsForControlPolicyOutcome ResourceManagerClient::listTargetAttachmentsForControlPolicy(const ListTargetAttachmentsForControlPolicyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2679,6 +2823,114 @@ ResourceManagerClient::SetDefaultPolicyVersionOutcomeCallable ResourceManagerCli
return task->get_future();
}
ResourceManagerClient::SetMemberDeletionPermissionOutcome ResourceManagerClient::setMemberDeletionPermission(const SetMemberDeletionPermissionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SetMemberDeletionPermissionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SetMemberDeletionPermissionOutcome(SetMemberDeletionPermissionResult(outcome.result()));
else
return SetMemberDeletionPermissionOutcome(outcome.error());
}
void ResourceManagerClient::setMemberDeletionPermissionAsync(const SetMemberDeletionPermissionRequest& request, const SetMemberDeletionPermissionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, setMemberDeletionPermission(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::SetMemberDeletionPermissionOutcomeCallable ResourceManagerClient::setMemberDeletionPermissionCallable(const SetMemberDeletionPermissionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SetMemberDeletionPermissionOutcome()>>(
[this, request]()
{
return this->setMemberDeletionPermission(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::TagResourcesOutcome ResourceManagerClient::tagResources(const TagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TagResourcesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TagResourcesOutcome(TagResourcesResult(outcome.result()));
else
return TagResourcesOutcome(outcome.error());
}
void ResourceManagerClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, tagResources(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::TagResourcesOutcomeCallable ResourceManagerClient::tagResourcesCallable(const TagResourcesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TagResourcesOutcome()>>(
[this, request]()
{
return this->tagResources(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::UntagResourcesOutcome ResourceManagerClient::untagResources(const UntagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UntagResourcesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UntagResourcesOutcome(UntagResourcesResult(outcome.result()));
else
return UntagResourcesOutcome(outcome.error());
}
void ResourceManagerClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, untagResources(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceManagerClient::UntagResourcesOutcomeCallable ResourceManagerClient::untagResourcesCallable(const UntagResourcesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UntagResourcesOutcome()>>(
[this, request]()
{
return this->untagResources(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceManagerClient::UpdateAccountOutcome ResourceManagerClient::updateAccount(const UpdateAccountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -52,6 +52,18 @@ void CreateResourceAccountRequest::setDisplayName(const std::string &displayName
setParameter(std::string("DisplayName"), displayName);
}
std::vector<CreateResourceAccountRequest::Tag> CreateResourceAccountRequest::getTag() const {
return tag_;
}
void CreateResourceAccountRequest::setTag(const std::vector<CreateResourceAccountRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::string CreateResourceAccountRequest::getPayerAccountId() const {
return payerAccountId_;
}

View File

@@ -34,3 +34,12 @@ void GetAccountRequest::setAccountId(const std::string &accountId) {
setParameter(std::string("AccountId"), accountId);
}
bool GetAccountRequest::getIncludeTags() const {
return includeTags_;
}
void GetAccountRequest::setIncludeTags(bool includeTags) {
includeTags_ = includeTags;
setParameter(std::string("IncludeTags"), includeTags ? "true" : "false");
}

View File

@@ -64,6 +64,18 @@ void GetAccountResult::parse(const std::string &payload)
account_.accountName = accountNode["AccountName"].asString();
if(!accountNode["ResourceDirectoryPath"].isNull())
account_.resourceDirectoryPath = accountNode["ResourceDirectoryPath"].asString();
if(!accountNode["Location"].isNull())
account_.location = accountNode["Location"].asString();
auto allTagsNode = accountNode["Tags"]["Tag"];
for (auto accountNodeTagsTag : allTagsNode)
{
Account::Tag tagObject;
if(!accountNodeTagsTag["Key"].isNull())
tagObject.key = accountNodeTagsTag["Key"].asString();
if(!accountNodeTagsTag["Value"].isNull())
tagObject.value = accountNodeTagsTag["Value"].asString();
account_.tags.push_back(tagObject);
}
}

View File

@@ -56,6 +56,8 @@ void GetResourceDirectoryResult::parse(const std::string &payload)
resourceDirectory_.controlPolicyStatus = resourceDirectoryNode["ControlPolicyStatus"].asString();
if(!resourceDirectoryNode["MemberDeletionStatus"].isNull())
resourceDirectory_.memberDeletionStatus = resourceDirectoryNode["MemberDeletionStatus"].asString();
if(!resourceDirectoryNode["IdentityInformation"].isNull())
resourceDirectory_.identityInformation = resourceDirectoryNode["IdentityInformation"].asString();
}

View File

@@ -0,0 +1,27 @@
/*
* 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/resourcemanager/model/GetResourceGroupListAclModeRequest.h>
using AlibabaCloud::ResourceManager::Model::GetResourceGroupListAclModeRequest;
GetResourceGroupListAclModeRequest::GetResourceGroupListAclModeRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "GetResourceGroupListAclMode") {
setMethod(HttpRequest::Method::Get);
}
GetResourceGroupListAclModeRequest::~GetResourceGroupListAclModeRequest() {}

View File

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

View File

@@ -34,3 +34,12 @@ void GetResourceGroupRequest::setResourceGroupId(const std::string &resourceGrou
setParameter(std::string("ResourceGroupId"), resourceGroupId);
}
bool GetResourceGroupRequest::getIncludeTags() const {
return includeTags_;
}
void GetResourceGroupRequest::setIncludeTags(bool includeTags) {
includeTags_ = includeTags;
setParameter(std::string("IncludeTags"), includeTags ? "true" : "false");
}

View File

@@ -62,6 +62,16 @@ void GetResourceGroupResult::parse(const std::string &payload)
regionStatusObject.regionId = resourceGroupNodeRegionStatusesRegionStatus["RegionId"].asString();
resourceGroup_.regionStatuses.push_back(regionStatusObject);
}
auto allTagsNode = resourceGroupNode["Tags"]["Tag"];
for (auto resourceGroupNodeTagsTag : allTagsNode)
{
ResourceGroup::Tag tagObject;
if(!resourceGroupNodeTagsTag["TagKey"].isNull())
tagObject.tagKey = resourceGroupNodeTagsTag["TagKey"].asString();
if(!resourceGroupNodeTagsTag["TagValue"].isNull())
tagObject.tagValue = resourceGroupNodeTagsTag["TagValue"].asString();
resourceGroup_.tags.push_back(tagObject);
}
}

View File

@@ -43,6 +43,18 @@ void InviteAccountToResourceDirectoryRequest::setTargetType(const std::string &t
setParameter(std::string("TargetType"), targetType);
}
std::vector<InviteAccountToResourceDirectoryRequest::Tag> InviteAccountToResourceDirectoryRequest::getTag() const {
return tag_;
}
void InviteAccountToResourceDirectoryRequest::setTag(const std::vector<InviteAccountToResourceDirectoryRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::string InviteAccountToResourceDirectoryRequest::getTargetEntity() const {
return targetEntity_;
}

View File

@@ -52,6 +52,15 @@ void ListAccountsForParentRequest::setParentFolderId(const std::string &parentFo
setParameter(std::string("ParentFolderId"), parentFolderId);
}
bool ListAccountsForParentRequest::getIncludeTags() const {
return includeTags_;
}
void ListAccountsForParentRequest::setIncludeTags(bool includeTags) {
includeTags_ = includeTags;
setParameter(std::string("IncludeTags"), includeTags ? "true" : "false");
}
int ListAccountsForParentRequest::getPageSize() const {
return pageSize_;
}
@@ -61,3 +70,15 @@ void ListAccountsForParentRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<ListAccountsForParentRequest::Tag> ListAccountsForParentRequest::getTag() const {
return tag_;
}
void ListAccountsForParentRequest::setTag(const std::vector<ListAccountsForParentRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}

View File

@@ -61,6 +61,16 @@ void ListAccountsForParentResult::parse(const std::string &payload)
accountsObject.joinMethod = valueAccountsAccount["JoinMethod"].asString();
if(!valueAccountsAccount["ModifyTime"].isNull())
accountsObject.modifyTime = valueAccountsAccount["ModifyTime"].asString();
auto allTagsNode = valueAccountsAccount["Tags"]["Tag"];
for (auto valueAccountsAccountTagsTag : allTagsNode)
{
Account::Tag tagsObject;
if(!valueAccountsAccountTagsTag["Key"].isNull())
tagsObject.key = valueAccountsAccountTagsTag["Key"].asString();
if(!valueAccountsAccountTagsTag["Value"].isNull())
tagsObject.value = valueAccountsAccountTagsTag["Value"].asString();
accountsObject.tags.push_back(tagsObject);
}
accounts_.push_back(accountsObject);
}
if(!value["TotalCount"].isNull())

View File

@@ -34,6 +34,15 @@ void ListAccountsRequest::setPageNumber(int pageNumber) {
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
bool ListAccountsRequest::getIncludeTags() const {
return includeTags_;
}
void ListAccountsRequest::setIncludeTags(bool includeTags) {
includeTags_ = includeTags;
setParameter(std::string("IncludeTags"), includeTags ? "true" : "false");
}
int ListAccountsRequest::getPageSize() const {
return pageSize_;
}
@@ -43,3 +52,15 @@ void ListAccountsRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<ListAccountsRequest::Tag> ListAccountsRequest::getTag() const {
return tag_;
}
void ListAccountsRequest::setTag(const std::vector<ListAccountsRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}

View File

@@ -63,6 +63,16 @@ void ListAccountsResult::parse(const std::string &payload)
accountsObject.modifyTime = valueAccountsAccount["ModifyTime"].asString();
if(!valueAccountsAccount["ResourceDirectoryPath"].isNull())
accountsObject.resourceDirectoryPath = valueAccountsAccount["ResourceDirectoryPath"].asString();
auto allTagsNode = valueAccountsAccount["Tags"]["Tag"];
for (auto valueAccountsAccountTagsTag : allTagsNode)
{
Account::Tag tagsObject;
if(!valueAccountsAccountTagsTag["Key"].isNull())
tagsObject.key = valueAccountsAccountTagsTag["Key"].asString();
if(!valueAccountsAccountTagsTag["Value"].isNull())
tagsObject.value = valueAccountsAccountTagsTag["Value"].asString();
accountsObject.tags.push_back(tagsObject);
}
accounts_.push_back(accountsObject);
}
if(!value["TotalCount"].isNull())

View File

@@ -52,6 +52,38 @@ void ListResourceGroupsRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<ListResourceGroupsRequest::Tag> ListResourceGroupsRequest::getTag() const {
return tag_;
}
void ListResourceGroupsRequest::setTag(const std::vector<ListResourceGroupsRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<ListResourceGroupsRequest::std::string> ListResourceGroupsRequest::getResourceGroupIds() const {
return resourceGroupIds_;
}
void ListResourceGroupsRequest::setResourceGroupIds(const std::vector<ListResourceGroupsRequest::std::string> &resourceGroupIds) {
resourceGroupIds_ = resourceGroupIds;
for(int dep1 = 0; dep1 != resourceGroupIds.size(); dep1++) {
setParameter(std::string("ResourceGroupIds") + "." + std::to_string(dep1 + 1), resourceGroupIds[dep1]);
}
}
bool ListResourceGroupsRequest::getIncludeTags() const {
return includeTags_;
}
void ListResourceGroupsRequest::setIncludeTags(bool includeTags) {
includeTags_ = includeTags;
setParameter(std::string("IncludeTags"), includeTags ? "true" : "false");
}
std::string ListResourceGroupsRequest::getDisplayName() const {
return displayName_;
}

View File

@@ -55,6 +55,16 @@ void ListResourceGroupsResult::parse(const std::string &payload)
resourceGroupsObject.createDate = valueResourceGroupsResourceGroup["CreateDate"].asString();
if(!valueResourceGroupsResourceGroup["Id"].isNull())
resourceGroupsObject.id = valueResourceGroupsResourceGroup["Id"].asString();
auto allTagsNode = valueResourceGroupsResourceGroup["Tags"]["Tag"];
for (auto valueResourceGroupsResourceGroupTagsTag : allTagsNode)
{
ResourceGroup::Tag tagsObject;
if(!valueResourceGroupsResourceGroupTagsTag["TagKey"].isNull())
tagsObject.tagKey = valueResourceGroupsResourceGroupTagsTag["TagKey"].asString();
if(!valueResourceGroupsResourceGroupTagsTag["TagValue"].isNull())
tagsObject.tagValue = valueResourceGroupsResourceGroupTagsTag["TagValue"].asString();
resourceGroupsObject.tags.push_back(tagsObject);
}
resourceGroups_.push_back(resourceGroupsObject);
}
if(!value["TotalCount"].isNull())
@@ -63,6 +73,8 @@ void ListResourceGroupsResult::parse(const std::string &payload)
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["ResourceGroupListAclMode"].isNull())
resourceGroupListAclMode_ = value["ResourceGroupListAclMode"].asString();
}
@@ -86,3 +98,8 @@ std::vector<ListResourceGroupsResult::ResourceGroup> ListResourceGroupsResult::g
return resourceGroups_;
}
std::string ListResourceGroupsResult::getResourceGroupListAclMode()const
{
return resourceGroupListAclMode_;
}

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.
*/
#include <alibabacloud/resourcemanager/model/ListTagKeysRequest.h>
using AlibabaCloud::ResourceManager::Model::ListTagKeysRequest;
ListTagKeysRequest::ListTagKeysRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "ListTagKeys") {
setMethod(HttpRequest::Method::Post);
}
ListTagKeysRequest::~ListTagKeysRequest() {}
std::string ListTagKeysRequest::getResourceType() const {
return resourceType_;
}
void ListTagKeysRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string ListTagKeysRequest::getNextToken() const {
return nextToken_;
}
void ListTagKeysRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
int ListTagKeysRequest::getMaxResults() const {
return maxResults_;
}
void ListTagKeysRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::string ListTagKeysRequest::getKeyFilter() const {
return keyFilter_;
}
void ListTagKeysRequest::setKeyFilter(const std::string &keyFilter) {
keyFilter_ = keyFilter;
setParameter(std::string("KeyFilter"), keyFilter);
}

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.
*/
#include <alibabacloud/resourcemanager/model/ListTagKeysResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
ListTagKeysResult::ListTagKeysResult() :
ServiceResult()
{}
ListTagKeysResult::ListTagKeysResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagKeysResult::~ListTagKeysResult()
{}
void ListTagKeysResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["Key"].isNull())
tagsObject.key = valueTagsTag["Key"].asString();
tags_.push_back(tagsObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListTagKeysResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListTagKeysResult::Tag> ListTagKeysResult::getTags()const
{
return tags_;
}

View File

@@ -0,0 +1,77 @@
/*
* 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/resourcemanager/model/ListTagResourcesRequest.h>
using AlibabaCloud::ResourceManager::Model::ListTagResourcesRequest;
ListTagResourcesRequest::ListTagResourcesRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "ListTagResources") {
setMethod(HttpRequest::Method::Post);
}
ListTagResourcesRequest::~ListTagResourcesRequest() {}
std::vector<ListTagResourcesRequest::std::string> ListTagResourcesRequest::getResourceId() const {
return resourceId_;
}
void ListTagResourcesRequest::setResourceId(const std::vector<ListTagResourcesRequest::std::string> &resourceId) {
resourceId_ = resourceId;
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
setParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
}
}
std::string ListTagResourcesRequest::getResourceType() const {
return resourceType_;
}
void ListTagResourcesRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string ListTagResourcesRequest::getNextToken() const {
return nextToken_;
}
void ListTagResourcesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
int ListTagResourcesRequest::getMaxResults() const {
return maxResults_;
}
void ListTagResourcesRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::vector<ListTagResourcesRequest::Tag> ListTagResourcesRequest::getTag() const {
return tag_;
}
void ListTagResourcesRequest::setTag(const std::vector<ListTagResourcesRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}

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.
*/
#include <alibabacloud/resourcemanager/model/ListTagResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
ListTagResourcesResult::ListTagResourcesResult() :
ServiceResult()
{}
ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagResourcesResult::~ListTagResourcesResult()
{}
void ListTagResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagResourcesNode = value["TagResources"]["TagResource"];
for (auto valueTagResourcesTagResource : allTagResourcesNode)
{
TagResource tagResourcesObject;
if(!valueTagResourcesTagResource["TagValue"].isNull())
tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString();
if(!valueTagResourcesTagResource["ResourceId"].isNull())
tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString();
if(!valueTagResourcesTagResource["TagKey"].isNull())
tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString();
if(!valueTagResourcesTagResource["ResourceType"].isNull())
tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString();
tagResources_.push_back(tagResourcesObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListTagResourcesResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListTagResourcesResult::TagResource> ListTagResourcesResult::getTagResources()const
{
return tagResources_;
}

View File

@@ -0,0 +1,72 @@
/*
* 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/resourcemanager/model/ListTagValuesRequest.h>
using AlibabaCloud::ResourceManager::Model::ListTagValuesRequest;
ListTagValuesRequest::ListTagValuesRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "ListTagValues") {
setMethod(HttpRequest::Method::Post);
}
ListTagValuesRequest::~ListTagValuesRequest() {}
std::string ListTagValuesRequest::getResourceType() const {
return resourceType_;
}
void ListTagValuesRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string ListTagValuesRequest::getValueFilter() const {
return valueFilter_;
}
void ListTagValuesRequest::setValueFilter(const std::string &valueFilter) {
valueFilter_ = valueFilter;
setParameter(std::string("ValueFilter"), valueFilter);
}
std::string ListTagValuesRequest::getNextToken() const {
return nextToken_;
}
void ListTagValuesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
int ListTagValuesRequest::getMaxResults() const {
return maxResults_;
}
void ListTagValuesRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::string ListTagValuesRequest::getTagKey() const {
return tagKey_;
}
void ListTagValuesRequest::setTagKey(const std::string &tagKey) {
tagKey_ = tagKey;
setParameter(std::string("TagKey"), tagKey);
}

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.
*/
#include <alibabacloud/resourcemanager/model/ListTagValuesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
ListTagValuesResult::ListTagValuesResult() :
ServiceResult()
{}
ListTagValuesResult::ListTagValuesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagValuesResult::~ListTagValuesResult()
{}
void ListTagValuesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["Value"].isNull())
tagsObject.value = valueTagsTag["Value"].asString();
tags_.push_back(tagsObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListTagValuesResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListTagValuesResult::Tag> ListTagValuesResult::getTags()const
{
return tags_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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/resourcemanager/model/SetMemberDeletionPermissionRequest.h>
using AlibabaCloud::ResourceManager::Model::SetMemberDeletionPermissionRequest;
SetMemberDeletionPermissionRequest::SetMemberDeletionPermissionRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "SetMemberDeletionPermission") {
setMethod(HttpRequest::Method::Post);
}
SetMemberDeletionPermissionRequest::~SetMemberDeletionPermissionRequest() {}
std::string SetMemberDeletionPermissionRequest::getStatus() const {
return status_;
}
void SetMemberDeletionPermissionRequest::setStatus(const std::string &status) {
status_ = status;
setParameter(std::string("Status"), status);
}

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.
*/
#include <alibabacloud/resourcemanager/model/SetMemberDeletionPermissionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
SetMemberDeletionPermissionResult::SetMemberDeletionPermissionResult() :
ServiceResult()
{}
SetMemberDeletionPermissionResult::SetMemberDeletionPermissionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SetMemberDeletionPermissionResult::~SetMemberDeletionPermissionResult()
{}
void SetMemberDeletionPermissionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["MemberDeletionStatus"].isNull())
memberDeletionStatus_ = value["MemberDeletionStatus"].asString();
if(!value["ManagementAccountId"].isNull())
managementAccountId_ = value["ManagementAccountId"].asString();
if(!value["ResourceDirectoryId"].isNull())
resourceDirectoryId_ = value["ResourceDirectoryId"].asString();
}
std::string SetMemberDeletionPermissionResult::getResourceDirectoryId()const
{
return resourceDirectoryId_;
}
std::string SetMemberDeletionPermissionResult::getMemberDeletionStatus()const
{
return memberDeletionStatus_;
}
std::string SetMemberDeletionPermissionResult::getManagementAccountId()const
{
return managementAccountId_;
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/resourcemanager/model/TagResourcesRequest.h>
using AlibabaCloud::ResourceManager::Model::TagResourcesRequest;
TagResourcesRequest::TagResourcesRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "TagResources") {
setMethod(HttpRequest::Method::Post);
}
TagResourcesRequest::~TagResourcesRequest() {}
std::vector<TagResourcesRequest::std::string> TagResourcesRequest::getResourceId() const {
return resourceId_;
}
void TagResourcesRequest::setResourceId(const std::vector<TagResourcesRequest::std::string> &resourceId) {
resourceId_ = resourceId;
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
setParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
}
}
std::string TagResourcesRequest::getResourceType() const {
return resourceType_;
}
void TagResourcesRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::vector<TagResourcesRequest::Tag> TagResourcesRequest::getTag() const {
return tag_;
}
void TagResourcesRequest::setTag(const std::vector<TagResourcesRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}

View File

@@ -0,0 +1,44 @@
/*
* 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/resourcemanager/model/TagResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
TagResourcesResult::TagResourcesResult() :
ServiceResult()
{}
TagResourcesResult::TagResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TagResourcesResult::~TagResourcesResult()
{}
void TagResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/resourcemanager/model/UntagResourcesRequest.h>
using AlibabaCloud::ResourceManager::Model::UntagResourcesRequest;
UntagResourcesRequest::UntagResourcesRequest()
: RpcServiceRequest("resourcemanager", "2020-03-31", "UntagResources") {
setMethod(HttpRequest::Method::Post);
}
UntagResourcesRequest::~UntagResourcesRequest() {}
bool UntagResourcesRequest::getAll() const {
return all_;
}
void UntagResourcesRequest::setAll(bool all) {
all_ = all;
setParameter(std::string("All"), all ? "true" : "false");
}
std::vector<UntagResourcesRequest::std::string> UntagResourcesRequest::getResourceId() const {
return resourceId_;
}
void UntagResourcesRequest::setResourceId(const std::vector<UntagResourcesRequest::std::string> &resourceId) {
resourceId_ = resourceId;
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
setParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
}
}
std::string UntagResourcesRequest::getResourceType() const {
return resourceType_;
}
void UntagResourcesRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::vector<UntagResourcesRequest::std::string> UntagResourcesRequest::getTagKey() const {
return tagKey_;
}
void UntagResourcesRequest::setTagKey(const std::vector<UntagResourcesRequest::std::string> &tagKey) {
tagKey_ = tagKey;
for(int dep1 = 0; dep1 != tagKey.size(); dep1++) {
setParameter(std::string("TagKey") + "." + std::to_string(dep1 + 1), tagKey[dep1]);
}
}

View File

@@ -0,0 +1,44 @@
/*
* 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/resourcemanager/model/UntagResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceManager;
using namespace AlibabaCloud::ResourceManager::Model;
UntagResourcesResult::UntagResourcesResult() :
ServiceResult()
{}
UntagResourcesResult::UntagResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UntagResourcesResult::~UntagResourcesResult()
{}
void UntagResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}