diff --git a/CHANGELOG b/CHANGELOG index e7c514616..6f34867b9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-05-13 Version: 1.36.408 +- Generated 2019-09-10 for `waf-openapi`. + 2020-05-13 Version: 1.36.407 - Supported AAA for BBB. - Fixed bugs for CCC. diff --git a/VERSION b/VERSION index 072976673..76a13d151 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.407 \ No newline at end of file +1.36.408 \ No newline at end of file diff --git a/waf-openapi/CMakeLists.txt b/waf-openapi/CMakeLists.txt index 09312c8bb..e060f9a1e 100644 --- a/waf-openapi/CMakeLists.txt +++ b/waf-openapi/CMakeLists.txt @@ -33,6 +33,8 @@ set(waf-openapi_public_header_model include/alibabacloud/waf-openapi/model/CreateProtectionModuleRuleResult.h include/alibabacloud/waf-openapi/model/DeleteDomainRequest.h include/alibabacloud/waf-openapi/model/DeleteDomainResult.h + include/alibabacloud/waf-openapi/model/DeleteInstanceRequest.h + include/alibabacloud/waf-openapi/model/DeleteInstanceResult.h include/alibabacloud/waf-openapi/model/DescribeCertMatchStatusRequest.h include/alibabacloud/waf-openapi/model/DescribeCertMatchStatusResult.h include/alibabacloud/waf-openapi/model/DescribeCertificatesRequest.h @@ -59,6 +61,8 @@ set(waf-openapi_public_header_model include/alibabacloud/waf-openapi/model/DescribeProtectionModuleModeResult.h include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesRequest.h include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesResult.h + include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListRequest.h + include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListResult.h include/alibabacloud/waf-openapi/model/DescribeProtectionModuleStatusRequest.h include/alibabacloud/waf-openapi/model/DescribeProtectionModuleStatusResult.h include/alibabacloud/waf-openapi/model/DescribeRealProtectSummaryRequest.h @@ -104,6 +108,8 @@ set(waf-openapi_src src/model/CreateProtectionModuleRuleResult.cc src/model/DeleteDomainRequest.cc src/model/DeleteDomainResult.cc + src/model/DeleteInstanceRequest.cc + src/model/DeleteInstanceResult.cc src/model/DescribeCertMatchStatusRequest.cc src/model/DescribeCertMatchStatusResult.cc src/model/DescribeCertificatesRequest.cc @@ -130,6 +136,8 @@ set(waf-openapi_src src/model/DescribeProtectionModuleModeResult.cc src/model/DescribeProtectionModuleRulesRequest.cc src/model/DescribeProtectionModuleRulesResult.cc + src/model/DescribeProtectionModuleRulesByIdListRequest.cc + src/model/DescribeProtectionModuleRulesByIdListResult.cc src/model/DescribeProtectionModuleStatusRequest.cc src/model/DescribeProtectionModuleStatusResult.cc src/model/DescribeRealProtectSummaryRequest.cc diff --git a/waf-openapi/include/alibabacloud/waf-openapi/Waf_openapiClient.h b/waf-openapi/include/alibabacloud/waf-openapi/Waf_openapiClient.h index 95596eda0..e2dc20625 100644 --- a/waf-openapi/include/alibabacloud/waf-openapi/Waf_openapiClient.h +++ b/waf-openapi/include/alibabacloud/waf-openapi/Waf_openapiClient.h @@ -34,6 +34,8 @@ #include "model/CreateProtectionModuleRuleResult.h" #include "model/DeleteDomainRequest.h" #include "model/DeleteDomainResult.h" +#include "model/DeleteInstanceRequest.h" +#include "model/DeleteInstanceResult.h" #include "model/DescribeCertMatchStatusRequest.h" #include "model/DescribeCertMatchStatusResult.h" #include "model/DescribeCertificatesRequest.h" @@ -60,6 +62,8 @@ #include "model/DescribeProtectionModuleModeResult.h" #include "model/DescribeProtectionModuleRulesRequest.h" #include "model/DescribeProtectionModuleRulesResult.h" +#include "model/DescribeProtectionModuleRulesByIdListRequest.h" +#include "model/DescribeProtectionModuleRulesByIdListResult.h" #include "model/DescribeProtectionModuleStatusRequest.h" #include "model/DescribeProtectionModuleStatusResult.h" #include "model/DescribeRealProtectSummaryRequest.h" @@ -117,6 +121,9 @@ namespace AlibabaCloud typedef Outcome DeleteDomainOutcome; typedef std::future DeleteDomainOutcomeCallable; typedef std::function&)> DeleteDomainAsyncHandler; + typedef Outcome DeleteInstanceOutcome; + typedef std::future DeleteInstanceOutcomeCallable; + typedef std::function&)> DeleteInstanceAsyncHandler; typedef Outcome DescribeCertMatchStatusOutcome; typedef std::future DescribeCertMatchStatusOutcomeCallable; typedef std::function&)> DescribeCertMatchStatusAsyncHandler; @@ -156,6 +163,9 @@ namespace AlibabaCloud typedef Outcome DescribeProtectionModuleRulesOutcome; typedef std::future DescribeProtectionModuleRulesOutcomeCallable; typedef std::function&)> DescribeProtectionModuleRulesAsyncHandler; + typedef Outcome DescribeProtectionModuleRulesByIdListOutcome; + typedef std::future DescribeProtectionModuleRulesByIdListOutcomeCallable; + typedef std::function&)> DescribeProtectionModuleRulesByIdListAsyncHandler; typedef Outcome DescribeProtectionModuleStatusOutcome; typedef std::future DescribeProtectionModuleStatusOutcomeCallable; typedef std::function&)> DescribeProtectionModuleStatusAsyncHandler; @@ -224,6 +234,9 @@ namespace AlibabaCloud DeleteDomainOutcome deleteDomain(const Model::DeleteDomainRequest &request)const; void deleteDomainAsync(const Model::DeleteDomainRequest& request, const DeleteDomainAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteDomainOutcomeCallable deleteDomainCallable(const Model::DeleteDomainRequest& request) const; + DeleteInstanceOutcome deleteInstance(const Model::DeleteInstanceRequest &request)const; + void deleteInstanceAsync(const Model::DeleteInstanceRequest& request, const DeleteInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteInstanceOutcomeCallable deleteInstanceCallable(const Model::DeleteInstanceRequest& request) const; DescribeCertMatchStatusOutcome describeCertMatchStatus(const Model::DescribeCertMatchStatusRequest &request)const; void describeCertMatchStatusAsync(const Model::DescribeCertMatchStatusRequest& request, const DescribeCertMatchStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeCertMatchStatusOutcomeCallable describeCertMatchStatusCallable(const Model::DescribeCertMatchStatusRequest& request) const; @@ -263,6 +276,9 @@ namespace AlibabaCloud DescribeProtectionModuleRulesOutcome describeProtectionModuleRules(const Model::DescribeProtectionModuleRulesRequest &request)const; void describeProtectionModuleRulesAsync(const Model::DescribeProtectionModuleRulesRequest& request, const DescribeProtectionModuleRulesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeProtectionModuleRulesOutcomeCallable describeProtectionModuleRulesCallable(const Model::DescribeProtectionModuleRulesRequest& request) const; + DescribeProtectionModuleRulesByIdListOutcome describeProtectionModuleRulesByIdList(const Model::DescribeProtectionModuleRulesByIdListRequest &request)const; + void describeProtectionModuleRulesByIdListAsync(const Model::DescribeProtectionModuleRulesByIdListRequest& request, const DescribeProtectionModuleRulesByIdListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeProtectionModuleRulesByIdListOutcomeCallable describeProtectionModuleRulesByIdListCallable(const Model::DescribeProtectionModuleRulesByIdListRequest& request) const; DescribeProtectionModuleStatusOutcome describeProtectionModuleStatus(const Model::DescribeProtectionModuleStatusRequest &request)const; void describeProtectionModuleStatusAsync(const Model::DescribeProtectionModuleStatusRequest& request, const DescribeProtectionModuleStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeProtectionModuleStatusOutcomeCallable describeProtectionModuleStatusCallable(const Model::DescribeProtectionModuleStatusRequest& request) const; diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceRequest.h b/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceRequest.h new file mode 100644 index 000000000..6fabb78e7 --- /dev/null +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceRequest.h @@ -0,0 +1,57 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCEREQUEST_H_ +#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Waf_openapi + { + namespace Model + { + class ALIBABACLOUD_WAF_OPENAPI_EXPORT DeleteInstanceRequest : public RpcServiceRequest + { + + public: + DeleteInstanceRequest(); + ~DeleteInstanceRequest(); + + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string resourceGroupId_; + std::string instanceId_; + std::string sourceIp_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCEREQUEST_H_ \ No newline at end of file diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceResult.h b/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceResult.h new file mode 100644 index 000000000..3454f2f93 --- /dev/null +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/DeleteInstanceResult.h @@ -0,0 +1,49 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCERESULT_H_ +#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Waf_openapi + { + namespace Model + { + class ALIBABACLOUD_WAF_OPENAPI_EXPORT DeleteInstanceResult : public ServiceResult + { + public: + + + DeleteInstanceResult(); + explicit DeleteInstanceResult(const std::string &payload); + ~DeleteInstanceResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_WAF_OPENAPI_MODEL_DELETEINSTANCERESULT_H_ \ No newline at end of file diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeDomainResult.h b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeDomainResult.h index 51b1429f6..72c81ef8d 100644 --- a/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeDomainResult.h +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeDomainResult.h @@ -34,15 +34,21 @@ namespace AlibabaCloud public: struct Domain { + struct LogHeader + { + std::string v; + std::string k; + }; int httpToUserIp; std::vector httpPort; int isAccessProduct; + std::string resourceGroupId; int readTime; std::vector sourceIps; int clusterType; int loadBalancing; std::string cname; - std::string logHeaders; + std::vector logHeaders; int writeTime; std::vector http2Port; long version; diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListRequest.h b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListRequest.h new file mode 100644 index 000000000..ababa697a --- /dev/null +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTREQUEST_H_ +#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Waf_openapi + { + namespace Model + { + class ALIBABACLOUD_WAF_OPENAPI_EXPORT DescribeProtectionModuleRulesByIdListRequest : public RpcServiceRequest + { + + public: + DescribeProtectionModuleRulesByIdListRequest(); + ~DescribeProtectionModuleRulesByIdListRequest(); + + std::string getRuleIdList()const; + void setRuleIdList(const std::string& ruleIdList); + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string ruleIdList_; + std::string resourceGroupId_; + std::string instanceId_; + std::string sourceIp_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTREQUEST_H_ \ No newline at end of file diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListResult.h b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListResult.h new file mode 100644 index 000000000..44f424618 --- /dev/null +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/DescribeProtectionModuleRulesByIdListResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_ +#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Waf_openapi + { + namespace Model + { + class ALIBABACLOUD_WAF_OPENAPI_EXPORT DescribeProtectionModuleRulesByIdListResult : public ServiceResult + { + public: + struct Rule + { + long status; + std::string origin; + long version; + std::string content; + long ruleId; + int enabled; + long time; + std::string scene; + std::string name; + }; + + + DescribeProtectionModuleRulesByIdListResult(); + explicit DescribeProtectionModuleRulesByIdListResult(const std::string &payload); + ~DescribeProtectionModuleRulesByIdListResult(); + int getTotalCount()const; + std::vector getRules()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + std::vector rules_; + + }; + } + } +} +#endif // !ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_ \ No newline at end of file diff --git a/waf-openapi/include/alibabacloud/waf-openapi/model/ModifyDomainClusterTypeRequest.h b/waf-openapi/include/alibabacloud/waf-openapi/model/ModifyDomainClusterTypeRequest.h index eff5713c8..bf8010fdc 100644 --- a/waf-openapi/include/alibabacloud/waf-openapi/model/ModifyDomainClusterTypeRequest.h +++ b/waf-openapi/include/alibabacloud/waf-openapi/model/ModifyDomainClusterTypeRequest.h @@ -43,15 +43,12 @@ namespace AlibabaCloud void setSourceIp(const std::string& sourceIp); std::string getDomain()const; void setDomain(const std::string& domain); - std::string getRegion()const; - void setRegion(const std::string& region); private: int clusterType_; std::string instanceId_; std::string sourceIp_; std::string domain_; - std::string region_; }; } diff --git a/waf-openapi/src/Waf-openapiClient.cc b/waf-openapi/src/Waf-openapiClient.cc index bfec0a0d6..8ca4c0bb0 100644 --- a/waf-openapi/src/Waf-openapiClient.cc +++ b/waf-openapi/src/Waf-openapiClient.cc @@ -267,6 +267,42 @@ Waf_openapiClient::DeleteDomainOutcomeCallable Waf_openapiClient::deleteDomainCa return task->get_future(); } +Waf_openapiClient::DeleteInstanceOutcome Waf_openapiClient::deleteInstance(const DeleteInstanceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteInstanceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteInstanceOutcome(DeleteInstanceResult(outcome.result())); + else + return DeleteInstanceOutcome(outcome.error()); +} + +void Waf_openapiClient::deleteInstanceAsync(const DeleteInstanceRequest& request, const DeleteInstanceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteInstance(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Waf_openapiClient::DeleteInstanceOutcomeCallable Waf_openapiClient::deleteInstanceCallable(const DeleteInstanceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteInstance(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Waf_openapiClient::DescribeCertMatchStatusOutcome Waf_openapiClient::describeCertMatchStatus(const DescribeCertMatchStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -735,6 +771,42 @@ Waf_openapiClient::DescribeProtectionModuleRulesOutcomeCallable Waf_openapiClien return task->get_future(); } +Waf_openapiClient::DescribeProtectionModuleRulesByIdListOutcome Waf_openapiClient::describeProtectionModuleRulesByIdList(const DescribeProtectionModuleRulesByIdListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeProtectionModuleRulesByIdListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeProtectionModuleRulesByIdListOutcome(DescribeProtectionModuleRulesByIdListResult(outcome.result())); + else + return DescribeProtectionModuleRulesByIdListOutcome(outcome.error()); +} + +void Waf_openapiClient::describeProtectionModuleRulesByIdListAsync(const DescribeProtectionModuleRulesByIdListRequest& request, const DescribeProtectionModuleRulesByIdListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeProtectionModuleRulesByIdList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Waf_openapiClient::DescribeProtectionModuleRulesByIdListOutcomeCallable Waf_openapiClient::describeProtectionModuleRulesByIdListCallable(const DescribeProtectionModuleRulesByIdListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeProtectionModuleRulesByIdList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Waf_openapiClient::DescribeProtectionModuleStatusOutcome Waf_openapiClient::describeProtectionModuleStatus(const DescribeProtectionModuleStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/waf-openapi/src/model/DeleteInstanceRequest.cc b/waf-openapi/src/model/DeleteInstanceRequest.cc new file mode 100644 index 000000000..6cee25be7 --- /dev/null +++ b/waf-openapi/src/model/DeleteInstanceRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Waf_openapi::Model::DeleteInstanceRequest; + +DeleteInstanceRequest::DeleteInstanceRequest() : + RpcServiceRequest("waf-openapi", "2019-09-10", "DeleteInstance") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteInstanceRequest::~DeleteInstanceRequest() +{} + +std::string DeleteInstanceRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void DeleteInstanceRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string DeleteInstanceRequest::getInstanceId()const +{ + return instanceId_; +} + +void DeleteInstanceRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + +std::string DeleteInstanceRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DeleteInstanceRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DeleteInstanceRequest::getLang()const +{ + return lang_; +} + +void DeleteInstanceRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/waf-openapi/src/model/DeleteInstanceResult.cc b/waf-openapi/src/model/DeleteInstanceResult.cc new file mode 100644 index 000000000..8bfd11702 --- /dev/null +++ b/waf-openapi/src/model/DeleteInstanceResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Waf_openapi; +using namespace AlibabaCloud::Waf_openapi::Model; + +DeleteInstanceResult::DeleteInstanceResult() : + ServiceResult() +{} + +DeleteInstanceResult::DeleteInstanceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteInstanceResult::~DeleteInstanceResult() +{} + +void DeleteInstanceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/waf-openapi/src/model/DescribeDomainResult.cc b/waf-openapi/src/model/DescribeDomainResult.cc index 9d0257acd..61074db1a 100644 --- a/waf-openapi/src/model/DescribeDomainResult.cc +++ b/waf-openapi/src/model/DescribeDomainResult.cc @@ -52,8 +52,6 @@ void DescribeDomainResult::parse(const std::string &payload) domain_.isAccessProduct = std::stoi(domainNode["IsAccessProduct"].asString()); if(!domainNode["Version"].isNull()) domain_.version = std::stol(domainNode["Version"].asString()); - if(!domainNode["LogHeaders"].isNull()) - domain_.logHeaders = domainNode["LogHeaders"].asString(); if(!domainNode["ClusterType"].isNull()) domain_.clusterType = std::stoi(domainNode["ClusterType"].asString()); if(!domainNode["ConnectionTime"].isNull()) @@ -62,6 +60,18 @@ void DescribeDomainResult::parse(const std::string &payload) domain_.readTime = std::stoi(domainNode["ReadTime"].asString()); if(!domainNode["WriteTime"].isNull()) domain_.writeTime = std::stoi(domainNode["WriteTime"].asString()); + if(!domainNode["ResourceGroupId"].isNull()) + domain_.resourceGroupId = domainNode["ResourceGroupId"].asString(); + auto allLogHeadersNode = domainNode["LogHeaders"]["LogHeader"]; + for (auto domainNodeLogHeadersLogHeader : allLogHeadersNode) + { + Domain::LogHeader logHeaderObject; + if(!domainNodeLogHeadersLogHeader["v"].isNull()) + logHeaderObject.v = domainNodeLogHeadersLogHeader["v"].asString(); + if(!domainNodeLogHeadersLogHeader["k"].isNull()) + logHeaderObject.k = domainNodeLogHeadersLogHeader["k"].asString(); + domain_.logHeaders.push_back(logHeaderObject); + } auto allSourceIps = domainNode["SourceIps"]["SourceIp"]; for (auto value : allSourceIps) domain_.sourceIps.push_back(value.asString()); diff --git a/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListRequest.cc b/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListRequest.cc new file mode 100644 index 000000000..e6de09572 --- /dev/null +++ b/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListRequest.cc @@ -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 + +using AlibabaCloud::Waf_openapi::Model::DescribeProtectionModuleRulesByIdListRequest; + +DescribeProtectionModuleRulesByIdListRequest::DescribeProtectionModuleRulesByIdListRequest() : + RpcServiceRequest("waf-openapi", "2019-09-10", "DescribeProtectionModuleRulesByIdList") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeProtectionModuleRulesByIdListRequest::~DescribeProtectionModuleRulesByIdListRequest() +{} + +std::string DescribeProtectionModuleRulesByIdListRequest::getRuleIdList()const +{ + return ruleIdList_; +} + +void DescribeProtectionModuleRulesByIdListRequest::setRuleIdList(const std::string& ruleIdList) +{ + ruleIdList_ = ruleIdList; + setParameter("RuleIdList", ruleIdList); +} + +std::string DescribeProtectionModuleRulesByIdListRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void DescribeProtectionModuleRulesByIdListRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string DescribeProtectionModuleRulesByIdListRequest::getInstanceId()const +{ + return instanceId_; +} + +void DescribeProtectionModuleRulesByIdListRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + +std::string DescribeProtectionModuleRulesByIdListRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeProtectionModuleRulesByIdListRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeProtectionModuleRulesByIdListRequest::getLang()const +{ + return lang_; +} + +void DescribeProtectionModuleRulesByIdListRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListResult.cc b/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListResult.cc new file mode 100644 index 000000000..6cd14709d --- /dev/null +++ b/waf-openapi/src/model/DescribeProtectionModuleRulesByIdListResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Waf_openapi; +using namespace AlibabaCloud::Waf_openapi::Model; + +DescribeProtectionModuleRulesByIdListResult::DescribeProtectionModuleRulesByIdListResult() : + ServiceResult() +{} + +DescribeProtectionModuleRulesByIdListResult::DescribeProtectionModuleRulesByIdListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeProtectionModuleRulesByIdListResult::~DescribeProtectionModuleRulesByIdListResult() +{} + +void DescribeProtectionModuleRulesByIdListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allRulesNode = value["Rules"]["Rule"]; + for (auto valueRulesRule : allRulesNode) + { + Rule rulesObject; + if(!valueRulesRule["RuleId"].isNull()) + rulesObject.ruleId = std::stol(valueRulesRule["RuleId"].asString()); + if(!valueRulesRule["Name"].isNull()) + rulesObject.name = valueRulesRule["Name"].asString(); + if(!valueRulesRule["Enabled"].isNull()) + rulesObject.enabled = std::stoi(valueRulesRule["Enabled"].asString()); + if(!valueRulesRule["Version"].isNull()) + rulesObject.version = std::stol(valueRulesRule["Version"].asString()); + if(!valueRulesRule["Content"].isNull()) + rulesObject.content = valueRulesRule["Content"].asString(); + if(!valueRulesRule["Time"].isNull()) + rulesObject.time = std::stol(valueRulesRule["Time"].asString()); + if(!valueRulesRule["Status"].isNull()) + rulesObject.status = std::stol(valueRulesRule["Status"].asString()); + if(!valueRulesRule["Origin"].isNull()) + rulesObject.origin = valueRulesRule["Origin"].asString(); + if(!valueRulesRule["Scene"].isNull()) + rulesObject.scene = valueRulesRule["Scene"].asString(); + rules_.push_back(rulesObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int DescribeProtectionModuleRulesByIdListResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector DescribeProtectionModuleRulesByIdListResult::getRules()const +{ + return rules_; +} + diff --git a/waf-openapi/src/model/ModifyDomainClusterTypeRequest.cc b/waf-openapi/src/model/ModifyDomainClusterTypeRequest.cc index 3861bdad0..72b9466a3 100644 --- a/waf-openapi/src/model/ModifyDomainClusterTypeRequest.cc +++ b/waf-openapi/src/model/ModifyDomainClusterTypeRequest.cc @@ -71,14 +71,3 @@ void ModifyDomainClusterTypeRequest::setDomain(const std::string& domain) setParameter("Domain", domain); } -std::string ModifyDomainClusterTypeRequest::getRegion()const -{ - return region_; -} - -void ModifyDomainClusterTypeRequest::setRegion(const std::string& region) -{ - region_ = region; - setParameter("Region", region); -} -