diff --git a/CHANGELOG b/CHANGELOG index cdee4a79d..0a5091f30 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2018-06-06 Version: 1.17.0 +1, Add interface DescribePhoneInfo, DescribeDdosDefenseInfo, DescribeRiskListDetail, DescribePunishList. + 2018-05-29 Version: 1.16.0 1, Add new interface DescribePhoneInfo to SDK. diff --git a/VERSION b/VERSION index 71bd5d9ee..73d74673c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.0 \ No newline at end of file +1.17.0 \ No newline at end of file diff --git a/jarvis/CMakeLists.txt b/jarvis/CMakeLists.txt index 17152c5e1..205c0f233 100644 --- a/jarvis/CMakeLists.txt +++ b/jarvis/CMakeLists.txt @@ -27,6 +27,10 @@ set(jarvis_public_header_model include/alibabacloud/jarvis/model/CreateCpmcPunishFeedBackResult.h include/alibabacloud/jarvis/model/CreateAccessWhiteListGroupRequest.h include/alibabacloud/jarvis/model/CreateAccessWhiteListGroupResult.h + include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoRequest.h + include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoResult.h + include/alibabacloud/jarvis/model/DescribePhoneInfoRequest.h + include/alibabacloud/jarvis/model/DescribePhoneInfoResult.h include/alibabacloud/jarvis/model/DescribeAccessWhitelistEcsListRequest.h include/alibabacloud/jarvis/model/DescribeAccessWhitelistEcsListResult.h include/alibabacloud/jarvis/model/DescribeResetRecordListRequest.h @@ -47,8 +51,12 @@ set(jarvis_public_header_model include/alibabacloud/jarvis/model/DescribeAccessWhiteListGroupResult.h include/alibabacloud/jarvis/model/DescribeResetRecordQueryCountRequest.h include/alibabacloud/jarvis/model/DescribeResetRecordQueryCountResult.h + include/alibabacloud/jarvis/model/DescribePunishListRequest.h + include/alibabacloud/jarvis/model/DescribePunishListResult.h include/alibabacloud/jarvis/model/DescribeUidWhiteListGroupRequest.h include/alibabacloud/jarvis/model/DescribeUidWhiteListGroupResult.h + include/alibabacloud/jarvis/model/DescribeRiskListDetailRequest.h + include/alibabacloud/jarvis/model/DescribeRiskListDetailResult.h include/alibabacloud/jarvis/model/DescribeRiskTrendRequest.h include/alibabacloud/jarvis/model/DescribeRiskTrendResult.h ) @@ -60,6 +68,10 @@ set(jarvis_src src/model/CreateCpmcPunishFeedBackResult.cc src/model/CreateAccessWhiteListGroupRequest.cc src/model/CreateAccessWhiteListGroupResult.cc + src/model/DescribeDdosDefenseInfoRequest.cc + src/model/DescribeDdosDefenseInfoResult.cc + src/model/DescribePhoneInfoRequest.cc + src/model/DescribePhoneInfoResult.cc src/model/DescribeAccessWhitelistEcsListRequest.cc src/model/DescribeAccessWhitelistEcsListResult.cc src/model/DescribeResetRecordListRequest.cc @@ -80,8 +92,12 @@ set(jarvis_src src/model/DescribeAccessWhiteListGroupResult.cc src/model/DescribeResetRecordQueryCountRequest.cc src/model/DescribeResetRecordQueryCountResult.cc + src/model/DescribePunishListRequest.cc + src/model/DescribePunishListResult.cc src/model/DescribeUidWhiteListGroupRequest.cc src/model/DescribeUidWhiteListGroupResult.cc + src/model/DescribeRiskListDetailRequest.cc + src/model/DescribeRiskListDetailResult.cc src/model/DescribeRiskTrendRequest.cc src/model/DescribeRiskTrendResult.cc ) diff --git a/jarvis/include/alibabacloud/jarvis/JarvisClient.h b/jarvis/include/alibabacloud/jarvis/JarvisClient.h index cece0d221..80741e63b 100644 --- a/jarvis/include/alibabacloud/jarvis/JarvisClient.h +++ b/jarvis/include/alibabacloud/jarvis/JarvisClient.h @@ -28,6 +28,10 @@ #include "model/CreateCpmcPunishFeedBackResult.h" #include "model/CreateAccessWhiteListGroupRequest.h" #include "model/CreateAccessWhiteListGroupResult.h" +#include "model/DescribeDdosDefenseInfoRequest.h" +#include "model/DescribeDdosDefenseInfoResult.h" +#include "model/DescribePhoneInfoRequest.h" +#include "model/DescribePhoneInfoResult.h" #include "model/DescribeAccessWhitelistEcsListRequest.h" #include "model/DescribeAccessWhitelistEcsListResult.h" #include "model/DescribeResetRecordListRequest.h" @@ -48,8 +52,12 @@ #include "model/DescribeAccessWhiteListGroupResult.h" #include "model/DescribeResetRecordQueryCountRequest.h" #include "model/DescribeResetRecordQueryCountResult.h" +#include "model/DescribePunishListRequest.h" +#include "model/DescribePunishListResult.h" #include "model/DescribeUidWhiteListGroupRequest.h" #include "model/DescribeUidWhiteListGroupResult.h" +#include "model/DescribeRiskListDetailRequest.h" +#include "model/DescribeRiskListDetailResult.h" #include "model/DescribeRiskTrendRequest.h" #include "model/DescribeRiskTrendResult.h" @@ -70,6 +78,12 @@ namespace AlibabaCloud typedef Outcome CreateAccessWhiteListGroupOutcome; typedef std::future CreateAccessWhiteListGroupOutcomeCallable; typedef std::function&)> CreateAccessWhiteListGroupAsyncHandler; + typedef Outcome DescribeDdosDefenseInfoOutcome; + typedef std::future DescribeDdosDefenseInfoOutcomeCallable; + typedef std::function&)> DescribeDdosDefenseInfoAsyncHandler; + typedef Outcome DescribePhoneInfoOutcome; + typedef std::future DescribePhoneInfoOutcomeCallable; + typedef std::function&)> DescribePhoneInfoAsyncHandler; typedef Outcome DescribeAccessWhitelistEcsListOutcome; typedef std::future DescribeAccessWhitelistEcsListOutcomeCallable; typedef std::function&)> DescribeAccessWhitelistEcsListAsyncHandler; @@ -100,9 +114,15 @@ namespace AlibabaCloud typedef Outcome DescribeResetRecordQueryCountOutcome; typedef std::future DescribeResetRecordQueryCountOutcomeCallable; typedef std::function&)> DescribeResetRecordQueryCountAsyncHandler; + typedef Outcome DescribePunishListOutcome; + typedef std::future DescribePunishListOutcomeCallable; + typedef std::function&)> DescribePunishListAsyncHandler; typedef Outcome DescribeUidWhiteListGroupOutcome; typedef std::future DescribeUidWhiteListGroupOutcomeCallable; typedef std::function&)> DescribeUidWhiteListGroupAsyncHandler; + typedef Outcome DescribeRiskListDetailOutcome; + typedef std::future DescribeRiskListDetailOutcomeCallable; + typedef std::function&)> DescribeRiskListDetailAsyncHandler; typedef Outcome DescribeRiskTrendOutcome; typedef std::future DescribeRiskTrendOutcomeCallable; typedef std::function&)> DescribeRiskTrendAsyncHandler; @@ -120,6 +140,12 @@ namespace AlibabaCloud CreateAccessWhiteListGroupOutcome createAccessWhiteListGroup(const Model::CreateAccessWhiteListGroupRequest &request)const; void createAccessWhiteListGroupAsync(const Model::CreateAccessWhiteListGroupRequest& request, const CreateAccessWhiteListGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateAccessWhiteListGroupOutcomeCallable createAccessWhiteListGroupCallable(const Model::CreateAccessWhiteListGroupRequest& request) const; + DescribeDdosDefenseInfoOutcome describeDdosDefenseInfo(const Model::DescribeDdosDefenseInfoRequest &request)const; + void describeDdosDefenseInfoAsync(const Model::DescribeDdosDefenseInfoRequest& request, const DescribeDdosDefenseInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDdosDefenseInfoOutcomeCallable describeDdosDefenseInfoCallable(const Model::DescribeDdosDefenseInfoRequest& request) const; + DescribePhoneInfoOutcome describePhoneInfo(const Model::DescribePhoneInfoRequest &request)const; + void describePhoneInfoAsync(const Model::DescribePhoneInfoRequest& request, const DescribePhoneInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribePhoneInfoOutcomeCallable describePhoneInfoCallable(const Model::DescribePhoneInfoRequest& request) const; DescribeAccessWhitelistEcsListOutcome describeAccessWhitelistEcsList(const Model::DescribeAccessWhitelistEcsListRequest &request)const; void describeAccessWhitelistEcsListAsync(const Model::DescribeAccessWhitelistEcsListRequest& request, const DescribeAccessWhitelistEcsListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeAccessWhitelistEcsListOutcomeCallable describeAccessWhitelistEcsListCallable(const Model::DescribeAccessWhitelistEcsListRequest& request) const; @@ -150,9 +176,15 @@ namespace AlibabaCloud DescribeResetRecordQueryCountOutcome describeResetRecordQueryCount(const Model::DescribeResetRecordQueryCountRequest &request)const; void describeResetRecordQueryCountAsync(const Model::DescribeResetRecordQueryCountRequest& request, const DescribeResetRecordQueryCountAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeResetRecordQueryCountOutcomeCallable describeResetRecordQueryCountCallable(const Model::DescribeResetRecordQueryCountRequest& request) const; + DescribePunishListOutcome describePunishList(const Model::DescribePunishListRequest &request)const; + void describePunishListAsync(const Model::DescribePunishListRequest& request, const DescribePunishListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribePunishListOutcomeCallable describePunishListCallable(const Model::DescribePunishListRequest& request) const; DescribeUidWhiteListGroupOutcome describeUidWhiteListGroup(const Model::DescribeUidWhiteListGroupRequest &request)const; void describeUidWhiteListGroupAsync(const Model::DescribeUidWhiteListGroupRequest& request, const DescribeUidWhiteListGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeUidWhiteListGroupOutcomeCallable describeUidWhiteListGroupCallable(const Model::DescribeUidWhiteListGroupRequest& request) const; + DescribeRiskListDetailOutcome describeRiskListDetail(const Model::DescribeRiskListDetailRequest &request)const; + void describeRiskListDetailAsync(const Model::DescribeRiskListDetailRequest& request, const DescribeRiskListDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeRiskListDetailOutcomeCallable describeRiskListDetailCallable(const Model::DescribeRiskListDetailRequest& request) const; DescribeRiskTrendOutcome describeRiskTrend(const Model::DescribeRiskTrendRequest &request)const; void describeRiskTrendAsync(const Model::DescribeRiskTrendRequest& request, const DescribeRiskTrendAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeRiskTrendOutcomeCallable describeRiskTrendCallable(const Model::DescribeRiskTrendRequest& request) const; diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoRequest.h b/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoRequest.h new file mode 100644 index 000000000..7f62a43e4 --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoRequest.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_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFOREQUEST_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribeDdosDefenseInfoRequest : public RpcServiceRequest + { + + public: + DescribeDdosDefenseInfoRequest(); + ~DescribeDdosDefenseInfoRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getSrcUid()const; + void setSrcUid(const std::string& srcUid); + std::string getSourceCode()const; + void setSourceCode(const std::string& sourceCode); + + private: + std::string sourceIp_; + std::string lang_; + std::string srcUid_; + std::string sourceCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFOREQUEST_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoResult.h b/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoResult.h new file mode 100644 index 000000000..20c36043e --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribeDdosDefenseInfoResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFORESULT_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribeDdosDefenseInfoResult : public ServiceResult + { + public: + struct DdosDefenseThresholdItem + { + int currThreshold; + std::string regionId; + int recommendThreshold; + }; + + + DescribeDdosDefenseInfoResult(); + explicit DescribeDdosDefenseInfoResult(const std::string &payload); + ~DescribeDdosDefenseInfoResult(); + std::vector getDdosDefenseThreshold()const; + std::string getBgpPkgState()const; + int getBlackTimes()const; + int getDuration()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + std::vector ddosDefenseThreshold_; + std::string bgpPkgState_; + int blackTimes_; + int duration_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEDDOSDEFENSEINFORESULT_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoRequest.h b/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoRequest.h new file mode 100644 index 000000000..0784ee4d7 --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoRequest.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_JARVIS_MODEL_DESCRIBEPHONEINFOREQUEST_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPHONEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribePhoneInfoRequest : public RpcServiceRequest + { + + public: + DescribePhoneInfoRequest(); + ~DescribePhoneInfoRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getPhoneNum()const; + void setPhoneNum(const std::string& phoneNum); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getSourceCode()const; + void setSourceCode(const std::string& sourceCode); + + private: + std::string sourceIp_; + std::string phoneNum_; + std::string lang_; + std::string sourceCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPHONEINFOREQUEST_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoResult.h b/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoResult.h new file mode 100644 index 000000000..fb5b03693 --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribePhoneInfoResult.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_JARVIS_MODEL_DESCRIBEPHONEINFORESULT_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPHONEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribePhoneInfoResult : public ServiceResult + { + public: + + + DescribePhoneInfoResult(); + explicit DescribePhoneInfoResult(const std::string &payload); + ~DescribePhoneInfoResult(); + long getPhoneNum()const; + std::string getDetectTime()const; + std::string getModule()const; + long getRiskLevel()const; + + protected: + void parse(const std::string &payload); + private: + long phoneNum_; + std::string detectTime_; + std::string module_; + long riskLevel_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPHONEINFORESULT_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribePunishListRequest.h b/jarvis/include/alibabacloud/jarvis/model/DescribePunishListRequest.h new file mode 100644 index 000000000..7ce3af7c4 --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribePunishListRequest.h @@ -0,0 +1,69 @@ +/* + * 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_JARVIS_MODEL_DESCRIBEPUNISHLISTREQUEST_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPUNISHLISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribePunishListRequest : public RpcServiceRequest + { + + public: + DescribePunishListRequest(); + ~DescribePunishListRequest(); + + std::string getSrcIP()const; + void setSrcIP(const std::string& srcIP); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + int getPageSize()const; + void setPageSize(int pageSize); + int getCurrentPage()const; + void setCurrentPage(int currentPage); + std::string getPunishStatus()const; + void setPunishStatus(const std::string& punishStatus); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getSrcUid()const; + void setSrcUid(const std::string& srcUid); + std::string getSourceCode()const; + void setSourceCode(const std::string& sourceCode); + + private: + std::string srcIP_; + std::string sourceIp_; + int pageSize_; + int currentPage_; + std::string punishStatus_; + std::string lang_; + std::string srcUid_; + std::string sourceCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPUNISHLISTREQUEST_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribePunishListResult.h b/jarvis/include/alibabacloud/jarvis/model/DescribePunishListResult.h new file mode 100644 index 000000000..c0eff75fa --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribePunishListResult.h @@ -0,0 +1,76 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPUNISHLISTRESULT_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPUNISHLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribePunishListResult : public ServiceResult + { + public: + struct PageInfo + { + int pageSize; + int currentPage; + int total; + }; + struct Data + { + std::string gmtCreate; + int srcPort; + int feedBack; + std::string gmtExpire; + std::string punishType; + std::string dstIP; + std::string punishResult; + std::string regionId; + int dstPort; + std::string protocol; + std::string srcIP; + std::string reason; + }; + + + DescribePunishListResult(); + explicit DescribePunishListResult(const std::string &payload); + ~DescribePunishListResult(); + std::vector getDataList()const; + PageInfo getPageInfo()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + std::vector dataList_; + PageInfo pageInfo_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBEPUNISHLISTRESULT_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailRequest.h b/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailRequest.h new file mode 100644 index 000000000..073fa62a5 --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailRequest.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_JARVIS_MODEL_DESCRIBERISKLISTDETAILREQUEST_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBERISKLISTDETAILREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribeRiskListDetailRequest : public RpcServiceRequest + { + + public: + DescribeRiskListDetailRequest(); + ~DescribeRiskListDetailRequest(); + + std::string getRiskType()const; + void setRiskType(const std::string& riskType); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getPageSize()const; + void setPageSize(const std::string& pageSize); + std::string getQueryProduct()const; + void setQueryProduct(const std::string& queryProduct); + std::string getCurrentPage()const; + void setCurrentPage(const std::string& currentPage); + std::string getRiskDescribe()const; + void setRiskDescribe(const std::string& riskDescribe); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getSrcUid()const; + void setSrcUid(const std::string& srcUid); + std::string getSourceCode()const; + void setSourceCode(const std::string& sourceCode); + std::string getQueryRegionId()const; + void setQueryRegionId(const std::string& queryRegionId); + std::string getStatus()const; + void setStatus(const std::string& status); + + private: + std::string riskType_; + std::string sourceIp_; + std::string pageSize_; + std::string queryProduct_; + std::string currentPage_; + std::string riskDescribe_; + std::string lang_; + std::string srcUid_; + std::string sourceCode_; + std::string queryRegionId_; + std::string status_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBERISKLISTDETAILREQUEST_H_ \ No newline at end of file diff --git a/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailResult.h b/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailResult.h new file mode 100644 index 000000000..a533f72ea --- /dev/null +++ b/jarvis/include/alibabacloud/jarvis/model/DescribeRiskListDetailResult.h @@ -0,0 +1,88 @@ +/* + * 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_JARVIS_MODEL_DESCRIBERISKLISTDETAILRESULT_H_ +#define ALIBABACLOUD_JARVIS_MODEL_DESCRIBERISKLISTDETAILRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis + { + namespace Model + { + class ALIBABACLOUD_JARVIS_EXPORT DescribeRiskListDetailResult : public ServiceResult + { + public: + struct PageInfo + { + int pageSize; + int currentPage; + int total; + }; + struct Data + { + struct EcsSecGroupRiskItem + { + std::string dstPortRange; + std::string srcIpRange; + std::string netType; + std::string direction; + }; + struct RdsWhitelistRiskItem + { + std::string rdsWhitelistGroup; + std::string riskDetail; + }; + int riskId; + std::string status; + std::string ignoreTime; + std::string tacticsName; + std::string updateTime; + std::vector ecsSecGroupRisk; + std::string riskInstance; + std::string product; + std::string regionId; + std::string riskDescribe; + std::string riskType; + std::vector rdsWhitelistRisk; + }; + + + DescribeRiskListDetailResult(); + explicit DescribeRiskListDetailResult(const std::string &payload); + ~DescribeRiskListDetailResult(); + std::vector getDataList()const; + PageInfo getPageInfo()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + std::vector dataList_; + PageInfo pageInfo_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS_MODEL_DESCRIBERISKLISTDETAILRESULT_H_ \ No newline at end of file diff --git a/jarvis/src/JarvisClient.cc b/jarvis/src/JarvisClient.cc index e20fff2ec..6648e4db0 100644 --- a/jarvis/src/JarvisClient.cc +++ b/jarvis/src/JarvisClient.cc @@ -159,6 +159,78 @@ JarvisClient::CreateAccessWhiteListGroupOutcomeCallable JarvisClient::createAcce return task->get_future(); } +JarvisClient::DescribeDdosDefenseInfoOutcome JarvisClient::describeDdosDefenseInfo(const DescribeDdosDefenseInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDdosDefenseInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDdosDefenseInfoOutcome(DescribeDdosDefenseInfoResult(outcome.result())); + else + return DescribeDdosDefenseInfoOutcome(outcome.error()); +} + +void JarvisClient::describeDdosDefenseInfoAsync(const DescribeDdosDefenseInfoRequest& request, const DescribeDdosDefenseInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDdosDefenseInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +JarvisClient::DescribeDdosDefenseInfoOutcomeCallable JarvisClient::describeDdosDefenseInfoCallable(const DescribeDdosDefenseInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDdosDefenseInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +JarvisClient::DescribePhoneInfoOutcome JarvisClient::describePhoneInfo(const DescribePhoneInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribePhoneInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribePhoneInfoOutcome(DescribePhoneInfoResult(outcome.result())); + else + return DescribePhoneInfoOutcome(outcome.error()); +} + +void JarvisClient::describePhoneInfoAsync(const DescribePhoneInfoRequest& request, const DescribePhoneInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describePhoneInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +JarvisClient::DescribePhoneInfoOutcomeCallable JarvisClient::describePhoneInfoCallable(const DescribePhoneInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describePhoneInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + JarvisClient::DescribeAccessWhitelistEcsListOutcome JarvisClient::describeAccessWhitelistEcsList(const DescribeAccessWhitelistEcsListRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -519,6 +591,42 @@ JarvisClient::DescribeResetRecordQueryCountOutcomeCallable JarvisClient::describ return task->get_future(); } +JarvisClient::DescribePunishListOutcome JarvisClient::describePunishList(const DescribePunishListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribePunishListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribePunishListOutcome(DescribePunishListResult(outcome.result())); + else + return DescribePunishListOutcome(outcome.error()); +} + +void JarvisClient::describePunishListAsync(const DescribePunishListRequest& request, const DescribePunishListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describePunishList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +JarvisClient::DescribePunishListOutcomeCallable JarvisClient::describePunishListCallable(const DescribePunishListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describePunishList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + JarvisClient::DescribeUidWhiteListGroupOutcome JarvisClient::describeUidWhiteListGroup(const DescribeUidWhiteListGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -555,6 +663,42 @@ JarvisClient::DescribeUidWhiteListGroupOutcomeCallable JarvisClient::describeUid return task->get_future(); } +JarvisClient::DescribeRiskListDetailOutcome JarvisClient::describeRiskListDetail(const DescribeRiskListDetailRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeRiskListDetailOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeRiskListDetailOutcome(DescribeRiskListDetailResult(outcome.result())); + else + return DescribeRiskListDetailOutcome(outcome.error()); +} + +void JarvisClient::describeRiskListDetailAsync(const DescribeRiskListDetailRequest& request, const DescribeRiskListDetailAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeRiskListDetail(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +JarvisClient::DescribeRiskListDetailOutcomeCallable JarvisClient::describeRiskListDetailCallable(const DescribeRiskListDetailRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeRiskListDetail(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + JarvisClient::DescribeRiskTrendOutcome JarvisClient::describeRiskTrend(const DescribeRiskTrendRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/jarvis/src/model/DescribeDdosDefenseInfoRequest.cc b/jarvis/src/model/DescribeDdosDefenseInfoRequest.cc new file mode 100644 index 000000000..ed611ccd9 --- /dev/null +++ b/jarvis/src/model/DescribeDdosDefenseInfoRequest.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::Jarvis::Model::DescribeDdosDefenseInfoRequest; + +DescribeDdosDefenseInfoRequest::DescribeDdosDefenseInfoRequest() : + RpcServiceRequest("jarvis", "2018-02-06", "DescribeDdosDefenseInfo") +{} + +DescribeDdosDefenseInfoRequest::~DescribeDdosDefenseInfoRequest() +{} + +std::string DescribeDdosDefenseInfoRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeDdosDefenseInfoRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeDdosDefenseInfoRequest::getLang()const +{ + return lang_; +} + +void DescribeDdosDefenseInfoRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribeDdosDefenseInfoRequest::getSrcUid()const +{ + return srcUid_; +} + +void DescribeDdosDefenseInfoRequest::setSrcUid(const std::string& srcUid) +{ + srcUid_ = srcUid; + setParameter("SrcUid", srcUid); +} + +std::string DescribeDdosDefenseInfoRequest::getSourceCode()const +{ + return sourceCode_; +} + +void DescribeDdosDefenseInfoRequest::setSourceCode(const std::string& sourceCode) +{ + sourceCode_ = sourceCode; + setParameter("SourceCode", sourceCode); +} + diff --git a/jarvis/src/model/DescribeDdosDefenseInfoResult.cc b/jarvis/src/model/DescribeDdosDefenseInfoResult.cc new file mode 100644 index 000000000..f6a44d4e1 --- /dev/null +++ b/jarvis/src/model/DescribeDdosDefenseInfoResult.cc @@ -0,0 +1,90 @@ +/* + * 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::Jarvis; +using namespace AlibabaCloud::Jarvis::Model; + +DescribeDdosDefenseInfoResult::DescribeDdosDefenseInfoResult() : + ServiceResult() +{} + +DescribeDdosDefenseInfoResult::DescribeDdosDefenseInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDdosDefenseInfoResult::~DescribeDdosDefenseInfoResult() +{} + +void DescribeDdosDefenseInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allDdosDefenseThreshold = value["DdosDefenseThreshold"]["DdosDefenseThresholdItem"]; + for (auto value : allDdosDefenseThreshold) + { + DdosDefenseThresholdItem ddosDefenseThresholdObject; + if(!value["RegionId"].isNull()) + ddosDefenseThresholdObject.regionId = value["RegionId"].asString(); + if(!value["CurrThreshold"].isNull()) + ddosDefenseThresholdObject.currThreshold = std::stoi(value["CurrThreshold"].asString()); + if(!value["RecommendThreshold"].isNull()) + ddosDefenseThresholdObject.recommendThreshold = std::stoi(value["RecommendThreshold"].asString()); + ddosDefenseThreshold_.push_back(ddosDefenseThresholdObject); + } + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + if(!value["BlackTimes"].isNull()) + blackTimes_ = std::stoi(value["BlackTimes"].asString()); + if(!value["Duration"].isNull()) + duration_ = std::stoi(value["Duration"].asString()); + if(!value["BgpPkgState"].isNull()) + bgpPkgState_ = value["BgpPkgState"].asString(); + +} + +std::vector DescribeDdosDefenseInfoResult::getDdosDefenseThreshold()const +{ + return ddosDefenseThreshold_; +} + +std::string DescribeDdosDefenseInfoResult::getBgpPkgState()const +{ + return bgpPkgState_; +} + +int DescribeDdosDefenseInfoResult::getBlackTimes()const +{ + return blackTimes_; +} + +int DescribeDdosDefenseInfoResult::getDuration()const +{ + return duration_; +} + +std::string DescribeDdosDefenseInfoResult::getModule()const +{ + return module_; +} + diff --git a/jarvis/src/model/DescribePhoneInfoRequest.cc b/jarvis/src/model/DescribePhoneInfoRequest.cc new file mode 100644 index 000000000..b65b3f59b --- /dev/null +++ b/jarvis/src/model/DescribePhoneInfoRequest.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::Jarvis::Model::DescribePhoneInfoRequest; + +DescribePhoneInfoRequest::DescribePhoneInfoRequest() : + RpcServiceRequest("jarvis", "2018-02-06", "DescribePhoneInfo") +{} + +DescribePhoneInfoRequest::~DescribePhoneInfoRequest() +{} + +std::string DescribePhoneInfoRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribePhoneInfoRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribePhoneInfoRequest::getPhoneNum()const +{ + return phoneNum_; +} + +void DescribePhoneInfoRequest::setPhoneNum(const std::string& phoneNum) +{ + phoneNum_ = phoneNum; + setParameter("PhoneNum", phoneNum); +} + +std::string DescribePhoneInfoRequest::getLang()const +{ + return lang_; +} + +void DescribePhoneInfoRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribePhoneInfoRequest::getSourceCode()const +{ + return sourceCode_; +} + +void DescribePhoneInfoRequest::setSourceCode(const std::string& sourceCode) +{ + sourceCode_ = sourceCode; + setParameter("SourceCode", sourceCode); +} + diff --git a/jarvis/src/model/DescribePhoneInfoResult.cc b/jarvis/src/model/DescribePhoneInfoResult.cc new file mode 100644 index 000000000..3f6d2de4a --- /dev/null +++ b/jarvis/src/model/DescribePhoneInfoResult.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Jarvis; +using namespace AlibabaCloud::Jarvis::Model; + +DescribePhoneInfoResult::DescribePhoneInfoResult() : + ServiceResult() +{} + +DescribePhoneInfoResult::DescribePhoneInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribePhoneInfoResult::~DescribePhoneInfoResult() +{} + +void DescribePhoneInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + if(!value["phoneNum"].isNull()) + phoneNum_ = std::stol(value["phoneNum"].asString()); + if(!value["riskLevel"].isNull()) + riskLevel_ = std::stol(value["riskLevel"].asString()); + if(!value["detectTime"].isNull()) + detectTime_ = value["detectTime"].asString(); + +} + +long DescribePhoneInfoResult::getPhoneNum()const +{ + return phoneNum_; +} + +std::string DescribePhoneInfoResult::getDetectTime()const +{ + return detectTime_; +} + +std::string DescribePhoneInfoResult::getModule()const +{ + return module_; +} + +long DescribePhoneInfoResult::getRiskLevel()const +{ + return riskLevel_; +} + diff --git a/jarvis/src/model/DescribePunishListRequest.cc b/jarvis/src/model/DescribePunishListRequest.cc new file mode 100644 index 000000000..07adc548e --- /dev/null +++ b/jarvis/src/model/DescribePunishListRequest.cc @@ -0,0 +1,115 @@ +/* + * 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::Jarvis::Model::DescribePunishListRequest; + +DescribePunishListRequest::DescribePunishListRequest() : + RpcServiceRequest("jarvis", "2018-02-06", "DescribePunishList") +{} + +DescribePunishListRequest::~DescribePunishListRequest() +{} + +std::string DescribePunishListRequest::getSrcIP()const +{ + return srcIP_; +} + +void DescribePunishListRequest::setSrcIP(const std::string& srcIP) +{ + srcIP_ = srcIP; + setParameter("SrcIP", srcIP); +} + +std::string DescribePunishListRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribePunishListRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +int DescribePunishListRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribePunishListRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +int DescribePunishListRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribePunishListRequest::setCurrentPage(int currentPage) +{ + currentPage_ = currentPage; + setParameter("CurrentPage", std::to_string(currentPage)); +} + +std::string DescribePunishListRequest::getPunishStatus()const +{ + return punishStatus_; +} + +void DescribePunishListRequest::setPunishStatus(const std::string& punishStatus) +{ + punishStatus_ = punishStatus; + setParameter("PunishStatus", punishStatus); +} + +std::string DescribePunishListRequest::getLang()const +{ + return lang_; +} + +void DescribePunishListRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribePunishListRequest::getSrcUid()const +{ + return srcUid_; +} + +void DescribePunishListRequest::setSrcUid(const std::string& srcUid) +{ + srcUid_ = srcUid; + setParameter("SrcUid", srcUid); +} + +std::string DescribePunishListRequest::getSourceCode()const +{ + return sourceCode_; +} + +void DescribePunishListRequest::setSourceCode(const std::string& sourceCode) +{ + sourceCode_ = sourceCode; + setParameter("SourceCode", sourceCode); +} + diff --git a/jarvis/src/model/DescribePunishListResult.cc b/jarvis/src/model/DescribePunishListResult.cc new file mode 100644 index 000000000..6a5f0560c --- /dev/null +++ b/jarvis/src/model/DescribePunishListResult.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 +#include + +using namespace AlibabaCloud::Jarvis; +using namespace AlibabaCloud::Jarvis::Model; + +DescribePunishListResult::DescribePunishListResult() : + ServiceResult() +{} + +DescribePunishListResult::DescribePunishListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribePunishListResult::~DescribePunishListResult() +{} + +void DescribePunishListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allDataList = value["DataList"]["Data"]; + for (auto value : allDataList) + { + Data dataListObject; + if(!value["GmtCreate"].isNull()) + dataListObject.gmtCreate = value["GmtCreate"].asString(); + if(!value["SrcPort"].isNull()) + dataListObject.srcPort = std::stoi(value["SrcPort"].asString()); + if(!value["FeedBack"].isNull()) + dataListObject.feedBack = std::stoi(value["FeedBack"].asString()); + if(!value["GmtExpire"].isNull()) + dataListObject.gmtExpire = value["GmtExpire"].asString(); + if(!value["PunishType"].isNull()) + dataListObject.punishType = value["PunishType"].asString(); + if(!value["DstIP"].isNull()) + dataListObject.dstIP = value["DstIP"].asString(); + if(!value["PunishResult"].isNull()) + dataListObject.punishResult = value["PunishResult"].asString(); + if(!value["RegionId"].isNull()) + dataListObject.regionId = value["RegionId"].asString(); + if(!value["DstPort"].isNull()) + dataListObject.dstPort = std::stoi(value["DstPort"].asString()); + if(!value["Protocol"].isNull()) + dataListObject.protocol = value["Protocol"].asString(); + if(!value["SrcIP"].isNull()) + dataListObject.srcIP = value["SrcIP"].asString(); + if(!value["Reason"].isNull()) + dataListObject.reason = value["Reason"].asString(); + dataList_.push_back(dataListObject); + } + auto pageInfoNode = value["PageInfo"]; + if(!pageInfoNode["total"].isNull()) + pageInfo_.total = std::stoi(pageInfoNode["total"].asString()); + if(!pageInfoNode["pageSize"].isNull()) + pageInfo_.pageSize = std::stoi(pageInfoNode["pageSize"].asString()); + if(!pageInfoNode["currentPage"].isNull()) + pageInfo_.currentPage = std::stoi(pageInfoNode["currentPage"].asString()); + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + +} + +std::vector DescribePunishListResult::getDataList()const +{ + return dataList_; +} + +DescribePunishListResult::PageInfo DescribePunishListResult::getPageInfo()const +{ + return pageInfo_; +} + +std::string DescribePunishListResult::getModule()const +{ + return module_; +} + diff --git a/jarvis/src/model/DescribeRiskListDetailRequest.cc b/jarvis/src/model/DescribeRiskListDetailRequest.cc new file mode 100644 index 000000000..0b2898074 --- /dev/null +++ b/jarvis/src/model/DescribeRiskListDetailRequest.cc @@ -0,0 +1,148 @@ +/* + * 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::Jarvis::Model::DescribeRiskListDetailRequest; + +DescribeRiskListDetailRequest::DescribeRiskListDetailRequest() : + RpcServiceRequest("jarvis", "2018-02-06", "DescribeRiskListDetail") +{} + +DescribeRiskListDetailRequest::~DescribeRiskListDetailRequest() +{} + +std::string DescribeRiskListDetailRequest::getRiskType()const +{ + return riskType_; +} + +void DescribeRiskListDetailRequest::setRiskType(const std::string& riskType) +{ + riskType_ = riskType; + setParameter("RiskType", riskType); +} + +std::string DescribeRiskListDetailRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeRiskListDetailRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeRiskListDetailRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeRiskListDetailRequest::setPageSize(const std::string& pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", pageSize); +} + +std::string DescribeRiskListDetailRequest::getQueryProduct()const +{ + return queryProduct_; +} + +void DescribeRiskListDetailRequest::setQueryProduct(const std::string& queryProduct) +{ + queryProduct_ = queryProduct; + setParameter("QueryProduct", queryProduct); +} + +std::string DescribeRiskListDetailRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribeRiskListDetailRequest::setCurrentPage(const std::string& currentPage) +{ + currentPage_ = currentPage; + setParameter("CurrentPage", currentPage); +} + +std::string DescribeRiskListDetailRequest::getRiskDescribe()const +{ + return riskDescribe_; +} + +void DescribeRiskListDetailRequest::setRiskDescribe(const std::string& riskDescribe) +{ + riskDescribe_ = riskDescribe; + setParameter("RiskDescribe", riskDescribe); +} + +std::string DescribeRiskListDetailRequest::getLang()const +{ + return lang_; +} + +void DescribeRiskListDetailRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribeRiskListDetailRequest::getSrcUid()const +{ + return srcUid_; +} + +void DescribeRiskListDetailRequest::setSrcUid(const std::string& srcUid) +{ + srcUid_ = srcUid; + setParameter("SrcUid", srcUid); +} + +std::string DescribeRiskListDetailRequest::getSourceCode()const +{ + return sourceCode_; +} + +void DescribeRiskListDetailRequest::setSourceCode(const std::string& sourceCode) +{ + sourceCode_ = sourceCode; + setParameter("SourceCode", sourceCode); +} + +std::string DescribeRiskListDetailRequest::getQueryRegionId()const +{ + return queryRegionId_; +} + +void DescribeRiskListDetailRequest::setQueryRegionId(const std::string& queryRegionId) +{ + queryRegionId_ = queryRegionId; + setParameter("QueryRegionId", queryRegionId); +} + +std::string DescribeRiskListDetailRequest::getStatus()const +{ + return status_; +} + +void DescribeRiskListDetailRequest::setStatus(const std::string& status) +{ + status_ = status; + setParameter("Status", status); +} + diff --git a/jarvis/src/model/DescribeRiskListDetailResult.cc b/jarvis/src/model/DescribeRiskListDetailResult.cc new file mode 100644 index 000000000..1457d1567 --- /dev/null +++ b/jarvis/src/model/DescribeRiskListDetailResult.cc @@ -0,0 +1,119 @@ +/* + * 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::Jarvis; +using namespace AlibabaCloud::Jarvis::Model; + +DescribeRiskListDetailResult::DescribeRiskListDetailResult() : + ServiceResult() +{} + +DescribeRiskListDetailResult::DescribeRiskListDetailResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRiskListDetailResult::~DescribeRiskListDetailResult() +{} + +void DescribeRiskListDetailResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allDataList = value["DataList"]["Data"]; + for (auto value : allDataList) + { + Data dataListObject; + if(!value["RiskId"].isNull()) + dataListObject.riskId = std::stoi(value["RiskId"].asString()); + if(!value["UpdateTime"].isNull()) + dataListObject.updateTime = value["UpdateTime"].asString(); + if(!value["RiskDescribe"].isNull()) + dataListObject.riskDescribe = value["RiskDescribe"].asString(); + if(!value["RiskType"].isNull()) + dataListObject.riskType = value["RiskType"].asString(); + if(!value["RiskInstance"].isNull()) + dataListObject.riskInstance = value["RiskInstance"].asString(); + if(!value["Product"].isNull()) + dataListObject.product = value["Product"].asString(); + if(!value["RegionId"].isNull()) + dataListObject.regionId = value["RegionId"].asString(); + if(!value["TacticsName"].isNull()) + dataListObject.tacticsName = value["TacticsName"].asString(); + if(!value["Status"].isNull()) + dataListObject.status = value["Status"].asString(); + if(!value["IgnoreTime"].isNull()) + dataListObject.ignoreTime = value["IgnoreTime"].asString(); + auto allEcsSecGroupRisk = value["EcsSecGroupRisk"]["EcsSecGroupRiskItem"]; + for (auto value : allEcsSecGroupRisk) + { + Data::EcsSecGroupRiskItem ecsSecGroupRiskObject; + if(!value["NetType"].isNull()) + ecsSecGroupRiskObject.netType = value["NetType"].asString(); + if(!value["Direction"].isNull()) + ecsSecGroupRiskObject.direction = value["Direction"].asString(); + if(!value["DstPortRange"].isNull()) + ecsSecGroupRiskObject.dstPortRange = value["DstPortRange"].asString(); + if(!value["SrcIpRange"].isNull()) + ecsSecGroupRiskObject.srcIpRange = value["SrcIpRange"].asString(); + dataListObject.ecsSecGroupRisk.push_back(ecsSecGroupRiskObject); + } + auto allRdsWhitelistRisk = value["RdsWhitelistRisk"]["RdsWhitelistRiskItem"]; + for (auto value : allRdsWhitelistRisk) + { + Data::RdsWhitelistRiskItem rdsWhitelistRiskObject; + if(!value["RdsWhitelistGroup"].isNull()) + rdsWhitelistRiskObject.rdsWhitelistGroup = value["RdsWhitelistGroup"].asString(); + if(!value["RiskDetail"].isNull()) + rdsWhitelistRiskObject.riskDetail = value["RiskDetail"].asString(); + dataListObject.rdsWhitelistRisk.push_back(rdsWhitelistRiskObject); + } + dataList_.push_back(dataListObject); + } + auto pageInfoNode = value["PageInfo"]; + if(!pageInfoNode["total"].isNull()) + pageInfo_.total = std::stoi(pageInfoNode["total"].asString()); + if(!pageInfoNode["pageSize"].isNull()) + pageInfo_.pageSize = std::stoi(pageInfoNode["pageSize"].asString()); + if(!pageInfoNode["currentPage"].isNull()) + pageInfo_.currentPage = std::stoi(pageInfoNode["currentPage"].asString()); + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + +} + +std::vector DescribeRiskListDetailResult::getDataList()const +{ + return dataList_; +} + +DescribeRiskListDetailResult::PageInfo DescribeRiskListDetailResult::getPageInfo()const +{ + return pageInfo_; +} + +std::string DescribeRiskListDetailResult::getModule()const +{ + return module_; +} +