Change GetFileDetectResult Public.

This commit is contained in:
sdk-team
2022-08-16 13:57:05 +00:00
parent 6700b9eb65
commit e75a9596ef
44 changed files with 2775 additions and 1 deletions

View File

@@ -339,6 +339,114 @@ SasClient::CreateFileDetectUploadUrlOutcomeCallable SasClient::createFileDetectU
return task->get_future();
}
SasClient::CreateHoneypotOutcome SasClient::createHoneypot(const CreateHoneypotRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateHoneypotOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateHoneypotOutcome(CreateHoneypotResult(outcome.result()));
else
return CreateHoneypotOutcome(outcome.error());
}
void SasClient::createHoneypotAsync(const CreateHoneypotRequest& request, const CreateHoneypotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createHoneypot(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::CreateHoneypotOutcomeCallable SasClient::createHoneypotCallable(const CreateHoneypotRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateHoneypotOutcome()>>(
[this, request]()
{
return this->createHoneypot(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::CreateHoneypotNodeOutcome SasClient::createHoneypotNode(const CreateHoneypotNodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateHoneypotNodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateHoneypotNodeOutcome(CreateHoneypotNodeResult(outcome.result()));
else
return CreateHoneypotNodeOutcome(outcome.error());
}
void SasClient::createHoneypotNodeAsync(const CreateHoneypotNodeRequest& request, const CreateHoneypotNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createHoneypotNode(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::CreateHoneypotNodeOutcomeCallable SasClient::createHoneypotNodeCallable(const CreateHoneypotNodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateHoneypotNodeOutcome()>>(
[this, request]()
{
return this->createHoneypotNode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::CreateHoneypotProbeOutcome SasClient::createHoneypotProbe(const CreateHoneypotProbeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateHoneypotProbeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateHoneypotProbeOutcome(CreateHoneypotProbeResult(outcome.result()));
else
return CreateHoneypotProbeOutcome(outcome.error());
}
void SasClient::createHoneypotProbeAsync(const CreateHoneypotProbeRequest& request, const CreateHoneypotProbeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createHoneypotProbe(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::CreateHoneypotProbeOutcomeCallable SasClient::createHoneypotProbeCallable(const CreateHoneypotProbeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateHoneypotProbeOutcome()>>(
[this, request]()
{
return this->createHoneypotProbe(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::CreateOrUpdateAssetGroupOutcome SasClient::createOrUpdateAssetGroup(const CreateOrUpdateAssetGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5199,6 +5307,42 @@ SasClient::DescribeWebLockConfigListOutcomeCallable SasClient::describeWebLockCo
return task->get_future();
}
SasClient::DescribeWebLockFileEventsOutcome SasClient::describeWebLockFileEvents(const DescribeWebLockFileEventsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeWebLockFileEventsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeWebLockFileEventsOutcome(DescribeWebLockFileEventsResult(outcome.result()));
else
return DescribeWebLockFileEventsOutcome(outcome.error());
}
void SasClient::describeWebLockFileEventsAsync(const DescribeWebLockFileEventsRequest& request, const DescribeWebLockFileEventsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeWebLockFileEvents(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::DescribeWebLockFileEventsOutcomeCallable SasClient::describeWebLockFileEventsCallable(const DescribeWebLockFileEventsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeWebLockFileEventsOutcome()>>(
[this, request]()
{
return this->describeWebLockFileEvents(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::ExportRecordOutcome SasClient::exportRecord(const ExportRecordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5775,6 +5919,114 @@ SasClient::ListCheckResultOutcomeCallable SasClient::listCheckResultCallable(con
return task->get_future();
}
SasClient::ListHoneypotOutcome SasClient::listHoneypot(const ListHoneypotRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListHoneypotOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListHoneypotOutcome(ListHoneypotResult(outcome.result()));
else
return ListHoneypotOutcome(outcome.error());
}
void SasClient::listHoneypotAsync(const ListHoneypotRequest& request, const ListHoneypotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listHoneypot(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::ListHoneypotOutcomeCallable SasClient::listHoneypotCallable(const ListHoneypotRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListHoneypotOutcome()>>(
[this, request]()
{
return this->listHoneypot(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::ListHoneypotAlarmEventsOutcome SasClient::listHoneypotAlarmEvents(const ListHoneypotAlarmEventsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListHoneypotAlarmEventsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListHoneypotAlarmEventsOutcome(ListHoneypotAlarmEventsResult(outcome.result()));
else
return ListHoneypotAlarmEventsOutcome(outcome.error());
}
void SasClient::listHoneypotAlarmEventsAsync(const ListHoneypotAlarmEventsRequest& request, const ListHoneypotAlarmEventsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listHoneypotAlarmEvents(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::ListHoneypotAlarmEventsOutcomeCallable SasClient::listHoneypotAlarmEventsCallable(const ListHoneypotAlarmEventsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListHoneypotAlarmEventsOutcome()>>(
[this, request]()
{
return this->listHoneypotAlarmEvents(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::ListHoneypotNodeOutcome SasClient::listHoneypotNode(const ListHoneypotNodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListHoneypotNodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListHoneypotNodeOutcome(ListHoneypotNodeResult(outcome.result()));
else
return ListHoneypotNodeOutcome(outcome.error());
}
void SasClient::listHoneypotNodeAsync(const ListHoneypotNodeRequest& request, const ListHoneypotNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listHoneypotNode(request), context);
};
asyncExecute(new Runnable(fn));
}
SasClient::ListHoneypotNodeOutcomeCallable SasClient::listHoneypotNodeCallable(const ListHoneypotNodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListHoneypotNodeOutcome()>>(
[this, request]()
{
return this->listHoneypotNode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SasClient::ListVulAutoRepairConfigOutcome SasClient::listVulAutoRepairConfig(const ListVulAutoRepairConfigRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,71 @@
/*
* 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/sas/model/CreateHoneypotNodeRequest.h>
using AlibabaCloud::Sas::Model::CreateHoneypotNodeRequest;
CreateHoneypotNodeRequest::CreateHoneypotNodeRequest()
: RpcServiceRequest("sas", "2018-12-03", "CreateHoneypotNode") {
setMethod(HttpRequest::Method::Post);
}
CreateHoneypotNodeRequest::~CreateHoneypotNodeRequest() {}
int CreateHoneypotNodeRequest::getAvailableProbeNum() const {
return availableProbeNum_;
}
void CreateHoneypotNodeRequest::setAvailableProbeNum(int availableProbeNum) {
availableProbeNum_ = availableProbeNum;
setParameter(std::string("AvailableProbeNum"), std::to_string(availableProbeNum));
}
bool CreateHoneypotNodeRequest::getAllowHoneypotAccessInternet() const {
return allowHoneypotAccessInternet_;
}
void CreateHoneypotNodeRequest::setAllowHoneypotAccessInternet(bool allowHoneypotAccessInternet) {
allowHoneypotAccessInternet_ = allowHoneypotAccessInternet;
setParameter(std::string("AllowHoneypotAccessInternet"), allowHoneypotAccessInternet ? "true" : "false");
}
std::string CreateHoneypotNodeRequest::getNodeName() const {
return nodeName_;
}
void CreateHoneypotNodeRequest::setNodeName(const std::string &nodeName) {
nodeName_ = nodeName;
setParameter(std::string("NodeName"), nodeName);
}
std::vector<std::string> CreateHoneypotNodeRequest::getSecurityGroupProbeIpList() const {
return securityGroupProbeIpList_;
}
void CreateHoneypotNodeRequest::setSecurityGroupProbeIpList(const std::vector<std::string> &securityGroupProbeIpList) {
securityGroupProbeIpList_ = securityGroupProbeIpList;
}
std::string CreateHoneypotNodeRequest::getNodeVersion() const {
return nodeVersion_;
}
void CreateHoneypotNodeRequest::setNodeVersion(const std::string &nodeVersion) {
nodeVersion_ = nodeVersion;
setParameter(std::string("NodeVersion"), nodeVersion);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/sas/model/CreateHoneypotNodeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
CreateHoneypotNodeResult::CreateHoneypotNodeResult() :
ServiceResult()
{}
CreateHoneypotNodeResult::CreateHoneypotNodeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateHoneypotNodeResult::~CreateHoneypotNodeResult()
{}
void CreateHoneypotNodeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string CreateHoneypotNodeResult::getMessage()const
{
return message_;
}
int CreateHoneypotNodeResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateHoneypotNodeResult::getCode()const
{
return code_;
}
bool CreateHoneypotNodeResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,174 @@
/*
* 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/sas/model/CreateHoneypotProbeRequest.h>
using AlibabaCloud::Sas::Model::CreateHoneypotProbeRequest;
CreateHoneypotProbeRequest::CreateHoneypotProbeRequest()
: RpcServiceRequest("sas", "2018-12-03", "CreateHoneypotProbe") {
setMethod(HttpRequest::Method::Post);
}
CreateHoneypotProbeRequest::~CreateHoneypotProbeRequest() {}
std::string CreateHoneypotProbeRequest::getControlNodeId() const {
return controlNodeId_;
}
void CreateHoneypotProbeRequest::setControlNodeId(const std::string &controlNodeId) {
controlNodeId_ = controlNodeId;
setParameter(std::string("ControlNodeId"), controlNodeId);
}
std::string CreateHoneypotProbeRequest::getProxyIp() const {
return proxyIp_;
}
void CreateHoneypotProbeRequest::setProxyIp(const std::string &proxyIp) {
proxyIp_ = proxyIp;
setParameter(std::string("ProxyIp"), proxyIp);
}
bool CreateHoneypotProbeRequest::getPing() const {
return ping_;
}
void CreateHoneypotProbeRequest::setPing(bool ping) {
ping_ = ping;
setParameter(std::string("Ping"), ping ? "true" : "false");
}
std::string CreateHoneypotProbeRequest::getProbeId() const {
return probeId_;
}
void CreateHoneypotProbeRequest::setProbeId(const std::string &probeId) {
probeId_ = probeId;
setParameter(std::string("ProbeId"), probeId);
}
std::string CreateHoneypotProbeRequest::getUuid() const {
return uuid_;
}
void CreateHoneypotProbeRequest::setUuid(const std::string &uuid) {
uuid_ = uuid;
setParameter(std::string("Uuid"), uuid);
}
std::string CreateHoneypotProbeRequest::getProbeVersion() const {
return probeVersion_;
}
void CreateHoneypotProbeRequest::setProbeVersion(const std::string &probeVersion) {
probeVersion_ = probeVersion;
setParameter(std::string("ProbeVersion"), probeVersion);
}
std::vector<std::string> CreateHoneypotProbeRequest::getServiceIpList() const {
return serviceIpList_;
}
void CreateHoneypotProbeRequest::setServiceIpList(const std::vector<std::string> &serviceIpList) {
serviceIpList_ = serviceIpList;
}
std::vector<CreateHoneypotProbeRequest::HoneypotBindList> CreateHoneypotProbeRequest::getHoneypotBindList() const {
return honeypotBindList_;
}
void CreateHoneypotProbeRequest::setHoneypotBindList(const std::vector<CreateHoneypotProbeRequest::HoneypotBindList> &honeypotBindList) {
honeypotBindList_ = honeypotBindList;
for(int dep1 = 0; dep1 != honeypotBindList.size(); dep1++) {
auto honeypotBindListObj = honeypotBindList.at(dep1);
std::string honeypotBindListObjStr = std::string("HoneypotBindList") + "." + std::to_string(dep1 + 1);
for(int dep2 = 0; dep2 != honeypotBindListObj.bindPortList.size(); dep2++) {
auto bindPortListObj = honeypotBindListObj.bindPortList.at(dep2);
std::string bindPortListObjStr = honeypotBindListObjStr + ".BindPortList" + "." + std::to_string(dep2 + 1);
setParameter(bindPortListObjStr + ".StartPort", std::to_string(bindPortListObj.startPort));
setParameter(bindPortListObjStr + ".BindPort", bindPortListObj.bindPort ? "true" : "false");
setParameter(bindPortListObjStr + ".Fixed", bindPortListObj.fixed ? "true" : "false");
setParameter(bindPortListObjStr + ".EndPort", std::to_string(bindPortListObj.endPort));
setParameter(bindPortListObjStr + ".TargetPort", std::to_string(bindPortListObj.targetPort));
}
setParameter(honeypotBindListObjStr + ".HoneypotId", honeypotBindListObj.honeypotId);
}
}
std::string CreateHoneypotProbeRequest::getLang() const {
return lang_;
}
void CreateHoneypotProbeRequest::setLang(const std::string &lang) {
lang_ = lang;
setParameter(std::string("Lang"), lang);
}
bool CreateHoneypotProbeRequest::getArp() const {
return arp_;
}
void CreateHoneypotProbeRequest::setArp(bool arp) {
arp_ = arp;
setParameter(std::string("Arp"), arp ? "true" : "false");
}
std::string CreateHoneypotProbeRequest::getProbeType() const {
return probeType_;
}
void CreateHoneypotProbeRequest::setProbeType(const std::string &probeType) {
probeType_ = probeType;
setParameter(std::string("ProbeType"), probeType);
}
std::string CreateHoneypotProbeRequest::getProbeStatus() const {
return probeStatus_;
}
void CreateHoneypotProbeRequest::setProbeStatus(const std::string &probeStatus) {
probeStatus_ = probeStatus;
setParameter(std::string("ProbeStatus"), probeStatus);
}
std::string CreateHoneypotProbeRequest::getBusinessGroupId() const {
return businessGroupId_;
}
void CreateHoneypotProbeRequest::setBusinessGroupId(const std::string &businessGroupId) {
businessGroupId_ = businessGroupId;
setParameter(std::string("BusinessGroupId"), businessGroupId);
}
std::string CreateHoneypotProbeRequest::getDisplayName() const {
return displayName_;
}
void CreateHoneypotProbeRequest::setDisplayName(const std::string &displayName) {
displayName_ = displayName;
setParameter(std::string("DisplayName"), displayName);
}
std::string CreateHoneypotProbeRequest::getVpcId() const {
return vpcId_;
}
void CreateHoneypotProbeRequest::setVpcId(const std::string &vpcId) {
vpcId_ = vpcId;
setParameter(std::string("VpcId"), vpcId);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/sas/model/CreateHoneypotProbeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
CreateHoneypotProbeResult::CreateHoneypotProbeResult() :
ServiceResult()
{}
CreateHoneypotProbeResult::CreateHoneypotProbeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateHoneypotProbeResult::~CreateHoneypotProbeResult()
{}
void CreateHoneypotProbeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string CreateHoneypotProbeResult::getMessage()const
{
return message_;
}
int CreateHoneypotProbeResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateHoneypotProbeResult::getCode()const
{
return code_;
}
bool CreateHoneypotProbeResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,99 @@
/*
* 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/sas/model/CreateHoneypotRequest.h>
using AlibabaCloud::Sas::Model::CreateHoneypotRequest;
CreateHoneypotRequest::CreateHoneypotRequest()
: RpcServiceRequest("sas", "2018-12-03", "CreateHoneypot") {
setMethod(HttpRequest::Method::Post);
}
CreateHoneypotRequest::~CreateHoneypotRequest() {}
std::string CreateHoneypotRequest::getHoneypotName() const {
return honeypotName_;
}
void CreateHoneypotRequest::setHoneypotName(const std::string &honeypotName) {
honeypotName_ = honeypotName;
setParameter(std::string("HoneypotName"), honeypotName);
}
int CreateHoneypotRequest::getPageSize() const {
return pageSize_;
}
void CreateHoneypotRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string CreateHoneypotRequest::getLang() const {
return lang_;
}
void CreateHoneypotRequest::setLang(const std::string &lang) {
lang_ = lang;
setParameter(std::string("Lang"), lang);
}
std::string CreateHoneypotRequest::getNodeId() const {
return nodeId_;
}
void CreateHoneypotRequest::setNodeId(const std::string &nodeId) {
nodeId_ = nodeId;
setParameter(std::string("NodeId"), nodeId);
}
std::string CreateHoneypotRequest::getHoneypotImageId() const {
return honeypotImageId_;
}
void CreateHoneypotRequest::setHoneypotImageId(const std::string &honeypotImageId) {
honeypotImageId_ = honeypotImageId;
setParameter(std::string("HoneypotImageId"), honeypotImageId);
}
int CreateHoneypotRequest::getCurrentPage() const {
return currentPage_;
}
void CreateHoneypotRequest::setCurrentPage(int currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string CreateHoneypotRequest::getMeta() const {
return meta_;
}
void CreateHoneypotRequest::setMeta(const std::string &meta) {
meta_ = meta;
setParameter(std::string("Meta"), meta);
}
std::string CreateHoneypotRequest::getHoneypotImageName() const {
return honeypotImageName_;
}
void CreateHoneypotRequest::setHoneypotImageName(const std::string &honeypotImageName) {
honeypotImageName_ = honeypotImageName;
setParameter(std::string("HoneypotImageName"), honeypotImageName);
}

View File

@@ -0,0 +1,95 @@
/*
* 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/sas/model/CreateHoneypotResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
CreateHoneypotResult::CreateHoneypotResult() :
ServiceResult()
{}
CreateHoneypotResult::CreateHoneypotResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateHoneypotResult::~CreateHoneypotResult()
{}
void CreateHoneypotResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["HoneypotId"].isNull())
data_.honeypotId = dataNode["HoneypotId"].asString();
if(!dataNode["HoneypotName"].isNull())
data_.honeypotName = dataNode["HoneypotName"].asString();
if(!dataNode["ControlNodeName"].isNull())
data_.controlNodeName = dataNode["ControlNodeName"].asString();
if(!dataNode["HoneypotImageName"].isNull())
data_.honeypotImageName = dataNode["HoneypotImageName"].asString();
if(!dataNode["PresetId"].isNull())
data_.presetId = dataNode["PresetId"].asString();
if(!dataNode["HoneypotImageDisplayName"].isNull())
data_.honeypotImageDisplayName = dataNode["HoneypotImageDisplayName"].asString();
if(!dataNode["NodeId"].isNull())
data_.nodeId = dataNode["NodeId"].asString();
auto allState = dataNode["State"]["State"];
for (auto value : allState)
data_.state.push_back(value.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string CreateHoneypotResult::getMessage()const
{
return message_;
}
int CreateHoneypotResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
CreateHoneypotResult::Data CreateHoneypotResult::getData()const
{
return data_;
}
std::string CreateHoneypotResult::getCode()const
{
return code_;
}
bool CreateHoneypotResult::getSuccess()const
{
return success_;
}

View File

@@ -97,3 +97,12 @@ void DescribeCheckWarningsRequest::setRiskId(long riskId) {
setParameter(std::string("RiskId"), std::to_string(riskId));
}
int DescribeCheckWarningsRequest::getRiskStatus() const {
return riskStatus_;
}
void DescribeCheckWarningsRequest::setRiskStatus(int riskStatus) {
riskStatus_ = riskStatus;
setParameter(std::string("RiskStatus"), std::to_string(riskStatus));
}

View File

@@ -63,6 +63,8 @@ void DescribeGroupedVulResult::parse(const std::string &payload)
groupedVulItemsObject.totalFixCount = std::stol(valueGroupedVulItemsGroupedVulItem["TotalFixCount"].asString());
if(!valueGroupedVulItemsGroupedVulItem["AsapCount"].isNull())
groupedVulItemsObject.asapCount = std::stoi(valueGroupedVulItemsGroupedVulItem["AsapCount"].asString());
if(!valueGroupedVulItemsGroupedVulItem["RuleModifyTime"].isNull())
groupedVulItemsObject.ruleModifyTime = std::stol(valueGroupedVulItemsGroupedVulItem["RuleModifyTime"].asString());
groupedVulItems_.push_back(groupedVulItemsObject);
}
if(!value["CurrentPage"].isNull())

View File

@@ -25,6 +25,23 @@ DescribeOnceTaskRequest::DescribeOnceTaskRequest()
DescribeOnceTaskRequest::~DescribeOnceTaskRequest() {}
std::vector<std::string> DescribeOnceTaskRequest::getStatusList() const {
return statusList_;
}
void DescribeOnceTaskRequest::setStatusList(const std::vector<std::string> &statusList) {
statusList_ = statusList;
}
std::string DescribeOnceTaskRequest::getSource() const {
return source_;
}
void DescribeOnceTaskRequest::setSource(const std::string &source) {
source_ = source;
setParameter(std::string("Source"), source);
}
std::string DescribeOnceTaskRequest::getSourceIp() const {
return sourceIp_;
}
@@ -61,6 +78,15 @@ void DescribeOnceTaskRequest::setPageSize(int pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
int DescribeOnceTaskRequest::getFinish() const {
return finish_;
}
void DescribeOnceTaskRequest::setFinish(int finish) {
finish_ = finish;
setParameter(std::string("Finish"), std::to_string(finish));
}
std::string DescribeOnceTaskRequest::getTaskType() const {
return taskType_;
}
@@ -88,3 +114,12 @@ void DescribeOnceTaskRequest::setCurrentPage(int currentPage) {
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string DescribeOnceTaskRequest::getTargetQuery() const {
return targetQuery_;
}
void DescribeOnceTaskRequest::setTargetQuery(const std::string &targetQuery) {
targetQuery_ = targetQuery;
setParameter(std::string("TargetQuery"), targetQuery);
}

View File

@@ -61,6 +61,10 @@ void DescribeOnceTaskResult::parse(const std::string &payload)
taskManageResponseListObject.taskEndTime = std::stol(valueTaskManageResponseListTaskManageResponse["TaskEndTime"].asString());
if(!valueTaskManageResponseListTaskManageResponse["TaskId"].isNull())
taskManageResponseListObject.taskId = valueTaskManageResponseListTaskManageResponse["TaskId"].asString();
if(!valueTaskManageResponseListTaskManageResponse["Source"].isNull())
taskManageResponseListObject.source = valueTaskManageResponseListTaskManageResponse["Source"].asString();
if(!valueTaskManageResponseListTaskManageResponse["Context"].isNull())
taskManageResponseListObject.context = valueTaskManageResponseListTaskManageResponse["Context"].asString();
taskManageResponseList_.push_back(taskManageResponseListObject);
}
auto pageInfoNode = value["PageInfo"];

View File

@@ -88,6 +88,15 @@ void DescribeWarningMachinesRequest::setLang(const std::string &lang) {
setParameter(std::string("Lang"), lang);
}
int DescribeWarningMachinesRequest::getHaveRisk() const {
return haveRisk_;
}
void DescribeWarningMachinesRequest::setHaveRisk(int haveRisk) {
haveRisk_ = haveRisk;
setParameter(std::string("HaveRisk"), std::to_string(haveRisk));
}
int DescribeWarningMachinesRequest::getCurrentPage() const {
return currentPage_;
}

View File

@@ -0,0 +1,99 @@
/*
* 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/sas/model/DescribeWebLockFileEventsRequest.h>
using AlibabaCloud::Sas::Model::DescribeWebLockFileEventsRequest;
DescribeWebLockFileEventsRequest::DescribeWebLockFileEventsRequest()
: RpcServiceRequest("sas", "2018-12-03", "DescribeWebLockFileEvents") {
setMethod(HttpRequest::Method::Post);
}
DescribeWebLockFileEventsRequest::~DescribeWebLockFileEventsRequest() {}
std::string DescribeWebLockFileEventsRequest::getRemark() const {
return remark_;
}
void DescribeWebLockFileEventsRequest::setRemark(const std::string &remark) {
remark_ = remark;
setParameter(std::string("Remark"), remark);
}
std::string DescribeWebLockFileEventsRequest::getSourceIp() const {
return sourceIp_;
}
void DescribeWebLockFileEventsRequest::setSourceIp(const std::string &sourceIp) {
sourceIp_ = sourceIp;
setParameter(std::string("SourceIp"), sourceIp);
}
int DescribeWebLockFileEventsRequest::getPageSize() const {
return pageSize_;
}
void DescribeWebLockFileEventsRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
long DescribeWebLockFileEventsRequest::getTsEnd() const {
return tsEnd_;
}
void DescribeWebLockFileEventsRequest::setTsEnd(long tsEnd) {
tsEnd_ = tsEnd;
setParameter(std::string("TsEnd"), std::to_string(tsEnd));
}
std::string DescribeWebLockFileEventsRequest::getProcessName() const {
return processName_;
}
void DescribeWebLockFileEventsRequest::setProcessName(const std::string &processName) {
processName_ = processName;
setParameter(std::string("ProcessName"), processName);
}
int DescribeWebLockFileEventsRequest::getCurrentPage() const {
return currentPage_;
}
void DescribeWebLockFileEventsRequest::setCurrentPage(int currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string DescribeWebLockFileEventsRequest::getDealed() const {
return dealed_;
}
void DescribeWebLockFileEventsRequest::setDealed(const std::string &dealed) {
dealed_ = dealed;
setParameter(std::string("Dealed"), dealed);
}
long DescribeWebLockFileEventsRequest::getTsBegin() const {
return tsBegin_;
}
void DescribeWebLockFileEventsRequest::setTsBegin(long tsBegin) {
tsBegin_ = tsBegin;
setParameter(std::string("TsBegin"), std::to_string(tsBegin));
}

View File

@@ -0,0 +1,112 @@
/*
* 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/sas/model/DescribeWebLockFileEventsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
DescribeWebLockFileEventsResult::DescribeWebLockFileEventsResult() :
ServiceResult()
{}
DescribeWebLockFileEventsResult::DescribeWebLockFileEventsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeWebLockFileEventsResult::~DescribeWebLockFileEventsResult()
{}
void DescribeWebLockFileEventsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allListNode = value["List"]["Info"];
for (auto valueListInfo : allListNode)
{
Info listObject;
if(!valueListInfo["Status"].isNull())
listObject.status = valueListInfo["Status"].asString();
if(!valueListInfo["EventName"].isNull())
listObject.eventName = valueListInfo["EventName"].asString();
if(!valueListInfo["Ds"].isNull())
listObject.ds = std::stol(valueListInfo["Ds"].asString());
if(!valueListInfo["InternetIp"].isNull())
listObject.internetIp = valueListInfo["InternetIp"].asString();
if(!valueListInfo["ProcessPath"].isNull())
listObject.processPath = valueListInfo["ProcessPath"].asString();
if(!valueListInfo["Ip"].isNull())
listObject.ip = valueListInfo["Ip"].asString();
if(!valueListInfo["GmtEvent"].isNull())
listObject.gmtEvent = std::stol(valueListInfo["GmtEvent"].asString());
if(!valueListInfo["Count"].isNull())
listObject.count = std::stol(valueListInfo["Count"].asString());
if(!valueListInfo["IntranetIp"].isNull())
listObject.intranetIp = valueListInfo["IntranetIp"].asString();
if(!valueListInfo["ProcessName"].isNull())
listObject.processName = valueListInfo["ProcessName"].asString();
if(!valueListInfo["Uuid"].isNull())
listObject.uuid = valueListInfo["Uuid"].asString();
if(!valueListInfo["EventType"].isNull())
listObject.eventType = valueListInfo["EventType"].asString();
if(!valueListInfo["InstanceName"].isNull())
listObject.instanceName = valueListInfo["InstanceName"].asString();
if(!valueListInfo["EventStatus"].isNull())
listObject.eventStatus = valueListInfo["EventStatus"].asString();
if(!valueListInfo["Path"].isNull())
listObject.path = valueListInfo["Path"].asString();
if(!valueListInfo["Solution"].isNull())
listObject.solution = valueListInfo["Solution"].asString();
if(!valueListInfo["Level"].isNull())
listObject.level = valueListInfo["Level"].asString();
if(!valueListInfo["Id"].isNull())
listObject.id = std::stol(valueListInfo["Id"].asString());
list_.push_back(listObject);
}
if(!value["CurrentPage"].isNull())
currentPage_ = std::stoi(value["CurrentPage"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int DescribeWebLockFileEventsResult::getTotalCount()const
{
return totalCount_;
}
int DescribeWebLockFileEventsResult::getPageSize()const
{
return pageSize_;
}
int DescribeWebLockFileEventsResult::getCurrentPage()const
{
return currentPage_;
}
std::vector<DescribeWebLockFileEventsResult::Info> DescribeWebLockFileEventsResult::getList()const
{
return list_;
}

View File

@@ -51,6 +51,10 @@ void GetFileDetectResultResult::parse(const std::string &payload)
resultListObject.score = std::stoi(valueResultListResult["Score"].asString());
if(!valueResultListResult["VirusType"].isNull())
resultListObject.virusType = valueResultListResult["VirusType"].asString();
if(!valueResultListResult["ErrorCode"].isNull())
resultListObject.errorCode = valueResultListResult["ErrorCode"].asString();
if(!valueResultListResult["ErrorMessage"].isNull())
resultListObject.errorMessage = valueResultListResult["ErrorMessage"].asString();
if(!valueResultListResult["Ext"].isNull())
resultListObject.ext = valueResultListResult["Ext"].asString();
resultList_.push_back(resultListObject);

View File

@@ -0,0 +1,89 @@
/*
* 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/sas/model/ListHoneypotAlarmEventsRequest.h>
using AlibabaCloud::Sas::Model::ListHoneypotAlarmEventsRequest;
ListHoneypotAlarmEventsRequest::ListHoneypotAlarmEventsRequest()
: RpcServiceRequest("sas", "2018-12-03", "ListHoneypotAlarmEvents") {
setMethod(HttpRequest::Method::Get);
}
ListHoneypotAlarmEventsRequest::~ListHoneypotAlarmEventsRequest() {}
std::string ListHoneypotAlarmEventsRequest::getSrcIp() const {
return srcIp_;
}
void ListHoneypotAlarmEventsRequest::setSrcIp(const std::string &srcIp) {
srcIp_ = srcIp;
setBodyParameter(std::string("SrcIp"), srcIp);
}
std::vector<std::string> ListHoneypotAlarmEventsRequest::getRiskLevelList() const {
return riskLevelList_;
}
void ListHoneypotAlarmEventsRequest::setRiskLevelList(const std::vector<std::string> &riskLevelList) {
riskLevelList_ = riskLevelList;
}
int ListHoneypotAlarmEventsRequest::getPageSize() const {
return pageSize_;
}
void ListHoneypotAlarmEventsRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListHoneypotAlarmEventsRequest::getDstIp() const {
return dstIp_;
}
void ListHoneypotAlarmEventsRequest::setDstIp(const std::string &dstIp) {
dstIp_ = dstIp;
setBodyParameter(std::string("DstIp"), dstIp);
}
std::string ListHoneypotAlarmEventsRequest::getDealed() const {
return dealed_;
}
void ListHoneypotAlarmEventsRequest::setDealed(const std::string &dealed) {
dealed_ = dealed;
setBodyParameter(std::string("Dealed"), dealed);
}
int ListHoneypotAlarmEventsRequest::getCurrentPage() const {
return currentPage_;
}
void ListHoneypotAlarmEventsRequest::setCurrentPage(int currentPage) {
currentPage_ = currentPage;
setBodyParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string ListHoneypotAlarmEventsRequest::getRequestId() const {
return requestId_;
}
void ListHoneypotAlarmEventsRequest::setRequestId(const std::string &requestId) {
requestId_ = requestId;
setBodyParameter(std::string("RequestId"), requestId);
}

View File

@@ -0,0 +1,105 @@
/*
* 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/sas/model/ListHoneypotAlarmEventsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
ListHoneypotAlarmEventsResult::ListHoneypotAlarmEventsResult() :
ServiceResult()
{}
ListHoneypotAlarmEventsResult::ListHoneypotAlarmEventsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListHoneypotAlarmEventsResult::~ListHoneypotAlarmEventsResult()
{}
void ListHoneypotAlarmEventsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allHoneypotAlarmEventsNode = value["HoneypotAlarmEvents"]["HoneypotAlarmEvent"];
for (auto valueHoneypotAlarmEventsHoneypotAlarmEvent : allHoneypotAlarmEventsNode)
{
HoneypotAlarmEvent honeypotAlarmEventsObject;
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventId"].isNull())
honeypotAlarmEventsObject.alarmEventId = std::stol(valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventId"].asString());
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventType"].isNull())
honeypotAlarmEventsObject.alarmEventType = valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventType"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventName"].isNull())
honeypotAlarmEventsObject.alarmEventName = valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmEventName"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmUniqueInfo"].isNull())
honeypotAlarmEventsObject.alarmUniqueInfo = valueHoneypotAlarmEventsHoneypotAlarmEvent["AlarmUniqueInfo"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["FirstTime"].isNull())
honeypotAlarmEventsObject.firstTime = std::stol(valueHoneypotAlarmEventsHoneypotAlarmEvent["FirstTime"].asString());
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["LastTime"].isNull())
honeypotAlarmEventsObject.lastTime = std::stol(valueHoneypotAlarmEventsHoneypotAlarmEvent["LastTime"].asString());
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["RiskLevel"].isNull())
honeypotAlarmEventsObject.riskLevel = valueHoneypotAlarmEventsHoneypotAlarmEvent["RiskLevel"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["EventCount"].isNull())
honeypotAlarmEventsObject.eventCount = std::stoi(valueHoneypotAlarmEventsHoneypotAlarmEvent["EventCount"].asString());
if(!valueHoneypotAlarmEventsHoneypotAlarmEvent["OperateStatus"].isNull())
honeypotAlarmEventsObject.operateStatus = std::stoi(valueHoneypotAlarmEventsHoneypotAlarmEvent["OperateStatus"].asString());
auto allMergeFieldListNode = valueHoneypotAlarmEventsHoneypotAlarmEvent["MergeFieldList"]["MergeFieldListItem"];
for (auto valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem : allMergeFieldListNode)
{
HoneypotAlarmEvent::MergeFieldListItem mergeFieldListObject;
if(!valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldType"].isNull())
mergeFieldListObject.fieldType = valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldType"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldKey"].isNull())
mergeFieldListObject.fieldKey = valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldKey"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldValue"].isNull())
mergeFieldListObject.fieldValue = valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldValue"].asString();
if(!valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldExtInfo"].isNull())
mergeFieldListObject.fieldExtInfo = valueHoneypotAlarmEventsHoneypotAlarmEventMergeFieldListMergeFieldListItem["FieldExtInfo"].asString();
honeypotAlarmEventsObject.mergeFieldList.push_back(mergeFieldListObject);
}
honeypotAlarmEvents_.push_back(honeypotAlarmEventsObject);
}
auto pageInfoNode = value["PageInfo"];
if(!pageInfoNode["CurrentPage"].isNull())
pageInfo_.currentPage = std::stoi(pageInfoNode["CurrentPage"].asString());
if(!pageInfoNode["PageSize"].isNull())
pageInfo_.pageSize = std::stoi(pageInfoNode["PageSize"].asString());
if(!pageInfoNode["TotalCount"].isNull())
pageInfo_.totalCount = std::stoi(pageInfoNode["TotalCount"].asString());
if(!pageInfoNode["Count"].isNull())
pageInfo_.count = std::stoi(pageInfoNode["Count"].asString());
if(!pageInfoNode["LastRowKey"].isNull())
pageInfo_.lastRowKey = pageInfoNode["LastRowKey"].asString();
if(!pageInfoNode["NextToken"].isNull())
pageInfo_.nextToken = pageInfoNode["NextToken"].asString();
}
ListHoneypotAlarmEventsResult::PageInfo ListHoneypotAlarmEventsResult::getPageInfo()const
{
return pageInfo_;
}
std::vector<ListHoneypotAlarmEventsResult::HoneypotAlarmEvent> ListHoneypotAlarmEventsResult::getHoneypotAlarmEvents()const
{
return honeypotAlarmEvents_;
}

View File

@@ -0,0 +1,72 @@
/*
* 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/sas/model/ListHoneypotNodeRequest.h>
using AlibabaCloud::Sas::Model::ListHoneypotNodeRequest;
ListHoneypotNodeRequest::ListHoneypotNodeRequest()
: RpcServiceRequest("sas", "2018-12-03", "ListHoneypotNode") {
setMethod(HttpRequest::Method::Post);
}
ListHoneypotNodeRequest::~ListHoneypotNodeRequest() {}
int ListHoneypotNodeRequest::getPageSize() const {
return pageSize_;
}
void ListHoneypotNodeRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListHoneypotNodeRequest::getLang() const {
return lang_;
}
void ListHoneypotNodeRequest::setLang(const std::string &lang) {
lang_ = lang;
setParameter(std::string("Lang"), lang);
}
std::string ListHoneypotNodeRequest::getNodeId() const {
return nodeId_;
}
void ListHoneypotNodeRequest::setNodeId(const std::string &nodeId) {
nodeId_ = nodeId;
setParameter(std::string("NodeId"), nodeId);
}
int ListHoneypotNodeRequest::getCurrentPage() const {
return currentPage_;
}
void ListHoneypotNodeRequest::setCurrentPage(int currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string ListHoneypotNodeRequest::getNodeName() const {
return nodeName_;
}
void ListHoneypotNodeRequest::setNodeName(const std::string &nodeName) {
nodeName_ = nodeName;
setParameter(std::string("NodeName"), nodeName);
}

View File

@@ -0,0 +1,128 @@
/*
* 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/sas/model/ListHoneypotNodeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
ListHoneypotNodeResult::ListHoneypotNodeResult() :
ServiceResult()
{}
ListHoneypotNodeResult::ListHoneypotNodeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListHoneypotNodeResult::~ListHoneypotNodeResult()
{}
void ListHoneypotNodeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allHoneypotNodeListNode = value["HoneypotNodeList"]["List"];
for (auto valueHoneypotNodeListList : allHoneypotNodeListNode)
{
List honeypotNodeListObject;
if(!valueHoneypotNodeListList["NodeId"].isNull())
honeypotNodeListObject.nodeId = valueHoneypotNodeListList["NodeId"].asString();
if(!valueHoneypotNodeListList["NodeName"].isNull())
honeypotNodeListObject.nodeName = valueHoneypotNodeListList["NodeName"].asString();
if(!valueHoneypotNodeListList["NodeVersion"].isNull())
honeypotNodeListObject.nodeVersion = valueHoneypotNodeListList["NodeVersion"].asString();
if(!valueHoneypotNodeListList["HoneypotTotalCount"].isNull())
honeypotNodeListObject.honeypotTotalCount = std::stoi(valueHoneypotNodeListList["HoneypotTotalCount"].asString());
if(!valueHoneypotNodeListList["HoneypotUsedCount"].isNull())
honeypotNodeListObject.honeypotUsedCount = std::stoi(valueHoneypotNodeListList["HoneypotUsedCount"].asString());
if(!valueHoneypotNodeListList["ProbeTotalCount"].isNull())
honeypotNodeListObject.probeTotalCount = std::stoi(valueHoneypotNodeListList["ProbeTotalCount"].asString());
if(!valueHoneypotNodeListList["ProbeUsedCount"].isNull())
honeypotNodeListObject.probeUsedCount = std::stoi(valueHoneypotNodeListList["ProbeUsedCount"].asString());
if(!valueHoneypotNodeListList["TotalStatus"].isNull())
honeypotNodeListObject.totalStatus = std::stoi(valueHoneypotNodeListList["TotalStatus"].asString());
if(!valueHoneypotNodeListList["EcsInstanceId"].isNull())
honeypotNodeListObject.ecsInstanceId = valueHoneypotNodeListList["EcsInstanceId"].asString();
if(!valueHoneypotNodeListList["CreateTime"].isNull())
honeypotNodeListObject.createTime = valueHoneypotNodeListList["CreateTime"].asString();
if(!valueHoneypotNodeListList["AllowHoneypotAccessInternet"].isNull())
honeypotNodeListObject.allowHoneypotAccessInternet = valueHoneypotNodeListList["AllowHoneypotAccessInternet"].asString() == "true";
if(!valueHoneypotNodeListList["DefaultNode"].isNull())
honeypotNodeListObject.defaultNode = valueHoneypotNodeListList["DefaultNode"].asString() == "true";
if(!valueHoneypotNodeListList["NodeIp"].isNull())
honeypotNodeListObject.nodeIp = valueHoneypotNodeListList["NodeIp"].asString();
auto allSecurityGroupProbeIpList = value["SecurityGroupProbeIpList"]["SecurityGroupProbeIp"];
for (auto value : allSecurityGroupProbeIpList)
honeypotNodeListObject.securityGroupProbeIpList.push_back(value.asString());
honeypotNodeList_.push_back(honeypotNodeListObject);
}
auto pageInfoNode = value["PageInfo"];
if(!pageInfoNode["CurrentPage"].isNull())
pageInfo_.currentPage = std::stoi(pageInfoNode["CurrentPage"].asString());
if(!pageInfoNode["PageSize"].isNull())
pageInfo_.pageSize = std::stoi(pageInfoNode["PageSize"].asString());
if(!pageInfoNode["TotalCount"].isNull())
pageInfo_.totalCount = std::stoi(pageInfoNode["TotalCount"].asString());
if(!pageInfoNode["Count"].isNull())
pageInfo_.count = std::stoi(pageInfoNode["Count"].asString());
if(!pageInfoNode["LastRowKey"].isNull())
pageInfo_.lastRowKey = pageInfoNode["LastRowKey"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
ListHoneypotNodeResult::PageInfo ListHoneypotNodeResult::getPageInfo()const
{
return pageInfo_;
}
std::vector<ListHoneypotNodeResult::List> ListHoneypotNodeResult::getHoneypotNodeList()const
{
return honeypotNodeList_;
}
std::string ListHoneypotNodeResult::getMessage()const
{
return message_;
}
int ListHoneypotNodeResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListHoneypotNodeResult::getCode()const
{
return code_;
}
bool ListHoneypotNodeResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,89 @@
/*
* 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/sas/model/ListHoneypotRequest.h>
using AlibabaCloud::Sas::Model::ListHoneypotRequest;
ListHoneypotRequest::ListHoneypotRequest()
: RpcServiceRequest("sas", "2018-12-03", "ListHoneypot") {
setMethod(HttpRequest::Method::Post);
}
ListHoneypotRequest::~ListHoneypotRequest() {}
std::string ListHoneypotRequest::getHoneypotName() const {
return honeypotName_;
}
void ListHoneypotRequest::setHoneypotName(const std::string &honeypotName) {
honeypotName_ = honeypotName;
setParameter(std::string("HoneypotName"), honeypotName);
}
int ListHoneypotRequest::getPageSize() const {
return pageSize_;
}
void ListHoneypotRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListHoneypotRequest::getLang() const {
return lang_;
}
void ListHoneypotRequest::setLang(const std::string &lang) {
lang_ = lang;
setParameter(std::string("Lang"), lang);
}
std::string ListHoneypotRequest::getNodeId() const {
return nodeId_;
}
void ListHoneypotRequest::setNodeId(const std::string &nodeId) {
nodeId_ = nodeId;
setParameter(std::string("NodeId"), nodeId);
}
int ListHoneypotRequest::getCurrentPage() const {
return currentPage_;
}
void ListHoneypotRequest::setCurrentPage(int currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
}
std::string ListHoneypotRequest::getNodeName() const {
return nodeName_;
}
void ListHoneypotRequest::setNodeName(const std::string &nodeName) {
nodeName_ = nodeName;
setParameter(std::string("NodeName"), nodeName);
}
std::vector<std::string> ListHoneypotRequest::getHoneypotIds() const {
return honeypotIds_;
}
void ListHoneypotRequest::setHoneypotIds(const std::vector<std::string> &honeypotIds) {
honeypotIds_ = honeypotIds;
}

View File

@@ -0,0 +1,116 @@
/*
* 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/sas/model/ListHoneypotResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sas;
using namespace AlibabaCloud::Sas::Model;
ListHoneypotResult::ListHoneypotResult() :
ServiceResult()
{}
ListHoneypotResult::ListHoneypotResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListHoneypotResult::~ListHoneypotResult()
{}
void ListHoneypotResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allListNode = value["List"]["ListItem"];
for (auto valueListListItem : allListNode)
{
ListItem listObject;
if(!valueListListItem["HoneypotId"].isNull())
listObject.honeypotId = valueListListItem["HoneypotId"].asString();
if(!valueListListItem["HoneypotName"].isNull())
listObject.honeypotName = valueListListItem["HoneypotName"].asString();
if(!valueListListItem["ControlNodeName"].isNull())
listObject.controlNodeName = valueListListItem["ControlNodeName"].asString();
if(!valueListListItem["HoneypotImageName"].isNull())
listObject.honeypotImageName = valueListListItem["HoneypotImageName"].asString();
if(!valueListListItem["PresetId"].isNull())
listObject.presetId = valueListListItem["PresetId"].asString();
if(!valueListListItem["HoneypotImageDisplayName"].isNull())
listObject.honeypotImageDisplayName = valueListListItem["HoneypotImageDisplayName"].asString();
if(!valueListListItem["NodeId"].isNull())
listObject.nodeId = valueListListItem["NodeId"].asString();
auto allState = value["State"]["State"];
for (auto value : allState)
listObject.state.push_back(value.asString());
list_.push_back(listObject);
}
auto pageInfoNode = value["PageInfo"];
if(!pageInfoNode["CurrentPage"].isNull())
pageInfo_.currentPage = std::stoi(pageInfoNode["CurrentPage"].asString());
if(!pageInfoNode["PageSize"].isNull())
pageInfo_.pageSize = std::stoi(pageInfoNode["PageSize"].asString());
if(!pageInfoNode["TotalCount"].isNull())
pageInfo_.totalCount = std::stoi(pageInfoNode["TotalCount"].asString());
if(!pageInfoNode["Count"].isNull())
pageInfo_.count = std::stoi(pageInfoNode["Count"].asString());
if(!pageInfoNode["LastRowKey"].isNull())
pageInfo_.lastRowKey = pageInfoNode["LastRowKey"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
ListHoneypotResult::PageInfo ListHoneypotResult::getPageInfo()const
{
return pageInfo_;
}
std::string ListHoneypotResult::getMessage()const
{
return message_;
}
int ListHoneypotResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListHoneypotResult::ListItem> ListHoneypotResult::getList()const
{
return list_;
}
std::string ListHoneypotResult::getCode()const
{
return code_;
}
bool ListHoneypotResult::getSuccess()const
{
return success_;
}