diff --git a/CHANGELOG b/CHANGELOG index 1a1c6347f..6b7a2de5b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2019-03-13 Version: 1.34.14 +1, Update Dependency + 2019-03-13 Version: 1.34.13 1, Update Dependency diff --git a/CMakeLists.txt b/CMakeLists.txt index d75fa4fd5..9c9b1ea37 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,4 +91,5 @@ add_subdirectory(arms) add_subdirectory(lubancloud) add_subdirectory(alimt) -add_subdirectory(xspace) \ No newline at end of file +add_subdirectory(xspace) +add_subdirectory(jarvis-public) \ No newline at end of file diff --git a/VERSION b/VERSION index 54ec48b56..77b453f48 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.34.13 \ No newline at end of file +1.34.14 \ No newline at end of file diff --git a/jarvis-public/CMakeLists.txt b/jarvis-public/CMakeLists.txt new file mode 100644 index 000000000..0cbd2a42f --- /dev/null +++ b/jarvis-public/CMakeLists.txt @@ -0,0 +1,98 @@ +# +# 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. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(jarvis-public_public_header + include/alibabacloud/jarvis-public/Jarvis-publicClient.h + include/alibabacloud/jarvis-public/Jarvis-publicExport.h ) + +set(jarvis-public_public_header_model + include/alibabacloud/jarvis-public/model/DescribeCountAttackEventRequest.h + include/alibabacloud/jarvis-public/model/DescribeCountAttackEventResult.h + include/alibabacloud/jarvis-public/model/DescribeAttackEventRequest.h + include/alibabacloud/jarvis-public/model/DescribeAttackEventResult.h + include/alibabacloud/jarvis-public/model/DescribePhoneInfoRequest.h + include/alibabacloud/jarvis-public/model/DescribePhoneInfoResult.h + include/alibabacloud/jarvis-public/model/DescribeAttackedIpRequest.h + include/alibabacloud/jarvis-public/model/DescribeAttackedIpResult.h ) + +set(jarvis-public_src + src/Jarvis-publicClient.cc + src/model/DescribeCountAttackEventRequest.cc + src/model/DescribeCountAttackEventResult.cc + src/model/DescribeAttackEventRequest.cc + src/model/DescribeAttackEventResult.cc + src/model/DescribePhoneInfoRequest.cc + src/model/DescribePhoneInfoResult.cc + src/model/DescribeAttackedIpRequest.cc + src/model/DescribeAttackedIpResult.cc ) + +add_library(jarvis-public ${LIB_TYPE} + ${jarvis-public_public_header} + ${jarvis-public_public_header_model} + ${jarvis-public_src}) + +set_target_properties(jarvis-public + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}jarvis-public + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(jarvis-public + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_JARVIS-PUBLIC_LIBRARY) +endif() + +target_include_directories(jarvis-public + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(jarvis-public + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(jarvis-public + jsoncpp) + target_include_directories(jarvis-public + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(jarvis-public + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(jarvis-public + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(jarvis-public + PRIVATE /usr/include/jsoncpp) + target_link_libraries(jarvis-public + jsoncpp) +endif() + +install(FILES ${jarvis-public_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/jarvis-public) +install(FILES ${jarvis-public_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/jarvis-public/model) +install(TARGETS jarvis-public + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicClient.h b/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicClient.h new file mode 100644 index 000000000..78ef35f78 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicClient.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-PUBLIC_JARVIS-PUBLICCLIENT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_JARVIS-PUBLICCLIENT_H_ + +#include +#include +#include +#include +#include "Jarvis-publicExport.h" +#include "model/DescribeCountAttackEventRequest.h" +#include "model/DescribeCountAttackEventResult.h" +#include "model/DescribeAttackEventRequest.h" +#include "model/DescribeAttackEventResult.h" +#include "model/DescribePhoneInfoRequest.h" +#include "model/DescribePhoneInfoResult.h" +#include "model/DescribeAttackedIpRequest.h" +#include "model/DescribeAttackedIpResult.h" + + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT Jarvis-publicClient : public RpcServiceClient + { + public: + typedef Outcome DescribeCountAttackEventOutcome; + typedef std::future DescribeCountAttackEventOutcomeCallable; + typedef std::function&)> DescribeCountAttackEventAsyncHandler; + typedef Outcome DescribeAttackEventOutcome; + typedef std::future DescribeAttackEventOutcomeCallable; + typedef std::function&)> DescribeAttackEventAsyncHandler; + typedef Outcome DescribePhoneInfoOutcome; + typedef std::future DescribePhoneInfoOutcomeCallable; + typedef std::function&)> DescribePhoneInfoAsyncHandler; + typedef Outcome DescribeAttackedIpOutcome; + typedef std::future DescribeAttackedIpOutcomeCallable; + typedef std::function&)> DescribeAttackedIpAsyncHandler; + + Jarvis-publicClient(const Credentials &credentials, const ClientConfiguration &configuration); + Jarvis-publicClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + Jarvis-publicClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~Jarvis-publicClient(); + DescribeCountAttackEventOutcome describeCountAttackEvent(const Model::DescribeCountAttackEventRequest &request)const; + void describeCountAttackEventAsync(const Model::DescribeCountAttackEventRequest& request, const DescribeCountAttackEventAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeCountAttackEventOutcomeCallable describeCountAttackEventCallable(const Model::DescribeCountAttackEventRequest& request) const; + DescribeAttackEventOutcome describeAttackEvent(const Model::DescribeAttackEventRequest &request)const; + void describeAttackEventAsync(const Model::DescribeAttackEventRequest& request, const DescribeAttackEventAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeAttackEventOutcomeCallable describeAttackEventCallable(const Model::DescribeAttackEventRequest& 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; + DescribeAttackedIpOutcome describeAttackedIp(const Model::DescribeAttackedIpRequest &request)const; + void describeAttackedIpAsync(const Model::DescribeAttackedIpRequest& request, const DescribeAttackedIpAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeAttackedIpOutcomeCallable describeAttackedIpCallable(const Model::DescribeAttackedIpRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_JARVIS-PUBLICCLIENT_H_ diff --git a/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicExport.h b/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicExport.h new file mode 100644 index 000000000..f263f3b51 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/Jarvis-publicExport.h @@ -0,0 +1,32 @@ +/* + * 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-PUBLIC_JARVIS-PUBLICEXPORT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_JARVIS-PUBLICEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_JARVIS-PUBLIC_LIBRARY) +# define ALIBABACLOUD_JARVIS-PUBLIC_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_JARVIS-PUBLIC_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_JARVIS-PUBLIC_EXPORT +#endif + +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_JARVIS-PUBLICEXPORT_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventRequest.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventRequest.h new file mode 100644 index 000000000..ab523932f --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTREQUEST_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeAttackEventRequest : public RpcServiceRequest + { + + public: + DescribeAttackEventRequest(); + ~DescribeAttackEventRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getServerIpList()const; + void setServerIpList(const std::string& serverIpList); + int getPageSize()const; + void setPageSize(int pageSize); + int getEndTime()const; + void setEndTime(int endTime); + int getCurrentPage()const; + void setCurrentPage(int currentPage); + int getStartTime()const; + void setStartTime(int startTime); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getRegion()const; + void setRegion(const std::string& region); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + std::string sourceIp_; + std::string serverIpList_; + int pageSize_; + int endTime_; + int currentPage_; + int startTime_; + std::string lang_; + std::string region_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTREQUEST_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventResult.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventResult.h new file mode 100644 index 000000000..6622d0ce8 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackEventResult.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_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTRESULT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeAttackEventResult : public ServiceResult + { + public: + struct Event + { + std::string gmtCreate; + std::string sourceIp; + std::string vmIp; + std::string gmtModified; + int gmtCreateStamp; + std::string attackType; + std::string url; + }; + + + DescribeAttackEventResult(); + explicit DescribeAttackEventResult(const std::string &payload); + ~DescribeAttackEventResult(); + std::vector getEventList()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + std::vector eventList_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTRESULT_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpRequest.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpRequest.h new file mode 100644 index 000000000..60e08b808 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPREQUEST_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeAttackedIpRequest : public RpcServiceRequest + { + + public: + DescribeAttackedIpRequest(); + ~DescribeAttackedIpRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getServerIpList()const; + void setServerIpList(const std::string& serverIpList); + int getPageSize()const; + void setPageSize(int pageSize); + int getEndTime()const; + void setEndTime(int endTime); + int getCurrentPage()const; + void setCurrentPage(int currentPage); + int getStartTime()const; + void setStartTime(int startTime); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getRegion()const; + void setRegion(const std::string& region); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + std::string sourceIp_; + std::string serverIpList_; + int pageSize_; + int endTime_; + int currentPage_; + int startTime_; + std::string lang_; + std::string region_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPREQUEST_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpResult.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpResult.h new file mode 100644 index 000000000..d2a8c9df1 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeAttackedIpResult.h @@ -0,0 +1,53 @@ +/* + * 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-PUBLIC_MODEL_DESCRIBEATTACKEDIPRESULT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeAttackedIpResult : public ServiceResult + { + public: + + + DescribeAttackedIpResult(); + explicit DescribeAttackedIpResult(const std::string &payload); + ~DescribeAttackedIpResult(); + std::vector getIpList()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + std::vector ipList_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPRESULT_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventRequest.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventRequest.h new file mode 100644 index 000000000..1ed9d3711 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTREQUEST_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeCountAttackEventRequest : public RpcServiceRequest + { + + public: + DescribeCountAttackEventRequest(); + ~DescribeCountAttackEventRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getServerIpList()const; + void setServerIpList(const std::string& serverIpList); + int getPageSize()const; + void setPageSize(int pageSize); + int getEndTime()const; + void setEndTime(int endTime); + int getCurrentPage()const; + void setCurrentPage(int currentPage); + int getStartTime()const; + void setStartTime(int startTime); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getRegion()const; + void setRegion(const std::string& region); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + std::string sourceIp_; + std::string serverIpList_; + int pageSize_; + int endTime_; + int currentPage_; + int startTime_; + std::string lang_; + std::string region_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTREQUEST_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventResult.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventResult.h new file mode 100644 index 000000000..fbc2ecbdd --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribeCountAttackEventResult.h @@ -0,0 +1,53 @@ +/* + * 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-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTRESULT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_EXPORT DescribeCountAttackEventResult : public ServiceResult + { + public: + + + DescribeCountAttackEventResult(); + explicit DescribeCountAttackEventResult(const std::string &payload); + ~DescribeCountAttackEventResult(); + long getCount()const; + std::string getModule()const; + + protected: + void parse(const std::string &payload); + private: + long count_; + std::string module_; + + }; + } + } +} +#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBECOUNTATTACKEVENTRESULT_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribePhoneInfoRequest.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribePhoneInfoRequest.h new file mode 100644 index 000000000..82c65d408 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/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-PUBLIC_MODEL_DESCRIBEPHONEINFOREQUEST_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEPHONEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_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-PUBLIC_MODEL_DESCRIBEPHONEINFOREQUEST_H_ \ No newline at end of file diff --git a/jarvis-public/include/alibabacloud/jarvis-public/model/DescribePhoneInfoResult.h b/jarvis-public/include/alibabacloud/jarvis-public/model/DescribePhoneInfoResult.h new file mode 100644 index 000000000..0f88e7e32 --- /dev/null +++ b/jarvis-public/include/alibabacloud/jarvis-public/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-PUBLIC_MODEL_DESCRIBEPHONEINFORESULT_H_ +#define ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEPHONEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Jarvis-public + { + namespace Model + { + class ALIBABACLOUD_JARVIS-PUBLIC_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-PUBLIC_MODEL_DESCRIBEPHONEINFORESULT_H_ \ No newline at end of file diff --git a/jarvis-public/src/Jarvis-publicClient.cc b/jarvis-public/src/Jarvis-publicClient.cc new file mode 100644 index 000000000..2349661ef --- /dev/null +++ b/jarvis-public/src/Jarvis-publicClient.cc @@ -0,0 +1,197 @@ +/* + * 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; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Jarvis-public; +using namespace AlibabaCloud::Jarvis-public::Model; + +namespace +{ + const std::string SERVICE_NAME = "jarvis-public"; +} + +Jarvis-publicClient::Jarvis-publicClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "jarvis-public"); +} + +Jarvis-publicClient::Jarvis-publicClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "jarvis-public"); +} + +Jarvis-publicClient::Jarvis-publicClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "jarvis-public"); +} + +Jarvis-publicClient::~Jarvis-publicClient() +{} + +Jarvis-publicClient::DescribeCountAttackEventOutcome Jarvis-publicClient::describeCountAttackEvent(const DescribeCountAttackEventRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeCountAttackEventOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeCountAttackEventOutcome(DescribeCountAttackEventResult(outcome.result())); + else + return DescribeCountAttackEventOutcome(outcome.error()); +} + +void Jarvis-publicClient::describeCountAttackEventAsync(const DescribeCountAttackEventRequest& request, const DescribeCountAttackEventAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeCountAttackEvent(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Jarvis-publicClient::DescribeCountAttackEventOutcomeCallable Jarvis-publicClient::describeCountAttackEventCallable(const DescribeCountAttackEventRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeCountAttackEvent(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Jarvis-publicClient::DescribeAttackEventOutcome Jarvis-publicClient::describeAttackEvent(const DescribeAttackEventRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeAttackEventOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeAttackEventOutcome(DescribeAttackEventResult(outcome.result())); + else + return DescribeAttackEventOutcome(outcome.error()); +} + +void Jarvis-publicClient::describeAttackEventAsync(const DescribeAttackEventRequest& request, const DescribeAttackEventAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeAttackEvent(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Jarvis-publicClient::DescribeAttackEventOutcomeCallable Jarvis-publicClient::describeAttackEventCallable(const DescribeAttackEventRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeAttackEvent(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Jarvis-publicClient::DescribePhoneInfoOutcome Jarvis-publicClient::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 Jarvis-publicClient::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)); +} + +Jarvis-publicClient::DescribePhoneInfoOutcomeCallable Jarvis-publicClient::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(); +} + +Jarvis-publicClient::DescribeAttackedIpOutcome Jarvis-publicClient::describeAttackedIp(const DescribeAttackedIpRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeAttackedIpOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeAttackedIpOutcome(DescribeAttackedIpResult(outcome.result())); + else + return DescribeAttackedIpOutcome(outcome.error()); +} + +void Jarvis-publicClient::describeAttackedIpAsync(const DescribeAttackedIpRequest& request, const DescribeAttackedIpAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeAttackedIp(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Jarvis-publicClient::DescribeAttackedIpOutcomeCallable Jarvis-publicClient::describeAttackedIpCallable(const DescribeAttackedIpRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeAttackedIp(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/jarvis-public/src/model/DescribeAttackEventRequest.cc b/jarvis-public/src/model/DescribeAttackEventRequest.cc new file mode 100644 index 000000000..581e38214 --- /dev/null +++ b/jarvis-public/src/model/DescribeAttackEventRequest.cc @@ -0,0 +1,126 @@ +/* + * 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-public::Model::DescribeAttackEventRequest; + +DescribeAttackEventRequest::DescribeAttackEventRequest() : + RpcServiceRequest("jarvis-public", "2018-06-21", "DescribeAttackEvent") +{} + +DescribeAttackEventRequest::~DescribeAttackEventRequest() +{} + +std::string DescribeAttackEventRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeAttackEventRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeAttackEventRequest::getServerIpList()const +{ + return serverIpList_; +} + +void DescribeAttackEventRequest::setServerIpList(const std::string& serverIpList) +{ + serverIpList_ = serverIpList; + setParameter("ServerIpList", serverIpList); +} + +int DescribeAttackEventRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeAttackEventRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeAttackEventRequest::getEndTime()const +{ + return endTime_; +} + +void DescribeAttackEventRequest::setEndTime(int endTime) +{ + endTime_ = endTime; + setParameter("EndTime", std::to_string(endTime)); +} + +int DescribeAttackEventRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribeAttackEventRequest::setCurrentPage(int currentPage) +{ + currentPage_ = currentPage; + setParameter("CurrentPage", std::to_string(currentPage)); +} + +int DescribeAttackEventRequest::getStartTime()const +{ + return startTime_; +} + +void DescribeAttackEventRequest::setStartTime(int startTime) +{ + startTime_ = startTime; + setParameter("StartTime", std::to_string(startTime)); +} + +std::string DescribeAttackEventRequest::getLang()const +{ + return lang_; +} + +void DescribeAttackEventRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribeAttackEventRequest::getRegion()const +{ + return region_; +} + +void DescribeAttackEventRequest::setRegion(const std::string& region) +{ + region_ = region; + setParameter("Region", region); +} + +std::string DescribeAttackEventRequest::getProductType()const +{ + return productType_; +} + +void DescribeAttackEventRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setParameter("ProductType", productType); +} + diff --git a/jarvis-public/src/model/DescribeAttackEventResult.cc b/jarvis-public/src/model/DescribeAttackEventResult.cc new file mode 100644 index 000000000..a0849eb3f --- /dev/null +++ b/jarvis-public/src/model/DescribeAttackEventResult.cc @@ -0,0 +1,77 @@ +/* + * 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-public; +using namespace AlibabaCloud::Jarvis-public::Model; + +DescribeAttackEventResult::DescribeAttackEventResult() : + ServiceResult() +{} + +DescribeAttackEventResult::DescribeAttackEventResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeAttackEventResult::~DescribeAttackEventResult() +{} + +void DescribeAttackEventResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allEventList = value["EventList"]["Event"]; + for (auto value : allEventList) + { + Event eventListObject; + if(!value["VmIp"].isNull()) + eventListObject.vmIp = value["VmIp"].asString(); + if(!value["SourceIp"].isNull()) + eventListObject.sourceIp = value["SourceIp"].asString(); + if(!value["Url"].isNull()) + eventListObject.url = value["Url"].asString(); + if(!value["AttackType"].isNull()) + eventListObject.attackType = value["AttackType"].asString(); + if(!value["GmtCreate"].isNull()) + eventListObject.gmtCreate = value["GmtCreate"].asString(); + if(!value["GmtCreateStamp"].isNull()) + eventListObject.gmtCreateStamp = std::stoi(value["GmtCreateStamp"].asString()); + if(!value["GmtModified"].isNull()) + eventListObject.gmtModified = value["GmtModified"].asString(); + eventList_.push_back(eventListObject); + } + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + +} + +std::vector DescribeAttackEventResult::getEventList()const +{ + return eventList_; +} + +std::string DescribeAttackEventResult::getModule()const +{ + return module_; +} + diff --git a/jarvis-public/src/model/DescribeAttackedIpRequest.cc b/jarvis-public/src/model/DescribeAttackedIpRequest.cc new file mode 100644 index 000000000..54cee402f --- /dev/null +++ b/jarvis-public/src/model/DescribeAttackedIpRequest.cc @@ -0,0 +1,126 @@ +/* + * 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-public::Model::DescribeAttackedIpRequest; + +DescribeAttackedIpRequest::DescribeAttackedIpRequest() : + RpcServiceRequest("jarvis-public", "2018-06-21", "DescribeAttackedIp") +{} + +DescribeAttackedIpRequest::~DescribeAttackedIpRequest() +{} + +std::string DescribeAttackedIpRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeAttackedIpRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeAttackedIpRequest::getServerIpList()const +{ + return serverIpList_; +} + +void DescribeAttackedIpRequest::setServerIpList(const std::string& serverIpList) +{ + serverIpList_ = serverIpList; + setParameter("ServerIpList", serverIpList); +} + +int DescribeAttackedIpRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeAttackedIpRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeAttackedIpRequest::getEndTime()const +{ + return endTime_; +} + +void DescribeAttackedIpRequest::setEndTime(int endTime) +{ + endTime_ = endTime; + setParameter("EndTime", std::to_string(endTime)); +} + +int DescribeAttackedIpRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribeAttackedIpRequest::setCurrentPage(int currentPage) +{ + currentPage_ = currentPage; + setParameter("CurrentPage", std::to_string(currentPage)); +} + +int DescribeAttackedIpRequest::getStartTime()const +{ + return startTime_; +} + +void DescribeAttackedIpRequest::setStartTime(int startTime) +{ + startTime_ = startTime; + setParameter("StartTime", std::to_string(startTime)); +} + +std::string DescribeAttackedIpRequest::getLang()const +{ + return lang_; +} + +void DescribeAttackedIpRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribeAttackedIpRequest::getRegion()const +{ + return region_; +} + +void DescribeAttackedIpRequest::setRegion(const std::string& region) +{ + region_ = region; + setParameter("Region", region); +} + +std::string DescribeAttackedIpRequest::getProductType()const +{ + return productType_; +} + +void DescribeAttackedIpRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setParameter("ProductType", productType); +} + diff --git a/jarvis-public/src/model/DescribeAttackedIpResult.cc b/jarvis-public/src/model/DescribeAttackedIpResult.cc new file mode 100644 index 000000000..020eb3b06 --- /dev/null +++ b/jarvis-public/src/model/DescribeAttackedIpResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Jarvis-public; +using namespace AlibabaCloud::Jarvis-public::Model; + +DescribeAttackedIpResult::DescribeAttackedIpResult() : + ServiceResult() +{} + +DescribeAttackedIpResult::DescribeAttackedIpResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeAttackedIpResult::~DescribeAttackedIpResult() +{} + +void DescribeAttackedIpResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allIpList = value["IpList"]["IpList"]; + for (const auto &item : allIpList) + ipList_.push_back(item.asString()); + if(!value["Module"].isNull()) + module_ = value["Module"].asString(); + +} + +std::vector DescribeAttackedIpResult::getIpList()const +{ + return ipList_; +} + +std::string DescribeAttackedIpResult::getModule()const +{ + return module_; +} + diff --git a/jarvis-public/src/model/DescribeCountAttackEventRequest.cc b/jarvis-public/src/model/DescribeCountAttackEventRequest.cc new file mode 100644 index 000000000..df365e2df --- /dev/null +++ b/jarvis-public/src/model/DescribeCountAttackEventRequest.cc @@ -0,0 +1,126 @@ +/* + * 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-public::Model::DescribeCountAttackEventRequest; + +DescribeCountAttackEventRequest::DescribeCountAttackEventRequest() : + RpcServiceRequest("jarvis-public", "2018-06-21", "DescribeCountAttackEvent") +{} + +DescribeCountAttackEventRequest::~DescribeCountAttackEventRequest() +{} + +std::string DescribeCountAttackEventRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeCountAttackEventRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string DescribeCountAttackEventRequest::getServerIpList()const +{ + return serverIpList_; +} + +void DescribeCountAttackEventRequest::setServerIpList(const std::string& serverIpList) +{ + serverIpList_ = serverIpList; + setParameter("ServerIpList", serverIpList); +} + +int DescribeCountAttackEventRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeCountAttackEventRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeCountAttackEventRequest::getEndTime()const +{ + return endTime_; +} + +void DescribeCountAttackEventRequest::setEndTime(int endTime) +{ + endTime_ = endTime; + setParameter("EndTime", std::to_string(endTime)); +} + +int DescribeCountAttackEventRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribeCountAttackEventRequest::setCurrentPage(int currentPage) +{ + currentPage_ = currentPage; + setParameter("CurrentPage", std::to_string(currentPage)); +} + +int DescribeCountAttackEventRequest::getStartTime()const +{ + return startTime_; +} + +void DescribeCountAttackEventRequest::setStartTime(int startTime) +{ + startTime_ = startTime; + setParameter("StartTime", std::to_string(startTime)); +} + +std::string DescribeCountAttackEventRequest::getLang()const +{ + return lang_; +} + +void DescribeCountAttackEventRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::string DescribeCountAttackEventRequest::getRegion()const +{ + return region_; +} + +void DescribeCountAttackEventRequest::setRegion(const std::string& region) +{ + region_ = region; + setParameter("Region", region); +} + +std::string DescribeCountAttackEventRequest::getProductType()const +{ + return productType_; +} + +void DescribeCountAttackEventRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setParameter("ProductType", productType); +} + diff --git a/jarvis-public/src/model/DescribeCountAttackEventResult.cc b/jarvis-public/src/model/DescribeCountAttackEventResult.cc new file mode 100644 index 000000000..d81fc3c1b --- /dev/null +++ b/jarvis-public/src/model/DescribeCountAttackEventResult.cc @@ -0,0 +1,59 @@ +/* + * 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-public; +using namespace AlibabaCloud::Jarvis-public::Model; + +DescribeCountAttackEventResult::DescribeCountAttackEventResult() : + ServiceResult() +{} + +DescribeCountAttackEventResult::DescribeCountAttackEventResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeCountAttackEventResult::~DescribeCountAttackEventResult() +{} + +void DescribeCountAttackEventResult::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["Count"].isNull()) + count_ = std::stol(value["Count"].asString()); + +} + +long DescribeCountAttackEventResult::getCount()const +{ + return count_; +} + +std::string DescribeCountAttackEventResult::getModule()const +{ + return module_; +} + diff --git a/jarvis-public/src/model/DescribePhoneInfoRequest.cc b/jarvis-public/src/model/DescribePhoneInfoRequest.cc new file mode 100644 index 000000000..5a289c6dc --- /dev/null +++ b/jarvis-public/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-public::Model::DescribePhoneInfoRequest; + +DescribePhoneInfoRequest::DescribePhoneInfoRequest() : + RpcServiceRequest("jarvis-public", "2018-06-21", "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-public/src/model/DescribePhoneInfoResult.cc b/jarvis-public/src/model/DescribePhoneInfoResult.cc new file mode 100644 index 000000000..90f726dc9 --- /dev/null +++ b/jarvis-public/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-public; +using namespace AlibabaCloud::Jarvis-public::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_; +} +