Generated 2019-09-10 for waf-openapi.

This commit is contained in:
sdk-team
2020-05-13 15:34:52 +08:00
parent 396541400e
commit bb7f64aeb3
17 changed files with 631 additions and 18 deletions

View File

@@ -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.

View File

@@ -1 +1 @@
1.36.407
1.36.408

View File

@@ -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

View File

@@ -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<Error, Model::DeleteDomainResult> DeleteDomainOutcome;
typedef std::future<DeleteDomainOutcome> DeleteDomainOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DeleteDomainRequest&, const DeleteDomainOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteDomainAsyncHandler;
typedef Outcome<Error, Model::DeleteInstanceResult> DeleteInstanceOutcome;
typedef std::future<DeleteInstanceOutcome> DeleteInstanceOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DeleteInstanceRequest&, const DeleteInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteInstanceAsyncHandler;
typedef Outcome<Error, Model::DescribeCertMatchStatusResult> DescribeCertMatchStatusOutcome;
typedef std::future<DescribeCertMatchStatusOutcome> DescribeCertMatchStatusOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DescribeCertMatchStatusRequest&, const DescribeCertMatchStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCertMatchStatusAsyncHandler;
@@ -156,6 +163,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeProtectionModuleRulesResult> DescribeProtectionModuleRulesOutcome;
typedef std::future<DescribeProtectionModuleRulesOutcome> DescribeProtectionModuleRulesOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DescribeProtectionModuleRulesRequest&, const DescribeProtectionModuleRulesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeProtectionModuleRulesAsyncHandler;
typedef Outcome<Error, Model::DescribeProtectionModuleRulesByIdListResult> DescribeProtectionModuleRulesByIdListOutcome;
typedef std::future<DescribeProtectionModuleRulesByIdListOutcome> DescribeProtectionModuleRulesByIdListOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DescribeProtectionModuleRulesByIdListRequest&, const DescribeProtectionModuleRulesByIdListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeProtectionModuleRulesByIdListAsyncHandler;
typedef Outcome<Error, Model::DescribeProtectionModuleStatusResult> DescribeProtectionModuleStatusOutcome;
typedef std::future<DescribeProtectionModuleStatusOutcome> DescribeProtectionModuleStatusOutcomeCallable;
typedef std::function<void(const Waf_openapiClient*, const Model::DescribeProtectionModuleStatusRequest&, const DescribeProtectionModuleStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
DescribeProtectionModuleStatusOutcomeCallable describeProtectionModuleStatusCallable(const Model::DescribeProtectionModuleStatusRequest& request) const;

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/waf-openapi/Waf_openapiExport.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/waf-openapi/Waf_openapiExport.h>
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_

View File

@@ -34,15 +34,21 @@ namespace AlibabaCloud
public:
struct Domain
{
struct LogHeader
{
std::string v;
std::string k;
};
int httpToUserIp;
std::vector<std::string> httpPort;
int isAccessProduct;
std::string resourceGroupId;
int readTime;
std::vector<std::string> sourceIps;
int clusterType;
int loadBalancing;
std::string cname;
std::string logHeaders;
std::vector<LogHeader> logHeaders;
int writeTime;
std::vector<std::string> http2Port;
long version;

View 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.
*/
#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTREQUEST_H_
#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/waf-openapi/Waf_openapiExport.h>
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_

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_
#define ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/waf-openapi/Waf_openapiExport.h>
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<Rule> getRules()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
std::vector<Rule> rules_;
};
}
}
}
#endif // !ALIBABACLOUD_WAF_OPENAPI_MODEL_DESCRIBEPROTECTIONMODULERULESBYIDLISTRESULT_H_

View File

@@ -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_;
};
}

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<DeleteInstanceOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeProtectionModuleRulesByIdListOutcome()>>(
[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();

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/waf-openapi/model/DeleteInstanceRequest.h>
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);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/waf-openapi/model/DeleteInstanceResult.h>
#include <json/json.h>
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());
}

View File

@@ -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());

View File

@@ -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/waf-openapi/model/DescribeProtectionModuleRulesByIdListRequest.h>
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);
}

View 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/waf-openapi/model/DescribeProtectionModuleRulesByIdListResult.h>
#include <json/json.h>
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::Rule> DescribeProtectionModuleRulesByIdListResult::getRules()const
{
return rules_;
}

View File

@@ -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);
}