Generated 2020-06-01 for SWAS-OPEN.
This commit is contained in:
@@ -555,6 +555,42 @@ SWAS_OPENClient::DeleteSnapshotsOutcomeCallable SWAS_OPENClient::deleteSnapshots
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::DescribeCloudAssistantAttributesOutcome SWAS_OPENClient::describeCloudAssistantAttributes(const DescribeCloudAssistantAttributesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeCloudAssistantAttributesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeCloudAssistantAttributesOutcome(DescribeCloudAssistantAttributesResult(outcome.result()));
|
||||
else
|
||||
return DescribeCloudAssistantAttributesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SWAS_OPENClient::describeCloudAssistantAttributesAsync(const DescribeCloudAssistantAttributesRequest& request, const DescribeCloudAssistantAttributesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeCloudAssistantAttributes(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SWAS_OPENClient::DescribeCloudAssistantAttributesOutcomeCallable SWAS_OPENClient::describeCloudAssistantAttributesCallable(const DescribeCloudAssistantAttributesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeCloudAssistantAttributesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeCloudAssistantAttributes(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::DescribeCloudAssistantStatusOutcome SWAS_OPENClient::describeCloudAssistantStatus(const DescribeCloudAssistantStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1707,6 +1743,42 @@ SWAS_OPENClient::ListSnapshotsOutcomeCallable SWAS_OPENClient::listSnapshotsCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::ListTagResourcesOutcome SWAS_OPENClient::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 SWAS_OPENClient::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));
|
||||
}
|
||||
|
||||
SWAS_OPENClient::ListTagResourcesOutcomeCallable SWAS_OPENClient::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();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::LoginInstanceOutcome SWAS_OPENClient::loginInstance(const LoginInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2499,6 +2571,78 @@ SWAS_OPENClient::StopInstancesOutcomeCallable SWAS_OPENClient::stopInstancesCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::TagResourcesOutcome SWAS_OPENClient::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 SWAS_OPENClient::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));
|
||||
}
|
||||
|
||||
SWAS_OPENClient::TagResourcesOutcomeCallable SWAS_OPENClient::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();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::UntagResourcesOutcome SWAS_OPENClient::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 SWAS_OPENClient::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));
|
||||
}
|
||||
|
||||
SWAS_OPENClient::UntagResourcesOutcomeCallable SWAS_OPENClient::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();
|
||||
}
|
||||
|
||||
SWAS_OPENClient::UpdateCommandAttributeOutcome SWAS_OPENClient::updateCommandAttribute(const UpdateCommandAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -79,6 +79,20 @@ void CreateCommandRequest::setRegionId(const std::string ®ionId) {
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::vector<CreateCommandRequest::Tag> CreateCommandRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateCommandRequest::setTag(const std::vector<CreateCommandRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateCommandRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,20 @@ void CreateCustomImageRequest::setImageName(const std::string &imageName) {
|
||||
setParameter(std::string("ImageName"), imageName);
|
||||
}
|
||||
|
||||
std::vector<CreateCustomImageRequest::Tag> CreateCustomImageRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateCustomImageRequest::setTag(const std::vector<CreateCustomImageRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateCustomImageRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
@@ -66,3 +66,17 @@ void CreateFirewallRulesRequest::setFirewallRules(const std::vector<CreateFirewa
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateFirewallRulesRequest::Tag> CreateFirewallRulesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateFirewallRulesRequest::setTag(const std::vector<CreateFirewallRulesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,14 @@ void CreateFirewallRulesResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allFirewallRuleIds = value["FirewallRuleIds"]["FirewallRuleIds"];
|
||||
for (const auto &item : allFirewallRuleIds)
|
||||
firewallRuleIds_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateFirewallRulesResult::getFirewallRuleIds()const
|
||||
{
|
||||
return firewallRuleIds_;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,3 +61,17 @@ void CreateSnapshotRequest::setDiskId(const std::string &diskId) {
|
||||
setParameter(std::string("DiskId"), diskId);
|
||||
}
|
||||
|
||||
std::vector<CreateSnapshotRequest::Tag> CreateSnapshotRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateSnapshotRequest::setTag(const std::vector<CreateSnapshotRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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/swas-open/model/DescribeCloudAssistantAttributesRequest.h>
|
||||
|
||||
using AlibabaCloud::SWAS_OPEN::Model::DescribeCloudAssistantAttributesRequest;
|
||||
|
||||
DescribeCloudAssistantAttributesRequest::DescribeCloudAssistantAttributesRequest()
|
||||
: RpcServiceRequest("swas-open", "2020-06-01", "DescribeCloudAssistantAttributes") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeCloudAssistantAttributesRequest::~DescribeCloudAssistantAttributesRequest() {}
|
||||
|
||||
int DescribeCloudAssistantAttributesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeCloudAssistantAttributesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeCloudAssistantAttributesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeCloudAssistantAttributesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::vector<DescribeCloudAssistantAttributesRequest::std::string> DescribeCloudAssistantAttributesRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void DescribeCloudAssistantAttributesRequest::setInstanceIds(const std::vector<DescribeCloudAssistantAttributesRequest::std::string> &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
for(int dep1 = 0; dep1 != instanceIds.size(); dep1++) {
|
||||
setParameter(std::string("InstanceIds") + "." + std::to_string(dep1 + 1), instanceIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
int DescribeCloudAssistantAttributesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeCloudAssistantAttributesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
@@ -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/swas-open/model/DescribeCloudAssistantAttributesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::SWAS_OPEN;
|
||||
using namespace AlibabaCloud::SWAS_OPEN::Model;
|
||||
|
||||
DescribeCloudAssistantAttributesResult::DescribeCloudAssistantAttributesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeCloudAssistantAttributesResult::DescribeCloudAssistantAttributesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeCloudAssistantAttributesResult::~DescribeCloudAssistantAttributesResult()
|
||||
{}
|
||||
|
||||
void DescribeCloudAssistantAttributesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCloudAssistantNode = value["CloudAssistant"]["status"];
|
||||
for (auto valueCloudAssistantstatus : allCloudAssistantNode)
|
||||
{
|
||||
Status cloudAssistantObject;
|
||||
if(!valueCloudAssistantstatus["InstanceId"].isNull())
|
||||
cloudAssistantObject.instanceId = valueCloudAssistantstatus["InstanceId"].asString();
|
||||
if(!valueCloudAssistantstatus["CloudAssistantStatus"].isNull())
|
||||
cloudAssistantObject.cloudAssistantStatus = valueCloudAssistantstatus["CloudAssistantStatus"].asString();
|
||||
if(!valueCloudAssistantstatus["LastInvokedTime"].isNull())
|
||||
cloudAssistantObject.lastInvokedTime = valueCloudAssistantstatus["LastInvokedTime"].asString();
|
||||
if(!valueCloudAssistantstatus["CloudAssistantVersion"].isNull())
|
||||
cloudAssistantObject.cloudAssistantVersion = valueCloudAssistantstatus["CloudAssistantVersion"].asString();
|
||||
if(!valueCloudAssistantstatus["ActiveTaskCount"].isNull())
|
||||
cloudAssistantObject.activeTaskCount = std::stol(valueCloudAssistantstatus["ActiveTaskCount"].asString());
|
||||
if(!valueCloudAssistantstatus["InvocationCount"].isNull())
|
||||
cloudAssistantObject.invocationCount = std::stol(valueCloudAssistantstatus["InvocationCount"].asString());
|
||||
if(!valueCloudAssistantstatus["LastHeartbeatTime"].isNull())
|
||||
cloudAssistantObject.lastHeartbeatTime = valueCloudAssistantstatus["LastHeartbeatTime"].asString();
|
||||
if(!valueCloudAssistantstatus["OSType"].isNull())
|
||||
cloudAssistantObject.oSType = valueCloudAssistantstatus["OSType"].asString();
|
||||
if(!valueCloudAssistantstatus["SupportSessionManager"].isNull())
|
||||
cloudAssistantObject.supportSessionManager = valueCloudAssistantstatus["SupportSessionManager"].asString() == "true";
|
||||
cloudAssistant_.push_back(cloudAssistantObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeCloudAssistantAttributesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<DescribeCloudAssistantAttributesResult::Status> DescribeCloudAssistantAttributesResult::getCloudAssistant()const
|
||||
{
|
||||
return cloudAssistant_;
|
||||
}
|
||||
|
||||
int DescribeCloudAssistantAttributesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeCloudAssistantAttributesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
@@ -70,15 +70,6 @@ void DescribeCommandsRequest::setProvider(const std::string &provider) {
|
||||
setParameter(std::string("Provider"), provider);
|
||||
}
|
||||
|
||||
std::string DescribeCommandsRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeCommandsRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string DescribeCommandsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
@@ -88,3 +79,26 @@ void DescribeCommandsRequest::setPageSize(const std::string &pageSize) {
|
||||
setParameter(std::string("PageSize"), pageSize);
|
||||
}
|
||||
|
||||
std::vector<DescribeCommandsRequest::Tag> DescribeCommandsRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void DescribeCommandsRequest::setTag(const std::vector<DescribeCommandsRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string DescribeCommandsRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeCommandsRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,16 @@ void DescribeCommandsResult::parse(const std::string &payload)
|
||||
commandsObject.commandContent = valueCommandscommand["CommandContent"].asString();
|
||||
if(!valueCommandscommand["EnableParameter"].isNull())
|
||||
commandsObject.enableParameter = valueCommandscommand["EnableParameter"].asString() == "true";
|
||||
auto allTagsNode = valueCommandscommand["Tags"]["tag"];
|
||||
for (auto valueCommandscommandTagstag : allTagsNode)
|
||||
{
|
||||
Command::Tag tagsObject;
|
||||
if(!valueCommandscommandTagstag["Key"].isNull())
|
||||
tagsObject.key = valueCommandscommandTagstag["Key"].asString();
|
||||
if(!valueCommandscommandTagstag["Value"].isNull())
|
||||
tagsObject.value = valueCommandscommandTagstag["Value"].asString();
|
||||
commandsObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allParameterDefinitionsNode = valueCommandscommand["ParameterDefinitions"]["parameterDefinition"];
|
||||
for (auto valueCommandscommandParameterDefinitionsparameterDefinition : allParameterDefinitionsNode)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,15 @@ void ListCustomImagesRequest::setPageNumber(int pageNumber) {
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListCustomImagesRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void ListCustomImagesRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string ListCustomImagesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
@@ -88,6 +97,20 @@ void ListCustomImagesRequest::setPageSize(int pageSize) {
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::vector<ListCustomImagesRequest::Tag> ListCustomImagesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListCustomImagesRequest::setTag(const std::vector<ListCustomImagesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListCustomImagesRequest::getImageIds() const {
|
||||
return imageIds_;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,18 @@ void ListCustomImagesResult::parse(const std::string &payload)
|
||||
customImagesObject.status = valueCustomImagesCustomImage["Status"].asString();
|
||||
if(!valueCustomImagesCustomImage["InstanceName"].isNull())
|
||||
customImagesObject.instanceName = valueCustomImagesCustomImage["InstanceName"].asString();
|
||||
if(!valueCustomImagesCustomImage["ResourceGroupId"].isNull())
|
||||
customImagesObject.resourceGroupId = valueCustomImagesCustomImage["ResourceGroupId"].asString();
|
||||
auto allTagsNode = valueCustomImagesCustomImage["Tags"]["tag"];
|
||||
for (auto valueCustomImagesCustomImageTagstag : allTagsNode)
|
||||
{
|
||||
CustomImage::Tag tagsObject;
|
||||
if(!valueCustomImagesCustomImageTagstag["Key"].isNull())
|
||||
tagsObject.key = valueCustomImagesCustomImageTagstag["Key"].asString();
|
||||
if(!valueCustomImagesCustomImageTagstag["Value"].isNull())
|
||||
tagsObject.value = valueCustomImagesCustomImageTagstag["Value"].asString();
|
||||
customImagesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
customImages_.push_back(customImagesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
@@ -79,3 +79,17 @@ void ListDisksRequest::setDiskIds(const std::string &diskIds) {
|
||||
setParameter(std::string("DiskIds"), diskIds);
|
||||
}
|
||||
|
||||
std::vector<ListDisksRequest::Tag> ListDisksRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListDisksRequest::setTag(const std::vector<ListDisksRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,16 @@ void ListDisksResult::parse(const std::string &payload)
|
||||
disksObject.remark = valueDisksDisk["Remark"].asString();
|
||||
if(!valueDisksDisk["InstanceName"].isNull())
|
||||
disksObject.instanceName = valueDisksDisk["InstanceName"].asString();
|
||||
auto allTagsNode = valueDisksDisk["Tags"]["tag"];
|
||||
for (auto valueDisksDiskTagstag : allTagsNode)
|
||||
{
|
||||
Disk::Tag tagsObject;
|
||||
if(!valueDisksDiskTagstag["Key"].isNull())
|
||||
tagsObject.key = valueDisksDiskTagstag["Key"].asString();
|
||||
if(!valueDisksDiskTagstag["Value"].isNull())
|
||||
tagsObject.value = valueDisksDiskTagstag["Value"].asString();
|
||||
disksObject.tags.push_back(tagsObject);
|
||||
}
|
||||
disks_.push_back(disksObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
@@ -61,3 +61,26 @@ void ListFirewallRulesRequest::setPageSize(int pageSize) {
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListFirewallRulesRequest::getFirewallRuleId() const {
|
||||
return firewallRuleId_;
|
||||
}
|
||||
|
||||
void ListFirewallRulesRequest::setFirewallRuleId(const std::string &firewallRuleId) {
|
||||
firewallRuleId_ = firewallRuleId;
|
||||
setParameter(std::string("FirewallRuleId"), firewallRuleId);
|
||||
}
|
||||
|
||||
std::vector<ListFirewallRulesRequest::Tag> ListFirewallRulesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListFirewallRulesRequest::setTag(const std::vector<ListFirewallRulesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,16 @@ void ListFirewallRulesResult::parse(const std::string &payload)
|
||||
firewallRulesObject.policy = valueFirewallRulesFirewallRule["Policy"].asString();
|
||||
if(!valueFirewallRulesFirewallRule["SourceCidrIp"].isNull())
|
||||
firewallRulesObject.sourceCidrIp = valueFirewallRulesFirewallRule["SourceCidrIp"].asString();
|
||||
auto allTagsNode = valueFirewallRulesFirewallRule["Tags"]["tag"];
|
||||
for (auto valueFirewallRulesFirewallRuleTagstag : allTagsNode)
|
||||
{
|
||||
FirewallRule::Tag tagsObject;
|
||||
if(!valueFirewallRulesFirewallRuleTagstag["Key"].isNull())
|
||||
tagsObject.key = valueFirewallRulesFirewallRuleTagstag["Key"].asString();
|
||||
if(!valueFirewallRulesFirewallRuleTagstag["Value"].isNull())
|
||||
tagsObject.value = valueFirewallRulesFirewallRuleTagstag["Value"].asString();
|
||||
firewallRulesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
firewallRules_.push_back(firewallRulesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
@@ -43,15 +43,6 @@ void ListInstancesRequest::setRegionId(const std::string ®ionId) {
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ListInstancesRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void ListInstancesRequest::setInstanceIds(const std::string &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
setParameter(std::string("InstanceIds"), instanceIds);
|
||||
}
|
||||
|
||||
int ListInstancesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
@@ -70,6 +61,29 @@ void ListInstancesRequest::setPublicIpAddresses(const std::string &publicIpAddre
|
||||
setParameter(std::string("PublicIpAddresses"), publicIpAddresses);
|
||||
}
|
||||
|
||||
std::vector<ListInstancesRequest::Tag> ListInstancesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListInstancesRequest::setTag(const std::vector<ListInstancesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListInstancesRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void ListInstancesRequest::setInstanceIds(const std::string &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
setParameter(std::string("InstanceIds"), instanceIds);
|
||||
}
|
||||
|
||||
std::string ListInstancesRequest::getChargeType() const {
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,54 @@ void ListInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.combinationInstanceId = valueInstancesInstance["CombinationInstanceId"].asString();
|
||||
if(!valueInstancesInstance["Uuid"].isNull())
|
||||
instancesObject.uuid = valueInstancesInstance["Uuid"].asString();
|
||||
auto allTagsNode = valueInstancesInstance["Tags"]["tag"];
|
||||
for (auto valueInstancesInstanceTagstag : allTagsNode)
|
||||
{
|
||||
Instance::Tag tagsObject;
|
||||
if(!valueInstancesInstanceTagstag["Key"].isNull())
|
||||
tagsObject.key = valueInstancesInstanceTagstag["Key"].asString();
|
||||
if(!valueInstancesInstanceTagstag["Value"].isNull())
|
||||
tagsObject.value = valueInstancesInstanceTagstag["Value"].asString();
|
||||
instancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allDisksNode = valueInstancesInstance["Disks"]["disk"];
|
||||
for (auto valueInstancesInstanceDisksdisk : allDisksNode)
|
||||
{
|
||||
Instance::Disk disksObject;
|
||||
if(!valueInstancesInstanceDisksdisk["CreationTime"].isNull())
|
||||
disksObject.creationTime = valueInstancesInstanceDisksdisk["CreationTime"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["Status"].isNull())
|
||||
disksObject.status = valueInstancesInstanceDisksdisk["Status"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["Device"].isNull())
|
||||
disksObject.device = valueInstancesInstanceDisksdisk["Device"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["Size"].isNull())
|
||||
disksObject.size = std::stoi(valueInstancesInstanceDisksdisk["Size"].asString());
|
||||
if(!valueInstancesInstanceDisksdisk["DiskName"].isNull())
|
||||
disksObject.diskName = valueInstancesInstanceDisksdisk["DiskName"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["DiskChargeType"].isNull())
|
||||
disksObject.diskChargeType = valueInstancesInstanceDisksdisk["DiskChargeType"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["DiskType"].isNull())
|
||||
disksObject.diskType = valueInstancesInstanceDisksdisk["DiskType"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["Category"].isNull())
|
||||
disksObject.category = valueInstancesInstanceDisksdisk["Category"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["DiskId"].isNull())
|
||||
disksObject.diskId = valueInstancesInstanceDisksdisk["DiskId"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["RegionId"].isNull())
|
||||
disksObject.regionId = valueInstancesInstanceDisksdisk["RegionId"].asString();
|
||||
if(!valueInstancesInstanceDisksdisk["Remark"].isNull())
|
||||
disksObject.remark = valueInstancesInstanceDisksdisk["Remark"].asString();
|
||||
auto allDiskTagsNode = valueInstancesInstanceDisksdisk["DiskTags"]["tag"];
|
||||
for (auto valueInstancesInstanceDisksdiskDiskTagstag : allDiskTagsNode)
|
||||
{
|
||||
Instance::Disk::Tag1 diskTagsObject;
|
||||
if(!valueInstancesInstanceDisksdiskDiskTagstag["Key"].isNull())
|
||||
diskTagsObject.key = valueInstancesInstanceDisksdiskDiskTagstag["Key"].asString();
|
||||
if(!valueInstancesInstanceDisksdiskDiskTagstag["Value"].isNull())
|
||||
diskTagsObject.value = valueInstancesInstanceDisksdiskDiskTagstag["Value"].asString();
|
||||
disksObject.diskTags.push_back(diskTagsObject);
|
||||
}
|
||||
instancesObject.disks.push_back(disksObject);
|
||||
}
|
||||
auto resourceSpecNode = value["ResourceSpec"];
|
||||
if(!resourceSpecNode["DiskCategory"].isNull())
|
||||
instancesObject.resourceSpec.diskCategory = resourceSpecNode["DiskCategory"].asString();
|
||||
|
||||
@@ -25,3 +25,12 @@ ListRegionsRequest::ListRegionsRequest()
|
||||
|
||||
ListRegionsRequest::~ListRegionsRequest() {}
|
||||
|
||||
std::string ListRegionsRequest::getAcceptLanguage() const {
|
||||
return acceptLanguage_;
|
||||
}
|
||||
|
||||
void ListRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) {
|
||||
acceptLanguage_ = acceptLanguage;
|
||||
setParameter(std::string("AcceptLanguage"), acceptLanguage);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,15 +34,6 @@ void ListSnapshotsRequest::setSnapshotIds(const std::string &snapshotIds) {
|
||||
setParameter(std::string("SnapshotIds"), snapshotIds);
|
||||
}
|
||||
|
||||
std::string ListSnapshotsRequest::getSourceDiskType() const {
|
||||
return sourceDiskType_;
|
||||
}
|
||||
|
||||
void ListSnapshotsRequest::setSourceDiskType(const std::string &sourceDiskType) {
|
||||
sourceDiskType_ = sourceDiskType;
|
||||
setParameter(std::string("SourceDiskType"), sourceDiskType);
|
||||
}
|
||||
|
||||
int ListSnapshotsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
@@ -52,15 +43,6 @@ void ListSnapshotsRequest::setPageNumber(int pageNumber) {
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListSnapshotsRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListSnapshotsRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
std::string ListSnapshotsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
@@ -88,3 +70,35 @@ void ListSnapshotsRequest::setDiskId(const std::string &diskId) {
|
||||
setParameter(std::string("DiskId"), diskId);
|
||||
}
|
||||
|
||||
std::vector<ListSnapshotsRequest::Tag> ListSnapshotsRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListSnapshotsRequest::setTag(const std::vector<ListSnapshotsRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListSnapshotsRequest::getSourceDiskType() const {
|
||||
return sourceDiskType_;
|
||||
}
|
||||
|
||||
void ListSnapshotsRequest::setSourceDiskType(const std::string &sourceDiskType) {
|
||||
sourceDiskType_ = sourceDiskType;
|
||||
setParameter(std::string("SourceDiskType"), sourceDiskType);
|
||||
}
|
||||
|
||||
std::string ListSnapshotsRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListSnapshotsRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,16 @@ void ListSnapshotsResult::parse(const std::string &payload)
|
||||
snapshotsObject.instanceId = valueSnapshotsSnapshot["InstanceId"].asString();
|
||||
if(!valueSnapshotsSnapshot["RollbackTime"].isNull())
|
||||
snapshotsObject.rollbackTime = valueSnapshotsSnapshot["RollbackTime"].asString();
|
||||
auto allTagsNode = valueSnapshotsSnapshot["Tags"]["tag"];
|
||||
for (auto valueSnapshotsSnapshotTagstag : allTagsNode)
|
||||
{
|
||||
Snapshot::Tag tagsObject;
|
||||
if(!valueSnapshotsSnapshotTagstag["Key"].isNull())
|
||||
tagsObject.key = valueSnapshotsSnapshotTagstag["Key"].asString();
|
||||
if(!valueSnapshotsSnapshotTagstag["Value"].isNull())
|
||||
tagsObject.value = valueSnapshotsSnapshotTagstag["Value"].asString();
|
||||
snapshotsObject.tags.push_back(tagsObject);
|
||||
}
|
||||
snapshots_.push_back(snapshotsObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
85
swas-open/src/model/ListTagResourcesRequest.cc
Normal file
85
swas-open/src/model/ListTagResourcesRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/swas-open/model/ListTagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::SWAS_OPEN::Model::ListTagResourcesRequest;
|
||||
|
||||
ListTagResourcesRequest::ListTagResourcesRequest()
|
||||
: RpcServiceRequest("swas-open", "2020-06-01", "ListTagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListTagResourcesRequest::~ListTagResourcesRequest() {}
|
||||
|
||||
std::vector<std::string> ListTagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
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++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
70
swas-open/src/model/ListTagResourcesResult.cc
Normal file
70
swas-open/src/model/ListTagResourcesResult.cc
Normal 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/swas-open/model/ListTagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::SWAS_OPEN;
|
||||
using namespace AlibabaCloud::SWAS_OPEN::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["ResourceType"].isNull())
|
||||
tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString();
|
||||
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();
|
||||
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_;
|
||||
}
|
||||
|
||||
76
swas-open/src/model/TagResourcesRequest.cc
Normal file
76
swas-open/src/model/TagResourcesRequest.cc
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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/swas-open/model/TagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::SWAS_OPEN::Model::TagResourcesRequest;
|
||||
|
||||
TagResourcesRequest::TagResourcesRequest()
|
||||
: RpcServiceRequest("swas-open", "2020-06-01", "TagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TagResourcesRequest::~TagResourcesRequest() {}
|
||||
|
||||
std::vector<std::string> TagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
}
|
||||
|
||||
std::string TagResourcesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string TagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string TagResourcesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
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++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
44
swas-open/src/model/TagResourcesResult.cc
Normal file
44
swas-open/src/model/TagResourcesResult.cc
Normal 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/swas-open/model/TagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::SWAS_OPEN;
|
||||
using namespace AlibabaCloud::SWAS_OPEN::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());
|
||||
|
||||
}
|
||||
|
||||
79
swas-open/src/model/UntagResourcesRequest.cc
Normal file
79
swas-open/src/model/UntagResourcesRequest.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/swas-open/model/UntagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::SWAS_OPEN::Model::UntagResourcesRequest;
|
||||
|
||||
UntagResourcesRequest::UntagResourcesRequest()
|
||||
: RpcServiceRequest("swas-open", "2020-06-01", "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<std::string> UntagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::vector<std::string> UntagResourcesRequest::getTagKey() const {
|
||||
return tagKey_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setTagKey(const std::vector<std::string> &tagKey) {
|
||||
tagKey_ = tagKey;
|
||||
}
|
||||
|
||||
44
swas-open/src/model/UntagResourcesResult.cc
Normal file
44
swas-open/src/model/UntagResourcesResult.cc
Normal 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/swas-open/model/UntagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::SWAS_OPEN;
|
||||
using namespace AlibabaCloud::SWAS_OPEN::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());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user