diff --git a/CHANGELOG b/CHANGELOG index d5c0b2a0b..2d69241ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-07-22 Version: 1.36.1198 +- Change ListCheckInstanceResult GetCheckDetail Public. + 2022-07-22 Version: 1.36.1197 - Update ScreenChestCT Release SegmentOAR. diff --git a/VERSION b/VERSION index 6ff98e853..0951447d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1197 \ No newline at end of file +1.36.1198 \ No newline at end of file diff --git a/sas/CMakeLists.txt b/sas/CMakeLists.txt index c638ea502..46ab106c1 100644 --- a/sas/CMakeLists.txt +++ b/sas/CMakeLists.txt @@ -309,6 +309,8 @@ set(sas_public_header_model include/alibabacloud/sas/model/FixCheckWarningsResult.h include/alibabacloud/sas/model/GetBackupStorageCountRequest.h include/alibabacloud/sas/model/GetBackupStorageCountResult.h + include/alibabacloud/sas/model/GetCheckDetailRequest.h + include/alibabacloud/sas/model/GetCheckDetailResult.h include/alibabacloud/sas/model/GetFileDetectResultRequest.h include/alibabacloud/sas/model/GetFileDetectResultResult.h include/alibabacloud/sas/model/GetSuspiciousStatisticsRequest.h @@ -325,6 +327,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/ListCheckInstanceResultRequest.h + include/alibabacloud/sas/model/ListCheckInstanceResultResult.h include/alibabacloud/sas/model/ListCheckResultRequest.h include/alibabacloud/sas/model/ListCheckResultResult.h include/alibabacloud/sas/model/ListVulAutoRepairConfigRequest.h @@ -720,6 +724,8 @@ set(sas_src src/model/FixCheckWarningsResult.cc src/model/GetBackupStorageCountRequest.cc src/model/GetBackupStorageCountResult.cc + src/model/GetCheckDetailRequest.cc + src/model/GetCheckDetailResult.cc src/model/GetFileDetectResultRequest.cc src/model/GetFileDetectResultResult.cc src/model/GetSuspiciousStatisticsRequest.cc @@ -736,6 +742,8 @@ set(sas_src src/model/InstallBackupClientResult.cc src/model/InstallCloudMonitorRequest.cc src/model/InstallCloudMonitorResult.cc + src/model/ListCheckInstanceResultRequest.cc + src/model/ListCheckInstanceResultResult.cc src/model/ListCheckResultRequest.cc src/model/ListCheckResultResult.cc src/model/ListVulAutoRepairConfigRequest.cc diff --git a/sas/include/alibabacloud/sas/SasClient.h b/sas/include/alibabacloud/sas/SasClient.h index 562ef6030..219215566 100644 --- a/sas/include/alibabacloud/sas/SasClient.h +++ b/sas/include/alibabacloud/sas/SasClient.h @@ -310,6 +310,8 @@ #include "model/FixCheckWarningsResult.h" #include "model/GetBackupStorageCountRequest.h" #include "model/GetBackupStorageCountResult.h" +#include "model/GetCheckDetailRequest.h" +#include "model/GetCheckDetailResult.h" #include "model/GetFileDetectResultRequest.h" #include "model/GetFileDetectResultResult.h" #include "model/GetSuspiciousStatisticsRequest.h" @@ -326,6 +328,8 @@ #include "model/InstallBackupClientResult.h" #include "model/InstallCloudMonitorRequest.h" #include "model/InstallCloudMonitorResult.h" +#include "model/ListCheckInstanceResultRequest.h" +#include "model/ListCheckInstanceResultResult.h" #include "model/ListCheckResultRequest.h" #include "model/ListCheckResultResult.h" #include "model/ListVulAutoRepairConfigRequest.h" @@ -871,6 +875,9 @@ namespace AlibabaCloud typedef Outcome GetBackupStorageCountOutcome; typedef std::future GetBackupStorageCountOutcomeCallable; typedef std::function&)> GetBackupStorageCountAsyncHandler; + typedef Outcome GetCheckDetailOutcome; + typedef std::future GetCheckDetailOutcomeCallable; + typedef std::function&)> GetCheckDetailAsyncHandler; typedef Outcome GetFileDetectResultOutcome; typedef std::future GetFileDetectResultOutcomeCallable; typedef std::function&)> GetFileDetectResultAsyncHandler; @@ -895,6 +902,9 @@ namespace AlibabaCloud typedef Outcome InstallCloudMonitorOutcome; typedef std::future InstallCloudMonitorOutcomeCallable; typedef std::function&)> InstallCloudMonitorAsyncHandler; + typedef Outcome ListCheckInstanceResultOutcome; + typedef std::future ListCheckInstanceResultOutcomeCallable; + typedef std::function&)> ListCheckInstanceResultAsyncHandler; typedef Outcome ListCheckResultOutcome; typedef std::future ListCheckResultOutcomeCallable; typedef std::function&)> ListCheckResultAsyncHandler; @@ -1488,6 +1498,9 @@ namespace AlibabaCloud GetBackupStorageCountOutcome getBackupStorageCount(const Model::GetBackupStorageCountRequest &request)const; void getBackupStorageCountAsync(const Model::GetBackupStorageCountRequest& request, const GetBackupStorageCountAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetBackupStorageCountOutcomeCallable getBackupStorageCountCallable(const Model::GetBackupStorageCountRequest& request) const; + GetCheckDetailOutcome getCheckDetail(const Model::GetCheckDetailRequest &request)const; + void getCheckDetailAsync(const Model::GetCheckDetailRequest& request, const GetCheckDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetCheckDetailOutcomeCallable getCheckDetailCallable(const Model::GetCheckDetailRequest& request) const; GetFileDetectResultOutcome getFileDetectResult(const Model::GetFileDetectResultRequest &request)const; void getFileDetectResultAsync(const Model::GetFileDetectResultRequest& request, const GetFileDetectResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetFileDetectResultOutcomeCallable getFileDetectResultCallable(const Model::GetFileDetectResultRequest& request) const; @@ -1512,6 +1525,9 @@ namespace AlibabaCloud InstallCloudMonitorOutcome installCloudMonitor(const Model::InstallCloudMonitorRequest &request)const; void installCloudMonitorAsync(const Model::InstallCloudMonitorRequest& request, const InstallCloudMonitorAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; InstallCloudMonitorOutcomeCallable installCloudMonitorCallable(const Model::InstallCloudMonitorRequest& request) const; + ListCheckInstanceResultOutcome listCheckInstanceResult(const Model::ListCheckInstanceResultRequest &request)const; + void listCheckInstanceResultAsync(const Model::ListCheckInstanceResultRequest& request, const ListCheckInstanceResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListCheckInstanceResultOutcomeCallable listCheckInstanceResultCallable(const Model::ListCheckInstanceResultRequest& request) const; ListCheckResultOutcome listCheckResult(const Model::ListCheckResultRequest &request)const; void listCheckResultAsync(const Model::ListCheckResultRequest& request, const ListCheckResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListCheckResultOutcomeCallable listCheckResultCallable(const Model::ListCheckResultRequest& request) const; diff --git a/sas/include/alibabacloud/sas/model/GetCheckDetailRequest.h b/sas/include/alibabacloud/sas/model/GetCheckDetailRequest.h new file mode 100644 index 000000000..9694eca5d --- /dev/null +++ b/sas/include/alibabacloud/sas/model/GetCheckDetailRequest.h @@ -0,0 +1,48 @@ +/* + * 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_GETCHECKDETAILREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_GETCHECKDETAILREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT GetCheckDetailRequest : public RpcServiceRequest { +public: + GetCheckDetailRequest(); + ~GetCheckDetailRequest(); + std::string getSourceIp() const; + void setSourceIp(const std::string &sourceIp); + std::string getLang() const; + void setLang(const std::string &lang); + long getCheckId() const; + void setCheckId(long checkId); + +private: + std::string sourceIp_; + std::string lang_; + long checkId_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_GETCHECKDETAILREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/GetCheckDetailResult.h b/sas/include/alibabacloud/sas/model/GetCheckDetailResult.h new file mode 100644 index 000000000..cff5adccb --- /dev/null +++ b/sas/include/alibabacloud/sas/model/GetCheckDetailResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_GETCHECKDETAILRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_GETCHECKDETAILRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT GetCheckDetailResult : public ServiceResult + { + public: + struct Description + { + std::string type; + std::string value; + std::string link; + }; + struct Solution + { + std::string type; + std::string value; + std::string link; + }; + struct AssistInfo + { + std::string type; + std::string value; + std::string link; + }; + + + GetCheckDetailResult(); + explicit GetCheckDetailResult(const std::string &payload); + ~GetCheckDetailResult(); + Description getDescription()const; + AssistInfo getAssistInfo()const; + Solution getSolution()const; + + protected: + void parse(const std::string &payload); + private: + Description description_; + AssistInfo assistInfo_; + Solution solution_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_GETCHECKDETAILRESULT_H_ \ No newline at end of file diff --git a/sas/include/alibabacloud/sas/model/ListCheckInstanceResultRequest.h b/sas/include/alibabacloud/sas/model/ListCheckInstanceResultRequest.h new file mode 100644 index 000000000..f502488fa --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListCheckInstanceResultRequest.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_SAS_MODEL_LISTCHECKINSTANCERESULTREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTCHECKINSTANCERESULTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT ListCheckInstanceResultRequest : public RpcServiceRequest { +public: + ListCheckInstanceResultRequest(); + ~ListCheckInstanceResultRequest(); + std::string getRegionIdKey() const; + void setRegionIdKey(const std::string ®ionIdKey); + 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); + long getCheckId() const; + void setCheckId(long checkId); + int getCurrentPage() const; + void setCurrentPage(int currentPage); + std::vector getSortTypes() const; + void setSortTypes(const std::vector &sortTypes); + std::string getInstanceIdKey() const; + void setInstanceIdKey(const std::string &instanceIdKey); + std::string getInstanceNameKey() const; + void setInstanceNameKey(const std::string &instanceNameKey); + std::vector getInstanceIds() const; + void setInstanceIds(const std::vector &instanceIds); + std::vector getStatuses() const; + void setStatuses(const std::vector &statuses); + +private: + std::string regionIdKey_; + std::string sourceIp_; + int pageSize_; + std::string lang_; + long checkId_; + int currentPage_; + std::vector sortTypes_; + std::string instanceIdKey_; + std::string instanceNameKey_; + std::vector instanceIds_; + std::vector statuses_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_LISTCHECKINSTANCERESULTREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/ListCheckInstanceResultResult.h b/sas/include/alibabacloud/sas/model/ListCheckInstanceResultResult.h new file mode 100644 index 000000000..60c5655ee --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ListCheckInstanceResultResult.h @@ -0,0 +1,95 @@ +/* + * 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_LISTCHECKINSTANCERESULTRESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_LISTCHECKINSTANCERESULTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT ListCheckInstanceResultResult : public ServiceResult + { + public: + struct PageInfo + { + int totalCount; + int pageSize; + std::string nextToken; + int currentPage; + int maxResults; + std::string count; + }; + struct BasicDataItem + { + std::string status; + std::string instanceName; + std::string instanceId; + long id; + std::string regionId; + }; + struct ColumnsItem + { + struct GridsItem + { + std::string type; + std::string showName; + std::string key; + }; + std::vector grids; + std::string type; + bool search; + std::string searchKey; + std::string showName; + std::string key; + }; + + + ListCheckInstanceResultResult(); + explicit ListCheckInstanceResultResult(const std::string &payload); + ~ListCheckInstanceResultResult(); + PageInfo getPageInfo()const; + int getTotalCount()const; + std::string getNextToken()const; + std::string getChecks()const; + int getMaxResults()const; + std::vector getColumns()const; + std::vector getBasicData()const; + + protected: + void parse(const std::string &payload); + private: + PageInfo pageInfo_; + int totalCount_; + std::string nextToken_; + std::string checks_; + int maxResults_; + std::vector columns_; + std::vector basicData_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_LISTCHECKINSTANCERESULTRESULT_H_ \ No newline at end of file diff --git a/sas/src/SasClient.cc b/sas/src/SasClient.cc index 45d65f56f..b83b3549a 100644 --- a/sas/src/SasClient.cc +++ b/sas/src/SasClient.cc @@ -5235,6 +5235,42 @@ SasClient::GetBackupStorageCountOutcomeCallable SasClient::getBackupStorageCount return task->get_future(); } +SasClient::GetCheckDetailOutcome SasClient::getCheckDetail(const GetCheckDetailRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetCheckDetailOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetCheckDetailOutcome(GetCheckDetailResult(outcome.result())); + else + return GetCheckDetailOutcome(outcome.error()); +} + +void SasClient::getCheckDetailAsync(const GetCheckDetailRequest& request, const GetCheckDetailAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getCheckDetail(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SasClient::GetCheckDetailOutcomeCallable SasClient::getCheckDetailCallable(const GetCheckDetailRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getCheckDetail(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SasClient::GetFileDetectResultOutcome SasClient::getFileDetectResult(const GetFileDetectResultRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -5523,6 +5559,42 @@ SasClient::InstallCloudMonitorOutcomeCallable SasClient::installCloudMonitorCall return task->get_future(); } +SasClient::ListCheckInstanceResultOutcome SasClient::listCheckInstanceResult(const ListCheckInstanceResultRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListCheckInstanceResultOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListCheckInstanceResultOutcome(ListCheckInstanceResultResult(outcome.result())); + else + return ListCheckInstanceResultOutcome(outcome.error()); +} + +void SasClient::listCheckInstanceResultAsync(const ListCheckInstanceResultRequest& request, const ListCheckInstanceResultAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listCheckInstanceResult(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SasClient::ListCheckInstanceResultOutcomeCallable SasClient::listCheckInstanceResultCallable(const ListCheckInstanceResultRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listCheckInstanceResult(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SasClient::ListCheckResultOutcome SasClient::listCheckResult(const ListCheckResultRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/sas/src/model/GetCheckDetailRequest.cc b/sas/src/model/GetCheckDetailRequest.cc new file mode 100644 index 000000000..664a772d5 --- /dev/null +++ b/sas/src/model/GetCheckDetailRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Sas::Model::GetCheckDetailRequest; + +GetCheckDetailRequest::GetCheckDetailRequest() + : RpcServiceRequest("sas", "2018-12-03", "GetCheckDetail") { + setMethod(HttpRequest::Method::Post); +} + +GetCheckDetailRequest::~GetCheckDetailRequest() {} + +std::string GetCheckDetailRequest::getSourceIp() const { + return sourceIp_; +} + +void GetCheckDetailRequest::setSourceIp(const std::string &sourceIp) { + sourceIp_ = sourceIp; + setParameter(std::string("SourceIp"), sourceIp); +} + +std::string GetCheckDetailRequest::getLang() const { + return lang_; +} + +void GetCheckDetailRequest::setLang(const std::string &lang) { + lang_ = lang; + setParameter(std::string("Lang"), lang); +} + +long GetCheckDetailRequest::getCheckId() const { + return checkId_; +} + +void GetCheckDetailRequest::setCheckId(long checkId) { + checkId_ = checkId; + setParameter(std::string("CheckId"), std::to_string(checkId)); +} + diff --git a/sas/src/model/GetCheckDetailResult.cc b/sas/src/model/GetCheckDetailResult.cc new file mode 100644 index 000000000..b1d1c550e --- /dev/null +++ b/sas/src/model/GetCheckDetailResult.cc @@ -0,0 +1,80 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Sas; +using namespace AlibabaCloud::Sas::Model; + +GetCheckDetailResult::GetCheckDetailResult() : + ServiceResult() +{} + +GetCheckDetailResult::GetCheckDetailResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetCheckDetailResult::~GetCheckDetailResult() +{} + +void GetCheckDetailResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto descriptionNode = value["Description"]; + if(!descriptionNode["Type"].isNull()) + description_.type = descriptionNode["Type"].asString(); + if(!descriptionNode["Value"].isNull()) + description_.value = descriptionNode["Value"].asString(); + if(!descriptionNode["Link"].isNull()) + description_.link = descriptionNode["Link"].asString(); + auto solutionNode = value["Solution"]; + if(!solutionNode["Type"].isNull()) + solution_.type = solutionNode["Type"].asString(); + if(!solutionNode["Value"].isNull()) + solution_.value = solutionNode["Value"].asString(); + if(!solutionNode["Link"].isNull()) + solution_.link = solutionNode["Link"].asString(); + auto assistInfoNode = value["AssistInfo"]; + if(!assistInfoNode["Type"].isNull()) + assistInfo_.type = assistInfoNode["Type"].asString(); + if(!assistInfoNode["Value"].isNull()) + assistInfo_.value = assistInfoNode["Value"].asString(); + if(!assistInfoNode["Link"].isNull()) + assistInfo_.link = assistInfoNode["Link"].asString(); + +} + +GetCheckDetailResult::Description GetCheckDetailResult::getDescription()const +{ + return description_; +} + +GetCheckDetailResult::AssistInfo GetCheckDetailResult::getAssistInfo()const +{ + return assistInfo_; +} + +GetCheckDetailResult::Solution GetCheckDetailResult::getSolution()const +{ + return solution_; +} + diff --git a/sas/src/model/ListCheckInstanceResultRequest.cc b/sas/src/model/ListCheckInstanceResultRequest.cc new file mode 100644 index 000000000..e9a593fd9 --- /dev/null +++ b/sas/src/model/ListCheckInstanceResultRequest.cc @@ -0,0 +1,123 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Sas::Model::ListCheckInstanceResultRequest; + +ListCheckInstanceResultRequest::ListCheckInstanceResultRequest() + : RpcServiceRequest("sas", "2018-12-03", "ListCheckInstanceResult") { + setMethod(HttpRequest::Method::Post); +} + +ListCheckInstanceResultRequest::~ListCheckInstanceResultRequest() {} + +std::string ListCheckInstanceResultRequest::getRegionIdKey() const { + return regionIdKey_; +} + +void ListCheckInstanceResultRequest::setRegionIdKey(const std::string ®ionIdKey) { + regionIdKey_ = regionIdKey; + setParameter(std::string("RegionIdKey"), regionIdKey); +} + +std::string ListCheckInstanceResultRequest::getSourceIp() const { + return sourceIp_; +} + +void ListCheckInstanceResultRequest::setSourceIp(const std::string &sourceIp) { + sourceIp_ = sourceIp; + setParameter(std::string("SourceIp"), sourceIp); +} + +int ListCheckInstanceResultRequest::getPageSize() const { + return pageSize_; +} + +void ListCheckInstanceResultRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + +std::string ListCheckInstanceResultRequest::getLang() const { + return lang_; +} + +void ListCheckInstanceResultRequest::setLang(const std::string &lang) { + lang_ = lang; + setParameter(std::string("Lang"), lang); +} + +long ListCheckInstanceResultRequest::getCheckId() const { + return checkId_; +} + +void ListCheckInstanceResultRequest::setCheckId(long checkId) { + checkId_ = checkId; + setParameter(std::string("CheckId"), std::to_string(checkId)); +} + +int ListCheckInstanceResultRequest::getCurrentPage() const { + return currentPage_; +} + +void ListCheckInstanceResultRequest::setCurrentPage(int currentPage) { + currentPage_ = currentPage; + setParameter(std::string("CurrentPage"), std::to_string(currentPage)); +} + +std::vector ListCheckInstanceResultRequest::getSortTypes() const { + return sortTypes_; +} + +void ListCheckInstanceResultRequest::setSortTypes(const std::vector &sortTypes) { + sortTypes_ = sortTypes; +} + +std::string ListCheckInstanceResultRequest::getInstanceIdKey() const { + return instanceIdKey_; +} + +void ListCheckInstanceResultRequest::setInstanceIdKey(const std::string &instanceIdKey) { + instanceIdKey_ = instanceIdKey; + setParameter(std::string("InstanceIdKey"), instanceIdKey); +} + +std::string ListCheckInstanceResultRequest::getInstanceNameKey() const { + return instanceNameKey_; +} + +void ListCheckInstanceResultRequest::setInstanceNameKey(const std::string &instanceNameKey) { + instanceNameKey_ = instanceNameKey; + setParameter(std::string("InstanceNameKey"), instanceNameKey); +} + +std::vector ListCheckInstanceResultRequest::getInstanceIds() const { + return instanceIds_; +} + +void ListCheckInstanceResultRequest::setInstanceIds(const std::vector &instanceIds) { + instanceIds_ = instanceIds; +} + +std::vector ListCheckInstanceResultRequest::getStatuses() const { + return statuses_; +} + +void ListCheckInstanceResultRequest::setStatuses(const std::vector &statuses) { + statuses_ = statuses; +} + diff --git a/sas/src/model/ListCheckInstanceResultResult.cc b/sas/src/model/ListCheckInstanceResultResult.cc new file mode 100644 index 000000000..15a1f1eeb --- /dev/null +++ b/sas/src/model/ListCheckInstanceResultResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Sas; +using namespace AlibabaCloud::Sas::Model; + +ListCheckInstanceResultResult::ListCheckInstanceResultResult() : + ServiceResult() +{} + +ListCheckInstanceResultResult::ListCheckInstanceResultResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListCheckInstanceResultResult::~ListCheckInstanceResultResult() +{} + +void ListCheckInstanceResultResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allBasicDataNode = value["BasicData"]["BasicDataItem"]; + for (auto valueBasicDataBasicDataItem : allBasicDataNode) + { + BasicDataItem basicDataObject; + if(!valueBasicDataBasicDataItem["Id"].isNull()) + basicDataObject.id = std::stol(valueBasicDataBasicDataItem["Id"].asString()); + if(!valueBasicDataBasicDataItem["Status"].isNull()) + basicDataObject.status = valueBasicDataBasicDataItem["Status"].asString(); + if(!valueBasicDataBasicDataItem["RegionId"].isNull()) + basicDataObject.regionId = valueBasicDataBasicDataItem["RegionId"].asString(); + if(!valueBasicDataBasicDataItem["InstanceId"].isNull()) + basicDataObject.instanceId = valueBasicDataBasicDataItem["InstanceId"].asString(); + if(!valueBasicDataBasicDataItem["InstanceName"].isNull()) + basicDataObject.instanceName = valueBasicDataBasicDataItem["InstanceName"].asString(); + basicData_.push_back(basicDataObject); + } + auto allColumnsNode = value["Columns"]["ColumnsItem"]; + for (auto valueColumnsColumnsItem : allColumnsNode) + { + ColumnsItem columnsObject; + if(!valueColumnsColumnsItem["Type"].isNull()) + columnsObject.type = valueColumnsColumnsItem["Type"].asString(); + if(!valueColumnsColumnsItem["Key"].isNull()) + columnsObject.key = valueColumnsColumnsItem["Key"].asString(); + if(!valueColumnsColumnsItem["ShowName"].isNull()) + columnsObject.showName = valueColumnsColumnsItem["ShowName"].asString(); + if(!valueColumnsColumnsItem["Search"].isNull()) + columnsObject.search = valueColumnsColumnsItem["Search"].asString() == "true"; + if(!valueColumnsColumnsItem["SearchKey"].isNull()) + columnsObject.searchKey = valueColumnsColumnsItem["SearchKey"].asString(); + auto allGridsNode = valueColumnsColumnsItem["Grids"]["GridsItem"]; + for (auto valueColumnsColumnsItemGridsGridsItem : allGridsNode) + { + ColumnsItem::GridsItem gridsObject; + if(!valueColumnsColumnsItemGridsGridsItem["Type"].isNull()) + gridsObject.type = valueColumnsColumnsItemGridsGridsItem["Type"].asString(); + if(!valueColumnsColumnsItemGridsGridsItem["Key"].isNull()) + gridsObject.key = valueColumnsColumnsItemGridsGridsItem["Key"].asString(); + if(!valueColumnsColumnsItemGridsGridsItem["ShowName"].isNull()) + gridsObject.showName = valueColumnsColumnsItemGridsGridsItem["ShowName"].asString(); + columnsObject.grids.push_back(gridsObject); + } + columns_.push_back(columnsObject); + } + 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 = pageInfoNode["Count"].asString(); + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["Checks"].isNull()) + checks_ = value["Checks"].asString(); + +} + +ListCheckInstanceResultResult::PageInfo ListCheckInstanceResultResult::getPageInfo()const +{ + return pageInfo_; +} + +int ListCheckInstanceResultResult::getTotalCount()const +{ + return totalCount_; +} + +std::string ListCheckInstanceResultResult::getNextToken()const +{ + return nextToken_; +} + +std::string ListCheckInstanceResultResult::getChecks()const +{ + return checks_; +} + +int ListCheckInstanceResultResult::getMaxResults()const +{ + return maxResults_; +} + +std::vector ListCheckInstanceResultResult::getColumns()const +{ + return columns_; +} + +std::vector ListCheckInstanceResultResult::getBasicData()const +{ + return basicData_; +} +