Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e5610d91f |
@@ -1,3 +1,6 @@
|
||||
2019-03-13 Version: 1.34.14
|
||||
1, Update Dependency
|
||||
|
||||
2019-03-13 Version: 1.34.13
|
||||
1, Update Dependency
|
||||
|
||||
|
||||
@@ -91,4 +91,5 @@ add_subdirectory(arms)
|
||||
add_subdirectory(lubancloud)
|
||||
add_subdirectory(alimt)
|
||||
|
||||
add_subdirectory(xspace)
|
||||
add_subdirectory(xspace)
|
||||
add_subdirectory(jarvis-public)
|
||||
98
jarvis-public/CMakeLists.txt
Normal file
98
jarvis-public/CMakeLists.txt
Normal file
@@ -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}
|
||||
)
|
||||
@@ -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 <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#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<Error, Model::DescribeCountAttackEventResult> DescribeCountAttackEventOutcome;
|
||||
typedef std::future<DescribeCountAttackEventOutcome> DescribeCountAttackEventOutcomeCallable;
|
||||
typedef std::function<void(const Jarvis-publicClient*, const Model::DescribeCountAttackEventRequest&, const DescribeCountAttackEventOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCountAttackEventAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeAttackEventResult> DescribeAttackEventOutcome;
|
||||
typedef std::future<DescribeAttackEventOutcome> DescribeAttackEventOutcomeCallable;
|
||||
typedef std::function<void(const Jarvis-publicClient*, const Model::DescribeAttackEventRequest&, const DescribeAttackEventOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAttackEventAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribePhoneInfoResult> DescribePhoneInfoOutcome;
|
||||
typedef std::future<DescribePhoneInfoOutcome> DescribePhoneInfoOutcomeCallable;
|
||||
typedef std::function<void(const Jarvis-publicClient*, const Model::DescribePhoneInfoRequest&, const DescribePhoneInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePhoneInfoAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeAttackedIpResult> DescribeAttackedIpOutcome;
|
||||
typedef std::future<DescribeAttackedIpOutcome> DescribeAttackedIpOutcomeCallable;
|
||||
typedef std::function<void(const Jarvis-publicClient*, const Model::DescribeAttackedIpRequest&, const DescribeAttackedIpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAttackedIpAsyncHandler;
|
||||
|
||||
Jarvis-publicClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
Jarvis-publicClient(const std::shared_ptr<CredentialsProvider> &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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeAttackedIpOutcomeCallable describeAttackedIpCallable(const Model::DescribeAttackedIpRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_JARVIS-PUBLIC_JARVIS-PUBLICCLIENT_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 <alibabacloud/core/Global.h>
|
||||
|
||||
#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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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<Event> getEventList()const;
|
||||
std::string getModule()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<Event> eventList_;
|
||||
std::string module_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEVENTRESULT_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 <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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<std::string> getIpList()const;
|
||||
std::string getModule()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<std::string> ipList_;
|
||||
std::string module_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_JARVIS-PUBLIC_MODEL_DESCRIBEATTACKEDIPRESULT_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 <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/jarvis-public/Jarvis-publicExport.h>
|
||||
|
||||
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_
|
||||
197
jarvis-public/src/Jarvis-publicClient.cc
Normal file
197
jarvis-public/src/Jarvis-publicClient.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/Jarvis-publicClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
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<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "jarvis-public");
|
||||
}
|
||||
|
||||
Jarvis-publicClient::Jarvis-publicClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(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<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<DescribeCountAttackEventOutcome()>>(
|
||||
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeAttackEventOutcome()>>(
|
||||
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribePhoneInfoOutcome()>>(
|
||||
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeAttackedIpOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAttackedIp(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
126
jarvis-public/src/model/DescribeAttackEventRequest.cc
Normal file
126
jarvis-public/src/model/DescribeAttackEventRequest.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/model/DescribeAttackEventRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
77
jarvis-public/src/model/DescribeAttackEventResult.cc
Normal file
77
jarvis-public/src/model/DescribeAttackEventResult.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/model/DescribeAttackEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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::Event> DescribeAttackEventResult::getEventList()const
|
||||
{
|
||||
return eventList_;
|
||||
}
|
||||
|
||||
std::string DescribeAttackEventResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
126
jarvis-public/src/model/DescribeAttackedIpRequest.cc
Normal file
126
jarvis-public/src/model/DescribeAttackedIpRequest.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/model/DescribeAttackedIpRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
60
jarvis-public/src/model/DescribeAttackedIpResult.cc
Normal file
60
jarvis-public/src/model/DescribeAttackedIpResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/jarvis-public/model/DescribeAttackedIpResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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<std::string> DescribeAttackedIpResult::getIpList()const
|
||||
{
|
||||
return ipList_;
|
||||
}
|
||||
|
||||
std::string DescribeAttackedIpResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
126
jarvis-public/src/model/DescribeCountAttackEventRequest.cc
Normal file
126
jarvis-public/src/model/DescribeCountAttackEventRequest.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/model/DescribeCountAttackEventRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
59
jarvis-public/src/model/DescribeCountAttackEventResult.cc
Normal file
59
jarvis-public/src/model/DescribeCountAttackEventResult.cc
Normal file
@@ -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 <alibabacloud/jarvis-public/model/DescribeCountAttackEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
71
jarvis-public/src/model/DescribePhoneInfoRequest.cc
Normal file
71
jarvis-public/src/model/DescribePhoneInfoRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/jarvis-public/model/DescribePhoneInfoRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
73
jarvis-public/src/model/DescribePhoneInfoResult.cc
Normal file
73
jarvis-public/src/model/DescribePhoneInfoResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/jarvis-public/model/DescribePhoneInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user