Support Ipv4LocalAddresses and Ipv6LocalAddresses.

This commit is contained in:
sdk-team
2024-11-04 07:48:42 +00:00
parent 5edf5643a2
commit 348726cb09
76 changed files with 1708 additions and 29 deletions

View File

@@ -0,0 +1,66 @@
/*
* 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/alb/model/CancelShiftLoadBalancerZonesRequest.h>
using AlibabaCloud::Alb::Model::CancelShiftLoadBalancerZonesRequest;
CancelShiftLoadBalancerZonesRequest::CancelShiftLoadBalancerZonesRequest()
: RpcServiceRequest("alb", "2020-06-16", "CancelShiftLoadBalancerZones") {
setMethod(HttpRequest::Method::Post);
}
CancelShiftLoadBalancerZonesRequest::~CancelShiftLoadBalancerZonesRequest() {}
std::string CancelShiftLoadBalancerZonesRequest::getClientToken() const {
return clientToken_;
}
void CancelShiftLoadBalancerZonesRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool CancelShiftLoadBalancerZonesRequest::getDryRun() const {
return dryRun_;
}
void CancelShiftLoadBalancerZonesRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::vector<CancelShiftLoadBalancerZonesRequest::ZoneMappings> CancelShiftLoadBalancerZonesRequest::getZoneMappings() const {
return zoneMappings_;
}
void CancelShiftLoadBalancerZonesRequest::setZoneMappings(const std::vector<CancelShiftLoadBalancerZonesRequest::ZoneMappings> &zoneMappings) {
zoneMappings_ = zoneMappings;
for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) {
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
}
}
std::string CancelShiftLoadBalancerZonesRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void CancelShiftLoadBalancerZonesRequest::setLoadBalancerId(const std::string &loadBalancerId) {
loadBalancerId_ = loadBalancerId;
setParameter(std::string("LoadBalancerId"), loadBalancerId);
}

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

View File

@@ -61,6 +61,18 @@ void CreateAclRequest::setResourceGroupId(const std::string &resourceGroupId) {
setParameter(std::string("ResourceGroupId"), resourceGroupId);
}
std::vector<CreateAclRequest::Tag> CreateAclRequest::getTag() const {
return tag_;
}
void CreateAclRequest::setTag(const std::vector<CreateAclRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
bool CreateAclRequest::getDryRun() const {
return dryRun_;
}

View File

@@ -88,6 +88,18 @@ void CreateHealthCheckTemplateRequest::setHealthCheckPath(const std::string &hea
setParameter(std::string("HealthCheckPath"), healthCheckPath);
}
std::vector<CreateHealthCheckTemplateRequest::Tag> CreateHealthCheckTemplateRequest::getTag() const {
return tag_;
}
void CreateHealthCheckTemplateRequest::setTag(const std::vector<CreateHealthCheckTemplateRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<CreateHealthCheckTemplateRequest::std::string> CreateHealthCheckTemplateRequest::getHealthCheckCodes() const {
return healthCheckCodes_;
}

View File

@@ -62,6 +62,18 @@ void CreateListenerRequest::setHttp2Enabled(bool http2Enabled) {
setParameter(std::string("Http2Enabled"), http2Enabled ? "true" : "false");
}
std::vector<CreateListenerRequest::Tag> CreateListenerRequest::getTag() const {
return tag_;
}
void CreateListenerRequest::setTag(const std::vector<CreateListenerRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<CreateListenerRequest::DefaultActions> CreateListenerRequest::getDefaultActions() const {
return defaultActions_;
}

View File

@@ -110,6 +110,18 @@ void CreateLoadBalancerRequest::setAddressType(const std::string &addressType) {
setParameter(std::string("AddressType"), addressType);
}
std::vector<CreateLoadBalancerRequest::Tag> CreateLoadBalancerRequest::getTag() const {
return tag_;
}
void CreateLoadBalancerRequest::setTag(const std::vector<CreateLoadBalancerRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::string CreateLoadBalancerRequest::getAddressAllocatedMode() const {
return addressAllocatedMode_;
}
@@ -139,6 +151,7 @@ void CreateLoadBalancerRequest::setZoneMappings(const std::vector<CreateLoadBala
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".EipType", zoneMappings[dep1].eipType);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".AllocationId", zoneMappings[dep1].allocationId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".IntranetAddress", zoneMappings[dep1].intranetAddress);
}
}

View File

@@ -52,6 +52,18 @@ void CreateRuleRequest::setListenerId(const std::string &listenerId) {
setParameter(std::string("ListenerId"), listenerId);
}
std::vector<CreateRuleRequest::Tag> CreateRuleRequest::getTag() const {
return tag_;
}
void CreateRuleRequest::setTag(const std::vector<CreateRuleRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::string CreateRuleRequest::getDirection() const {
return direction_;
}

View File

@@ -76,6 +76,10 @@ void CreateRulesRequest::setRules(const std::vector<CreateRulesRequest::Rules> &
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
for(int dep2 = 0; dep2 != rules[dep1].tag.size(); dep2++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Value", rules[dep1].tag[dep2].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Key", rules[dep1].tag[dep2].key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
for(int dep2 = 0; dep2 != rules[dep1].ruleActions.size(); dep2++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);

View File

@@ -54,6 +54,18 @@ void CreateSecurityPolicyRequest::setCiphers(const std::vector<CreateSecurityPol
}
}
std::vector<CreateSecurityPolicyRequest::Tag> CreateSecurityPolicyRequest::getTag() const {
return tag_;
}
void CreateSecurityPolicyRequest::setTag(const std::vector<CreateSecurityPolicyRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<CreateSecurityPolicyRequest::std::string> CreateSecurityPolicyRequest::getTLSVersions() const {
return tLSVersions_;
}

View File

@@ -69,6 +69,16 @@ void CreateServerGroupRequest::setHealthCheckConfig(const CreateServerGroupReque
setParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectPort", std::to_string(healthCheckConfig.healthCheckConnectPort));
}
CreateServerGroupRequest::SlowStartConfig CreateServerGroupRequest::getSlowStartConfig() const {
return slowStartConfig_;
}
void CreateServerGroupRequest::setSlowStartConfig(const CreateServerGroupRequest::SlowStartConfig &slowStartConfig) {
slowStartConfig_ = slowStartConfig;
setParameter(std::string("SlowStartConfig") + ".SlowStartDuration", std::to_string(slowStartConfig.slowStartDuration));
setParameter(std::string("SlowStartConfig") + ".SlowStartEnabled", slowStartConfig.slowStartEnabled ? "true" : "false");
}
std::string CreateServerGroupRequest::getScheduler() const {
return scheduler_;
}
@@ -114,6 +124,18 @@ void CreateServerGroupRequest::setServiceName(const std::string &serviceName) {
setParameter(std::string("ServiceName"), serviceName);
}
std::vector<CreateServerGroupRequest::Tag> CreateServerGroupRequest::getTag() const {
return tag_;
}
void CreateServerGroupRequest::setTag(const std::vector<CreateServerGroupRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
CreateServerGroupRequest::StickySessionConfig CreateServerGroupRequest::getStickySessionConfig() const {
return stickySessionConfig_;
}
@@ -144,6 +166,16 @@ void CreateServerGroupRequest::setIpv6Enabled(bool ipv6Enabled) {
setParameter(std::string("Ipv6Enabled"), ipv6Enabled ? "true" : "false");
}
CreateServerGroupRequest::ConnectionDrainConfig CreateServerGroupRequest::getConnectionDrainConfig() const {
return connectionDrainConfig_;
}
void CreateServerGroupRequest::setConnectionDrainConfig(const CreateServerGroupRequest::ConnectionDrainConfig &connectionDrainConfig) {
connectionDrainConfig_ = connectionDrainConfig;
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainEnabled", connectionDrainConfig.connectionDrainEnabled ? "true" : "false");
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainTimeout", std::to_string(connectionDrainConfig.connectionDrainTimeout));
}
std::string CreateServerGroupRequest::getServerGroupType() const {
return serverGroupType_;
}

View File

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

View File

@@ -39,6 +39,16 @@ void GetHealthCheckTemplateAttributeResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["Key"].isNull())
tagsObject.key = valueTagsTag["Key"].asString();
if(!valueTagsTag["Value"].isNull())
tagsObject.value = valueTagsTag["Value"].asString();
tags_.push_back(tagsObject);
}
auto allHealthCheckHttpCodes = value["HealthCheckHttpCodes"]["httpCode"];
for (const auto &item : allHealthCheckHttpCodes)
healthCheckHttpCodes_.push_back(item.asString());
@@ -163,3 +173,8 @@ std::string GetHealthCheckTemplateAttributeResult::getHealthCheckProtocol()const
return healthCheckProtocol_;
}
std::vector<GetHealthCheckTemplateAttributeResult::Tag> GetHealthCheckTemplateAttributeResult::getTags()const
{
return tags_;
}

View File

@@ -76,6 +76,32 @@ void GetListenerAttributeResult::parse(const std::string &payload)
}
defaultActions_.push_back(defaultActionsObject);
}
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["Key"].isNull())
tagsObject.key = valueTagsTag["Key"].asString();
if(!valueTagsTag["Value"].isNull())
tagsObject.value = valueTagsTag["Value"].asString();
tags_.push_back(tagsObject);
}
auto allAssociatedResourcesNode = value["AssociatedResources"]["AssociatedResource"];
for (auto valueAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
{
AssociatedResource associatedResourcesObject;
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
associatedResourcesObject.associatedResourceType = valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
associatedResourcesObject.associatedResourceId = valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
if(!valueAssociatedResourcesAssociatedResource["PolicyId"].isNull())
associatedResourcesObject.policyId = valueAssociatedResourcesAssociatedResource["PolicyId"].asString();
if(!valueAssociatedResourcesAssociatedResource["Status"].isNull())
associatedResourcesObject.status = valueAssociatedResourcesAssociatedResource["Status"].asString();
if(!valueAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
associatedResourcesObject.associatedMode = valueAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
associatedResources_.push_back(associatedResourcesObject);
}
auto aclConfigNode = value["AclConfig"];
if(!aclConfigNode["AclType"].isNull())
aclConfig_.aclType = aclConfigNode["AclType"].asString();
@@ -191,6 +217,11 @@ bool GetListenerAttributeResult::getHttp2Enabled()const
return http2Enabled_;
}
std::vector<GetListenerAttributeResult::AssociatedResource> GetListenerAttributeResult::getAssociatedResources()const
{
return associatedResources_;
}
std::vector<GetListenerAttributeResult::DefaultAction> GetListenerAttributeResult::getDefaultActions()const
{
return defaultActions_;
@@ -256,6 +287,11 @@ GetListenerAttributeResult::XForwardedForConfig GetListenerAttributeResult::getX
return xForwardedForConfig_;
}
std::vector<GetListenerAttributeResult::Tag> GetListenerAttributeResult::getTags()const
{
return tags_;
}
std::vector<GetListenerAttributeResult::Certificate1> GetListenerAttributeResult::getCaCertificates()const
{
return caCertificates_;

View File

@@ -67,12 +67,12 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
zoneMappingsObject.vSwitchId = valueZoneMappingsZoneMapping["VSwitchId"].asString();
if(!valueZoneMappingsZoneMapping["ZoneId"].isNull())
zoneMappingsObject.zoneId = valueZoneMappingsZoneMapping["ZoneId"].asString();
if(!valueZoneMappingsZoneMapping["Status"].isNull())
zoneMappingsObject.status = valueZoneMappingsZoneMapping["Status"].asString();
if(!valueZoneMappingsZoneMapping["AllocationId"].isNull())
zoneMappingsObject.allocationId = valueZoneMappingsZoneMapping["AllocationId"].asString();
if(!valueZoneMappingsZoneMapping["EipType"].isNull())
zoneMappingsObject.eipType = valueZoneMappingsZoneMapping["EipType"].asString();
if(!valueZoneMappingsZoneMapping["Status"].isNull())
zoneMappingsObject.status = valueZoneMappingsZoneMapping["Status"].asString();
auto allLoadBalancerAddressesNode = valueZoneMappingsZoneMapping["LoadBalancerAddresses"]["LoadBalancerAddress"];
for (auto valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress : allLoadBalancerAddressesNode)
{
@@ -81,20 +81,42 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
loadBalancerAddressesObject.address = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Address"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6Address"].isNull())
loadBalancerAddressesObject.ipv6Address = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6Address"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].isNull())
loadBalancerAddressesObject.ipv6AddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddress"].isNull())
loadBalancerAddressesObject.intranetAddress = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddress"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].isNull())
loadBalancerAddressesObject.intranetAddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["AllocationId"].isNull())
loadBalancerAddressesObject.allocationId = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["AllocationId"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["EipType"].isNull())
loadBalancerAddressesObject.eipType = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["EipType"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].isNull())
loadBalancerAddressesObject.intranetAddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].asString();
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].isNull())
loadBalancerAddressesObject.ipv6AddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].asString();
auto allIpv4LocalAddresses = value["Ipv4LocalAddresses"]["Ipv4LocalAddress"];
for (auto value : allIpv4LocalAddresses)
loadBalancerAddressesObject.ipv4LocalAddresses.push_back(value.asString());
auto allIpv6LocalAddresses = value["Ipv6LocalAddresses"]["ipv6LocalAddress"];
for (auto value : allIpv6LocalAddresses)
loadBalancerAddressesObject.ipv6LocalAddresses.push_back(value.asString());
zoneMappingsObject.loadBalancerAddresses.push_back(loadBalancerAddressesObject);
}
zoneMappings_.push_back(zoneMappingsObject);
}
auto allAssociatedResourcesNode = value["AssociatedResources"]["AssociatedResource"];
for (auto valueAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
{
AssociatedResource associatedResourcesObject;
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
associatedResourcesObject.associatedResourceType = valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
associatedResourcesObject.associatedResourceId = valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
if(!valueAssociatedResourcesAssociatedResource["PolicyId"].isNull())
associatedResourcesObject.policyId = valueAssociatedResourcesAssociatedResource["PolicyId"].asString();
if(!valueAssociatedResourcesAssociatedResource["Status"].isNull())
associatedResourcesObject.status = valueAssociatedResourcesAssociatedResource["Status"].asString();
if(!valueAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
associatedResourcesObject.associatedMode = valueAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
associatedResources_.push_back(associatedResourcesObject);
}
auto accessLogConfigNode = value["AccessLogConfig"];
if(!accessLogConfigNode["LogProject"].isNull())
accessLogConfig_.logProject = accessLogConfigNode["LogProject"].asString();
@@ -260,6 +282,11 @@ GetLoadBalancerAttributeResult::LoadBalancerBillingConfig GetLoadBalancerAttribu
return loadBalancerBillingConfig_;
}
std::vector<GetLoadBalancerAttributeResult::AssociatedResource> GetLoadBalancerAttributeResult::getAssociatedResources()const
{
return associatedResources_;
}
std::string GetLoadBalancerAttributeResult::getCreateTime()const
{
return createTime_;

View File

@@ -63,6 +63,18 @@ void ListAclsRequest::setNextToken(const std::string &nextToken) {
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListAclsRequest::Tag> ListAclsRequest::getTag() const {
return tag_;
}
void ListAclsRequest::setTag(const std::vector<ListAclsRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<ListAclsRequest::std::string> ListAclsRequest::getAclNames() const {
return aclNames_;
}

View File

@@ -61,6 +61,16 @@ void ListAclsResult::parse(const std::string &payload)
aclsObject.configManagedEnabled = valueAclsAcl["ConfigManagedEnabled"].asString() == "true";
if(!valueAclsAcl["CreateTime"].isNull())
aclsObject.createTime = valueAclsAcl["CreateTime"].asString();
auto allTagsNode = valueAclsAcl["Tags"]["Tag"];
for (auto valueAclsAclTagsTag : allTagsNode)
{
Acl::Tag tagsObject;
if(!valueAclsAclTagsTag["Key"].isNull())
tagsObject.key = valueAclsAclTagsTag["Key"].asString();
if(!valueAclsAclTagsTag["Value"].isNull())
tagsObject.value = valueAclsAclTagsTag["Value"].asString();
aclsObject.tags.push_back(tagsObject);
}
acls_.push_back(aclsObject);
}
if(!value["MaxResults"].isNull())

View File

@@ -34,6 +34,18 @@ void ListHealthCheckTemplatesRequest::setNextToken(const std::string &nextToken)
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListHealthCheckTemplatesRequest::Tag> ListHealthCheckTemplatesRequest::getTag() const {
return tag_;
}
void ListHealthCheckTemplatesRequest::setTag(const std::vector<ListHealthCheckTemplatesRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<ListHealthCheckTemplatesRequest::std::string> ListHealthCheckTemplatesRequest::getHealthCheckTemplateNames() const {
return healthCheckTemplateNames_;
}

View File

@@ -73,6 +73,16 @@ void ListHealthCheckTemplatesResult::parse(const std::string &payload)
healthCheckTemplatesObject.serviceManagedEnabled = valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedEnabled"].asString() == "true";
if(!valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedMode"].isNull())
healthCheckTemplatesObject.serviceManagedMode = valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedMode"].asString();
auto allTagsNode = valueHealthCheckTemplatesHealthCheckTemplate["Tags"]["Tag"];
for (auto valueHealthCheckTemplatesHealthCheckTemplateTagsTag : allTagsNode)
{
HealthCheckTemplate::Tag tagsObject;
if(!valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Key"].isNull())
tagsObject.key = valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Key"].asString();
if(!valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Value"].isNull())
tagsObject.value = valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Value"].asString();
healthCheckTemplatesObject.tags.push_back(tagsObject);
}
auto allHealthCheckHttpCodes = value["HealthCheckHttpCodes"]["httpCode"];
for (auto value : allHealthCheckHttpCodes)
healthCheckTemplatesObject.healthCheckHttpCodes.push_back(value.asString());

View File

@@ -43,6 +43,17 @@ void ListListenerCertificatesRequest::setListenerId(const std::string &listenerI
setParameter(std::string("ListenerId"), listenerId);
}
std::vector<ListListenerCertificatesRequest::std::string> ListListenerCertificatesRequest::getCertificateIds() const {
return certificateIds_;
}
void ListListenerCertificatesRequest::setCertificateIds(const std::vector<ListListenerCertificatesRequest::std::string> &certificateIds) {
certificateIds_ = certificateIds;
for(int dep1 = 0; dep1 != certificateIds.size(); dep1++) {
setParameter(std::string("CertificateIds") + "." + std::to_string(dep1 + 1), certificateIds[dep1]);
}
}
std::string ListListenerCertificatesRequest::getNextToken() const {
return nextToken_;
}

View File

@@ -45,6 +45,18 @@ void ListListenersRequest::setNextToken(const std::string &nextToken) {
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListListenersRequest::Tag> ListListenersRequest::getTag() const {
return tag_;
}
void ListListenersRequest::setTag(const std::vector<ListListenersRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
bool ListListenersRequest::getAccessLogRecordCustomizedHeadersEnabled() const {
return accessLogRecordCustomizedHeadersEnabled_;
}
@@ -83,6 +95,15 @@ void ListListenersRequest::setMaxResults(int maxResults) {
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}
bool ListListenersRequest::getIsAssociatedAcl() const {
return isAssociatedAcl_;
}
void ListListenersRequest::setIsAssociatedAcl(bool isAssociatedAcl) {
isAssociatedAcl_ = isAssociatedAcl;
setParameter(std::string("IsAssociatedAcl"), isAssociatedAcl ? "true" : "false");
}
std::string ListListenersRequest::getStatus() const {
return status_;
}

View File

@@ -86,6 +86,32 @@ void ListListenersResult::parse(const std::string &payload)
}
listenersObject.defaultActions.push_back(defaultActionsObject);
}
auto allTagsNode = valueListenerslistener["Tags"]["Tag"];
for (auto valueListenerslistenerTagsTag : allTagsNode)
{
Listener::Tag tagsObject;
if(!valueListenerslistenerTagsTag["Key"].isNull())
tagsObject.key = valueListenerslistenerTagsTag["Key"].asString();
if(!valueListenerslistenerTagsTag["Value"].isNull())
tagsObject.value = valueListenerslistenerTagsTag["Value"].asString();
listenersObject.tags.push_back(tagsObject);
}
auto allAssociatedResourcesNode = valueListenerslistener["AssociatedResources"]["AssociatedResource"];
for (auto valueListenerslistenerAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
{
Listener::AssociatedResource associatedResourcesObject;
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
associatedResourcesObject.associatedResourceType = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
associatedResourcesObject.associatedResourceId = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["PolicyId"].isNull())
associatedResourcesObject.policyId = valueListenerslistenerAssociatedResourcesAssociatedResource["PolicyId"].asString();
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["Status"].isNull())
associatedResourcesObject.status = valueListenerslistenerAssociatedResourcesAssociatedResource["Status"].asString();
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
associatedResourcesObject.associatedMode = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
listenersObject.associatedResources.push_back(associatedResourcesObject);
}
auto logConfigNode = value["LogConfig"];
if(!logConfigNode["AccessLogRecordCustomizedHeadersEnabled"].isNull())
listenersObject.logConfig.accessLogRecordCustomizedHeadersEnabled = logConfigNode["AccessLogRecordCustomizedHeadersEnabled"].asString() == "true";

View File

@@ -94,6 +94,15 @@ void ListLoadBalancersRequest::setLoadBalancerBussinessStatus(const std::string
setParameter(std::string("LoadBalancerBussinessStatus"), loadBalancerBussinessStatus);
}
std::string ListLoadBalancersRequest::getDNSName() const {
return dNSName_;
}
void ListLoadBalancersRequest::setDNSName(const std::string &dNSName) {
dNSName_ = dNSName;
setParameter(std::string("DNSName"), dNSName);
}
std::string ListLoadBalancersRequest::getAddressType() const {
return addressType_;
}

View File

@@ -99,6 +99,22 @@ void ListLoadBalancersResult::parse(const std::string &payload)
tagsObject.value = valueLoadBalancersloadBalancerTagsTag["Value"].asString();
loadBalancersObject.tags.push_back(tagsObject);
}
auto allAssociatedResourcesNode = valueLoadBalancersloadBalancer["AssociatedResources"]["AssociatedResource"];
for (auto valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
{
LoadBalancer::AssociatedResource associatedResourcesObject;
if(!valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
associatedResourcesObject.associatedResourceType = valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
if(!valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
associatedResourcesObject.associatedResourceId = valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
if(!valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["PolicyId"].isNull())
associatedResourcesObject.policyId = valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["PolicyId"].asString();
if(!valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["Status"].isNull())
associatedResourcesObject.status = valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["Status"].asString();
if(!valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
associatedResourcesObject.associatedMode = valueLoadBalancersloadBalancerAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
loadBalancersObject.associatedResources.push_back(associatedResourcesObject);
}
auto accessLogConfigNode = value["AccessLogConfig"];
if(!accessLogConfigNode["LogProject"].isNull())
loadBalancersObject.accessLogConfig.logProject = accessLogConfigNode["LogProject"].asString();

View File

@@ -54,6 +54,18 @@ void ListRulesRequest::setNextToken(const std::string &nextToken) {
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListRulesRequest::Tag> ListRulesRequest::getTag() const {
return tag_;
}
void ListRulesRequest::setTag(const std::vector<ListRulesRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::string ListRulesRequest::getDirection() const {
return direction_;
}

View File

@@ -224,6 +224,16 @@ void ListRulesResult::parse(const std::string &payload)
ruleConditionsObject.responseHeaderConfig.values11.push_back(value.asString());
rulesObject.ruleConditions.push_back(ruleConditionsObject);
}
auto allTagsNode = valueRulesRule["Tags"]["Tag"];
for (auto valueRulesRuleTagsTag : allTagsNode)
{
Rule::Tag tagsObject;
if(!valueRulesRuleTagsTag["Key"].isNull())
tagsObject.key = valueRulesRuleTagsTag["Key"].asString();
if(!valueRulesRuleTagsTag["Value"].isNull())
tagsObject.value = valueRulesRuleTagsTag["Value"].asString();
rulesObject.tags.push_back(tagsObject);
}
rules_.push_back(rulesObject);
}
if(!value["MaxResults"].isNull())

View File

@@ -54,6 +54,18 @@ void ListSecurityPoliciesRequest::setNextToken(const std::string &nextToken) {
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListSecurityPoliciesRequest::Tag> ListSecurityPoliciesRequest::getTag() const {
return tag_;
}
void ListSecurityPoliciesRequest::setTag(const std::vector<ListSecurityPoliciesRequest::Tag> &tag) {
tag_ = tag;
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
}
}
std::vector<ListSecurityPoliciesRequest::std::string> ListSecurityPoliciesRequest::getSecurityPolicyIds() const {
return securityPolicyIds_;
}

View File

@@ -57,6 +57,16 @@ void ListSecurityPoliciesResult::parse(const std::string &payload)
securityPoliciesObject.serviceManagedMode = valueSecurityPoliciesSecurityPolicy["ServiceManagedMode"].asString();
if(!valueSecurityPoliciesSecurityPolicy["CreateTime"].isNull())
securityPoliciesObject.createTime = valueSecurityPoliciesSecurityPolicy["CreateTime"].asString();
auto allTagsNode = valueSecurityPoliciesSecurityPolicy["Tags"]["Tag"];
for (auto valueSecurityPoliciesSecurityPolicyTagsTag : allTagsNode)
{
SecurityPolicy::Tag tagsObject;
if(!valueSecurityPoliciesSecurityPolicyTagsTag["Key"].isNull())
tagsObject.key = valueSecurityPoliciesSecurityPolicyTagsTag["Key"].asString();
if(!valueSecurityPoliciesSecurityPolicyTagsTag["Value"].isNull())
tagsObject.value = valueSecurityPoliciesSecurityPolicyTagsTag["Value"].asString();
securityPoliciesObject.tags.push_back(tagsObject);
}
auto allCiphers = value["Ciphers"]["Cipher"];
for (auto value : allCiphers)
securityPoliciesObject.ciphers.push_back(value.asString());

View File

@@ -130,6 +130,16 @@ void ListServerGroupsResult::parse(const std::string &payload)
serverGroupsObject.uchConfig.type = uchConfigNode["Type"].asString();
if(!uchConfigNode["Value"].isNull())
serverGroupsObject.uchConfig.value = uchConfigNode["Value"].asString();
auto connectionDrainConfigNode = value["ConnectionDrainConfig"];
if(!connectionDrainConfigNode["ConnectionDrainEnabled"].isNull())
serverGroupsObject.connectionDrainConfig.connectionDrainEnabled = connectionDrainConfigNode["ConnectionDrainEnabled"].asString() == "true";
if(!connectionDrainConfigNode["ConnectionDrainTimeout"].isNull())
serverGroupsObject.connectionDrainConfig.connectionDrainTimeout = std::stoi(connectionDrainConfigNode["ConnectionDrainTimeout"].asString());
auto slowStartConfigNode = value["SlowStartConfig"];
if(!slowStartConfigNode["SlowStartEnabled"].isNull())
serverGroupsObject.slowStartConfig.slowStartEnabled = slowStartConfigNode["SlowStartEnabled"].asString() == "true";
if(!slowStartConfigNode["SlowStartDuration"].isNull())
serverGroupsObject.slowStartConfig.slowStartDuration = std::stoi(slowStartConfigNode["SlowStartDuration"].asString());
auto allRelatedLoadBalancerIds = value["RelatedLoadBalancerIds"]["RelatedLoadBalancerId"];
for (auto value : allRelatedLoadBalancerIds)
serverGroupsObject.relatedLoadBalancerIds.push_back(value.asString());

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/alb/model/LoadBalancerJoinSecurityGroupRequest.h>
using AlibabaCloud::Alb::Model::LoadBalancerJoinSecurityGroupRequest;
LoadBalancerJoinSecurityGroupRequest::LoadBalancerJoinSecurityGroupRequest()
: RpcServiceRequest("alb", "2020-06-16", "LoadBalancerJoinSecurityGroup") {
setMethod(HttpRequest::Method::Post);
}
LoadBalancerJoinSecurityGroupRequest::~LoadBalancerJoinSecurityGroupRequest() {}
std::string LoadBalancerJoinSecurityGroupRequest::getClientToken() const {
return clientToken_;
}
void LoadBalancerJoinSecurityGroupRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool LoadBalancerJoinSecurityGroupRequest::getDryRun() const {
return dryRun_;
}
void LoadBalancerJoinSecurityGroupRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::vector<LoadBalancerJoinSecurityGroupRequest::std::string> LoadBalancerJoinSecurityGroupRequest::getSecurityGroupIds() const {
return securityGroupIds_;
}
void LoadBalancerJoinSecurityGroupRequest::setSecurityGroupIds(const std::vector<LoadBalancerJoinSecurityGroupRequest::std::string> &securityGroupIds) {
securityGroupIds_ = securityGroupIds;
for(int dep1 = 0; dep1 != securityGroupIds.size(); dep1++) {
setParameter(std::string("SecurityGroupIds") + "." + std::to_string(dep1 + 1), securityGroupIds[dep1]);
}
}
std::string LoadBalancerJoinSecurityGroupRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void LoadBalancerJoinSecurityGroupRequest::setLoadBalancerId(const std::string &loadBalancerId) {
loadBalancerId_ = loadBalancerId;
setParameter(std::string("LoadBalancerId"), loadBalancerId);
}

View File

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

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/alb/model/LoadBalancerLeaveSecurityGroupRequest.h>
using AlibabaCloud::Alb::Model::LoadBalancerLeaveSecurityGroupRequest;
LoadBalancerLeaveSecurityGroupRequest::LoadBalancerLeaveSecurityGroupRequest()
: RpcServiceRequest("alb", "2020-06-16", "LoadBalancerLeaveSecurityGroup") {
setMethod(HttpRequest::Method::Post);
}
LoadBalancerLeaveSecurityGroupRequest::~LoadBalancerLeaveSecurityGroupRequest() {}
std::string LoadBalancerLeaveSecurityGroupRequest::getClientToken() const {
return clientToken_;
}
void LoadBalancerLeaveSecurityGroupRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool LoadBalancerLeaveSecurityGroupRequest::getDryRun() const {
return dryRun_;
}
void LoadBalancerLeaveSecurityGroupRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::vector<LoadBalancerLeaveSecurityGroupRequest::std::string> LoadBalancerLeaveSecurityGroupRequest::getSecurityGroupIds() const {
return securityGroupIds_;
}
void LoadBalancerLeaveSecurityGroupRequest::setSecurityGroupIds(const std::vector<LoadBalancerLeaveSecurityGroupRequest::std::string> &securityGroupIds) {
securityGroupIds_ = securityGroupIds;
for(int dep1 = 0; dep1 != securityGroupIds.size(); dep1++) {
setParameter(std::string("SecurityGroupIds") + "." + std::to_string(dep1 + 1), securityGroupIds[dep1]);
}
}
std::string LoadBalancerLeaveSecurityGroupRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void LoadBalancerLeaveSecurityGroupRequest::setLoadBalancerId(const std::string &loadBalancerId) {
loadBalancerId_ = loadBalancerId;
setParameter(std::string("LoadBalancerId"), loadBalancerId);
}

View File

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

View File

@@ -0,0 +1,66 @@
/*
* 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/alb/model/StartShiftLoadBalancerZonesRequest.h>
using AlibabaCloud::Alb::Model::StartShiftLoadBalancerZonesRequest;
StartShiftLoadBalancerZonesRequest::StartShiftLoadBalancerZonesRequest()
: RpcServiceRequest("alb", "2020-06-16", "StartShiftLoadBalancerZones") {
setMethod(HttpRequest::Method::Post);
}
StartShiftLoadBalancerZonesRequest::~StartShiftLoadBalancerZonesRequest() {}
std::string StartShiftLoadBalancerZonesRequest::getClientToken() const {
return clientToken_;
}
void StartShiftLoadBalancerZonesRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool StartShiftLoadBalancerZonesRequest::getDryRun() const {
return dryRun_;
}
void StartShiftLoadBalancerZonesRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::vector<StartShiftLoadBalancerZonesRequest::ZoneMappings> StartShiftLoadBalancerZonesRequest::getZoneMappings() const {
return zoneMappings_;
}
void StartShiftLoadBalancerZonesRequest::setZoneMappings(const std::vector<StartShiftLoadBalancerZonesRequest::ZoneMappings> &zoneMappings) {
zoneMappings_ = zoneMappings;
for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) {
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
}
}
std::string StartShiftLoadBalancerZonesRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void StartShiftLoadBalancerZonesRequest::setLoadBalancerId(const std::string &loadBalancerId) {
loadBalancerId_ = loadBalancerId;
setParameter(std::string("LoadBalancerId"), loadBalancerId);
}

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

View File

@@ -54,6 +54,7 @@ void UpdateLoadBalancerZonesRequest::setZoneMappings(const std::vector<UpdateLoa
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".EipType", zoneMappings[dep1].eipType);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".AllocationId", zoneMappings[dep1].allocationId);
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".IntranetAddress", zoneMappings[dep1].intranetAddress);
}
}

View File

@@ -69,6 +69,16 @@ void UpdateServerGroupAttributeRequest::setHealthCheckConfig(const UpdateServerG
setParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectPort", std::to_string(healthCheckConfig.healthCheckConnectPort));
}
UpdateServerGroupAttributeRequest::SlowStartConfig UpdateServerGroupAttributeRequest::getSlowStartConfig() const {
return slowStartConfig_;
}
void UpdateServerGroupAttributeRequest::setSlowStartConfig(const UpdateServerGroupAttributeRequest::SlowStartConfig &slowStartConfig) {
slowStartConfig_ = slowStartConfig;
setParameter(std::string("SlowStartConfig") + ".SlowStartDuration", std::to_string(slowStartConfig.slowStartDuration));
setParameter(std::string("SlowStartConfig") + ".SlowStartEnabled", slowStartConfig.slowStartEnabled ? "true" : "false");
}
std::string UpdateServerGroupAttributeRequest::getScheduler() const {
return scheduler_;
}
@@ -126,6 +136,16 @@ void UpdateServerGroupAttributeRequest::setDryRun(bool dryRun) {
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
UpdateServerGroupAttributeRequest::ConnectionDrainConfig UpdateServerGroupAttributeRequest::getConnectionDrainConfig() const {
return connectionDrainConfig_;
}
void UpdateServerGroupAttributeRequest::setConnectionDrainConfig(const UpdateServerGroupAttributeRequest::ConnectionDrainConfig &connectionDrainConfig) {
connectionDrainConfig_ = connectionDrainConfig;
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainEnabled", connectionDrainConfig.connectionDrainEnabled ? "true" : "false");
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainTimeout", std::to_string(connectionDrainConfig.connectionDrainTimeout));
}
UpdateServerGroupAttributeRequest::UchConfig UpdateServerGroupAttributeRequest::getUchConfig() const {
return uchConfig_;
}