JARVIS SDK Auto Released By mainri.mxy,Version:1.17.0

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2018-06-06 14:08:02 +08:00
parent 4c89122ae8
commit dacb1c69b7
21 changed files with 1529 additions and 1 deletions

View File

@@ -159,6 +159,78 @@ JarvisClient::CreateAccessWhiteListGroupOutcomeCallable JarvisClient::createAcce
return task->get_future();
}
JarvisClient::DescribeDdosDefenseInfoOutcome JarvisClient::describeDdosDefenseInfo(const DescribeDdosDefenseInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDdosDefenseInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDdosDefenseInfoOutcome(DescribeDdosDefenseInfoResult(outcome.result()));
else
return DescribeDdosDefenseInfoOutcome(outcome.error());
}
void JarvisClient::describeDdosDefenseInfoAsync(const DescribeDdosDefenseInfoRequest& request, const DescribeDdosDefenseInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDdosDefenseInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
JarvisClient::DescribeDdosDefenseInfoOutcomeCallable JarvisClient::describeDdosDefenseInfoCallable(const DescribeDdosDefenseInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDdosDefenseInfoOutcome()>>(
[this, request]()
{
return this->describeDdosDefenseInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
JarvisClient::DescribePhoneInfoOutcome JarvisClient::describePhoneInfo(const DescribePhoneInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribePhoneInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribePhoneInfoOutcome(DescribePhoneInfoResult(outcome.result()));
else
return DescribePhoneInfoOutcome(outcome.error());
}
void JarvisClient::describePhoneInfoAsync(const DescribePhoneInfoRequest& request, const DescribePhoneInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describePhoneInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
JarvisClient::DescribePhoneInfoOutcomeCallable JarvisClient::describePhoneInfoCallable(const DescribePhoneInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribePhoneInfoOutcome()>>(
[this, request]()
{
return this->describePhoneInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
JarvisClient::DescribeAccessWhitelistEcsListOutcome JarvisClient::describeAccessWhitelistEcsList(const DescribeAccessWhitelistEcsListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -519,6 +591,42 @@ JarvisClient::DescribeResetRecordQueryCountOutcomeCallable JarvisClient::describ
return task->get_future();
}
JarvisClient::DescribePunishListOutcome JarvisClient::describePunishList(const DescribePunishListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribePunishListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribePunishListOutcome(DescribePunishListResult(outcome.result()));
else
return DescribePunishListOutcome(outcome.error());
}
void JarvisClient::describePunishListAsync(const DescribePunishListRequest& request, const DescribePunishListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describePunishList(request), context);
};
asyncExecute(new Runnable(fn));
}
JarvisClient::DescribePunishListOutcomeCallable JarvisClient::describePunishListCallable(const DescribePunishListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribePunishListOutcome()>>(
[this, request]()
{
return this->describePunishList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
JarvisClient::DescribeUidWhiteListGroupOutcome JarvisClient::describeUidWhiteListGroup(const DescribeUidWhiteListGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -555,6 +663,42 @@ JarvisClient::DescribeUidWhiteListGroupOutcomeCallable JarvisClient::describeUid
return task->get_future();
}
JarvisClient::DescribeRiskListDetailOutcome JarvisClient::describeRiskListDetail(const DescribeRiskListDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeRiskListDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeRiskListDetailOutcome(DescribeRiskListDetailResult(outcome.result()));
else
return DescribeRiskListDetailOutcome(outcome.error());
}
void JarvisClient::describeRiskListDetailAsync(const DescribeRiskListDetailRequest& request, const DescribeRiskListDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeRiskListDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
JarvisClient::DescribeRiskListDetailOutcomeCallable JarvisClient::describeRiskListDetailCallable(const DescribeRiskListDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeRiskListDetailOutcome()>>(
[this, request]()
{
return this->describeRiskListDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
JarvisClient::DescribeRiskTrendOutcome JarvisClient::describeRiskTrend(const DescribeRiskTrendRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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/model/DescribeDdosDefenseInfoRequest.h>
using AlibabaCloud::Jarvis::Model::DescribeDdosDefenseInfoRequest;
DescribeDdosDefenseInfoRequest::DescribeDdosDefenseInfoRequest() :
RpcServiceRequest("jarvis", "2018-02-06", "DescribeDdosDefenseInfo")
{}
DescribeDdosDefenseInfoRequest::~DescribeDdosDefenseInfoRequest()
{}
std::string DescribeDdosDefenseInfoRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeDdosDefenseInfoRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeDdosDefenseInfoRequest::getLang()const
{
return lang_;
}
void DescribeDdosDefenseInfoRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string DescribeDdosDefenseInfoRequest::getSrcUid()const
{
return srcUid_;
}
void DescribeDdosDefenseInfoRequest::setSrcUid(const std::string& srcUid)
{
srcUid_ = srcUid;
setParameter("SrcUid", srcUid);
}
std::string DescribeDdosDefenseInfoRequest::getSourceCode()const
{
return sourceCode_;
}
void DescribeDdosDefenseInfoRequest::setSourceCode(const std::string& sourceCode)
{
sourceCode_ = sourceCode;
setParameter("SourceCode", sourceCode);
}

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/jarvis/model/DescribeDdosDefenseInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Jarvis;
using namespace AlibabaCloud::Jarvis::Model;
DescribeDdosDefenseInfoResult::DescribeDdosDefenseInfoResult() :
ServiceResult()
{}
DescribeDdosDefenseInfoResult::DescribeDdosDefenseInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDdosDefenseInfoResult::~DescribeDdosDefenseInfoResult()
{}
void DescribeDdosDefenseInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDdosDefenseThreshold = value["DdosDefenseThreshold"]["DdosDefenseThresholdItem"];
for (auto value : allDdosDefenseThreshold)
{
DdosDefenseThresholdItem ddosDefenseThresholdObject;
if(!value["RegionId"].isNull())
ddosDefenseThresholdObject.regionId = value["RegionId"].asString();
if(!value["CurrThreshold"].isNull())
ddosDefenseThresholdObject.currThreshold = std::stoi(value["CurrThreshold"].asString());
if(!value["RecommendThreshold"].isNull())
ddosDefenseThresholdObject.recommendThreshold = std::stoi(value["RecommendThreshold"].asString());
ddosDefenseThreshold_.push_back(ddosDefenseThresholdObject);
}
if(!value["Module"].isNull())
module_ = value["Module"].asString();
if(!value["BlackTimes"].isNull())
blackTimes_ = std::stoi(value["BlackTimes"].asString());
if(!value["Duration"].isNull())
duration_ = std::stoi(value["Duration"].asString());
if(!value["BgpPkgState"].isNull())
bgpPkgState_ = value["BgpPkgState"].asString();
}
std::vector<DescribeDdosDefenseInfoResult::DdosDefenseThresholdItem> DescribeDdosDefenseInfoResult::getDdosDefenseThreshold()const
{
return ddosDefenseThreshold_;
}
std::string DescribeDdosDefenseInfoResult::getBgpPkgState()const
{
return bgpPkgState_;
}
int DescribeDdosDefenseInfoResult::getBlackTimes()const
{
return blackTimes_;
}
int DescribeDdosDefenseInfoResult::getDuration()const
{
return duration_;
}
std::string DescribeDdosDefenseInfoResult::getModule()const
{
return module_;
}

View 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/model/DescribePhoneInfoRequest.h>
using AlibabaCloud::Jarvis::Model::DescribePhoneInfoRequest;
DescribePhoneInfoRequest::DescribePhoneInfoRequest() :
RpcServiceRequest("jarvis", "2018-02-06", "DescribePhoneInfo")
{}
DescribePhoneInfoRequest::~DescribePhoneInfoRequest()
{}
std::string DescribePhoneInfoRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribePhoneInfoRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribePhoneInfoRequest::getPhoneNum()const
{
return phoneNum_;
}
void DescribePhoneInfoRequest::setPhoneNum(const std::string& phoneNum)
{
phoneNum_ = phoneNum;
setParameter("PhoneNum", phoneNum);
}
std::string DescribePhoneInfoRequest::getLang()const
{
return lang_;
}
void DescribePhoneInfoRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string DescribePhoneInfoRequest::getSourceCode()const
{
return sourceCode_;
}
void DescribePhoneInfoRequest::setSourceCode(const std::string& sourceCode)
{
sourceCode_ = sourceCode;
setParameter("SourceCode", sourceCode);
}

View 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/model/DescribePhoneInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Jarvis;
using namespace AlibabaCloud::Jarvis::Model;
DescribePhoneInfoResult::DescribePhoneInfoResult() :
ServiceResult()
{}
DescribePhoneInfoResult::DescribePhoneInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribePhoneInfoResult::~DescribePhoneInfoResult()
{}
void DescribePhoneInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Module"].isNull())
module_ = value["Module"].asString();
if(!value["phoneNum"].isNull())
phoneNum_ = std::stol(value["phoneNum"].asString());
if(!value["riskLevel"].isNull())
riskLevel_ = std::stol(value["riskLevel"].asString());
if(!value["detectTime"].isNull())
detectTime_ = value["detectTime"].asString();
}
long DescribePhoneInfoResult::getPhoneNum()const
{
return phoneNum_;
}
std::string DescribePhoneInfoResult::getDetectTime()const
{
return detectTime_;
}
std::string DescribePhoneInfoResult::getModule()const
{
return module_;
}
long DescribePhoneInfoResult::getRiskLevel()const
{
return riskLevel_;
}

View File

@@ -0,0 +1,115 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/jarvis/model/DescribePunishListRequest.h>
using AlibabaCloud::Jarvis::Model::DescribePunishListRequest;
DescribePunishListRequest::DescribePunishListRequest() :
RpcServiceRequest("jarvis", "2018-02-06", "DescribePunishList")
{}
DescribePunishListRequest::~DescribePunishListRequest()
{}
std::string DescribePunishListRequest::getSrcIP()const
{
return srcIP_;
}
void DescribePunishListRequest::setSrcIP(const std::string& srcIP)
{
srcIP_ = srcIP;
setParameter("SrcIP", srcIP);
}
std::string DescribePunishListRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribePunishListRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
int DescribePunishListRequest::getPageSize()const
{
return pageSize_;
}
void DescribePunishListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int DescribePunishListRequest::getCurrentPage()const
{
return currentPage_;
}
void DescribePunishListRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string DescribePunishListRequest::getPunishStatus()const
{
return punishStatus_;
}
void DescribePunishListRequest::setPunishStatus(const std::string& punishStatus)
{
punishStatus_ = punishStatus;
setParameter("PunishStatus", punishStatus);
}
std::string DescribePunishListRequest::getLang()const
{
return lang_;
}
void DescribePunishListRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string DescribePunishListRequest::getSrcUid()const
{
return srcUid_;
}
void DescribePunishListRequest::setSrcUid(const std::string& srcUid)
{
srcUid_ = srcUid;
setParameter("SrcUid", srcUid);
}
std::string DescribePunishListRequest::getSourceCode()const
{
return sourceCode_;
}
void DescribePunishListRequest::setSourceCode(const std::string& sourceCode)
{
sourceCode_ = sourceCode;
setParameter("SourceCode", sourceCode);
}

View File

@@ -0,0 +1,99 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/jarvis/model/DescribePunishListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Jarvis;
using namespace AlibabaCloud::Jarvis::Model;
DescribePunishListResult::DescribePunishListResult() :
ServiceResult()
{}
DescribePunishListResult::DescribePunishListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribePunishListResult::~DescribePunishListResult()
{}
void DescribePunishListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataList = value["DataList"]["Data"];
for (auto value : allDataList)
{
Data dataListObject;
if(!value["GmtCreate"].isNull())
dataListObject.gmtCreate = value["GmtCreate"].asString();
if(!value["SrcPort"].isNull())
dataListObject.srcPort = std::stoi(value["SrcPort"].asString());
if(!value["FeedBack"].isNull())
dataListObject.feedBack = std::stoi(value["FeedBack"].asString());
if(!value["GmtExpire"].isNull())
dataListObject.gmtExpire = value["GmtExpire"].asString();
if(!value["PunishType"].isNull())
dataListObject.punishType = value["PunishType"].asString();
if(!value["DstIP"].isNull())
dataListObject.dstIP = value["DstIP"].asString();
if(!value["PunishResult"].isNull())
dataListObject.punishResult = value["PunishResult"].asString();
if(!value["RegionId"].isNull())
dataListObject.regionId = value["RegionId"].asString();
if(!value["DstPort"].isNull())
dataListObject.dstPort = std::stoi(value["DstPort"].asString());
if(!value["Protocol"].isNull())
dataListObject.protocol = value["Protocol"].asString();
if(!value["SrcIP"].isNull())
dataListObject.srcIP = value["SrcIP"].asString();
if(!value["Reason"].isNull())
dataListObject.reason = value["Reason"].asString();
dataList_.push_back(dataListObject);
}
auto pageInfoNode = value["PageInfo"];
if(!pageInfoNode["total"].isNull())
pageInfo_.total = std::stoi(pageInfoNode["total"].asString());
if(!pageInfoNode["pageSize"].isNull())
pageInfo_.pageSize = std::stoi(pageInfoNode["pageSize"].asString());
if(!pageInfoNode["currentPage"].isNull())
pageInfo_.currentPage = std::stoi(pageInfoNode["currentPage"].asString());
if(!value["Module"].isNull())
module_ = value["Module"].asString();
}
std::vector<DescribePunishListResult::Data> DescribePunishListResult::getDataList()const
{
return dataList_;
}
DescribePunishListResult::PageInfo DescribePunishListResult::getPageInfo()const
{
return pageInfo_;
}
std::string DescribePunishListResult::getModule()const
{
return module_;
}

View File

@@ -0,0 +1,148 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/jarvis/model/DescribeRiskListDetailRequest.h>
using AlibabaCloud::Jarvis::Model::DescribeRiskListDetailRequest;
DescribeRiskListDetailRequest::DescribeRiskListDetailRequest() :
RpcServiceRequest("jarvis", "2018-02-06", "DescribeRiskListDetail")
{}
DescribeRiskListDetailRequest::~DescribeRiskListDetailRequest()
{}
std::string DescribeRiskListDetailRequest::getRiskType()const
{
return riskType_;
}
void DescribeRiskListDetailRequest::setRiskType(const std::string& riskType)
{
riskType_ = riskType;
setParameter("RiskType", riskType);
}
std::string DescribeRiskListDetailRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeRiskListDetailRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeRiskListDetailRequest::getPageSize()const
{
return pageSize_;
}
void DescribeRiskListDetailRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", pageSize);
}
std::string DescribeRiskListDetailRequest::getQueryProduct()const
{
return queryProduct_;
}
void DescribeRiskListDetailRequest::setQueryProduct(const std::string& queryProduct)
{
queryProduct_ = queryProduct;
setParameter("QueryProduct", queryProduct);
}
std::string DescribeRiskListDetailRequest::getCurrentPage()const
{
return currentPage_;
}
void DescribeRiskListDetailRequest::setCurrentPage(const std::string& currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", currentPage);
}
std::string DescribeRiskListDetailRequest::getRiskDescribe()const
{
return riskDescribe_;
}
void DescribeRiskListDetailRequest::setRiskDescribe(const std::string& riskDescribe)
{
riskDescribe_ = riskDescribe;
setParameter("RiskDescribe", riskDescribe);
}
std::string DescribeRiskListDetailRequest::getLang()const
{
return lang_;
}
void DescribeRiskListDetailRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string DescribeRiskListDetailRequest::getSrcUid()const
{
return srcUid_;
}
void DescribeRiskListDetailRequest::setSrcUid(const std::string& srcUid)
{
srcUid_ = srcUid;
setParameter("SrcUid", srcUid);
}
std::string DescribeRiskListDetailRequest::getSourceCode()const
{
return sourceCode_;
}
void DescribeRiskListDetailRequest::setSourceCode(const std::string& sourceCode)
{
sourceCode_ = sourceCode;
setParameter("SourceCode", sourceCode);
}
std::string DescribeRiskListDetailRequest::getQueryRegionId()const
{
return queryRegionId_;
}
void DescribeRiskListDetailRequest::setQueryRegionId(const std::string& queryRegionId)
{
queryRegionId_ = queryRegionId;
setParameter("QueryRegionId", queryRegionId);
}
std::string DescribeRiskListDetailRequest::getStatus()const
{
return status_;
}
void DescribeRiskListDetailRequest::setStatus(const std::string& status)
{
status_ = status;
setParameter("Status", status);
}

View File

@@ -0,0 +1,119 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/jarvis/model/DescribeRiskListDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Jarvis;
using namespace AlibabaCloud::Jarvis::Model;
DescribeRiskListDetailResult::DescribeRiskListDetailResult() :
ServiceResult()
{}
DescribeRiskListDetailResult::DescribeRiskListDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeRiskListDetailResult::~DescribeRiskListDetailResult()
{}
void DescribeRiskListDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataList = value["DataList"]["Data"];
for (auto value : allDataList)
{
Data dataListObject;
if(!value["RiskId"].isNull())
dataListObject.riskId = std::stoi(value["RiskId"].asString());
if(!value["UpdateTime"].isNull())
dataListObject.updateTime = value["UpdateTime"].asString();
if(!value["RiskDescribe"].isNull())
dataListObject.riskDescribe = value["RiskDescribe"].asString();
if(!value["RiskType"].isNull())
dataListObject.riskType = value["RiskType"].asString();
if(!value["RiskInstance"].isNull())
dataListObject.riskInstance = value["RiskInstance"].asString();
if(!value["Product"].isNull())
dataListObject.product = value["Product"].asString();
if(!value["RegionId"].isNull())
dataListObject.regionId = value["RegionId"].asString();
if(!value["TacticsName"].isNull())
dataListObject.tacticsName = value["TacticsName"].asString();
if(!value["Status"].isNull())
dataListObject.status = value["Status"].asString();
if(!value["IgnoreTime"].isNull())
dataListObject.ignoreTime = value["IgnoreTime"].asString();
auto allEcsSecGroupRisk = value["EcsSecGroupRisk"]["EcsSecGroupRiskItem"];
for (auto value : allEcsSecGroupRisk)
{
Data::EcsSecGroupRiskItem ecsSecGroupRiskObject;
if(!value["NetType"].isNull())
ecsSecGroupRiskObject.netType = value["NetType"].asString();
if(!value["Direction"].isNull())
ecsSecGroupRiskObject.direction = value["Direction"].asString();
if(!value["DstPortRange"].isNull())
ecsSecGroupRiskObject.dstPortRange = value["DstPortRange"].asString();
if(!value["SrcIpRange"].isNull())
ecsSecGroupRiskObject.srcIpRange = value["SrcIpRange"].asString();
dataListObject.ecsSecGroupRisk.push_back(ecsSecGroupRiskObject);
}
auto allRdsWhitelistRisk = value["RdsWhitelistRisk"]["RdsWhitelistRiskItem"];
for (auto value : allRdsWhitelistRisk)
{
Data::RdsWhitelistRiskItem rdsWhitelistRiskObject;
if(!value["RdsWhitelistGroup"].isNull())
rdsWhitelistRiskObject.rdsWhitelistGroup = value["RdsWhitelistGroup"].asString();
if(!value["RiskDetail"].isNull())
rdsWhitelistRiskObject.riskDetail = value["RiskDetail"].asString();
dataListObject.rdsWhitelistRisk.push_back(rdsWhitelistRiskObject);
}
dataList_.push_back(dataListObject);
}
auto pageInfoNode = value["PageInfo"];
if(!pageInfoNode["total"].isNull())
pageInfo_.total = std::stoi(pageInfoNode["total"].asString());
if(!pageInfoNode["pageSize"].isNull())
pageInfo_.pageSize = std::stoi(pageInfoNode["pageSize"].asString());
if(!pageInfoNode["currentPage"].isNull())
pageInfo_.currentPage = std::stoi(pageInfoNode["currentPage"].asString());
if(!value["Module"].isNull())
module_ = value["Module"].asString();
}
std::vector<DescribeRiskListDetailResult::Data> DescribeRiskListDetailResult::getDataList()const
{
return dataList_;
}
DescribeRiskListDetailResult::PageInfo DescribeRiskListDetailResult::getPageInfo()const
{
return pageInfo_;
}
std::string DescribeRiskListDetailResult::getModule()const
{
return module_;
}