Fix array params.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
45
config/src/model/ActiveAggregateConfigRulesRequest.cc
Normal file
45
config/src/model/ActiveAggregateConfigRulesRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/ActiveAggregateConfigRulesRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::ActiveAggregateConfigRulesRequest;
|
||||
|
||||
ActiveAggregateConfigRulesRequest::ActiveAggregateConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "ActiveAggregateConfigRules") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ActiveAggregateConfigRulesRequest::~ActiveAggregateConfigRulesRequest() {}
|
||||
|
||||
std::string ActiveAggregateConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void ActiveAggregateConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string ActiveAggregateConfigRulesRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void ActiveAggregateConfigRulesRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/StopConfigRulesResult.h>
|
||||
#include <alibabacloud/config/model/ActiveAggregateConfigRulesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
StopConfigRulesResult::StopConfigRulesResult() :
|
||||
ActiveAggregateConfigRulesResult::ActiveAggregateConfigRulesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StopConfigRulesResult::StopConfigRulesResult(const std::string &payload) :
|
||||
ActiveAggregateConfigRulesResult::ActiveAggregateConfigRulesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StopConfigRulesResult::~StopConfigRulesResult()
|
||||
ActiveAggregateConfigRulesResult::~ActiveAggregateConfigRulesResult()
|
||||
{}
|
||||
|
||||
void StopConfigRulesResult::parse(const std::string &payload)
|
||||
void ActiveAggregateConfigRulesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -55,7 +55,7 @@ void StopConfigRulesResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
StopConfigRulesResult::OperateRuleResult StopConfigRulesResult::getOperateRuleResult()const
|
||||
ActiveAggregateConfigRulesResult::OperateRuleResult ActiveAggregateConfigRulesResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
@@ -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/config/model/AttachAggregateConfigRuleToCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::AttachAggregateConfigRuleToCompliancePackRequest;
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackRequest::AttachAggregateConfigRuleToCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "AttachAggregateConfigRuleToCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackRequest::~AttachAggregateConfigRuleToCompliancePackRequest() {}
|
||||
|
||||
std::string AttachAggregateConfigRuleToCompliancePackRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void AttachAggregateConfigRuleToCompliancePackRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string AttachAggregateConfigRuleToCompliancePackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void AttachAggregateConfigRuleToCompliancePackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string AttachAggregateConfigRuleToCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void AttachAggregateConfigRuleToCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/AttachAggregateConfigRuleToCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackResult::AttachAggregateConfigRuleToCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackResult::AttachAggregateConfigRuleToCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackResult::~AttachAggregateConfigRuleToCompliancePackResult()
|
||||
{}
|
||||
|
||||
void AttachAggregateConfigRuleToCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateRuleResultNode = value["OperateRuleResult"];
|
||||
auto allOperateRuleItemListNode = operateRuleResultNode["OperateRuleItemList"]["OperateRuleItem"];
|
||||
for (auto operateRuleResultNodeOperateRuleItemListOperateRuleItem : allOperateRuleItemListNode)
|
||||
{
|
||||
OperateRuleResult::OperateRuleItem operateRuleItemObject;
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].isNull())
|
||||
operateRuleItemObject.errorCode = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].asString();
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].isNull())
|
||||
operateRuleItemObject.success = operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].asString() == "true";
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].isNull())
|
||||
operateRuleItemObject.configRuleId = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].asString();
|
||||
operateRuleResult_.operateRuleItemList.push_back(operateRuleItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AttachAggregateConfigRuleToCompliancePackResult::OperateRuleResult AttachAggregateConfigRuleToCompliancePackResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
|
||||
45
config/src/model/AttachConfigRuleToCompliancePackRequest.cc
Normal file
45
config/src/model/AttachConfigRuleToCompliancePackRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/AttachConfigRuleToCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::AttachConfigRuleToCompliancePackRequest;
|
||||
|
||||
AttachConfigRuleToCompliancePackRequest::AttachConfigRuleToCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "AttachConfigRuleToCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AttachConfigRuleToCompliancePackRequest::~AttachConfigRuleToCompliancePackRequest() {}
|
||||
|
||||
std::string AttachConfigRuleToCompliancePackRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void AttachConfigRuleToCompliancePackRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string AttachConfigRuleToCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void AttachConfigRuleToCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
62
config/src/model/AttachConfigRuleToCompliancePackResult.cc
Normal file
62
config/src/model/AttachConfigRuleToCompliancePackResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/AttachConfigRuleToCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
AttachConfigRuleToCompliancePackResult::AttachConfigRuleToCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AttachConfigRuleToCompliancePackResult::AttachConfigRuleToCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AttachConfigRuleToCompliancePackResult::~AttachConfigRuleToCompliancePackResult()
|
||||
{}
|
||||
|
||||
void AttachConfigRuleToCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateRuleResultNode = value["OperateRuleResult"];
|
||||
auto allOperateRuleItemListNode = operateRuleResultNode["OperateRuleItemList"]["OperateRuleItem"];
|
||||
for (auto operateRuleResultNodeOperateRuleItemListOperateRuleItem : allOperateRuleItemListNode)
|
||||
{
|
||||
OperateRuleResult::OperateRuleItem operateRuleItemObject;
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].isNull())
|
||||
operateRuleItemObject.errorCode = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].asString();
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].isNull())
|
||||
operateRuleItemObject.success = operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].asString() == "true";
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].isNull())
|
||||
operateRuleItemObject.configRuleId = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].asString();
|
||||
operateRuleResult_.operateRuleItemList.push_back(operateRuleItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AttachConfigRuleToCompliancePackResult::OperateRuleResult AttachConfigRuleToCompliancePackResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
|
||||
100
config/src/model/CreateAggregateCompliancePackRequest.cc
Normal file
100
config/src/model/CreateAggregateCompliancePackRequest.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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/config/model/CreateAggregateCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::CreateAggregateCompliancePackRequest;
|
||||
|
||||
CreateAggregateCompliancePackRequest::CreateAggregateCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "CreateAggregateCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateAggregateCompliancePackRequest::~CreateAggregateCompliancePackRequest() {}
|
||||
|
||||
std::string CreateAggregateCompliancePackRequest::getCompliancePackName() const {
|
||||
return compliancePackName_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setCompliancePackName(const std::string &compliancePackName) {
|
||||
compliancePackName_ = compliancePackName;
|
||||
setBodyParameter(std::string("CompliancePackName"), compliancePackName);
|
||||
}
|
||||
|
||||
std::string CreateAggregateCompliancePackRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateAggregateCompliancePackRequest::getCompliancePackTemplateId() const {
|
||||
return compliancePackTemplateId_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setCompliancePackTemplateId(const std::string &compliancePackTemplateId) {
|
||||
compliancePackTemplateId_ = compliancePackTemplateId;
|
||||
setBodyParameter(std::string("CompliancePackTemplateId"), compliancePackTemplateId);
|
||||
}
|
||||
|
||||
std::string CreateAggregateCompliancePackRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string CreateAggregateCompliancePackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setBodyParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::vector<CreateAggregateCompliancePackRequest::ConfigRules> CreateAggregateCompliancePackRequest::getConfigRules() const {
|
||||
return configRules_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setConfigRules(const std::vector<CreateAggregateCompliancePackRequest::ConfigRules> &configRules) {
|
||||
configRules_ = configRules;
|
||||
for(int dep1 = 0; dep1 != configRules.size(); dep1++) {
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ManagedRuleIdentifier", configRules[dep1].managedRuleIdentifier);
|
||||
for(int dep2 = 0; dep2 != configRules[dep1].configRuleParameters.size(); dep2++) {
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleParameters." + std::to_string(dep2 + 1) + ".ParameterValue", configRules[dep1].configRuleParameters[dep2].parameterValue);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleParameters." + std::to_string(dep2 + 1) + ".ParameterName", configRules[dep1].configRuleParameters[dep2].parameterName);
|
||||
}
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleId", configRules[dep1].configRuleId);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleName", configRules[dep1].configRuleName);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".Description", configRules[dep1].description);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".RiskLevel", std::to_string(configRules[dep1].riskLevel));
|
||||
}
|
||||
}
|
||||
|
||||
int CreateAggregateCompliancePackRequest::getRiskLevel() const {
|
||||
return riskLevel_;
|
||||
}
|
||||
|
||||
void CreateAggregateCompliancePackRequest::setRiskLevel(int riskLevel) {
|
||||
riskLevel_ = riskLevel;
|
||||
setBodyParameter(std::string("RiskLevel"), std::to_string(riskLevel));
|
||||
}
|
||||
|
||||
51
config/src/model/CreateAggregateCompliancePackResult.cc
Normal file
51
config/src/model/CreateAggregateCompliancePackResult.cc
Normal 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/config/model/CreateAggregateCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
CreateAggregateCompliancePackResult::CreateAggregateCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateAggregateCompliancePackResult::CreateAggregateCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateAggregateCompliancePackResult::~CreateAggregateCompliancePackResult()
|
||||
{}
|
||||
|
||||
void CreateAggregateCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CompliancePackId"].isNull())
|
||||
compliancePackId_ = value["CompliancePackId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateAggregateCompliancePackResult::getCompliancePackId()const
|
||||
{
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
173
config/src/model/CreateAggregateConfigRuleRequest.cc
Normal file
173
config/src/model/CreateAggregateConfigRuleRequest.cc
Normal file
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* 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/config/model/CreateAggregateConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::CreateAggregateConfigRuleRequest;
|
||||
|
||||
CreateAggregateConfigRuleRequest::CreateAggregateConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "CreateAggregateConfigRule") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateAggregateConfigRuleRequest::~CreateAggregateConfigRuleRequest() {}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getTagKeyScope() const {
|
||||
return tagKeyScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setTagKeyScope(const std::string &tagKeyScope) {
|
||||
tagKeyScope_ = tagKeyScope;
|
||||
setBodyParameter(std::string("TagKeyScope"), tagKeyScope);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::vector<CreateAggregateConfigRuleRequest::std::string> CreateAggregateConfigRuleRequest::getResourceTypesScope() const {
|
||||
return resourceTypesScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setResourceTypesScope(const std::vector<CreateAggregateConfigRuleRequest::std::string> &resourceTypesScope) {
|
||||
resourceTypesScope_ = resourceTypesScope;
|
||||
for(int dep1 = 0; dep1 != resourceTypesScope.size(); dep1++) {
|
||||
setBodyParameter(std::string("ResourceTypesScope") + "." + std::to_string(dep1 + 1), resourceTypesScope[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setBodyParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getConfigRuleTriggerTypes() const {
|
||||
return configRuleTriggerTypes_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setConfigRuleTriggerTypes(const std::string &configRuleTriggerTypes) {
|
||||
configRuleTriggerTypes_ = configRuleTriggerTypes;
|
||||
setBodyParameter(std::string("ConfigRuleTriggerTypes"), configRuleTriggerTypes);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getSourceIdentifier() const {
|
||||
return sourceIdentifier_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setSourceIdentifier(const std::string &sourceIdentifier) {
|
||||
sourceIdentifier_ = sourceIdentifier;
|
||||
setBodyParameter(std::string("SourceIdentifier"), sourceIdentifier);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getTagValueScope() const {
|
||||
return tagValueScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setTagValueScope(const std::string &tagValueScope) {
|
||||
tagValueScope_ = tagValueScope;
|
||||
setBodyParameter(std::string("TagValueScope"), tagValueScope);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getRegionIdsScope() const {
|
||||
return regionIdsScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setRegionIdsScope(const std::string ®ionIdsScope) {
|
||||
regionIdsScope_ = regionIdsScope;
|
||||
setBodyParameter(std::string("RegionIdsScope"), regionIdsScope);
|
||||
}
|
||||
|
||||
int CreateAggregateConfigRuleRequest::getRiskLevel() const {
|
||||
return riskLevel_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setRiskLevel(int riskLevel) {
|
||||
riskLevel_ = riskLevel;
|
||||
setBodyParameter(std::string("RiskLevel"), std::to_string(riskLevel));
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getSourceOwner() const {
|
||||
return sourceOwner_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setSourceOwner(const std::string &sourceOwner) {
|
||||
sourceOwner_ = sourceOwner;
|
||||
setBodyParameter(std::string("SourceOwner"), sourceOwner);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getResourceGroupIdsScope() const {
|
||||
return resourceGroupIdsScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setResourceGroupIdsScope(const std::string &resourceGroupIdsScope) {
|
||||
resourceGroupIdsScope_ = resourceGroupIdsScope;
|
||||
setBodyParameter(std::string("ResourceGroupIdsScope"), resourceGroupIdsScope);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getInputParameters() const {
|
||||
return inputParameters_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setInputParameters(const std::string &inputParameters) {
|
||||
inputParameters_ = inputParameters;
|
||||
setBodyParameter(std::string("InputParameters"), inputParameters);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getConfigRuleName() const {
|
||||
return configRuleName_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setConfigRuleName(const std::string &configRuleName) {
|
||||
configRuleName_ = configRuleName;
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setMaximumExecutionFrequency(const std::string &maximumExecutionFrequency) {
|
||||
maximumExecutionFrequency_ = maximumExecutionFrequency;
|
||||
setBodyParameter(std::string("MaximumExecutionFrequency"), maximumExecutionFrequency);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getExcludeResourceIdsScope() const {
|
||||
return excludeResourceIdsScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setExcludeResourceIdsScope(const std::string &excludeResourceIdsScope) {
|
||||
excludeResourceIdsScope_ = excludeResourceIdsScope;
|
||||
setBodyParameter(std::string("ExcludeResourceIdsScope"), excludeResourceIdsScope);
|
||||
}
|
||||
|
||||
@@ -14,39 +14,38 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetSupportedResourceTypesResult.h>
|
||||
#include <alibabacloud/config/model/CreateAggregateConfigRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetSupportedResourceTypesResult::GetSupportedResourceTypesResult() :
|
||||
CreateAggregateConfigRuleResult::CreateAggregateConfigRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetSupportedResourceTypesResult::GetSupportedResourceTypesResult(const std::string &payload) :
|
||||
CreateAggregateConfigRuleResult::CreateAggregateConfigRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetSupportedResourceTypesResult::~GetSupportedResourceTypesResult()
|
||||
CreateAggregateConfigRuleResult::~CreateAggregateConfigRuleResult()
|
||||
{}
|
||||
|
||||
void GetSupportedResourceTypesResult::parse(const std::string &payload)
|
||||
void CreateAggregateConfigRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResourceTypes = value["ResourceTypes"]["ResourceType"];
|
||||
for (const auto &item : allResourceTypes)
|
||||
resourceTypes_.push_back(item.asString());
|
||||
if(!value["ConfigRuleId"].isNull())
|
||||
configRuleId_ = value["ConfigRuleId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> GetSupportedResourceTypesResult::getResourceTypes()const
|
||||
std::string CreateAggregateConfigRuleResult::getConfigRuleId()const
|
||||
{
|
||||
return resourceTypes_;
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
76
config/src/model/CreateAggregatorRequest.cc
Normal file
76
config/src/model/CreateAggregatorRequest.cc
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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/config/model/CreateAggregatorRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::CreateAggregatorRequest;
|
||||
|
||||
CreateAggregatorRequest::CreateAggregatorRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "CreateAggregator") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateAggregatorRequest::~CreateAggregatorRequest() {}
|
||||
|
||||
std::string CreateAggregatorRequest::getAggregatorType() const {
|
||||
return aggregatorType_;
|
||||
}
|
||||
|
||||
void CreateAggregatorRequest::setAggregatorType(const std::string &aggregatorType) {
|
||||
aggregatorType_ = aggregatorType;
|
||||
setBodyParameter(std::string("AggregatorType"), aggregatorType);
|
||||
}
|
||||
|
||||
std::string CreateAggregatorRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateAggregatorRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateAggregatorRequest::getAggregatorName() const {
|
||||
return aggregatorName_;
|
||||
}
|
||||
|
||||
void CreateAggregatorRequest::setAggregatorName(const std::string &aggregatorName) {
|
||||
aggregatorName_ = aggregatorName;
|
||||
setBodyParameter(std::string("AggregatorName"), aggregatorName);
|
||||
}
|
||||
|
||||
std::string CreateAggregatorRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateAggregatorRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::vector<CreateAggregatorRequest::AggregatorAccounts> CreateAggregatorRequest::getAggregatorAccounts() const {
|
||||
return aggregatorAccounts_;
|
||||
}
|
||||
|
||||
void CreateAggregatorRequest::setAggregatorAccounts(const std::vector<CreateAggregatorRequest::AggregatorAccounts> &aggregatorAccounts) {
|
||||
aggregatorAccounts_ = aggregatorAccounts;
|
||||
for(int dep1 = 0; dep1 != aggregatorAccounts.size(); dep1++) {
|
||||
setBodyParameter(std::string("AggregatorAccounts") + "." + std::to_string(dep1 + 1) + ".AccountId", std::to_string(aggregatorAccounts[dep1].accountId));
|
||||
setBodyParameter(std::string("AggregatorAccounts") + "." + std::to_string(dep1 + 1) + ".AccountName", aggregatorAccounts[dep1].accountName);
|
||||
setBodyParameter(std::string("AggregatorAccounts") + "." + std::to_string(dep1 + 1) + ".AccountType", aggregatorAccounts[dep1].accountType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,38 +14,38 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/PutDeliveryChannelResult.h>
|
||||
#include <alibabacloud/config/model/CreateAggregatorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
PutDeliveryChannelResult::PutDeliveryChannelResult() :
|
||||
CreateAggregatorResult::CreateAggregatorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PutDeliveryChannelResult::PutDeliveryChannelResult(const std::string &payload) :
|
||||
CreateAggregatorResult::CreateAggregatorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PutDeliveryChannelResult::~PutDeliveryChannelResult()
|
||||
CreateAggregatorResult::~CreateAggregatorResult()
|
||||
{}
|
||||
|
||||
void PutDeliveryChannelResult::parse(const std::string &payload)
|
||||
void CreateAggregatorResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DeliveryChannelId"].isNull())
|
||||
deliveryChannelId_ = value["DeliveryChannelId"].asString();
|
||||
if(!value["AggregatorId"].isNull())
|
||||
aggregatorId_ = value["AggregatorId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string PutDeliveryChannelResult::getDeliveryChannelId()const
|
||||
std::string CreateAggregatorResult::getAggregatorId()const
|
||||
{
|
||||
return deliveryChannelId_;
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
91
config/src/model/CreateCompliancePackRequest.cc
Normal file
91
config/src/model/CreateCompliancePackRequest.cc
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* 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/config/model/CreateCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::CreateCompliancePackRequest;
|
||||
|
||||
CreateCompliancePackRequest::CreateCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "CreateCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCompliancePackRequest::~CreateCompliancePackRequest() {}
|
||||
|
||||
std::string CreateCompliancePackRequest::getCompliancePackName() const {
|
||||
return compliancePackName_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setCompliancePackName(const std::string &compliancePackName) {
|
||||
compliancePackName_ = compliancePackName;
|
||||
setBodyParameter(std::string("CompliancePackName"), compliancePackName);
|
||||
}
|
||||
|
||||
std::string CreateCompliancePackRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateCompliancePackRequest::getCompliancePackTemplateId() const {
|
||||
return compliancePackTemplateId_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setCompliancePackTemplateId(const std::string &compliancePackTemplateId) {
|
||||
compliancePackTemplateId_ = compliancePackTemplateId;
|
||||
setBodyParameter(std::string("CompliancePackTemplateId"), compliancePackTemplateId);
|
||||
}
|
||||
|
||||
std::string CreateCompliancePackRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::vector<CreateCompliancePackRequest::ConfigRules> CreateCompliancePackRequest::getConfigRules() const {
|
||||
return configRules_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setConfigRules(const std::vector<CreateCompliancePackRequest::ConfigRules> &configRules) {
|
||||
configRules_ = configRules;
|
||||
for(int dep1 = 0; dep1 != configRules.size(); dep1++) {
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ManagedRuleIdentifier", configRules[dep1].managedRuleIdentifier);
|
||||
for(int dep2 = 0; dep2 != configRules[dep1].configRuleParameters.size(); dep2++) {
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleParameters." + std::to_string(dep2 + 1) + ".ParameterValue", configRules[dep1].configRuleParameters[dep2].parameterValue);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleParameters." + std::to_string(dep2 + 1) + ".ParameterName", configRules[dep1].configRuleParameters[dep2].parameterName);
|
||||
}
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleId", configRules[dep1].configRuleId);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".ConfigRuleName", configRules[dep1].configRuleName);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".Description", configRules[dep1].description);
|
||||
setBodyParameter(std::string("ConfigRules") + "." + std::to_string(dep1 + 1) + ".RiskLevel", std::to_string(configRules[dep1].riskLevel));
|
||||
}
|
||||
}
|
||||
|
||||
int CreateCompliancePackRequest::getRiskLevel() const {
|
||||
return riskLevel_;
|
||||
}
|
||||
|
||||
void CreateCompliancePackRequest::setRiskLevel(int riskLevel) {
|
||||
riskLevel_ = riskLevel;
|
||||
setBodyParameter(std::string("RiskLevel"), std::to_string(riskLevel));
|
||||
}
|
||||
|
||||
51
config/src/model/CreateCompliancePackResult.cc
Normal file
51
config/src/model/CreateCompliancePackResult.cc
Normal 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/config/model/CreateCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
CreateCompliancePackResult::CreateCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCompliancePackResult::CreateCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCompliancePackResult::~CreateCompliancePackResult()
|
||||
{}
|
||||
|
||||
void CreateCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CompliancePackId"].isNull())
|
||||
compliancePackId_ = value["CompliancePackId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCompliancePackResult::getCompliancePackId()const
|
||||
{
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
164
config/src/model/CreateConfigRuleRequest.cc
Normal file
164
config/src/model/CreateConfigRuleRequest.cc
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* 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/config/model/CreateConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::CreateConfigRuleRequest;
|
||||
|
||||
CreateConfigRuleRequest::CreateConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "CreateConfigRule") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateConfigRuleRequest::~CreateConfigRuleRequest() {}
|
||||
|
||||
std::string CreateConfigRuleRequest::getTagKeyScope() const {
|
||||
return tagKeyScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setTagKeyScope(const std::string &tagKeyScope) {
|
||||
tagKeyScope_ = tagKeyScope;
|
||||
setBodyParameter(std::string("TagKeyScope"), tagKeyScope);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::vector<CreateConfigRuleRequest::std::string> CreateConfigRuleRequest::getResourceTypesScope() const {
|
||||
return resourceTypesScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setResourceTypesScope(const std::vector<CreateConfigRuleRequest::std::string> &resourceTypesScope) {
|
||||
resourceTypesScope_ = resourceTypesScope;
|
||||
for(int dep1 = 0; dep1 != resourceTypesScope.size(); dep1++) {
|
||||
setBodyParameter(std::string("ResourceTypesScope") + "." + std::to_string(dep1 + 1), resourceTypesScope[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getConfigRuleTriggerTypes() const {
|
||||
return configRuleTriggerTypes_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setConfigRuleTriggerTypes(const std::string &configRuleTriggerTypes) {
|
||||
configRuleTriggerTypes_ = configRuleTriggerTypes;
|
||||
setBodyParameter(std::string("ConfigRuleTriggerTypes"), configRuleTriggerTypes);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getSourceIdentifier() const {
|
||||
return sourceIdentifier_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setSourceIdentifier(const std::string &sourceIdentifier) {
|
||||
sourceIdentifier_ = sourceIdentifier;
|
||||
setBodyParameter(std::string("SourceIdentifier"), sourceIdentifier);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getTagValueScope() const {
|
||||
return tagValueScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setTagValueScope(const std::string &tagValueScope) {
|
||||
tagValueScope_ = tagValueScope;
|
||||
setBodyParameter(std::string("TagValueScope"), tagValueScope);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getRegionIdsScope() const {
|
||||
return regionIdsScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setRegionIdsScope(const std::string ®ionIdsScope) {
|
||||
regionIdsScope_ = regionIdsScope;
|
||||
setBodyParameter(std::string("RegionIdsScope"), regionIdsScope);
|
||||
}
|
||||
|
||||
int CreateConfigRuleRequest::getRiskLevel() const {
|
||||
return riskLevel_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setRiskLevel(int riskLevel) {
|
||||
riskLevel_ = riskLevel;
|
||||
setBodyParameter(std::string("RiskLevel"), std::to_string(riskLevel));
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getSourceOwner() const {
|
||||
return sourceOwner_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setSourceOwner(const std::string &sourceOwner) {
|
||||
sourceOwner_ = sourceOwner;
|
||||
setBodyParameter(std::string("SourceOwner"), sourceOwner);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getResourceGroupIdsScope() const {
|
||||
return resourceGroupIdsScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setResourceGroupIdsScope(const std::string &resourceGroupIdsScope) {
|
||||
resourceGroupIdsScope_ = resourceGroupIdsScope;
|
||||
setBodyParameter(std::string("ResourceGroupIdsScope"), resourceGroupIdsScope);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getInputParameters() const {
|
||||
return inputParameters_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setInputParameters(const std::string &inputParameters) {
|
||||
inputParameters_ = inputParameters;
|
||||
setBodyParameter(std::string("InputParameters"), inputParameters);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getConfigRuleName() const {
|
||||
return configRuleName_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setConfigRuleName(const std::string &configRuleName) {
|
||||
configRuleName_ = configRuleName;
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setMaximumExecutionFrequency(const std::string &maximumExecutionFrequency) {
|
||||
maximumExecutionFrequency_ = maximumExecutionFrequency;
|
||||
setBodyParameter(std::string("MaximumExecutionFrequency"), maximumExecutionFrequency);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getExcludeResourceIdsScope() const {
|
||||
return excludeResourceIdsScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setExcludeResourceIdsScope(const std::string &excludeResourceIdsScope) {
|
||||
excludeResourceIdsScope_ = excludeResourceIdsScope;
|
||||
setBodyParameter(std::string("ExcludeResourceIdsScope"), excludeResourceIdsScope);
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/PutConfigRuleResult.h>
|
||||
#include <alibabacloud/config/model/CreateConfigRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
PutConfigRuleResult::PutConfigRuleResult() :
|
||||
CreateConfigRuleResult::CreateConfigRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PutConfigRuleResult::PutConfigRuleResult(const std::string &payload) :
|
||||
CreateConfigRuleResult::CreateConfigRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PutConfigRuleResult::~PutConfigRuleResult()
|
||||
CreateConfigRuleResult::~CreateConfigRuleResult()
|
||||
{}
|
||||
|
||||
void PutConfigRuleResult::parse(const std::string &payload)
|
||||
void CreateConfigRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -44,7 +44,7 @@ void PutConfigRuleResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::string PutConfigRuleResult::getConfigRuleId()const
|
||||
std::string CreateConfigRuleResult::getConfigRuleId()const
|
||||
{
|
||||
return configRuleId_;
|
||||
}
|
||||
45
config/src/model/DeactiveAggregateConfigRulesRequest.cc
Normal file
45
config/src/model/DeactiveAggregateConfigRulesRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DeactiveAggregateConfigRulesRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeactiveAggregateConfigRulesRequest;
|
||||
|
||||
DeactiveAggregateConfigRulesRequest::DeactiveAggregateConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeactiveAggregateConfigRules") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeactiveAggregateConfigRulesRequest::~DeactiveAggregateConfigRulesRequest() {}
|
||||
|
||||
std::string DeactiveAggregateConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void DeactiveAggregateConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string DeactiveAggregateConfigRulesRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void DeactiveAggregateConfigRulesRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
62
config/src/model/DeactiveAggregateConfigRulesResult.cc
Normal file
62
config/src/model/DeactiveAggregateConfigRulesResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DeactiveAggregateConfigRulesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DeactiveAggregateConfigRulesResult::DeactiveAggregateConfigRulesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeactiveAggregateConfigRulesResult::DeactiveAggregateConfigRulesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeactiveAggregateConfigRulesResult::~DeactiveAggregateConfigRulesResult()
|
||||
{}
|
||||
|
||||
void DeactiveAggregateConfigRulesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateRuleResultNode = value["OperateRuleResult"];
|
||||
auto allOperateRuleItemListNode = operateRuleResultNode["OperateRuleItemList"]["OperateRuleItem"];
|
||||
for (auto operateRuleResultNodeOperateRuleItemListOperateRuleItem : allOperateRuleItemListNode)
|
||||
{
|
||||
OperateRuleResult::OperateRuleItem operateRuleItemObject;
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].isNull())
|
||||
operateRuleItemObject.errorCode = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].asString();
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].isNull())
|
||||
operateRuleItemObject.success = operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].asString() == "true";
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].isNull())
|
||||
operateRuleItemObject.configRuleId = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].asString();
|
||||
operateRuleResult_.operateRuleItemList.push_back(operateRuleItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeactiveAggregateConfigRulesResult::OperateRuleResult DeactiveAggregateConfigRulesResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/ActiveConfigRulesRequest.h>
|
||||
#include <alibabacloud/config/model/DeactiveConfigRulesRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::ActiveConfigRulesRequest;
|
||||
using AlibabaCloud::Config::Model::DeactiveConfigRulesRequest;
|
||||
|
||||
ActiveConfigRulesRequest::ActiveConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "ActiveConfigRules") {
|
||||
DeactiveConfigRulesRequest::DeactiveConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeactiveConfigRules") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ActiveConfigRulesRequest::~ActiveConfigRulesRequest() {}
|
||||
DeactiveConfigRulesRequest::~DeactiveConfigRulesRequest() {}
|
||||
|
||||
std::string ActiveConfigRulesRequest::getConfigRuleIds() const {
|
||||
std::string DeactiveConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void ActiveConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
void DeactiveConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/ActiveConfigRulesResult.h>
|
||||
#include <alibabacloud/config/model/DeactiveConfigRulesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
ActiveConfigRulesResult::ActiveConfigRulesResult() :
|
||||
DeactiveConfigRulesResult::DeactiveConfigRulesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ActiveConfigRulesResult::ActiveConfigRulesResult(const std::string &payload) :
|
||||
DeactiveConfigRulesResult::DeactiveConfigRulesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ActiveConfigRulesResult::~ActiveConfigRulesResult()
|
||||
DeactiveConfigRulesResult::~DeactiveConfigRulesResult()
|
||||
{}
|
||||
|
||||
void ActiveConfigRulesResult::parse(const std::string &payload)
|
||||
void DeactiveConfigRulesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -55,7 +55,7 @@ void ActiveConfigRulesResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
ActiveConfigRulesResult::OperateRuleResult ActiveConfigRulesResult::getOperateRuleResult()const
|
||||
DeactiveConfigRulesResult::OperateRuleResult DeactiveConfigRulesResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
63
config/src/model/DeleteAggregateCompliancePacksRequest.cc
Normal file
63
config/src/model/DeleteAggregateCompliancePacksRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/config/model/DeleteAggregateCompliancePacksRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeleteAggregateCompliancePacksRequest;
|
||||
|
||||
DeleteAggregateCompliancePacksRequest::DeleteAggregateCompliancePacksRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeleteAggregateCompliancePacks") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteAggregateCompliancePacksRequest::~DeleteAggregateCompliancePacksRequest() {}
|
||||
|
||||
std::string DeleteAggregateCompliancePacksRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteAggregateCompliancePacksRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteAggregateCompliancePacksRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void DeleteAggregateCompliancePacksRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setBodyParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string DeleteAggregateCompliancePacksRequest::getCompliancePackIds() const {
|
||||
return compliancePackIds_;
|
||||
}
|
||||
|
||||
void DeleteAggregateCompliancePacksRequest::setCompliancePackIds(const std::string &compliancePackIds) {
|
||||
compliancePackIds_ = compliancePackIds;
|
||||
setBodyParameter(std::string("CompliancePackIds"), compliancePackIds);
|
||||
}
|
||||
|
||||
bool DeleteAggregateCompliancePacksRequest::getDeleteRule() const {
|
||||
return deleteRule_;
|
||||
}
|
||||
|
||||
void DeleteAggregateCompliancePacksRequest::setDeleteRule(bool deleteRule) {
|
||||
deleteRule_ = deleteRule;
|
||||
setBodyParameter(std::string("DeleteRule"), deleteRule ? "true" : "false");
|
||||
}
|
||||
|
||||
62
config/src/model/DeleteAggregateCompliancePacksResult.cc
Normal file
62
config/src/model/DeleteAggregateCompliancePacksResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DeleteAggregateCompliancePacksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DeleteAggregateCompliancePacksResult::DeleteAggregateCompliancePacksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteAggregateCompliancePacksResult::DeleteAggregateCompliancePacksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteAggregateCompliancePacksResult::~DeleteAggregateCompliancePacksResult()
|
||||
{}
|
||||
|
||||
void DeleteAggregateCompliancePacksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateCompliancePacksResultNode = value["OperateCompliancePacksResult"];
|
||||
auto allOperateCompliancePacksNode = operateCompliancePacksResultNode["OperateCompliancePacks"]["OperateCompliancePacksItem"];
|
||||
for (auto operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem : allOperateCompliancePacksNode)
|
||||
{
|
||||
OperateCompliancePacksResult::OperateCompliancePacksItem operateCompliancePacksItemObject;
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["CompliancePackId"].isNull())
|
||||
operateCompliancePacksItemObject.compliancePackId = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["CompliancePackId"].asString();
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["ErrorCode"].isNull())
|
||||
operateCompliancePacksItemObject.errorCode = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["ErrorCode"].asString();
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["Success"].isNull())
|
||||
operateCompliancePacksItemObject.success = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["Success"].asString() == "true";
|
||||
operateCompliancePacksResult_.operateCompliancePacks.push_back(operateCompliancePacksItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeleteAggregateCompliancePacksResult::OperateCompliancePacksResult DeleteAggregateCompliancePacksResult::getOperateCompliancePacksResult()const
|
||||
{
|
||||
return operateCompliancePacksResult_;
|
||||
}
|
||||
|
||||
45
config/src/model/DeleteAggregateConfigRulesRequest.cc
Normal file
45
config/src/model/DeleteAggregateConfigRulesRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DeleteAggregateConfigRulesRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeleteAggregateConfigRulesRequest;
|
||||
|
||||
DeleteAggregateConfigRulesRequest::DeleteAggregateConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeleteAggregateConfigRules") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteAggregateConfigRulesRequest::~DeleteAggregateConfigRulesRequest() {}
|
||||
|
||||
std::string DeleteAggregateConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void DeleteAggregateConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string DeleteAggregateConfigRulesRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void DeleteAggregateConfigRulesRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DeleteConfigRulesResult.h>
|
||||
#include <alibabacloud/config/model/DeleteAggregateConfigRulesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DeleteConfigRulesResult::DeleteConfigRulesResult() :
|
||||
DeleteAggregateConfigRulesResult::DeleteAggregateConfigRulesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteConfigRulesResult::DeleteConfigRulesResult(const std::string &payload) :
|
||||
DeleteAggregateConfigRulesResult::DeleteAggregateConfigRulesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteConfigRulesResult::~DeleteConfigRulesResult()
|
||||
DeleteAggregateConfigRulesResult::~DeleteAggregateConfigRulesResult()
|
||||
{}
|
||||
|
||||
void DeleteConfigRulesResult::parse(const std::string &payload)
|
||||
void DeleteAggregateConfigRulesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -55,7 +55,7 @@ void DeleteConfigRulesResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
DeleteConfigRulesResult::OperateRuleResult DeleteConfigRulesResult::getOperateRuleResult()const
|
||||
DeleteAggregateConfigRulesResult::OperateRuleResult DeleteAggregateConfigRulesResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
45
config/src/model/DeleteAggregatorsRequest.cc
Normal file
45
config/src/model/DeleteAggregatorsRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DeleteAggregatorsRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeleteAggregatorsRequest;
|
||||
|
||||
DeleteAggregatorsRequest::DeleteAggregatorsRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeleteAggregators") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteAggregatorsRequest::~DeleteAggregatorsRequest() {}
|
||||
|
||||
std::string DeleteAggregatorsRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteAggregatorsRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteAggregatorsRequest::getAggregatorIds() const {
|
||||
return aggregatorIds_;
|
||||
}
|
||||
|
||||
void DeleteAggregatorsRequest::setAggregatorIds(const std::string &aggregatorIds) {
|
||||
aggregatorIds_ = aggregatorIds;
|
||||
setBodyParameter(std::string("AggregatorIds"), aggregatorIds);
|
||||
}
|
||||
|
||||
62
config/src/model/DeleteAggregatorsResult.cc
Normal file
62
config/src/model/DeleteAggregatorsResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DeleteAggregatorsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DeleteAggregatorsResult::DeleteAggregatorsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteAggregatorsResult::DeleteAggregatorsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteAggregatorsResult::~DeleteAggregatorsResult()
|
||||
{}
|
||||
|
||||
void DeleteAggregatorsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateAggregatorsResultNode = value["OperateAggregatorsResult"];
|
||||
auto allOperateAggregatorsNode = operateAggregatorsResultNode["OperateAggregators"]["OperateAggregatorList"];
|
||||
for (auto operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList : allOperateAggregatorsNode)
|
||||
{
|
||||
OperateAggregatorsResult::OperateAggregatorList operateAggregatorListObject;
|
||||
if(!operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["ErrorCode"].isNull())
|
||||
operateAggregatorListObject.errorCode = operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["ErrorCode"].asString();
|
||||
if(!operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["Success"].isNull())
|
||||
operateAggregatorListObject.success = operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["Success"].asString() == "true";
|
||||
if(!operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["AggregatorId"].isNull())
|
||||
operateAggregatorListObject.aggregatorId = operateAggregatorsResultNodeOperateAggregatorsOperateAggregatorList["AggregatorId"].asString();
|
||||
operateAggregatorsResult_.operateAggregators.push_back(operateAggregatorListObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeleteAggregatorsResult::OperateAggregatorsResult DeleteAggregatorsResult::getOperateAggregatorsResult()const
|
||||
{
|
||||
return operateAggregatorsResult_;
|
||||
}
|
||||
|
||||
54
config/src/model/DeleteCompliancePacksRequest.cc
Normal file
54
config/src/model/DeleteCompliancePacksRequest.cc
Normal 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/config/model/DeleteCompliancePacksRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeleteCompliancePacksRequest;
|
||||
|
||||
DeleteCompliancePacksRequest::DeleteCompliancePacksRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DeleteCompliancePacks") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteCompliancePacksRequest::~DeleteCompliancePacksRequest() {}
|
||||
|
||||
std::string DeleteCompliancePacksRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteCompliancePacksRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteCompliancePacksRequest::getCompliancePackIds() const {
|
||||
return compliancePackIds_;
|
||||
}
|
||||
|
||||
void DeleteCompliancePacksRequest::setCompliancePackIds(const std::string &compliancePackIds) {
|
||||
compliancePackIds_ = compliancePackIds;
|
||||
setBodyParameter(std::string("CompliancePackIds"), compliancePackIds);
|
||||
}
|
||||
|
||||
bool DeleteCompliancePacksRequest::getDeleteRule() const {
|
||||
return deleteRule_;
|
||||
}
|
||||
|
||||
void DeleteCompliancePacksRequest::setDeleteRule(bool deleteRule) {
|
||||
deleteRule_ = deleteRule;
|
||||
setBodyParameter(std::string("DeleteRule"), deleteRule ? "true" : "false");
|
||||
}
|
||||
|
||||
62
config/src/model/DeleteCompliancePacksResult.cc
Normal file
62
config/src/model/DeleteCompliancePacksResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DeleteCompliancePacksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DeleteCompliancePacksResult::DeleteCompliancePacksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteCompliancePacksResult::DeleteCompliancePacksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteCompliancePacksResult::~DeleteCompliancePacksResult()
|
||||
{}
|
||||
|
||||
void DeleteCompliancePacksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateCompliancePacksResultNode = value["OperateCompliancePacksResult"];
|
||||
auto allOperateCompliancePacksNode = operateCompliancePacksResultNode["OperateCompliancePacks"]["OperateCompliancePacksItem"];
|
||||
for (auto operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem : allOperateCompliancePacksNode)
|
||||
{
|
||||
OperateCompliancePacksResult::OperateCompliancePacksItem operateCompliancePacksItemObject;
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["CompliancePackId"].isNull())
|
||||
operateCompliancePacksItemObject.compliancePackId = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["CompliancePackId"].asString();
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["ErrorCode"].isNull())
|
||||
operateCompliancePacksItemObject.errorCode = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["ErrorCode"].asString();
|
||||
if(!operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["Success"].isNull())
|
||||
operateCompliancePacksItemObject.success = operateCompliancePacksResultNodeOperateCompliancePacksOperateCompliancePacksItem["Success"].asString() == "true";
|
||||
operateCompliancePacksResult_.operateCompliancePacks.push_back(operateCompliancePacksItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DeleteCompliancePacksResult::OperateCompliancePacksResult DeleteCompliancePacksResult::getOperateCompliancePacksResult()const
|
||||
{
|
||||
return operateCompliancePacksResult_;
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeComplianceRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeComplianceRequest;
|
||||
|
||||
DescribeComplianceRequest::DescribeComplianceRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeCompliance") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeComplianceRequest::~DescribeComplianceRequest() {}
|
||||
|
||||
std::string DescribeComplianceRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
std::string DescribeComplianceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
bool DescribeComplianceRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string DescribeComplianceRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string DescribeComplianceRequest::getComplianceType() const {
|
||||
return complianceType_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setComplianceType(const std::string &complianceType) {
|
||||
complianceType_ = complianceType;
|
||||
setParameter(std::string("ComplianceType"), complianceType);
|
||||
}
|
||||
|
||||
long DescribeComplianceRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void DescribeComplianceRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeComplianceSummaryRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeComplianceSummaryRequest;
|
||||
|
||||
DescribeComplianceSummaryRequest::DescribeComplianceSummaryRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeComplianceSummary") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeComplianceSummaryRequest::~DescribeComplianceSummaryRequest() {}
|
||||
|
||||
bool DescribeComplianceSummaryRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void DescribeComplianceSummaryRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
long DescribeComplianceSummaryRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void DescribeComplianceSummaryRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeComplianceSummaryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DescribeComplianceSummaryResult::DescribeComplianceSummaryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeComplianceSummaryResult::DescribeComplianceSummaryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeComplianceSummaryResult::~DescribeComplianceSummaryResult()
|
||||
{}
|
||||
|
||||
void DescribeComplianceSummaryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceSummaryNode = value["ComplianceSummary"];
|
||||
auto complianceSummaryByResourceNode = complianceSummaryNode["ComplianceSummaryByResource"];
|
||||
if(!complianceSummaryByResourceNode["CompliantCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByResource.compliantCount = std::stoi(complianceSummaryByResourceNode["CompliantCount"].asString());
|
||||
if(!complianceSummaryByResourceNode["NonCompliantCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByResource.nonCompliantCount = std::stoi(complianceSummaryByResourceNode["NonCompliantCount"].asString());
|
||||
if(!complianceSummaryByResourceNode["ComplianceSummaryTimestamp"].isNull())
|
||||
complianceSummary_.complianceSummaryByResource.complianceSummaryTimestamp = std::stol(complianceSummaryByResourceNode["ComplianceSummaryTimestamp"].asString());
|
||||
if(!complianceSummaryByResourceNode["TotalCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByResource.totalCount = std::stol(complianceSummaryByResourceNode["TotalCount"].asString());
|
||||
auto complianceSummaryByConfigRuleNode = complianceSummaryNode["ComplianceSummaryByConfigRule"];
|
||||
if(!complianceSummaryByConfigRuleNode["CompliantCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByConfigRule.compliantCount = std::stoi(complianceSummaryByConfigRuleNode["CompliantCount"].asString());
|
||||
if(!complianceSummaryByConfigRuleNode["NonCompliantCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByConfigRule.nonCompliantCount = std::stoi(complianceSummaryByConfigRuleNode["NonCompliantCount"].asString());
|
||||
if(!complianceSummaryByConfigRuleNode["ComplianceSummaryTimestamp"].isNull())
|
||||
complianceSummary_.complianceSummaryByConfigRule.complianceSummaryTimestamp = std::stol(complianceSummaryByConfigRuleNode["ComplianceSummaryTimestamp"].asString());
|
||||
if(!complianceSummaryByConfigRuleNode["TotalCount"].isNull())
|
||||
complianceSummary_.complianceSummaryByConfigRule.totalCount = std::stol(complianceSummaryByConfigRuleNode["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeComplianceSummaryResult::ComplianceSummary DescribeComplianceSummaryResult::getComplianceSummary()const
|
||||
{
|
||||
return complianceSummary_;
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeConfigRuleRequest;
|
||||
|
||||
DescribeConfigRuleRequest::DescribeConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeConfigRule") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeConfigRuleRequest::~DescribeConfigRuleRequest() {}
|
||||
|
||||
std::string DescribeConfigRuleRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void DescribeConfigRuleRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
bool DescribeConfigRuleRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void DescribeConfigRuleRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
long DescribeConfigRuleRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void DescribeConfigRuleRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeConfigurationRecorderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DescribeConfigurationRecorderResult::DescribeConfigurationRecorderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeConfigurationRecorderResult::DescribeConfigurationRecorderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeConfigurationRecorderResult::~DescribeConfigurationRecorderResult()
|
||||
{}
|
||||
|
||||
void DescribeConfigurationRecorderResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configurationRecorderNode = value["ConfigurationRecorder"];
|
||||
if(!configurationRecorderNode["OrganizationEnableStatus"].isNull())
|
||||
configurationRecorder_.organizationEnableStatus = configurationRecorderNode["OrganizationEnableStatus"].asString();
|
||||
if(!configurationRecorderNode["ConfigurationRecorderStatus"].isNull())
|
||||
configurationRecorder_.configurationRecorderStatus = configurationRecorderNode["ConfigurationRecorderStatus"].asString();
|
||||
if(!configurationRecorderNode["OrganizationMasterId"].isNull())
|
||||
configurationRecorder_.organizationMasterId = std::stol(configurationRecorderNode["OrganizationMasterId"].asString());
|
||||
if(!configurationRecorderNode["AccountId"].isNull())
|
||||
configurationRecorder_.accountId = std::stol(configurationRecorderNode["AccountId"].asString());
|
||||
auto allResourceTypes = configurationRecorderNode["ResourceTypes"]["ResourceType"];
|
||||
for (auto value : allResourceTypes)
|
||||
configurationRecorder_.resourceTypes.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeConfigurationRecorderResult::ConfigurationRecorder DescribeConfigurationRecorderResult::getConfigurationRecorder()const
|
||||
{
|
||||
return configurationRecorder_;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeDeliveryChannelsRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeDeliveryChannelsRequest;
|
||||
|
||||
DescribeDeliveryChannelsRequest::DescribeDeliveryChannelsRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeDeliveryChannels") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeDeliveryChannelsRequest::~DescribeDeliveryChannelsRequest() {}
|
||||
|
||||
std::string DescribeDeliveryChannelsRequest::getDeliveryChannelIds() const {
|
||||
return deliveryChannelIds_;
|
||||
}
|
||||
|
||||
void DescribeDeliveryChannelsRequest::setDeliveryChannelIds(const std::string &deliveryChannelIds) {
|
||||
deliveryChannelIds_ = deliveryChannelIds;
|
||||
setParameter(std::string("DeliveryChannelIds"), deliveryChannelIds);
|
||||
}
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeDeliveryChannelsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DescribeDeliveryChannelsResult::DescribeDeliveryChannelsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDeliveryChannelsResult::DescribeDeliveryChannelsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDeliveryChannelsResult::~DescribeDeliveryChannelsResult()
|
||||
{}
|
||||
|
||||
void DescribeDeliveryChannelsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDeliveryChannelsNode = value["DeliveryChannels"]["DeliveryChannel"];
|
||||
for (auto valueDeliveryChannelsDeliveryChannel : allDeliveryChannelsNode)
|
||||
{
|
||||
DeliveryChannel deliveryChannelsObject;
|
||||
if(!valueDeliveryChannelsDeliveryChannel["Status"].isNull())
|
||||
deliveryChannelsObject.status = std::stoi(valueDeliveryChannelsDeliveryChannel["Status"].asString());
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelName"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelName = valueDeliveryChannelsDeliveryChannel["DeliveryChannelName"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelId"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelId = valueDeliveryChannelsDeliveryChannel["DeliveryChannelId"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelType"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelType = valueDeliveryChannelsDeliveryChannel["DeliveryChannelType"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelAssumeRoleArn"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelAssumeRoleArn = valueDeliveryChannelsDeliveryChannel["DeliveryChannelAssumeRoleArn"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["Description"].isNull())
|
||||
deliveryChannelsObject.description = valueDeliveryChannelsDeliveryChannel["Description"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelCondition"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelCondition = valueDeliveryChannelsDeliveryChannel["DeliveryChannelCondition"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["DeliveryChannelTargetArn"].isNull())
|
||||
deliveryChannelsObject.deliveryChannelTargetArn = valueDeliveryChannelsDeliveryChannel["DeliveryChannelTargetArn"].asString();
|
||||
if(!valueDeliveryChannelsDeliveryChannel["ConfigurationSnapshot"].isNull())
|
||||
deliveryChannelsObject.configurationSnapshot = valueDeliveryChannelsDeliveryChannel["ConfigurationSnapshot"].asString() == "true";
|
||||
if(!valueDeliveryChannelsDeliveryChannel["ConfigurationItemChangeNotification"].isNull())
|
||||
deliveryChannelsObject.configurationItemChangeNotification = valueDeliveryChannelsDeliveryChannel["ConfigurationItemChangeNotification"].asString() == "true";
|
||||
if(!valueDeliveryChannelsDeliveryChannel["NonCompliantNotification"].isNull())
|
||||
deliveryChannelsObject.nonCompliantNotification = valueDeliveryChannelsDeliveryChannel["NonCompliantNotification"].asString() == "true";
|
||||
if(!valueDeliveryChannelsDeliveryChannel["OversizedDataOSSTargetArn"].isNull())
|
||||
deliveryChannelsObject.oversizedDataOSSTargetArn = valueDeliveryChannelsDeliveryChannel["OversizedDataOSSTargetArn"].asString();
|
||||
deliveryChannels_.push_back(deliveryChannelsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeDeliveryChannelsResult::DeliveryChannel> DescribeDeliveryChannelsResult::getDeliveryChannels()const
|
||||
{
|
||||
return deliveryChannels_;
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeDiscoveredResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeDiscoveredResourceRequest;
|
||||
|
||||
DescribeDiscoveredResourceRequest::DescribeDiscoveredResourceRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeDiscoveredResource") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeDiscoveredResourceRequest::~DescribeDiscoveredResourceRequest() {}
|
||||
|
||||
std::string DescribeDiscoveredResourceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeDiscoveredResourceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
bool DescribeDiscoveredResourceRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void DescribeDiscoveredResourceRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string DescribeDiscoveredResourceRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void DescribeDiscoveredResourceRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string DescribeDiscoveredResourceRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void DescribeDiscoveredResourceRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
long DescribeDiscoveredResourceRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void DescribeDiscoveredResourceRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeDiscoveredResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DescribeDiscoveredResourceResult::DescribeDiscoveredResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDiscoveredResourceResult::DescribeDiscoveredResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDiscoveredResourceResult::~DescribeDiscoveredResourceResult()
|
||||
{}
|
||||
|
||||
void DescribeDiscoveredResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto discoveredResourceDetailNode = value["DiscoveredResourceDetail"];
|
||||
if(!discoveredResourceDetailNode["AvailabilityZone"].isNull())
|
||||
discoveredResourceDetail_.availabilityZone = discoveredResourceDetailNode["AvailabilityZone"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceType"].isNull())
|
||||
discoveredResourceDetail_.resourceType = discoveredResourceDetailNode["ResourceType"].asString();
|
||||
if(!discoveredResourceDetailNode["Configuration"].isNull())
|
||||
discoveredResourceDetail_.configuration = discoveredResourceDetailNode["Configuration"].asString();
|
||||
if(!discoveredResourceDetailNode["Region"].isNull())
|
||||
discoveredResourceDetail_.region = discoveredResourceDetailNode["Region"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceCreationTime"].isNull())
|
||||
discoveredResourceDetail_.resourceCreationTime = std::stol(discoveredResourceDetailNode["ResourceCreationTime"].asString());
|
||||
if(!discoveredResourceDetailNode["Tags"].isNull())
|
||||
discoveredResourceDetail_.tags = discoveredResourceDetailNode["Tags"].asString();
|
||||
if(!discoveredResourceDetailNode["AccountId"].isNull())
|
||||
discoveredResourceDetail_.accountId = std::stol(discoveredResourceDetailNode["AccountId"].asString());
|
||||
if(!discoveredResourceDetailNode["ResourceId"].isNull())
|
||||
discoveredResourceDetail_.resourceId = discoveredResourceDetailNode["ResourceId"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceDeleted"].isNull())
|
||||
discoveredResourceDetail_.resourceDeleted = std::stoi(discoveredResourceDetailNode["ResourceDeleted"].asString());
|
||||
if(!discoveredResourceDetailNode["ResourceName"].isNull())
|
||||
discoveredResourceDetail_.resourceName = discoveredResourceDetailNode["ResourceName"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceStatus"].isNull())
|
||||
discoveredResourceDetail_.resourceStatus = discoveredResourceDetailNode["ResourceStatus"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeDiscoveredResourceResult::DiscoveredResourceDetail DescribeDiscoveredResourceResult::getDiscoveredResourceDetail()const
|
||||
{
|
||||
return discoveredResourceDetail_;
|
||||
}
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/DescribeEvaluationResultsRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeEvaluationResultsRequest;
|
||||
|
||||
DescribeEvaluationResultsRequest::DescribeEvaluationResultsRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeEvaluationResults") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeEvaluationResultsRequest::~DescribeEvaluationResultsRequest() {}
|
||||
|
||||
std::string DescribeEvaluationResultsRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
bool DescribeEvaluationResultsRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
int DescribeEvaluationResultsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeEvaluationResultsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeEvaluationResultsRequest::getComplianceType() const {
|
||||
return complianceType_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setComplianceType(const std::string &complianceType) {
|
||||
complianceType_ = complianceType;
|
||||
setParameter(std::string("ComplianceType"), complianceType);
|
||||
}
|
||||
|
||||
std::string DescribeEvaluationResultsRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
std::string DescribeEvaluationResultsRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
long DescribeEvaluationResultsRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void DescribeEvaluationResultsRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -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/config/model/DetachAggregateConfigRuleToCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DetachAggregateConfigRuleToCompliancePackRequest;
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackRequest::DetachAggregateConfigRuleToCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DetachAggregateConfigRuleToCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackRequest::~DetachAggregateConfigRuleToCompliancePackRequest() {}
|
||||
|
||||
std::string DetachAggregateConfigRuleToCompliancePackRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void DetachAggregateConfigRuleToCompliancePackRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string DetachAggregateConfigRuleToCompliancePackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void DetachAggregateConfigRuleToCompliancePackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string DetachAggregateConfigRuleToCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void DetachAggregateConfigRuleToCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DetachAggregateConfigRuleToCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackResult::DetachAggregateConfigRuleToCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackResult::DetachAggregateConfigRuleToCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackResult::~DetachAggregateConfigRuleToCompliancePackResult()
|
||||
{}
|
||||
|
||||
void DetachAggregateConfigRuleToCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateRuleResultNode = value["OperateRuleResult"];
|
||||
auto allOperateRuleItemListNode = operateRuleResultNode["OperateRuleItemList"]["OperateRuleItem"];
|
||||
for (auto operateRuleResultNodeOperateRuleItemListOperateRuleItem : allOperateRuleItemListNode)
|
||||
{
|
||||
OperateRuleResult::OperateRuleItem operateRuleItemObject;
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].isNull())
|
||||
operateRuleItemObject.errorCode = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].asString();
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].isNull())
|
||||
operateRuleItemObject.success = operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].asString() == "true";
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].isNull())
|
||||
operateRuleItemObject.configRuleId = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].asString();
|
||||
operateRuleResult_.operateRuleItemList.push_back(operateRuleItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DetachAggregateConfigRuleToCompliancePackResult::OperateRuleResult DetachAggregateConfigRuleToCompliancePackResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
|
||||
45
config/src/model/DetachConfigRuleToCompliancePackRequest.cc
Normal file
45
config/src/model/DetachConfigRuleToCompliancePackRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DetachConfigRuleToCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DetachConfigRuleToCompliancePackRequest;
|
||||
|
||||
DetachConfigRuleToCompliancePackRequest::DetachConfigRuleToCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "DetachConfigRuleToCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DetachConfigRuleToCompliancePackRequest::~DetachConfigRuleToCompliancePackRequest() {}
|
||||
|
||||
std::string DetachConfigRuleToCompliancePackRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void DetachConfigRuleToCompliancePackRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string DetachConfigRuleToCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void DetachConfigRuleToCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
62
config/src/model/DetachConfigRuleToCompliancePackResult.cc
Normal file
62
config/src/model/DetachConfigRuleToCompliancePackResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/DetachConfigRuleToCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DetachConfigRuleToCompliancePackResult::DetachConfigRuleToCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetachConfigRuleToCompliancePackResult::DetachConfigRuleToCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetachConfigRuleToCompliancePackResult::~DetachConfigRuleToCompliancePackResult()
|
||||
{}
|
||||
|
||||
void DetachConfigRuleToCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto operateRuleResultNode = value["OperateRuleResult"];
|
||||
auto allOperateRuleItemListNode = operateRuleResultNode["OperateRuleItemList"]["OperateRuleItem"];
|
||||
for (auto operateRuleResultNodeOperateRuleItemListOperateRuleItem : allOperateRuleItemListNode)
|
||||
{
|
||||
OperateRuleResult::OperateRuleItem operateRuleItemObject;
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].isNull())
|
||||
operateRuleItemObject.errorCode = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ErrorCode"].asString();
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].isNull())
|
||||
operateRuleItemObject.success = operateRuleResultNodeOperateRuleItemListOperateRuleItem["Success"].asString() == "true";
|
||||
if(!operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].isNull())
|
||||
operateRuleItemObject.configRuleId = operateRuleResultNodeOperateRuleItemListOperateRuleItem["ConfigRuleId"].asString();
|
||||
operateRuleResult_.operateRuleItemList.push_back(operateRuleItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DetachConfigRuleToCompliancePackResult::OperateRuleResult DetachConfigRuleToCompliancePackResult::getOperateRuleResult()const
|
||||
{
|
||||
return operateRuleResult_;
|
||||
}
|
||||
|
||||
@@ -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/config/model/GenerateAggregateCompliancePackReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GenerateAggregateCompliancePackReportRequest;
|
||||
|
||||
GenerateAggregateCompliancePackReportRequest::GenerateAggregateCompliancePackReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GenerateAggregateCompliancePackReport") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenerateAggregateCompliancePackReportRequest::~GenerateAggregateCompliancePackReportRequest() {}
|
||||
|
||||
std::string GenerateAggregateCompliancePackReportRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void GenerateAggregateCompliancePackReportRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string GenerateAggregateCompliancePackReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GenerateAggregateCompliancePackReportRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setBodyParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GenerateAggregateCompliancePackReportRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GenerateAggregateCompliancePackReportRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setBodyParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -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/config/model/GenerateAggregateCompliancePackReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GenerateAggregateCompliancePackReportResult::GenerateAggregateCompliancePackReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateAggregateCompliancePackReportResult::GenerateAggregateCompliancePackReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateAggregateCompliancePackReportResult::~GenerateAggregateCompliancePackReportResult()
|
||||
{}
|
||||
|
||||
void GenerateAggregateCompliancePackReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CompliancePackId"].isNull())
|
||||
compliancePackId_ = value["CompliancePackId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateAggregateCompliancePackReportResult::getCompliancePackId()const
|
||||
{
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GenerateAggregateConfigRulesReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GenerateAggregateConfigRulesReportRequest;
|
||||
|
||||
GenerateAggregateConfigRulesReportRequest::GenerateAggregateConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GenerateAggregateConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenerateAggregateConfigRulesReportRequest::~GenerateAggregateConfigRulesReportRequest() {}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void GenerateAggregateConfigRulesReportRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GenerateAggregateConfigRulesReportRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setBodyParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
51
config/src/model/GenerateAggregateConfigRulesReportResult.cc
Normal file
51
config/src/model/GenerateAggregateConfigRulesReportResult.cc
Normal 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/config/model/GenerateAggregateConfigRulesReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GenerateAggregateConfigRulesReportResult::GenerateAggregateConfigRulesReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateAggregateConfigRulesReportResult::GenerateAggregateConfigRulesReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateAggregateConfigRulesReportResult::~GenerateAggregateConfigRulesReportResult()
|
||||
{}
|
||||
|
||||
void GenerateAggregateConfigRulesReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AggregatorId"].isNull())
|
||||
aggregatorId_ = value["AggregatorId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportResult::getAggregatorId()const
|
||||
{
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
45
config/src/model/GenerateCompliancePackReportRequest.cc
Normal file
45
config/src/model/GenerateCompliancePackReportRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GenerateCompliancePackReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GenerateCompliancePackReportRequest;
|
||||
|
||||
GenerateCompliancePackReportRequest::GenerateCompliancePackReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GenerateCompliancePackReport") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenerateCompliancePackReportRequest::~GenerateCompliancePackReportRequest() {}
|
||||
|
||||
std::string GenerateCompliancePackReportRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void GenerateCompliancePackReportRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string GenerateCompliancePackReportRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GenerateCompliancePackReportRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setBodyParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
51
config/src/model/GenerateCompliancePackReportResult.cc
Normal file
51
config/src/model/GenerateCompliancePackReportResult.cc
Normal 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/config/model/GenerateCompliancePackReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GenerateCompliancePackReportResult::GenerateCompliancePackReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateCompliancePackReportResult::GenerateCompliancePackReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateCompliancePackReportResult::~GenerateCompliancePackReportResult()
|
||||
{}
|
||||
|
||||
void GenerateCompliancePackReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CompliancePackId"].isNull())
|
||||
compliancePackId_ = value["CompliancePackId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateCompliancePackReportResult::getCompliancePackId()const
|
||||
{
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
@@ -14,23 +14,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DeleteConfigRulesRequest.h>
|
||||
#include <alibabacloud/config/model/GenerateConfigRulesReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DeleteConfigRulesRequest;
|
||||
using AlibabaCloud::Config::Model::GenerateConfigRulesReportRequest;
|
||||
|
||||
DeleteConfigRulesRequest::DeleteConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DeleteConfigRules") {
|
||||
GenerateConfigRulesReportRequest::GenerateConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GenerateConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteConfigRulesRequest::~DeleteConfigRulesRequest() {}
|
||||
GenerateConfigRulesReportRequest::~GenerateConfigRulesReportRequest() {}
|
||||
|
||||
std::string DeleteConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
std::string GenerateConfigRulesReportRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
void GenerateConfigRulesReportRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
@@ -14,38 +14,31 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/StartConfigRuleEvaluationResult.h>
|
||||
#include <alibabacloud/config/model/GenerateConfigRulesReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
StartConfigRuleEvaluationResult::StartConfigRuleEvaluationResult() :
|
||||
GenerateConfigRulesReportResult::GenerateConfigRulesReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StartConfigRuleEvaluationResult::StartConfigRuleEvaluationResult(const std::string &payload) :
|
||||
GenerateConfigRulesReportResult::GenerateConfigRulesReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StartConfigRuleEvaluationResult::~StartConfigRuleEvaluationResult()
|
||||
GenerateConfigRulesReportResult::~GenerateConfigRulesReportResult()
|
||||
{}
|
||||
|
||||
void StartConfigRuleEvaluationResult::parse(const std::string &payload)
|
||||
void GenerateConfigRulesReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Result"].isNull())
|
||||
result_ = value["Result"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool StartConfigRuleEvaluationResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateAccountComplianceByPackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateAccountComplianceByPackRequest;
|
||||
|
||||
GetAggregateAccountComplianceByPackRequest::GetAggregateAccountComplianceByPackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateAccountComplianceByPack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateAccountComplianceByPackRequest::~GetAggregateAccountComplianceByPackRequest() {}
|
||||
|
||||
std::string GetAggregateAccountComplianceByPackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateAccountComplianceByPackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateAccountComplianceByPackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetAggregateAccountComplianceByPackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateAccountComplianceByPackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateAccountComplianceByPackResult::GetAggregateAccountComplianceByPackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateAccountComplianceByPackResult::GetAggregateAccountComplianceByPackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateAccountComplianceByPackResult::~GetAggregateAccountComplianceByPackResult()
|
||||
{}
|
||||
|
||||
void GetAggregateAccountComplianceByPackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto accountComplianceResultNode = value["AccountComplianceResult"];
|
||||
if(!accountComplianceResultNode["CompliancePackId"].isNull())
|
||||
accountComplianceResult_.compliancePackId = accountComplianceResultNode["CompliancePackId"].asString();
|
||||
if(!accountComplianceResultNode["NonCompliantCount"].isNull())
|
||||
accountComplianceResult_.nonCompliantCount = std::stoi(accountComplianceResultNode["NonCompliantCount"].asString());
|
||||
if(!accountComplianceResultNode["TotalCount"].isNull())
|
||||
accountComplianceResult_.totalCount = std::stoi(accountComplianceResultNode["TotalCount"].asString());
|
||||
auto allAccountCompliancesNode = accountComplianceResultNode["AccountCompliances"]["AccountCompliancesItem"];
|
||||
for (auto accountComplianceResultNodeAccountCompliancesAccountCompliancesItem : allAccountCompliancesNode)
|
||||
{
|
||||
AccountComplianceResult::AccountCompliancesItem accountCompliancesItemObject;
|
||||
if(!accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["ComplianceType"].isNull())
|
||||
accountCompliancesItemObject.complianceType = accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["ComplianceType"].asString();
|
||||
if(!accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["AccountId"].isNull())
|
||||
accountCompliancesItemObject.accountId = std::stol(accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["AccountId"].asString());
|
||||
if(!accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["AccountName"].isNull())
|
||||
accountCompliancesItemObject.accountName = accountComplianceResultNodeAccountCompliancesAccountCompliancesItem["AccountName"].asString();
|
||||
accountComplianceResult_.accountCompliances.push_back(accountCompliancesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateAccountComplianceByPackResult::AccountComplianceResult GetAggregateAccountComplianceByPackResult::getAccountComplianceResult()const
|
||||
{
|
||||
return accountComplianceResult_;
|
||||
}
|
||||
|
||||
45
config/src/model/GetAggregateCompliancePackReportRequest.cc
Normal file
45
config/src/model/GetAggregateCompliancePackReportRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateCompliancePackReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateCompliancePackReportRequest;
|
||||
|
||||
GetAggregateCompliancePackReportRequest::GetAggregateCompliancePackReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateCompliancePackReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackReportRequest::~GetAggregateCompliancePackReportRequest() {}
|
||||
|
||||
std::string GetAggregateCompliancePackReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateCompliancePackReportRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateCompliancePackReportRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetAggregateCompliancePackReportRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
60
config/src/model/GetAggregateCompliancePackReportResult.cc
Normal file
60
config/src/model/GetAggregateCompliancePackReportResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateCompliancePackReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateCompliancePackReportResult::GetAggregateCompliancePackReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateCompliancePackReportResult::GetAggregateCompliancePackReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackReportResult::~GetAggregateCompliancePackReportResult()
|
||||
{}
|
||||
|
||||
void GetAggregateCompliancePackReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto compliancePackReportNode = value["CompliancePackReport"];
|
||||
if(!compliancePackReportNode["ReportUrl"].isNull())
|
||||
compliancePackReport_.reportUrl = compliancePackReportNode["ReportUrl"].asString();
|
||||
if(!compliancePackReportNode["ReportStatus"].isNull())
|
||||
compliancePackReport_.reportStatus = compliancePackReportNode["ReportStatus"].asString();
|
||||
if(!compliancePackReportNode["CompliancePackId"].isNull())
|
||||
compliancePackReport_.compliancePackId = compliancePackReportNode["CompliancePackId"].asString();
|
||||
if(!compliancePackReportNode["AccountId"].isNull())
|
||||
compliancePackReport_.accountId = std::stol(compliancePackReportNode["AccountId"].asString());
|
||||
if(!compliancePackReportNode["ReportCreateTimestamp"].isNull())
|
||||
compliancePackReport_.reportCreateTimestamp = std::stol(compliancePackReportNode["ReportCreateTimestamp"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackReportResult::CompliancePackReport GetAggregateCompliancePackReportResult::getCompliancePackReport()const
|
||||
{
|
||||
return compliancePackReport_;
|
||||
}
|
||||
|
||||
45
config/src/model/GetAggregateCompliancePackRequest.cc
Normal file
45
config/src/model/GetAggregateCompliancePackRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateCompliancePackRequest;
|
||||
|
||||
GetAggregateCompliancePackRequest::GetAggregateCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackRequest::~GetAggregateCompliancePackRequest() {}
|
||||
|
||||
std::string GetAggregateCompliancePackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateCompliancePackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetAggregateCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
96
config/src/model/GetAggregateCompliancePackResult.cc
Normal file
96
config/src/model/GetAggregateCompliancePackResult.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateCompliancePackResult::GetAggregateCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateCompliancePackResult::GetAggregateCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackResult::~GetAggregateCompliancePackResult()
|
||||
{}
|
||||
|
||||
void GetAggregateCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto compliancePackNode = value["CompliancePack"];
|
||||
if(!compliancePackNode["Status"].isNull())
|
||||
compliancePack_.status = compliancePackNode["Status"].asString();
|
||||
if(!compliancePackNode["RiskLevel"].isNull())
|
||||
compliancePack_.riskLevel = std::stoi(compliancePackNode["RiskLevel"].asString());
|
||||
if(!compliancePackNode["CompliancePackId"].isNull())
|
||||
compliancePack_.compliancePackId = compliancePackNode["CompliancePackId"].asString();
|
||||
if(!compliancePackNode["Description"].isNull())
|
||||
compliancePack_.description = compliancePackNode["Description"].asString();
|
||||
if(!compliancePackNode["CompliancePackName"].isNull())
|
||||
compliancePack_.compliancePackName = compliancePackNode["CompliancePackName"].asString();
|
||||
if(!compliancePackNode["AccountId"].isNull())
|
||||
compliancePack_.accountId = std::stol(compliancePackNode["AccountId"].asString());
|
||||
if(!compliancePackNode["AggregatorId"].isNull())
|
||||
compliancePack_.aggregatorId = compliancePackNode["AggregatorId"].asString();
|
||||
if(!compliancePackNode["CompliancePackTemplateId"].isNull())
|
||||
compliancePack_.compliancePackTemplateId = compliancePackNode["CompliancePackTemplateId"].asString();
|
||||
if(!compliancePackNode["CreateTimestamp"].isNull())
|
||||
compliancePack_.createTimestamp = std::stol(compliancePackNode["CreateTimestamp"].asString());
|
||||
auto allConfigRulesNode = compliancePackNode["ConfigRules"]["ConfigRulesItem"];
|
||||
for (auto compliancePackNodeConfigRulesConfigRulesItem : allConfigRulesNode)
|
||||
{
|
||||
CompliancePack::ConfigRulesItem configRulesItemObject;
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ManagedRuleIdentifier"].isNull())
|
||||
configRulesItemObject.managedRuleIdentifier = compliancePackNodeConfigRulesConfigRulesItem["ManagedRuleIdentifier"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleName"].isNull())
|
||||
configRulesItemObject.configRuleName = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleName"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleId"].isNull())
|
||||
configRulesItemObject.configRuleId = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleId"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["Description"].isNull())
|
||||
configRulesItemObject.description = compliancePackNodeConfigRulesConfigRulesItem["Description"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["RiskLevel"].isNull())
|
||||
configRulesItemObject.riskLevel = std::stoi(compliancePackNodeConfigRulesConfigRulesItem["RiskLevel"].asString());
|
||||
auto allConfigRuleParametersNode = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleParameters"]["ConfigRuleParametersItem"];
|
||||
for (auto compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem : allConfigRuleParametersNode)
|
||||
{
|
||||
CompliancePack::ConfigRulesItem::ConfigRuleParametersItem configRuleParametersObject;
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["Required"].isNull())
|
||||
configRuleParametersObject.required = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["Required"].asString() == "true";
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterName"].isNull())
|
||||
configRuleParametersObject.parameterName = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterName"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterValue"].isNull())
|
||||
configRuleParametersObject.parameterValue = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterValue"].asString();
|
||||
configRulesItemObject.configRuleParameters.push_back(configRuleParametersObject);
|
||||
}
|
||||
compliancePack_.configRules.push_back(configRulesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateCompliancePackResult::CompliancePack GetAggregateCompliancePackResult::getCompliancePack()const
|
||||
{
|
||||
return compliancePack_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateConfigRuleComplianceByPackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateConfigRuleComplianceByPackRequest;
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackRequest::GetAggregateConfigRuleComplianceByPackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateConfigRuleComplianceByPack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackRequest::~GetAggregateConfigRuleComplianceByPackRequest() {}
|
||||
|
||||
std::string GetAggregateConfigRuleComplianceByPackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRuleComplianceByPackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateConfigRuleComplianceByPackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRuleComplianceByPackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateConfigRuleComplianceByPackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackResult::GetAggregateConfigRuleComplianceByPackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackResult::GetAggregateConfigRuleComplianceByPackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackResult::~GetAggregateConfigRuleComplianceByPackResult()
|
||||
{}
|
||||
|
||||
void GetAggregateConfigRuleComplianceByPackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configRuleComplianceResultNode = value["ConfigRuleComplianceResult"];
|
||||
if(!configRuleComplianceResultNode["CompliancePackId"].isNull())
|
||||
configRuleComplianceResult_.compliancePackId = configRuleComplianceResultNode["CompliancePackId"].asString();
|
||||
if(!configRuleComplianceResultNode["NonCompliantCount"].isNull())
|
||||
configRuleComplianceResult_.nonCompliantCount = std::stoi(configRuleComplianceResultNode["NonCompliantCount"].asString());
|
||||
if(!configRuleComplianceResultNode["TotalCount"].isNull())
|
||||
configRuleComplianceResult_.totalCount = std::stoi(configRuleComplianceResultNode["TotalCount"].asString());
|
||||
auto allConfigRuleCompliancesNode = configRuleComplianceResultNode["ConfigRuleCompliances"]["ConfigRuleCompliancesItem"];
|
||||
for (auto configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem : allConfigRuleCompliancesNode)
|
||||
{
|
||||
ConfigRuleComplianceResult::ConfigRuleCompliancesItem configRuleCompliancesItemObject;
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ComplianceType"].isNull())
|
||||
configRuleCompliancesItemObject.complianceType = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ComplianceType"].asString();
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleName"].isNull())
|
||||
configRuleCompliancesItemObject.configRuleName = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleName"].asString();
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleId"].isNull())
|
||||
configRuleCompliancesItemObject.configRuleId = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleId"].asString();
|
||||
configRuleComplianceResult_.configRuleCompliances.push_back(configRuleCompliancesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleComplianceByPackResult::ConfigRuleComplianceResult GetAggregateConfigRuleComplianceByPackResult::getConfigRuleComplianceResult()const
|
||||
{
|
||||
return configRuleComplianceResult_;
|
||||
}
|
||||
|
||||
45
config/src/model/GetAggregateConfigRuleRequest.cc
Normal file
45
config/src/model/GetAggregateConfigRuleRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateConfigRuleRequest;
|
||||
|
||||
GetAggregateConfigRuleRequest::GetAggregateConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateConfigRule") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleRequest::~GetAggregateConfigRuleRequest() {}
|
||||
|
||||
std::string GetAggregateConfigRuleRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRuleRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
std::string GetAggregateConfigRuleRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRuleRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DescribeConfigRuleResult.h>
|
||||
#include <alibabacloud/config/model/GetAggregateConfigRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
DescribeConfigRuleResult::DescribeConfigRuleResult() :
|
||||
GetAggregateConfigRuleResult::GetAggregateConfigRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeConfigRuleResult::DescribeConfigRuleResult(const std::string &payload) :
|
||||
GetAggregateConfigRuleResult::GetAggregateConfigRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeConfigRuleResult::~DescribeConfigRuleResult()
|
||||
GetAggregateConfigRuleResult::~GetAggregateConfigRuleResult()
|
||||
{}
|
||||
|
||||
void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
void GetAggregateConfigRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -48,8 +48,6 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
configRule_.configRuleState = configRuleNode["ConfigRuleState"].asString();
|
||||
if(!configRuleNode["MaximumExecutionFrequency"].isNull())
|
||||
configRule_.maximumExecutionFrequency = configRuleNode["MaximumExecutionFrequency"].asString();
|
||||
if(!configRuleNode["OrganizationRule"].isNull())
|
||||
configRule_.organizationRule = configRuleNode["OrganizationRule"].asString() == "true";
|
||||
if(!configRuleNode["ConfigRuleArn"].isNull())
|
||||
configRule_.configRuleArn = configRuleNode["ConfigRuleArn"].asString();
|
||||
if(!configRuleNode["Description"].isNull())
|
||||
@@ -62,6 +60,20 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
configRule_.modifiedTimestamp = std::stol(configRuleNode["ModifiedTimestamp"].asString());
|
||||
if(!configRuleNode["CreateTimestamp"].isNull())
|
||||
configRule_.createTimestamp = std::stol(configRuleNode["CreateTimestamp"].asString());
|
||||
if(!configRuleNode["ResourceTypesScope"].isNull())
|
||||
configRule_.resourceTypesScope = configRuleNode["ResourceTypesScope"].asString();
|
||||
if(!configRuleNode["RegionIdsScope"].isNull())
|
||||
configRule_.regionIdsScope = configRuleNode["RegionIdsScope"].asString();
|
||||
if(!configRuleNode["ExcludeResourceIdsScope"].isNull())
|
||||
configRule_.excludeResourceIdsScope = configRuleNode["ExcludeResourceIdsScope"].asString();
|
||||
if(!configRuleNode["ResourceGroupIdsScope"].isNull())
|
||||
configRule_.resourceGroupIdsScope = configRuleNode["ResourceGroupIdsScope"].asString();
|
||||
if(!configRuleNode["TagKeyScope"].isNull())
|
||||
configRule_.tagKeyScope = configRuleNode["TagKeyScope"].asString();
|
||||
if(!configRuleNode["TagValueScope"].isNull())
|
||||
configRule_.tagValueScope = configRuleNode["TagValueScope"].asString();
|
||||
if(!configRuleNode["ConfigRuleTriggerTypes"].isNull())
|
||||
configRule_.configRuleTriggerTypes = configRuleNode["ConfigRuleTriggerTypes"].asString();
|
||||
auto sourceNode = configRuleNode["Source"];
|
||||
if(!sourceNode["Owner"].isNull())
|
||||
configRule_.source.owner = sourceNode["Owner"].asString();
|
||||
@@ -79,24 +91,9 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
sourceDetailsItemObject.maximumExecutionFrequency = sourceNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].asString();
|
||||
configRule_.source.sourceDetails.push_back(sourceDetailsItemObject);
|
||||
}
|
||||
auto allSourceConditionsNode = sourceNode["SourceConditions"]["SourceConditionsItem"];
|
||||
for (auto sourceNodeSourceConditionsSourceConditionsItem : allSourceConditionsNode)
|
||||
{
|
||||
ConfigRule::Source::SourceConditionsItem sourceConditionsItemObject;
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["DesiredValue"].isNull())
|
||||
sourceConditionsItemObject.desiredValue = sourceNodeSourceConditionsSourceConditionsItem["DesiredValue"].asString();
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["Required"].isNull())
|
||||
sourceConditionsItemObject.required = sourceNodeSourceConditionsSourceConditionsItem["Required"].asString() == "true";
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["Tips"].isNull())
|
||||
sourceConditionsItemObject.tips = sourceNodeSourceConditionsSourceConditionsItem["Tips"].asString();
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["Operator"].isNull())
|
||||
sourceConditionsItemObject._operator = sourceNodeSourceConditionsSourceConditionsItem["Operator"].asString();
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["Name"].isNull())
|
||||
sourceConditionsItemObject.name = sourceNodeSourceConditionsSourceConditionsItem["Name"].asString();
|
||||
if(!sourceNodeSourceConditionsSourceConditionsItem["SelectPath"].isNull())
|
||||
sourceConditionsItemObject.selectPath = sourceNodeSourceConditionsSourceConditionsItem["SelectPath"].asString();
|
||||
configRule_.source.sourceConditions.push_back(sourceConditionsItemObject);
|
||||
}
|
||||
auto allSourceConditions = sourceNode["SourceConditions"]["SourceConditions"];
|
||||
for (auto value : allSourceConditions)
|
||||
configRule_.source.sourceConditions.push_back(value.asString());
|
||||
auto managedRuleNode = configRuleNode["ManagedRule"];
|
||||
if(!managedRuleNode["HelpUrl"].isNull())
|
||||
configRule_.managedRule.helpUrl = managedRuleNode["HelpUrl"].asString();
|
||||
@@ -126,22 +123,20 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
for (auto value : allLabels)
|
||||
configRule_.managedRule.labels.push_back(value.asString());
|
||||
auto createByNode = configRuleNode["CreateBy"];
|
||||
if(!createByNode["ConfigRuleSceneId"].isNull())
|
||||
configRule_.createBy.configRuleSceneId = createByNode["ConfigRuleSceneId"].asString();
|
||||
if(!createByNode["CompliancePackId"].isNull())
|
||||
configRule_.createBy.compliancePackId = createByNode["CompliancePackId"].asString();
|
||||
if(!createByNode["AggregatorName"].isNull())
|
||||
configRule_.createBy.aggregatorName = createByNode["AggregatorName"].asString();
|
||||
if(!createByNode["CompliancePackName"].isNull())
|
||||
configRule_.createBy.compliancePackName = createByNode["CompliancePackName"].asString();
|
||||
if(!createByNode["CreatorName"].isNull())
|
||||
configRule_.createBy.creatorName = createByNode["CreatorName"].asString();
|
||||
if(!createByNode["CreatorType"].isNull())
|
||||
configRule_.createBy.creatorType = createByNode["CreatorType"].asString();
|
||||
if(!createByNode["CreatorId"].isNull())
|
||||
configRule_.createBy.creatorId = createByNode["CreatorId"].asString();
|
||||
if(!createByNode["ConfigRuleSceneName"].isNull())
|
||||
configRule_.createBy.configRuleSceneName = createByNode["ConfigRuleSceneName"].asString();
|
||||
auto scopeNode = configRuleNode["Scope"];
|
||||
if(!scopeNode["ComplianceResourceId"].isNull())
|
||||
configRule_.scope.complianceResourceId = scopeNode["ComplianceResourceId"].asString();
|
||||
auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"];
|
||||
for (auto value : allComplianceResourceTypes)
|
||||
configRule_.scope.complianceResourceTypes.push_back(value.asString());
|
||||
if(!createByNode["AggregatorId"].isNull())
|
||||
configRule_.createBy.aggregatorId = createByNode["AggregatorId"].asString();
|
||||
auto configRuleEvaluationStatusNode = configRuleNode["ConfigRuleEvaluationStatus"];
|
||||
if(!configRuleEvaluationStatusNode["LastErrorCode"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastErrorCode = configRuleEvaluationStatusNode["LastErrorCode"].asString();
|
||||
@@ -159,10 +154,14 @@ void DescribeConfigRuleResult::parse(const std::string &payload)
|
||||
configRule_.configRuleEvaluationStatus.lastFailedEvaluationTimestamp = std::stol(configRuleEvaluationStatusNode["LastFailedEvaluationTimestamp"].asString());
|
||||
if(!configRuleEvaluationStatusNode["LastFailedInvocationTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastFailedInvocationTimestamp = std::stol(configRuleEvaluationStatusNode["LastFailedInvocationTimestamp"].asString());
|
||||
auto scopeNode = configRuleNode["Scope"];
|
||||
auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"];
|
||||
for (auto value : allComplianceResourceTypes)
|
||||
configRule_.scope.complianceResourceTypes.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeConfigRuleResult::ConfigRule DescribeConfigRuleResult::getConfigRule()const
|
||||
GetAggregateConfigRuleResult::ConfigRule GetAggregateConfigRuleResult::getConfigRule()const
|
||||
{
|
||||
return configRule_;
|
||||
}
|
||||
@@ -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/config/model/GetAggregateConfigRuleSummaryByRiskLevelRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateConfigRuleSummaryByRiskLevelRequest;
|
||||
|
||||
GetAggregateConfigRuleSummaryByRiskLevelRequest::GetAggregateConfigRuleSummaryByRiskLevelRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateConfigRuleSummaryByRiskLevel") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleSummaryByRiskLevelRequest::~GetAggregateConfigRuleSummaryByRiskLevelRequest() {}
|
||||
|
||||
std::string GetAggregateConfigRuleSummaryByRiskLevelRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRuleSummaryByRiskLevelRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateConfigRuleSummaryByRiskLevelResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateConfigRuleSummaryByRiskLevelResult::GetAggregateConfigRuleSummaryByRiskLevelResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateConfigRuleSummaryByRiskLevelResult::GetAggregateConfigRuleSummaryByRiskLevelResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateConfigRuleSummaryByRiskLevelResult::~GetAggregateConfigRuleSummaryByRiskLevelResult()
|
||||
{}
|
||||
|
||||
void GetAggregateConfigRuleSummaryByRiskLevelResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allConfigRuleSummariesNode = value["ConfigRuleSummaries"]["Data"];
|
||||
for (auto valueConfigRuleSummariesData : allConfigRuleSummariesNode)
|
||||
{
|
||||
Data configRuleSummariesObject;
|
||||
if(!valueConfigRuleSummariesData["RiskLevel"].isNull())
|
||||
configRuleSummariesObject.riskLevel = std::stoi(valueConfigRuleSummariesData["RiskLevel"].asString());
|
||||
if(!valueConfigRuleSummariesData["CompliantCount"].isNull())
|
||||
configRuleSummariesObject.compliantCount = std::stoi(valueConfigRuleSummariesData["CompliantCount"].asString());
|
||||
if(!valueConfigRuleSummariesData["NonCompliantCount"].isNull())
|
||||
configRuleSummariesObject.nonCompliantCount = std::stoi(valueConfigRuleSummariesData["NonCompliantCount"].asString());
|
||||
configRuleSummaries_.push_back(configRuleSummariesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetAggregateConfigRuleSummaryByRiskLevelResult::Data> GetAggregateConfigRuleSummaryByRiskLevelResult::getConfigRuleSummaries()const
|
||||
{
|
||||
return configRuleSummaries_;
|
||||
}
|
||||
|
||||
36
config/src/model/GetAggregateConfigRulesReportRequest.cc
Normal file
36
config/src/model/GetAggregateConfigRulesReportRequest.cc
Normal 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/config/model/GetAggregateConfigRulesReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateConfigRulesReportRequest;
|
||||
|
||||
GetAggregateConfigRulesReportRequest::GetAggregateConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateConfigRulesReportRequest::~GetAggregateConfigRulesReportRequest() {}
|
||||
|
||||
std::string GetAggregateConfigRulesReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRulesReportRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
60
config/src/model/GetAggregateConfigRulesReportResult.cc
Normal file
60
config/src/model/GetAggregateConfigRulesReportResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateConfigRulesReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateConfigRulesReportResult::GetAggregateConfigRulesReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateConfigRulesReportResult::GetAggregateConfigRulesReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateConfigRulesReportResult::~GetAggregateConfigRulesReportResult()
|
||||
{}
|
||||
|
||||
void GetAggregateConfigRulesReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configRulesReportNode = value["ConfigRulesReport"];
|
||||
if(!configRulesReportNode["ReportUrl"].isNull())
|
||||
configRulesReport_.reportUrl = configRulesReportNode["ReportUrl"].asString();
|
||||
if(!configRulesReportNode["ReportStatus"].isNull())
|
||||
configRulesReport_.reportStatus = configRulesReportNode["ReportStatus"].asString();
|
||||
if(!configRulesReportNode["AccountId"].isNull())
|
||||
configRulesReport_.accountId = std::stol(configRulesReportNode["AccountId"].asString());
|
||||
if(!configRulesReportNode["AggregatorId"].isNull())
|
||||
configRulesReport_.aggregatorId = configRulesReportNode["AggregatorId"].asString();
|
||||
if(!configRulesReportNode["ReportCreateTimestamp"].isNull())
|
||||
configRulesReport_.reportCreateTimestamp = std::stol(configRulesReportNode["ReportCreateTimestamp"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetAggregateConfigRulesReportResult::ConfigRulesReport GetAggregateConfigRulesReportResult::getConfigRulesReport()const
|
||||
{
|
||||
return configRulesReport_;
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateDiscoveredResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateDiscoveredResourceRequest;
|
||||
|
||||
GetAggregateDiscoveredResourceRequest::GetAggregateDiscoveredResourceRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "GetAggregateDiscoveredResource") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateDiscoveredResourceRequest::~GetAggregateDiscoveredResourceRequest() {}
|
||||
|
||||
std::string GetAggregateDiscoveredResourceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void GetAggregateDiscoveredResourceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
long GetAggregateDiscoveredResourceRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetAggregateDiscoveredResourceRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetAggregateDiscoveredResourceRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateDiscoveredResourceRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateDiscoveredResourceRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void GetAggregateDiscoveredResourceRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string GetAggregateDiscoveredResourceRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void GetAggregateDiscoveredResourceRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateDiscoveredResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateDiscoveredResourceResult::GetAggregateDiscoveredResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateDiscoveredResourceResult::GetAggregateDiscoveredResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateDiscoveredResourceResult::~GetAggregateDiscoveredResourceResult()
|
||||
{}
|
||||
|
||||
void GetAggregateDiscoveredResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto discoveredResourceDetailNode = value["DiscoveredResourceDetail"];
|
||||
if(!discoveredResourceDetailNode["AvailabilityZone"].isNull())
|
||||
discoveredResourceDetail_.availabilityZone = discoveredResourceDetailNode["AvailabilityZone"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceType"].isNull())
|
||||
discoveredResourceDetail_.resourceType = discoveredResourceDetailNode["ResourceType"].asString();
|
||||
if(!discoveredResourceDetailNode["Configuration"].isNull())
|
||||
discoveredResourceDetail_.configuration = discoveredResourceDetailNode["Configuration"].asString();
|
||||
if(!discoveredResourceDetailNode["Region"].isNull())
|
||||
discoveredResourceDetail_.region = discoveredResourceDetailNode["Region"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceCreationTime"].isNull())
|
||||
discoveredResourceDetail_.resourceCreationTime = std::stol(discoveredResourceDetailNode["ResourceCreationTime"].asString());
|
||||
if(!discoveredResourceDetailNode["Tags"].isNull())
|
||||
discoveredResourceDetail_.tags = discoveredResourceDetailNode["Tags"].asString();
|
||||
if(!discoveredResourceDetailNode["AccountId"].isNull())
|
||||
discoveredResourceDetail_.accountId = std::stol(discoveredResourceDetailNode["AccountId"].asString());
|
||||
if(!discoveredResourceDetailNode["ResourceId"].isNull())
|
||||
discoveredResourceDetail_.resourceId = discoveredResourceDetailNode["ResourceId"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceDeleted"].isNull())
|
||||
discoveredResourceDetail_.resourceDeleted = std::stoi(discoveredResourceDetailNode["ResourceDeleted"].asString());
|
||||
if(!discoveredResourceDetailNode["ResourceName"].isNull())
|
||||
discoveredResourceDetail_.resourceName = discoveredResourceDetailNode["ResourceName"].asString();
|
||||
if(!discoveredResourceDetailNode["ResourceStatus"].isNull())
|
||||
discoveredResourceDetail_.resourceStatus = discoveredResourceDetailNode["ResourceStatus"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetAggregateDiscoveredResourceResult::DiscoveredResourceDetail GetAggregateDiscoveredResourceResult::getDiscoveredResourceDetail()const
|
||||
{
|
||||
return discoveredResourceDetail_;
|
||||
}
|
||||
|
||||
@@ -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/config/model/GetAggregateResourceComplianceByConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceComplianceByConfigRuleRequest;
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleRequest::GetAggregateResourceComplianceByConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceByConfigRule") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleRequest::~GetAggregateResourceComplianceByConfigRuleRequest() {}
|
||||
|
||||
std::string GetAggregateResourceComplianceByConfigRuleRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceByConfigRuleRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceByConfigRuleRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceByConfigRuleRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceByConfigRuleRequest::getComplianceType() const {
|
||||
return complianceType_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceByConfigRuleRequest::setComplianceType(const std::string &complianceType) {
|
||||
complianceType_ = complianceType;
|
||||
setParameter(std::string("ComplianceType"), complianceType);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceComplianceByConfigRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleResult::GetAggregateResourceComplianceByConfigRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleResult::GetAggregateResourceComplianceByConfigRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleResult::~GetAggregateResourceComplianceByConfigRuleResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceComplianceByConfigRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceResultNode = value["ComplianceResult"];
|
||||
if(!complianceResultNode["TotalCount"].isNull())
|
||||
complianceResult_.totalCount = std::stol(complianceResultNode["TotalCount"].asString());
|
||||
auto allCompliancesNode = complianceResultNode["Compliances"]["CompliancesItem"];
|
||||
for (auto complianceResultNodeCompliancesCompliancesItem : allCompliancesNode)
|
||||
{
|
||||
ComplianceResult::CompliancesItem compliancesItemObject;
|
||||
if(!complianceResultNodeCompliancesCompliancesItem["ComplianceType"].isNull())
|
||||
compliancesItemObject.complianceType = complianceResultNodeCompliancesCompliancesItem["ComplianceType"].asString();
|
||||
if(!complianceResultNodeCompliancesCompliancesItem["Count"].isNull())
|
||||
compliancesItemObject.count = std::stoi(complianceResultNodeCompliancesCompliancesItem["Count"].asString());
|
||||
complianceResult_.compliances.push_back(compliancesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleResult::ComplianceResult GetAggregateResourceComplianceByConfigRuleResult::getComplianceResult()const
|
||||
{
|
||||
return complianceResult_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetAggregateResourceComplianceByPackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceComplianceByPackRequest;
|
||||
|
||||
GetAggregateResourceComplianceByPackRequest::GetAggregateResourceComplianceByPackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceByPack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByPackRequest::~GetAggregateResourceComplianceByPackRequest() {}
|
||||
|
||||
std::string GetAggregateResourceComplianceByPackRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceByPackRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceByPackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceByPackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceComplianceByPackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceComplianceByPackResult::GetAggregateResourceComplianceByPackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceComplianceByPackResult::GetAggregateResourceComplianceByPackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByPackResult::~GetAggregateResourceComplianceByPackResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceComplianceByPackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resourceComplianceResultNode = value["ResourceComplianceResult"];
|
||||
if(!resourceComplianceResultNode["CompliancePackId"].isNull())
|
||||
resourceComplianceResult_.compliancePackId = resourceComplianceResultNode["CompliancePackId"].asString();
|
||||
if(!resourceComplianceResultNode["NonCompliantCount"].isNull())
|
||||
resourceComplianceResult_.nonCompliantCount = std::stoi(resourceComplianceResultNode["NonCompliantCount"].asString());
|
||||
if(!resourceComplianceResultNode["TotalCount"].isNull())
|
||||
resourceComplianceResult_.totalCount = std::stoi(resourceComplianceResultNode["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByPackResult::ResourceComplianceResult GetAggregateResourceComplianceByPackResult::getResourceComplianceResult()const
|
||||
{
|
||||
return resourceComplianceResult_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceComplianceTimelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceComplianceTimelineRequest;
|
||||
|
||||
GetAggregateResourceComplianceTimelineRequest::GetAggregateResourceComplianceTimelineRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceTimeline") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceTimelineRequest::~GetAggregateResourceComplianceTimelineRequest() {}
|
||||
|
||||
long GetAggregateResourceComplianceTimelineRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceTimelineRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
long GetAggregateResourceComplianceTimelineRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setStartTime(long startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceTimelineRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceTimelineRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
long GetAggregateResourceComplianceTimelineRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setEndTime(long endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceTimelineRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
int GetAggregateResourceComplianceTimelineRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceTimelineRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceComplianceTimelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceComplianceTimelineResult::GetAggregateResourceComplianceTimelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceComplianceTimelineResult::GetAggregateResourceComplianceTimelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceTimelineResult::~GetAggregateResourceComplianceTimelineResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceComplianceTimelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resourceComplianceTimelineNode = value["ResourceComplianceTimeline"];
|
||||
if(!resourceComplianceTimelineNode["NextToken"].isNull())
|
||||
resourceComplianceTimeline_.nextToken = resourceComplianceTimelineNode["NextToken"].asString();
|
||||
if(!resourceComplianceTimelineNode["MaxResults"].isNull())
|
||||
resourceComplianceTimeline_.maxResults = std::stoi(resourceComplianceTimelineNode["MaxResults"].asString());
|
||||
auto allComplianceListNode = resourceComplianceTimelineNode["ComplianceList"]["ComplianceListItem"];
|
||||
for (auto resourceComplianceTimelineNodeComplianceListComplianceListItem : allComplianceListNode)
|
||||
{
|
||||
ResourceComplianceTimeline::ComplianceListItem complianceListItemObject;
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["Tags"].isNull())
|
||||
complianceListItemObject.tags = resourceComplianceTimelineNodeComplianceListComplianceListItem["Tags"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["AccountId"].isNull())
|
||||
complianceListItemObject.accountId = resourceComplianceTimelineNodeComplianceListComplianceListItem["AccountId"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["AvailabilityZone"].isNull())
|
||||
complianceListItemObject.availabilityZone = resourceComplianceTimelineNodeComplianceListComplianceListItem["AvailabilityZone"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceType"].isNull())
|
||||
complianceListItemObject.resourceType = resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceType"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceCreateTime"].isNull())
|
||||
complianceListItemObject.resourceCreateTime = std::stol(resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceCreateTime"].asString());
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["Region"].isNull())
|
||||
complianceListItemObject.region = resourceComplianceTimelineNodeComplianceListComplianceListItem["Region"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["Configuration"].isNull())
|
||||
complianceListItemObject.configuration = resourceComplianceTimelineNodeComplianceListComplianceListItem["Configuration"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["CaptureTime"].isNull())
|
||||
complianceListItemObject.captureTime = std::stol(resourceComplianceTimelineNodeComplianceListComplianceListItem["CaptureTime"].asString());
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ConfigurationDiff"].isNull())
|
||||
complianceListItemObject.configurationDiff = resourceComplianceTimelineNodeComplianceListComplianceListItem["ConfigurationDiff"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceId"].isNull())
|
||||
complianceListItemObject.resourceId = resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceId"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceName"].isNull())
|
||||
complianceListItemObject.resourceName = resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceName"].asString();
|
||||
if(!resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceStatus"].isNull())
|
||||
complianceListItemObject.resourceStatus = resourceComplianceTimelineNodeComplianceListComplianceListItem["ResourceStatus"].asString();
|
||||
resourceComplianceTimeline_.complianceList.push_back(complianceListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceTimelineResult::ResourceComplianceTimeline GetAggregateResourceComplianceTimelineResult::getResourceComplianceTimeline()const
|
||||
{
|
||||
return resourceComplianceTimeline_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceConfigurationTimelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceConfigurationTimelineRequest;
|
||||
|
||||
GetAggregateResourceConfigurationTimelineRequest::GetAggregateResourceConfigurationTimelineRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceConfigurationTimeline") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceConfigurationTimelineRequest::~GetAggregateResourceConfigurationTimelineRequest() {}
|
||||
|
||||
long GetAggregateResourceConfigurationTimelineRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceConfigurationTimelineRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
long GetAggregateResourceConfigurationTimelineRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setStartTime(long startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceConfigurationTimelineRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceConfigurationTimelineRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
long GetAggregateResourceConfigurationTimelineRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setEndTime(long endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceConfigurationTimelineRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
int GetAggregateResourceConfigurationTimelineRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceConfigurationTimelineRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceConfigurationTimelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceConfigurationTimelineResult::GetAggregateResourceConfigurationTimelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceConfigurationTimelineResult::GetAggregateResourceConfigurationTimelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceConfigurationTimelineResult::~GetAggregateResourceConfigurationTimelineResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceConfigurationTimelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resourceConfigurationTimelineNode = value["ResourceConfigurationTimeline"];
|
||||
if(!resourceConfigurationTimelineNode["NextToken"].isNull())
|
||||
resourceConfigurationTimeline_.nextToken = resourceConfigurationTimelineNode["NextToken"].asString();
|
||||
if(!resourceConfigurationTimelineNode["MaxResults"].isNull())
|
||||
resourceConfigurationTimeline_.maxResults = std::stoi(resourceConfigurationTimelineNode["MaxResults"].asString());
|
||||
auto allConfigurationListNode = resourceConfigurationTimelineNode["ConfigurationList"]["ConfigurationListItem"];
|
||||
for (auto resourceConfigurationTimelineNodeConfigurationListConfigurationListItem : allConfigurationListNode)
|
||||
{
|
||||
ResourceConfigurationTimeline::ConfigurationListItem configurationListItemObject;
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Relationship"].isNull())
|
||||
configurationListItemObject.relationship = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Relationship"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Tags"].isNull())
|
||||
configurationListItemObject.tags = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Tags"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["AccountId"].isNull())
|
||||
configurationListItemObject.accountId = std::stol(resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["AccountId"].asString());
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceEventType"].isNull())
|
||||
configurationListItemObject.resourceEventType = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceEventType"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["RelationshipDiff"].isNull())
|
||||
configurationListItemObject.relationshipDiff = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["RelationshipDiff"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["AvailabilityZone"].isNull())
|
||||
configurationListItemObject.availabilityZone = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["AvailabilityZone"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceType"].isNull())
|
||||
configurationListItemObject.resourceType = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceType"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceCreateTime"].isNull())
|
||||
configurationListItemObject.resourceCreateTime = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceCreateTime"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Region"].isNull())
|
||||
configurationListItemObject.region = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["Region"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["CaptureTime"].isNull())
|
||||
configurationListItemObject.captureTime = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["CaptureTime"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ConfigurationDiff"].isNull())
|
||||
configurationListItemObject.configurationDiff = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ConfigurationDiff"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceId"].isNull())
|
||||
configurationListItemObject.resourceId = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceId"].asString();
|
||||
if(!resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceName"].isNull())
|
||||
configurationListItemObject.resourceName = resourceConfigurationTimelineNodeConfigurationListConfigurationListItem["ResourceName"].asString();
|
||||
resourceConfigurationTimeline_.configurationList.push_back(configurationListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceConfigurationTimelineResult::ResourceConfigurationTimeline GetAggregateResourceConfigurationTimelineResult::getResourceConfigurationTimeline()const
|
||||
{
|
||||
return resourceConfigurationTimeline_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceCountsGroupByRegionRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceCountsGroupByRegionRequest;
|
||||
|
||||
GetAggregateResourceCountsGroupByRegionRequest::GetAggregateResourceCountsGroupByRegionRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceCountsGroupByRegion") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceCountsGroupByRegionRequest::~GetAggregateResourceCountsGroupByRegionRequest() {}
|
||||
|
||||
long GetAggregateResourceCountsGroupByRegionRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByRegionRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByRegionRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByRegionRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByRegionRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByRegionRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByRegionRequest::getFolderId() const {
|
||||
return folderId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByRegionRequest::setFolderId(const std::string &folderId) {
|
||||
folderId_ = folderId;
|
||||
setParameter(std::string("FolderId"), folderId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceCountsGroupByRegionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceCountsGroupByRegionResult::GetAggregateResourceCountsGroupByRegionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceCountsGroupByRegionResult::GetAggregateResourceCountsGroupByRegionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceCountsGroupByRegionResult::~GetAggregateResourceCountsGroupByRegionResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceCountsGroupByRegionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDiscoveredResourceCountsSummaryNode = value["DiscoveredResourceCountsSummary"]["GroupedResourceCount"];
|
||||
for (auto valueDiscoveredResourceCountsSummaryGroupedResourceCount : allDiscoveredResourceCountsSummaryNode)
|
||||
{
|
||||
GroupedResourceCount discoveredResourceCountsSummaryObject;
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceCount = std::stol(valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].asString());
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].isNull())
|
||||
discoveredResourceCountsSummaryObject.groupName = valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].asString();
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["Region"].isNull())
|
||||
discoveredResourceCountsSummaryObject.region = valueDiscoveredResourceCountsSummaryGroupedResourceCount["Region"].asString();
|
||||
discoveredResourceCountsSummary_.push_back(discoveredResourceCountsSummaryObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetAggregateResourceCountsGroupByRegionResult::GroupedResourceCount> GetAggregateResourceCountsGroupByRegionResult::getDiscoveredResourceCountsSummary()const
|
||||
{
|
||||
return discoveredResourceCountsSummary_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceCountsGroupByResourceTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceCountsGroupByResourceTypeRequest;
|
||||
|
||||
GetAggregateResourceCountsGroupByResourceTypeRequest::GetAggregateResourceCountsGroupByResourceTypeRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceCountsGroupByResourceType") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregateResourceCountsGroupByResourceTypeRequest::~GetAggregateResourceCountsGroupByResourceTypeRequest() {}
|
||||
|
||||
long GetAggregateResourceCountsGroupByResourceTypeRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByResourceTypeRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByResourceTypeRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByResourceTypeRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByResourceTypeRequest::getFolderId() const {
|
||||
return folderId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByResourceTypeRequest::setFolderId(const std::string &folderId) {
|
||||
folderId_ = folderId;
|
||||
setParameter(std::string("FolderId"), folderId);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceCountsGroupByResourceTypeRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceCountsGroupByResourceTypeRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregateResourceCountsGroupByResourceTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceCountsGroupByResourceTypeResult::GetAggregateResourceCountsGroupByResourceTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceCountsGroupByResourceTypeResult::GetAggregateResourceCountsGroupByResourceTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceCountsGroupByResourceTypeResult::~GetAggregateResourceCountsGroupByResourceTypeResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceCountsGroupByResourceTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDiscoveredResourceCountsSummaryNode = value["DiscoveredResourceCountsSummary"]["GroupedResourceCount"];
|
||||
for (auto valueDiscoveredResourceCountsSummaryGroupedResourceCount : allDiscoveredResourceCountsSummaryNode)
|
||||
{
|
||||
GroupedResourceCount discoveredResourceCountsSummaryObject;
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceCount = std::stol(valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].asString());
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].isNull())
|
||||
discoveredResourceCountsSummaryObject.groupName = valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].asString();
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceType"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceType = valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceType"].asString();
|
||||
discoveredResourceCountsSummary_.push_back(discoveredResourceCountsSummaryObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetAggregateResourceCountsGroupByResourceTypeResult::GroupedResourceCount> GetAggregateResourceCountsGroupByResourceTypeResult::getDiscoveredResourceCountsSummary()const
|
||||
{
|
||||
return discoveredResourceCountsSummary_;
|
||||
}
|
||||
|
||||
36
config/src/model/GetAggregatorRequest.cc
Normal file
36
config/src/model/GetAggregatorRequest.cc
Normal 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/config/model/GetAggregatorRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregatorRequest;
|
||||
|
||||
GetAggregatorRequest::GetAggregatorRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregator") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAggregatorRequest::~GetAggregatorRequest() {}
|
||||
|
||||
std::string GetAggregatorRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregatorRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
80
config/src/model/GetAggregatorResult.cc
Normal file
80
config/src/model/GetAggregatorResult.cc
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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/config/model/GetAggregatorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregatorResult::GetAggregatorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregatorResult::GetAggregatorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregatorResult::~GetAggregatorResult()
|
||||
{}
|
||||
|
||||
void GetAggregatorResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto aggregatorNode = value["Aggregator"];
|
||||
if(!aggregatorNode["AggregatorCreateTimestamp"].isNull())
|
||||
aggregator_.aggregatorCreateTimestamp = aggregatorNode["AggregatorCreateTimestamp"].asString();
|
||||
if(!aggregatorNode["AggregatorAccountCount"].isNull())
|
||||
aggregator_.aggregatorAccountCount = std::stol(aggregatorNode["AggregatorAccountCount"].asString());
|
||||
if(!aggregatorNode["Description"].isNull())
|
||||
aggregator_.description = aggregatorNode["Description"].asString();
|
||||
if(!aggregatorNode["AggregatorName"].isNull())
|
||||
aggregator_.aggregatorName = aggregatorNode["AggregatorName"].asString();
|
||||
if(!aggregatorNode["AggregatorStatus"].isNull())
|
||||
aggregator_.aggregatorStatus = std::stoi(aggregatorNode["AggregatorStatus"].asString());
|
||||
if(!aggregatorNode["AggregatorType"].isNull())
|
||||
aggregator_.aggregatorType = aggregatorNode["AggregatorType"].asString();
|
||||
if(!aggregatorNode["AccountId"].isNull())
|
||||
aggregator_.accountId = std::stol(aggregatorNode["AccountId"].asString());
|
||||
if(!aggregatorNode["AggregatorId"].isNull())
|
||||
aggregator_.aggregatorId = aggregatorNode["AggregatorId"].asString();
|
||||
auto allAggregatorAccountsNode = aggregatorNode["AggregatorAccounts"]["AggregatorAccountsItem"];
|
||||
for (auto aggregatorNodeAggregatorAccountsAggregatorAccountsItem : allAggregatorAccountsNode)
|
||||
{
|
||||
Aggregator::AggregatorAccountsItem aggregatorAccountsItemObject;
|
||||
if(!aggregatorNodeAggregatorAccountsAggregatorAccountsItem["RecorderStatus"].isNull())
|
||||
aggregatorAccountsItemObject.recorderStatus = aggregatorNodeAggregatorAccountsAggregatorAccountsItem["RecorderStatus"].asString();
|
||||
if(!aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountId"].isNull())
|
||||
aggregatorAccountsItemObject.accountId = std::stol(aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountId"].asString());
|
||||
if(!aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountType"].isNull())
|
||||
aggregatorAccountsItemObject.accountType = aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountType"].asString();
|
||||
if(!aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountName"].isNull())
|
||||
aggregatorAccountsItemObject.accountName = aggregatorNodeAggregatorAccountsAggregatorAccountsItem["AccountName"].asString();
|
||||
aggregator_.aggregatorAccounts.push_back(aggregatorAccountsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregatorResult::Aggregator GetAggregatorResult::getAggregator()const
|
||||
{
|
||||
return aggregator_;
|
||||
}
|
||||
|
||||
36
config/src/model/GetCompliancePackReportRequest.cc
Normal file
36
config/src/model/GetCompliancePackReportRequest.cc
Normal 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/config/model/GetCompliancePackReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetCompliancePackReportRequest;
|
||||
|
||||
GetCompliancePackReportRequest::GetCompliancePackReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetCompliancePackReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetCompliancePackReportRequest::~GetCompliancePackReportRequest() {}
|
||||
|
||||
std::string GetCompliancePackReportRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetCompliancePackReportRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
60
config/src/model/GetCompliancePackReportResult.cc
Normal file
60
config/src/model/GetCompliancePackReportResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/config/model/GetCompliancePackReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetCompliancePackReportResult::GetCompliancePackReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetCompliancePackReportResult::GetCompliancePackReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetCompliancePackReportResult::~GetCompliancePackReportResult()
|
||||
{}
|
||||
|
||||
void GetCompliancePackReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto compliancePackReportNode = value["CompliancePackReport"];
|
||||
if(!compliancePackReportNode["ReportUrl"].isNull())
|
||||
compliancePackReport_.reportUrl = compliancePackReportNode["ReportUrl"].asString();
|
||||
if(!compliancePackReportNode["ReportStatus"].isNull())
|
||||
compliancePackReport_.reportStatus = compliancePackReportNode["ReportStatus"].asString();
|
||||
if(!compliancePackReportNode["CompliancePackId"].isNull())
|
||||
compliancePackReport_.compliancePackId = compliancePackReportNode["CompliancePackId"].asString();
|
||||
if(!compliancePackReportNode["AccountId"].isNull())
|
||||
compliancePackReport_.accountId = std::stol(compliancePackReportNode["AccountId"].asString());
|
||||
if(!compliancePackReportNode["ReportCreateTimestamp"].isNull())
|
||||
compliancePackReport_.reportCreateTimestamp = std::stol(compliancePackReportNode["ReportCreateTimestamp"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetCompliancePackReportResult::CompliancePackReport GetCompliancePackReportResult::getCompliancePackReport()const
|
||||
{
|
||||
return compliancePackReport_;
|
||||
}
|
||||
|
||||
36
config/src/model/GetCompliancePackRequest.cc
Normal file
36
config/src/model/GetCompliancePackRequest.cc
Normal 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/config/model/GetCompliancePackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetCompliancePackRequest;
|
||||
|
||||
GetCompliancePackRequest::GetCompliancePackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetCompliancePack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetCompliancePackRequest::~GetCompliancePackRequest() {}
|
||||
|
||||
std::string GetCompliancePackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetCompliancePackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
94
config/src/model/GetCompliancePackResult.cc
Normal file
94
config/src/model/GetCompliancePackResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/config/model/GetCompliancePackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetCompliancePackResult::GetCompliancePackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetCompliancePackResult::GetCompliancePackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetCompliancePackResult::~GetCompliancePackResult()
|
||||
{}
|
||||
|
||||
void GetCompliancePackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto compliancePackNode = value["CompliancePack"];
|
||||
if(!compliancePackNode["Status"].isNull())
|
||||
compliancePack_.status = compliancePackNode["Status"].asString();
|
||||
if(!compliancePackNode["CompliancePackId"].isNull())
|
||||
compliancePack_.compliancePackId = compliancePackNode["CompliancePackId"].asString();
|
||||
if(!compliancePackNode["RiskLevel"].isNull())
|
||||
compliancePack_.riskLevel = std::stoi(compliancePackNode["RiskLevel"].asString());
|
||||
if(!compliancePackNode["Description"].isNull())
|
||||
compliancePack_.description = compliancePackNode["Description"].asString();
|
||||
if(!compliancePackNode["CompliancePackName"].isNull())
|
||||
compliancePack_.compliancePackName = compliancePackNode["CompliancePackName"].asString();
|
||||
if(!compliancePackNode["AccountId"].isNull())
|
||||
compliancePack_.accountId = std::stol(compliancePackNode["AccountId"].asString());
|
||||
if(!compliancePackNode["CompliancePackTemplateId"].isNull())
|
||||
compliancePack_.compliancePackTemplateId = compliancePackNode["CompliancePackTemplateId"].asString();
|
||||
if(!compliancePackNode["CreateTimestamp"].isNull())
|
||||
compliancePack_.createTimestamp = std::stol(compliancePackNode["CreateTimestamp"].asString());
|
||||
auto allConfigRulesNode = compliancePackNode["ConfigRules"]["ConfigRulesItem"];
|
||||
for (auto compliancePackNodeConfigRulesConfigRulesItem : allConfigRulesNode)
|
||||
{
|
||||
CompliancePack::ConfigRulesItem configRulesItemObject;
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ManagedRuleIdentifier"].isNull())
|
||||
configRulesItemObject.managedRuleIdentifier = compliancePackNodeConfigRulesConfigRulesItem["ManagedRuleIdentifier"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleName"].isNull())
|
||||
configRulesItemObject.configRuleName = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleName"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleId"].isNull())
|
||||
configRulesItemObject.configRuleId = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleId"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["Description"].isNull())
|
||||
configRulesItemObject.description = compliancePackNodeConfigRulesConfigRulesItem["Description"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItem["RiskLevel"].isNull())
|
||||
configRulesItemObject.riskLevel = std::stoi(compliancePackNodeConfigRulesConfigRulesItem["RiskLevel"].asString());
|
||||
auto allConfigRuleParametersNode = compliancePackNodeConfigRulesConfigRulesItem["ConfigRuleParameters"]["ConfigRuleParametersItem"];
|
||||
for (auto compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem : allConfigRuleParametersNode)
|
||||
{
|
||||
CompliancePack::ConfigRulesItem::ConfigRuleParametersItem configRuleParametersObject;
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["Required"].isNull())
|
||||
configRuleParametersObject.required = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["Required"].asString() == "true";
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterName"].isNull())
|
||||
configRuleParametersObject.parameterName = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterName"].asString();
|
||||
if(!compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterValue"].isNull())
|
||||
configRuleParametersObject.parameterValue = compliancePackNodeConfigRulesConfigRulesItemConfigRuleParametersConfigRuleParametersItem["ParameterValue"].asString();
|
||||
configRulesItemObject.configRuleParameters.push_back(configRuleParametersObject);
|
||||
}
|
||||
compliancePack_.configRules.push_back(configRulesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetCompliancePackResult::CompliancePack GetCompliancePackResult::getCompliancePack()const
|
||||
{
|
||||
return compliancePack_;
|
||||
}
|
||||
|
||||
36
config/src/model/GetConfigRuleComplianceByPackRequest.cc
Normal file
36
config/src/model/GetConfigRuleComplianceByPackRequest.cc
Normal 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/config/model/GetConfigRuleComplianceByPackRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetConfigRuleComplianceByPackRequest;
|
||||
|
||||
GetConfigRuleComplianceByPackRequest::GetConfigRuleComplianceByPackRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetConfigRuleComplianceByPack") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetConfigRuleComplianceByPackRequest::~GetConfigRuleComplianceByPackRequest() {}
|
||||
|
||||
std::string GetConfigRuleComplianceByPackRequest::getCompliancePackId() const {
|
||||
return compliancePackId_;
|
||||
}
|
||||
|
||||
void GetConfigRuleComplianceByPackRequest::setCompliancePackId(const std::string &compliancePackId) {
|
||||
compliancePackId_ = compliancePackId;
|
||||
setParameter(std::string("CompliancePackId"), compliancePackId);
|
||||
}
|
||||
|
||||
68
config/src/model/GetConfigRuleComplianceByPackResult.cc
Normal file
68
config/src/model/GetConfigRuleComplianceByPackResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/config/model/GetConfigRuleComplianceByPackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetConfigRuleComplianceByPackResult::GetConfigRuleComplianceByPackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetConfigRuleComplianceByPackResult::GetConfigRuleComplianceByPackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetConfigRuleComplianceByPackResult::~GetConfigRuleComplianceByPackResult()
|
||||
{}
|
||||
|
||||
void GetConfigRuleComplianceByPackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configRuleComplianceResultNode = value["ConfigRuleComplianceResult"];
|
||||
if(!configRuleComplianceResultNode["CompliancePackId"].isNull())
|
||||
configRuleComplianceResult_.compliancePackId = configRuleComplianceResultNode["CompliancePackId"].asString();
|
||||
if(!configRuleComplianceResultNode["NonCompliantCount"].isNull())
|
||||
configRuleComplianceResult_.nonCompliantCount = std::stoi(configRuleComplianceResultNode["NonCompliantCount"].asString());
|
||||
if(!configRuleComplianceResultNode["TotalCount"].isNull())
|
||||
configRuleComplianceResult_.totalCount = std::stoi(configRuleComplianceResultNode["TotalCount"].asString());
|
||||
auto allConfigRuleCompliancesNode = configRuleComplianceResultNode["ConfigRuleCompliances"]["ConfigRuleCompliancesItem"];
|
||||
for (auto configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem : allConfigRuleCompliancesNode)
|
||||
{
|
||||
ConfigRuleComplianceResult::ConfigRuleCompliancesItem configRuleCompliancesItemObject;
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ComplianceType"].isNull())
|
||||
configRuleCompliancesItemObject.complianceType = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ComplianceType"].asString();
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleName"].isNull())
|
||||
configRuleCompliancesItemObject.configRuleName = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleName"].asString();
|
||||
if(!configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleId"].isNull())
|
||||
configRuleCompliancesItemObject.configRuleId = configRuleComplianceResultNodeConfigRuleCompliancesConfigRuleCompliancesItem["ConfigRuleId"].asString();
|
||||
configRuleComplianceResult_.configRuleCompliances.push_back(configRuleCompliancesItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetConfigRuleComplianceByPackResult::ConfigRuleComplianceResult GetConfigRuleComplianceByPackResult::getConfigRuleComplianceResult()const
|
||||
{
|
||||
return configRuleComplianceResult_;
|
||||
}
|
||||
|
||||
@@ -14,23 +14,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/StopConfigRulesRequest.h>
|
||||
#include <alibabacloud/config/model/GetConfigRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::StopConfigRulesRequest;
|
||||
using AlibabaCloud::Config::Model::GetConfigRuleRequest;
|
||||
|
||||
StopConfigRulesRequest::StopConfigRulesRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "StopConfigRules") {
|
||||
GetConfigRuleRequest::GetConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetConfigRule") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
StopConfigRulesRequest::~StopConfigRulesRequest() {}
|
||||
GetConfigRuleRequest::~GetConfigRuleRequest() {}
|
||||
|
||||
std::string StopConfigRulesRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
std::string GetConfigRuleRequest::getConfigRuleId() const {
|
||||
return configRuleId_;
|
||||
}
|
||||
|
||||
void StopConfigRulesRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
void GetConfigRuleRequest::setConfigRuleId(const std::string &configRuleId) {
|
||||
configRuleId_ = configRuleId;
|
||||
setParameter(std::string("ConfigRuleId"), configRuleId);
|
||||
}
|
||||
|
||||
168
config/src/model/GetConfigRuleResult.cc
Normal file
168
config/src/model/GetConfigRuleResult.cc
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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/config/model/GetConfigRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetConfigRuleResult::GetConfigRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetConfigRuleResult::GetConfigRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetConfigRuleResult::~GetConfigRuleResult()
|
||||
{}
|
||||
|
||||
void GetConfigRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configRuleNode = value["ConfigRule"];
|
||||
if(!configRuleNode["RiskLevel"].isNull())
|
||||
configRule_.riskLevel = std::stoi(configRuleNode["RiskLevel"].asString());
|
||||
if(!configRuleNode["InputParameters"].isNull())
|
||||
configRule_.inputParameters = configRuleNode["InputParameters"].asString();
|
||||
if(!configRuleNode["ConfigRuleState"].isNull())
|
||||
configRule_.configRuleState = configRuleNode["ConfigRuleState"].asString();
|
||||
if(!configRuleNode["MaximumExecutionFrequency"].isNull())
|
||||
configRule_.maximumExecutionFrequency = configRuleNode["MaximumExecutionFrequency"].asString();
|
||||
if(!configRuleNode["ConfigRuleArn"].isNull())
|
||||
configRule_.configRuleArn = configRuleNode["ConfigRuleArn"].asString();
|
||||
if(!configRuleNode["Description"].isNull())
|
||||
configRule_.description = configRuleNode["Description"].asString();
|
||||
if(!configRuleNode["ConfigRuleName"].isNull())
|
||||
configRule_.configRuleName = configRuleNode["ConfigRuleName"].asString();
|
||||
if(!configRuleNode["ConfigRuleId"].isNull())
|
||||
configRule_.configRuleId = configRuleNode["ConfigRuleId"].asString();
|
||||
if(!configRuleNode["ModifiedTimestamp"].isNull())
|
||||
configRule_.modifiedTimestamp = std::stol(configRuleNode["ModifiedTimestamp"].asString());
|
||||
if(!configRuleNode["CreateTimestamp"].isNull())
|
||||
configRule_.createTimestamp = std::stol(configRuleNode["CreateTimestamp"].asString());
|
||||
if(!configRuleNode["ResourceTypesScope"].isNull())
|
||||
configRule_.resourceTypesScope = configRuleNode["ResourceTypesScope"].asString();
|
||||
if(!configRuleNode["RegionIdsScope"].isNull())
|
||||
configRule_.regionIdsScope = configRuleNode["RegionIdsScope"].asString();
|
||||
if(!configRuleNode["ExcludeResourceIdsScope"].isNull())
|
||||
configRule_.excludeResourceIdsScope = configRuleNode["ExcludeResourceIdsScope"].asString();
|
||||
if(!configRuleNode["ResourceGroupIdsScope"].isNull())
|
||||
configRule_.resourceGroupIdsScope = configRuleNode["ResourceGroupIdsScope"].asString();
|
||||
if(!configRuleNode["TagKeyScope"].isNull())
|
||||
configRule_.tagKeyScope = configRuleNode["TagKeyScope"].asString();
|
||||
if(!configRuleNode["TagValueScope"].isNull())
|
||||
configRule_.tagValueScope = configRuleNode["TagValueScope"].asString();
|
||||
if(!configRuleNode["ConfigRuleTriggerTypes"].isNull())
|
||||
configRule_.configRuleTriggerTypes = configRuleNode["ConfigRuleTriggerTypes"].asString();
|
||||
auto sourceNode = configRuleNode["Source"];
|
||||
if(!sourceNode["Owner"].isNull())
|
||||
configRule_.source.owner = sourceNode["Owner"].asString();
|
||||
if(!sourceNode["Identifier"].isNull())
|
||||
configRule_.source.identifier = sourceNode["Identifier"].asString();
|
||||
auto allSourceDetailsNode = sourceNode["SourceDetails"]["SourceDetailsItem"];
|
||||
for (auto sourceNodeSourceDetailsSourceDetailsItem : allSourceDetailsNode)
|
||||
{
|
||||
ConfigRule::Source::SourceDetailsItem sourceDetailsItemObject;
|
||||
if(!sourceNodeSourceDetailsSourceDetailsItem["MessageType"].isNull())
|
||||
sourceDetailsItemObject.messageType = sourceNodeSourceDetailsSourceDetailsItem["MessageType"].asString();
|
||||
if(!sourceNodeSourceDetailsSourceDetailsItem["EventSource"].isNull())
|
||||
sourceDetailsItemObject.eventSource = sourceNodeSourceDetailsSourceDetailsItem["EventSource"].asString();
|
||||
if(!sourceNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].isNull())
|
||||
sourceDetailsItemObject.maximumExecutionFrequency = sourceNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].asString();
|
||||
configRule_.source.sourceDetails.push_back(sourceDetailsItemObject);
|
||||
}
|
||||
auto allSourceConditions = sourceNode["SourceConditions"]["SourceConditions"];
|
||||
for (auto value : allSourceConditions)
|
||||
configRule_.source.sourceConditions.push_back(value.asString());
|
||||
auto managedRuleNode = configRuleNode["ManagedRule"];
|
||||
if(!managedRuleNode["HelpUrl"].isNull())
|
||||
configRule_.managedRule.helpUrl = managedRuleNode["HelpUrl"].asString();
|
||||
if(!managedRuleNode["Description"].isNull())
|
||||
configRule_.managedRule.description = managedRuleNode["Description"].asString();
|
||||
if(!managedRuleNode["Identifier"].isNull())
|
||||
configRule_.managedRule.identifier = managedRuleNode["Identifier"].asString();
|
||||
if(!managedRuleNode["OptionalInputParameterDetails"].isNull())
|
||||
configRule_.managedRule.optionalInputParameterDetails = managedRuleNode["OptionalInputParameterDetails"].asString();
|
||||
if(!managedRuleNode["ManagedRuleName"].isNull())
|
||||
configRule_.managedRule.managedRuleName = managedRuleNode["ManagedRuleName"].asString();
|
||||
if(!managedRuleNode["CompulsoryInputParameterDetails"].isNull())
|
||||
configRule_.managedRule.compulsoryInputParameterDetails = managedRuleNode["CompulsoryInputParameterDetails"].asString();
|
||||
auto allSourceDetails1Node = managedRuleNode["SourceDetails"]["SourceDetailsItem"];
|
||||
for (auto managedRuleNodeSourceDetailsSourceDetailsItem : allSourceDetails1Node)
|
||||
{
|
||||
ConfigRule::ManagedRule::SourceDetailsItem2 sourceDetailsItem2Object;
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["MessageType"].isNull())
|
||||
sourceDetailsItem2Object.messageType = managedRuleNodeSourceDetailsSourceDetailsItem["MessageType"].asString();
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["EventSource"].isNull())
|
||||
sourceDetailsItem2Object.eventSource = managedRuleNodeSourceDetailsSourceDetailsItem["EventSource"].asString();
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].isNull())
|
||||
sourceDetailsItem2Object.maximumExecutionFrequency = managedRuleNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].asString();
|
||||
configRule_.managedRule.sourceDetails1.push_back(sourceDetailsItem2Object);
|
||||
}
|
||||
auto allLabels = managedRuleNode["Labels"]["Labels"];
|
||||
for (auto value : allLabels)
|
||||
configRule_.managedRule.labels.push_back(value.asString());
|
||||
auto createByNode = configRuleNode["CreateBy"];
|
||||
if(!createByNode["CompliancePackId"].isNull())
|
||||
configRule_.createBy.compliancePackId = createByNode["CompliancePackId"].asString();
|
||||
if(!createByNode["AggregatorName"].isNull())
|
||||
configRule_.createBy.aggregatorName = createByNode["AggregatorName"].asString();
|
||||
if(!createByNode["CompliancePackName"].isNull())
|
||||
configRule_.createBy.compliancePackName = createByNode["CompliancePackName"].asString();
|
||||
if(!createByNode["CreatorName"].isNull())
|
||||
configRule_.createBy.creatorName = createByNode["CreatorName"].asString();
|
||||
if(!createByNode["CreatorType"].isNull())
|
||||
configRule_.createBy.creatorType = createByNode["CreatorType"].asString();
|
||||
if(!createByNode["CreatorId"].isNull())
|
||||
configRule_.createBy.creatorId = createByNode["CreatorId"].asString();
|
||||
if(!createByNode["AggregatorId"].isNull())
|
||||
configRule_.createBy.aggregatorId = createByNode["AggregatorId"].asString();
|
||||
auto configRuleEvaluationStatusNode = configRuleNode["ConfigRuleEvaluationStatus"];
|
||||
if(!configRuleEvaluationStatusNode["LastErrorCode"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastErrorCode = configRuleEvaluationStatusNode["LastErrorCode"].asString();
|
||||
if(!configRuleEvaluationStatusNode["LastSuccessfulEvaluationTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastSuccessfulEvaluationTimestamp = std::stol(configRuleEvaluationStatusNode["LastSuccessfulEvaluationTimestamp"].asString());
|
||||
if(!configRuleEvaluationStatusNode["FirstActivatedTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.firstActivatedTimestamp = std::stol(configRuleEvaluationStatusNode["FirstActivatedTimestamp"].asString());
|
||||
if(!configRuleEvaluationStatusNode["FirstEvaluationStarted"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.firstEvaluationStarted = configRuleEvaluationStatusNode["FirstEvaluationStarted"].asString() == "true";
|
||||
if(!configRuleEvaluationStatusNode["LastSuccessfulInvocationTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastSuccessfulInvocationTimestamp = std::stol(configRuleEvaluationStatusNode["LastSuccessfulInvocationTimestamp"].asString());
|
||||
if(!configRuleEvaluationStatusNode["LastErrorMessage"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastErrorMessage = configRuleEvaluationStatusNode["LastErrorMessage"].asString();
|
||||
if(!configRuleEvaluationStatusNode["LastFailedEvaluationTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastFailedEvaluationTimestamp = std::stol(configRuleEvaluationStatusNode["LastFailedEvaluationTimestamp"].asString());
|
||||
if(!configRuleEvaluationStatusNode["LastFailedInvocationTimestamp"].isNull())
|
||||
configRule_.configRuleEvaluationStatus.lastFailedInvocationTimestamp = std::stol(configRuleEvaluationStatusNode["LastFailedInvocationTimestamp"].asString());
|
||||
auto scopeNode = configRuleNode["Scope"];
|
||||
auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"];
|
||||
for (auto value : allComplianceResourceTypes)
|
||||
configRule_.scope.complianceResourceTypes.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
GetConfigRuleResult::ConfigRule GetConfigRuleResult::getConfigRule()const
|
||||
{
|
||||
return configRule_;
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/DescribeConfigurationRecorderRequest.h>
|
||||
#include <alibabacloud/config/model/GetConfigRuleSummaryByRiskLevelRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::DescribeConfigurationRecorderRequest;
|
||||
using AlibabaCloud::Config::Model::GetConfigRuleSummaryByRiskLevelRequest;
|
||||
|
||||
DescribeConfigurationRecorderRequest::DescribeConfigurationRecorderRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "DescribeConfigurationRecorder") {
|
||||
GetConfigRuleSummaryByRiskLevelRequest::GetConfigRuleSummaryByRiskLevelRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetConfigRuleSummaryByRiskLevel") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeConfigurationRecorderRequest::~DescribeConfigurationRecorderRequest() {}
|
||||
GetConfigRuleSummaryByRiskLevelRequest::~GetConfigRuleSummaryByRiskLevelRequest() {}
|
||||
|
||||
61
config/src/model/GetConfigRuleSummaryByRiskLevelResult.cc
Normal file
61
config/src/model/GetConfigRuleSummaryByRiskLevelResult.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetConfigRuleSummaryByRiskLevelResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetConfigRuleSummaryByRiskLevelResult::GetConfigRuleSummaryByRiskLevelResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetConfigRuleSummaryByRiskLevelResult::GetConfigRuleSummaryByRiskLevelResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetConfigRuleSummaryByRiskLevelResult::~GetConfigRuleSummaryByRiskLevelResult()
|
||||
{}
|
||||
|
||||
void GetConfigRuleSummaryByRiskLevelResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allConfigRuleSummariesNode = value["ConfigRuleSummaries"]["Data"];
|
||||
for (auto valueConfigRuleSummariesData : allConfigRuleSummariesNode)
|
||||
{
|
||||
Data configRuleSummariesObject;
|
||||
if(!valueConfigRuleSummariesData["RiskLevel"].isNull())
|
||||
configRuleSummariesObject.riskLevel = std::stoi(valueConfigRuleSummariesData["RiskLevel"].asString());
|
||||
if(!valueConfigRuleSummariesData["CompliantCount"].isNull())
|
||||
configRuleSummariesObject.compliantCount = std::stoi(valueConfigRuleSummariesData["CompliantCount"].asString());
|
||||
if(!valueConfigRuleSummariesData["NonCompliantCount"].isNull())
|
||||
configRuleSummariesObject.nonCompliantCount = std::stoi(valueConfigRuleSummariesData["NonCompliantCount"].asString());
|
||||
configRuleSummaries_.push_back(configRuleSummariesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetConfigRuleSummaryByRiskLevelResult::Data> GetConfigRuleSummaryByRiskLevelResult::getConfigRuleSummaries()const
|
||||
{
|
||||
return configRuleSummaries_;
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/GetSupportedResourceTypesRequest.h>
|
||||
#include <alibabacloud/config/model/GetConfigRulesReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetSupportedResourceTypesRequest;
|
||||
using AlibabaCloud::Config::Model::GetConfigRulesReportRequest;
|
||||
|
||||
GetSupportedResourceTypesRequest::GetSupportedResourceTypesRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "GetSupportedResourceTypes") {
|
||||
GetConfigRulesReportRequest::GetConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetSupportedResourceTypesRequest::~GetSupportedResourceTypesRequest() {}
|
||||
GetConfigRulesReportRequest::~GetConfigRulesReportRequest() {}
|
||||
|
||||
58
config/src/model/GetConfigRulesReportResult.cc
Normal file
58
config/src/model/GetConfigRulesReportResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/config/model/GetConfigRulesReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetConfigRulesReportResult::GetConfigRulesReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetConfigRulesReportResult::GetConfigRulesReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetConfigRulesReportResult::~GetConfigRulesReportResult()
|
||||
{}
|
||||
|
||||
void GetConfigRulesReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto configRulesReportNode = value["ConfigRulesReport"];
|
||||
if(!configRulesReportNode["ReportStatus"].isNull())
|
||||
configRulesReport_.reportStatus = configRulesReportNode["ReportStatus"].asString();
|
||||
if(!configRulesReportNode["ReportUrl"].isNull())
|
||||
configRulesReport_.reportUrl = configRulesReportNode["ReportUrl"].asString();
|
||||
if(!configRulesReportNode["AccountId"].isNull())
|
||||
configRulesReport_.accountId = std::stol(configRulesReportNode["AccountId"].asString());
|
||||
if(!configRulesReportNode["ReportCreateTimestamp"].isNull())
|
||||
configRulesReport_.reportCreateTimestamp = std::stol(configRulesReportNode["ReportCreateTimestamp"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetConfigRulesReportResult::ConfigRulesReport GetConfigRulesReportResult::getConfigRulesReport()const
|
||||
{
|
||||
return configRulesReport_;
|
||||
}
|
||||
|
||||
@@ -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/config/model/GetDiscoveredResourceCountsGroupByRegionRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetDiscoveredResourceCountsGroupByRegionRequest;
|
||||
|
||||
GetDiscoveredResourceCountsGroupByRegionRequest::GetDiscoveredResourceCountsGroupByRegionRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetDiscoveredResourceCountsGroupByRegion") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByRegionRequest::~GetDiscoveredResourceCountsGroupByRegionRequest() {}
|
||||
|
||||
std::string GetDiscoveredResourceCountsGroupByRegionRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceCountsGroupByRegionRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetDiscoveredResourceCountsGroupByRegionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetDiscoveredResourceCountsGroupByRegionResult::GetDiscoveredResourceCountsGroupByRegionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByRegionResult::GetDiscoveredResourceCountsGroupByRegionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByRegionResult::~GetDiscoveredResourceCountsGroupByRegionResult()
|
||||
{}
|
||||
|
||||
void GetDiscoveredResourceCountsGroupByRegionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDiscoveredResourceCountsSummaryNode = value["DiscoveredResourceCountsSummary"]["GroupedResourceCount"];
|
||||
for (auto valueDiscoveredResourceCountsSummaryGroupedResourceCount : allDiscoveredResourceCountsSummaryNode)
|
||||
{
|
||||
GroupedResourceCount discoveredResourceCountsSummaryObject;
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceCount = std::stol(valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].asString());
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].isNull())
|
||||
discoveredResourceCountsSummaryObject.groupName = valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].asString();
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["Region"].isNull())
|
||||
discoveredResourceCountsSummaryObject.region = valueDiscoveredResourceCountsSummaryGroupedResourceCount["Region"].asString();
|
||||
discoveredResourceCountsSummary_.push_back(discoveredResourceCountsSummaryObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetDiscoveredResourceCountsGroupByRegionResult::GroupedResourceCount> GetDiscoveredResourceCountsGroupByRegionResult::getDiscoveredResourceCountsSummary()const
|
||||
{
|
||||
return discoveredResourceCountsSummary_;
|
||||
}
|
||||
|
||||
@@ -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/config/model/GetDiscoveredResourceCountsGroupByResourceTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetDiscoveredResourceCountsGroupByResourceTypeRequest;
|
||||
|
||||
GetDiscoveredResourceCountsGroupByResourceTypeRequest::GetDiscoveredResourceCountsGroupByResourceTypeRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetDiscoveredResourceCountsGroupByResourceType") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByResourceTypeRequest::~GetDiscoveredResourceCountsGroupByResourceTypeRequest() {}
|
||||
|
||||
std::string GetDiscoveredResourceCountsGroupByResourceTypeRequest::getRegion() const {
|
||||
return region_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceCountsGroupByResourceTypeRequest::setRegion(const std::string ®ion) {
|
||||
region_ = region;
|
||||
setParameter(std::string("Region"), region);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/config/model/GetDiscoveredResourceCountsGroupByResourceTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetDiscoveredResourceCountsGroupByResourceTypeResult::GetDiscoveredResourceCountsGroupByResourceTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByResourceTypeResult::GetDiscoveredResourceCountsGroupByResourceTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsGroupByResourceTypeResult::~GetDiscoveredResourceCountsGroupByResourceTypeResult()
|
||||
{}
|
||||
|
||||
void GetDiscoveredResourceCountsGroupByResourceTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDiscoveredResourceCountsSummaryNode = value["DiscoveredResourceCountsSummary"]["GroupedResourceCount"];
|
||||
for (auto valueDiscoveredResourceCountsSummaryGroupedResourceCount : allDiscoveredResourceCountsSummaryNode)
|
||||
{
|
||||
GroupedResourceCount discoveredResourceCountsSummaryObject;
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceCount = std::stol(valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceCount"].asString());
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].isNull())
|
||||
discoveredResourceCountsSummaryObject.groupName = valueDiscoveredResourceCountsSummaryGroupedResourceCount["GroupName"].asString();
|
||||
if(!valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceType"].isNull())
|
||||
discoveredResourceCountsSummaryObject.resourceType = valueDiscoveredResourceCountsSummaryGroupedResourceCount["ResourceType"].asString();
|
||||
discoveredResourceCountsSummary_.push_back(discoveredResourceCountsSummaryObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetDiscoveredResourceCountsGroupByResourceTypeResult::GroupedResourceCount> GetDiscoveredResourceCountsGroupByResourceTypeResult::getDiscoveredResourceCountsSummary()const
|
||||
{
|
||||
return discoveredResourceCountsSummary_;
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/GetDiscoveredResourceCountsRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetDiscoveredResourceCountsRequest;
|
||||
|
||||
GetDiscoveredResourceCountsRequest::GetDiscoveredResourceCountsRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "GetDiscoveredResourceCounts") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsRequest::~GetDiscoveredResourceCountsRequest() {}
|
||||
|
||||
bool GetDiscoveredResourceCountsRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceCountsRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string GetDiscoveredResourceCountsRequest::getGroupByKey() const {
|
||||
return groupByKey_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceCountsRequest::setGroupByKey(const std::string &groupByKey) {
|
||||
groupByKey_ = groupByKey;
|
||||
setParameter(std::string("GroupByKey"), groupByKey);
|
||||
}
|
||||
|
||||
long GetDiscoveredResourceCountsRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceCountsRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/GetDiscoveredResourceCountsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetDiscoveredResourceCountsResult::GetDiscoveredResourceCountsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDiscoveredResourceCountsResult::GetDiscoveredResourceCountsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsResult::~GetDiscoveredResourceCountsResult()
|
||||
{}
|
||||
|
||||
void GetDiscoveredResourceCountsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto groupedResourceCountsNode = value["GroupedResourceCounts"];
|
||||
if(!groupedResourceCountsNode["GroupByKey"].isNull())
|
||||
groupedResourceCounts_.groupByKey = groupedResourceCountsNode["GroupByKey"].asString();
|
||||
auto allGroupedResourceCountListNode = groupedResourceCountsNode["GroupedResourceCountList"]["GroupedResourceCount"];
|
||||
for (auto groupedResourceCountsNodeGroupedResourceCountListGroupedResourceCount : allGroupedResourceCountListNode)
|
||||
{
|
||||
GroupedResourceCounts::GroupedResourceCount groupedResourceCountObject;
|
||||
if(!groupedResourceCountsNodeGroupedResourceCountListGroupedResourceCount["ResourceCount"].isNull())
|
||||
groupedResourceCountObject.resourceCount = std::stol(groupedResourceCountsNodeGroupedResourceCountListGroupedResourceCount["ResourceCount"].asString());
|
||||
if(!groupedResourceCountsNodeGroupedResourceCountListGroupedResourceCount["GroupName"].isNull())
|
||||
groupedResourceCountObject.groupName = groupedResourceCountsNodeGroupedResourceCountListGroupedResourceCount["GroupName"].asString();
|
||||
groupedResourceCounts_.groupedResourceCountList.push_back(groupedResourceCountObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetDiscoveredResourceCountsResult::GroupedResourceCounts GetDiscoveredResourceCountsResult::getGroupedResourceCounts()const
|
||||
{
|
||||
return groupedResourceCounts_;
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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/config/model/GetDiscoveredResourceSummaryRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetDiscoveredResourceSummaryRequest;
|
||||
|
||||
GetDiscoveredResourceSummaryRequest::GetDiscoveredResourceSummaryRequest()
|
||||
: RpcServiceRequest("config", "2019-01-08", "GetDiscoveredResourceSummary") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetDiscoveredResourceSummaryRequest::~GetDiscoveredResourceSummaryRequest() {}
|
||||
|
||||
bool GetDiscoveredResourceSummaryRequest::getMultiAccount() const {
|
||||
return multiAccount_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceSummaryRequest::setMultiAccount(bool multiAccount) {
|
||||
multiAccount_ = multiAccount;
|
||||
setParameter(std::string("MultiAccount"), multiAccount ? "true" : "false");
|
||||
}
|
||||
|
||||
long GetDiscoveredResourceSummaryRequest::getMemberId() const {
|
||||
return memberId_;
|
||||
}
|
||||
|
||||
void GetDiscoveredResourceSummaryRequest::setMemberId(long memberId) {
|
||||
memberId_ = memberId;
|
||||
setParameter(std::string("MemberId"), std::to_string(memberId));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user