Supported APIs DescribeSDG,PreloadRegionSDG,UnloadRegionSDG,DeployInstanceSDG,RemoveInstanceSDG.
This commit is contained in:
@@ -2571,6 +2571,42 @@ EnsClient::DeleteVSwitchOutcomeCallable EnsClient::deleteVSwitchCallable(const D
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::DeployInstanceSDGOutcome EnsClient::deployInstanceSDG(const DeployInstanceSDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeployInstanceSDGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeployInstanceSDGOutcome(DeployInstanceSDGResult(outcome.result()));
|
||||
else
|
||||
return DeployInstanceSDGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::deployInstanceSDGAsync(const DeployInstanceSDGRequest& request, const DeployInstanceSDGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deployInstanceSDG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::DeployInstanceSDGOutcomeCallable EnsClient::deployInstanceSDGCallable(const DeployInstanceSDGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeployInstanceSDGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deployInstanceSDG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::DeploySDGOutcome EnsClient::deploySDG(const DeploySDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -5199,6 +5235,42 @@ EnsClient::DescribeResourceTimelineOutcomeCallable EnsClient::describeResourceTi
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::DescribeSDGOutcome EnsClient::describeSDG(const DescribeSDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeSDGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeSDGOutcome(DescribeSDGResult(outcome.result()));
|
||||
else
|
||||
return DescribeSDGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::describeSDGAsync(const DescribeSDGRequest& request, const DescribeSDGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeSDG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::DescribeSDGOutcomeCallable EnsClient::describeSDGCallable(const DescribeSDGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeSDGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeSDG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::DescribeSDGDeploymentStatusOutcome EnsClient::describeSDGDeploymentStatus(const DescribeSDGDeploymentStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -6279,6 +6351,42 @@ EnsClient::ListObjectsOutcomeCallable EnsClient::listObjectsCallable(const ListO
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::ListTagResourcesOutcome EnsClient::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 EnsClient::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));
|
||||
}
|
||||
|
||||
EnsClient::ListTagResourcesOutcomeCallable EnsClient::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();
|
||||
}
|
||||
|
||||
EnsClient::ModifyEnsEipAddressAttributeOutcome EnsClient::modifyEnsEipAddressAttribute(const ModifyEnsEipAddressAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -6819,6 +6927,42 @@ EnsClient::ModifyVSwitchAttributeOutcomeCallable EnsClient::modifyVSwitchAttribu
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::PreloadRegionSDGOutcome EnsClient::preloadRegionSDG(const PreloadRegionSDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PreloadRegionSDGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PreloadRegionSDGOutcome(PreloadRegionSDGResult(outcome.result()));
|
||||
else
|
||||
return PreloadRegionSDGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::preloadRegionSDGAsync(const PreloadRegionSDGRequest& request, const PreloadRegionSDGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, preloadRegionSDG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::PreloadRegionSDGOutcomeCallable EnsClient::preloadRegionSDGCallable(const PreloadRegionSDGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PreloadRegionSDGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->preloadRegionSDG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::PushApplicationDataOutcome EnsClient::pushApplicationData(const PushApplicationDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -7467,6 +7611,42 @@ EnsClient::RemoveBackendServersOutcomeCallable EnsClient::removeBackendServersCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::RemoveInstanceSDGOutcome EnsClient::removeInstanceSDG(const RemoveInstanceSDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RemoveInstanceSDGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RemoveInstanceSDGOutcome(RemoveInstanceSDGResult(outcome.result()));
|
||||
else
|
||||
return RemoveInstanceSDGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::removeInstanceSDGAsync(const RemoveInstanceSDGRequest& request, const RemoveInstanceSDGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, removeInstanceSDG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::RemoveInstanceSDGOutcomeCallable EnsClient::removeInstanceSDGCallable(const RemoveInstanceSDGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RemoveInstanceSDGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->removeInstanceSDG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::RemovePublicIpsFromEpnInstanceOutcome EnsClient::removePublicIpsFromEpnInstance(const RemovePublicIpsFromEpnInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -8691,6 +8871,42 @@ EnsClient::StopSnatIpForSnatEntryOutcomeCallable EnsClient::stopSnatIpForSnatEnt
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::TagResourcesOutcome EnsClient::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 EnsClient::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));
|
||||
}
|
||||
|
||||
EnsClient::TagResourcesOutcomeCallable EnsClient::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();
|
||||
}
|
||||
|
||||
EnsClient::UnAssociateEnsEipAddressOutcome EnsClient::unAssociateEnsEipAddress(const UnAssociateEnsEipAddressRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -8799,6 +9015,78 @@ EnsClient::UnassociateNetworkAclOutcomeCallable EnsClient::unassociateNetworkAcl
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::UnloadRegionSDGOutcome EnsClient::unloadRegionSDG(const UnloadRegionSDGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UnloadRegionSDGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UnloadRegionSDGOutcome(UnloadRegionSDGResult(outcome.result()));
|
||||
else
|
||||
return UnloadRegionSDGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::unloadRegionSDGAsync(const UnloadRegionSDGRequest& request, const UnloadRegionSDGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, unloadRegionSDG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::UnloadRegionSDGOutcomeCallable EnsClient::unloadRegionSDGCallable(const UnloadRegionSDGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UnloadRegionSDGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->unloadRegionSDG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::UntagResourcesOutcome EnsClient::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 EnsClient::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));
|
||||
}
|
||||
|
||||
EnsClient::UntagResourcesOutcomeCallable EnsClient::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();
|
||||
}
|
||||
|
||||
EnsClient::UpdateEnsSaleControlOutcome EnsClient::updateEnsSaleControl(const UpdateEnsSaleControlRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -48,6 +48,15 @@ void CreateEnsSaleControlRequest::setSaleControls(const std::vector<CreateEnsSal
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateEnsSaleControlRequest::getCustomAccount() const {
|
||||
return customAccount_;
|
||||
}
|
||||
|
||||
void CreateEnsSaleControlRequest::setCustomAccount(const std::string &customAccount) {
|
||||
customAccount_ = customAccount;
|
||||
setParameter(std::string("CustomAccount"), customAccount);
|
||||
}
|
||||
|
||||
std::string CreateEnsSaleControlRequest::getCommodityCode() const {
|
||||
return commodityCode_;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,15 @@ void DeleteEnsSaleConditionControlRequest::setSaleControls(const std::vector<Del
|
||||
}
|
||||
}
|
||||
|
||||
std::string DeleteEnsSaleConditionControlRequest::getCustomAccount() const {
|
||||
return customAccount_;
|
||||
}
|
||||
|
||||
void DeleteEnsSaleConditionControlRequest::setCustomAccount(const std::string &customAccount) {
|
||||
customAccount_ = customAccount;
|
||||
setParameter(std::string("CustomAccount"), customAccount);
|
||||
}
|
||||
|
||||
std::string DeleteEnsSaleConditionControlRequest::getCommodityCode() const {
|
||||
return commodityCode_;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,15 @@ void DeleteEnsSaleControlRequest::setSaleControls(const std::vector<DeleteEnsSal
|
||||
}
|
||||
}
|
||||
|
||||
std::string DeleteEnsSaleControlRequest::getCustomAccount() const {
|
||||
return customAccount_;
|
||||
}
|
||||
|
||||
void DeleteEnsSaleControlRequest::setCustomAccount(const std::string &customAccount) {
|
||||
customAccount_ = customAccount;
|
||||
setParameter(std::string("CustomAccount"), customAccount);
|
||||
}
|
||||
|
||||
std::string DeleteEnsSaleControlRequest::getCommodityCode() const {
|
||||
return commodityCode_;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ using AlibabaCloud::Ens::Model::DeleteSDGRequest;
|
||||
|
||||
DeleteSDGRequest::DeleteSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "DeleteSDG") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteSDGRequest::~DeleteSDGRequest() {}
|
||||
|
||||
@@ -39,6 +39,32 @@ void DeleteSDGResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Success"].isNull())
|
||||
data_.success = dataNode["Success"].asString() == "true";
|
||||
auto resultNode = dataNode["Result"];
|
||||
if(!resultNode["FailedCount"].isNull())
|
||||
data_.result.failedCount = std::stol(resultNode["FailedCount"].asString());
|
||||
if(!resultNode["SuccessCount"].isNull())
|
||||
data_.result.successCount = std::stol(resultNode["SuccessCount"].asString());
|
||||
auto allFailedItemsNode = resultNode["FailedItems"]["FailedItemsItem"];
|
||||
for (auto resultNodeFailedItemsFailedItemsItem : allFailedItemsNode)
|
||||
{
|
||||
Data::Result::FailedItemsItem failedItemsItemObject;
|
||||
if(!resultNodeFailedItemsFailedItemsItem["ErrMessage"].isNull())
|
||||
failedItemsItemObject.errMessage = resultNodeFailedItemsFailedItemsItem["ErrMessage"].asString();
|
||||
auto itemNode = value["Item"];
|
||||
if(!itemNode["SdgId"].isNull())
|
||||
failedItemsItemObject.item.sdgId = itemNode["SdgId"].asString();
|
||||
data_.result.failedItems.push_back(failedItemsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeleteSDGResult::Data DeleteSDGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
|
||||
56
ens/src/model/DeployInstanceSDGRequest.cc
Normal file
56
ens/src/model/DeployInstanceSDGRequest.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/ens/model/DeployInstanceSDGRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::DeployInstanceSDGRequest;
|
||||
|
||||
DeployInstanceSDGRequest::DeployInstanceSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "DeployInstanceSDG") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeployInstanceSDGRequest::~DeployInstanceSDGRequest() {}
|
||||
|
||||
std::string DeployInstanceSDGRequest::getDeploymentType() const {
|
||||
return deploymentType_;
|
||||
}
|
||||
|
||||
void DeployInstanceSDGRequest::setDeploymentType(const std::string &deploymentType) {
|
||||
deploymentType_ = deploymentType;
|
||||
setParameter(std::string("DeploymentType"), deploymentType);
|
||||
}
|
||||
|
||||
std::string DeployInstanceSDGRequest::getSDGId() const {
|
||||
return sDGId_;
|
||||
}
|
||||
|
||||
void DeployInstanceSDGRequest::setSDGId(const std::string &sDGId) {
|
||||
sDGId_ = sDGId;
|
||||
setParameter(std::string("SDGId"), sDGId);
|
||||
}
|
||||
|
||||
std::vector<DeployInstanceSDGRequest::std::string> DeployInstanceSDGRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void DeployInstanceSDGRequest::setInstanceIds(const std::vector<DeployInstanceSDGRequest::std::string> &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
for(int dep1 = 0; dep1 != instanceIds.size(); dep1++) {
|
||||
setParameter(std::string("InstanceIds") + "." + std::to_string(dep1 + 1), instanceIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
69
ens/src/model/DeployInstanceSDGResult.cc
Normal file
69
ens/src/model/DeployInstanceSDGResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/ens/model/DeployInstanceSDGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
DeployInstanceSDGResult::DeployInstanceSDGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeployInstanceSDGResult::DeployInstanceSDGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeployInstanceSDGResult::~DeployInstanceSDGResult()
|
||||
{}
|
||||
|
||||
void DeployInstanceSDGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Success"].isNull())
|
||||
data_.success = dataNode["Success"].asString() == "true";
|
||||
auto resultNode = dataNode["Result"];
|
||||
if(!resultNode["FailedCount"].isNull())
|
||||
data_.result.failedCount = std::stol(resultNode["FailedCount"].asString());
|
||||
if(!resultNode["SuccessCount"].isNull())
|
||||
data_.result.successCount = std::stol(resultNode["SuccessCount"].asString());
|
||||
auto allFailedItemsNode = resultNode["FailedItems"]["FailedItem"];
|
||||
for (auto resultNodeFailedItemsFailedItem : allFailedItemsNode)
|
||||
{
|
||||
Data::Result::FailedItem failedItemObject;
|
||||
if(!resultNodeFailedItemsFailedItem["ErrMessage"].isNull())
|
||||
failedItemObject.errMessage = resultNodeFailedItemsFailedItem["ErrMessage"].asString();
|
||||
if(!resultNodeFailedItemsFailedItem["InstanceId"].isNull())
|
||||
failedItemObject.instanceId = resultNodeFailedItemsFailedItem["InstanceId"].asString();
|
||||
data_.result.failedItems.push_back(failedItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeployInstanceSDGResult::Data DeployInstanceSDGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -181,6 +181,15 @@ void DescribeInstancesRequest::setPageSize(const std::string &pageSize) {
|
||||
setParameter(std::string("PageSize"), pageSize);
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getInstanceType() const {
|
||||
return instanceType_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setInstanceType(const std::string &instanceType) {
|
||||
instanceType_ = instanceType;
|
||||
setParameter(std::string("InstanceType"), instanceType);
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getEnsRegionIds() const {
|
||||
return ensRegionIds_;
|
||||
}
|
||||
|
||||
@@ -87,39 +87,16 @@ void DescribeLoadBalancerHTTPListenerAttributeResult::parse(const std::string &p
|
||||
serverCertificateId_ = value["ServerCertificateId"].asString();
|
||||
if(!value["HealthCheckMethod"].isNull())
|
||||
healthCheckMethod_ = value["HealthCheckMethod"].asString();
|
||||
if(!value["XForwardedFor"].isNull())
|
||||
xForwardedFor_ = value["XForwardedFor"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getCookieTimeout()const
|
||||
{
|
||||
return cookieTimeout_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getCookie()const
|
||||
{
|
||||
return cookie_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getListenerPort()const
|
||||
{
|
||||
return listenerPort_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getRequestTimeout()const
|
||||
{
|
||||
return requestTimeout_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckInterval()const
|
||||
{
|
||||
return healthCheckInterval_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
@@ -150,31 +127,11 @@ int DescribeLoadBalancerHTTPListenerAttributeResult::getIdleTimeout()const
|
||||
return idleTimeout_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckTimeout()const
|
||||
{
|
||||
return healthCheckTimeout_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getListenerForward()const
|
||||
{
|
||||
return listenerForward_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getStickySession()const
|
||||
{
|
||||
return stickySession_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckConnectPort()const
|
||||
{
|
||||
return healthCheckConnectPort_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getForwardPort()const
|
||||
{
|
||||
return forwardPort_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckMethod()const
|
||||
{
|
||||
return healthCheckMethod_;
|
||||
@@ -185,16 +142,6 @@ int DescribeLoadBalancerHTTPListenerAttributeResult::getBandwidth()const
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthyThreshold()const
|
||||
{
|
||||
return healthyThreshold_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckDomain()const
|
||||
{
|
||||
return healthCheckDomain_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getServerCertificateId()const
|
||||
{
|
||||
return serverCertificateId_;
|
||||
@@ -210,3 +157,63 @@ std::string DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckHttpC
|
||||
return healthCheckHttpCode_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getCookie()const
|
||||
{
|
||||
return cookie_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getListenerPort()const
|
||||
{
|
||||
return listenerPort_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getRequestTimeout()const
|
||||
{
|
||||
return requestTimeout_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckInterval()const
|
||||
{
|
||||
return healthCheckInterval_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckTimeout()const
|
||||
{
|
||||
return healthCheckTimeout_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getListenerForward()const
|
||||
{
|
||||
return listenerForward_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getStickySession()const
|
||||
{
|
||||
return stickySession_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getForwardPort()const
|
||||
{
|
||||
return forwardPort_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerHTTPListenerAttributeResult::getHealthyThreshold()const
|
||||
{
|
||||
return healthyThreshold_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getXForwardedFor()const
|
||||
{
|
||||
return xForwardedFor_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerHTTPListenerAttributeResult::getHealthCheckDomain()const
|
||||
{
|
||||
return healthCheckDomain_;
|
||||
}
|
||||
|
||||
|
||||
56
ens/src/model/DescribeSDGRequest.cc
Normal file
56
ens/src/model/DescribeSDGRequest.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/ens/model/DescribeSDGRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::DescribeSDGRequest;
|
||||
|
||||
DescribeSDGRequest::DescribeSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "DescribeSDG") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeSDGRequest::~DescribeSDGRequest() {}
|
||||
|
||||
int DescribeSDGRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeSDGRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeSDGRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeSDGRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::vector<DescribeSDGRequest::std::string> DescribeSDGRequest::getSDGIds() const {
|
||||
return sDGIds_;
|
||||
}
|
||||
|
||||
void DescribeSDGRequest::setSDGIds(const std::vector<DescribeSDGRequest::std::string> &sDGIds) {
|
||||
sDGIds_ = sDGIds;
|
||||
for(int dep1 = 0; dep1 != sDGIds.size(); dep1++) {
|
||||
setParameter(std::string("SDGIds") + "." + std::to_string(dep1 + 1), sDGIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
124
ens/src/model/DescribeSDGResult.cc
Normal file
124
ens/src/model/DescribeSDGResult.cc
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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/ens/model/DescribeSDGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
DescribeSDGResult::DescribeSDGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeSDGResult::DescribeSDGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeSDGResult::~DescribeSDGResult()
|
||||
{}
|
||||
|
||||
void DescribeSDGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSDGsNode = value["SDGs"]["SDGsItem"];
|
||||
for (auto valueSDGsSDGsItem : allSDGsNode)
|
||||
{
|
||||
SDGsItem sDGsObject;
|
||||
if(!valueSDGsSDGsItem["CreationInstanceId"].isNull())
|
||||
sDGsObject.creationInstanceId = valueSDGsSDGsItem["CreationInstanceId"].asString();
|
||||
if(!valueSDGsSDGsItem["CreationRegionId"].isNull())
|
||||
sDGsObject.creationRegionId = valueSDGsSDGsItem["CreationRegionId"].asString();
|
||||
if(!valueSDGsSDGsItem["CreationTime"].isNull())
|
||||
sDGsObject.creationTime = valueSDGsSDGsItem["CreationTime"].asString();
|
||||
if(!valueSDGsSDGsItem["Description"].isNull())
|
||||
sDGsObject.description = valueSDGsSDGsItem["Description"].asString();
|
||||
if(!valueSDGsSDGsItem["ParentSDGId"].isNull())
|
||||
sDGsObject.parentSDGId = valueSDGsSDGsItem["ParentSDGId"].asString();
|
||||
if(!valueSDGsSDGsItem["SDGId"].isNull())
|
||||
sDGsObject.sDGId = valueSDGsSDGsItem["SDGId"].asString();
|
||||
if(!valueSDGsSDGsItem["Size"].isNull())
|
||||
sDGsObject.size = std::stol(valueSDGsSDGsItem["Size"].asString());
|
||||
if(!valueSDGsSDGsItem["Status"].isNull())
|
||||
sDGsObject.status = valueSDGsSDGsItem["Status"].asString();
|
||||
if(!valueSDGsSDGsItem["UpdateTime"].isNull())
|
||||
sDGsObject.updateTime = valueSDGsSDGsItem["UpdateTime"].asString();
|
||||
auto allAvaliableRegionIdsNode = valueSDGsSDGsItem["AvaliableRegionIds"]["AvaliableRegionIdsItem"];
|
||||
for (auto valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem : allAvaliableRegionIdsNode)
|
||||
{
|
||||
SDGsItem::AvaliableRegionIdsItem avaliableRegionIdsObject;
|
||||
if(!valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["CreationTime"].isNull())
|
||||
avaliableRegionIdsObject.creationTime = valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["CreationTime"].asString();
|
||||
if(!valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["RegionId"].isNull())
|
||||
avaliableRegionIdsObject.regionId = valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["RegionId"].asString();
|
||||
if(!valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["SnapshotId"].isNull())
|
||||
avaliableRegionIdsObject.snapshotId = valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["SnapshotId"].asString();
|
||||
if(!valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["Status"].isNull())
|
||||
avaliableRegionIdsObject.status = valueSDGsSDGsItemAvaliableRegionIdsAvaliableRegionIdsItem["Status"].asString();
|
||||
sDGsObject.avaliableRegionIds.push_back(avaliableRegionIdsObject);
|
||||
}
|
||||
auto allPreloadInfosNode = valueSDGsSDGsItem["PreloadInfos"]["PreloadInfosItem"];
|
||||
for (auto valueSDGsSDGsItemPreloadInfosPreloadInfosItem : allPreloadInfosNode)
|
||||
{
|
||||
SDGsItem::PreloadInfosItem preloadInfosObject;
|
||||
if(!valueSDGsSDGsItemPreloadInfosPreloadInfosItem["RegionId"].isNull())
|
||||
preloadInfosObject.regionId = valueSDGsSDGsItemPreloadInfosPreloadInfosItem["RegionId"].asString();
|
||||
if(!valueSDGsSDGsItemPreloadInfosPreloadInfosItem["Namespace"].isNull())
|
||||
preloadInfosObject._namespace = valueSDGsSDGsItemPreloadInfosPreloadInfosItem["Namespace"].asString();
|
||||
if(!valueSDGsSDGsItemPreloadInfosPreloadInfosItem["RedundantNum"].isNull())
|
||||
preloadInfosObject.redundantNum = std::stoi(valueSDGsSDGsItemPreloadInfosPreloadInfosItem["RedundantNum"].asString());
|
||||
if(!valueSDGsSDGsItemPreloadInfosPreloadInfosItem["CreationTime"].isNull())
|
||||
preloadInfosObject.creationTime = valueSDGsSDGsItemPreloadInfosPreloadInfosItem["CreationTime"].asString();
|
||||
if(!valueSDGsSDGsItemPreloadInfosPreloadInfosItem["UpdateTime"].isNull())
|
||||
preloadInfosObject.updateTime = valueSDGsSDGsItemPreloadInfosPreloadInfosItem["UpdateTime"].asString();
|
||||
sDGsObject.preloadInfos.push_back(preloadInfosObject);
|
||||
}
|
||||
sDGs_.push_back(sDGsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeSDGResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeSDGResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeSDGResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<DescribeSDGResult::SDGsItem> DescribeSDGResult::getSDGs()const
|
||||
{
|
||||
return sDGs_;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ using AlibabaCloud::Ens::Model::DescribeSDGsRequest;
|
||||
|
||||
DescribeSDGsRequest::DescribeSDGsRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "DescribeSDGs") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeSDGsRequest::~DescribeSDGsRequest() {}
|
||||
|
||||
67
ens/src/model/ListTagResourcesRequest.cc
Normal file
67
ens/src/model/ListTagResourcesRequest.cc
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ens/model/ListTagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::ListTagResourcesRequest;
|
||||
|
||||
ListTagResourcesRequest::ListTagResourcesRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "ListTagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListTagResourcesRequest::~ListTagResourcesRequest() {}
|
||||
|
||||
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 + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> ListTagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
70
ens/src/model/ListTagResourcesResult.cc
Normal file
70
ens/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/ens/model/ListTagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::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"]["TagResourcesItem"];
|
||||
for (auto valueTagResourcesTagResourcesItem : allTagResourcesNode)
|
||||
{
|
||||
TagResourcesItem tagResourcesObject;
|
||||
if(!valueTagResourcesTagResourcesItem["ResourceId"].isNull())
|
||||
tagResourcesObject.resourceId = valueTagResourcesTagResourcesItem["ResourceId"].asString();
|
||||
if(!valueTagResourcesTagResourcesItem["ResourceType"].isNull())
|
||||
tagResourcesObject.resourceType = valueTagResourcesTagResourcesItem["ResourceType"].asString();
|
||||
if(!valueTagResourcesTagResourcesItem["TagKey"].isNull())
|
||||
tagResourcesObject.tagKey = valueTagResourcesTagResourcesItem["TagKey"].asString();
|
||||
if(!valueTagResourcesTagResourcesItem["TagValue"].isNull())
|
||||
tagResourcesObject.tagValue = valueTagResourcesTagResourcesItem["TagValue"].asString();
|
||||
tagResources_.push_back(tagResourcesObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListTagResourcesResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::vector<ListTagResourcesResult::TagResourcesItem> ListTagResourcesResult::getTagResources()const
|
||||
{
|
||||
return tagResources_;
|
||||
}
|
||||
|
||||
67
ens/src/model/PreloadRegionSDGRequest.cc
Normal file
67
ens/src/model/PreloadRegionSDGRequest.cc
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ens/model/PreloadRegionSDGRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::PreloadRegionSDGRequest;
|
||||
|
||||
PreloadRegionSDGRequest::PreloadRegionSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "PreloadRegionSDG") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PreloadRegionSDGRequest::~PreloadRegionSDGRequest() {}
|
||||
|
||||
std::vector<PreloadRegionSDGRequest::std::string> PreloadRegionSDGRequest::getDestinationRegionIds() const {
|
||||
return destinationRegionIds_;
|
||||
}
|
||||
|
||||
void PreloadRegionSDGRequest::setDestinationRegionIds(const std::vector<PreloadRegionSDGRequest::std::string> &destinationRegionIds) {
|
||||
destinationRegionIds_ = destinationRegionIds;
|
||||
for(int dep1 = 0; dep1 != destinationRegionIds.size(); dep1++) {
|
||||
setParameter(std::string("DestinationRegionIds") + "." + std::to_string(dep1 + 1), destinationRegionIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string PreloadRegionSDGRequest::getSDGId() const {
|
||||
return sDGId_;
|
||||
}
|
||||
|
||||
void PreloadRegionSDGRequest::setSDGId(const std::string &sDGId) {
|
||||
sDGId_ = sDGId;
|
||||
setParameter(std::string("SDGId"), sDGId);
|
||||
}
|
||||
|
||||
int PreloadRegionSDGRequest::getRedundantNum() const {
|
||||
return redundantNum_;
|
||||
}
|
||||
|
||||
void PreloadRegionSDGRequest::setRedundantNum(int redundantNum) {
|
||||
redundantNum_ = redundantNum;
|
||||
setParameter(std::string("RedundantNum"), std::to_string(redundantNum));
|
||||
}
|
||||
|
||||
std::vector<PreloadRegionSDGRequest::std::string> PreloadRegionSDGRequest::getNamespaces() const {
|
||||
return namespaces_;
|
||||
}
|
||||
|
||||
void PreloadRegionSDGRequest::setNamespaces(const std::vector<PreloadRegionSDGRequest::std::string> &namespaces) {
|
||||
namespaces_ = namespaces;
|
||||
for(int dep1 = 0; dep1 != namespaces.size(); dep1++) {
|
||||
setParameter(std::string("Namespaces") + "." + std::to_string(dep1 + 1), namespaces[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
69
ens/src/model/PreloadRegionSDGResult.cc
Normal file
69
ens/src/model/PreloadRegionSDGResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/ens/model/PreloadRegionSDGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
PreloadRegionSDGResult::PreloadRegionSDGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PreloadRegionSDGResult::PreloadRegionSDGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PreloadRegionSDGResult::~PreloadRegionSDGResult()
|
||||
{}
|
||||
|
||||
void PreloadRegionSDGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Success"].isNull())
|
||||
data_.success = dataNode["Success"].asString() == "true";
|
||||
auto resultNode = dataNode["Result"];
|
||||
if(!resultNode["FailedCount"].isNull())
|
||||
data_.result.failedCount = std::stol(resultNode["FailedCount"].asString());
|
||||
if(!resultNode["SuccessCount"].isNull())
|
||||
data_.result.successCount = std::stol(resultNode["SuccessCount"].asString());
|
||||
auto allFailedItemsNode = resultNode["FailedItems"]["FailedItemsItem"];
|
||||
for (auto resultNodeFailedItemsFailedItemsItem : allFailedItemsNode)
|
||||
{
|
||||
Data::Result::FailedItemsItem failedItemsItemObject;
|
||||
if(!resultNodeFailedItemsFailedItemsItem["ErrorMessage"].isNull())
|
||||
failedItemsItemObject.errorMessage = resultNodeFailedItemsFailedItemsItem["ErrorMessage"].asString();
|
||||
if(!resultNodeFailedItemsFailedItemsItem["DestinationRegionId"].isNull())
|
||||
failedItemsItemObject.destinationRegionId = resultNodeFailedItemsFailedItemsItem["DestinationRegionId"].asString();
|
||||
data_.result.failedItems.push_back(failedItemsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PreloadRegionSDGResult::Data PreloadRegionSDGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,15 @@ void PutBucketRequest::setStorageClass(const std::string &storageClass) {
|
||||
setBodyParameter(std::string("StorageClass"), storageClass);
|
||||
}
|
||||
|
||||
std::string PutBucketRequest::getDispatchScope() const {
|
||||
return dispatchScope_;
|
||||
}
|
||||
|
||||
void PutBucketRequest::setDispatchScope(const std::string &dispatchScope) {
|
||||
dispatchScope_ = dispatchScope;
|
||||
setBodyParameter(std::string("DispatchScope"), dispatchScope);
|
||||
}
|
||||
|
||||
std::string PutBucketRequest::getComment() const {
|
||||
return comment_;
|
||||
}
|
||||
|
||||
38
ens/src/model/RemoveInstanceSDGRequest.cc
Normal file
38
ens/src/model/RemoveInstanceSDGRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ens/model/RemoveInstanceSDGRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::RemoveInstanceSDGRequest;
|
||||
|
||||
RemoveInstanceSDGRequest::RemoveInstanceSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "RemoveInstanceSDG") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RemoveInstanceSDGRequest::~RemoveInstanceSDGRequest() {}
|
||||
|
||||
std::vector<RemoveInstanceSDGRequest::std::string> RemoveInstanceSDGRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void RemoveInstanceSDGRequest::setInstanceIds(const std::vector<RemoveInstanceSDGRequest::std::string> &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
for(int dep1 = 0; dep1 != instanceIds.size(); dep1++) {
|
||||
setParameter(std::string("InstanceIds") + "." + std::to_string(dep1 + 1), instanceIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
76
ens/src/model/RemoveInstanceSDGResult.cc
Normal file
76
ens/src/model/RemoveInstanceSDGResult.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/ens/model/RemoveInstanceSDGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
RemoveInstanceSDGResult::RemoveInstanceSDGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RemoveInstanceSDGResult::RemoveInstanceSDGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RemoveInstanceSDGResult::~RemoveInstanceSDGResult()
|
||||
{}
|
||||
|
||||
void RemoveInstanceSDGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Success"].isNull())
|
||||
data_.success = dataNode["Success"].asString() == "true";
|
||||
auto resultNode = dataNode["Result"];
|
||||
if(!resultNode["FailedCount"].isNull())
|
||||
data_.result.failedCount = std::stol(resultNode["FailedCount"].asString());
|
||||
if(!resultNode["SuccessCount"].isNull())
|
||||
data_.result.successCount = std::stol(resultNode["SuccessCount"].asString());
|
||||
auto allFailedItemsNode = resultNode["FailedItems"]["FailedItemsItem"];
|
||||
for (auto resultNodeFailedItemsFailedItemsItem : allFailedItemsNode)
|
||||
{
|
||||
Data::Result::FailedItemsItem failedItemsItemObject;
|
||||
if(!resultNodeFailedItemsFailedItemsItem["ErrMessage"].isNull())
|
||||
failedItemsItemObject.errMessage = resultNodeFailedItemsFailedItemsItem["ErrMessage"].asString();
|
||||
if(!resultNodeFailedItemsFailedItemsItem["InstanceId"].isNull())
|
||||
failedItemsItemObject.instanceId = resultNodeFailedItemsFailedItemsItem["InstanceId"].asString();
|
||||
data_.result.failedItems.push_back(failedItemsItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
}
|
||||
|
||||
RemoveInstanceSDGResult::Data RemoveInstanceSDGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int RemoveInstanceSDGResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,15 @@ void SetLoadBalancerHTTPListenerAttributeRequest::setHealthCheckURI(const std::s
|
||||
setParameter(std::string("HealthCheckURI"), healthCheckURI);
|
||||
}
|
||||
|
||||
std::string SetLoadBalancerHTTPListenerAttributeRequest::getXForwardedFor() const {
|
||||
return xForwardedFor_;
|
||||
}
|
||||
|
||||
void SetLoadBalancerHTTPListenerAttributeRequest::setXForwardedFor(const std::string &xForwardedFor) {
|
||||
xForwardedFor_ = xForwardedFor;
|
||||
setParameter(std::string("XForwardedFor"), xForwardedFor);
|
||||
}
|
||||
|
||||
std::string SetLoadBalancerHTTPListenerAttributeRequest::getHealthCheck() const {
|
||||
return healthCheck_;
|
||||
}
|
||||
|
||||
58
ens/src/model/TagResourcesRequest.cc
Normal file
58
ens/src/model/TagResourcesRequest.cc
Normal 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/ens/model/TagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::TagResourcesRequest;
|
||||
|
||||
TagResourcesRequest::TagResourcesRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "TagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TagResourcesRequest::~TagResourcesRequest() {}
|
||||
|
||||
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 + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> TagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
}
|
||||
|
||||
std::string TagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
44
ens/src/model/TagResourcesResult.cc
Normal file
44
ens/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/ens/model/TagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::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());
|
||||
|
||||
}
|
||||
|
||||
58
ens/src/model/UnloadRegionSDGRequest.cc
Normal file
58
ens/src/model/UnloadRegionSDGRequest.cc
Normal 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/ens/model/UnloadRegionSDGRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::UnloadRegionSDGRequest;
|
||||
|
||||
UnloadRegionSDGRequest::UnloadRegionSDGRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "UnloadRegionSDG") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UnloadRegionSDGRequest::~UnloadRegionSDGRequest() {}
|
||||
|
||||
std::vector<UnloadRegionSDGRequest::std::string> UnloadRegionSDGRequest::getDestinationRegionIds() const {
|
||||
return destinationRegionIds_;
|
||||
}
|
||||
|
||||
void UnloadRegionSDGRequest::setDestinationRegionIds(const std::vector<UnloadRegionSDGRequest::std::string> &destinationRegionIds) {
|
||||
destinationRegionIds_ = destinationRegionIds;
|
||||
for(int dep1 = 0; dep1 != destinationRegionIds.size(); dep1++) {
|
||||
setParameter(std::string("DestinationRegionIds") + "." + std::to_string(dep1 + 1), destinationRegionIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string UnloadRegionSDGRequest::getSDGId() const {
|
||||
return sDGId_;
|
||||
}
|
||||
|
||||
void UnloadRegionSDGRequest::setSDGId(const std::string &sDGId) {
|
||||
sDGId_ = sDGId;
|
||||
setParameter(std::string("SDGId"), sDGId);
|
||||
}
|
||||
|
||||
std::vector<UnloadRegionSDGRequest::std::string> UnloadRegionSDGRequest::getNamespaces() const {
|
||||
return namespaces_;
|
||||
}
|
||||
|
||||
void UnloadRegionSDGRequest::setNamespaces(const std::vector<UnloadRegionSDGRequest::std::string> &namespaces) {
|
||||
namespaces_ = namespaces;
|
||||
for(int dep1 = 0; dep1 != namespaces.size(); dep1++) {
|
||||
setParameter(std::string("Namespaces") + "." + std::to_string(dep1 + 1), namespaces[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
69
ens/src/model/UnloadRegionSDGResult.cc
Normal file
69
ens/src/model/UnloadRegionSDGResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/ens/model/UnloadRegionSDGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
UnloadRegionSDGResult::UnloadRegionSDGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UnloadRegionSDGResult::UnloadRegionSDGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UnloadRegionSDGResult::~UnloadRegionSDGResult()
|
||||
{}
|
||||
|
||||
void UnloadRegionSDGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Success"].isNull())
|
||||
data_.success = dataNode["Success"].asString() == "true";
|
||||
auto resultNode = dataNode["Result"];
|
||||
if(!resultNode["FailedCount"].isNull())
|
||||
data_.result.failedCount = std::stol(resultNode["FailedCount"].asString());
|
||||
if(!resultNode["SuccessCount"].isNull())
|
||||
data_.result.successCount = std::stol(resultNode["SuccessCount"].asString());
|
||||
auto allFailedItemsNode = resultNode["FailedItems"]["FailedItemsItem"];
|
||||
for (auto resultNodeFailedItemsFailedItemsItem : allFailedItemsNode)
|
||||
{
|
||||
Data::Result::FailedItemsItem failedItemsItemObject;
|
||||
if(!resultNodeFailedItemsFailedItemsItem["ErrorMessage"].isNull())
|
||||
failedItemsItemObject.errorMessage = resultNodeFailedItemsFailedItemsItem["ErrorMessage"].asString();
|
||||
if(!resultNodeFailedItemsFailedItemsItem["DestinationRegionId"].isNull())
|
||||
failedItemsItemObject.destinationRegionId = resultNodeFailedItemsFailedItemsItem["DestinationRegionId"].asString();
|
||||
data_.result.failedItems.push_back(failedItemsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UnloadRegionSDGResult::Data UnloadRegionSDGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
61
ens/src/model/UntagResourcesRequest.cc
Normal file
61
ens/src/model/UntagResourcesRequest.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/ens/model/UntagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::UntagResourcesRequest;
|
||||
|
||||
UntagResourcesRequest::UntagResourcesRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "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::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::vector<std::string> UntagResourcesRequest::getTagKey() const {
|
||||
return tagKey_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setTagKey(const std::vector<std::string> &tagKey) {
|
||||
tagKey_ = tagKey;
|
||||
}
|
||||
|
||||
44
ens/src/model/UntagResourcesResult.cc
Normal file
44
ens/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/ens/model/UntagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::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());
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,15 @@ void UpdateEnsSaleControlRequest::setSaleControls(const std::vector<UpdateEnsSal
|
||||
}
|
||||
}
|
||||
|
||||
std::string UpdateEnsSaleControlRequest::getCustomAccount() const {
|
||||
return customAccount_;
|
||||
}
|
||||
|
||||
void UpdateEnsSaleControlRequest::setCustomAccount(const std::string &customAccount) {
|
||||
customAccount_ = customAccount;
|
||||
setParameter(std::string("CustomAccount"), customAccount);
|
||||
}
|
||||
|
||||
std::string UpdateEnsSaleControlRequest::getCommodityCode() const {
|
||||
return commodityCode_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user