From 134828d83ce8240b0f59ecd74643f32341ef5ada Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 13 Oct 2020 02:40:57 +0000 Subject: [PATCH] Generated 2019-01-01 for Cassandra. --- CHANGELOG | 3 + cassandra/CMakeLists.txt | 4 + .../alibabacloud/cassandra/CassandraClient.h | 8 ++ .../DescribeNodeToolExecutionHistoryRequest.h | 54 ++++++++ .../DescribeNodeToolExecutionHistoryResult.h | 71 ++++++++++ .../cassandra/model/ExecuteNodeToolRequest.h | 3 + cassandra/src/CassandraClient.cc | 36 ++++++ ...DescribeNodeToolExecutionHistoryRequest.cc | 62 +++++++++ .../DescribeNodeToolExecutionHistoryResult.cc | 121 ++++++++++++++++++ cassandra/src/model/ExecuteNodeToolRequest.cc | 11 ++ 10 files changed, 373 insertions(+) create mode 100644 cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryRequest.h create mode 100644 cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryResult.h create mode 100644 cassandra/src/model/DescribeNodeToolExecutionHistoryRequest.cc create mode 100644 cassandra/src/model/DescribeNodeToolExecutionHistoryResult.cc diff --git a/CHANGELOG b/CHANGELOG index 51ebb640d..46a4fe89c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-10-13 Version: patch +- Generated 2019-01-01 for `Cassandra`. + 2020-10-13 Version: patch - Release SegmentSkin. diff --git a/cassandra/CMakeLists.txt b/cassandra/CMakeLists.txt index e1ccf33f7..09a8ddad3 100644 --- a/cassandra/CMakeLists.txt +++ b/cassandra/CMakeLists.txt @@ -71,6 +71,8 @@ set(cassandra_public_header_model include/alibabacloud/cassandra/model/DescribeIpWhitelistGroupsResult.h include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoriesRequest.h include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoriesResult.h + include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryRequest.h + include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryResult.h include/alibabacloud/cassandra/model/DescribeParameterModificationHistoriesRequest.h include/alibabacloud/cassandra/model/DescribeParameterModificationHistoriesResult.h include/alibabacloud/cassandra/model/DescribeParametersRequest.h @@ -176,6 +178,8 @@ set(cassandra_src src/model/DescribeIpWhitelistGroupsResult.cc src/model/DescribeNodeToolExecutionHistoriesRequest.cc src/model/DescribeNodeToolExecutionHistoriesResult.cc + src/model/DescribeNodeToolExecutionHistoryRequest.cc + src/model/DescribeNodeToolExecutionHistoryResult.cc src/model/DescribeParameterModificationHistoriesRequest.cc src/model/DescribeParameterModificationHistoriesResult.cc src/model/DescribeParametersRequest.cc diff --git a/cassandra/include/alibabacloud/cassandra/CassandraClient.h b/cassandra/include/alibabacloud/cassandra/CassandraClient.h index 240e84722..9611d286c 100644 --- a/cassandra/include/alibabacloud/cassandra/CassandraClient.h +++ b/cassandra/include/alibabacloud/cassandra/CassandraClient.h @@ -72,6 +72,8 @@ #include "model/DescribeIpWhitelistGroupsResult.h" #include "model/DescribeNodeToolExecutionHistoriesRequest.h" #include "model/DescribeNodeToolExecutionHistoriesResult.h" +#include "model/DescribeNodeToolExecutionHistoryRequest.h" +#include "model/DescribeNodeToolExecutionHistoryResult.h" #include "model/DescribeParameterModificationHistoriesRequest.h" #include "model/DescribeParameterModificationHistoriesResult.h" #include "model/DescribeParametersRequest.h" @@ -208,6 +210,9 @@ namespace AlibabaCloud typedef Outcome DescribeNodeToolExecutionHistoriesOutcome; typedef std::future DescribeNodeToolExecutionHistoriesOutcomeCallable; typedef std::function&)> DescribeNodeToolExecutionHistoriesAsyncHandler; + typedef Outcome DescribeNodeToolExecutionHistoryOutcome; + typedef std::future DescribeNodeToolExecutionHistoryOutcomeCallable; + typedef std::function&)> DescribeNodeToolExecutionHistoryAsyncHandler; typedef Outcome DescribeParameterModificationHistoriesOutcome; typedef std::future DescribeParameterModificationHistoriesOutcomeCallable; typedef std::function&)> DescribeParameterModificationHistoriesAsyncHandler; @@ -366,6 +371,9 @@ namespace AlibabaCloud DescribeNodeToolExecutionHistoriesOutcome describeNodeToolExecutionHistories(const Model::DescribeNodeToolExecutionHistoriesRequest &request)const; void describeNodeToolExecutionHistoriesAsync(const Model::DescribeNodeToolExecutionHistoriesRequest& request, const DescribeNodeToolExecutionHistoriesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeNodeToolExecutionHistoriesOutcomeCallable describeNodeToolExecutionHistoriesCallable(const Model::DescribeNodeToolExecutionHistoriesRequest& request) const; + DescribeNodeToolExecutionHistoryOutcome describeNodeToolExecutionHistory(const Model::DescribeNodeToolExecutionHistoryRequest &request)const; + void describeNodeToolExecutionHistoryAsync(const Model::DescribeNodeToolExecutionHistoryRequest& request, const DescribeNodeToolExecutionHistoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeNodeToolExecutionHistoryOutcomeCallable describeNodeToolExecutionHistoryCallable(const Model::DescribeNodeToolExecutionHistoryRequest& request) const; DescribeParameterModificationHistoriesOutcome describeParameterModificationHistories(const Model::DescribeParameterModificationHistoriesRequest &request)const; void describeParameterModificationHistoriesAsync(const Model::DescribeParameterModificationHistoriesRequest& request, const DescribeParameterModificationHistoriesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeParameterModificationHistoriesOutcomeCallable describeParameterModificationHistoriesCallable(const Model::DescribeParameterModificationHistoriesRequest& request) const; diff --git a/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryRequest.h b/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryRequest.h new file mode 100644 index 000000000..0b7c3316b --- /dev/null +++ b/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryRequest.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_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYREQUEST_H_ +#define ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cassandra + { + namespace Model + { + class ALIBABACLOUD_CASSANDRA_EXPORT DescribeNodeToolExecutionHistoryRequest : public RpcServiceRequest + { + + public: + DescribeNodeToolExecutionHistoryRequest(); + ~DescribeNodeToolExecutionHistoryRequest(); + + std::string getClusterId()const; + void setClusterId(const std::string& clusterId); + std::string getJobId()const; + void setJobId(const std::string& jobId); + std::string getDcId()const; + void setDcId(const std::string& dcId); + + private: + std::string clusterId_; + std::string jobId_; + std::string dcId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYREQUEST_H_ \ No newline at end of file diff --git a/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryResult.h b/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryResult.h new file mode 100644 index 000000000..bef3472df --- /dev/null +++ b/cassandra/include/alibabacloud/cassandra/model/DescribeNodeToolExecutionHistoryResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYRESULT_H_ +#define ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cassandra + { + namespace Model + { + class ALIBABACLOUD_CASSANDRA_EXPORT DescribeNodeToolExecutionHistoryResult : public ServiceResult + { + public: + + + DescribeNodeToolExecutionHistoryResult(); + explicit DescribeNodeToolExecutionHistoryResult(const std::string &payload); + ~DescribeNodeToolExecutionHistoryResult(); + long getModifyTime()const; + std::string getDataCenterId()const; + bool getIsEnded()const; + std::string getCommand()const; + long getCreateTime()const; + std::string getArguments()const; + std::string getRegionId()const; + std::string getErrorMessage()const; + std::string getJobId()const; + std::string getNodes()const; + std::string getResult()const; + + protected: + void parse(const std::string &payload); + private: + long modifyTime_; + std::string dataCenterId_; + bool isEnded_; + std::string command_; + long createTime_; + std::string arguments_; + std::string regionId_; + std::string errorMessage_; + std::string jobId_; + std::string nodes_; + std::string result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBENODETOOLEXECUTIONHISTORYRESULT_H_ \ No newline at end of file diff --git a/cassandra/include/alibabacloud/cassandra/model/ExecuteNodeToolRequest.h b/cassandra/include/alibabacloud/cassandra/model/ExecuteNodeToolRequest.h index 7c9bfadcf..f94a82373 100644 --- a/cassandra/include/alibabacloud/cassandra/model/ExecuteNodeToolRequest.h +++ b/cassandra/include/alibabacloud/cassandra/model/ExecuteNodeToolRequest.h @@ -35,6 +35,8 @@ namespace AlibabaCloud ExecuteNodeToolRequest(); ~ExecuteNodeToolRequest(); + std::string getExecuteNodes()const; + void setExecuteNodes(const std::string& executeNodes); std::string getDataCenterId()const; void setDataCenterId(const std::string& dataCenterId); std::string getClusterId()const; @@ -45,6 +47,7 @@ namespace AlibabaCloud void setArguments(const std::string& arguments); private: + std::string executeNodes_; std::string dataCenterId_; std::string clusterId_; std::string command_; diff --git a/cassandra/src/CassandraClient.cc b/cassandra/src/CassandraClient.cc index 2bf6d531e..db98bc628 100644 --- a/cassandra/src/CassandraClient.cc +++ b/cassandra/src/CassandraClient.cc @@ -951,6 +951,42 @@ CassandraClient::DescribeNodeToolExecutionHistoriesOutcomeCallable CassandraClie return task->get_future(); } +CassandraClient::DescribeNodeToolExecutionHistoryOutcome CassandraClient::describeNodeToolExecutionHistory(const DescribeNodeToolExecutionHistoryRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeNodeToolExecutionHistoryOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeNodeToolExecutionHistoryOutcome(DescribeNodeToolExecutionHistoryResult(outcome.result())); + else + return DescribeNodeToolExecutionHistoryOutcome(outcome.error()); +} + +void CassandraClient::describeNodeToolExecutionHistoryAsync(const DescribeNodeToolExecutionHistoryRequest& request, const DescribeNodeToolExecutionHistoryAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeNodeToolExecutionHistory(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CassandraClient::DescribeNodeToolExecutionHistoryOutcomeCallable CassandraClient::describeNodeToolExecutionHistoryCallable(const DescribeNodeToolExecutionHistoryRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeNodeToolExecutionHistory(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CassandraClient::DescribeParameterModificationHistoriesOutcome CassandraClient::describeParameterModificationHistories(const DescribeParameterModificationHistoriesRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cassandra/src/model/DescribeNodeToolExecutionHistoryRequest.cc b/cassandra/src/model/DescribeNodeToolExecutionHistoryRequest.cc new file mode 100644 index 000000000..251cd42b4 --- /dev/null +++ b/cassandra/src/model/DescribeNodeToolExecutionHistoryRequest.cc @@ -0,0 +1,62 @@ +/* + * 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::Cassandra::Model::DescribeNodeToolExecutionHistoryRequest; + +DescribeNodeToolExecutionHistoryRequest::DescribeNodeToolExecutionHistoryRequest() : + RpcServiceRequest("cassandra", "2019-01-01", "DescribeNodeToolExecutionHistory") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeNodeToolExecutionHistoryRequest::~DescribeNodeToolExecutionHistoryRequest() +{} + +std::string DescribeNodeToolExecutionHistoryRequest::getClusterId()const +{ + return clusterId_; +} + +void DescribeNodeToolExecutionHistoryRequest::setClusterId(const std::string& clusterId) +{ + clusterId_ = clusterId; + setParameter("ClusterId", clusterId); +} + +std::string DescribeNodeToolExecutionHistoryRequest::getJobId()const +{ + return jobId_; +} + +void DescribeNodeToolExecutionHistoryRequest::setJobId(const std::string& jobId) +{ + jobId_ = jobId; + setParameter("JobId", jobId); +} + +std::string DescribeNodeToolExecutionHistoryRequest::getDcId()const +{ + return dcId_; +} + +void DescribeNodeToolExecutionHistoryRequest::setDcId(const std::string& dcId) +{ + dcId_ = dcId; + setParameter("DcId", dcId); +} + diff --git a/cassandra/src/model/DescribeNodeToolExecutionHistoryResult.cc b/cassandra/src/model/DescribeNodeToolExecutionHistoryResult.cc new file mode 100644 index 000000000..10cd39e28 --- /dev/null +++ b/cassandra/src/model/DescribeNodeToolExecutionHistoryResult.cc @@ -0,0 +1,121 @@ +/* + * 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::Cassandra; +using namespace AlibabaCloud::Cassandra::Model; + +DescribeNodeToolExecutionHistoryResult::DescribeNodeToolExecutionHistoryResult() : + ServiceResult() +{} + +DescribeNodeToolExecutionHistoryResult::DescribeNodeToolExecutionHistoryResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeNodeToolExecutionHistoryResult::~DescribeNodeToolExecutionHistoryResult() +{} + +void DescribeNodeToolExecutionHistoryResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["JobId"].isNull()) + jobId_ = value["JobId"].asString(); + if(!value["Command"].isNull()) + command_ = value["Command"].asString(); + if(!value["Nodes"].isNull()) + nodes_ = value["Nodes"].asString(); + if(!value["ModifyTime"].isNull()) + modifyTime_ = std::stol(value["ModifyTime"].asString()); + if(!value["CreateTime"].isNull()) + createTime_ = std::stol(value["CreateTime"].asString()); + if(!value["RegionId"].isNull()) + regionId_ = value["RegionId"].asString(); + if(!value["IsEnded"].isNull()) + isEnded_ = value["IsEnded"].asString() == "true"; + if(!value["Arguments"].isNull()) + arguments_ = value["Arguments"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["DataCenterId"].isNull()) + dataCenterId_ = value["DataCenterId"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString(); + +} + +long DescribeNodeToolExecutionHistoryResult::getModifyTime()const +{ + return modifyTime_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getDataCenterId()const +{ + return dataCenterId_; +} + +bool DescribeNodeToolExecutionHistoryResult::getIsEnded()const +{ + return isEnded_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getCommand()const +{ + return command_; +} + +long DescribeNodeToolExecutionHistoryResult::getCreateTime()const +{ + return createTime_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getArguments()const +{ + return arguments_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getRegionId()const +{ + return regionId_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getJobId()const +{ + return jobId_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getNodes()const +{ + return nodes_; +} + +std::string DescribeNodeToolExecutionHistoryResult::getResult()const +{ + return result_; +} + diff --git a/cassandra/src/model/ExecuteNodeToolRequest.cc b/cassandra/src/model/ExecuteNodeToolRequest.cc index 53135952d..84534c4f6 100644 --- a/cassandra/src/model/ExecuteNodeToolRequest.cc +++ b/cassandra/src/model/ExecuteNodeToolRequest.cc @@ -27,6 +27,17 @@ ExecuteNodeToolRequest::ExecuteNodeToolRequest() : ExecuteNodeToolRequest::~ExecuteNodeToolRequest() {} +std::string ExecuteNodeToolRequest::getExecuteNodes()const +{ + return executeNodes_; +} + +void ExecuteNodeToolRequest::setExecuteNodes(const std::string& executeNodes) +{ + executeNodes_ = executeNodes; + setParameter("ExecuteNodes", executeNodes); +} + std::string ExecuteNodeToolRequest::getDataCenterId()const { return dataCenterId_;