Add cspm ListCheckResult api.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2022-07-15 Version: 1.36.1181
|
||||
- Add cspm ListCheckResult api.
|
||||
|
||||
2022-07-15 Version: 1.36.1180
|
||||
- Add open file detect api.
|
||||
|
||||
|
||||
@@ -325,6 +325,8 @@ set(sas_public_header_model
|
||||
include/alibabacloud/sas/model/InstallBackupClientResult.h
|
||||
include/alibabacloud/sas/model/InstallCloudMonitorRequest.h
|
||||
include/alibabacloud/sas/model/InstallCloudMonitorResult.h
|
||||
include/alibabacloud/sas/model/ListCheckResultRequest.h
|
||||
include/alibabacloud/sas/model/ListCheckResultResult.h
|
||||
include/alibabacloud/sas/model/ListVulAutoRepairConfigRequest.h
|
||||
include/alibabacloud/sas/model/ListVulAutoRepairConfigResult.h
|
||||
include/alibabacloud/sas/model/ModifyAntiBruteForceRuleRequest.h
|
||||
@@ -732,6 +734,8 @@ set(sas_src
|
||||
src/model/InstallBackupClientResult.cc
|
||||
src/model/InstallCloudMonitorRequest.cc
|
||||
src/model/InstallCloudMonitorResult.cc
|
||||
src/model/ListCheckResultRequest.cc
|
||||
src/model/ListCheckResultResult.cc
|
||||
src/model/ListVulAutoRepairConfigRequest.cc
|
||||
src/model/ListVulAutoRepairConfigResult.cc
|
||||
src/model/ModifyAntiBruteForceRuleRequest.cc
|
||||
|
||||
@@ -326,6 +326,8 @@
|
||||
#include "model/InstallBackupClientResult.h"
|
||||
#include "model/InstallCloudMonitorRequest.h"
|
||||
#include "model/InstallCloudMonitorResult.h"
|
||||
#include "model/ListCheckResultRequest.h"
|
||||
#include "model/ListCheckResultResult.h"
|
||||
#include "model/ListVulAutoRepairConfigRequest.h"
|
||||
#include "model/ListVulAutoRepairConfigResult.h"
|
||||
#include "model/ModifyAntiBruteForceRuleRequest.h"
|
||||
@@ -891,6 +893,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::InstallCloudMonitorResult> InstallCloudMonitorOutcome;
|
||||
typedef std::future<InstallCloudMonitorOutcome> InstallCloudMonitorOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::InstallCloudMonitorRequest&, const InstallCloudMonitorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InstallCloudMonitorAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListCheckResultResult> ListCheckResultOutcome;
|
||||
typedef std::future<ListCheckResultOutcome> ListCheckResultOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::ListCheckResultRequest&, const ListCheckResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCheckResultAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListVulAutoRepairConfigResult> ListVulAutoRepairConfigOutcome;
|
||||
typedef std::future<ListVulAutoRepairConfigOutcome> ListVulAutoRepairConfigOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::ListVulAutoRepairConfigRequest&, const ListVulAutoRepairConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListVulAutoRepairConfigAsyncHandler;
|
||||
@@ -1502,6 +1507,9 @@ namespace AlibabaCloud
|
||||
InstallCloudMonitorOutcome installCloudMonitor(const Model::InstallCloudMonitorRequest &request)const;
|
||||
void installCloudMonitorAsync(const Model::InstallCloudMonitorRequest& request, const InstallCloudMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
InstallCloudMonitorOutcomeCallable installCloudMonitorCallable(const Model::InstallCloudMonitorRequest& request) const;
|
||||
ListCheckResultOutcome listCheckResult(const Model::ListCheckResultRequest &request)const;
|
||||
void listCheckResultAsync(const Model::ListCheckResultRequest& request, const ListCheckResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListCheckResultOutcomeCallable listCheckResultCallable(const Model::ListCheckResultRequest& request) const;
|
||||
ListVulAutoRepairConfigOutcome listVulAutoRepairConfig(const Model::ListVulAutoRepairConfigRequest &request)const;
|
||||
void listVulAutoRepairConfigAsync(const Model::ListVulAutoRepairConfigRequest& request, const ListVulAutoRepairConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListVulAutoRepairConfigOutcomeCallable listVulAutoRepairConfigCallable(const Model::ListVulAutoRepairConfigRequest& request) const;
|
||||
|
||||
81
sas/include/alibabacloud/sas/model/ListCheckResultRequest.h
Normal file
81
sas/include/alibabacloud/sas/model/ListCheckResultRequest.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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_SAS_MODEL_LISTCHECKRESULTREQUEST_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_LISTCHECKRESULTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Sas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_SAS_EXPORT ListCheckResultRequest : public RpcServiceRequest {
|
||||
public:
|
||||
ListCheckResultRequest();
|
||||
~ListCheckResultRequest();
|
||||
std::vector<std::string> getInstanceSubTypes() const;
|
||||
void setInstanceSubTypes(const std::vector<std::string> &instanceSubTypes);
|
||||
std::vector<long> getStandardIds() const;
|
||||
void setStandardIds(const std::vector<long> &standardIds);
|
||||
std::vector<std::string> getRiskLevels() const;
|
||||
void setRiskLevels(const std::vector<std::string> &riskLevels);
|
||||
std::vector<std::string> getInstanceTypes() const;
|
||||
void setInstanceTypes(const std::vector<std::string> &instanceTypes);
|
||||
std::string getCheckKey() const;
|
||||
void setCheckKey(const std::string &checkKey);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
int getPageSize() const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getLang() const;
|
||||
void setLang(const std::string &lang);
|
||||
std::vector<std::string> getVendors() const;
|
||||
void setVendors(const std::vector<std::string> &vendors);
|
||||
int getCurrentPage() const;
|
||||
void setCurrentPage(int currentPage);
|
||||
std::vector<long> getRequirementIds() const;
|
||||
void setRequirementIds(const std::vector<long> &requirementIds);
|
||||
std::vector<std::string> getSortTypes() const;
|
||||
void setSortTypes(const std::vector<std::string> &sortTypes);
|
||||
std::vector<std::string> getInstanceIds() const;
|
||||
void setInstanceIds(const std::vector<std::string> &instanceIds);
|
||||
std::vector<std::string> getStatuses() const;
|
||||
void setStatuses(const std::vector<std::string> &statuses);
|
||||
|
||||
private:
|
||||
std::vector<std::string> instanceSubTypes_;
|
||||
std::vector<long> standardIds_;
|
||||
std::vector<std::string> riskLevels_;
|
||||
std::vector<std::string> instanceTypes_;
|
||||
std::string checkKey_;
|
||||
std::string sourceIp_;
|
||||
int pageSize_;
|
||||
std::string lang_;
|
||||
std::vector<std::string> vendors_;
|
||||
int currentPage_;
|
||||
std::vector<long> requirementIds_;
|
||||
std::vector<std::string> sortTypes_;
|
||||
std::vector<std::string> instanceIds_;
|
||||
std::vector<std::string> statuses_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Sas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_LISTCHECKRESULTREQUEST_H_
|
||||
85
sas/include/alibabacloud/sas/model/ListCheckResultResult.h
Normal file
85
sas/include/alibabacloud/sas/model/ListCheckResultResult.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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_SAS_MODEL_LISTCHECKRESULTRESULT_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_LISTCHECKRESULTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Sas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAS_EXPORT ListCheckResultResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct PageInfo
|
||||
{
|
||||
int totalCount;
|
||||
int pageSize;
|
||||
std::string nextToken;
|
||||
int currentPage;
|
||||
int maxResults;
|
||||
int count;
|
||||
};
|
||||
struct ChecksItem
|
||||
{
|
||||
struct CheckPolicie
|
||||
{
|
||||
std::string requirementShowName;
|
||||
long standardId;
|
||||
std::string standardShowName;
|
||||
long requirementId;
|
||||
long sectionId;
|
||||
std::string sectionShowName;
|
||||
};
|
||||
std::string instanceSubType;
|
||||
std::string status;
|
||||
long lastCheckTime;
|
||||
std::string taskId;
|
||||
long checkId;
|
||||
std::string vendorShowName;
|
||||
std::string checkShowName;
|
||||
std::string vendor;
|
||||
std::vector<ChecksItem::CheckPolicie> checkPolicies;
|
||||
std::string instanceType;
|
||||
std::string riskLevel;
|
||||
};
|
||||
|
||||
|
||||
ListCheckResultResult();
|
||||
explicit ListCheckResultResult(const std::string &payload);
|
||||
~ListCheckResultResult();
|
||||
PageInfo getPageInfo()const;
|
||||
std::vector<ChecksItem> getChecks()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
PageInfo pageInfo_;
|
||||
std::vector<ChecksItem> checks_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_LISTCHECKRESULTRESULT_H_
|
||||
@@ -5523,6 +5523,42 @@ SasClient::InstallCloudMonitorOutcomeCallable SasClient::installCloudMonitorCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::ListCheckResultOutcome SasClient::listCheckResult(const ListCheckResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCheckResultOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListCheckResultOutcome(ListCheckResultResult(outcome.result()));
|
||||
else
|
||||
return ListCheckResultOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SasClient::listCheckResultAsync(const ListCheckResultRequest& request, const ListCheckResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listCheckResult(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SasClient::ListCheckResultOutcomeCallable SasClient::listCheckResultCallable(const ListCheckResultRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListCheckResultOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listCheckResult(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::ListVulAutoRepairConfigOutcome SasClient::listVulAutoRepairConfig(const ListVulAutoRepairConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
144
sas/src/model/ListCheckResultRequest.cc
Normal file
144
sas/src/model/ListCheckResultRequest.cc
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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/sas/model/ListCheckResultRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas::Model::ListCheckResultRequest;
|
||||
|
||||
ListCheckResultRequest::ListCheckResultRequest()
|
||||
: RpcServiceRequest("sas", "2018-12-03", "ListCheckResult") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListCheckResultRequest::~ListCheckResultRequest() {}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getInstanceSubTypes() const {
|
||||
return instanceSubTypes_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setInstanceSubTypes(const std::vector<std::string> &instanceSubTypes) {
|
||||
instanceSubTypes_ = instanceSubTypes;
|
||||
}
|
||||
|
||||
std::vector<long> ListCheckResultRequest::getStandardIds() const {
|
||||
return standardIds_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setStandardIds(const std::vector<long> &standardIds) {
|
||||
standardIds_ = standardIds;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getRiskLevels() const {
|
||||
return riskLevels_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setRiskLevels(const std::vector<std::string> &riskLevels) {
|
||||
riskLevels_ = riskLevels;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getInstanceTypes() const {
|
||||
return instanceTypes_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setInstanceTypes(const std::vector<std::string> &instanceTypes) {
|
||||
instanceTypes_ = instanceTypes;
|
||||
}
|
||||
|
||||
std::string ListCheckResultRequest::getCheckKey() const {
|
||||
return checkKey_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setCheckKey(const std::string &checkKey) {
|
||||
checkKey_ = checkKey;
|
||||
setParameter(std::string("CheckKey"), checkKey);
|
||||
}
|
||||
|
||||
std::string ListCheckResultRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
int ListCheckResultRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListCheckResultRequest::getLang() const {
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setLang(const std::string &lang) {
|
||||
lang_ = lang;
|
||||
setParameter(std::string("Lang"), lang);
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getVendors() const {
|
||||
return vendors_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setVendors(const std::vector<std::string> &vendors) {
|
||||
vendors_ = vendors;
|
||||
}
|
||||
|
||||
int ListCheckResultRequest::getCurrentPage() const {
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setCurrentPage(int currentPage) {
|
||||
currentPage_ = currentPage;
|
||||
setParameter(std::string("CurrentPage"), std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::vector<long> ListCheckResultRequest::getRequirementIds() const {
|
||||
return requirementIds_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setRequirementIds(const std::vector<long> &requirementIds) {
|
||||
requirementIds_ = requirementIds;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getSortTypes() const {
|
||||
return sortTypes_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setSortTypes(const std::vector<std::string> &sortTypes) {
|
||||
sortTypes_ = sortTypes;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getInstanceIds() const {
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setInstanceIds(const std::vector<std::string> &instanceIds) {
|
||||
instanceIds_ = instanceIds;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCheckResultRequest::getStatuses() const {
|
||||
return statuses_;
|
||||
}
|
||||
|
||||
void ListCheckResultRequest::setStatuses(const std::vector<std::string> &statuses) {
|
||||
statuses_ = statuses;
|
||||
}
|
||||
|
||||
111
sas/src/model/ListCheckResultResult.cc
Normal file
111
sas/src/model/ListCheckResultResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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/sas/model/ListCheckResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas;
|
||||
using namespace AlibabaCloud::Sas::Model;
|
||||
|
||||
ListCheckResultResult::ListCheckResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCheckResultResult::ListCheckResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCheckResultResult::~ListCheckResultResult()
|
||||
{}
|
||||
|
||||
void ListCheckResultResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allChecksNode = value["Checks"]["ChecksItem"];
|
||||
for (auto valueChecksChecksItem : allChecksNode)
|
||||
{
|
||||
ChecksItem checksObject;
|
||||
if(!valueChecksChecksItem["CheckId"].isNull())
|
||||
checksObject.checkId = std::stol(valueChecksChecksItem["CheckId"].asString());
|
||||
if(!valueChecksChecksItem["CheckShowName"].isNull())
|
||||
checksObject.checkShowName = valueChecksChecksItem["CheckShowName"].asString();
|
||||
if(!valueChecksChecksItem["Vendor"].isNull())
|
||||
checksObject.vendor = valueChecksChecksItem["Vendor"].asString();
|
||||
if(!valueChecksChecksItem["VendorShowName"].isNull())
|
||||
checksObject.vendorShowName = valueChecksChecksItem["VendorShowName"].asString();
|
||||
if(!valueChecksChecksItem["InstanceType"].isNull())
|
||||
checksObject.instanceType = valueChecksChecksItem["InstanceType"].asString();
|
||||
if(!valueChecksChecksItem["InstanceSubType"].isNull())
|
||||
checksObject.instanceSubType = valueChecksChecksItem["InstanceSubType"].asString();
|
||||
if(!valueChecksChecksItem["RiskLevel"].isNull())
|
||||
checksObject.riskLevel = valueChecksChecksItem["RiskLevel"].asString();
|
||||
if(!valueChecksChecksItem["Status"].isNull())
|
||||
checksObject.status = valueChecksChecksItem["Status"].asString();
|
||||
if(!valueChecksChecksItem["TaskId"].isNull())
|
||||
checksObject.taskId = valueChecksChecksItem["TaskId"].asString();
|
||||
if(!valueChecksChecksItem["LastCheckTime"].isNull())
|
||||
checksObject.lastCheckTime = std::stol(valueChecksChecksItem["LastCheckTime"].asString());
|
||||
auto allCheckPoliciesNode = valueChecksChecksItem["CheckPolicies"]["CheckPolicie"];
|
||||
for (auto valueChecksChecksItemCheckPoliciesCheckPolicie : allCheckPoliciesNode)
|
||||
{
|
||||
ChecksItem::CheckPolicie checkPoliciesObject;
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["StandardId"].isNull())
|
||||
checkPoliciesObject.standardId = std::stol(valueChecksChecksItemCheckPoliciesCheckPolicie["StandardId"].asString());
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["StandardShowName"].isNull())
|
||||
checkPoliciesObject.standardShowName = valueChecksChecksItemCheckPoliciesCheckPolicie["StandardShowName"].asString();
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["RequirementId"].isNull())
|
||||
checkPoliciesObject.requirementId = std::stol(valueChecksChecksItemCheckPoliciesCheckPolicie["RequirementId"].asString());
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["RequirementShowName"].isNull())
|
||||
checkPoliciesObject.requirementShowName = valueChecksChecksItemCheckPoliciesCheckPolicie["RequirementShowName"].asString();
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["SectionId"].isNull())
|
||||
checkPoliciesObject.sectionId = std::stol(valueChecksChecksItemCheckPoliciesCheckPolicie["SectionId"].asString());
|
||||
if(!valueChecksChecksItemCheckPoliciesCheckPolicie["SectionShowName"].isNull())
|
||||
checkPoliciesObject.sectionShowName = valueChecksChecksItemCheckPoliciesCheckPolicie["SectionShowName"].asString();
|
||||
checksObject.checkPolicies.push_back(checkPoliciesObject);
|
||||
}
|
||||
checks_.push_back(checksObject);
|
||||
}
|
||||
auto pageInfoNode = value["PageInfo"];
|
||||
if(!pageInfoNode["CurrentPage"].isNull())
|
||||
pageInfo_.currentPage = std::stoi(pageInfoNode["CurrentPage"].asString());
|
||||
if(!pageInfoNode["PageSize"].isNull())
|
||||
pageInfo_.pageSize = std::stoi(pageInfoNode["PageSize"].asString());
|
||||
if(!pageInfoNode["NextToken"].isNull())
|
||||
pageInfo_.nextToken = pageInfoNode["NextToken"].asString();
|
||||
if(!pageInfoNode["MaxResults"].isNull())
|
||||
pageInfo_.maxResults = std::stoi(pageInfoNode["MaxResults"].asString());
|
||||
if(!pageInfoNode["TotalCount"].isNull())
|
||||
pageInfo_.totalCount = std::stoi(pageInfoNode["TotalCount"].asString());
|
||||
if(!pageInfoNode["Count"].isNull())
|
||||
pageInfo_.count = std::stoi(pageInfoNode["Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListCheckResultResult::PageInfo ListCheckResultResult::getPageInfo()const
|
||||
{
|
||||
return pageInfo_;
|
||||
}
|
||||
|
||||
std::vector<ListCheckResultResult::ChecksItem> ListCheckResultResult::getChecks()const
|
||||
{
|
||||
return checks_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user