由楚俊发起的ECS SDK自动发布, BUILD_ID=498, 版本号:1.3.2

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2018-03-23 21:01:01 +08:00
parent e34557650b
commit f2c01c7abe
47 changed files with 3613 additions and 79 deletions

View File

@@ -1131,6 +1131,42 @@ EcsClient::AllocatePublicIpAddressOutcomeCallable EcsClient::allocatePublicIpAdd
return task->get_future();
}
EcsClient::AttachVolumeOutcome EcsClient::attachVolume(const AttachVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AttachVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AttachVolumeOutcome(AttachVolumeResult(outcome.result()));
else
return AttachVolumeOutcome(outcome.error());
}
void EcsClient::attachVolumeAsync(const AttachVolumeRequest& request, const AttachVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, attachVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::AttachVolumeOutcomeCallable EcsClient::attachVolumeCallable(const AttachVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AttachVolumeOutcome()>>(
[this, request]()
{
return this->attachVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::DescribeEipMonitorDataOutcome EcsClient::describeEipMonitorData(const DescribeEipMonitorDataRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1851,6 +1887,42 @@ EcsClient::ResizeDiskOutcomeCallable EcsClient::resizeDiskCallable(const ResizeD
return task->get_future();
}
EcsClient::ResizeVolumeOutcome EcsClient::resizeVolume(const ResizeVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ResizeVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ResizeVolumeOutcome(ResizeVolumeResult(outcome.result()));
else
return ResizeVolumeOutcome(outcome.error());
}
void EcsClient::resizeVolumeAsync(const ResizeVolumeRequest& request, const ResizeVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, resizeVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::ResizeVolumeOutcomeCallable EcsClient::resizeVolumeCallable(const ResizeVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ResizeVolumeOutcome()>>(
[this, request]()
{
return this->resizeVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::CreateRouteEntryOutcome EcsClient::createRouteEntry(const CreateRouteEntryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1995,6 +2067,42 @@ EcsClient::CreateRouterInterfaceOutcomeCallable EcsClient::createRouterInterface
return task->get_future();
}
EcsClient::ModifyVolumeAttributeOutcome EcsClient::modifyVolumeAttribute(const ModifyVolumeAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyVolumeAttributeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyVolumeAttributeOutcome(ModifyVolumeAttributeResult(outcome.result()));
else
return ModifyVolumeAttributeOutcome(outcome.error());
}
void EcsClient::modifyVolumeAttributeAsync(const ModifyVolumeAttributeRequest& request, const ModifyVolumeAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyVolumeAttribute(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::ModifyVolumeAttributeOutcomeCallable EcsClient::modifyVolumeAttributeCallable(const ModifyVolumeAttributeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyVolumeAttributeOutcome()>>(
[this, request]()
{
return this->modifyVolumeAttribute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::CheckDiskEnableAutoSnapshotValidationOutcome EcsClient::checkDiskEnableAutoSnapshotValidation(const CheckDiskEnableAutoSnapshotValidationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3147,6 +3255,42 @@ EcsClient::DescribeSnapshotPackageOutcomeCallable EcsClient::describeSnapshotPac
return task->get_future();
}
EcsClient::ReInitVolumeOutcome EcsClient::reInitVolume(const ReInitVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReInitVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReInitVolumeOutcome(ReInitVolumeResult(outcome.result()));
else
return ReInitVolumeOutcome(outcome.error());
}
void EcsClient::reInitVolumeAsync(const ReInitVolumeRequest& request, const ReInitVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, reInitVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::ReInitVolumeOutcomeCallable EcsClient::reInitVolumeCallable(const ReInitVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReInitVolumeOutcome()>>(
[this, request]()
{
return this->reInitVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::RebootInstanceOutcome EcsClient::rebootInstance(const RebootInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5703,6 +5847,42 @@ EcsClient::ModifyDiskChargeTypeOutcomeCallable EcsClient::modifyDiskChargeTypeCa
return task->get_future();
}
EcsClient::DescribeVolumesOutcome EcsClient::describeVolumes(const DescribeVolumesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeVolumesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeVolumesOutcome(DescribeVolumesResult(outcome.result()));
else
return DescribeVolumesOutcome(outcome.error());
}
void EcsClient::describeVolumesAsync(const DescribeVolumesRequest& request, const DescribeVolumesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeVolumes(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::DescribeVolumesOutcomeCallable EcsClient::describeVolumesCallable(const DescribeVolumesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeVolumesOutcome()>>(
[this, request]()
{
return this->describeVolumes(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::ModifyIntranetBandwidthKbOutcome EcsClient::modifyIntranetBandwidthKb(const ModifyIntranetBandwidthKbRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6027,6 +6207,42 @@ EcsClient::DescribeTagKeysOutcomeCallable EcsClient::describeTagKeysCallable(con
return task->get_future();
}
EcsClient::CreateVolumeOutcome EcsClient::createVolume(const CreateVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateVolumeOutcome(CreateVolumeResult(outcome.result()));
else
return CreateVolumeOutcome(outcome.error());
}
void EcsClient::createVolumeAsync(const CreateVolumeRequest& request, const CreateVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::CreateVolumeOutcomeCallable EcsClient::createVolumeCallable(const CreateVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateVolumeOutcome()>>(
[this, request]()
{
return this->createVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::DeleteInstanceOutcome EcsClient::deleteInstance(const DeleteInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6387,6 +6603,78 @@ EcsClient::DescribeInstanceTypeFamiliesOutcomeCallable EcsClient::describeInstan
return task->get_future();
}
EcsClient::RollbackVolumeOutcome EcsClient::rollbackVolume(const RollbackVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RollbackVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RollbackVolumeOutcome(RollbackVolumeResult(outcome.result()));
else
return RollbackVolumeOutcome(outcome.error());
}
void EcsClient::rollbackVolumeAsync(const RollbackVolumeRequest& request, const RollbackVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, rollbackVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::RollbackVolumeOutcomeCallable EcsClient::rollbackVolumeCallable(const RollbackVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RollbackVolumeOutcome()>>(
[this, request]()
{
return this->rollbackVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::DeleteVolumeOutcome EcsClient::deleteVolume(const DeleteVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteVolumeOutcome(DeleteVolumeResult(outcome.result()));
else
return DeleteVolumeOutcome(outcome.error());
}
void EcsClient::deleteVolumeAsync(const DeleteVolumeRequest& request, const DeleteVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::DeleteVolumeOutcomeCallable EcsClient::deleteVolumeCallable(const DeleteVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteVolumeOutcome()>>(
[this, request]()
{
return this->deleteVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::CreateForwardEntryOutcome EcsClient::createForwardEntry(const CreateForwardEntryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7647,6 +7935,42 @@ EcsClient::DescribeRecycleBinOutcomeCallable EcsClient::describeRecycleBinCallab
return task->get_future();
}
EcsClient::DetachVolumeOutcome EcsClient::detachVolume(const DetachVolumeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetachVolumeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetachVolumeOutcome(DetachVolumeResult(outcome.result()));
else
return DetachVolumeOutcome(outcome.error());
}
void EcsClient::detachVolumeAsync(const DetachVolumeRequest& request, const DetachVolumeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detachVolume(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::DetachVolumeOutcomeCallable EcsClient::detachVolumeCallable(const DetachVolumeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetachVolumeOutcome()>>(
[this, request]()
{
return this->detachVolume(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::CreateNetworkInterfaceOutcome EcsClient::createNetworkInterface(const CreateNetworkInterfaceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,104 @@
/*
* 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/ecs/model/AttachVolumeRequest.h>
using AlibabaCloud::Ecs::Model::AttachVolumeRequest;
AttachVolumeRequest::AttachVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "AttachVolume")
{}
AttachVolumeRequest::~AttachVolumeRequest()
{}
long AttachVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void AttachVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string AttachVolumeRequest::getInstanceId()const
{
return instanceId_;
}
void AttachVolumeRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string AttachVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void AttachVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string AttachVolumeRequest::getRegionId()const
{
return regionId_;
}
void AttachVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string AttachVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void AttachVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string AttachVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void AttachVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
long AttachVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void AttachVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -91,6 +91,105 @@ void CreateRouterInterfaceRequest::setClientToken(const std::string& clientToken
setParameter("ClientToken", clientToken);
}
std::string CreateRouterInterfaceRequest::getHealthCheckTargetIp()const
{
return healthCheckTargetIp_;
}
void CreateRouterInterfaceRequest::setHealthCheckTargetIp(const std::string& healthCheckTargetIp)
{
healthCheckTargetIp_ = healthCheckTargetIp;
setParameter("HealthCheckTargetIp", healthCheckTargetIp);
}
std::string CreateRouterInterfaceRequest::getDescription()const
{
return description_;
}
void CreateRouterInterfaceRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateRouterInterfaceRequest::getSpec()const
{
return spec_;
}
void CreateRouterInterfaceRequest::setSpec(const std::string& spec)
{
spec_ = spec;
setParameter("Spec", spec);
}
std::string CreateRouterInterfaceRequest::getRegionId()const
{
return regionId_;
}
void CreateRouterInterfaceRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateRouterInterfaceRequest::getUserCidr()const
{
return userCidr_;
}
void CreateRouterInterfaceRequest::setUserCidr(const std::string& userCidr)
{
userCidr_ = userCidr;
setParameter("UserCidr", userCidr);
}
std::string CreateRouterInterfaceRequest::getOppositeInterfaceId()const
{
return oppositeInterfaceId_;
}
void CreateRouterInterfaceRequest::setOppositeInterfaceId(const std::string& oppositeInterfaceId)
{
oppositeInterfaceId_ = oppositeInterfaceId;
setParameter("OppositeInterfaceId", oppositeInterfaceId);
}
std::string CreateRouterInterfaceRequest::getInstanceChargeType()const
{
return instanceChargeType_;
}
void CreateRouterInterfaceRequest::setInstanceChargeType(const std::string& instanceChargeType)
{
instanceChargeType_ = instanceChargeType;
setParameter("InstanceChargeType", instanceChargeType);
}
int CreateRouterInterfaceRequest::getPeriod()const
{
return period_;
}
void CreateRouterInterfaceRequest::setPeriod(int period)
{
period_ = period;
setParameter("Period", std::to_string(period));
}
bool CreateRouterInterfaceRequest::getAutoPay()const
{
return autoPay_;
}
void CreateRouterInterfaceRequest::setAutoPay(bool autoPay)
{
autoPay_ = autoPay;
setParameter("AutoPay", std::to_string(autoPay));
}
std::string CreateRouterInterfaceRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
@@ -124,28 +223,6 @@ void CreateRouterInterfaceRequest::setOwnerAccount(const std::string& ownerAccou
setParameter("OwnerAccount", ownerAccount);
}
std::string CreateRouterInterfaceRequest::getHealthCheckTargetIp()const
{
return healthCheckTargetIp_;
}
void CreateRouterInterfaceRequest::setHealthCheckTargetIp(const std::string& healthCheckTargetIp)
{
healthCheckTargetIp_ = healthCheckTargetIp;
setParameter("HealthCheckTargetIp", healthCheckTargetIp);
}
std::string CreateRouterInterfaceRequest::getDescription()const
{
return description_;
}
void CreateRouterInterfaceRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
long CreateRouterInterfaceRequest::getOwnerId()const
{
return ownerId_;
@@ -157,17 +234,6 @@ void CreateRouterInterfaceRequest::setOwnerId(long ownerId)
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateRouterInterfaceRequest::getSpec()const
{
return spec_;
}
void CreateRouterInterfaceRequest::setSpec(const std::string& spec)
{
spec_ = spec;
setParameter("Spec", spec);
}
std::string CreateRouterInterfaceRequest::getOppositeInterfaceOwnerId()const
{
return oppositeInterfaceOwnerId_;
@@ -190,17 +256,6 @@ void CreateRouterInterfaceRequest::setRouterType(const std::string& routerType)
setParameter("RouterType", routerType);
}
std::string CreateRouterInterfaceRequest::getRegionId()const
{
return regionId_;
}
void CreateRouterInterfaceRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateRouterInterfaceRequest::getHealthCheckSourceIp()const
{
return healthCheckSourceIp_;
@@ -245,25 +300,14 @@ void CreateRouterInterfaceRequest::setName(const std::string& name)
setParameter("Name", name);
}
std::string CreateRouterInterfaceRequest::getUserCidr()const
std::string CreateRouterInterfaceRequest::getPricingCycle()const
{
return userCidr_;
return pricingCycle_;
}
void CreateRouterInterfaceRequest::setUserCidr(const std::string& userCidr)
void CreateRouterInterfaceRequest::setPricingCycle(const std::string& pricingCycle)
{
userCidr_ = userCidr;
setParameter("UserCidr", userCidr);
}
std::string CreateRouterInterfaceRequest::getOppositeInterfaceId()const
{
return oppositeInterfaceId_;
}
void CreateRouterInterfaceRequest::setOppositeInterfaceId(const std::string& oppositeInterfaceId)
{
oppositeInterfaceId_ = oppositeInterfaceId;
setParameter("OppositeInterfaceId", oppositeInterfaceId);
pricingCycle_ = pricingCycle;
setParameter("PricingCycle", pricingCycle);
}

View File

@@ -42,9 +42,16 @@ void CreateRouterInterfaceResult::parse(const std::string &payload)
setRequestId(value["RequestId"].asString());
if(!value["RouterInterfaceId"].isNull())
routerInterfaceId_ = value["RouterInterfaceId"].asString();
if(!value["OrderId"].isNull())
orderId_ = std::stol(value["OrderId"].asString());
}
long CreateRouterInterfaceResult::getOrderId()const
{
return orderId_;
}
std::string CreateRouterInterfaceResult::getRouterInterfaceId()const
{
return routerInterfaceId_;

View File

@@ -0,0 +1,280 @@
/*
* 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/ecs/model/CreateVolumeRequest.h>
using AlibabaCloud::Ecs::Model::CreateVolumeRequest;
CreateVolumeRequest::CreateVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "CreateVolume")
{}
CreateVolumeRequest::~CreateVolumeRequest()
{}
std::string CreateVolumeRequest::getTag4Value()const
{
return tag4Value_;
}
void CreateVolumeRequest::setTag4Value(const std::string& tag4Value)
{
tag4Value_ = tag4Value;
setParameter("Tag4Value", tag4Value);
}
long CreateVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void CreateVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateVolumeRequest::getSnapshotId()const
{
return snapshotId_;
}
void CreateVolumeRequest::setSnapshotId(const std::string& snapshotId)
{
snapshotId_ = snapshotId;
setParameter("SnapshotId", snapshotId);
}
std::string CreateVolumeRequest::getTag2Key()const
{
return tag2Key_;
}
void CreateVolumeRequest::setTag2Key(const std::string& tag2Key)
{
tag2Key_ = tag2Key;
setParameter("Tag2Key", tag2Key);
}
std::string CreateVolumeRequest::getVolumeName()const
{
return volumeName_;
}
void CreateVolumeRequest::setVolumeName(const std::string& volumeName)
{
volumeName_ = volumeName;
setParameter("VolumeName", volumeName);
}
bool CreateVolumeRequest::getVolumeEncrypted()const
{
return volumeEncrypted_;
}
void CreateVolumeRequest::setVolumeEncrypted(bool volumeEncrypted)
{
volumeEncrypted_ = volumeEncrypted;
setParameter("VolumeEncrypted", std::to_string(volumeEncrypted));
}
std::string CreateVolumeRequest::getTag5Key()const
{
return tag5Key_;
}
void CreateVolumeRequest::setTag5Key(const std::string& tag5Key)
{
tag5Key_ = tag5Key;
setParameter("Tag5Key", tag5Key);
}
std::string CreateVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void CreateVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string CreateVolumeRequest::getClientToken()const
{
return clientToken_;
}
void CreateVolumeRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void CreateVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string CreateVolumeRequest::getDescription()const
{
return description_;
}
void CreateVolumeRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateVolumeRequest::getTag3Key()const
{
return tag3Key_;
}
void CreateVolumeRequest::setTag3Key(const std::string& tag3Key)
{
tag3Key_ = tag3Key;
setParameter("Tag3Key", tag3Key);
}
long CreateVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void CreateVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateVolumeRequest::getTag5Value()const
{
return tag5Value_;
}
void CreateVolumeRequest::setTag5Value(const std::string& tag5Value)
{
tag5Value_ = tag5Value;
setParameter("Tag5Value", tag5Value);
}
std::string CreateVolumeRequest::getTag1Key()const
{
return tag1Key_;
}
void CreateVolumeRequest::setTag1Key(const std::string& tag1Key)
{
tag1Key_ = tag1Key;
setParameter("Tag1Key", tag1Key);
}
std::string CreateVolumeRequest::getTag1Value()const
{
return tag1Value_;
}
void CreateVolumeRequest::setTag1Value(const std::string& tag1Value)
{
tag1Value_ = tag1Value;
setParameter("Tag1Value", tag1Value);
}
std::string CreateVolumeRequest::getVolumeCategory()const
{
return volumeCategory_;
}
void CreateVolumeRequest::setVolumeCategory(const std::string& volumeCategory)
{
volumeCategory_ = volumeCategory;
setParameter("VolumeCategory", volumeCategory);
}
int CreateVolumeRequest::getSize()const
{
return size_;
}
void CreateVolumeRequest::setSize(int size)
{
size_ = size;
setParameter("Size", std::to_string(size));
}
std::string CreateVolumeRequest::getRegionId()const
{
return regionId_;
}
void CreateVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateVolumeRequest::getTag2Value()const
{
return tag2Value_;
}
void CreateVolumeRequest::setTag2Value(const std::string& tag2Value)
{
tag2Value_ = tag2Value;
setParameter("Tag2Value", tag2Value);
}
std::string CreateVolumeRequest::getZoneId()const
{
return zoneId_;
}
void CreateVolumeRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
std::string CreateVolumeRequest::getTag4Key()const
{
return tag4Key_;
}
void CreateVolumeRequest::setTag4Key(const std::string& tag4Key)
{
tag4Key_ = tag4Key;
setParameter("Tag4Key", tag4Key);
}
std::string CreateVolumeRequest::getTag3Value()const
{
return tag3Value_;
}
void CreateVolumeRequest::setTag3Value(const std::string& tag3Value)
{
tag3Value_ = tag3Value;
setParameter("Tag3Value", tag3Value);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/ecs/model/CreateVolumeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
CreateVolumeResult::CreateVolumeResult() :
ServiceResult()
{}
CreateVolumeResult::CreateVolumeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateVolumeResult::~CreateVolumeResult()
{}
void CreateVolumeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["VolumeId"].isNull())
volumeId_ = value["VolumeId"].asString();
}
std::string CreateVolumeResult::getVolumeId()const
{
return volumeId_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/ecs/model/DeleteVolumeRequest.h>
using AlibabaCloud::Ecs::Model::DeleteVolumeRequest;
DeleteVolumeRequest::DeleteVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "DeleteVolume")
{}
DeleteVolumeRequest::~DeleteVolumeRequest()
{}
long DeleteVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DeleteVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DeleteVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DeleteVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DeleteVolumeRequest::getRegionId()const
{
return regionId_;
}
void DeleteVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string DeleteVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DeleteVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DeleteVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void DeleteVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
long DeleteVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void DeleteVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -72,6 +72,10 @@ void DescribeInstanceTypesResult::parse(const std::string &payload)
instanceTypesObject.instanceBandwidthRx = std::stoi(value["InstanceBandwidthRx"].asString());
if(!value["InstanceBandwidthTx"].isNull())
instanceTypesObject.instanceBandwidthTx = std::stoi(value["InstanceBandwidthTx"].asString());
if(!value["InstancePpsRx"].isNull())
instanceTypesObject.instancePpsRx = std::stol(value["InstancePpsRx"].asString());
if(!value["InstancePpsTx"].isNull())
instanceTypesObject.instancePpsTx = std::stol(value["InstancePpsTx"].asString());
instanceTypes_.push_back(instanceTypesObject);
}

View File

@@ -0,0 +1,313 @@
/*
* 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/ecs/model/DescribeVolumesRequest.h>
using AlibabaCloud::Ecs::Model::DescribeVolumesRequest;
DescribeVolumesRequest::DescribeVolumesRequest() :
RpcServiceRequest("ecs", "2014-05-26", "DescribeVolumes")
{}
DescribeVolumesRequest::~DescribeVolumesRequest()
{}
std::string DescribeVolumesRequest::getTag4Value()const
{
return tag4Value_;
}
void DescribeVolumesRequest::setTag4Value(const std::string& tag4Value)
{
tag4Value_ = tag4Value;
setParameter("Tag4Value", tag4Value);
}
long DescribeVolumesRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeVolumesRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeVolumesRequest::getSnapshotId()const
{
return snapshotId_;
}
void DescribeVolumesRequest::setSnapshotId(const std::string& snapshotId)
{
snapshotId_ = snapshotId;
setParameter("SnapshotId", snapshotId);
}
std::string DescribeVolumesRequest::getTag2Key()const
{
return tag2Key_;
}
void DescribeVolumesRequest::setTag2Key(const std::string& tag2Key)
{
tag2Key_ = tag2Key;
setParameter("Tag2Key", tag2Key);
}
std::string DescribeVolumesRequest::getAutoSnapshotPolicyId()const
{
return autoSnapshotPolicyId_;
}
void DescribeVolumesRequest::setAutoSnapshotPolicyId(const std::string& autoSnapshotPolicyId)
{
autoSnapshotPolicyId_ = autoSnapshotPolicyId;
setParameter("AutoSnapshotPolicyId", autoSnapshotPolicyId);
}
std::string DescribeVolumesRequest::getTag3Key()const
{
return tag3Key_;
}
void DescribeVolumesRequest::setTag3Key(const std::string& tag3Key)
{
tag3Key_ = tag3Key;
setParameter("Tag3Key", tag3Key);
}
int DescribeVolumesRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeVolumesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeVolumesRequest::getTag1Value()const
{
return tag1Value_;
}
void DescribeVolumesRequest::setTag1Value(const std::string& tag1Value)
{
tag1Value_ = tag1Value;
setParameter("Tag1Value", tag1Value);
}
std::string DescribeVolumesRequest::getLockReason()const
{
return lockReason_;
}
void DescribeVolumesRequest::setLockReason(const std::string& lockReason)
{
lockReason_ = lockReason;
setParameter("LockReason", lockReason);
}
std::string DescribeVolumesRequest::getRegionId()const
{
return regionId_;
}
void DescribeVolumesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
int DescribeVolumesRequest::getPageSize()const
{
return pageSize_;
}
void DescribeVolumesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeVolumesRequest::getTag3Value()const
{
return tag3Value_;
}
void DescribeVolumesRequest::setTag3Value(const std::string& tag3Value)
{
tag3Value_ = tag3Value;
setParameter("Tag3Value", tag3Value);
}
std::string DescribeVolumesRequest::getTag5Key()const
{
return tag5Key_;
}
void DescribeVolumesRequest::setTag5Key(const std::string& tag5Key)
{
tag5Key_ = tag5Key;
setParameter("Tag5Key", tag5Key);
}
std::string DescribeVolumesRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeVolumesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeVolumesRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeVolumesRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
bool DescribeVolumesRequest::getEnableAutomatedSnapshotPolicy()const
{
return enableAutomatedSnapshotPolicy_;
}
void DescribeVolumesRequest::setEnableAutomatedSnapshotPolicy(bool enableAutomatedSnapshotPolicy)
{
enableAutomatedSnapshotPolicy_ = enableAutomatedSnapshotPolicy;
setParameter("EnableAutomatedSnapshotPolicy", std::to_string(enableAutomatedSnapshotPolicy));
}
long DescribeVolumesRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeVolumesRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeVolumesRequest::getTag5Value()const
{
return tag5Value_;
}
void DescribeVolumesRequest::setTag5Value(const std::string& tag5Value)
{
tag5Value_ = tag5Value;
setParameter("Tag5Value", tag5Value);
}
std::string DescribeVolumesRequest::getTag1Key()const
{
return tag1Key_;
}
void DescribeVolumesRequest::setTag1Key(const std::string& tag1Key)
{
tag1Key_ = tag1Key;
setParameter("Tag1Key", tag1Key);
}
std::string DescribeVolumesRequest::getInstanceId()const
{
return instanceId_;
}
void DescribeVolumesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DescribeVolumesRequest::getTag2Value()const
{
return tag2Value_;
}
void DescribeVolumesRequest::setTag2Value(const std::string& tag2Value)
{
tag2Value_ = tag2Value;
setParameter("Tag2Value", tag2Value);
}
std::string DescribeVolumesRequest::getZoneId()const
{
return zoneId_;
}
void DescribeVolumesRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
std::string DescribeVolumesRequest::getTag4Key()const
{
return tag4Key_;
}
void DescribeVolumesRequest::setTag4Key(const std::string& tag4Key)
{
tag4Key_ = tag4Key;
setParameter("Tag4Key", tag4Key);
}
std::string DescribeVolumesRequest::getVolumeIds()const
{
return volumeIds_;
}
void DescribeVolumesRequest::setVolumeIds(const std::string& volumeIds)
{
volumeIds_ = volumeIds;
setParameter("VolumeIds", volumeIds);
}
std::string DescribeVolumesRequest::getCategory()const
{
return category_;
}
void DescribeVolumesRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}
std::string DescribeVolumesRequest::getStatus()const
{
return status_;
}
void DescribeVolumesRequest::setStatus(const std::string& status)
{
status_ = status;
setParameter("Status", status);
}

View File

@@ -0,0 +1,139 @@
/*
* 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/ecs/model/DescribeVolumesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
DescribeVolumesResult::DescribeVolumesResult() :
ServiceResult()
{}
DescribeVolumesResult::DescribeVolumesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeVolumesResult::~DescribeVolumesResult()
{}
void DescribeVolumesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVolumes = value["Volumes"]["Volume"];
for (auto value : allVolumes)
{
Volume volumesObject;
if(!value["VolumeId"].isNull())
volumesObject.volumeId = value["VolumeId"].asString();
if(!value["RegionId"].isNull())
volumesObject.regionId = value["RegionId"].asString();
if(!value["ZoneId"].isNull())
volumesObject.zoneId = value["ZoneId"].asString();
if(!value["VolumeName"].isNull())
volumesObject.volumeName = value["VolumeName"].asString();
if(!value["Description"].isNull())
volumesObject.description = value["Description"].asString();
if(!value["Category"].isNull())
volumesObject.category = value["Category"].asString();
if(!value["Size"].isNull())
volumesObject.size = std::stoi(value["Size"].asString());
if(!value["SourceSnapshotId"].isNull())
volumesObject.sourceSnapshotId = value["SourceSnapshotId"].asString();
if(!value["AutoSnapshotPolicyId"].isNull())
volumesObject.autoSnapshotPolicyId = value["AutoSnapshotPolicyId"].asString();
if(!value["SnapshotLinkId"].isNull())
volumesObject.snapshotLinkId = value["SnapshotLinkId"].asString();
if(!value["Status"].isNull())
volumesObject.status = value["Status"].asString();
if(!value["EnableAutomatedSnapshotPolicy"].isNull())
volumesObject.enableAutomatedSnapshotPolicy = value["EnableAutomatedSnapshotPolicy"].asString() == "true";
if(!value["CreationTime"].isNull())
volumesObject.creationTime = value["CreationTime"].asString();
if(!value["VolumeChargeType"].isNull())
volumesObject.volumeChargeType = value["VolumeChargeType"].asString();
if(!value["MountInstanceNum"].isNull())
volumesObject.mountInstanceNum = std::stoi(value["MountInstanceNum"].asString());
if(!value["Encrypted"].isNull())
volumesObject.encrypted = value["Encrypted"].asString() == "true";
auto allOperationLocks = value["OperationLocks"]["OperationLock"];
for (auto value : allOperationLocks)
{
Volume::OperationLock operationLocksObject;
if(!value["LockReason"].isNull())
operationLocksObject.lockReason = value["LockReason"].asString();
volumesObject.operationLocks.push_back(operationLocksObject);
}
auto allMountInstances = value["MountInstances"]["MountInstance"];
for (auto value : allMountInstances)
{
Volume::MountInstance mountInstancesObject;
if(!value["InstanceId"].isNull())
mountInstancesObject.instanceId = value["InstanceId"].asString();
if(!value["Device"].isNull())
mountInstancesObject.device = value["Device"].asString();
if(!value["AttachedTime"].isNull())
mountInstancesObject.attachedTime = value["AttachedTime"].asString();
volumesObject.mountInstances.push_back(mountInstancesObject);
}
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
Volume::Tag tagsObject;
if(!value["TagKey"].isNull())
tagsObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagsObject.tagValue = value["TagValue"].asString();
volumesObject.tags.push_back(tagsObject);
}
volumes_.push_back(volumesObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int DescribeVolumesResult::getTotalCount()const
{
return totalCount_;
}
std::vector<DescribeVolumesResult::Volume> DescribeVolumesResult::getVolumes()const
{
return volumes_;
}
int DescribeVolumesResult::getPageSize()const
{
return pageSize_;
}
int DescribeVolumesResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -0,0 +1,104 @@
/*
* 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/ecs/model/DetachVolumeRequest.h>
using AlibabaCloud::Ecs::Model::DetachVolumeRequest;
DetachVolumeRequest::DetachVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "DetachVolume")
{}
DetachVolumeRequest::~DetachVolumeRequest()
{}
long DetachVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DetachVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DetachVolumeRequest::getInstanceId()const
{
return instanceId_;
}
void DetachVolumeRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DetachVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DetachVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DetachVolumeRequest::getRegionId()const
{
return regionId_;
}
void DetachVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string DetachVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DetachVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DetachVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void DetachVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
long DetachVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void DetachVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -0,0 +1,115 @@
/*
* 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/ecs/model/ModifyVolumeAttributeRequest.h>
using AlibabaCloud::Ecs::Model::ModifyVolumeAttributeRequest;
ModifyVolumeAttributeRequest::ModifyVolumeAttributeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "ModifyVolumeAttribute")
{}
ModifyVolumeAttributeRequest::~ModifyVolumeAttributeRequest()
{}
long ModifyVolumeAttributeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ModifyVolumeAttributeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ModifyVolumeAttributeRequest::getVolumeName()const
{
return volumeName_;
}
void ModifyVolumeAttributeRequest::setVolumeName(const std::string& volumeName)
{
volumeName_ = volumeName;
setParameter("VolumeName", volumeName);
}
std::string ModifyVolumeAttributeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ModifyVolumeAttributeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ModifyVolumeAttributeRequest::getRegionId()const
{
return regionId_;
}
void ModifyVolumeAttributeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ModifyVolumeAttributeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ModifyVolumeAttributeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string ModifyVolumeAttributeRequest::getVolumeId()const
{
return volumeId_;
}
void ModifyVolumeAttributeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
std::string ModifyVolumeAttributeRequest::getDescription()const
{
return description_;
}
void ModifyVolumeAttributeRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
long ModifyVolumeAttributeRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyVolumeAttributeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -0,0 +1,104 @@
/*
* 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/ecs/model/ReInitVolumeRequest.h>
using AlibabaCloud::Ecs::Model::ReInitVolumeRequest;
ReInitVolumeRequest::ReInitVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "ReInitVolume")
{}
ReInitVolumeRequest::~ReInitVolumeRequest()
{}
long ReInitVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ReInitVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ReInitVolumeRequest::getPassword()const
{
return password_;
}
void ReInitVolumeRequest::setPassword(const std::string& password)
{
password_ = password;
setParameter("Password", password);
}
std::string ReInitVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ReInitVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ReInitVolumeRequest::getRegionId()const
{
return regionId_;
}
void ReInitVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ReInitVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ReInitVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string ReInitVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void ReInitVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
long ReInitVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void ReInitVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -0,0 +1,115 @@
/*
* 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/ecs/model/ResizeVolumeRequest.h>
using AlibabaCloud::Ecs::Model::ResizeVolumeRequest;
ResizeVolumeRequest::ResizeVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "ResizeVolume")
{}
ResizeVolumeRequest::~ResizeVolumeRequest()
{}
long ResizeVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ResizeVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ResizeVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ResizeVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ResizeVolumeRequest::getRegionId()const
{
return regionId_;
}
void ResizeVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ResizeVolumeRequest::getClientToken()const
{
return clientToken_;
}
void ResizeVolumeRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string ResizeVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ResizeVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string ResizeVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void ResizeVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
int ResizeVolumeRequest::getNewSize()const
{
return newSize_;
}
void ResizeVolumeRequest::setNewSize(int newSize)
{
newSize_ = newSize;
setParameter("NewSize", std::to_string(newSize));
}
long ResizeVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void ResizeVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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

View File

@@ -0,0 +1,104 @@
/*
* 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/ecs/model/RollbackVolumeRequest.h>
using AlibabaCloud::Ecs::Model::RollbackVolumeRequest;
RollbackVolumeRequest::RollbackVolumeRequest() :
RpcServiceRequest("ecs", "2014-05-26", "RollbackVolume")
{}
RollbackVolumeRequest::~RollbackVolumeRequest()
{}
long RollbackVolumeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void RollbackVolumeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string RollbackVolumeRequest::getSnapshotId()const
{
return snapshotId_;
}
void RollbackVolumeRequest::setSnapshotId(const std::string& snapshotId)
{
snapshotId_ = snapshotId;
setParameter("SnapshotId", snapshotId);
}
std::string RollbackVolumeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void RollbackVolumeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string RollbackVolumeRequest::getRegionId()const
{
return regionId_;
}
void RollbackVolumeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string RollbackVolumeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void RollbackVolumeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string RollbackVolumeRequest::getVolumeId()const
{
return volumeId_;
}
void RollbackVolumeRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
long RollbackVolumeRequest::getOwnerId()const
{
return ownerId_;
}
void RollbackVolumeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

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