由温仰发起的VPC SDK自动发布, BUILD_ID=466, 版本号:1.2.13

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2018-03-15 15:18:48 +08:00
parent 7721032f82
commit 85da4ff587
35 changed files with 1541 additions and 732 deletions

View File

@@ -24,7 +24,7 @@ using namespace AlibabaCloud::Vpc::Model;
namespace
{
const std::string SERVICE_NAME = "Vpc";
const std::string SERVICE_NAME = "Vpc";
}
VpcClient::VpcClient(const Credentials &credentials, const ClientConfiguration &configuration) :
@@ -303,6 +303,42 @@ VpcClient::DescribeGlobalAccelerationInstancesOutcomeCallable VpcClient::describ
return task->get_future();
}
VpcClient::MoveResourceGroupOutcome VpcClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoveResourceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoveResourceGroupOutcome(MoveResourceGroupResult(outcome.result()));
else
return MoveResourceGroupOutcome(outcome.error());
}
void VpcClient::moveResourceGroupAsync(const MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moveResourceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
VpcClient::MoveResourceGroupOutcomeCallable VpcClient::moveResourceGroupCallable(const MoveResourceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoveResourceGroupOutcome()>>(
[this, request]()
{
return this->moveResourceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VpcClient::ModifySslVpnClientCertOutcome VpcClient::modifySslVpnClientCert(const ModifySslVpnClientCertRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4227,6 +4263,42 @@ VpcClient::DescribeVpnGatewayOutcomeCallable VpcClient::describeVpnGatewayCallab
return task->get_future();
}
VpcClient::DescribeVpnConnectionLogsOutcome VpcClient::describeVpnConnectionLogs(const DescribeVpnConnectionLogsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeVpnConnectionLogsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeVpnConnectionLogsOutcome(DescribeVpnConnectionLogsResult(outcome.result()));
else
return DescribeVpnConnectionLogsOutcome(outcome.error());
}
void VpcClient::describeVpnConnectionLogsAsync(const DescribeVpnConnectionLogsRequest& request, const DescribeVpnConnectionLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeVpnConnectionLogs(request), context);
};
asyncExecute(new Runnable(fn));
}
VpcClient::DescribeVpnConnectionLogsOutcomeCallable VpcClient::describeVpnConnectionLogsCallable(const DescribeVpnConnectionLogsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeVpnConnectionLogsOutcome()>>(
[this, request]()
{
return this->describeVpnConnectionLogs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VpcClient::ModifyBgpGroupAttributeOutcome VpcClient::modifyBgpGroupAttribute(const ModifyBgpGroupAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -124,6 +124,17 @@ void AllocateEipAddressRequest::setOwnerId(long ownerId)
setParameter("OwnerId", std::to_string(ownerId));
}
std::string AllocateEipAddressRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void AllocateEipAddressRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string AllocateEipAddressRequest::getRegionId()const
{
return regionId_;

View File

@@ -46,9 +46,16 @@ void AllocateEipAddressResult::parse(const std::string &payload)
eipAddress_ = value["EipAddress"].asString();
if(!value["OrderId"].isNull())
orderId_ = std::stol(value["OrderId"].asString());
if(!value["ResourceGroupId"].isNull())
resourceGroupId_ = value["ResourceGroupId"].asString();
}
std::string AllocateEipAddressResult::getResourceGroupId()const
{
return resourceGroupId_;
}
std::string AllocateEipAddressResult::getAllocationId()const
{
return allocationId_;

View File

@@ -36,6 +36,17 @@ void CreateVpcRequest::setVpcName(const std::string& vpcName)
setParameter("VpcName", vpcName);
}
std::string CreateVpcRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void CreateVpcRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
long CreateVpcRequest::getResourceOwnerId()const
{
return resourceOwnerId_;

View File

@@ -46,6 +46,8 @@ void CreateVpcResult::parse(const std::string &payload)
vRouterId_ = value["VRouterId"].asString();
if(!value["RouteTableId"].isNull())
routeTableId_ = value["RouteTableId"].asString();
if(!value["ResourceGroupId"].isNull())
resourceGroupId_ = value["ResourceGroupId"].asString();
}
@@ -64,3 +66,8 @@ std::string CreateVpcResult::getVpcId()const
return vpcId_;
}
std::string CreateVpcResult::getResourceGroupId()const
{
return resourceGroupId_;
}

View File

@@ -135,6 +135,17 @@ void DescribeEipAddressesRequest::setPageNumber(int pageNumber)
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeEipAddressesRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void DescribeEipAddressesRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string DescribeEipAddressesRequest::getLockReason()const
{
return lockReason_;

View File

@@ -78,6 +78,8 @@ void DescribeEipAddressesResult::parse(const std::string &payload)
eipAddressesObject.bandwidthPackageId = value["BandwidthPackageId"].asString();
if(!value["BandwidthPackageType"].isNull())
eipAddressesObject.bandwidthPackageType = value["BandwidthPackageType"].asString();
if(!value["ResourceGroupId"].isNull())
eipAddressesObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allOperationLocks = value["OperationLocks"]["LockReason"];
for (auto value : allOperationLocks)
{

View File

@@ -110,16 +110,16 @@ void DescribeVirtualBorderRoutersResult::parse(const std::string &payload)
associatedPhysicalConnectionsObject.vlanId = value["VlanId"].asString();
virtualBorderRouterSetObject.associatedPhysicalConnections.push_back(associatedPhysicalConnectionsObject);
}
auto allAssociatedCens = value["AssociatedCens"]["AssociatedCbn"];
auto allAssociatedCens = value["AssociatedCens"]["AssociatedCen"];
for (auto value : allAssociatedCens)
{
VirtualBorderRouterType::AssociatedCbn associatedCensObject;
VirtualBorderRouterType::AssociatedCen associatedCensObject;
if(!value["CenId"].isNull())
associatedCensObject.cenId = value["CenId"].asString();
if(!value["CenOwnerId"].isNull())
associatedCensObject.cenOwnerId = std::stol(value["CenOwnerId"].asString());
if(!value["CenStatus"].isNull())
associatedCensObject.cenStatus = value["CenStatus"].asString();
if(!value["CenOwnerId"].isNull())
associatedCensObject.cenOwnerId = value["CenOwnerId"].asString();
if(!value["CenOwnerUid"].isNull())
associatedCensObject.cenOwnerUid = std::stol(value["CenOwnerUid"].asString());
virtualBorderRouterSetObject.associatedCens.push_back(associatedCensObject);
}
virtualBorderRouterSet_.push_back(virtualBorderRouterSetObject);

View File

@@ -40,16 +40,16 @@ void DescribeVpcAttributeResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAssociatedCens = value["AssociatedCens"]["AssociatedCbn"];
auto allAssociatedCens = value["AssociatedCens"]["AssociatedCen"];
for (auto value : allAssociatedCens)
{
AssociatedCbn associatedCensObject;
if(!value["CenStatus"].isNull())
associatedCensObject.cenStatus = value["CenStatus"].asString();
AssociatedCen associatedCensObject;
if(!value["CenId"].isNull())
associatedCensObject.cenId = value["CenId"].asString();
if(!value["CenOwnerUid"].isNull())
associatedCensObject.cenOwnerUid = std::stol(value["CenOwnerUid"].asString());
if(!value["CenOwnerId"].isNull())
associatedCensObject.cenOwnerId = std::stol(value["CenOwnerId"].asString());
if(!value["CenStatus"].isNull())
associatedCensObject.cenStatus = value["CenStatus"].asString();
associatedCens_.push_back(associatedCensObject);
}
auto allCloudResources = value["CloudResources"]["CloudResourceSetType"];
@@ -143,7 +143,7 @@ std::string DescribeVpcAttributeResult::getVpcId()const
return vpcId_;
}
std::vector<DescribeVpcAttributeResult::AssociatedCbn> DescribeVpcAttributeResult::getAssociatedCens()const
std::vector<DescribeVpcAttributeResult::AssociatedCen> DescribeVpcAttributeResult::getAssociatedCens()const
{
return associatedCens_;
}

View File

@@ -36,6 +36,17 @@ void DescribeVpcsRequest::setVpcName(const std::string& vpcName)
setParameter("VpcName", vpcName);
}
std::string DescribeVpcsRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void DescribeVpcsRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
long DescribeVpcsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;

View File

@@ -62,6 +62,8 @@ void DescribeVpcsResult::parse(const std::string &payload)
vpcsObject.description = value["Description"].asString();
if(!value["IsDefault"].isNull())
vpcsObject.isDefault = value["IsDefault"].asString() == "true";
if(!value["ResourceGroupId"].isNull())
vpcsObject.resourceGroupId = value["ResourceGroupId"].asString();
auto allVSwitchIds = value["VSwitchIds"]["VSwitchId"];
for (auto value : allVSwitchIds)
vpcsObject.vSwitchIds.push_back(value.asString());

View File

@@ -0,0 +1,148 @@
/*
* 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/vpc/model/DescribeVpnConnectionLogsRequest.h>
using AlibabaCloud::Vpc::Model::DescribeVpnConnectionLogsRequest;
DescribeVpnConnectionLogsRequest::DescribeVpnConnectionLogsRequest() :
RpcServiceRequest("vpc", "2016-04-28", "DescribeVpnConnectionLogs")
{}
DescribeVpnConnectionLogsRequest::~DescribeVpnConnectionLogsRequest()
{}
long DescribeVpnConnectionLogsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeVpnConnectionLogsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeVpnConnectionLogsRequest::getMinutePeriod()const
{
return minutePeriod_;
}
void DescribeVpnConnectionLogsRequest::setMinutePeriod(int minutePeriod)
{
minutePeriod_ = minutePeriod;
setParameter("MinutePeriod", std::to_string(minutePeriod));
}
std::string DescribeVpnConnectionLogsRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeVpnConnectionLogsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeVpnConnectionLogsRequest::getRegionId()const
{
return regionId_;
}
void DescribeVpnConnectionLogsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string DescribeVpnConnectionLogsRequest::getVpnConnectionId()const
{
return vpnConnectionId_;
}
void DescribeVpnConnectionLogsRequest::setVpnConnectionId(const std::string& vpnConnectionId)
{
vpnConnectionId_ = vpnConnectionId;
setParameter("VpnConnectionId", vpnConnectionId);
}
std::string DescribeVpnConnectionLogsRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeVpnConnectionLogsRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
int DescribeVpnConnectionLogsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeVpnConnectionLogsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int DescribeVpnConnectionLogsRequest::getFrom()const
{
return from_;
}
void DescribeVpnConnectionLogsRequest::setFrom(int from)
{
from_ = from;
setParameter("From", std::to_string(from));
}
int DescribeVpnConnectionLogsRequest::getTo()const
{
return to_;
}
void DescribeVpnConnectionLogsRequest::setTo(int to)
{
to_ = to;
setParameter("To", std::to_string(to));
}
long DescribeVpnConnectionLogsRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeVpnConnectionLogsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
int DescribeVpnConnectionLogsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeVpnConnectionLogsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/vpc/model/DescribeVpnConnectionLogsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vpc;
using namespace AlibabaCloud::Vpc::Model;
DescribeVpnConnectionLogsResult::DescribeVpnConnectionLogsResult() :
ServiceResult()
{}
DescribeVpnConnectionLogsResult::DescribeVpnConnectionLogsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeVpnConnectionLogsResult::~DescribeVpnConnectionLogsResult()
{}
void DescribeVpnConnectionLogsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["Logs"];
for (const auto &item : allData)
data_.push_back(item.asString());
if(!value["Count"].isNull())
count_ = std::stoi(value["Count"].asString());
if(!value["IsCompleted"].isNull())
isCompleted_ = value["IsCompleted"].asString() == "true";
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int DescribeVpnConnectionLogsResult::getPageSize()const
{
return pageSize_;
}
int DescribeVpnConnectionLogsResult::getPageNumber()const
{
return pageNumber_;
}
bool DescribeVpnConnectionLogsResult::getIsCompleted()const
{
return isCompleted_;
}
std::vector<std::string> DescribeVpnConnectionLogsResult::getData()const
{
return data_;
}
int DescribeVpnConnectionLogsResult::getCount()const
{
return count_;
}

View File

@@ -91,17 +91,6 @@ void ModifyVpcAttributeRequest::setDescription(const std::string& description)
setParameter("Description", description);
}
std::string ModifyVpcAttributeRequest::getUserCidr()const
{
return userCidr_;
}
void ModifyVpcAttributeRequest::setUserCidr(const std::string& userCidr)
{
userCidr_ = userCidr;
setParameter("UserCidr", userCidr);
}
long ModifyVpcAttributeRequest::getOwnerId()const
{
return ownerId_;

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/vpc/model/MoveResourceGroupRequest.h>
using AlibabaCloud::Vpc::Model::MoveResourceGroupRequest;
MoveResourceGroupRequest::MoveResourceGroupRequest() :
RpcServiceRequest("vpc", "2016-04-28", "MoveResourceGroup")
{}
MoveResourceGroupRequest::~MoveResourceGroupRequest()
{}
long MoveResourceGroupRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void MoveResourceGroupRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string MoveResourceGroupRequest::getResourceId()const
{
return resourceId_;
}
void MoveResourceGroupRequest::setResourceId(const std::string& resourceId)
{
resourceId_ = resourceId;
setParameter("ResourceId", resourceId);
}
std::string MoveResourceGroupRequest::getNewResourceGroupId()const
{
return newResourceGroupId_;
}
void MoveResourceGroupRequest::setNewResourceGroupId(const std::string& newResourceGroupId)
{
newResourceGroupId_ = newResourceGroupId;
setParameter("NewResourceGroupId", newResourceGroupId);
}
std::string MoveResourceGroupRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void MoveResourceGroupRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string MoveResourceGroupRequest::getRegionId()const
{
return regionId_;
}
void MoveResourceGroupRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string MoveResourceGroupRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void MoveResourceGroupRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long MoveResourceGroupRequest::getOwnerId()const
{
return ownerId_;
}
void MoveResourceGroupRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string MoveResourceGroupRequest::getResourceType()const
{
return resourceType_;
}
void MoveResourceGroupRequest::setResourceType(const std::string& resourceType)
{
resourceType_ = resourceType;
setParameter("ResourceType", resourceType);
}

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