Supported DescribeImageSharePermission.

This commit is contained in:
sdk-team
2025-03-18 07:33:31 +00:00
parent ec9cd15b58
commit fb513278fe
87 changed files with 1547 additions and 99 deletions

View File

@@ -6531,6 +6531,42 @@ EnsClient::DescribeUserBandWidthDataOutcomeCallable EnsClient::describeUserBandW
return task->get_future();
}
EnsClient::DescribeVSwitchAttributesOutcome EnsClient::describeVSwitchAttributes(const DescribeVSwitchAttributesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeVSwitchAttributesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeVSwitchAttributesOutcome(DescribeVSwitchAttributesResult(outcome.result()));
else
return DescribeVSwitchAttributesOutcome(outcome.error());
}
void EnsClient::describeVSwitchAttributesAsync(const DescribeVSwitchAttributesRequest& request, const DescribeVSwitchAttributesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeVSwitchAttributes(request), context);
};
asyncExecute(new Runnable(fn));
}
EnsClient::DescribeVSwitchAttributesOutcomeCallable EnsClient::describeVSwitchAttributesCallable(const DescribeVSwitchAttributesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeVSwitchAttributesOutcome()>>(
[this, request]()
{
return this->describeVSwitchAttributes(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EnsClient::DescribeVSwitchesOutcome EnsClient::describeVSwitches(const DescribeVSwitchesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7323,6 +7359,42 @@ EnsClient::ListObjectsOutcomeCallable EnsClient::listObjectsCallable(const ListO
return task->get_future();
}
EnsClient::ListProductAbilitiesOutcome EnsClient::listProductAbilities(const ListProductAbilitiesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListProductAbilitiesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListProductAbilitiesOutcome(ListProductAbilitiesResult(outcome.result()));
else
return ListProductAbilitiesOutcome(outcome.error());
}
void EnsClient::listProductAbilitiesAsync(const ListProductAbilitiesRequest& request, const ListProductAbilitiesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listProductAbilities(request), context);
};
asyncExecute(new Runnable(fn));
}
EnsClient::ListProductAbilitiesOutcomeCallable EnsClient::listProductAbilitiesCallable(const ListProductAbilitiesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListProductAbilitiesOutcome()>>(
[this, request]()
{
return this->listProductAbilities(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EnsClient::ListTagResourcesOutcome EnsClient::listTagResources(const ListTagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7395,6 +7467,42 @@ EnsClient::ModifyEnsEipAddressAttributeOutcomeCallable EnsClient::modifyEnsEipAd
return task->get_future();
}
EnsClient::ModifyEnsRouteEntryOutcome EnsClient::modifyEnsRouteEntry(const ModifyEnsRouteEntryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyEnsRouteEntryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyEnsRouteEntryOutcome(ModifyEnsRouteEntryResult(outcome.result()));
else
return ModifyEnsRouteEntryOutcome(outcome.error());
}
void EnsClient::modifyEnsRouteEntryAsync(const ModifyEnsRouteEntryRequest& request, const ModifyEnsRouteEntryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyEnsRouteEntry(request), context);
};
asyncExecute(new Runnable(fn));
}
EnsClient::ModifyEnsRouteEntryOutcomeCallable EnsClient::modifyEnsRouteEntryCallable(const ModifyEnsRouteEntryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyEnsRouteEntryOutcome()>>(
[this, request]()
{
return this->modifyEnsRouteEntry(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EnsClient::ModifyEpnInstanceOutcome EnsClient::modifyEpnInstance(const ModifyEpnInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -75,6 +75,15 @@ void CreateEipInstanceRequest::setName(const std::string &name) {
setParameter(std::string("Name"), name);
}
std::string CreateEipInstanceRequest::getClientToken() const {
return clientToken_;
}
void CreateEipInstanceRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string CreateEipInstanceRequest::getDescription() const {
return description_;
}

View File

@@ -34,15 +34,6 @@ void CreateEnsRouteEntryRequest::setRouteEntryName(const std::string &routeEntry
setParameter(std::string("RouteEntryName"), routeEntryName);
}
std::string CreateEnsRouteEntryRequest::getDescription() const {
return description_;
}
void CreateEnsRouteEntryRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string CreateEnsRouteEntryRequest::getNextHopId() const {
return nextHopId_;
}
@@ -79,3 +70,21 @@ void CreateEnsRouteEntryRequest::setDestinationCidrBlock(const std::string &dest
setParameter(std::string("DestinationCidrBlock"), destinationCidrBlock);
}
std::string CreateEnsRouteEntryRequest::getDescription() const {
return description_;
}
void CreateEnsRouteEntryRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string CreateEnsRouteEntryRequest::getSourceCidrBlock() const {
return sourceCidrBlock_;
}
void CreateEnsRouteEntryRequest::setSourceCidrBlock(const std::string &sourceCidrBlock) {
sourceCidrBlock_ = sourceCidrBlock;
setParameter(std::string("SourceCidrBlock"), sourceCidrBlock);
}

View File

@@ -52,6 +52,15 @@ void CreateImageRequest::setImageName(const std::string &imageName) {
setParameter(std::string("ImageName"), imageName);
}
std::string CreateImageRequest::getTargetOSSRegionId() const {
return targetOSSRegionId_;
}
void CreateImageRequest::setTargetOSSRegionId(const std::string &targetOSSRegionId) {
targetOSSRegionId_ = targetOSSRegionId;
setParameter(std::string("TargetOSSRegionId"), targetOSSRegionId);
}
std::string CreateImageRequest::getInstanceId() const {
return instanceId_;
}

View File

@@ -70,6 +70,15 @@ void CreateLoadBalancerRequest::setNetworkId(const std::string &networkId) {
setParameter(std::string("NetworkId"), networkId);
}
std::string CreateLoadBalancerRequest::getClientToken() const {
return clientToken_;
}
void CreateLoadBalancerRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string CreateLoadBalancerRequest::getPayType() const {
return payType_;
}

View File

@@ -43,3 +43,22 @@ void CreateSecurityGroupRequest::setSecurityGroupName(const std::string &securit
setParameter(std::string("SecurityGroupName"), securityGroupName);
}
std::vector<CreateSecurityGroupRequest::Permissions> CreateSecurityGroupRequest::getPermissions() const {
return permissions_;
}
void CreateSecurityGroupRequest::setPermissions(const std::vector<CreateSecurityGroupRequest::Permissions> &permissions) {
permissions_ = permissions;
for(int dep1 = 0; dep1 != permissions.size(); dep1++) {
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".SourcePortRange", permissions[dep1].sourcePortRange);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".PortRange", permissions[dep1].portRange);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".IpProtocol", permissions[dep1].ipProtocol);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".SourceCidrIp", permissions[dep1].sourceCidrIp);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".Description", permissions[dep1].description);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(permissions[dep1].priority));
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".DestCidrIp", permissions[dep1].destCidrIp);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".Direction", permissions[dep1].direction);
setParameter(std::string("Permissions") + "." + std::to_string(dep1 + 1) + ".Policy", permissions[dep1].policy);
}
}

View File

@@ -61,6 +61,15 @@ void CreateSnatEntryRequest::setSourceVSwitchId(const std::string &sourceVSwitch
setParameter(std::string("SourceVSwitchId"), sourceVSwitchId);
}
bool CreateSnatEntryRequest::getEipAffinity() const {
return eipAffinity_;
}
void CreateSnatEntryRequest::setEipAffinity(bool eipAffinity) {
eipAffinity_ = eipAffinity;
setParameter(std::string("EipAffinity"), eipAffinity ? "true" : "false");
}
std::string CreateSnatEntryRequest::getSourceNetworkId() const {
return sourceNetworkId_;
}

View File

@@ -25,6 +25,15 @@ DeleteNatGatewayRequest::DeleteNatGatewayRequest()
DeleteNatGatewayRequest::~DeleteNatGatewayRequest() {}
bool DeleteNatGatewayRequest::getForceDelete() const {
return forceDelete_;
}
void DeleteNatGatewayRequest::setForceDelete(bool forceDelete) {
forceDelete_ = forceDelete;
setParameter(std::string("ForceDelete"), forceDelete ? "true" : "false");
}
std::string DeleteNatGatewayRequest::getNatGatewayId() const {
return natGatewayId_;
}

View File

@@ -57,6 +57,9 @@ void DescribeCloudDiskAvailableResourceInfoResult::parse(const std::string &payl
supportResourcesObject.category = valueSupportResourcesSupportResource["Category"].asString();
if(!valueSupportResourcesSupportResource["DefaultDiskSize"].isNull())
supportResourcesObject.defaultDiskSize = std::stol(valueSupportResourcesSupportResource["DefaultDiskSize"].asString());
auto allAbility = value["Ability"]["Ability"];
for (auto value : allAbility)
supportResourcesObject.ability.push_back(value.asString());
supportResources_.push_back(supportResourcesObject);
}

View File

@@ -58,6 +58,9 @@ void DescribeElbAvailableResourceInfoResult::parse(const std::string &payload)
auto allLoadBalancerSpec = value["LoadBalancerSpec"]["LoadBalancerSpec"];
for (auto value : allLoadBalancerSpec)
elbAvailableResourceInfoObject.loadBalancerSpec.push_back(value.asString());
auto allAbility = value["Ability"]["Ability"];
for (auto value : allAbility)
elbAvailableResourceInfoObject.ability.push_back(value.asString());
elbAvailableResourceInfo_.push_back(elbAvailableResourceInfoObject);
}

View File

@@ -57,6 +57,10 @@ void DescribeEnsRouteEntryListResult::parse(const std::string &payload)
routeEntrysObject.routeEntryId = valueRouteEntrysRouteEntry["RouteEntryId"].asString();
if(!valueRouteEntrysRouteEntry["RouteTableId"].isNull())
routeEntrysObject.routeTableId = valueRouteEntrysRouteEntry["RouteTableId"].asString();
if(!valueRouteEntrysRouteEntry["SourceCidrBlock"].isNull())
routeEntrysObject.sourceCidrBlock = valueRouteEntrysRouteEntry["SourceCidrBlock"].asString();
if(!valueRouteEntrysRouteEntry["CreationTime"].isNull())
routeEntrysObject.creationTime = valueRouteEntrysRouteEntry["CreationTime"].asString();
auto allNextHopsNode = valueRouteEntrysRouteEntry["NextHops"]["NextHop"];
for (auto valueRouteEntrysRouteEntryNextHopsNextHop : allNextHopsNode)
{
@@ -65,6 +69,8 @@ void DescribeEnsRouteEntryListResult::parse(const std::string &payload)
nextHopsObject.nextHopId = valueRouteEntrysRouteEntryNextHopsNextHop["NextHopId"].asString();
if(!valueRouteEntrysRouteEntryNextHopsNextHop["NextHopType"].isNull())
nextHopsObject.nextHopType = valueRouteEntrysRouteEntryNextHopsNextHop["NextHopType"].asString();
if(!valueRouteEntrysRouteEntryNextHopsNextHop["NextHopName"].isNull())
nextHopsObject.nextHopName = valueRouteEntrysRouteEntryNextHopsNextHop["NextHopName"].asString();
routeEntrysObject.nextHops.push_back(nextHopsObject);
}
routeEntrys_.push_back(routeEntrysObject);

View File

@@ -25,22 +25,22 @@ DescribeEnsRouteTablesRequest::DescribeEnsRouteTablesRequest()
DescribeEnsRouteTablesRequest::~DescribeEnsRouteTablesRequest() {}
int DescribeEnsRouteTablesRequest::getPageNumber() const {
return pageNumber_;
std::string DescribeEnsRouteTablesRequest::getType() const {
return type_;
}
void DescribeEnsRouteTablesRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
void DescribeEnsRouteTablesRequest::setType(const std::string &type) {
type_ = type;
setParameter(std::string("Type"), type);
}
int DescribeEnsRouteTablesRequest::getPageSize() const {
return pageSize_;
std::string DescribeEnsRouteTablesRequest::getAssociateType() const {
return associateType_;
}
void DescribeEnsRouteTablesRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
void DescribeEnsRouteTablesRequest::setAssociateType(const std::string &associateType) {
associateType_ = associateType;
setParameter(std::string("AssociateType"), associateType);
}
std::string DescribeEnsRouteTablesRequest::getEnsRegionId() const {
@@ -70,3 +70,41 @@ void DescribeEnsRouteTablesRequest::setNetworkId(const std::string &networkId) {
setParameter(std::string("NetworkId"), networkId);
}
int DescribeEnsRouteTablesRequest::getPageNumber() const {
return pageNumber_;
}
void DescribeEnsRouteTablesRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string DescribeEnsRouteTablesRequest::getRouteTableName() const {
return routeTableName_;
}
void DescribeEnsRouteTablesRequest::setRouteTableName(const std::string &routeTableName) {
routeTableName_ = routeTableName;
setParameter(std::string("RouteTableName"), routeTableName);
}
int DescribeEnsRouteTablesRequest::getPageSize() const {
return pageSize_;
}
void DescribeEnsRouteTablesRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<DescribeEnsRouteTablesRequest::std::string> DescribeEnsRouteTablesRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeEnsRouteTablesRequest::setEnsRegionIds(const std::vector<DescribeEnsRouteTablesRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}

View File

@@ -59,6 +59,24 @@ void DescribeEnsRouteTablesResult::parse(const std::string &payload)
routeTablesObject.routeTableName = valueRouteTablesRouteTable["RouteTableName"].asString();
if(!valueRouteTablesRouteTable["NetworkName"].isNull())
routeTablesObject.networkName = valueRouteTablesRouteTable["NetworkName"].asString();
if(!valueRouteTablesRouteTable["AssociateType"].isNull())
routeTablesObject.associateType = valueRouteTablesRouteTable["AssociateType"].asString();
if(!valueRouteTablesRouteTable["Description"].isNull())
routeTablesObject.description = valueRouteTablesRouteTable["Description"].asString();
if(!valueRouteTablesRouteTable["IsDefaultGatewayRouteTable"].isNull())
routeTablesObject.isDefaultGatewayRouteTable = valueRouteTablesRouteTable["IsDefaultGatewayRouteTable"].asString() == "true";
auto allAssociatedResourcesNode = valueRouteTablesRouteTable["AssociatedResources"]["AssociatedResource"];
for (auto valueRouteTablesRouteTableAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
{
RouteTable::AssociatedResource associatedResourcesObject;
if(!valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceType"].isNull())
associatedResourcesObject.resourceType = valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceType"].asString();
if(!valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceId"].isNull())
associatedResourcesObject.resourceId = valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceId"].asString();
if(!valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceName"].isNull())
associatedResourcesObject.resourceName = valueRouteTablesRouteTableAssociatedResourcesAssociatedResource["ResourceName"].asString();
routeTablesObject.associatedResources.push_back(associatedResourcesObject);
}
auto allVSwitchIds = value["VSwitchIds"]["VSwitch"];
for (auto value : allVSwitchIds)
routeTablesObject.vSwitchIds.push_back(value.asString());

View File

@@ -57,6 +57,8 @@ void DescribeImageInfosResult::parse(const std::string &payload)
imagesObject.oSType = valueImagesImage["OSType"].asString();
if(!valueImagesImage["ComputeType"].isNull())
imagesObject.computeType = valueImagesImage["ComputeType"].asString();
if(!valueImagesImage["RegionId"].isNull())
imagesObject.regionId = valueImagesImage["RegionId"].asString();
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
{

View File

@@ -39,9 +39,14 @@ void DescribeImageSharePermissionResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAccounts = value["Accounts"]["Account"];
for (const auto &item : allAccounts)
accounts_.push_back(item.asString());
auto allAccountsNode = value["Accounts"]["Account"];
for (auto valueAccountsAccount : allAccountsNode)
{
Account accountsObject;
if(!valueAccountsAccount["AliyunUid"].isNull())
accountsObject.aliyunUid = valueAccountsAccount["AliyunUid"].asString();
accounts_.push_back(accountsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageSize"].isNull())
@@ -73,7 +78,7 @@ std::string DescribeImageSharePermissionResult::getImageId()const
return imageId_;
}
std::vector<std::string> DescribeImageSharePermissionResult::getAccounts()const
std::vector<DescribeImageSharePermissionResult::Account> DescribeImageSharePermissionResult::getAccounts()const
{
return accounts_;
}

View File

@@ -59,6 +59,8 @@ void DescribeImagesResult::parse(const std::string &payload)
imagesObject.platform = valueImagesImage["Platform"].asString();
if(!valueImagesImage["SnapshotId"].isNull())
imagesObject.snapshotId = valueImagesImage["SnapshotId"].asString();
if(!valueImagesImage["RegionId"].isNull())
imagesObject.regionId = valueImagesImage["RegionId"].asString();
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
{

View File

@@ -69,6 +69,8 @@ void DescribeLoadBalancerAttributeResult::parse(const std::string &payload)
listenerPortsAndProtocolsObject.listenerForward = valueListenerPortsAndProtocolslistener["ListenerForward"].asString();
if(!valueListenerPortsAndProtocolslistener["ForwardPort"].isNull())
listenerPortsAndProtocolsObject.forwardPort = std::stoi(valueListenerPortsAndProtocolslistener["ForwardPort"].asString());
if(!valueListenerPortsAndProtocolslistener["BackendServerPort"].isNull())
listenerPortsAndProtocolsObject.backendServerPort = std::stoi(valueListenerPortsAndProtocolslistener["BackendServerPort"].asString());
listenerPortsAndProtocols_.push_back(listenerPortsAndProtocolsObject);
}
auto allListenerPorts = value["ListenerPorts"]["listenerPort"];

View File

@@ -25,6 +25,15 @@ DescribeLoadBalancerListenersRequest::DescribeLoadBalancerListenersRequest()
DescribeLoadBalancerListenersRequest::~DescribeLoadBalancerListenersRequest() {}
std::string DescribeLoadBalancerListenersRequest::getDescription() const {
return description_;
}
void DescribeLoadBalancerListenersRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
int DescribeLoadBalancerListenersRequest::getPageNumber() const {
return pageNumber_;
}
@@ -43,6 +52,15 @@ void DescribeLoadBalancerListenersRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
int DescribeLoadBalancerListenersRequest::getListenerPort() const {
return listenerPort_;
}
void DescribeLoadBalancerListenersRequest::setListenerPort(int listenerPort) {
listenerPort_ = listenerPort;
setParameter(std::string("ListenerPort"), std::to_string(listenerPort));
}
std::string DescribeLoadBalancerListenersRequest::getLoadBalancerId() const {
return loadBalancerId_;
}

View File

@@ -59,6 +59,8 @@ void DescribeLoadBalancerListenersResult::parse(const std::string &payload)
listenersObject.forwardPort = valueListenersListener["ForwardPort"].asString();
if(!valueListenersListener["CreateTime"].isNull())
listenersObject.createTime = valueListenersListener["CreateTime"].asString();
if(!valueListenersListener["BackendServerPort"].isNull())
listenersObject.backendServerPort = std::stoi(valueListenersListener["BackendServerPort"].asString());
listeners_.push_back(listenersObject);
}
if(!value["PageNumber"].isNull())

View File

@@ -97,6 +97,17 @@ void DescribeLoadBalancersRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<DescribeLoadBalancersRequest::std::string> DescribeLoadBalancersRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeLoadBalancersRequest::setEnsRegionIds(const std::vector<DescribeLoadBalancersRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}
std::string DescribeLoadBalancersRequest::getAddress() const {
return address_;
}

View File

@@ -88,3 +88,25 @@ void DescribeNatGatewaysRequest::setNatGatewayId(const std::string &natGatewayId
setParameter(std::string("NatGatewayId"), natGatewayId);
}
std::vector<DescribeNatGatewaysRequest::std::string> DescribeNatGatewaysRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeNatGatewaysRequest::setEnsRegionIds(const std::vector<DescribeNatGatewaysRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}
std::vector<DescribeNatGatewaysRequest::std::string> DescribeNatGatewaysRequest::getNatGatewayIds() const {
return natGatewayIds_;
}
void DescribeNatGatewaysRequest::setNatGatewayIds(const std::vector<DescribeNatGatewaysRequest::std::string> &natGatewayIds) {
natGatewayIds_ = natGatewayIds;
for(int dep1 = 0; dep1 != natGatewayIds.size(); dep1++) {
setParameter(std::string("NatGatewayIds") + "." + std::to_string(dep1 + 1), natGatewayIds[dep1]);
}
}

View File

@@ -57,6 +57,20 @@ void DescribeNatGatewaysResult::parse(const std::string &payload)
natGatewaysObject.creationTime = valueNatGatewaysNatGateway["CreationTime"].asString();
if(!valueNatGatewaysNatGateway["Spec"].isNull())
natGatewaysObject.spec = valueNatGatewaysNatGateway["Spec"].asString();
if(!valueNatGatewaysNatGateway["Status"].isNull())
natGatewaysObject.status = valueNatGatewaysNatGateway["Status"].asString();
auto allIpListsNode = valueNatGatewaysNatGateway["IpLists"]["IpList"];
for (auto valueNatGatewaysNatGatewayIpListsIpList : allIpListsNode)
{
NatGateway::IpList ipListsObject;
if(!valueNatGatewaysNatGatewayIpListsIpList["UsingStatus"].isNull())
ipListsObject.usingStatus = valueNatGatewaysNatGatewayIpListsIpList["UsingStatus"].asString();
if(!valueNatGatewaysNatGatewayIpListsIpList["IpAddress"].isNull())
ipListsObject.ipAddress = valueNatGatewaysNatGatewayIpListsIpList["IpAddress"].asString();
if(!valueNatGatewaysNatGatewayIpListsIpList["AllocationId"].isNull())
ipListsObject.allocationId = valueNatGatewaysNatGatewayIpListsIpList["AllocationId"].asString();
natGatewaysObject.ipLists.push_back(ipListsObject);
}
natGateways_.push_back(natGatewaysObject);
}
if(!value["PageNumber"].isNull())

View File

@@ -52,6 +52,24 @@ void DescribeNetworkAttributeResult::parse(const std::string &payload)
auto allVSwitchIds = value["VSwitchIds"]["VSwitchId"];
for (const auto &item : allVSwitchIds)
vSwitchIds_.push_back(item.asString());
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
for (const auto &item : allInstanceIds)
instanceIds_.push_back(item.asString());
auto allRouteTableIds = value["RouteTableIds"]["RouteTableId"];
for (const auto &item : allRouteTableIds)
routeTableIds_.push_back(item.asString());
auto allNetworkInterfaceIds = value["NetworkInterfaceIds"]["NetworkInterfaceId"];
for (const auto &item : allNetworkInterfaceIds)
networkInterfaceIds_.push_back(item.asString());
auto allLoadBalancerIds = value["LoadBalancerIds"]["LoadBalancerId"];
for (const auto &item : allLoadBalancerIds)
loadBalancerIds_.push_back(item.asString());
auto allNatGatewayIds = value["NatGatewayIds"]["NatGatewayId"];
for (const auto &item : allNatGatewayIds)
natGatewayIds_.push_back(item.asString());
auto allHaVipIds = value["HaVipIds"]["HaVipId"];
for (const auto &item : allHaVipIds)
haVipIds_.push_back(item.asString());
if(!value["EnsRegionId"].isNull())
ensRegionId_ = value["EnsRegionId"].asString();
if(!value["NetworkId"].isNull())
@@ -70,6 +88,10 @@ void DescribeNetworkAttributeResult::parse(const std::string &payload)
routerTableId_ = value["RouterTableId"].asString();
if(!value["NetworkAclId"].isNull())
networkAclId_ = value["NetworkAclId"].asString();
if(!value["RouteTableId"].isNull())
routeTableId_ = value["RouteTableId"].asString();
if(!value["GatewayRouteTableId"].isNull())
gatewayRouteTableId_ = value["GatewayRouteTableId"].asString();
}
@@ -83,6 +105,11 @@ std::string DescribeNetworkAttributeResult::getNetworkName()const
return networkName_;
}
std::string DescribeNetworkAttributeResult::getGatewayRouteTableId()const
{
return gatewayRouteTableId_;
}
std::string DescribeNetworkAttributeResult::getDescription()const
{
return description_;
@@ -93,6 +120,11 @@ std::string DescribeNetworkAttributeResult::getCreatedTime()const
return createdTime_;
}
std::string DescribeNetworkAttributeResult::getRouteTableId()const
{
return routeTableId_;
}
std::string DescribeNetworkAttributeResult::getNetworkAclId()const
{
return networkAclId_;
@@ -103,19 +135,19 @@ std::vector<std::string> DescribeNetworkAttributeResult::getVSwitchIds()const
return vSwitchIds_;
}
std::vector<std::string> DescribeNetworkAttributeResult::getLoadBalancerIds()const
{
return loadBalancerIds_;
}
std::string DescribeNetworkAttributeResult::getCidrBlock()const
{
return cidrBlock_;
}
std::string DescribeNetworkAttributeResult::getRouterTableId()const
std::vector<std::string> DescribeNetworkAttributeResult::getNetworkInterfaceIds()const
{
return routerTableId_;
}
std::string DescribeNetworkAttributeResult::getEnsRegionId()const
{
return ensRegionId_;
return networkInterfaceIds_;
}
std::string DescribeNetworkAttributeResult::getNetworkId()const
@@ -123,6 +155,36 @@ std::string DescribeNetworkAttributeResult::getNetworkId()const
return networkId_;
}
std::vector<std::string> DescribeNetworkAttributeResult::getNatGatewayIds()const
{
return natGatewayIds_;
}
std::vector<std::string> DescribeNetworkAttributeResult::getRouteTableIds()const
{
return routeTableIds_;
}
std::vector<std::string> DescribeNetworkAttributeResult::getHaVipIds()const
{
return haVipIds_;
}
std::string DescribeNetworkAttributeResult::getRouterTableId()const
{
return routerTableId_;
}
std::vector<std::string> DescribeNetworkAttributeResult::getInstanceIds()const
{
return instanceIds_;
}
std::string DescribeNetworkAttributeResult::getEnsRegionId()const
{
return ensRegionId_;
}
std::vector<DescribeNetworkAttributeResult::CloudResourceSetType> DescribeNetworkAttributeResult::getCloudResources()const
{
return cloudResources_;

View File

@@ -99,6 +99,17 @@ void DescribeNetworkInterfacesRequest::setStatus(const std::string &status) {
setParameter(std::string("Status"), status);
}
std::vector<DescribeNetworkInterfacesRequest::std::string> DescribeNetworkInterfacesRequest::getNetworkInterfaceIds() const {
return networkInterfaceIds_;
}
void DescribeNetworkInterfacesRequest::setNetworkInterfaceIds(const std::vector<DescribeNetworkInterfacesRequest::std::string> &networkInterfaceIds) {
networkInterfaceIds_ = networkInterfaceIds;
for(int dep1 = 0; dep1 != networkInterfaceIds.size(); dep1++) {
setParameter(std::string("NetworkInterfaceIds") + "." + std::to_string(dep1 + 1), networkInterfaceIds[dep1]);
}
}
std::string DescribeNetworkInterfacesRequest::getSecurityGroupId() const {
return securityGroupId_;
}
@@ -135,6 +146,17 @@ void DescribeNetworkInterfacesRequest::setPageSize(const std::string &pageSize)
setParameter(std::string("PageSize"), pageSize);
}
std::vector<DescribeNetworkInterfacesRequest::std::string> DescribeNetworkInterfacesRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeNetworkInterfacesRequest::setEnsRegionIds(const std::vector<DescribeNetworkInterfacesRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}
std::string DescribeNetworkInterfacesRequest::getPrimaryIpAddress() const {
return primaryIpAddress_;
}

View File

@@ -25,15 +25,6 @@ DescribeNetworksRequest::DescribeNetworksRequest()
DescribeNetworksRequest::~DescribeNetworksRequest() {}
int DescribeNetworksRequest::getPageNumber() const {
return pageNumber_;
}
void DescribeNetworksRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string DescribeNetworksRequest::getEnsRegionId() const {
return ensRegionId_;
}
@@ -43,6 +34,35 @@ void DescribeNetworksRequest::setEnsRegionId(const std::string &ensRegionId) {
setParameter(std::string("EnsRegionId"), ensRegionId);
}
std::vector<DescribeNetworksRequest::std::string> DescribeNetworksRequest::getNetworkIds() const {
return networkIds_;
}
void DescribeNetworksRequest::setNetworkIds(const std::vector<DescribeNetworksRequest::std::string> &networkIds) {
networkIds_ = networkIds;
for(int dep1 = 0; dep1 != networkIds.size(); dep1++) {
setParameter(std::string("NetworkIds") + "." + std::to_string(dep1 + 1), networkIds[dep1]);
}
}
std::string DescribeNetworksRequest::getNetworkId() const {
return networkId_;
}
void DescribeNetworksRequest::setNetworkId(const std::string &networkId) {
networkId_ = networkId;
setParameter(std::string("NetworkId"), networkId);
}
int DescribeNetworksRequest::getPageNumber() const {
return pageNumber_;
}
void DescribeNetworksRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
int DescribeNetworksRequest::getPageSize() const {
return pageSize_;
}
@@ -61,12 +81,14 @@ void DescribeNetworksRequest::setNetworkName(const std::string &networkName) {
setParameter(std::string("NetworkName"), networkName);
}
std::string DescribeNetworksRequest::getNetworkId() const {
return networkId_;
std::vector<DescribeNetworksRequest::std::string> DescribeNetworksRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeNetworksRequest::setNetworkId(const std::string &networkId) {
networkId_ = networkId;
setParameter(std::string("NetworkId"), networkId);
void DescribeNetworksRequest::setEnsRegionIds(const std::vector<DescribeNetworksRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}

View File

@@ -61,9 +61,16 @@ void DescribeNetworksResult::parse(const std::string &payload)
networksObject.routerTableId = valueNetworksNetwork["RouterTableId"].asString();
if(!valueNetworksNetwork["NetworkAclId"].isNull())
networksObject.networkAclId = valueNetworksNetwork["NetworkAclId"].asString();
if(!valueNetworksNetwork["RouteTableId"].isNull())
networksObject.routeTableId = valueNetworksNetwork["RouteTableId"].asString();
if(!valueNetworksNetwork["GatewayRouteTableId"].isNull())
networksObject.gatewayRouteTableId = valueNetworksNetwork["GatewayRouteTableId"].asString();
auto allVSwitchIds = value["VSwitchIds"]["VSwitchId"];
for (auto value : allVSwitchIds)
networksObject.vSwitchIds.push_back(value.asString());
auto allRouteTableIds = value["RouteTableIds"]["RouteTableId"];
for (auto value : allRouteTableIds)
networksObject.routeTableIds.push_back(value.asString());
networks_.push_back(networksObject);
}
if(!value["TotalCount"].isNull())

View File

@@ -53,6 +53,12 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
securityGroupsObject.securityGroupId = valueSecurityGroupsSecurityGroup["SecurityGroupId"].asString();
if(!valueSecurityGroupsSecurityGroup["SecurityGroupName"].isNull())
securityGroupsObject.securityGroupName = valueSecurityGroupsSecurityGroup["SecurityGroupName"].asString();
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
for (auto value : allInstanceIds)
securityGroupsObject.instanceIds.push_back(value.asString());
auto allNetworkInterfaceIds = value["NetworkInterfaceIds"]["NetworkInterfaceId"];
for (auto value : allNetworkInterfaceIds)
securityGroupsObject.networkInterfaceIds.push_back(value.asString());
securityGroups_.push_back(securityGroupsObject);
}
if(!value["PageSize"].isNull())

View File

@@ -69,6 +69,8 @@ void DescribeSelfImagesResult::parse(const std::string &payload)
imagesObject.snapshotId = valueImagesImage["SnapshotId"].asString();
if(!valueImagesImage["ImageStorageSize"].isNull())
imagesObject.imageStorageSize = valueImagesImage["ImageStorageSize"].asString();
if(!valueImagesImage["RegionId"].isNull())
imagesObject.regionId = valueImagesImage["RegionId"].asString();
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
{
@@ -87,9 +89,30 @@ void DescribeSelfImagesResult::parse(const std::string &payload)
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["PageSize"].isNull())
pageSize_ = value["PageSize"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = value["PageNumber"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = value["TotalCount"].asString();
}
std::string DescribeSelfImagesResult::getTotalCount()const
{
return totalCount_;
}
std::string DescribeSelfImagesResult::getPageSize()const
{
return pageSize_;
}
std::string DescribeSelfImagesResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeSelfImagesResult::Image> DescribeSelfImagesResult::getImages()const
{
return images_;

View File

@@ -77,6 +77,8 @@ void DescribeSnatAttributeResult::parse(const std::string &payload)
destCIDR_ = value["DestCIDR"].asString();
if(!value["IspAffinity"].isNull())
ispAffinity_ = value["IspAffinity"].asString() == "true";
if(!value["EipAffinity"].isNull())
eipAffinity_ = value["EipAffinity"].asString() == "true";
}
@@ -105,6 +107,11 @@ std::string DescribeSnatAttributeResult::getStandbySnatIp()const
return standbySnatIp_;
}
bool DescribeSnatAttributeResult::getEipAffinity()const
{
return eipAffinity_;
}
std::string DescribeSnatAttributeResult::getType()const
{
return type_;

View File

@@ -43,6 +43,17 @@ void DescribeSnatTableEntriesRequest::setSnatEntryId(const std::string &snatEntr
setParameter(std::string("SnatEntryId"), snatEntryId);
}
std::vector<DescribeSnatTableEntriesRequest::std::string> DescribeSnatTableEntriesRequest::getSnatIps() const {
return snatIps_;
}
void DescribeSnatTableEntriesRequest::setSnatIps(const std::vector<DescribeSnatTableEntriesRequest::std::string> &snatIps) {
snatIps_ = snatIps;
for(int dep1 = 0; dep1 != snatIps.size(); dep1++) {
setParameter(std::string("SnatIps") + "." + std::to_string(dep1 + 1), snatIps[dep1]);
}
}
std::string DescribeSnatTableEntriesRequest::getSourceCIDR() const {
return sourceCIDR_;
}

View File

@@ -67,6 +67,8 @@ void DescribeSnatTableEntriesResult::parse(const std::string &payload)
snatTableEntriesObject.destCIDR = valueSnatTableEntriesSnatTableEntry["DestCIDR"].asString();
if(!valueSnatTableEntriesSnatTableEntry["IspAffinity"].isNull())
snatTableEntriesObject.ispAffinity = valueSnatTableEntriesSnatTableEntry["IspAffinity"].asString() == "true";
if(!valueSnatTableEntriesSnatTableEntry["EipAffinity"].isNull())
snatTableEntriesObject.eipAffinity = valueSnatTableEntriesSnatTableEntry["EipAffinity"].asString() == "true";
auto allSnatIpsNode = valueSnatTableEntriesSnatTableEntry["SnatIps"]["snatIp"];
for (auto valueSnatTableEntriesSnatTableEntrySnatIpssnatIp : allSnatIpsNode)
{

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ens/model/DescribeVSwitchAttributesRequest.h>
using AlibabaCloud::Ens::Model::DescribeVSwitchAttributesRequest;
DescribeVSwitchAttributesRequest::DescribeVSwitchAttributesRequest()
: RpcServiceRequest("ens", "2017-11-10", "DescribeVSwitchAttributes") {
setMethod(HttpRequest::Method::Post);
}
DescribeVSwitchAttributesRequest::~DescribeVSwitchAttributesRequest() {}
std::string DescribeVSwitchAttributesRequest::getVSwitchId() const {
return vSwitchId_;
}
void DescribeVSwitchAttributesRequest::setVSwitchId(const std::string &vSwitchId) {
vSwitchId_ = vSwitchId;
setParameter(std::string("VSwitchId"), vSwitchId);
}

View File

@@ -0,0 +1,147 @@
/*
* 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/DescribeVSwitchAttributesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ens;
using namespace AlibabaCloud::Ens::Model;
DescribeVSwitchAttributesResult::DescribeVSwitchAttributesResult() :
ServiceResult()
{}
DescribeVSwitchAttributesResult::DescribeVSwitchAttributesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeVSwitchAttributesResult::~DescribeVSwitchAttributesResult()
{}
void DescribeVSwitchAttributesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
for (const auto &item : allInstanceIds)
instanceIds_.push_back(item.asString());
auto allNetworkInterfaceIds = value["NetworkInterfaceIds"]["NetworkInterfaceId"];
for (const auto &item : allNetworkInterfaceIds)
networkInterfaceIds_.push_back(item.asString());
auto allLoadBalancerIds = value["LoadBalancerIds"]["LoadBalancerId"];
for (const auto &item : allLoadBalancerIds)
loadBalancerIds_.push_back(item.asString());
auto allNatGatewayIds = value["NatGatewayIds"]["NatGatewayId"];
for (const auto &item : allNatGatewayIds)
natGatewayIds_.push_back(item.asString());
auto allHaVipIds = value["HaVipIds"]["HaVipId"];
for (const auto &item : allHaVipIds)
haVipIds_.push_back(item.asString());
if(!value["EnsRegionId"].isNull())
ensRegionId_ = value["EnsRegionId"].asString();
if(!value["NetworkId"].isNull())
networkId_ = value["NetworkId"].asString();
if(!value["VSwitchName"].isNull())
vSwitchName_ = value["VSwitchName"].asString();
if(!value["CidrBlock"].isNull())
cidrBlock_ = value["CidrBlock"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["CreatedTime"].isNull())
createdTime_ = value["CreatedTime"].asString();
if(!value["VSwitchId"].isNull())
vSwitchId_ = value["VSwitchId"].asString();
if(!value["AvailableIpAddressCount"].isNull())
availableIpAddressCount_ = std::stol(value["AvailableIpAddressCount"].asString());
}
std::string DescribeVSwitchAttributesResult::getStatus()const
{
return status_;
}
std::string DescribeVSwitchAttributesResult::getDescription()const
{
return description_;
}
std::string DescribeVSwitchAttributesResult::getCreatedTime()const
{
return createdTime_;
}
std::string DescribeVSwitchAttributesResult::getVSwitchId()const
{
return vSwitchId_;
}
long DescribeVSwitchAttributesResult::getAvailableIpAddressCount()const
{
return availableIpAddressCount_;
}
std::vector<std::string> DescribeVSwitchAttributesResult::getLoadBalancerIds()const
{
return loadBalancerIds_;
}
std::string DescribeVSwitchAttributesResult::getCidrBlock()const
{
return cidrBlock_;
}
std::vector<std::string> DescribeVSwitchAttributesResult::getNetworkInterfaceIds()const
{
return networkInterfaceIds_;
}
std::string DescribeVSwitchAttributesResult::getNetworkId()const
{
return networkId_;
}
std::vector<std::string> DescribeVSwitchAttributesResult::getNatGatewayIds()const
{
return natGatewayIds_;
}
std::vector<std::string> DescribeVSwitchAttributesResult::getHaVipIds()const
{
return haVipIds_;
}
std::string DescribeVSwitchAttributesResult::getVSwitchName()const
{
return vSwitchName_;
}
std::vector<std::string> DescribeVSwitchAttributesResult::getInstanceIds()const
{
return instanceIds_;
}
std::string DescribeVSwitchAttributesResult::getEnsRegionId()const
{
return ensRegionId_;
}

View File

@@ -25,13 +25,15 @@ DescribeVSwitchesRequest::DescribeVSwitchesRequest()
DescribeVSwitchesRequest::~DescribeVSwitchesRequest() {}
std::string DescribeVSwitchesRequest::getOrderByParams() const {
return orderByParams_;
std::vector<DescribeVSwitchesRequest::std::string> DescribeVSwitchesRequest::getVSwitchIds() const {
return vSwitchIds_;
}
void DescribeVSwitchesRequest::setOrderByParams(const std::string &orderByParams) {
orderByParams_ = orderByParams;
setParameter(std::string("OrderByParams"), orderByParams);
void DescribeVSwitchesRequest::setVSwitchIds(const std::vector<DescribeVSwitchesRequest::std::string> &vSwitchIds) {
vSwitchIds_ = vSwitchIds;
for(int dep1 = 0; dep1 != vSwitchIds.size(); dep1++) {
setParameter(std::string("VSwitchIds") + "." + std::to_string(dep1 + 1), vSwitchIds[dep1]);
}
}
std::string DescribeVSwitchesRequest::getEnsRegionId() const {
@@ -79,6 +81,17 @@ void DescribeVSwitchesRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::vector<DescribeVSwitchesRequest::std::string> DescribeVSwitchesRequest::getEnsRegionIds() const {
return ensRegionIds_;
}
void DescribeVSwitchesRequest::setEnsRegionIds(const std::vector<DescribeVSwitchesRequest::std::string> &ensRegionIds) {
ensRegionIds_ = ensRegionIds;
for(int dep1 = 0; dep1 != ensRegionIds.size(); dep1++) {
setParameter(std::string("EnsRegionIds") + "." + std::to_string(dep1 + 1), ensRegionIds[dep1]);
}
}
std::string DescribeVSwitchesRequest::getVSwitchName() const {
return vSwitchName_;
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ens/model/ListProductAbilitiesRequest.h>
using AlibabaCloud::Ens::Model::ListProductAbilitiesRequest;
ListProductAbilitiesRequest::ListProductAbilitiesRequest()
: RpcServiceRequest("ens", "2017-11-10", "ListProductAbilities") {
setMethod(HttpRequest::Method::Get);
}
ListProductAbilitiesRequest::~ListProductAbilitiesRequest() {}

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/ens/model/ListProductAbilitiesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ens;
using namespace AlibabaCloud::Ens::Model;
ListProductAbilitiesResult::ListProductAbilitiesResult() :
ServiceResult()
{}
ListProductAbilitiesResult::ListProductAbilitiesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListProductAbilitiesResult::~ListProductAbilitiesResult()
{}
void ListProductAbilitiesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allProductAbilities = value["ProductAbilities"]["ProductAbilities"];
for (const auto &item : allProductAbilities)
productAbilities_.push_back(item.asString());
}
std::vector<std::string> ListProductAbilitiesResult::getProductAbilities()const
{
return productAbilities_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ens/model/ModifyEnsRouteEntryRequest.h>
using AlibabaCloud::Ens::Model::ModifyEnsRouteEntryRequest;
ModifyEnsRouteEntryRequest::ModifyEnsRouteEntryRequest()
: RpcServiceRequest("ens", "2017-11-10", "ModifyEnsRouteEntry") {
setMethod(HttpRequest::Method::Post);
}
ModifyEnsRouteEntryRequest::~ModifyEnsRouteEntryRequest() {}
std::string ModifyEnsRouteEntryRequest::getRouteEntryName() const {
return routeEntryName_;
}
void ModifyEnsRouteEntryRequest::setRouteEntryName(const std::string &routeEntryName) {
routeEntryName_ = routeEntryName;
setParameter(std::string("RouteEntryName"), routeEntryName);
}
std::string ModifyEnsRouteEntryRequest::getDescription() const {
return description_;
}
void ModifyEnsRouteEntryRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string ModifyEnsRouteEntryRequest::getRouteEntryId() const {
return routeEntryId_;
}
void ModifyEnsRouteEntryRequest::setRouteEntryId(const std::string &routeEntryId) {
routeEntryId_ = routeEntryId;
setParameter(std::string("RouteEntryId"), routeEntryId);
}

View File

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

View File

@@ -25,6 +25,51 @@ ModifyForwardEntryRequest::ModifyForwardEntryRequest()
ModifyForwardEntryRequest::~ModifyForwardEntryRequest() {}
std::string ModifyForwardEntryRequest::getInternalIp() const {
return internalIp_;
}
void ModifyForwardEntryRequest::setInternalIp(const std::string &internalIp) {
internalIp_ = internalIp;
setParameter(std::string("InternalIp"), internalIp);
}
std::string ModifyForwardEntryRequest::getExternalIp() const {
return externalIp_;
}
void ModifyForwardEntryRequest::setExternalIp(const std::string &externalIp) {
externalIp_ = externalIp;
setParameter(std::string("ExternalIp"), externalIp);
}
std::string ModifyForwardEntryRequest::getIpProtocol() const {
return ipProtocol_;
}
void ModifyForwardEntryRequest::setIpProtocol(const std::string &ipProtocol) {
ipProtocol_ = ipProtocol;
setParameter(std::string("IpProtocol"), ipProtocol);
}
int ModifyForwardEntryRequest::getHealthCheckPort() const {
return healthCheckPort_;
}
void ModifyForwardEntryRequest::setHealthCheckPort(int healthCheckPort) {
healthCheckPort_ = healthCheckPort;
setParameter(std::string("HealthCheckPort"), std::to_string(healthCheckPort));
}
std::string ModifyForwardEntryRequest::getExternalPort() const {
return externalPort_;
}
void ModifyForwardEntryRequest::setExternalPort(const std::string &externalPort) {
externalPort_ = externalPort;
setParameter(std::string("ExternalPort"), externalPort);
}
std::string ModifyForwardEntryRequest::getForwardEntryId() const {
return forwardEntryId_;
}
@@ -43,12 +88,12 @@ void ModifyForwardEntryRequest::setForwardEntryName(const std::string &forwardEn
setParameter(std::string("ForwardEntryName"), forwardEntryName);
}
int ModifyForwardEntryRequest::getHealthCheckPort() const {
return healthCheckPort_;
std::string ModifyForwardEntryRequest::getInternalPort() const {
return internalPort_;
}
void ModifyForwardEntryRequest::setHealthCheckPort(int healthCheckPort) {
healthCheckPort_ = healthCheckPort;
setParameter(std::string("HealthCheckPort"), std::to_string(healthCheckPort));
void ModifyForwardEntryRequest::setInternalPort(const std::string &internalPort) {
internalPort_ = internalPort;
setParameter(std::string("InternalPort"), internalPort);
}

View File

@@ -25,6 +25,24 @@ ModifySnatEntryRequest::ModifySnatEntryRequest()
ModifySnatEntryRequest::~ModifySnatEntryRequest() {}
std::string ModifySnatEntryRequest::getSnatIp() const {
return snatIp_;
}
void ModifySnatEntryRequest::setSnatIp(const std::string &snatIp) {
snatIp_ = snatIp;
setParameter(std::string("SnatIp"), snatIp);
}
bool ModifySnatEntryRequest::getEipAffinity() const {
return eipAffinity_;
}
void ModifySnatEntryRequest::setEipAffinity(bool eipAffinity) {
eipAffinity_ = eipAffinity;
setParameter(std::string("EipAffinity"), eipAffinity ? "true" : "false");
}
std::string ModifySnatEntryRequest::getSnatEntryId() const {
return snatEntryId_;
}

View File

@@ -31,7 +31,7 @@ std::string PutBucketRequest::getEnsRegionId() const {
void PutBucketRequest::setEnsRegionId(const std::string &ensRegionId) {
ensRegionId_ = ensRegionId;
setBodyParameter(std::string("EnsRegionId"), ensRegionId);
setParameter(std::string("EnsRegionId"), ensRegionId);
}
std::string PutBucketRequest::getLogicalBucketType() const {
@@ -40,7 +40,7 @@ std::string PutBucketRequest::getLogicalBucketType() const {
void PutBucketRequest::setLogicalBucketType(const std::string &logicalBucketType) {
logicalBucketType_ = logicalBucketType;
setBodyParameter(std::string("LogicalBucketType"), logicalBucketType);
setParameter(std::string("LogicalBucketType"), logicalBucketType);
}
std::string PutBucketRequest::getCity() const {
@@ -49,7 +49,7 @@ std::string PutBucketRequest::getCity() const {
void PutBucketRequest::setCity(const std::string &city) {
city_ = city;
setBodyParameter(std::string("City"), city);
setParameter(std::string("City"), city);
}
std::string PutBucketRequest::getDataRedundancyType() const {
@@ -58,7 +58,7 @@ std::string PutBucketRequest::getDataRedundancyType() const {
void PutBucketRequest::setDataRedundancyType(const std::string &dataRedundancyType) {
dataRedundancyType_ = dataRedundancyType;
setBodyParameter(std::string("DataRedundancyType"), dataRedundancyType);
setParameter(std::string("DataRedundancyType"), dataRedundancyType);
}
std::string PutBucketRequest::getEndpoint() const {
@@ -67,7 +67,7 @@ std::string PutBucketRequest::getEndpoint() const {
void PutBucketRequest::setEndpoint(const std::string &endpoint) {
endpoint_ = endpoint;
setBodyParameter(std::string("Endpoint"), endpoint);
setParameter(std::string("Endpoint"), endpoint);
}
std::string PutBucketRequest::getBucketName() const {
@@ -76,7 +76,7 @@ std::string PutBucketRequest::getBucketName() const {
void PutBucketRequest::setBucketName(const std::string &bucketName) {
bucketName_ = bucketName;
setBodyParameter(std::string("BucketName"), bucketName);
setParameter(std::string("BucketName"), bucketName);
}
std::string PutBucketRequest::getStorageDomainId() const {
@@ -85,7 +85,7 @@ std::string PutBucketRequest::getStorageDomainId() const {
void PutBucketRequest::setStorageDomainId(const std::string &storageDomainId) {
storageDomainId_ = storageDomainId;
setBodyParameter(std::string("StorageDomainId"), storageDomainId);
setParameter(std::string("StorageDomainId"), storageDomainId);
}
std::string PutBucketRequest::getEngineId() const {
@@ -94,7 +94,7 @@ std::string PutBucketRequest::getEngineId() const {
void PutBucketRequest::setEngineId(const std::string &engineId) {
engineId_ = engineId;
setBodyParameter(std::string("EngineId"), engineId);
setParameter(std::string("EngineId"), engineId);
}
std::string PutBucketRequest::getBucketAcl() const {
@@ -103,7 +103,7 @@ std::string PutBucketRequest::getBucketAcl() const {
void PutBucketRequest::setBucketAcl(const std::string &bucketAcl) {
bucketAcl_ = bucketAcl;
setBodyParameter(std::string("BucketAcl"), bucketAcl);
setParameter(std::string("BucketAcl"), bucketAcl);
}
std::string PutBucketRequest::getDispatcherType() const {
@@ -112,7 +112,7 @@ std::string PutBucketRequest::getDispatcherType() const {
void PutBucketRequest::setDispatcherType(const std::string &dispatcherType) {
dispatcherType_ = dispatcherType;
setBodyParameter(std::string("DispatcherType"), dispatcherType);
setParameter(std::string("DispatcherType"), dispatcherType);
}
std::string PutBucketRequest::getResourceType() const {
@@ -121,7 +121,7 @@ std::string PutBucketRequest::getResourceType() const {
void PutBucketRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setBodyParameter(std::string("ResourceType"), resourceType);
setParameter(std::string("ResourceType"), resourceType);
}
std::string PutBucketRequest::getStorageClass() const {
@@ -130,7 +130,7 @@ std::string PutBucketRequest::getStorageClass() const {
void PutBucketRequest::setStorageClass(const std::string &storageClass) {
storageClass_ = storageClass;
setBodyParameter(std::string("StorageClass"), storageClass);
setParameter(std::string("StorageClass"), storageClass);
}
std::string PutBucketRequest::getDispatchScope() const {
@@ -139,7 +139,7 @@ std::string PutBucketRequest::getDispatchScope() const {
void PutBucketRequest::setDispatchScope(const std::string &dispatchScope) {
dispatchScope_ = dispatchScope;
setBodyParameter(std::string("DispatchScope"), dispatchScope);
setParameter(std::string("DispatchScope"), dispatchScope);
}
std::string PutBucketRequest::getComment() const {
@@ -148,6 +148,6 @@ std::string PutBucketRequest::getComment() const {
void PutBucketRequest::setComment(const std::string &comment) {
comment_ = comment;
setBodyParameter(std::string("Comment"), comment);
setParameter(std::string("Comment"), comment);
}

View File

@@ -39,6 +39,13 @@ void ReleaseInstanceResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ResourceType"].isNull())
resourceType_ = value["ResourceType"].asString();
}
std::string ReleaseInstanceResult::getResourceType()const
{
return resourceType_;
}

View File

@@ -34,3 +34,12 @@ void UnAssociateEnsEipAddressRequest::setAllocationId(const std::string &allocat
setParameter(std::string("AllocationId"), allocationId);
}
bool UnAssociateEnsEipAddressRequest::getForce() const {
return force_;
}
void UnAssociateEnsEipAddressRequest::setForce(bool force) {
force_ = force;
setParameter(std::string("Force"), force ? "true" : "false");
}