Supported java

This commit is contained in:
sdk-team
2023-03-07 07:10:17 +00:00
parent 8efbcc3612
commit 68ba54083f
69 changed files with 4815 additions and 1 deletions

View File

@@ -0,0 +1,629 @@
/*
* 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/resourcecenter/ResourceCenterClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
namespace
{
const std::string SERVICE_NAME = "ResourceCenter";
}
ResourceCenterClient::ResourceCenterClient(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, "");
}
ResourceCenterClient::ResourceCenterClient(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, "");
}
ResourceCenterClient::ResourceCenterClient(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, "");
}
ResourceCenterClient::~ResourceCenterClient()
{}
ResourceCenterClient::DisableMultiAccountResourceCenterOutcome ResourceCenterClient::disableMultiAccountResourceCenter(const DisableMultiAccountResourceCenterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableMultiAccountResourceCenterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableMultiAccountResourceCenterOutcome(DisableMultiAccountResourceCenterResult(outcome.result()));
else
return DisableMultiAccountResourceCenterOutcome(outcome.error());
}
void ResourceCenterClient::disableMultiAccountResourceCenterAsync(const DisableMultiAccountResourceCenterRequest& request, const DisableMultiAccountResourceCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableMultiAccountResourceCenter(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::DisableMultiAccountResourceCenterOutcomeCallable ResourceCenterClient::disableMultiAccountResourceCenterCallable(const DisableMultiAccountResourceCenterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableMultiAccountResourceCenterOutcome()>>(
[this, request]()
{
return this->disableMultiAccountResourceCenter(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::DisableResourceCenterOutcome ResourceCenterClient::disableResourceCenter(const DisableResourceCenterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableResourceCenterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableResourceCenterOutcome(DisableResourceCenterResult(outcome.result()));
else
return DisableResourceCenterOutcome(outcome.error());
}
void ResourceCenterClient::disableResourceCenterAsync(const DisableResourceCenterRequest& request, const DisableResourceCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableResourceCenter(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::DisableResourceCenterOutcomeCallable ResourceCenterClient::disableResourceCenterCallable(const DisableResourceCenterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableResourceCenterOutcome()>>(
[this, request]()
{
return this->disableResourceCenter(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::EnableMultiAccountResourceCenterOutcome ResourceCenterClient::enableMultiAccountResourceCenter(const EnableMultiAccountResourceCenterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnableMultiAccountResourceCenterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnableMultiAccountResourceCenterOutcome(EnableMultiAccountResourceCenterResult(outcome.result()));
else
return EnableMultiAccountResourceCenterOutcome(outcome.error());
}
void ResourceCenterClient::enableMultiAccountResourceCenterAsync(const EnableMultiAccountResourceCenterRequest& request, const EnableMultiAccountResourceCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enableMultiAccountResourceCenter(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::EnableMultiAccountResourceCenterOutcomeCallable ResourceCenterClient::enableMultiAccountResourceCenterCallable(const EnableMultiAccountResourceCenterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnableMultiAccountResourceCenterOutcome()>>(
[this, request]()
{
return this->enableMultiAccountResourceCenter(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::EnableResourceCenterOutcome ResourceCenterClient::enableResourceCenter(const EnableResourceCenterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnableResourceCenterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnableResourceCenterOutcome(EnableResourceCenterResult(outcome.result()));
else
return EnableResourceCenterOutcome(outcome.error());
}
void ResourceCenterClient::enableResourceCenterAsync(const EnableResourceCenterRequest& request, const EnableResourceCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enableResourceCenter(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::EnableResourceCenterOutcomeCallable ResourceCenterClient::enableResourceCenterCallable(const EnableResourceCenterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnableResourceCenterOutcome()>>(
[this, request]()
{
return this->enableResourceCenter(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::GetMultiAccountResourceCenterServiceStatusOutcome ResourceCenterClient::getMultiAccountResourceCenterServiceStatus(const GetMultiAccountResourceCenterServiceStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetMultiAccountResourceCenterServiceStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetMultiAccountResourceCenterServiceStatusOutcome(GetMultiAccountResourceCenterServiceStatusResult(outcome.result()));
else
return GetMultiAccountResourceCenterServiceStatusOutcome(outcome.error());
}
void ResourceCenterClient::getMultiAccountResourceCenterServiceStatusAsync(const GetMultiAccountResourceCenterServiceStatusRequest& request, const GetMultiAccountResourceCenterServiceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getMultiAccountResourceCenterServiceStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::GetMultiAccountResourceCenterServiceStatusOutcomeCallable ResourceCenterClient::getMultiAccountResourceCenterServiceStatusCallable(const GetMultiAccountResourceCenterServiceStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetMultiAccountResourceCenterServiceStatusOutcome()>>(
[this, request]()
{
return this->getMultiAccountResourceCenterServiceStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::GetMultiAccountResourceConfigurationOutcome ResourceCenterClient::getMultiAccountResourceConfiguration(const GetMultiAccountResourceConfigurationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetMultiAccountResourceConfigurationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetMultiAccountResourceConfigurationOutcome(GetMultiAccountResourceConfigurationResult(outcome.result()));
else
return GetMultiAccountResourceConfigurationOutcome(outcome.error());
}
void ResourceCenterClient::getMultiAccountResourceConfigurationAsync(const GetMultiAccountResourceConfigurationRequest& request, const GetMultiAccountResourceConfigurationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getMultiAccountResourceConfiguration(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::GetMultiAccountResourceConfigurationOutcomeCallable ResourceCenterClient::getMultiAccountResourceConfigurationCallable(const GetMultiAccountResourceConfigurationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetMultiAccountResourceConfigurationOutcome()>>(
[this, request]()
{
return this->getMultiAccountResourceConfiguration(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::GetResourceCenterServiceStatusOutcome ResourceCenterClient::getResourceCenterServiceStatus(const GetResourceCenterServiceStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetResourceCenterServiceStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetResourceCenterServiceStatusOutcome(GetResourceCenterServiceStatusResult(outcome.result()));
else
return GetResourceCenterServiceStatusOutcome(outcome.error());
}
void ResourceCenterClient::getResourceCenterServiceStatusAsync(const GetResourceCenterServiceStatusRequest& request, const GetResourceCenterServiceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getResourceCenterServiceStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::GetResourceCenterServiceStatusOutcomeCallable ResourceCenterClient::getResourceCenterServiceStatusCallable(const GetResourceCenterServiceStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetResourceCenterServiceStatusOutcome()>>(
[this, request]()
{
return this->getResourceCenterServiceStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::GetResourceConfigurationOutcome ResourceCenterClient::getResourceConfiguration(const GetResourceConfigurationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetResourceConfigurationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetResourceConfigurationOutcome(GetResourceConfigurationResult(outcome.result()));
else
return GetResourceConfigurationOutcome(outcome.error());
}
void ResourceCenterClient::getResourceConfigurationAsync(const GetResourceConfigurationRequest& request, const GetResourceConfigurationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getResourceConfiguration(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::GetResourceConfigurationOutcomeCallable ResourceCenterClient::getResourceConfigurationCallable(const GetResourceConfigurationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetResourceConfigurationOutcome()>>(
[this, request]()
{
return this->getResourceConfiguration(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::ListMultiAccountResourceGroupsOutcome ResourceCenterClient::listMultiAccountResourceGroups(const ListMultiAccountResourceGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListMultiAccountResourceGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListMultiAccountResourceGroupsOutcome(ListMultiAccountResourceGroupsResult(outcome.result()));
else
return ListMultiAccountResourceGroupsOutcome(outcome.error());
}
void ResourceCenterClient::listMultiAccountResourceGroupsAsync(const ListMultiAccountResourceGroupsRequest& request, const ListMultiAccountResourceGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listMultiAccountResourceGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::ListMultiAccountResourceGroupsOutcomeCallable ResourceCenterClient::listMultiAccountResourceGroupsCallable(const ListMultiAccountResourceGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListMultiAccountResourceGroupsOutcome()>>(
[this, request]()
{
return this->listMultiAccountResourceGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::ListMultiAccountTagKeysOutcome ResourceCenterClient::listMultiAccountTagKeys(const ListMultiAccountTagKeysRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListMultiAccountTagKeysOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListMultiAccountTagKeysOutcome(ListMultiAccountTagKeysResult(outcome.result()));
else
return ListMultiAccountTagKeysOutcome(outcome.error());
}
void ResourceCenterClient::listMultiAccountTagKeysAsync(const ListMultiAccountTagKeysRequest& request, const ListMultiAccountTagKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listMultiAccountTagKeys(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::ListMultiAccountTagKeysOutcomeCallable ResourceCenterClient::listMultiAccountTagKeysCallable(const ListMultiAccountTagKeysRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListMultiAccountTagKeysOutcome()>>(
[this, request]()
{
return this->listMultiAccountTagKeys(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::ListMultiAccountTagValuesOutcome ResourceCenterClient::listMultiAccountTagValues(const ListMultiAccountTagValuesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListMultiAccountTagValuesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListMultiAccountTagValuesOutcome(ListMultiAccountTagValuesResult(outcome.result()));
else
return ListMultiAccountTagValuesOutcome(outcome.error());
}
void ResourceCenterClient::listMultiAccountTagValuesAsync(const ListMultiAccountTagValuesRequest& request, const ListMultiAccountTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listMultiAccountTagValues(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::ListMultiAccountTagValuesOutcomeCallable ResourceCenterClient::listMultiAccountTagValuesCallable(const ListMultiAccountTagValuesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListMultiAccountTagValuesOutcome()>>(
[this, request]()
{
return this->listMultiAccountTagValues(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::ListResourceTypesOutcome ResourceCenterClient::listResourceTypes(const ListResourceTypesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListResourceTypesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListResourceTypesOutcome(ListResourceTypesResult(outcome.result()));
else
return ListResourceTypesOutcome(outcome.error());
}
void ResourceCenterClient::listResourceTypesAsync(const ListResourceTypesRequest& request, const ListResourceTypesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listResourceTypes(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::ListResourceTypesOutcomeCallable ResourceCenterClient::listResourceTypesCallable(const ListResourceTypesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListResourceTypesOutcome()>>(
[this, request]()
{
return this->listResourceTypes(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::ListTagKeysOutcome ResourceCenterClient::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 ResourceCenterClient::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));
}
ResourceCenterClient::ListTagKeysOutcomeCallable ResourceCenterClient::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();
}
ResourceCenterClient::ListTagValuesOutcome ResourceCenterClient::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 ResourceCenterClient::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));
}
ResourceCenterClient::ListTagValuesOutcomeCallable ResourceCenterClient::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();
}
ResourceCenterClient::SearchMultiAccountResourcesOutcome ResourceCenterClient::searchMultiAccountResources(const SearchMultiAccountResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SearchMultiAccountResourcesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SearchMultiAccountResourcesOutcome(SearchMultiAccountResourcesResult(outcome.result()));
else
return SearchMultiAccountResourcesOutcome(outcome.error());
}
void ResourceCenterClient::searchMultiAccountResourcesAsync(const SearchMultiAccountResourcesRequest& request, const SearchMultiAccountResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, searchMultiAccountResources(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::SearchMultiAccountResourcesOutcomeCallable ResourceCenterClient::searchMultiAccountResourcesCallable(const SearchMultiAccountResourcesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SearchMultiAccountResourcesOutcome()>>(
[this, request]()
{
return this->searchMultiAccountResources(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ResourceCenterClient::SearchResourcesOutcome ResourceCenterClient::searchResources(const SearchResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SearchResourcesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SearchResourcesOutcome(SearchResourcesResult(outcome.result()));
else
return SearchResourcesOutcome(outcome.error());
}
void ResourceCenterClient::searchResourcesAsync(const SearchResourcesRequest& request, const SearchResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, searchResources(request), context);
};
asyncExecute(new Runnable(fn));
}
ResourceCenterClient::SearchResourcesOutcomeCallable ResourceCenterClient::searchResourcesCallable(const SearchResourcesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SearchResourcesOutcome()>>(
[this, request]()
{
return this->searchResources(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

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/resourcecenter/model/DisableMultiAccountResourceCenterRequest.h>
using AlibabaCloud::ResourceCenter::Model::DisableMultiAccountResourceCenterRequest;
DisableMultiAccountResourceCenterRequest::DisableMultiAccountResourceCenterRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "DisableMultiAccountResourceCenter") {
setMethod(HttpRequest::Method::Post);
}
DisableMultiAccountResourceCenterRequest::~DisableMultiAccountResourceCenterRequest() {}

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/resourcecenter/model/DisableMultiAccountResourceCenterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
DisableMultiAccountResourceCenterResult::DisableMultiAccountResourceCenterResult() :
ServiceResult()
{}
DisableMultiAccountResourceCenterResult::DisableMultiAccountResourceCenterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableMultiAccountResourceCenterResult::~DisableMultiAccountResourceCenterResult()
{}
void DisableMultiAccountResourceCenterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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/resourcecenter/model/DisableResourceCenterRequest.h>
using AlibabaCloud::ResourceCenter::Model::DisableResourceCenterRequest;
DisableResourceCenterRequest::DisableResourceCenterRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "DisableResourceCenter") {
setMethod(HttpRequest::Method::Post);
}
DisableResourceCenterRequest::~DisableResourceCenterRequest() {}

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/resourcecenter/model/DisableResourceCenterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
DisableResourceCenterResult::DisableResourceCenterResult() :
ServiceResult()
{}
DisableResourceCenterResult::DisableResourceCenterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableResourceCenterResult::~DisableResourceCenterResult()
{}
void DisableResourceCenterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

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/resourcecenter/model/EnableMultiAccountResourceCenterRequest.h>
using AlibabaCloud::ResourceCenter::Model::EnableMultiAccountResourceCenterRequest;
EnableMultiAccountResourceCenterRequest::EnableMultiAccountResourceCenterRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "EnableMultiAccountResourceCenter") {
setMethod(HttpRequest::Method::Post);
}
EnableMultiAccountResourceCenterRequest::~EnableMultiAccountResourceCenterRequest() {}
std::string EnableMultiAccountResourceCenterRequest::getChannel() const {
return channel_;
}
void EnableMultiAccountResourceCenterRequest::setChannel(const std::string &channel) {
channel_ = channel;
setParameter(std::string("Channel"), channel);
}

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/resourcecenter/model/EnableMultiAccountResourceCenterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
EnableMultiAccountResourceCenterResult::EnableMultiAccountResourceCenterResult() :
ServiceResult()
{}
EnableMultiAccountResourceCenterResult::EnableMultiAccountResourceCenterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableMultiAccountResourceCenterResult::~EnableMultiAccountResourceCenterResult()
{}
void EnableMultiAccountResourceCenterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Status"].isNull())
status_ = value["Status"].asString();
}
std::string EnableMultiAccountResourceCenterResult::getStatus()const
{
return status_;
}

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/resourcecenter/model/EnableResourceCenterRequest.h>
using AlibabaCloud::ResourceCenter::Model::EnableResourceCenterRequest;
EnableResourceCenterRequest::EnableResourceCenterRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "EnableResourceCenter") {
setMethod(HttpRequest::Method::Post);
}
EnableResourceCenterRequest::~EnableResourceCenterRequest() {}
std::string EnableResourceCenterRequest::getChannel() const {
return channel_;
}
void EnableResourceCenterRequest::setChannel(const std::string &channel) {
channel_ = channel;
setParameter(std::string("Channel"), channel);
}

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/resourcecenter/model/EnableResourceCenterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
EnableResourceCenterResult::EnableResourceCenterResult() :
ServiceResult()
{}
EnableResourceCenterResult::EnableResourceCenterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableResourceCenterResult::~EnableResourceCenterResult()
{}
void EnableResourceCenterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Status"].isNull())
status_ = value["Status"].asString();
}
std::string EnableResourceCenterResult::getStatus()const
{
return status_;
}

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/resourcecenter/model/GetMultiAccountResourceCenterServiceStatusRequest.h>
using AlibabaCloud::ResourceCenter::Model::GetMultiAccountResourceCenterServiceStatusRequest;
GetMultiAccountResourceCenterServiceStatusRequest::GetMultiAccountResourceCenterServiceStatusRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "GetMultiAccountResourceCenterServiceStatus") {
setMethod(HttpRequest::Method::Post);
}
GetMultiAccountResourceCenterServiceStatusRequest::~GetMultiAccountResourceCenterServiceStatusRequest() {}

View File

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

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/resourcecenter/model/GetMultiAccountResourceConfigurationRequest.h>
using AlibabaCloud::ResourceCenter::Model::GetMultiAccountResourceConfigurationRequest;
GetMultiAccountResourceConfigurationRequest::GetMultiAccountResourceConfigurationRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "GetMultiAccountResourceConfiguration") {
setMethod(HttpRequest::Method::Post);
}
GetMultiAccountResourceConfigurationRequest::~GetMultiAccountResourceConfigurationRequest() {}
std::string GetMultiAccountResourceConfigurationRequest::getResourceId() const {
return resourceId_;
}
void GetMultiAccountResourceConfigurationRequest::setResourceId(const std::string &resourceId) {
resourceId_ = resourceId;
setParameter(std::string("ResourceId"), resourceId);
}
std::string GetMultiAccountResourceConfigurationRequest::getResourceType() const {
return resourceType_;
}
void GetMultiAccountResourceConfigurationRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string GetMultiAccountResourceConfigurationRequest::getAccountId() const {
return accountId_;
}
void GetMultiAccountResourceConfigurationRequest::setAccountId(const std::string &accountId) {
accountId_ = accountId;
setParameter(std::string("AccountId"), accountId);
}
std::string GetMultiAccountResourceConfigurationRequest::getResourceRegionId() const {
return resourceRegionId_;
}
void GetMultiAccountResourceConfigurationRequest::setResourceRegionId(const std::string &resourceRegionId) {
resourceRegionId_ = resourceRegionId;
setParameter(std::string("ResourceRegionId"), resourceRegionId);
}

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/resourcecenter/model/GetMultiAccountResourceConfigurationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
GetMultiAccountResourceConfigurationResult::GetMultiAccountResourceConfigurationResult() :
ServiceResult()
{}
GetMultiAccountResourceConfigurationResult::GetMultiAccountResourceConfigurationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMultiAccountResourceConfigurationResult::~GetMultiAccountResourceConfigurationResult()
{}
void GetMultiAccountResourceConfigurationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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/resourcecenter/model/GetResourceCenterServiceStatusRequest.h>
using AlibabaCloud::ResourceCenter::Model::GetResourceCenterServiceStatusRequest;
GetResourceCenterServiceStatusRequest::GetResourceCenterServiceStatusRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "GetResourceCenterServiceStatus") {
setMethod(HttpRequest::Method::Post);
}
GetResourceCenterServiceStatusRequest::~GetResourceCenterServiceStatusRequest() {}

View File

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

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/resourcecenter/model/GetResourceConfigurationRequest.h>
using AlibabaCloud::ResourceCenter::Model::GetResourceConfigurationRequest;
GetResourceConfigurationRequest::GetResourceConfigurationRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "GetResourceConfiguration") {
setMethod(HttpRequest::Method::Post);
}
GetResourceConfigurationRequest::~GetResourceConfigurationRequest() {}
std::string GetResourceConfigurationRequest::getResourceId() const {
return resourceId_;
}
void GetResourceConfigurationRequest::setResourceId(const std::string &resourceId) {
resourceId_ = resourceId;
setParameter(std::string("ResourceId"), resourceId);
}
std::string GetResourceConfigurationRequest::getResourceType() const {
return resourceType_;
}
void GetResourceConfigurationRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string GetResourceConfigurationRequest::getResourceRegionId() const {
return resourceRegionId_;
}
void GetResourceConfigurationRequest::setResourceRegionId(const std::string &resourceRegionId) {
resourceRegionId_ = resourceRegionId;
setParameter(std::string("ResourceRegionId"), resourceRegionId);
}

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/resourcecenter/model/GetResourceConfigurationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
GetResourceConfigurationResult::GetResourceConfigurationResult() :
ServiceResult()
{}
GetResourceConfigurationResult::GetResourceConfigurationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetResourceConfigurationResult::~GetResourceConfigurationResult()
{}
void GetResourceConfigurationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

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/resourcecenter/model/ListMultiAccountResourceGroupsRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListMultiAccountResourceGroupsRequest;
ListMultiAccountResourceGroupsRequest::ListMultiAccountResourceGroupsRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListMultiAccountResourceGroups") {
setMethod(HttpRequest::Method::Post);
}
ListMultiAccountResourceGroupsRequest::~ListMultiAccountResourceGroupsRequest() {}
std::string ListMultiAccountResourceGroupsRequest::getAccountId() const {
return accountId_;
}
void ListMultiAccountResourceGroupsRequest::setAccountId(const std::string &accountId) {
accountId_ = accountId;
setParameter(std::string("AccountId"), accountId);
}
std::vector<std::string> ListMultiAccountResourceGroupsRequest::getResourceGroupIds() const {
return resourceGroupIds_;
}
void ListMultiAccountResourceGroupsRequest::setResourceGroupIds(const std::vector<std::string> &resourceGroupIds) {
resourceGroupIds_ = resourceGroupIds;
}
std::string ListMultiAccountResourceGroupsRequest::getNextToken() const {
return nextToken_;
}
void ListMultiAccountResourceGroupsRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
int ListMultiAccountResourceGroupsRequest::getMaxResults() const {
return maxResults_;
}
void ListMultiAccountResourceGroupsRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}

View File

@@ -0,0 +1,109 @@
/*
* 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/resourcecenter/model/ListMultiAccountResourceGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
ListMultiAccountResourceGroupsResult::ListMultiAccountResourceGroupsResult() :
ServiceResult()
{}
ListMultiAccountResourceGroupsResult::ListMultiAccountResourceGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListMultiAccountResourceGroupsResult::~ListMultiAccountResourceGroupsResult()
{}
void ListMultiAccountResourceGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResourceGroupsNode = value["ResourceGroups"]["ResourceGroup"];
for (auto valueResourceGroupsResourceGroup : allResourceGroupsNode)
{
ResourceGroup resourceGroupsObject;
if(!valueResourceGroupsResourceGroup["DisplayName"].isNull())
resourceGroupsObject.displayName = valueResourceGroupsResourceGroup["DisplayName"].asString();
if(!valueResourceGroupsResourceGroup["Status"].isNull())
resourceGroupsObject.status = valueResourceGroupsResourceGroup["Status"].asString();
if(!valueResourceGroupsResourceGroup["AccountId"].isNull())
resourceGroupsObject.accountId = valueResourceGroupsResourceGroup["AccountId"].asString();
if(!valueResourceGroupsResourceGroup["Name"].isNull())
resourceGroupsObject.name = valueResourceGroupsResourceGroup["Name"].asString();
if(!valueResourceGroupsResourceGroup["CreateDate"].isNull())
resourceGroupsObject.createDate = valueResourceGroupsResourceGroup["CreateDate"].asString();
if(!valueResourceGroupsResourceGroup["Id"].isNull())
resourceGroupsObject.id = valueResourceGroupsResourceGroup["Id"].asString();
resourceGroups_.push_back(resourceGroupsObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListMultiAccountResourceGroupsResult::getNextToken()const
{
return nextToken_;
}
std::string ListMultiAccountResourceGroupsResult::getDynamicCode()const
{
return dynamicCode_;
}
std::vector<ListMultiAccountResourceGroupsResult::ResourceGroup> ListMultiAccountResourceGroupsResult::getResourceGroups()const
{
return resourceGroups_;
}
std::string ListMultiAccountResourceGroupsResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListMultiAccountResourceGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMultiAccountResourceGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMultiAccountResourceGroupsResult::getSuccess()const
{
return success_;
}

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/resourcecenter/model/ListMultiAccountTagKeysRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListMultiAccountTagKeysRequest;
ListMultiAccountTagKeysRequest::ListMultiAccountTagKeysRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListMultiAccountTagKeys") {
setMethod(HttpRequest::Method::Post);
}
ListMultiAccountTagKeysRequest::~ListMultiAccountTagKeysRequest() {}
std::string ListMultiAccountTagKeysRequest::getNextToken() const {
return nextToken_;
}
void ListMultiAccountTagKeysRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string ListMultiAccountTagKeysRequest::getScope() const {
return scope_;
}
void ListMultiAccountTagKeysRequest::setScope(const std::string &scope) {
scope_ = scope;
setParameter(std::string("Scope"), scope);
}
std::string ListMultiAccountTagKeysRequest::getMatchType() const {
return matchType_;
}
void ListMultiAccountTagKeysRequest::setMatchType(const std::string &matchType) {
matchType_ = matchType;
setParameter(std::string("MatchType"), matchType);
}
int ListMultiAccountTagKeysRequest::getMaxResults() const {
return maxResults_;
}
void ListMultiAccountTagKeysRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::string ListMultiAccountTagKeysRequest::getTagKey() const {
return tagKey_;
}
void ListMultiAccountTagKeysRequest::setTagKey(const std::string &tagKey) {
tagKey_ = tagKey;
setParameter(std::string("TagKey"), tagKey);
}

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.
*/
#include <alibabacloud/resourcecenter/model/ListMultiAccountTagKeysResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
ListMultiAccountTagKeysResult::ListMultiAccountTagKeysResult() :
ServiceResult()
{}
ListMultiAccountTagKeysResult::ListMultiAccountTagKeysResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListMultiAccountTagKeysResult::~ListMultiAccountTagKeysResult()
{}
void ListMultiAccountTagKeysResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagKeys = value["TagKeys"]["TagKey"];
for (const auto &item : allTagKeys)
tagKeys_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListMultiAccountTagKeysResult::getNextToken()const
{
return nextToken_;
}
std::string ListMultiAccountTagKeysResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListMultiAccountTagKeysResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListMultiAccountTagKeysResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMultiAccountTagKeysResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<std::string> ListMultiAccountTagKeysResult::getTagKeys()const
{
return tagKeys_;
}
bool ListMultiAccountTagKeysResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,81 @@
/*
* 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/resourcecenter/model/ListMultiAccountTagValuesRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListMultiAccountTagValuesRequest;
ListMultiAccountTagValuesRequest::ListMultiAccountTagValuesRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListMultiAccountTagValues") {
setMethod(HttpRequest::Method::Post);
}
ListMultiAccountTagValuesRequest::~ListMultiAccountTagValuesRequest() {}
std::string ListMultiAccountTagValuesRequest::getNextToken() const {
return nextToken_;
}
void ListMultiAccountTagValuesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string ListMultiAccountTagValuesRequest::getScope() const {
return scope_;
}
void ListMultiAccountTagValuesRequest::setScope(const std::string &scope) {
scope_ = scope;
setParameter(std::string("Scope"), scope);
}
std::string ListMultiAccountTagValuesRequest::getMatchType() const {
return matchType_;
}
void ListMultiAccountTagValuesRequest::setMatchType(const std::string &matchType) {
matchType_ = matchType;
setParameter(std::string("MatchType"), matchType);
}
std::string ListMultiAccountTagValuesRequest::getTagValue() const {
return tagValue_;
}
void ListMultiAccountTagValuesRequest::setTagValue(const std::string &tagValue) {
tagValue_ = tagValue;
setParameter(std::string("TagValue"), tagValue);
}
int ListMultiAccountTagValuesRequest::getMaxResults() const {
return maxResults_;
}
void ListMultiAccountTagValuesRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::string ListMultiAccountTagValuesRequest::getTagKey() const {
return tagKey_;
}
void ListMultiAccountTagValuesRequest::setTagKey(const std::string &tagKey) {
tagKey_ = tagKey;
setParameter(std::string("TagKey"), tagKey);
}

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.
*/
#include <alibabacloud/resourcecenter/model/ListMultiAccountTagValuesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
ListMultiAccountTagValuesResult::ListMultiAccountTagValuesResult() :
ServiceResult()
{}
ListMultiAccountTagValuesResult::ListMultiAccountTagValuesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListMultiAccountTagValuesResult::~ListMultiAccountTagValuesResult()
{}
void ListMultiAccountTagValuesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagValues = value["TagValues"]["TagValue"];
for (const auto &item : allTagValues)
tagValues_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListMultiAccountTagValuesResult::getNextToken()const
{
return nextToken_;
}
std::string ListMultiAccountTagValuesResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListMultiAccountTagValuesResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListMultiAccountTagValuesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMultiAccountTagValuesResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<std::string> ListMultiAccountTagValuesResult::getTagValues()const
{
return tagValues_;
}
bool ListMultiAccountTagValuesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,53 @@
/*
* 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/resourcecenter/model/ListResourceTypesRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListResourceTypesRequest;
ListResourceTypesRequest::ListResourceTypesRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListResourceTypes") {
setMethod(HttpRequest::Method::Post);
}
ListResourceTypesRequest::~ListResourceTypesRequest() {}
std::vector<std::string> ListResourceTypesRequest::getQuery() const {
return query_;
}
void ListResourceTypesRequest::setQuery(const std::vector<std::string> &query) {
query_ = query;
}
std::string ListResourceTypesRequest::getResourceType() const {
return resourceType_;
}
void ListResourceTypesRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string ListResourceTypesRequest::getAcceptLanguage() const {
return acceptLanguage_;
}
void ListResourceTypesRequest::setAcceptLanguage(const std::string &acceptLanguage) {
acceptLanguage_ = acceptLanguage;
setParameter(std::string("AcceptLanguage"), acceptLanguage);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/resourcecenter/model/ListResourceTypesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
ListResourceTypesResult::ListResourceTypesResult() :
ServiceResult()
{}
ListResourceTypesResult::ListResourceTypesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListResourceTypesResult::~ListResourceTypesResult()
{}
void ListResourceTypesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResourceTypesNode = value["ResourceTypes"]["ResourceType"];
for (auto valueResourceTypesResourceType : allResourceTypesNode)
{
ResourceType resourceTypesObject;
if(!valueResourceTypesResourceType["ResourceType"].isNull())
resourceTypesObject.resourceType = valueResourceTypesResourceType["ResourceType"].asString();
if(!valueResourceTypesResourceType["ProductName"].isNull())
resourceTypesObject.productName = valueResourceTypesResourceType["ProductName"].asString();
if(!valueResourceTypesResourceType["ResourceTypeName"].isNull())
resourceTypesObject.resourceTypeName = valueResourceTypesResourceType["ResourceTypeName"].asString();
auto codeMappingNode = value["CodeMapping"];
if(!codeMappingNode["ResourceGroup"].isNull())
resourceTypesObject.codeMapping.resourceGroup = codeMappingNode["ResourceGroup"].asString();
if(!codeMappingNode["Tag"].isNull())
resourceTypesObject.codeMapping.tag = codeMappingNode["Tag"].asString();
auto urlsNode = value["Urls"];
if(!urlsNode["ProductConsoleUrl"].isNull())
resourceTypesObject.urls.productConsoleUrl = urlsNode["ProductConsoleUrl"].asString();
if(!urlsNode["ResourceConsoleUrl"].isNull())
resourceTypesObject.urls.resourceConsoleUrl = urlsNode["ResourceConsoleUrl"].asString();
auto allFilterKeys = value["FilterKeys"]["FilterKey"];
for (auto value : allFilterKeys)
resourceTypesObject.filterKeys.push_back(value.asString());
resourceTypes_.push_back(resourceTypesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::vector<ListResourceTypesResult::ResourceType> ListResourceTypesResult::getResourceTypes()const
{
return resourceTypes_;
}
std::string ListResourceTypesResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListResourceTypesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListResourceTypesResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListResourceTypesResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListResourceTypesResult::getSuccess()const
{
return success_;
}

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/resourcecenter/model/ListTagKeysRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListTagKeysRequest;
ListTagKeysRequest::ListTagKeysRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListTagKeys") {
setMethod(HttpRequest::Method::Post);
}
ListTagKeysRequest::~ListTagKeysRequest() {}
std::string ListTagKeysRequest::getNextToken() const {
return nextToken_;
}
void ListTagKeysRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string ListTagKeysRequest::getMatchType() const {
return matchType_;
}
void ListTagKeysRequest::setMatchType(const std::string &matchType) {
matchType_ = matchType;
setParameter(std::string("MatchType"), matchType);
}
int ListTagKeysRequest::getMaxResults() const {
return maxResults_;
}
void ListTagKeysRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
std::string ListTagKeysRequest::getTagKey() const {
return tagKey_;
}
void ListTagKeysRequest::setTagKey(const std::string &tagKey) {
tagKey_ = tagKey;
setParameter(std::string("TagKey"), tagKey);
}

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.
*/
#include <alibabacloud/resourcecenter/model/ListTagKeysResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::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 allTagKeys = value["TagKeys"]["TagKey"];
for (const auto &item : allTagKeys)
tagKeys_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListTagKeysResult::getNextToken()const
{
return nextToken_;
}
std::string ListTagKeysResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListTagKeysResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListTagKeysResult::getErrorCode()const
{
return errorCode_;
}
std::string ListTagKeysResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<std::string> ListTagKeysResult::getTagKeys()const
{
return tagKeys_;
}
bool ListTagKeysResult::getSuccess()const
{
return success_;
}

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/resourcecenter/model/ListTagValuesRequest.h>
using AlibabaCloud::ResourceCenter::Model::ListTagValuesRequest;
ListTagValuesRequest::ListTagValuesRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "ListTagValues") {
setMethod(HttpRequest::Method::Post);
}
ListTagValuesRequest::~ListTagValuesRequest() {}
std::string ListTagValuesRequest::getNextToken() const {
return nextToken_;
}
void ListTagValuesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string ListTagValuesRequest::getMatchType() const {
return matchType_;
}
void ListTagValuesRequest::setMatchType(const std::string &matchType) {
matchType_ = matchType;
setParameter(std::string("MatchType"), matchType);
}
std::string ListTagValuesRequest::getTagValue() const {
return tagValue_;
}
void ListTagValuesRequest::setTagValue(const std::string &tagValue) {
tagValue_ = tagValue;
setParameter(std::string("TagValue"), tagValue);
}
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,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.
*/
#include <alibabacloud/resourcecenter/model/ListTagValuesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::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 allTagValues = value["TagValues"]["TagValue"];
for (const auto &item : allTagValues)
tagValues_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListTagValuesResult::getNextToken()const
{
return nextToken_;
}
std::string ListTagValuesResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string ListTagValuesResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string ListTagValuesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListTagValuesResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<std::string> ListTagValuesResult::getTagValues()const
{
return tagValues_;
}
bool ListTagValuesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/resourcecenter/model/SearchMultiAccountResourcesRequest.h>
using AlibabaCloud::ResourceCenter::Model::SearchMultiAccountResourcesRequest;
SearchMultiAccountResourcesRequest::SearchMultiAccountResourcesRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "SearchMultiAccountResources") {
setMethod(HttpRequest::Method::Post);
}
SearchMultiAccountResourcesRequest::~SearchMultiAccountResourcesRequest() {}
std::string SearchMultiAccountResourcesRequest::getNextToken() const {
return nextToken_;
}
void SearchMultiAccountResourcesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string SearchMultiAccountResourcesRequest::getScope() const {
return scope_;
}
void SearchMultiAccountResourcesRequest::setScope(const std::string &scope) {
scope_ = scope;
setParameter(std::string("Scope"), scope);
}
SearchMultiAccountResourcesRequest::SortCriterion SearchMultiAccountResourcesRequest::getSortCriterion() const {
return sortCriterion_;
}
void SearchMultiAccountResourcesRequest::setSortCriterion(const SearchMultiAccountResourcesRequest::SortCriterion &sortCriterion) {
sortCriterion_ = sortCriterion;
setParameter(std::string("SortCriterion") + ".Key", sortCriterion.key);
setParameter(std::string("SortCriterion") + ".Order", sortCriterion.order);
}
std::vector<SearchMultiAccountResourcesRequest::Filter> SearchMultiAccountResourcesRequest::getFilter() const {
return filter_;
}
void SearchMultiAccountResourcesRequest::setFilter(const std::vector<SearchMultiAccountResourcesRequest::Filter> &filter) {
filter_ = filter;
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
auto filterObj = filter.at(dep1);
std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
setParameter(filterObjStr + ".MatchType", filterObj.matchType);
setParameter(filterObjStr + ".Key", filterObj.key);
}
}
int SearchMultiAccountResourcesRequest::getMaxResults() const {
return maxResults_;
}
void SearchMultiAccountResourcesRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}

