Support Latest APIs.

This commit is contained in:
sdk-team
2023-04-11 05:16:16 +00:00
parent 2b7e50c691
commit ec08c61a17
38 changed files with 1757 additions and 1 deletions

View File

@@ -0,0 +1,73 @@
/*
* 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/CreateAScriptsRequest.h>
using AlibabaCloud::Alb::Model::CreateAScriptsRequest;
CreateAScriptsRequest::CreateAScriptsRequest()
: RpcServiceRequest("alb", "2020-06-16", "CreateAScripts") {
setMethod(HttpRequest::Method::Post);
}
CreateAScriptsRequest::~CreateAScriptsRequest() {}
std::string CreateAScriptsRequest::getClientToken() const {
return clientToken_;
}
void CreateAScriptsRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string CreateAScriptsRequest::getListenerId() const {
return listenerId_;
}
void CreateAScriptsRequest::setListenerId(const std::string &listenerId) {
listenerId_ = listenerId;
setParameter(std::string("ListenerId"), listenerId);
}
std::vector<CreateAScriptsRequest::AScripts> CreateAScriptsRequest::getAScripts() const {
return aScripts_;
}
void CreateAScriptsRequest::setAScripts(const std::vector<CreateAScriptsRequest::AScripts> &aScripts) {
aScripts_ = aScripts;
for(int dep1 = 0; dep1 != aScripts.size(); dep1++) {
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".AScriptName", aScripts[dep1].aScriptName);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributeEnabled", aScripts[dep1].extAttributeEnabled ? "true" : "false");
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".Position", aScripts[dep1].position);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ScriptContent", aScripts[dep1].scriptContent);
for(int dep2 = 0; dep2 != aScripts[dep1].extAttributes.size(); dep2++) {
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributes." + std::to_string(dep2 + 1) + ".AttributeValue", aScripts[dep1].extAttributes[dep2].attributeValue);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributes." + std::to_string(dep2 + 1) + ".AttributeKey", aScripts[dep1].extAttributes[dep2].attributeKey);
}
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".Enabled", aScripts[dep1].enabled ? "true" : "false");
}
}
bool CreateAScriptsRequest::getDryRun() const {
return dryRun_;
}
void CreateAScriptsRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}

View File

@@ -0,0 +1,64 @@
/*
* 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/CreateAScriptsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
CreateAScriptsResult::CreateAScriptsResult() :
ServiceResult()
{}
CreateAScriptsResult::CreateAScriptsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateAScriptsResult::~CreateAScriptsResult()
{}
void CreateAScriptsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAScriptIdsNode = value["AScriptIds"]["AScriptId"];
for (auto valueAScriptIdsAScriptId : allAScriptIdsNode)
{
AScriptId aScriptIdsObject;
if(!valueAScriptIdsAScriptId["AScriptId"].isNull())
aScriptIdsObject.aScriptId = valueAScriptIdsAScriptId["AScriptId"].asString();
aScriptIds_.push_back(aScriptIdsObject);
}
if(!value["JobId"].isNull())
jobId_ = value["JobId"].asString();
}
std::vector<CreateAScriptsResult::AScriptId> CreateAScriptsResult::getAScriptIds()const
{
return aScriptIds_;
}
std::string CreateAScriptsResult::getJobId()const
{
return jobId_;
}

View File

@@ -0,0 +1,53 @@
/*
* 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/DeleteAScriptsRequest.h>
using AlibabaCloud::Alb::Model::DeleteAScriptsRequest;
DeleteAScriptsRequest::DeleteAScriptsRequest()
: RpcServiceRequest("alb", "2020-06-16", "DeleteAScripts") {
setMethod(HttpRequest::Method::Post);
}
DeleteAScriptsRequest::~DeleteAScriptsRequest() {}
std::string DeleteAScriptsRequest::getClientToken() const {
return clientToken_;
}
void DeleteAScriptsRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool DeleteAScriptsRequest::getDryRun() const {
return dryRun_;
}
void DeleteAScriptsRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::vector<std::string> DeleteAScriptsRequest::getAScriptIds() const {
return aScriptIds_;
}
void DeleteAScriptsRequest::setAScriptIds(const std::vector<std::string> &aScriptIds) {
aScriptIds_ = aScriptIds;
}

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/DeleteAScriptsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
DeleteAScriptsResult::DeleteAScriptsResult() :
ServiceResult()
{}
DeleteAScriptsResult::DeleteAScriptsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteAScriptsResult::~DeleteAScriptsResult()
{}
void DeleteAScriptsResult::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 DeleteAScriptsResult::getJobId()const
{
return jobId_;
}

View File

@@ -25,3 +25,12 @@ DescribeZonesRequest::DescribeZonesRequest()
DescribeZonesRequest::~DescribeZonesRequest() {}
std::string DescribeZonesRequest::getAcceptLanguage() const {
return acceptLanguage_;
}
void DescribeZonesRequest::setAcceptLanguage(const std::string &acceptLanguage) {
acceptLanguage_ = acceptLanguage;
setParameter(std::string("AcceptLanguage"), acceptLanguage);
}

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/alb/model/DisableLoadBalancerIpv6InternetRequest.h>
using AlibabaCloud::Alb::Model::DisableLoadBalancerIpv6InternetRequest;
DisableLoadBalancerIpv6InternetRequest::DisableLoadBalancerIpv6InternetRequest()
: RpcServiceRequest("alb", "2020-06-16", "DisableLoadBalancerIpv6Internet") {
setMethod(HttpRequest::Method::Post);
}
DisableLoadBalancerIpv6InternetRequest::~DisableLoadBalancerIpv6InternetRequest() {}
std::string DisableLoadBalancerIpv6InternetRequest::getClientToken() const {
return clientToken_;
}
void DisableLoadBalancerIpv6InternetRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool DisableLoadBalancerIpv6InternetRequest::getDryRun() const {
return dryRun_;
}
void DisableLoadBalancerIpv6InternetRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::string DisableLoadBalancerIpv6InternetRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void DisableLoadBalancerIpv6InternetRequest::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/DisableLoadBalancerIpv6InternetResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
DisableLoadBalancerIpv6InternetResult::DisableLoadBalancerIpv6InternetResult() :
ServiceResult()
{}
DisableLoadBalancerIpv6InternetResult::DisableLoadBalancerIpv6InternetResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableLoadBalancerIpv6InternetResult::~DisableLoadBalancerIpv6InternetResult()
{}
void DisableLoadBalancerIpv6InternetResult::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 DisableLoadBalancerIpv6InternetResult::getJobId()const
{
return jobId_;
}

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/alb/model/EnableLoadBalancerIpv6InternetRequest.h>
using AlibabaCloud::Alb::Model::EnableLoadBalancerIpv6InternetRequest;
EnableLoadBalancerIpv6InternetRequest::EnableLoadBalancerIpv6InternetRequest()
: RpcServiceRequest("alb", "2020-06-16", "EnableLoadBalancerIpv6Internet") {
setMethod(HttpRequest::Method::Post);
}
EnableLoadBalancerIpv6InternetRequest::~EnableLoadBalancerIpv6InternetRequest() {}
std::string EnableLoadBalancerIpv6InternetRequest::getClientToken() const {
return clientToken_;
}
void EnableLoadBalancerIpv6InternetRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool EnableLoadBalancerIpv6InternetRequest::getDryRun() const {
return dryRun_;
}
void EnableLoadBalancerIpv6InternetRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::string EnableLoadBalancerIpv6InternetRequest::getLoadBalancerId() const {
return loadBalancerId_;
}
void EnableLoadBalancerIpv6InternetRequest::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/EnableLoadBalancerIpv6InternetResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
EnableLoadBalancerIpv6InternetResult::EnableLoadBalancerIpv6InternetResult() :
ServiceResult()
{}
EnableLoadBalancerIpv6InternetResult::EnableLoadBalancerIpv6InternetResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableLoadBalancerIpv6InternetResult::~EnableLoadBalancerIpv6InternetResult()
{}
void EnableLoadBalancerIpv6InternetResult::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 EnableLoadBalancerIpv6InternetResult::getJobId()const
{
return jobId_;
}

View File

@@ -110,6 +110,9 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
auto allFeatureLabels = value["FeatureLabels"]["FeatureLabel"];
for (const auto &item : allFeatureLabels)
featureLabels_.push_back(item.asString());
auto allSecurityGroupIds = value["SecurityGroupIds"]["SecurityGroupId"];
for (const auto &item : allSecurityGroupIds)
securityGroupIds_.push_back(item.asString());
if(!value["AddressAllocatedMode"].isNull())
addressAllocatedMode_ = value["AddressAllocatedMode"].asString();
if(!value["AddressType"].isNull())
@@ -148,6 +151,12 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
addressIpVersion_ = value["AddressIpVersion"].asString();
if(!value["Ipv6AddressType"].isNull())
ipv6AddressType_ = value["Ipv6AddressType"].asString();
if(!value["BackToOriginRouteEnabled"].isNull())
backToOriginRouteEnabled_ = value["BackToOriginRouteEnabled"].asString() == "true";
if(!value["LoadBalancerVersion"].isNull())
loadBalancerVersion_ = value["LoadBalancerVersion"].asString();
if(!value["SysSecurityGroupId"].isNull())
sysSecurityGroupId_ = value["SysSecurityGroupId"].asString();
}
@@ -161,6 +170,11 @@ std::string GetLoadBalancerAttributeResult::getAddressIpVersion()const
return addressIpVersion_;
}
std::string GetLoadBalancerAttributeResult::getLoadBalancerVersion()const
{
return loadBalancerVersion_;
}
std::string GetLoadBalancerAttributeResult::getResourceGroupId()const
{
return resourceGroupId_;
@@ -206,6 +220,11 @@ std::string GetLoadBalancerAttributeResult::getServiceManagedMode()const
return serviceManagedMode_;
}
std::string GetLoadBalancerAttributeResult::getSysSecurityGroupId()const
{
return sysSecurityGroupId_;
}
std::string GetLoadBalancerAttributeResult::getBandwidthPackageId()const
{
return bandwidthPackageId_;
@@ -216,6 +235,11 @@ std::vector<GetLoadBalancerAttributeResult::Tag> GetLoadBalancerAttributeResult:
return tags_;
}
bool GetLoadBalancerAttributeResult::getBackToOriginRouteEnabled()const
{
return backToOriginRouteEnabled_;
}
std::string GetLoadBalancerAttributeResult::getLoadBalancerEdition()const
{
return loadBalancerEdition_;
@@ -236,6 +260,11 @@ GetLoadBalancerAttributeResult::ModificationProtectionConfig GetLoadBalancerAttr
return modificationProtectionConfig_;
}
std::vector<std::string> GetLoadBalancerAttributeResult::getSecurityGroupIds()const
{
return securityGroupIds_;
}
std::string GetLoadBalancerAttributeResult::getLoadBalancerName()const
{
return loadBalancerName_;

View File

@@ -0,0 +1,78 @@
/*
* 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/ListAScriptsRequest.h>
using AlibabaCloud::Alb::Model::ListAScriptsRequest;
ListAScriptsRequest::ListAScriptsRequest()
: RpcServiceRequest("alb", "2020-06-16", "ListAScripts") {
setMethod(HttpRequest::Method::Post);
}
ListAScriptsRequest::~ListAScriptsRequest() {}
std::string ListAScriptsRequest::getNextToken() const {
return nextToken_;
}
void ListAScriptsRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::vector<ListAScriptsRequest::std::string> ListAScriptsRequest::getAScriptNames() const {
return aScriptNames_;
}
void ListAScriptsRequest::setAScriptNames(const std::vector<ListAScriptsRequest::std::string> &aScriptNames) {
aScriptNames_ = aScriptNames;
for(int dep1 = 0; dep1 != aScriptNames.size(); dep1++) {
setParameter(std::string("AScriptNames") + "." + std::to_string(dep1 + 1), aScriptNames[dep1]);
}
}
std::vector<ListAScriptsRequest::std::string> ListAScriptsRequest::getListenerIds() const {
return listenerIds_;
}
void ListAScriptsRequest::setListenerIds(const std::vector<ListAScriptsRequest::std::string> &listenerIds) {
listenerIds_ = listenerIds;
for(int dep1 = 0; dep1 != listenerIds.size(); dep1++) {
setParameter(std::string("ListenerIds") + "." + std::to_string(dep1 + 1), listenerIds[dep1]);
}
}
std::vector<ListAScriptsRequest::std::string> ListAScriptsRequest::getAScriptIds() const {
return aScriptIds_;
}
void ListAScriptsRequest::setAScriptIds(const std::vector<ListAScriptsRequest::std::string> &aScriptIds) {
aScriptIds_ = aScriptIds;
for(int dep1 = 0; dep1 != aScriptIds.size(); dep1++) {
setParameter(std::string("AScriptIds") + "." + std::to_string(dep1 + 1), aScriptIds[dep1]);
}
}
int ListAScriptsRequest::getMaxResults() const {
return maxResults_;
}
void ListAScriptsRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}

View File

@@ -0,0 +1,106 @@
/*
* 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/ListAScriptsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
ListAScriptsResult::ListAScriptsResult() :
ServiceResult()
{}
ListAScriptsResult::ListAScriptsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAScriptsResult::~ListAScriptsResult()
{}
void ListAScriptsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAScriptsNode = value["AScripts"]["AScript"];
for (auto valueAScriptsAScript : allAScriptsNode)
{
AScript aScriptsObject;
if(!valueAScriptsAScript["AScriptId"].isNull())
aScriptsObject.aScriptId = valueAScriptsAScript["AScriptId"].asString();
if(!valueAScriptsAScript["AScriptName"].isNull())
aScriptsObject.aScriptName = valueAScriptsAScript["AScriptName"].asString();
if(!valueAScriptsAScript["Priority"].isNull())
aScriptsObject.priority = std::stol(valueAScriptsAScript["Priority"].asString());
if(!valueAScriptsAScript["Position"].isNull())
aScriptsObject.position = valueAScriptsAScript["Position"].asString();
if(!valueAScriptsAScript["Enabled"].isNull())
aScriptsObject.enabled = valueAScriptsAScript["Enabled"].asString() == "true";
if(!valueAScriptsAScript["ScriptContent"].isNull())
aScriptsObject.scriptContent = valueAScriptsAScript["ScriptContent"].asString();
if(!valueAScriptsAScript["AScriptStatus"].isNull())
aScriptsObject.aScriptStatus = valueAScriptsAScript["AScriptStatus"].asString();
if(!valueAScriptsAScript["ListenerId"].isNull())
aScriptsObject.listenerId = valueAScriptsAScript["ListenerId"].asString();
if(!valueAScriptsAScript["LoadBalancerId"].isNull())
aScriptsObject.loadBalancerId = valueAScriptsAScript["LoadBalancerId"].asString();
if(!valueAScriptsAScript["ExtAttributeEnabled"].isNull())
aScriptsObject.extAttributeEnabled = valueAScriptsAScript["ExtAttributeEnabled"].asString() == "true";
auto allExtAttributesNode = valueAScriptsAScript["ExtAttributes"]["ExtAttribute"];
for (auto valueAScriptsAScriptExtAttributesExtAttribute : allExtAttributesNode)
{
AScript::ExtAttribute extAttributesObject;
if(!valueAScriptsAScriptExtAttributesExtAttribute["AttributeKey"].isNull())
extAttributesObject.attributeKey = valueAScriptsAScriptExtAttributesExtAttribute["AttributeKey"].asString();
if(!valueAScriptsAScriptExtAttributesExtAttribute["AttributeValue"].isNull())
extAttributesObject.attributeValue = valueAScriptsAScriptExtAttributesExtAttribute["AttributeValue"].asString();
aScriptsObject.extAttributes.push_back(extAttributesObject);
}
aScripts_.push_back(aScriptsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}
int ListAScriptsResult::getTotalCount()const
{
return totalCount_;
}
std::string ListAScriptsResult::getNextToken()const
{
return nextToken_;
}
int ListAScriptsResult::getMaxResults()const
{
return maxResults_;
}
std::vector<ListAScriptsResult::AScript> ListAScriptsResult::getAScripts()const
{
return aScripts_;
}

View File

@@ -59,6 +59,8 @@ void ListAclsResult::parse(const std::string &payload)
aclsObject.serviceManagedMode = valueAclsAcl["ServiceManagedMode"].asString();
if(!valueAclsAcl["ConfigManagedEnabled"].isNull())
aclsObject.configManagedEnabled = valueAclsAcl["ConfigManagedEnabled"].asString() == "true";
if(!valueAclsAcl["CreateTime"].isNull())
aclsObject.createTime = valueAclsAcl["CreateTime"].asString();
acls_.push_back(aclsObject);
}
if(!value["MaxResults"].isNull())

View File

@@ -55,6 +55,8 @@ void ListSecurityPoliciesResult::parse(const std::string &payload)
securityPoliciesObject.serviceManagedEnabled = valueSecurityPoliciesSecurityPolicy["ServiceManagedEnabled"].asString() == "true";
if(!valueSecurityPoliciesSecurityPolicy["ServiceManagedMode"].isNull())
securityPoliciesObject.serviceManagedMode = valueSecurityPoliciesSecurityPolicy["ServiceManagedMode"].asString();
if(!valueSecurityPoliciesSecurityPolicy["CreateTime"].isNull())
securityPoliciesObject.createTime = valueSecurityPoliciesSecurityPolicy["CreateTime"].asString();
auto allCiphers = value["Ciphers"]["Cipher"];
for (auto value : allCiphers)
securityPoliciesObject.ciphers.push_back(value.asString());

View File

@@ -73,6 +73,8 @@ void ListServerGroupsResult::parse(const std::string &payload)
serverGroupsObject.serverCount = std::stoi(valueServerGroupsServerGroup["ServerCount"].asString());
if(!valueServerGroupsServerGroup["ServiceName"].isNull())
serverGroupsObject.serviceName = valueServerGroupsServerGroup["ServiceName"].asString();
if(!valueServerGroupsServerGroup["CreateTime"].isNull())
serverGroupsObject.createTime = valueServerGroupsServerGroup["CreateTime"].asString();
auto allTagsNode = valueServerGroupsServerGroup["Tags"]["Tag"];
for (auto valueServerGroupsServerGroupTagsTag : allTagsNode)
{

View File

@@ -0,0 +1,64 @@
/*
* 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/UpdateAScriptsRequest.h>
using AlibabaCloud::Alb::Model::UpdateAScriptsRequest;
UpdateAScriptsRequest::UpdateAScriptsRequest()
: RpcServiceRequest("alb", "2020-06-16", "UpdateAScripts") {
setMethod(HttpRequest::Method::Post);
}
UpdateAScriptsRequest::~UpdateAScriptsRequest() {}
std::string UpdateAScriptsRequest::getClientToken() const {
return clientToken_;
}
void UpdateAScriptsRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::vector<UpdateAScriptsRequest::AScripts> UpdateAScriptsRequest::getAScripts() const {
return aScripts_;
}
void UpdateAScriptsRequest::setAScripts(const std::vector<UpdateAScriptsRequest::AScripts> &aScripts) {
aScripts_ = aScripts;
for(int dep1 = 0; dep1 != aScripts.size(); dep1++) {
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".AScriptName", aScripts[dep1].aScriptName);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".AScriptId", aScripts[dep1].aScriptId);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributeEnabled", aScripts[dep1].extAttributeEnabled ? "true" : "false");
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ScriptContent", aScripts[dep1].scriptContent);
for(int dep2 = 0; dep2 != aScripts[dep1].extAttributes.size(); dep2++) {
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributes." + std::to_string(dep2 + 1) + ".AttributeValue", aScripts[dep1].extAttributes[dep2].attributeValue);
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".ExtAttributes." + std::to_string(dep2 + 1) + ".AttributeKey", aScripts[dep1].extAttributes[dep2].attributeKey);
}
setParameter(std::string("AScripts") + "." + std::to_string(dep1 + 1) + ".Enabled", aScripts[dep1].enabled ? "true" : "false");
}
}
bool UpdateAScriptsRequest::getDryRun() const {
return dryRun_;
}
void UpdateAScriptsRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}

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/UpdateAScriptsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
UpdateAScriptsResult::UpdateAScriptsResult() :
ServiceResult()
{}
UpdateAScriptsResult::UpdateAScriptsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateAScriptsResult::~UpdateAScriptsResult()
{}
void UpdateAScriptsResult::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 UpdateAScriptsResult::getJobId()const
{
return jobId_;
}