@@ -31,21 +31,21 @@ Jarvis_publicClient::Jarvis_publicClient(const Credentials &credentials, const C
|
||||
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, "");
|
||||
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, "");
|
||||
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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "jarvis-public");
|
||||
}
|
||||
|
||||
Jarvis_publicClient::~Jarvis_publicClient()
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string DescribeAttackEventRequest::getSourceIp()const
|
||||
void DescribeAttackEventRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
setCoreParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeAttackEventRequest::getServerIpList()const
|
||||
@@ -44,7 +44,7 @@ std::string DescribeAttackEventRequest::getServerIpList()const
|
||||
void DescribeAttackEventRequest::setServerIpList(const std::string& serverIpList)
|
||||
{
|
||||
serverIpList_ = serverIpList;
|
||||
setParameter("ServerIpList", serverIpList);
|
||||
setCoreParameter("ServerIpList", serverIpList);
|
||||
}
|
||||
|
||||
int DescribeAttackEventRequest::getPageSize()const
|
||||
@@ -55,7 +55,7 @@ int DescribeAttackEventRequest::getPageSize()const
|
||||
void DescribeAttackEventRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeAttackEventRequest::getEndTime()const
|
||||
@@ -66,7 +66,7 @@ int DescribeAttackEventRequest::getEndTime()const
|
||||
void DescribeAttackEventRequest::setEndTime(int endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
setCoreParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
int DescribeAttackEventRequest::getCurrentPage()const
|
||||
@@ -77,7 +77,7 @@ int DescribeAttackEventRequest::getCurrentPage()const
|
||||
void DescribeAttackEventRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
int DescribeAttackEventRequest::getStartTime()const
|
||||
@@ -88,7 +88,7 @@ int DescribeAttackEventRequest::getStartTime()const
|
||||
void DescribeAttackEventRequest::setStartTime(int startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
setCoreParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string DescribeAttackEventRequest::getLang()const
|
||||
@@ -99,7 +99,7 @@ std::string DescribeAttackEventRequest::getLang()const
|
||||
void DescribeAttackEventRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
setCoreParameter("Lang", lang);
|
||||
}
|
||||
|
||||
std::string DescribeAttackEventRequest::getRegion()const
|
||||
@@ -110,7 +110,7 @@ std::string DescribeAttackEventRequest::getRegion()const
|
||||
void DescribeAttackEventRequest::setRegion(const std::string& region)
|
||||
{
|
||||
region_ = region;
|
||||
setParameter("Region", region);
|
||||
setCoreParameter("Region", region);
|
||||
}
|
||||
|
||||
std::string DescribeAttackEventRequest::getProductType()const
|
||||
@@ -121,6 +121,6 @@ std::string DescribeAttackEventRequest::getProductType()const
|
||||
void DescribeAttackEventRequest::setProductType(const std::string& productType)
|
||||
{
|
||||
productType_ = productType;
|
||||
setParameter("ProductType", productType);
|
||||
setCoreParameter("ProductType", productType);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DescribeAttackEventResult::~DescribeAttackEventResult()
|
||||
|
||||
void DescribeAttackEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEventList = value["EventList"]["Event"];
|
||||
for (auto value : allEventList)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string DescribeAttackedIpRequest::getSourceIp()const
|
||||
void DescribeAttackedIpRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
setCoreParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeAttackedIpRequest::getServerIpList()const
|
||||
@@ -44,7 +44,7 @@ std::string DescribeAttackedIpRequest::getServerIpList()const
|
||||
void DescribeAttackedIpRequest::setServerIpList(const std::string& serverIpList)
|
||||
{
|
||||
serverIpList_ = serverIpList;
|
||||
setParameter("ServerIpList", serverIpList);
|
||||
setCoreParameter("ServerIpList", serverIpList);
|
||||
}
|
||||
|
||||
int DescribeAttackedIpRequest::getPageSize()const
|
||||
@@ -55,7 +55,7 @@ int DescribeAttackedIpRequest::getPageSize()const
|
||||
void DescribeAttackedIpRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeAttackedIpRequest::getEndTime()const
|
||||
@@ -66,7 +66,7 @@ int DescribeAttackedIpRequest::getEndTime()const
|
||||
void DescribeAttackedIpRequest::setEndTime(int endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
setCoreParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
int DescribeAttackedIpRequest::getCurrentPage()const
|
||||
@@ -77,7 +77,7 @@ int DescribeAttackedIpRequest::getCurrentPage()const
|
||||
void DescribeAttackedIpRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
int DescribeAttackedIpRequest::getStartTime()const
|
||||
@@ -88,7 +88,7 @@ int DescribeAttackedIpRequest::getStartTime()const
|
||||
void DescribeAttackedIpRequest::setStartTime(int startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
setCoreParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string DescribeAttackedIpRequest::getLang()const
|
||||
@@ -99,7 +99,7 @@ std::string DescribeAttackedIpRequest::getLang()const
|
||||
void DescribeAttackedIpRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
setCoreParameter("Lang", lang);
|
||||
}
|
||||
|
||||
std::string DescribeAttackedIpRequest::getRegion()const
|
||||
@@ -110,7 +110,7 @@ std::string DescribeAttackedIpRequest::getRegion()const
|
||||
void DescribeAttackedIpRequest::setRegion(const std::string& region)
|
||||
{
|
||||
region_ = region;
|
||||
setParameter("Region", region);
|
||||
setCoreParameter("Region", region);
|
||||
}
|
||||
|
||||
std::string DescribeAttackedIpRequest::getProductType()const
|
||||
@@ -121,6 +121,6 @@ std::string DescribeAttackedIpRequest::getProductType()const
|
||||
void DescribeAttackedIpRequest::setProductType(const std::string& productType)
|
||||
{
|
||||
productType_ = productType;
|
||||
setParameter("ProductType", productType);
|
||||
setCoreParameter("ProductType", productType);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DescribeAttackedIpResult::~DescribeAttackedIpResult()
|
||||
|
||||
void DescribeAttackedIpResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allIpList = value["IpList"]["IpList"];
|
||||
for (const auto &item : allIpList)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string DescribeCountAttackEventRequest::getSourceIp()const
|
||||
void DescribeCountAttackEventRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
setCoreParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeCountAttackEventRequest::getServerIpList()const
|
||||
@@ -44,7 +44,7 @@ std::string DescribeCountAttackEventRequest::getServerIpList()const
|
||||
void DescribeCountAttackEventRequest::setServerIpList(const std::string& serverIpList)
|
||||
{
|
||||
serverIpList_ = serverIpList;
|
||||
setParameter("ServerIpList", serverIpList);
|
||||
setCoreParameter("ServerIpList", serverIpList);
|
||||
}
|
||||
|
||||
int DescribeCountAttackEventRequest::getPageSize()const
|
||||
@@ -55,7 +55,7 @@ int DescribeCountAttackEventRequest::getPageSize()const
|
||||
void DescribeCountAttackEventRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeCountAttackEventRequest::getEndTime()const
|
||||
@@ -66,7 +66,7 @@ int DescribeCountAttackEventRequest::getEndTime()const
|
||||
void DescribeCountAttackEventRequest::setEndTime(int endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
setCoreParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
int DescribeCountAttackEventRequest::getCurrentPage()const
|
||||
@@ -77,7 +77,7 @@ int DescribeCountAttackEventRequest::getCurrentPage()const
|
||||
void DescribeCountAttackEventRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
int DescribeCountAttackEventRequest::getStartTime()const
|
||||
@@ -88,7 +88,7 @@ int DescribeCountAttackEventRequest::getStartTime()const
|
||||
void DescribeCountAttackEventRequest::setStartTime(int startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
setCoreParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string DescribeCountAttackEventRequest::getLang()const
|
||||
@@ -99,7 +99,7 @@ std::string DescribeCountAttackEventRequest::getLang()const
|
||||
void DescribeCountAttackEventRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
setCoreParameter("Lang", lang);
|
||||
}
|
||||
|
||||
std::string DescribeCountAttackEventRequest::getRegion()const
|
||||
@@ -110,7 +110,7 @@ std::string DescribeCountAttackEventRequest::getRegion()const
|
||||
void DescribeCountAttackEventRequest::setRegion(const std::string& region)
|
||||
{
|
||||
region_ = region;
|
||||
setParameter("Region", region);
|
||||
setCoreParameter("Region", region);
|
||||
}
|
||||
|
||||
std::string DescribeCountAttackEventRequest::getProductType()const
|
||||
@@ -121,6 +121,6 @@ std::string DescribeCountAttackEventRequest::getProductType()const
|
||||
void DescribeCountAttackEventRequest::setProductType(const std::string& productType)
|
||||
{
|
||||
productType_ = productType;
|
||||
setParameter("ProductType", productType);
|
||||
setCoreParameter("ProductType", productType);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DescribeCountAttackEventResult::~DescribeCountAttackEventResult()
|
||||
|
||||
void DescribeCountAttackEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Module"].isNull())
|
||||
module_ = value["Module"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string DescribePhoneInfoRequest::getSourceIp()const
|
||||
void DescribePhoneInfoRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
setCoreParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribePhoneInfoRequest::getPhoneNum()const
|
||||
@@ -44,7 +44,7 @@ std::string DescribePhoneInfoRequest::getPhoneNum()const
|
||||
void DescribePhoneInfoRequest::setPhoneNum(const std::string& phoneNum)
|
||||
{
|
||||
phoneNum_ = phoneNum;
|
||||
setParameter("PhoneNum", phoneNum);
|
||||
setCoreParameter("PhoneNum", phoneNum);
|
||||
}
|
||||
|
||||
std::string DescribePhoneInfoRequest::getLang()const
|
||||
@@ -55,7 +55,7 @@ std::string DescribePhoneInfoRequest::getLang()const
|
||||
void DescribePhoneInfoRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
setCoreParameter("Lang", lang);
|
||||
}
|
||||
|
||||
std::string DescribePhoneInfoRequest::getSourceCode()const
|
||||
@@ -66,6 +66,6 @@ std::string DescribePhoneInfoRequest::getSourceCode()const
|
||||
void DescribePhoneInfoRequest::setSourceCode(const std::string& sourceCode)
|
||||
{
|
||||
sourceCode_ = sourceCode;
|
||||
setParameter("SourceCode", sourceCode);
|
||||
setCoreParameter("SourceCode", sourceCode);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DescribePhoneInfoResult::~DescribePhoneInfoResult()
|
||||
|
||||
void DescribePhoneInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Module"].isNull())
|
||||
module_ = value["Module"].asString();
|
||||
|
||||
Reference in New Issue
Block a user