View File

@@ -0,0 +1,123 @@
/*
* 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/resourcecenter/model/SearchMultiAccountResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
SearchMultiAccountResourcesResult::SearchMultiAccountResourcesResult() :
ServiceResult()
{}
SearchMultiAccountResourcesResult::SearchMultiAccountResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchMultiAccountResourcesResult::~SearchMultiAccountResourcesResult()
{}
void SearchMultiAccountResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFiltersNode = value["Filters"]["Filter"];
for (auto valueFiltersFilter : allFiltersNode)
{
Filter filtersObject;
if(!valueFiltersFilter["Key"].isNull())
filtersObject.key = valueFiltersFilter["Key"].asString();
if(!valueFiltersFilter["MatchType"].isNull())
filtersObject.matchType = valueFiltersFilter["MatchType"].asString();
auto allValues = value["Values"]["Value"];
for (auto value : allValues)
filtersObject.values.push_back(value.asString());
filters_.push_back(filtersObject);
}
auto allResourcesNode = value["Resources"]["Resource"];
for (auto valueResourcesResource : allResourcesNode)
{
Resource resourcesObject;
if(!valueResourcesResource["ResourceType"].isNull())
resourcesObject.resourceType = valueResourcesResource["ResourceType"].asString();
if(!valueResourcesResource["CreateTime"].isNull())
resourcesObject.createTime = valueResourcesResource["CreateTime"].asString();
if(!valueResourcesResource["ResourceGroupId"].isNull())
resourcesObject.resourceGroupId = valueResourcesResource["ResourceGroupId"].asString();
if(!valueResourcesResource["ZoneId"].isNull())
resourcesObject.zoneId = valueResourcesResource["ZoneId"].asString();
if(!valueResourcesResource["AccountId"].isNull())
resourcesObject.accountId = valueResourcesResource["AccountId"].asString();
if(!valueResourcesResource["ResourceId"].isNull())
resourcesObject.resourceId = valueResourcesResource["ResourceId"].asString();
if(!valueResourcesResource["ResourceName"].isNull())
resourcesObject.resourceName = valueResourcesResource["ResourceName"].asString();
if(!valueResourcesResource["RegionId"].isNull())
resourcesObject.regionId = valueResourcesResource["RegionId"].asString();
auto allTagsNode = valueResourcesResource["Tags"]["Tag"];
for (auto valueResourcesResourceTagsTag : allTagsNode)
{
Resource::Tag tagsObject;
if(!valueResourcesResourceTagsTag["Key"].isNull())
tagsObject.key = valueResourcesResourceTagsTag["Key"].asString();
if(!valueResourcesResourceTagsTag["Value"].isNull())
tagsObject.value = valueResourcesResourceTagsTag["Value"].asString();
resourcesObject.tags.push_back(tagsObject);
}
auto allIpAddresses = value["IpAddresses"]["IpAddress"];
for (auto value : allIpAddresses)
resourcesObject.ipAddresses.push_back(value.asString());
resources_.push_back(resourcesObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["Scope"].isNull())
scope_ = value["Scope"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}
std::vector<SearchMultiAccountResourcesResult::Filter> SearchMultiAccountResourcesResult::getFilters()const
{
return filters_;
}
std::string SearchMultiAccountResourcesResult::getNextToken()const
{
return nextToken_;
}
std::string SearchMultiAccountResourcesResult::getScope()const
{
return scope_;
}
int SearchMultiAccountResourcesResult::getMaxResults()const
{
return maxResults_;
}
std::vector<SearchMultiAccountResourcesResult::Resource> SearchMultiAccountResourcesResult::getResources()const
{
return resources_;
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/resourcecenter/model/SearchResourcesRequest.h>
using AlibabaCloud::ResourceCenter::Model::SearchResourcesRequest;
SearchResourcesRequest::SearchResourcesRequest()
: RpcServiceRequest("resourcecenter", "2022-12-01", "SearchResources") {
setMethod(HttpRequest::Method::Post);
}
SearchResourcesRequest::~SearchResourcesRequest() {}
std::string SearchResourcesRequest::getResourceGroupId() const {
return resourceGroupId_;
}
void SearchResourcesRequest::setResourceGroupId(const std::string &resourceGroupId) {
resourceGroupId_ = resourceGroupId;
setParameter(std::string("ResourceGroupId"), resourceGroupId);
}
std::string SearchResourcesRequest::getNextToken() const {
return nextToken_;
}
void SearchResourcesRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
SearchResourcesRequest::SortCriterion SearchResourcesRequest::getSortCriterion() const {
return sortCriterion_;
}
void SearchResourcesRequest::setSortCriterion(const SearchResourcesRequest::SortCriterion &sortCriterion) {
sortCriterion_ = sortCriterion;
setParameter(std::string("SortCriterion") + ".Key", sortCriterion.key);
setParameter(std::string("SortCriterion") + ".Order", sortCriterion.order);
}
std::vector<SearchResourcesRequest::Filter> SearchResourcesRequest::getFilter() const {
return filter_;
}
void SearchResourcesRequest::setFilter(const std::vector<SearchResourcesRequest::Filter> &filter) {
filter_ = filter;
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
auto filterObj = filter.at(dep1);
std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
setParameter(filterObjStr + ".MatchType", filterObj.matchType);
setParameter(filterObjStr + ".Key", filterObj.key);
}
}
int SearchResourcesRequest::getMaxResults() const {
return maxResults_;
}
void SearchResourcesRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}

View File

@@ -0,0 +1,116 @@
/*
* 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/resourcecenter/model/SearchResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ResourceCenter;
using namespace AlibabaCloud::ResourceCenter::Model;
SearchResourcesResult::SearchResourcesResult() :
ServiceResult()
{}
SearchResourcesResult::SearchResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchResourcesResult::~SearchResourcesResult()
{}
void SearchResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFiltersNode = value["Filters"]["Filter"];
for (auto valueFiltersFilter : allFiltersNode)
{
Filter filtersObject;
if(!valueFiltersFilter["Key"].isNull())
filtersObject.key = valueFiltersFilter["Key"].asString();
if(!valueFiltersFilter["MatchType"].isNull())
filtersObject.matchType = valueFiltersFilter["MatchType"].asString();
auto allValues = value["Values"]["Value"];
for (auto value : allValues)
filtersObject.values.push_back(value.asString());
filters_.push_back(filtersObject);
}
auto allResourcesNode = value["Resources"]["Resource"];
for (auto valueResourcesResource : allResourcesNode)
{
Resource resourcesObject;
if(!valueResourcesResource["ResourceType"].isNull())
resourcesObject.resourceType = valueResourcesResource["ResourceType"].asString();
if(!valueResourcesResource["CreateTime"].isNull())
resourcesObject.createTime = valueResourcesResource["CreateTime"].asString();
if(!valueResourcesResource["ResourceGroupId"].isNull())
resourcesObject.resourceGroupId = valueResourcesResource["ResourceGroupId"].asString();
if(!valueResourcesResource["ZoneId"].isNull())
resourcesObject.zoneId = valueResourcesResource["ZoneId"].asString();
if(!valueResourcesResource["AccountId"].isNull())
resourcesObject.accountId = valueResourcesResource["AccountId"].asString();
if(!valueResourcesResource["ResourceId"].isNull())
resourcesObject.resourceId = valueResourcesResource["ResourceId"].asString();
if(!valueResourcesResource["ResourceName"].isNull())
resourcesObject.resourceName = valueResourcesResource["ResourceName"].asString();
if(!valueResourcesResource["RegionId"].isNull())
resourcesObject.regionId = valueResourcesResource["RegionId"].asString();
auto allTagsNode = valueResourcesResource["Tags"]["Tag"];
for (auto valueResourcesResourceTagsTag : allTagsNode)
{
Resource::Tag tagsObject;
if(!valueResourcesResourceTagsTag["Key"].isNull())
tagsObject.key = valueResourcesResourceTagsTag["Key"].asString();
if(!valueResourcesResourceTagsTag["Value"].isNull())
tagsObject.value = valueResourcesResourceTagsTag["Value"].asString();
resourcesObject.tags.push_back(tagsObject);
}
auto allIpAddresses = value["IpAddresses"]["IpAddress"];
for (auto value : allIpAddresses)
resourcesObject.ipAddresses.push_back(value.asString());
resources_.push_back(resourcesObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}
std::vector<SearchResourcesResult::Filter> SearchResourcesResult::getFilters()const
{
return filters_;
}
std::string SearchResourcesResult::getNextToken()const
{
return nextToken_;
}
int SearchResourcesResult::getMaxResults()const
{
return maxResults_;
}
std::vector<SearchResourcesResult::Resource> SearchResourcesResult::getResources()const
{
return resources_;
}