From 8efbcc361203c0afe59e4c66a95c128a43750454 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 7 Mar 2023 07:08:42 +0000 Subject: [PATCH] Generated 2020-05-18 for dataworks-public. --- VERSION | 2 +- dataworks-public/CMakeLists.txt | 4 ++ .../dataworks-public/Dataworks_publicClient.h | 8 +++ .../SaveDataServiceApiTestResultRequest.h | 54 ++++++++++++++ .../SaveDataServiceApiTestResultResult.h | 55 ++++++++++++++ .../src/Dataworks-publicClient.cc | 36 ++++++++++ .../SaveDataServiceApiTestResultRequest.cc | 72 +++++++++++++++++++ .../SaveDataServiceApiTestResultResult.cc | 65 +++++++++++++++++ 8 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultRequest.h create mode 100644 dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultResult.h create mode 100644 dataworks-public/src/model/SaveDataServiceApiTestResultRequest.cc create mode 100644 dataworks-public/src/model/SaveDataServiceApiTestResultResult.cc diff --git a/VERSION b/VERSION index 1a0552a43..399caa749 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1488 \ No newline at end of file +1.36.1489 \ No newline at end of file diff --git a/dataworks-public/CMakeLists.txt b/dataworks-public/CMakeLists.txt index 782650ef4..4a888e55d 100644 --- a/dataworks-public/CMakeLists.txt +++ b/dataworks-public/CMakeLists.txt @@ -437,6 +437,8 @@ set(dataworks-public_public_header_model include/alibabacloud/dataworks-public/model/RunSmokeTestResult.h include/alibabacloud/dataworks-public/model/RunTriggerNodeRequest.h include/alibabacloud/dataworks-public/model/RunTriggerNodeResult.h + include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultRequest.h + include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultResult.h include/alibabacloud/dataworks-public/model/ScanSensitiveDataRequest.h include/alibabacloud/dataworks-public/model/ScanSensitiveDataResult.h include/alibabacloud/dataworks-public/model/SearchMetaTablesRequest.h @@ -944,6 +946,8 @@ set(dataworks-public_src src/model/RunSmokeTestResult.cc src/model/RunTriggerNodeRequest.cc src/model/RunTriggerNodeResult.cc + src/model/SaveDataServiceApiTestResultRequest.cc + src/model/SaveDataServiceApiTestResultResult.cc src/model/ScanSensitiveDataRequest.cc src/model/ScanSensitiveDataResult.cc src/model/SearchMetaTablesRequest.cc diff --git a/dataworks-public/include/alibabacloud/dataworks-public/Dataworks_publicClient.h b/dataworks-public/include/alibabacloud/dataworks-public/Dataworks_publicClient.h index ce93b6cfc..cf02379b7 100644 --- a/dataworks-public/include/alibabacloud/dataworks-public/Dataworks_publicClient.h +++ b/dataworks-public/include/alibabacloud/dataworks-public/Dataworks_publicClient.h @@ -438,6 +438,8 @@ #include "model/RunSmokeTestResult.h" #include "model/RunTriggerNodeRequest.h" #include "model/RunTriggerNodeResult.h" +#include "model/SaveDataServiceApiTestResultRequest.h" +#include "model/SaveDataServiceApiTestResultResult.h" #include "model/ScanSensitiveDataRequest.h" #include "model/ScanSensitiveDataResult.h" #include "model/SearchMetaTablesRequest.h" @@ -1159,6 +1161,9 @@ namespace AlibabaCloud typedef Outcome RunTriggerNodeOutcome; typedef std::future RunTriggerNodeOutcomeCallable; typedef std::function&)> RunTriggerNodeAsyncHandler; + typedef Outcome SaveDataServiceApiTestResultOutcome; + typedef std::future SaveDataServiceApiTestResultOutcomeCallable; + typedef std::function&)> SaveDataServiceApiTestResultAsyncHandler; typedef Outcome ScanSensitiveDataOutcome; typedef std::future ScanSensitiveDataOutcomeCallable; typedef std::function&)> ScanSensitiveDataAsyncHandler; @@ -1920,6 +1925,9 @@ namespace AlibabaCloud RunTriggerNodeOutcome runTriggerNode(const Model::RunTriggerNodeRequest &request)const; void runTriggerNodeAsync(const Model::RunTriggerNodeRequest& request, const RunTriggerNodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RunTriggerNodeOutcomeCallable runTriggerNodeCallable(const Model::RunTriggerNodeRequest& request) const; + SaveDataServiceApiTestResultOutcome saveDataServiceApiTestResult(const Model::SaveDataServiceApiTestResultRequest &request)const; + void saveDataServiceApiTestResultAsync(const Model::SaveDataServiceApiTestResultRequest& request, const SaveDataServiceApiTestResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SaveDataServiceApiTestResultOutcomeCallable saveDataServiceApiTestResultCallable(const Model::SaveDataServiceApiTestResultRequest& request) const; ScanSensitiveDataOutcome scanSensitiveData(const Model::ScanSensitiveDataRequest &request)const; void scanSensitiveDataAsync(const Model::ScanSensitiveDataRequest& request, const ScanSensitiveDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ScanSensitiveDataOutcomeCallable scanSensitiveDataCallable(const Model::ScanSensitiveDataRequest& request) const; diff --git a/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultRequest.h b/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultRequest.h new file mode 100644 index 000000000..ade1c2184 --- /dev/null +++ b/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultRequest.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_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTREQUEST_H_ +#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dataworks_public { +namespace Model { +class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT SaveDataServiceApiTestResultRequest : public RpcServiceRequest { +public: + SaveDataServiceApiTestResultRequest(); + ~SaveDataServiceApiTestResultRequest(); + std::string getFailResultSample() const; + void setFailResultSample(const std::string &failResultSample); + std::string getResultSample() const; + void setResultSample(const std::string &resultSample); + bool getAutoGenerate() const; + void setAutoGenerate(bool autoGenerate); + long getProjectId() const; + void setProjectId(long projectId); + long getApiId() const; + void setApiId(long apiId); + +private: + std::string failResultSample_; + std::string resultSample_; + bool autoGenerate_; + long projectId_; + long apiId_; +}; +} // namespace Model +} // namespace Dataworks_public +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTREQUEST_H_ diff --git a/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultResult.h b/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultResult.h new file mode 100644 index 000000000..4a95dc867 --- /dev/null +++ b/dataworks-public/include/alibabacloud/dataworks-public/model/SaveDataServiceApiTestResultResult.h @@ -0,0 +1,55 @@ +/* + * 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_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTRESULT_H_ +#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dataworks_public + { + namespace Model + { + class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT SaveDataServiceApiTestResultResult : public ServiceResult + { + public: + + + SaveDataServiceApiTestResultResult(); + explicit SaveDataServiceApiTestResultResult(const std::string &payload); + ~SaveDataServiceApiTestResultResult(); + int getHttpStatusCode()const; + bool getData()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + int httpStatusCode_; + bool data_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_SAVEDATASERVICEAPITESTRESULTRESULT_H_ \ No newline at end of file diff --git a/dataworks-public/src/Dataworks-publicClient.cc b/dataworks-public/src/Dataworks-publicClient.cc index 0d6cc5957..5fdec1556 100644 --- a/dataworks-public/src/Dataworks-publicClient.cc +++ b/dataworks-public/src/Dataworks-publicClient.cc @@ -7539,6 +7539,42 @@ Dataworks_publicClient::RunTriggerNodeOutcomeCallable Dataworks_publicClient::ru return task->get_future(); } +Dataworks_publicClient::SaveDataServiceApiTestResultOutcome Dataworks_publicClient::saveDataServiceApiTestResult(const SaveDataServiceApiTestResultRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SaveDataServiceApiTestResultOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SaveDataServiceApiTestResultOutcome(SaveDataServiceApiTestResultResult(outcome.result())); + else + return SaveDataServiceApiTestResultOutcome(outcome.error()); +} + +void Dataworks_publicClient::saveDataServiceApiTestResultAsync(const SaveDataServiceApiTestResultRequest& request, const SaveDataServiceApiTestResultAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, saveDataServiceApiTestResult(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dataworks_publicClient::SaveDataServiceApiTestResultOutcomeCallable Dataworks_publicClient::saveDataServiceApiTestResultCallable(const SaveDataServiceApiTestResultRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->saveDataServiceApiTestResult(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dataworks_publicClient::ScanSensitiveDataOutcome Dataworks_publicClient::scanSensitiveData(const ScanSensitiveDataRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dataworks-public/src/model/SaveDataServiceApiTestResultRequest.cc b/dataworks-public/src/model/SaveDataServiceApiTestResultRequest.cc new file mode 100644 index 000000000..39d669da5 --- /dev/null +++ b/dataworks-public/src/model/SaveDataServiceApiTestResultRequest.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::Dataworks_public::Model::SaveDataServiceApiTestResultRequest; + +SaveDataServiceApiTestResultRequest::SaveDataServiceApiTestResultRequest() + : RpcServiceRequest("dataworks-public", "2020-05-18", "SaveDataServiceApiTestResult") { + setMethod(HttpRequest::Method::Post); +} + +SaveDataServiceApiTestResultRequest::~SaveDataServiceApiTestResultRequest() {} + +std::string SaveDataServiceApiTestResultRequest::getFailResultSample() const { + return failResultSample_; +} + +void SaveDataServiceApiTestResultRequest::setFailResultSample(const std::string &failResultSample) { + failResultSample_ = failResultSample; + setBodyParameter(std::string("FailResultSample"), failResultSample); +} + +std::string SaveDataServiceApiTestResultRequest::getResultSample() const { + return resultSample_; +} + +void SaveDataServiceApiTestResultRequest::setResultSample(const std::string &resultSample) { + resultSample_ = resultSample; + setBodyParameter(std::string("ResultSample"), resultSample); +} + +bool SaveDataServiceApiTestResultRequest::getAutoGenerate() const { + return autoGenerate_; +} + +void SaveDataServiceApiTestResultRequest::setAutoGenerate(bool autoGenerate) { + autoGenerate_ = autoGenerate; + setBodyParameter(std::string("AutoGenerate"), autoGenerate ? "true" : "false"); +} + +long SaveDataServiceApiTestResultRequest::getProjectId() const { + return projectId_; +} + +void SaveDataServiceApiTestResultRequest::setProjectId(long projectId) { + projectId_ = projectId; + setBodyParameter(std::string("ProjectId"), std::to_string(projectId)); +} + +long SaveDataServiceApiTestResultRequest::getApiId() const { + return apiId_; +} + +void SaveDataServiceApiTestResultRequest::setApiId(long apiId) { + apiId_ = apiId; + setBodyParameter(std::string("ApiId"), std::to_string(apiId)); +} + diff --git a/dataworks-public/src/model/SaveDataServiceApiTestResultResult.cc b/dataworks-public/src/model/SaveDataServiceApiTestResultResult.cc new file mode 100644 index 000000000..4ae9d62eb --- /dev/null +++ b/dataworks-public/src/model/SaveDataServiceApiTestResultResult.cc @@ -0,0 +1,65 @@ +/* + * 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::Dataworks_public; +using namespace AlibabaCloud::Dataworks_public::Model; + +SaveDataServiceApiTestResultResult::SaveDataServiceApiTestResultResult() : + ServiceResult() +{} + +SaveDataServiceApiTestResultResult::SaveDataServiceApiTestResultResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SaveDataServiceApiTestResultResult::~SaveDataServiceApiTestResultResult() +{} + +void SaveDataServiceApiTestResultResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Data"].isNull()) + data_ = value["Data"].asString() == "true"; + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["HttpStatusCode"].isNull()) + httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString()); + +} + +int SaveDataServiceApiTestResultResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +bool SaveDataServiceApiTestResultResult::getData()const +{ + return data_; +} + +bool SaveDataServiceApiTestResultResult::getSuccess()const +{ + return success_; +} +