diff --git a/CHANGELOG b/CHANGELOG index 18be4a997..63448b802 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-07-20 Version: 1.36.1191 +- Change getFileDetectResult. + 2022-07-20 Version: 1.36.1190 - Support AK Audit API. diff --git a/VERSION b/VERSION index e22e6542d..3981906e8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1190 \ No newline at end of file +1.36.1191 \ No newline at end of file diff --git a/sas/CMakeLists.txt b/sas/CMakeLists.txt index beecd4b52..c638ea502 100644 --- a/sas/CMakeLists.txt +++ b/sas/CMakeLists.txt @@ -337,6 +337,8 @@ set(sas_public_header_model include/alibabacloud/sas/model/ModifyBackupPolicyResult.h include/alibabacloud/sas/model/ModifyBackupPolicyStatusRequest.h include/alibabacloud/sas/model/ModifyBackupPolicyStatusResult.h + include/alibabacloud/sas/model/ModifyClearLogstoreStorageRequest.h + include/alibabacloud/sas/model/ModifyClearLogstoreStorageResult.h include/alibabacloud/sas/model/ModifyCreateVulWhitelistRequest.h include/alibabacloud/sas/model/ModifyCreateVulWhitelistResult.h include/alibabacloud/sas/model/ModifyEmgVulSubmitRequest.h @@ -746,6 +748,8 @@ set(sas_src src/model/ModifyBackupPolicyResult.cc src/model/ModifyBackupPolicyStatusRequest.cc src/model/ModifyBackupPolicyStatusResult.cc + src/model/ModifyClearLogstoreStorageRequest.cc + src/model/ModifyClearLogstoreStorageResult.cc src/model/ModifyCreateVulWhitelistRequest.cc src/model/ModifyCreateVulWhitelistResult.cc src/model/ModifyEmgVulSubmitRequest.cc diff --git a/sas/include/alibabacloud/sas/SasClient.h b/sas/include/alibabacloud/sas/SasClient.h index 185b45b40..562ef6030 100644 --- a/sas/include/alibabacloud/sas/SasClient.h +++ b/sas/include/alibabacloud/sas/SasClient.h @@ -338,6 +338,8 @@ #include "model/ModifyBackupPolicyResult.h" #include "model/ModifyBackupPolicyStatusRequest.h" #include "model/ModifyBackupPolicyStatusResult.h" +#include "model/ModifyClearLogstoreStorageRequest.h" +#include "model/ModifyClearLogstoreStorageResult.h" #include "model/ModifyCreateVulWhitelistRequest.h" #include "model/ModifyCreateVulWhitelistResult.h" #include "model/ModifyEmgVulSubmitRequest.h" @@ -911,6 +913,9 @@ namespace AlibabaCloud typedef Outcome ModifyBackupPolicyStatusOutcome; typedef std::future ModifyBackupPolicyStatusOutcomeCallable; typedef std::function&)> ModifyBackupPolicyStatusAsyncHandler; + typedef Outcome ModifyClearLogstoreStorageOutcome; + typedef std::future ModifyClearLogstoreStorageOutcomeCallable; + typedef std::function&)> ModifyClearLogstoreStorageAsyncHandler; typedef Outcome ModifyCreateVulWhitelistOutcome; typedef std::future ModifyCreateVulWhitelistOutcomeCallable; typedef std::function&)> ModifyCreateVulWhitelistAsyncHandler; @@ -1525,6 +1530,9 @@ namespace AlibabaCloud ModifyBackupPolicyStatusOutcome modifyBackupPolicyStatus(const Model::ModifyBackupPolicyStatusRequest &request)const; void modifyBackupPolicyStatusAsync(const Model::ModifyBackupPolicyStatusRequest& request, const ModifyBackupPolicyStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyBackupPolicyStatusOutcomeCallable modifyBackupPolicyStatusCallable(const Model::ModifyBackupPolicyStatusRequest& request) const; + ModifyClearLogstoreStorageOutcome modifyClearLogstoreStorage(const Model::ModifyClearLogstoreStorageRequest &request)const; + void modifyClearLogstoreStorageAsync(const Model::ModifyClearLogstoreStorageRequest& request, const ModifyClearLogstoreStorageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyClearLogstoreStorageOutcomeCallable modifyClearLogstoreStorageCallable(const Model::ModifyClearLogstoreStorageRequest& request) const; ModifyCreateVulWhitelistOutcome modifyCreateVulWhitelist(const Model::ModifyCreateVulWhitelistRequest &request)const; void modifyCreateVulWhitelistAsync(const Model::ModifyCreateVulWhitelistRequest& request, const ModifyCreateVulWhitelistAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyCreateVulWhitelistOutcomeCallable modifyCreateVulWhitelistCallable(const Model::ModifyCreateVulWhitelistRequest& request) const; diff --git a/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h b/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h index 3635beec6..965d11fd0 100644 --- a/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h +++ b/sas/include/alibabacloud/sas/model/GetFileDetectResultResult.h @@ -39,6 +39,8 @@ namespace AlibabaCloud std::string virusName; }; Ext ext; + int score; + std::string virusType; std::string hashKey; int result; }; diff --git a/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageRequest.h b/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageRequest.h new file mode 100644 index 000000000..d5c71af30 --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_SAS_MODEL_MODIFYCLEARLOGSTORESTORAGEREQUEST_H_ +#define ALIBABACLOUD_SAS_MODEL_MODIFYCLEARLOGSTORESTORAGEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Sas { +namespace Model { +class ALIBABACLOUD_SAS_EXPORT ModifyClearLogstoreStorageRequest : public RpcServiceRequest { +public: + ModifyClearLogstoreStorageRequest(); + ~ModifyClearLogstoreStorageRequest(); + std::string getSourceIp() const; + void setSourceIp(const std::string &sourceIp); + std::string getFrom() const; + void setFrom(const std::string &from); + std::string getLang() const; + void setLang(const std::string &lang); + std::string getUserLogStore() const; + void setUserLogStore(const std::string &userLogStore); + std::string getUserProject() const; + void setUserProject(const std::string &userProject); + +private: + std::string sourceIp_; + std::string from_; + std::string lang_; + std::string userLogStore_; + std::string userProject_; +}; +} // namespace Model +} // namespace Sas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SAS_MODEL_MODIFYCLEARLOGSTORESTORAGEREQUEST_H_ diff --git a/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageResult.h b/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageResult.h new file mode 100644 index 000000000..759aacfac --- /dev/null +++ b/sas/include/alibabacloud/sas/model/ModifyClearLogstoreStorageResult.h @@ -0,0 +1,49 @@ +/* + * 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_MODIFYCLEARLOGSTORESTORAGERESULT_H_ +#define ALIBABACLOUD_SAS_MODEL_MODIFYCLEARLOGSTORESTORAGERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Sas + { + namespace Model + { + class ALIBABACLOUD_SAS_EXPORT ModifyClearLogstoreStorageResult : public ServiceResult + { + public: + + + ModifyClearLogstoreStorageResult(); + explicit ModifyClearLogstoreStorageResult(const std::string &payload); + ~ModifyClearLogstoreStorageResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_SAS_MODEL_MODIFYCLEARLOGSTORESTORAGERESULT_H_ \ No newline at end of file diff --git a/sas/src/SasClient.cc b/sas/src/SasClient.cc index 7a77b9a2a..45d65f56f 100644 --- a/sas/src/SasClient.cc +++ b/sas/src/SasClient.cc @@ -5739,6 +5739,42 @@ SasClient::ModifyBackupPolicyStatusOutcomeCallable SasClient::modifyBackupPolicy return task->get_future(); } +SasClient::ModifyClearLogstoreStorageOutcome SasClient::modifyClearLogstoreStorage(const ModifyClearLogstoreStorageRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyClearLogstoreStorageOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyClearLogstoreStorageOutcome(ModifyClearLogstoreStorageResult(outcome.result())); + else + return ModifyClearLogstoreStorageOutcome(outcome.error()); +} + +void SasClient::modifyClearLogstoreStorageAsync(const ModifyClearLogstoreStorageRequest& request, const ModifyClearLogstoreStorageAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyClearLogstoreStorage(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SasClient::ModifyClearLogstoreStorageOutcomeCallable SasClient::modifyClearLogstoreStorageCallable(const ModifyClearLogstoreStorageRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyClearLogstoreStorage(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SasClient::ModifyCreateVulWhitelistOutcome SasClient::modifyCreateVulWhitelist(const ModifyCreateVulWhitelistRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/sas/src/model/GetFileDetectResultResult.cc b/sas/src/model/GetFileDetectResultResult.cc index a0e1efa4e..8f37d0305 100644 --- a/sas/src/model/GetFileDetectResultResult.cc +++ b/sas/src/model/GetFileDetectResultResult.cc @@ -43,10 +43,14 @@ void GetFileDetectResultResult::parse(const std::string &payload) for (auto valueResultListResult : allResultListNode) { Result resultListObject; - if(!valueResultListResult["Result"].isNull()) - resultListObject.result = std::stoi(valueResultListResult["Result"].asString()); if(!valueResultListResult["HashKey"].isNull()) resultListObject.hashKey = valueResultListResult["HashKey"].asString(); + if(!valueResultListResult["Result"].isNull()) + resultListObject.result = std::stoi(valueResultListResult["Result"].asString()); + if(!valueResultListResult["Score"].isNull()) + resultListObject.score = std::stoi(valueResultListResult["Score"].asString()); + if(!valueResultListResult["VirusType"].isNull()) + resultListObject.virusType = valueResultListResult["VirusType"].asString(); auto extNode = value["Ext"]; if(!extNode["VirusName"].isNull()) resultListObject.ext.virusName = extNode["VirusName"].asString(); diff --git a/sas/src/model/ModifyClearLogstoreStorageRequest.cc b/sas/src/model/ModifyClearLogstoreStorageRequest.cc new file mode 100644 index 000000000..30f1f0613 --- /dev/null +++ b/sas/src/model/ModifyClearLogstoreStorageRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Sas::Model::ModifyClearLogstoreStorageRequest; + +ModifyClearLogstoreStorageRequest::ModifyClearLogstoreStorageRequest() + : RpcServiceRequest("sas", "2018-12-03", "ModifyClearLogstoreStorage") { + setMethod(HttpRequest::Method::Post); +} + +ModifyClearLogstoreStorageRequest::~ModifyClearLogstoreStorageRequest() {} + +std::string ModifyClearLogstoreStorageRequest::getSourceIp() const { + return sourceIp_; +} + +void ModifyClearLogstoreStorageRequest::setSourceIp(const std::string &sourceIp) { + sourceIp_ = sourceIp; + setParameter(std::string("SourceIp"), sourceIp); +} + +std::string ModifyClearLogstoreStorageRequest::getFrom() const { + return from_; +} + +void ModifyClearLogstoreStorageRequest::setFrom(const std::string &from) { + from_ = from; + setParameter(std::string("From"), from); +} + +std::string ModifyClearLogstoreStorageRequest::getLang() const { + return lang_; +} + +void ModifyClearLogstoreStorageRequest::setLang(const std::string &lang) { + lang_ = lang; + setParameter(std::string("Lang"), lang); +} + +std::string ModifyClearLogstoreStorageRequest::getUserLogStore() const { + return userLogStore_; +} + +void ModifyClearLogstoreStorageRequest::setUserLogStore(const std::string &userLogStore) { + userLogStore_ = userLogStore; + setParameter(std::string("UserLogStore"), userLogStore); +} + +std::string ModifyClearLogstoreStorageRequest::getUserProject() const { + return userProject_; +} + +void ModifyClearLogstoreStorageRequest::setUserProject(const std::string &userProject) { + userProject_ = userProject; + setParameter(std::string("UserProject"), userProject); +} + diff --git a/sas/src/model/ModifyClearLogstoreStorageResult.cc b/sas/src/model/ModifyClearLogstoreStorageResult.cc new file mode 100644 index 000000000..078ce7a16 --- /dev/null +++ b/sas/src/model/ModifyClearLogstoreStorageResult.cc @@ -0,0 +1,44 @@ +/* + * 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; + +ModifyClearLogstoreStorageResult::ModifyClearLogstoreStorageResult() : + ServiceResult() +{} + +ModifyClearLogstoreStorageResult::ModifyClearLogstoreStorageResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyClearLogstoreStorageResult::~ModifyClearLogstoreStorageResult() +{} + +void ModifyClearLogstoreStorageResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +