From e75a9596ef57a8e16e4330c663a69cea230a1a19 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 16 Aug 2022 13:57:05 +0000 Subject: [PATCH] Change GetFileDetectResult Public. --- VERSION | 2 +- sas/CMakeLists.txt | 28 ++ sas/include/alibabacloud/sas/SasClient.h | 56 ++++ .../sas/model/CreateHoneypotNodeRequest.h | 54 ++++ .../sas/model/CreateHoneypotNodeResult.h | 57 ++++ .../sas/model/CreateHoneypotProbeRequest.h | 95 +++++++ .../sas/model/CreateHoneypotProbeResult.h | 57 ++++ .../sas/model/CreateHoneypotRequest.h | 63 +++++ .../sas/model/CreateHoneypotResult.h | 70 +++++ .../sas/model/DescribeCheckWarningsRequest.h | 3 + .../sas/model/DescribeGroupedVulResult.h | 1 + .../sas/model/DescribeOnceTaskRequest.h | 12 + .../sas/model/DescribeOnceTaskResult.h | 2 + .../model/DescribeWarningMachinesRequest.h | 3 + .../model/DescribeWebLockFileEventsRequest.h | 63 +++++ .../model/DescribeWebLockFileEventsResult.h | 78 ++++++ .../sas/model/GetFileDetectResultResult.h | 2 + .../model/ListHoneypotAlarmEventsRequest.h | 60 +++++ .../sas/model/ListHoneypotAlarmEventsResult.h | 82 ++++++ .../sas/model/ListHoneypotNodeRequest.h | 54 ++++ .../sas/model/ListHoneypotNodeResult.h | 86 ++++++ .../sas/model/ListHoneypotRequest.h | 60 +++++ .../sas/model/ListHoneypotResult.h | 80 ++++++ sas/src/SasClient.cc | 252 ++++++++++++++++++ sas/src/model/CreateHoneypotNodeRequest.cc | 71 +++++ sas/src/model/CreateHoneypotNodeResult.cc | 72 +++++ sas/src/model/CreateHoneypotProbeRequest.cc | 174 ++++++++++++ sas/src/model/CreateHoneypotProbeResult.cc | 72 +++++ sas/src/model/CreateHoneypotRequest.cc | 99 +++++++ sas/src/model/CreateHoneypotResult.cc | 95 +++++++ sas/src/model/DescribeCheckWarningsRequest.cc | 9 + sas/src/model/DescribeGroupedVulResult.cc | 2 + sas/src/model/DescribeOnceTaskRequest.cc | 35 +++ sas/src/model/DescribeOnceTaskResult.cc | 4 + .../model/DescribeWarningMachinesRequest.cc | 9 + .../model/DescribeWebLockFileEventsRequest.cc | 99 +++++++ .../model/DescribeWebLockFileEventsResult.cc | 112 ++++++++ sas/src/model/GetFileDetectResultResult.cc | 4 + .../model/ListHoneypotAlarmEventsRequest.cc | 89 +++++++ .../model/ListHoneypotAlarmEventsResult.cc | 105 ++++++++ sas/src/model/ListHoneypotNodeRequest.cc | 72 +++++ sas/src/model/ListHoneypotNodeResult.cc | 128 +++++++++ sas/src/model/ListHoneypotRequest.cc | 89 +++++++ sas/src/model/ListHoneypotResult.cc | 116 ++++++++ 44 files changed, 2775 insertions(+), 1 deletion(-) create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotNodeRequest.h create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotNodeResult.h create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotProbeRequest.h create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotProbeResult.h create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotRequest.h create mode 100644 sas/include/alibabacloud/sas/model/CreateHoneypotResult.h create mode 100644 sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsRequest.h create mode 100644 sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsResult.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsRequest.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsResult.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotNodeRequest.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotNodeResult.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotRequest.h create mode 100644 sas/include/alibabacloud/sas/model/ListHoneypotResult.h create mode 100644 sas/src/model/CreateHoneypotNodeRequest.cc create mode 100644 sas/src/model/CreateHoneypotNodeResult.cc create mode 100644 sas/src/model/CreateHoneypotProbeRequest.cc create mode 100644 sas/src/model/CreateHoneypotProbeResult.cc create mode 100644 sas/src/model/CreateHoneypotRequest.cc create mode 100644 sas/src/model/CreateHoneypotResult.cc create mode 100644 sas/src/model/DescribeWebLockFileEventsRequest.cc create mode 100644 sas/src/model/DescribeWebLockFileEventsResult.cc create mode 100644 sas/src/model/ListHoneypotAlarmEventsRequest.cc create mode 100644 sas/src/model/ListHoneypotAlarmEventsResult.cc create mode 100644 sas/src/model/ListHoneypotNodeRequest.cc create mode 100644 sas/src/model/ListHoneypotNodeResult.cc create mode 100644 sas/src/model/ListHoneypotRequest.cc create mode 100644 sas/src/model/ListHoneypotResult.cc diff --git a/VERSION b/VERSION index 5a1669975..660030e46 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1225 \ No newline at end of file +1.36.1226 \ No newline at end of file diff --git a/sas/CMakeLists.txt b/sas/CMakeLists.txt index 43bfb8815..0a384aa23 100644 --- a/sas/CMakeLists.txt +++ b/sas/CMakeLists.txt @@ -37,6 +37,12 @@ set(sas_public_header_model include/alibabacloud/sas/model/CreateFileDetectResult.h include/alibabacloud/sas/model/CreateFileDetectUploadUrlRequest.h include/alibabacloud/sas/model/CreateFileDetectUploadUrlResult.h + include/alibabacloud/sas/model/CreateHoneypotRequest.h + include/alibabacloud/sas/model/CreateHoneypotResult.h + include/alibabacloud/sas/model/CreateHoneypotNodeRequest.h + include/alibabacloud/sas/model/CreateHoneypotNodeResult.h + include/alibabacloud/sas/model/CreateHoneypotProbeRequest.h + include/alibabacloud/sas/model/CreateHoneypotProbeResult.h include/alibabacloud/sas/model/CreateOrUpdateAssetGroupRequest.h include/alibabacloud/sas/model/CreateOrUpdateAssetGroupResult.h include/alibabacloud/sas/model/CreateServiceLinkedRoleRequest.h @@ -307,6 +313,8 @@ set(sas_public_header_model include/alibabacloud/sas/model/DescribeWebLockBindListResult.h include/alibabacloud/sas/model/DescribeWebLockConfigListRequest.h include/alibabacloud/sas/model/DescribeWebLockConfigListResult.h + include/alibabacloud/sas/model/DescribeWebLockFileEventsRequest.h + include/alibabacloud/sas/model/DescribeWebLockFileEventsResult.h include/alibabacloud/sas/model/ExportRecordRequest.h include/alibabacloud/sas/model/ExportRecordResult.h include/alibabacloud/sas/model/ExportVulRequest.h @@ -339,6 +347,12 @@ set(sas_public_header_model include/alibabacloud/sas/model/ListCheckInstanceResultResult.h include/alibabacloud/sas/model/ListCheckResultRequest.h include/alibabacloud/sas/model/ListCheckResultResult.h + include/alibabacloud/sas/model/ListHoneypotRequest.h + include/alibabacloud/sas/model/ListHoneypotResult.h + include/alibabacloud/sas/model/ListHoneypotAlarmEventsRequest.h + include/alibabacloud/sas/model/ListHoneypotAlarmEventsResult.h + include/alibabacloud/sas/model/ListHoneypotNodeRequest.h + include/alibabacloud/sas/model/ListHoneypotNodeResult.h include/alibabacloud/sas/model/ListVulAutoRepairConfigRequest.h include/alibabacloud/sas/model/ListVulAutoRepairConfigResult.h include/alibabacloud/sas/model/ModifyAntiBruteForceRuleRequest.h @@ -464,6 +478,12 @@ set(sas_src src/model/CreateFileDetectResult.cc src/model/CreateFileDetectUploadUrlRequest.cc src/model/CreateFileDetectUploadUrlResult.cc + src/model/CreateHoneypotRequest.cc + src/model/CreateHoneypotResult.cc + src/model/CreateHoneypotNodeRequest.cc + src/model/CreateHoneypotNodeResult.cc + src/model/CreateHoneypotProbeRequest.cc + src/model/CreateHoneypotProbeResult.cc src/model/CreateOrUpdateAssetGroupRequest.cc src/model/CreateOrUpdateAssetGroupResult.cc src/model/CreateServiceLinkedRoleRequest.cc @@ -734,6 +754,8 @@ set(sas_src src/model/DescribeWebLockBindListResult.cc src/model/DescribeWebLockConfigListRequest.cc src/model/DescribeWebLockConfigListResult.cc + src/model/DescribeWebLockFileEventsRequest.cc + src/model/DescribeWebLockFileEventsResult.cc src/model/ExportRecordRequest.cc src/model/ExportRecordResult.cc src/model/ExportVulRequest.cc @@ -766,6 +788,12 @@ set(sas_src src/model/ListCheckInstanceResultResult.cc src/model/ListCheckResultRequest.cc src/model/ListCheckResultResult.cc + src/model/ListHoneypotRequest.cc + src/model/ListHoneypotResult.cc + src/model/ListHoneypotAlarmEventsRequest.cc + src/model/ListHoneypotAlarmEventsResult.cc + src/model/ListHoneypotNodeRequest.cc + src/model/ListHoneypotNodeResult.cc src/model/ListVulAutoRepairConfigRequest.cc src/model/ListVulAutoRepairConfigResult.cc src/model/ModifyAntiBruteForceRuleRequest.cc diff --git a/sas/include/alibabacloud/sas/SasClient.h b/sas/include/alibabacloud/sas/SasClient.h index 31e58d4a0..2388fd8c1 100644 --- a/sas/include/alibabacloud/sas/SasClient.h +++ b/sas/include/alibabacloud/sas/SasClient.h @@ -38,6 +38,12 @@ #include "model/CreateFileDetectResult.h" #include "model/CreateFileDetectUploadUrlRequest.h" #include "model/CreateFileDetectUploadUrlResult.h" +#include "model/CreateHoneypotRequest.h" +#include "model/CreateHoneypotResult.h" +#include "model/CreateHoneypotNodeRequest.h" +#include "model/CreateHoneypotNodeResult.h" +#include "model/CreateHoneypotProbeRequest.h" +#include "model/CreateHoneypotProbeResult.h" #include "model/CreateOrUpdateAssetGroupRequest.h" #include "model/CreateOrUpdateAssetGroupResult.h" #include "model/CreateServiceLinkedRoleRequest.h" @@ -308,6 +314,8 @@ #include "model/DescribeWebLockBindListResult.h" #include "model/DescribeWebLockConfigListRequest.h" #include "model/DescribeWebLockConfigListResult.h" +#include "model/DescribeWebLockFileEventsRequest.h" +#include "model/DescribeWebLockFileEventsResult.h" #include "model/ExportRecordRequest.h" #include "model/ExportRecordResult.h" #include "model/ExportVulRequest.h" @@ -340,6 +348,12 @@ #include "model/ListCheckInstanceResultResult.h" #include "model/ListCheckResultRequest.h" #include "model/ListCheckResultResult.h" +#include "model/ListHoneypotRequest.h" +#include "model/ListHoneypotResult.h" +#include "model/ListHoneypotAlarmEventsRequest.h" +#include "model/ListHoneypotAlarmEventsResult.h" +#include "model/ListHoneypotNodeRequest.h" +#include "model/ListHoneypotNodeResult.h" #include "model/ListVulAutoRepairConfigRequest.h" #include "model/ListVulAutoRepairConfigResult.h" #include "model/ModifyAntiBruteForceRuleRequest.h" @@ -479,6 +493,15 @@ namespace AlibabaCloud typedef Outcome CreateFileDetectUploadUrlOutcome; typedef std::future CreateFileDetectUploadUrlOutcomeCallable; typedef std::function&)> CreateFileDetectUploadUrlAsyncHandler; + typedef Outcome CreateHoneypotOutcome; + typedef std::future CreateHoneypotOutcomeCallable; + typedef std::function&)> CreateHoneypotAsyncHandler; + typedef Outcome CreateHoneypotNodeOutcome; + typedef std::future CreateHoneypotNodeOutcomeCallable; + typedef std::function&)> CreateHoneypotNodeAsyncHandler; + typedef Outcome CreateHoneypotProbeOutcome; + typedef std::future CreateHoneypotProbeOutcomeCallable; + typedef std::function&)> CreateHoneypotProbeAsyncHandler; typedef Outcome CreateOrUpdateAssetGroupOutcome; typedef std::future CreateOrUpdateAssetGroupOutcomeCallable; typedef std::function&)> CreateOrUpdateAssetGroupAsyncHandler; @@ -884,6 +907,9 @@ namespace AlibabaCloud typedef Outcome DescribeWebLockConfigListOutcome; typedef std::future DescribeWebLockConfigListOutcomeCallable; typedef std::function&)> DescribeWebLockConfigListAsyncHandler; + typedef Outcome DescribeWebLockFileEventsOutcome; + typedef std::future DescribeWebLockFileEventsOutcomeCallable; + typedef std::function&)> DescribeWebLockFileEventsAsyncHandler; typedef Outcome ExportRecordOutcome; typedef std::future ExportRecordOutcomeCallable; typedef std::function&)> ExportRecordAsyncHandler; @@ -932,6 +958,15 @@ namespace AlibabaCloud typedef Outcome ListCheckResultOutcome; typedef std::future ListCheckResultOutcomeCallable; typedef std::function&)> ListCheckResultAsyncHandler; + typedef Outcome ListHoneypotOutcome; + typedef std::future ListHoneypotOutcomeCallable; + typedef std::function&)> ListHoneypotAsyncHandler; + typedef Outcome ListHoneypotAlarmEventsOutcome; + typedef std::future ListHoneypotAlarmEventsOutcomeCallable; + typedef std::function&)> ListHoneypotAlarmEventsAsyncHandler; + typedef Outcome ListHoneypotNodeOutcome; + typedef std::future ListHoneypotNodeOutcomeCallable; + typedef std::function&)> ListHoneypotNodeAsyncHandler; typedef Outcome ListVulAutoRepairConfigOutcome; typedef std::future ListVulAutoRepairConfigOutcomeCallable; typedef std::function&)> ListVulAutoRepairConfigAsyncHandler; @@ -1120,6 +1155,15 @@ namespace AlibabaCloud CreateFileDetectUploadUrlOutcome createFileDetectUploadUrl(const Model::CreateFileDetectUploadUrlRequest &request)const; void createFileDetectUploadUrlAsync(const Model::CreateFileDetectUploadUrlRequest& request, const CreateFileDetectUploadUrlAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateFileDetectUploadUrlOutcomeCallable createFileDetectUploadUrlCallable(const Model::CreateFileDetectUploadUrlRequest& request) const; + CreateHoneypotOutcome createHoneypot(const Model::CreateHoneypotRequest &request)const; + void createHoneypotAsync(const Model::CreateHoneypotRequest& request, const CreateHoneypotAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateHoneypotOutcomeCallable createHoneypotCallable(const Model::CreateHoneypotRequest& request) const; + CreateHoneypotNodeOutcome createHoneypotNode(const Model::CreateHoneypotNodeRequest &request)const; + void createHoneypotNodeAsync(const Model::CreateHoneypotNodeRequest& request, const CreateHoneypotNodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateHoneypotNodeOutcomeCallable createHoneypotNodeCallable(const Model::CreateHoneypotNodeRequest& request) const; + CreateHoneypotProbeOutcome createHoneypotProbe(const Model::CreateHoneypotProbeRequest &request)const; + void createHoneypotProbeAsync(const Model::CreateHoneypotProbeRequest& request, const CreateHoneypotProbeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateHoneypotProbeOutcomeCallable createHoneypotProbeCallable(const Model::CreateHoneypotProbeRequest& request) const; CreateOrUpdateAssetGroupOutcome createOrUpdateAssetGroup(const Model::CreateOrUpdateAssetGroupRequest &request)const; void createOrUpdateAssetGroupAsync(const Model::CreateOrUpdateAssetGroupRequest& request, const CreateOrUpdateAssetGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateOrUpdateAssetGroupOutcomeCallable createOrUpdateAssetGroupCallable(const Model::CreateOrUpdateAssetGroupRequest& request) const; @@ -1525,6 +1569,9 @@ namespace AlibabaCloud DescribeWebLockConfigListOutcome describeWebLockConfigList(const Model::DescribeWebLockConfigListRequest &request)const; void describeWebLockConfigListAsync(const Model::DescribeWebLockConfigListRequest& request, const DescribeWebLockConfigListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeWebLockConfigListOutcomeCallable describeWebLockConfigListCallable(const Model::DescribeWebLockConfigListRequest& request) const; + DescribeWebLockFileEventsOutcome describeWebLockFileEvents(const Model::DescribeWebLockFileEventsRequest &request)const; + void describeWebLockFileEventsAsync(const Model::DescribeWebLockFileEventsRequest& request, const DescribeWebLockFileEventsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeWebLockFileEventsOutcomeCallable describeWebLockFileEventsCallable(const Model::DescribeWebLockFileEventsRequest& request) const; ExportRecordOutcome exportRecord(const Model::ExportRecordRequest &request)const; void exportRecordAsync(const Model::ExportRecordRequest& request, const ExportRecordAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ExportRecordOutcomeCallable exportRecordCallable(const Model::ExportRecordRequest& request) const; @@ -1573,6 +1620,15 @@ namespace AlibabaCloud ListCheckResultOutcome listCheckResult(const Model::ListCheckResultRequest &request)const; void listCheckResultAsync(const Model::ListCheckResultRequest& request, const ListCheckResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListCheckResultOutcomeCallable listCheckResultCallable(const Model::ListCheckResultRequest& request) const; + ListHoneypotOutcome listHoneypot(const Model::ListHoneypotRequest &request)const; + void listHoneypotAsync(const Model::ListHoneypotRequest& request, const ListHoneypotAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListHoneypotOutcomeCallable listHoneypotCallable(const Model::ListHoneypotRequest& request) const; + ListHoneypotAlarmEventsOutcome listHoneypotAlarmEvents(const Model::ListHoneypotAlarmEventsRequest &request)const; + void listHoneypotAlarmEventsAsync(const Model::ListHoneypotAlarmEventsRequest& request, const ListHoneypotAlarmEventsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListHoneypotAlarmEventsOutcomeCallable listHoneypotAlarmEventsCallable(const Model::ListHoneypotAlarmEventsRequest& request) const; + ListHoneypotNodeOutcome listHoneypotNode(const Model::ListHoneypotNodeRequest &request)const; + void listHoneypotNodeAsync(const Model::ListHoneypotNodeRequest& request, const ListHoneypotNodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListHoneypotNodeOutcomeCallable listHoneypotNodeCallable(const Model::ListHoneypotNodeRequest& request) const; ListVulAutoRepairConfigOutcome listVulAutoRepairConfig(const Model::ListVulAutoRepairConfigRequest &request)const; void listVulAutoRepairConfigAsync(const Model::ListVulAutoRepairConfigRequest& request, const ListVulAutoRepairConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListVulAutoRepairConfigOutcomeCallable listVulAutoRepairConfigCallable(const Model::ListVulAutoRepairConfigRequest& request) const; diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotNodeRequest.h b/sas/include/alibabacloud/sas/model/CreateHoneypotNodeRequest.h new file mode 100644 index 000000000..1767c7ca2 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotNodeRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTNODEREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTNODEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT CreateHoneypotNodeRequest : public RpcServiceRequest { +public: + CreateHoneypotNodeRequest(); + ~CreateHoneypotNodeRequest(); + int getAvailableProbeNum() const; + void setAvailableProbeNum(int availableProbeNum); + bool getAllowHoneypotAccessInternet() const; + void setAllowHoneypotAccessInternet(bool allowHoneypotAccessInternet); + std::string getNodeName() const; + void setNodeName(const std::string &nodeName); + std::vector getSecurityGroupProbeIpList() const; + void setSecurityGroupProbeIpList(const std::vector &securityGroupProbeIpList); + std::string getNodeVersion() const; + void setNodeVersion(const std::string &nodeVersion); + +private: + int availableProbeNum_; + bool allowHoneypotAccessInternet_; + std::string nodeName_; + std::vector securityGroupProbeIpList_; + std::string nodeVersion_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTNODEREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotNodeResult.h b/sas/include/alibabacloud/sas/model/CreateHoneypotNodeResult.h new file mode 100644 index 000000000..91fa0c4a4 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotNodeResult.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_SAS_MODEL_CREATEHONEYPOTNODERESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTNODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT CreateHoneypotNodeResult : public ServiceResult + { + public: + + + CreateHoneypotNodeResult(); + explicit CreateHoneypotNodeResult(const std::string &payload); + ~CreateHoneypotNodeResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTNODERESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotProbeRequest.h b/sas/include/alibabacloud/sas/model/CreateHoneypotProbeRequest.h new file mode 100644 index 000000000..0fd1426ff --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotProbeRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTPROBEREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTPROBEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT CreateHoneypotProbeRequest : public RpcServiceRequest { +public: + struct HoneypotBindList { + struct BindPortList { + int startPort; + bool bindPort; + bool fixed; + int endPort; + int targetPort; + }; + std::vector bindPortList; + std::string honeypotId; + }; + CreateHoneypotProbeRequest(); + ~CreateHoneypotProbeRequest(); + std::string getControlNodeId() const; + void setControlNodeId(const std::string &controlNodeId); + std::string getProxyIp() const; + void setProxyIp(const std::string &proxyIp); + bool getPing() const; + void setPing(bool ping); + std::string getProbeId() const; + void setProbeId(const std::string &probeId); + std::string getUuid() const; + void setUuid(const std::string &uuid); + std::string getProbeVersion() const; + void setProbeVersion(const std::string &probeVersion); + std::vector getServiceIpList() const; + void setServiceIpList(const std::vector &serviceIpList); + std::vector getHoneypotBindList() const; + void setHoneypotBindList(const std::vector &honeypotBindList); + std::string getLang() const; + void setLang(const std::string &lang); + bool getArp() const; + void setArp(bool arp); + std::string getProbeType() const; + void setProbeType(const std::string &probeType); + std::string getProbeStatus() const; + void setProbeStatus(const std::string &probeStatus); + std::string getBusinessGroupId() const; + void setBusinessGroupId(const std::string &businessGroupId); + std::string getDisplayName() const; + void setDisplayName(const std::string &displayName); + std::string getVpcId() const; + void setVpcId(const std::string &vpcId); + +private: + std::string controlNodeId_; + std::string proxyIp_; + bool ping_; + std::string probeId_; + std::string uuid_; + std::string probeVersion_; + std::vector serviceIpList_; + std::vector honeypotBindList_; + std::string lang_; + bool arp_; + std::string probeType_; + std::string probeStatus_; + std::string businessGroupId_; + std::string displayName_; + std::string vpcId_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTPROBEREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotProbeResult.h b/sas/include/alibabacloud/sas/model/CreateHoneypotProbeResult.h new file mode 100644 index 000000000..26174ae55 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotProbeResult.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_SAS_MODEL_CREATEHONEYPOTPROBERESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTPROBERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT CreateHoneypotProbeResult : public ServiceResult + { + public: + + + CreateHoneypotProbeResult(); + explicit CreateHoneypotProbeResult(const std::string &payload); + ~CreateHoneypotProbeResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTPROBERESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotRequest.h b/sas/include/alibabacloud/sas/model/CreateHoneypotRequest.h new file mode 100644 index 000000000..fc3a16e7f --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT CreateHoneypotRequest : public RpcServiceRequest { +public: + CreateHoneypotRequest(); + ~CreateHoneypotRequest(); + std::string getHoneypotName() const; + void setHoneypotName(const std::string &honeypotName); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getLang() const; + void setLang(const std::string &lang); + std::string getNodeId() const; + void setNodeId(const std::string &nodeId); + std::string getHoneypotImageId() const; + void setHoneypotImageId(const std::string &honeypotImageId); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::string getMeta() const; + void setMeta(const std::string &meta); + std::string getHoneypotImageName() const; + void setHoneypotImageName(const std::string &honeypotImageName); + +private: + std::string honeypotName_; + int pageSize_; + std::string lang_; + std::string nodeId_; + std::string honeypotImageId_; + int currentPage_; + std::string meta_; + std::string honeypotImageName_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/CreateHoneypotResult.h b/sas/include/alibabacloud/sas/model/CreateHoneypotResult.h new file mode 100644 index 000000000..38b4a9776 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/CreateHoneypotResult.h @@ -0,0 +1,70 @@ +/* + * 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_SAS_MODEL_CREATEHONEYPOTRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT CreateHoneypotResult : public ServiceResult + { + public: + struct Data + { + std::string honeypotImageName; + std::string controlNodeName; + std::string honeypotId; + std::vector state; + std::string presetId; + std::string honeypotImageDisplayName; + std::string nodeId; + std::string honeypotName; + }; + + + CreateHoneypotResult(); + explicit CreateHoneypotResult(const std::string &payload); + ~CreateHoneypotResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + Data getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + Data data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_CREATEHONEYPOTRESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/DescribeCheckWarningsRequest.h b/sas/include/alibabacloud/sas/model/DescribeCheckWarningsRequest.h index 157655057..23559f8ae 100644 --- a/sas/include/alibabacloud/sas/model/DescribeCheckWarningsRequest.h +++ b/sas/include/alibabacloud/sas/model/DescribeCheckWarningsRequest.h @@ -46,6 +46,8 @@ public: void setCurrentPage(int currentPage); long getRiskId() const; void setRiskId(long riskId); + int getRiskStatus() const; + void setRiskStatus(int riskStatus); private: std::string uuid_; @@ -56,6 +58,7 @@ private: long checkId_; int currentPage_; long riskId_; + int riskStatus_; }; } // namespace Model } // namespace Sas diff --git a/sas/include/alibabacloud/sas/model/DescribeGroupedVulResult.h b/sas/include/alibabacloud/sas/model/DescribeGroupedVulResult.h index fbeb0f4d1..b55e48c61 100644 --- a/sas/include/alibabacloud/sas/model/DescribeGroupedVulResult.h +++ b/sas/include/alibabacloud/sas/model/DescribeGroupedVulResult.h @@ -40,6 +40,7 @@ namespace AlibabaCloud int handledCount; std::string aliasName; int asapCount; + long ruleModifyTime; int nntfCount; long totalFixCount; std::string tags; diff --git a/sas/include/alibabacloud/sas/model/DescribeOnceTaskRequest.h b/sas/include/alibabacloud/sas/model/DescribeOnceTaskRequest.h index d878770f7..b3da622e0 100644 --- a/sas/include/alibabacloud/sas/model/DescribeOnceTaskRequest.h +++ b/sas/include/alibabacloud/sas/model/DescribeOnceTaskRequest.h @@ -30,6 +30,10 @@ class ALIBABACLOUD_SAS_EXPORT DescribeOnceTaskRequest : public RpcServiceRequest public: DescribeOnceTaskRequest(); ~DescribeOnceTaskRequest(); + std::vector getStatusList() const; + void setStatusList(const std::vector &statusList); + std::string getSource() const; + void setSource(const std::string &source); std::string getSourceIp() const; void setSourceIp(const std::string &sourceIp); std::string getRootTaskId() const; @@ -38,21 +42,29 @@ public: void setEndTimeQuery(long endTimeQuery); int getPageSize() const; void setPageSize(int pageSize); + int getFinish() const; + void setFinish(int finish); std::string getTaskType() const; void setTaskType(const std::string &taskType); long getStartTimeQuery() const; void setStartTimeQuery(long startTimeQuery); int getCurrentPage() const; void setCurrentPage(int currentPage); + std::string getTargetQuery() const; + void setTargetQuery(const std::string &targetQuery); private: + std::vector statusList_; + std::string source_; std::string sourceIp_; std::string rootTaskId_; long endTimeQuery_; int pageSize_; + int finish_; std::string taskType_; long startTimeQuery_; int currentPage_; + std::string targetQuery_; }; } // namespace Model } // namespace Sas diff --git a/sas/include/alibabacloud/sas/model/DescribeOnceTaskResult.h b/sas/include/alibabacloud/sas/model/DescribeOnceTaskResult.h index 51d89750b..12ec6e8e6 100644 --- a/sas/include/alibabacloud/sas/model/DescribeOnceTaskResult.h +++ b/sas/include/alibabacloud/sas/model/DescribeOnceTaskResult.h @@ -41,6 +41,7 @@ namespace AlibabaCloud }; struct TaskManageResponse { + std::string context; std::string progress; std::string taskId; std::string taskName; @@ -50,6 +51,7 @@ namespace AlibabaCloud std::string taskStatusText; std::string detailData; long taskStartTime; + std::string source; }; diff --git a/sas/include/alibabacloud/sas/model/DescribeWarningMachinesRequest.h b/sas/include/alibabacloud/sas/model/DescribeWarningMachinesRequest.h index d96fb93ef..e01c1ec98 100644 --- a/sas/include/alibabacloud/sas/model/DescribeWarningMachinesRequest.h +++ b/sas/include/alibabacloud/sas/model/DescribeWarningMachinesRequest.h @@ -44,6 +44,8 @@ public: void setMachineName(const std::string &machineName); std::string getLang() const; void setLang(const std::string &lang); + int getHaveRisk() const; + void setHaveRisk(int haveRisk); int getCurrentPage() const; void setCurrentPage(int currentPage); std::string getClusterId() const; @@ -63,6 +65,7 @@ private: int pageSize_; std::string machineName_; std::string lang_; + int haveRisk_; int currentPage_; std::string clusterId_; long riskId_; diff --git a/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsRequest.h b/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsRequest.h new file mode 100644 index 000000000..9074880d1 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT DescribeWebLockFileEventsRequest : public RpcServiceRequest { +public: + DescribeWebLockFileEventsRequest(); + ~DescribeWebLockFileEventsRequest(); + std::string getRemark() const; + void setRemark(const std::string &remark); + std::string getSourceIp() const; + void setSourceIp(const std::string &sourceIp); + int getPageSize() const; + void setPageSize(int pageSize); + long getTsEnd() const; + void setTsEnd(long tsEnd); + std::string getProcessName() const; + void setProcessName(const std::string &processName); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::string getDealed() const; + void setDealed(const std::string &dealed); + long getTsBegin() const; + void setTsBegin(long tsBegin); + +private: + std::string remark_; + std::string sourceIp_; + int pageSize_; + long tsEnd_; + std::string processName_; + int currentPage_; + std::string dealed_; + long tsBegin_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsResult.h b/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsResult.h new file mode 100644 index 000000000..5e6ba74db --- /dev/null +++ b/sas/include/alibabacloud/sas/model/DescribeWebLockFileEventsResult.h @@ -0,0 +1,78 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT DescribeWebLockFileEventsResult : public ServiceResult + { + public: + struct Info + { + std::string status; + std::string path; + std::string processName; + std::string eventType; + std::string ip; + std::string eventStatus; + std::string eventName; + long count; + std::string processPath; + std::string intranetIp; + long ds; + std::string instanceName; + std::string uuid; + std::string internetIp; + std::string level; + long id; + long gmtEvent; + std::string solution; + }; + + + DescribeWebLockFileEventsResult(); + explicit DescribeWebLockFileEventsResult(const std::string &payload); + ~DescribeWebLockFileEventsResult(); + int getTotalCount()const; + int getPageSize()const; + int getCurrentPage()const; + std::vector getList()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int currentPage_; + std::vector list_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_DESCRIBEWEBLOCKFILEEVENTSRESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h b/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h index 77be22639..9264da411 100644 --- a/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h +++ b/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h @@ -38,6 +38,8 @@ namespace AlibabaCloud int score; std::string virusType; std::string hashKey; + std::string errorCode; + std::string errorMessage; int result; }; diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsRequest.h b/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsRequest.h new file mode 100644 index 000000000..88347801b --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsRequest.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_SAS_MODEL_LISTHONEYPOTALARMEVENTSREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTALARMEVENTSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT ListHoneypotAlarmEventsRequest : public RpcServiceRequest { +public: + ListHoneypotAlarmEventsRequest(); + ~ListHoneypotAlarmEventsRequest(); + std::string getSrcIp() const; + void setSrcIp(const std::string &srcIp); + std::vector getRiskLevelList() const; + void setRiskLevelList(const std::vector &riskLevelList); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getDstIp() const; + void setDstIp(const std::string &dstIp); + std::string getDealed() const; + void setDealed(const std::string &dealed); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::string getRequestId() const; + void setRequestId(const std::string &requestId); + +private: + std::string srcIp_; + std::vector riskLevelList_; + int pageSize_; + std::string dstIp_; + std::string dealed_; + int currentPage_; + std::string requestId_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTALARMEVENTSREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsResult.h b/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsResult.h new file mode 100644 index 000000000..a29045de0 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotAlarmEventsResult.h @@ -0,0 +1,82 @@ +/* + * 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_SAS_MODEL_LISTHONEYPOTALARMEVENTSRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTALARMEVENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT ListHoneypotAlarmEventsResult : public ServiceResult + { + public: + struct PageInfo + { + int totalCount; + int pageSize; + std::string nextToken; + int currentPage; + int count; + std::string lastRowKey; + }; + struct HoneypotAlarmEvent + { + struct MergeFieldListItem + { + std::string fieldExtInfo; + std::string fieldValue; + std::string fieldType; + std::string fieldKey; + }; + long firstTime; + int operateStatus; + long alarmEventId; + int eventCount; + std::string alarmEventType; + std::string alarmEventName; + std::string alarmUniqueInfo; + std::vector mergeFieldList; + std::string riskLevel; + long lastTime; + }; + + + ListHoneypotAlarmEventsResult(); + explicit ListHoneypotAlarmEventsResult(const std::string &payload); + ~ListHoneypotAlarmEventsResult(); + PageInfo getPageInfo()const; + std::vector getHoneypotAlarmEvents()const; + + protected: + void parse(const std::string &payload); + private: + PageInfo pageInfo_; + std::vector honeypotAlarmEvents_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTALARMEVENTSRESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotNodeRequest.h b/sas/include/alibabacloud/sas/model/ListHoneypotNodeRequest.h new file mode 100644 index 000000000..49cfac7d1 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotNodeRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODEREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT ListHoneypotNodeRequest : public RpcServiceRequest { +public: + ListHoneypotNodeRequest(); + ~ListHoneypotNodeRequest(); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getLang() const; + void setLang(const std::string &lang); + std::string getNodeId() const; + void setNodeId(const std::string &nodeId); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::string getNodeName() const; + void setNodeName(const std::string &nodeName); + +private: + int pageSize_; + std::string lang_; + std::string nodeId_; + int currentPage_; + std::string nodeName_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODEREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotNodeResult.h b/sas/include/alibabacloud/sas/model/ListHoneypotNodeResult.h new file mode 100644 index 000000000..de22a1d54 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotNodeResult.h @@ -0,0 +1,86 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODERESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT ListHoneypotNodeResult : public ServiceResult + { + public: + struct PageInfo + { + int totalCount; + int pageSize; + int currentPage; + int count; + std::string lastRowKey; + }; + struct List + { + int probeTotalCount; + std::string nodeName; + std::string createTime; + bool allowHoneypotAccessInternet; + std::string nodeIp; + std::vector securityGroupProbeIpList; + std::string nodeVersion; + int honeypotTotalCount; + std::string ecsInstanceId; + int probeUsedCount; + std::string nodeId; + bool defaultNode; + int honeypotUsedCount; + int totalStatus; + }; + + + ListHoneypotNodeResult(); + explicit ListHoneypotNodeResult(const std::string &payload); + ~ListHoneypotNodeResult(); + PageInfo getPageInfo()const; + std::vector getHoneypotNodeList()const; + std::string getMessage()const; + int getHttpStatusCode()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + PageInfo pageInfo_; + std::vector honeypotNodeList_; + std::string message_; + int httpStatusCode_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTNODERESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotRequest.h b/sas/include/alibabacloud/sas/model/ListHoneypotRequest.h new file mode 100644 index 000000000..8f82341f5 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotRequest.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_SAS_MODEL_LISTHONEYPOTREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT ListHoneypotRequest : public RpcServiceRequest { +public: + ListHoneypotRequest(); + ~ListHoneypotRequest(); + std::string getHoneypotName() const; + void setHoneypotName(const std::string &honeypotName); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getLang() const; + void setLang(const std::string &lang); + std::string getNodeId() const; + void setNodeId(const std::string &nodeId); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::string getNodeName() const; + void setNodeName(const std::string &nodeName); + std::vector getHoneypotIds() const; + void setHoneypotIds(const std::vector &honeypotIds); + +private: + std::string honeypotName_; + int pageSize_; + std::string lang_; + std::string nodeId_; + int currentPage_; + std::string nodeName_; + std::vector honeypotIds_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/ListHoneypotResult.h b/sas/include/alibabacloud/sas/model/ListHoneypotResult.h new file mode 100644 index 000000000..54e8da073 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListHoneypotResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT ListHoneypotResult : public ServiceResult + { + public: + struct PageInfo + { + int totalCount; + int pageSize; + int currentPage; + int count; + std::string lastRowKey; + }; + struct ListItem + { + std::string honeypotImageName; + std::string controlNodeName; + std::string honeypotId; + std::vector state; + std::string presetId; + std::string honeypotImageDisplayName; + std::string nodeId; + std::string honeypotName; + }; + + + ListHoneypotResult(); + explicit ListHoneypotResult(const std::string &payload); + ~ListHoneypotResult(); + PageInfo getPageInfo()const; + std::string getMessage()const; + int getHttpStatusCode()const; + std::vector getList()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + PageInfo pageInfo_; + std::string message_; + int httpStatusCode_; + std::vector list_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_LISTHONEYPOTRESULT_H_ \ No newline at end of file diff --git a/sas/src/SasClient.cc b/sas/src/SasClient.cc index b54e3a5bf..8451b37e1 100644 --- a/sas/src/SasClient.cc +++ b/sas/src/SasClient.cc @@ -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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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(); diff --git a/sas/src/model/CreateHoneypotNodeRequest.cc b/sas/src/model/CreateHoneypotNodeRequest.cc new file mode 100644 index 000000000..25a9e5872 --- /dev/null +++ b/sas/src/model/CreateHoneypotNodeRequest.cc @@ -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 + +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 CreateHoneypotNodeRequest::getSecurityGroupProbeIpList() const { + return securityGroupProbeIpList_; +} + +void CreateHoneypotNodeRequest::setSecurityGroupProbeIpList(const std::vector &securityGroupProbeIpList) { + securityGroupProbeIpList_ = securityGroupProbeIpList; +} + +std::string CreateHoneypotNodeRequest::getNodeVersion() const { + return nodeVersion_; +} + +void CreateHoneypotNodeRequest::setNodeVersion(const std::string &nodeVersion) { + nodeVersion_ = nodeVersion; + setParameter(std::string("NodeVersion"), nodeVersion); +} + diff --git a/sas/src/model/CreateHoneypotNodeResult.cc b/sas/src/model/CreateHoneypotNodeResult.cc new file mode 100644 index 000000000..0e4b32dec --- /dev/null +++ b/sas/src/model/CreateHoneypotNodeResult.cc @@ -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 +#include + +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_; +} + diff --git a/sas/src/model/CreateHoneypotProbeRequest.cc b/sas/src/model/CreateHoneypotProbeRequest.cc new file mode 100644 index 000000000..7302f83af --- /dev/null +++ b/sas/src/model/CreateHoneypotProbeRequest.cc @@ -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 + +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 CreateHoneypotProbeRequest::getServiceIpList() const { + return serviceIpList_; +} + +void CreateHoneypotProbeRequest::setServiceIpList(const std::vector &serviceIpList) { + serviceIpList_ = serviceIpList; +} + +std::vector CreateHoneypotProbeRequest::getHoneypotBindList() const { + return honeypotBindList_; +} + +void CreateHoneypotProbeRequest::setHoneypotBindList(const std::vector &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); +} + diff --git a/sas/src/model/CreateHoneypotProbeResult.cc b/sas/src/model/CreateHoneypotProbeResult.cc new file mode 100644 index 000000000..4d1946a4d --- /dev/null +++ b/sas/src/model/CreateHoneypotProbeResult.cc @@ -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 +#include + +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_; +} + diff --git a/sas/src/model/CreateHoneypotRequest.cc b/sas/src/model/CreateHoneypotRequest.cc new file mode 100644 index 000000000..3a6564f6d --- /dev/null +++ b/sas/src/model/CreateHoneypotRequest.cc @@ -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 + +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); +} + diff --git a/sas/src/model/CreateHoneypotResult.cc b/sas/src/model/CreateHoneypotResult.cc new file mode 100644 index 000000000..d36f27153 --- /dev/null +++ b/sas/src/model/CreateHoneypotResult.cc @@ -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 +#include + +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_; +} + diff --git a/sas/src/model/DescribeCheckWarningsRequest.cc b/sas/src/model/DescribeCheckWarningsRequest.cc index cafa460af..1911e6f4f 100644 --- a/sas/src/model/DescribeCheckWarningsRequest.cc +++ b/sas/src/model/DescribeCheckWarningsRequest.cc @@ -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)); +} + diff --git a/sas/src/model/DescribeGroupedVulResult.cc b/sas/src/model/DescribeGroupedVulResult.cc index 5d808ae22..ec3ffdc18 100644 --- a/sas/src/model/DescribeGroupedVulResult.cc +++ b/sas/src/model/DescribeGroupedVulResult.cc @@ -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()) diff --git a/sas/src/model/DescribeOnceTaskRequest.cc b/sas/src/model/DescribeOnceTaskRequest.cc index 14e984d03..963c3a4e0 100644 --- a/sas/src/model/DescribeOnceTaskRequest.cc +++ b/sas/src/model/DescribeOnceTaskRequest.cc @@ -25,6 +25,23 @@ DescribeOnceTaskRequest::DescribeOnceTaskRequest() DescribeOnceTaskRequest::~DescribeOnceTaskRequest() {} +std::vector DescribeOnceTaskRequest::getStatusList() const { + return statusList_; +} + +void DescribeOnceTaskRequest::setStatusList(const std::vector &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); +} + diff --git a/sas/src/model/DescribeOnceTaskResult.cc b/sas/src/model/DescribeOnceTaskResult.cc index 17613d107..f1957ff1b 100644 --- a/sas/src/model/DescribeOnceTaskResult.cc +++ b/sas/src/model/DescribeOnceTaskResult.cc @@ -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"]; diff --git a/sas/src/model/DescribeWarningMachinesRequest.cc b/sas/src/model/DescribeWarningMachinesRequest.cc index ec3b5ef1b..89f0aaa81 100644 --- a/sas/src/model/DescribeWarningMachinesRequest.cc +++ b/sas/src/model/DescribeWarningMachinesRequest.cc @@ -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_; } diff --git a/sas/src/model/DescribeWebLockFileEventsRequest.cc b/sas/src/model/DescribeWebLockFileEventsRequest.cc new file mode 100644 index 000000000..605212522 --- /dev/null +++ b/sas/src/model/DescribeWebLockFileEventsRequest.cc @@ -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 + +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)); +} + diff --git a/sas/src/model/DescribeWebLockFileEventsResult.cc b/sas/src/model/DescribeWebLockFileEventsResult.cc new file mode 100644 index 000000000..bf043d17e --- /dev/null +++ b/sas/src/model/DescribeWebLockFileEventsResult.cc @@ -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 +#include + +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::getList()const +{ + return list_; +} + diff --git a/sas/src/model/GetFileDetectResultResult.cc b/sas/src/model/GetFileDetectResultResult.cc index 915278665..25fdbe1aa 100644 --- a/sas/src/model/GetFileDetectResultResult.cc +++ b/sas/src/model/GetFileDetectResultResult.cc @@ -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); diff --git a/sas/src/model/ListHoneypotAlarmEventsRequest.cc b/sas/src/model/ListHoneypotAlarmEventsRequest.cc new file mode 100644 index 000000000..6ae22b44d --- /dev/null +++ b/sas/src/model/ListHoneypotAlarmEventsRequest.cc @@ -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 + +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 ListHoneypotAlarmEventsRequest::getRiskLevelList() const { + return riskLevelList_; +} + +void ListHoneypotAlarmEventsRequest::setRiskLevelList(const std::vector &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); +} + diff --git a/sas/src/model/ListHoneypotAlarmEventsResult.cc b/sas/src/model/ListHoneypotAlarmEventsResult.cc new file mode 100644 index 000000000..2557f650c --- /dev/null +++ b/sas/src/model/ListHoneypotAlarmEventsResult.cc @@ -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 +#include + +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::getHoneypotAlarmEvents()const +{ + return honeypotAlarmEvents_; +} + diff --git a/sas/src/model/ListHoneypotNodeRequest.cc b/sas/src/model/ListHoneypotNodeRequest.cc new file mode 100644 index 000000000..935e04ca2 --- /dev/null +++ b/sas/src/model/ListHoneypotNodeRequest.cc @@ -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 + +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); +} + diff --git a/sas/src/model/ListHoneypotNodeResult.cc b/sas/src/model/ListHoneypotNodeResult.cc new file mode 100644 index 000000000..78664512d --- /dev/null +++ b/sas/src/model/ListHoneypotNodeResult.cc @@ -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 +#include + +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::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_; +} + diff --git a/sas/src/model/ListHoneypotRequest.cc b/sas/src/model/ListHoneypotRequest.cc new file mode 100644 index 000000000..7c3002410 --- /dev/null +++ b/sas/src/model/ListHoneypotRequest.cc @@ -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 + +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 ListHoneypotRequest::getHoneypotIds() const { + return honeypotIds_; +} + +void ListHoneypotRequest::setHoneypotIds(const std::vector &honeypotIds) { + honeypotIds_ = honeypotIds; +} + diff --git a/sas/src/model/ListHoneypotResult.cc b/sas/src/model/ListHoneypotResult.cc new file mode 100644 index 000000000..4eaac3d58 --- /dev/null +++ b/sas/src/model/ListHoneypotResult.cc @@ -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 +#include + +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::getList()const +{ + return list_; +} + +std::string ListHoneypotResult::getCode()const +{ + return code_; +} + +bool ListHoneypotResult::getSuccess()const +{ + return success_; +} +