From 78426b2c35778b4ecdbb675606daf10c1da060bc Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 2 Jul 2024 08:52:18 +0000 Subject: [PATCH] Generated 2019-09-01 for OceanBasePro. --- VERSION | 2 +- oceanbasepro/CMakeLists.txt | 8 +++ .../oceanbasepro/OceanBaseProClient.h | 16 +++++ .../model/BatchKillSessionListRequest.h | 48 +++++++++++++ .../model/BatchKillSessionListResult.h | 49 +++++++++++++ .../model/CreateMySqlDataSourceRequest.h | 3 + .../oceanbasepro/model/CreateProjectRequest.h | 2 + .../model/DescribeSessionListRequest.h | 45 ++++++++++++ .../model/DescribeSessionListResult.h | 56 +++++++++++++++ .../model/UpdateProjectConfigRequest.h | 7 ++ oceanbasepro/src/OceanBaseProClient.cc | 72 +++++++++++++++++++ .../src/model/BatchKillSessionListRequest.cc | 54 ++++++++++++++ .../src/model/BatchKillSessionListResult.cc | 44 ++++++++++++ .../src/model/CreateMySqlDataSourceRequest.cc | 9 +++ .../src/model/CreateProjectRequest.cc | 2 + .../src/model/DescribeSessionListRequest.cc | 45 ++++++++++++ .../src/model/DescribeSessionListResult.cc | 59 +++++++++++++++ .../src/model/UpdateProjectConfigRequest.cc | 10 +++ 18 files changed, 530 insertions(+), 1 deletion(-) create mode 100644 oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.h create mode 100644 oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListResult.h create mode 100644 oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h create mode 100644 oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListResult.h create mode 100644 oceanbasepro/src/model/BatchKillSessionListRequest.cc create mode 100644 oceanbasepro/src/model/BatchKillSessionListResult.cc create mode 100644 oceanbasepro/src/model/DescribeSessionListRequest.cc create mode 100644 oceanbasepro/src/model/DescribeSessionListResult.cc diff --git a/VERSION b/VERSION index 055794ed6..4a0676fc7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1943 \ No newline at end of file +1.36.1944 \ No newline at end of file diff --git a/oceanbasepro/CMakeLists.txt b/oceanbasepro/CMakeLists.txt index 9936d241c..ce095f157 100644 --- a/oceanbasepro/CMakeLists.txt +++ b/oceanbasepro/CMakeLists.txt @@ -23,6 +23,8 @@ set(oceanbasepro_public_header set(oceanbasepro_public_header_model include/alibabacloud/oceanbasepro/model/BatchKillProcessListRequest.h include/alibabacloud/oceanbasepro/model/BatchKillProcessListResult.h + include/alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.h + include/alibabacloud/oceanbasepro/model/BatchKillSessionListResult.h include/alibabacloud/oceanbasepro/model/CancelProjectModifyRecordRequest.h include/alibabacloud/oceanbasepro/model/CancelProjectModifyRecordResult.h include/alibabacloud/oceanbasepro/model/CreateBackupSetDownloadLinkRequest.h @@ -161,6 +163,8 @@ set(oceanbasepro_public_header_model include/alibabacloud/oceanbasepro/model/DescribeSampleSqlRawTextsResult.h include/alibabacloud/oceanbasepro/model/DescribeSecurityIpGroupsRequest.h include/alibabacloud/oceanbasepro/model/DescribeSecurityIpGroupsResult.h + include/alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h + include/alibabacloud/oceanbasepro/model/DescribeSessionListResult.h include/alibabacloud/oceanbasepro/model/DescribeSlowSQLHistoryListRequest.h include/alibabacloud/oceanbasepro/model/DescribeSlowSQLHistoryListResult.h include/alibabacloud/oceanbasepro/model/DescribeSlowSQLListRequest.h @@ -280,6 +284,8 @@ set(oceanbasepro_src src/OceanBaseProClient.cc src/model/BatchKillProcessListRequest.cc src/model/BatchKillProcessListResult.cc + src/model/BatchKillSessionListRequest.cc + src/model/BatchKillSessionListResult.cc src/model/CancelProjectModifyRecordRequest.cc src/model/CancelProjectModifyRecordResult.cc src/model/CreateBackupSetDownloadLinkRequest.cc @@ -418,6 +424,8 @@ set(oceanbasepro_src src/model/DescribeSampleSqlRawTextsResult.cc src/model/DescribeSecurityIpGroupsRequest.cc src/model/DescribeSecurityIpGroupsResult.cc + src/model/DescribeSessionListRequest.cc + src/model/DescribeSessionListResult.cc src/model/DescribeSlowSQLHistoryListRequest.cc src/model/DescribeSlowSQLHistoryListResult.cc src/model/DescribeSlowSQLListRequest.cc diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/OceanBaseProClient.h b/oceanbasepro/include/alibabacloud/oceanbasepro/OceanBaseProClient.h index ab997574f..cfb85546e 100644 --- a/oceanbasepro/include/alibabacloud/oceanbasepro/OceanBaseProClient.h +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/OceanBaseProClient.h @@ -24,6 +24,8 @@ #include "OceanBaseProExport.h" #include "model/BatchKillProcessListRequest.h" #include "model/BatchKillProcessListResult.h" +#include "model/BatchKillSessionListRequest.h" +#include "model/BatchKillSessionListResult.h" #include "model/CancelProjectModifyRecordRequest.h" #include "model/CancelProjectModifyRecordResult.h" #include "model/CreateBackupSetDownloadLinkRequest.h" @@ -162,6 +164,8 @@ #include "model/DescribeSampleSqlRawTextsResult.h" #include "model/DescribeSecurityIpGroupsRequest.h" #include "model/DescribeSecurityIpGroupsResult.h" +#include "model/DescribeSessionListRequest.h" +#include "model/DescribeSessionListResult.h" #include "model/DescribeSlowSQLHistoryListRequest.h" #include "model/DescribeSlowSQLHistoryListResult.h" #include "model/DescribeSlowSQLListRequest.h" @@ -288,6 +292,9 @@ namespace AlibabaCloud typedef Outcome BatchKillProcessListOutcome; typedef std::future BatchKillProcessListOutcomeCallable; typedef std::function&)> BatchKillProcessListAsyncHandler; + typedef Outcome BatchKillSessionListOutcome; + typedef std::future BatchKillSessionListOutcomeCallable; + typedef std::function&)> BatchKillSessionListAsyncHandler; typedef Outcome CancelProjectModifyRecordOutcome; typedef std::future CancelProjectModifyRecordOutcomeCallable; typedef std::function&)> CancelProjectModifyRecordAsyncHandler; @@ -495,6 +502,9 @@ namespace AlibabaCloud typedef Outcome DescribeSecurityIpGroupsOutcome; typedef std::future DescribeSecurityIpGroupsOutcomeCallable; typedef std::function&)> DescribeSecurityIpGroupsAsyncHandler; + typedef Outcome DescribeSessionListOutcome; + typedef std::future DescribeSessionListOutcomeCallable; + typedef std::function&)> DescribeSessionListAsyncHandler; typedef Outcome DescribeSlowSQLHistoryListOutcome; typedef std::future DescribeSlowSQLHistoryListOutcomeCallable; typedef std::function&)> DescribeSlowSQLHistoryListAsyncHandler; @@ -674,6 +684,9 @@ namespace AlibabaCloud BatchKillProcessListOutcome batchKillProcessList(const Model::BatchKillProcessListRequest &request)const; void batchKillProcessListAsync(const Model::BatchKillProcessListRequest& request, const BatchKillProcessListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; BatchKillProcessListOutcomeCallable batchKillProcessListCallable(const Model::BatchKillProcessListRequest& request) const; + BatchKillSessionListOutcome batchKillSessionList(const Model::BatchKillSessionListRequest &request)const; + void batchKillSessionListAsync(const Model::BatchKillSessionListRequest& request, const BatchKillSessionListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchKillSessionListOutcomeCallable batchKillSessionListCallable(const Model::BatchKillSessionListRequest& request) const; CancelProjectModifyRecordOutcome cancelProjectModifyRecord(const Model::CancelProjectModifyRecordRequest &request)const; void cancelProjectModifyRecordAsync(const Model::CancelProjectModifyRecordRequest& request, const CancelProjectModifyRecordAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CancelProjectModifyRecordOutcomeCallable cancelProjectModifyRecordCallable(const Model::CancelProjectModifyRecordRequest& request) const; @@ -881,6 +894,9 @@ namespace AlibabaCloud DescribeSecurityIpGroupsOutcome describeSecurityIpGroups(const Model::DescribeSecurityIpGroupsRequest &request)const; void describeSecurityIpGroupsAsync(const Model::DescribeSecurityIpGroupsRequest& request, const DescribeSecurityIpGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeSecurityIpGroupsOutcomeCallable describeSecurityIpGroupsCallable(const Model::DescribeSecurityIpGroupsRequest& request) const; + DescribeSessionListOutcome describeSessionList(const Model::DescribeSessionListRequest &request)const; + void describeSessionListAsync(const Model::DescribeSessionListRequest& request, const DescribeSessionListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeSessionListOutcomeCallable describeSessionListCallable(const Model::DescribeSessionListRequest& request) const; DescribeSlowSQLHistoryListOutcome describeSlowSQLHistoryList(const Model::DescribeSlowSQLHistoryListRequest &request)const; void describeSlowSQLHistoryListAsync(const Model::DescribeSlowSQLHistoryListRequest& request, const DescribeSlowSQLHistoryListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeSlowSQLHistoryListOutcomeCallable describeSlowSQLHistoryListCallable(const Model::DescribeSlowSQLHistoryListRequest& request) const; diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.h new file mode 100644 index 000000000..f033bcb5c --- /dev/null +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.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_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTREQUEST_H_ +#define ALIBABACLOUD_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace OceanBasePro { +namespace Model { +class ALIBABACLOUD_OCEANBASEPRO_EXPORT BatchKillSessionListRequest : public RpcServiceRequest { +public: + BatchKillSessionListRequest(); + ~BatchKillSessionListRequest(); + std::string getSessionList() const; + void setSessionList(const std::string &sessionList); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getTenantId() const; + void setTenantId(const std::string &tenantId); + +private: + std::string sessionList_; + std::string instanceId_; + std::string tenantId_; +}; +} // namespace Model +} // namespace OceanBasePro +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTREQUEST_H_ diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListResult.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListResult.h new file mode 100644 index 000000000..b7bd5b4bd --- /dev/null +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/BatchKillSessionListResult.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_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTRESULT_H_ +#define ALIBABACLOUD_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace OceanBasePro + { + namespace Model + { + class ALIBABACLOUD_OCEANBASEPRO_EXPORT BatchKillSessionListResult : public ServiceResult + { + public: + + + BatchKillSessionListResult(); + explicit BatchKillSessionListResult(const std::string &payload); + ~BatchKillSessionListResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_OCEANBASEPRO_MODEL_BATCHKILLSESSIONLISTRESULT_H_ \ No newline at end of file diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateMySqlDataSourceRequest.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateMySqlDataSourceRequest.h index d778c27fc..0a89e3ea9 100644 --- a/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateMySqlDataSourceRequest.h +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateMySqlDataSourceRequest.h @@ -36,6 +36,8 @@ public: void setDescription(const std::string &description); std::string getType() const; void setType(const std::string &type); + bool getUseSsl() const; + void setUseSsl(bool useSsl); std::string getPassword() const; void setPassword(const std::string &password); std::string getDgInstanceId() const; @@ -57,6 +59,7 @@ private: std::string schema_; std::string description_; std::string type_; + bool useSsl_; std::string password_; std::string dgInstanceId_; std::string ip_; diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateProjectRequest.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateProjectRequest.h index 757dd0637..28124d43e 100644 --- a/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateProjectRequest.h +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/CreateProjectRequest.h @@ -235,6 +235,7 @@ public: int mqPartition; std::string syncSchemaColumnName; bool activeActive; + std::string sinkStoreFormat; bool rocketMqEnableMsgTrace; struct CustomColumnsItem { std::string expression; @@ -249,6 +250,7 @@ public: std::string datahubTopicType; std::string rocketMqMsgTags; std::string dataWorksBusinessName; + std::string sourceStoreFormat; bool syncSchema; std::string mqSerializerType; }; diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h new file mode 100644 index 000000000..125436cbf --- /dev/null +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h @@ -0,0 +1,45 @@ +/* + * 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_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTREQUEST_H_ +#define ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace OceanBasePro { +namespace Model { +class ALIBABACLOUD_OCEANBASEPRO_EXPORT DescribeSessionListRequest : public RpcServiceRequest { +public: + DescribeSessionListRequest(); + ~DescribeSessionListRequest(); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getTenantId() const; + void setTenantId(const std::string &tenantId); + +private: + std::string instanceId_; + std::string tenantId_; +}; +} // namespace Model +} // namespace OceanBasePro +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTREQUEST_H_ diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListResult.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListResult.h new file mode 100644 index 000000000..6c93136d0 --- /dev/null +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/DescribeSessionListResult.h @@ -0,0 +1,56 @@ +/* + * 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_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTRESULT_H_ +#define ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace OceanBasePro + { + namespace Model + { + class ALIBABACLOUD_OCEANBASEPRO_EXPORT DescribeSessionListResult : public ServiceResult + { + public: + struct DataItem + { + std::string host; + std::string sessionId; + }; + + + DescribeSessionListResult(); + explicit DescribeSessionListResult(const std::string &payload); + ~DescribeSessionListResult(); + std::vector getData()const; + + protected: + void parse(const std::string &payload); + private: + std::vector data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_OCEANBASEPRO_MODEL_DESCRIBESESSIONLISTRESULT_H_ \ No newline at end of file diff --git a/oceanbasepro/include/alibabacloud/oceanbasepro/model/UpdateProjectConfigRequest.h b/oceanbasepro/include/alibabacloud/oceanbasepro/model/UpdateProjectConfigRequest.h index 6b9f05d2c..83d8f75d9 100644 --- a/oceanbasepro/include/alibabacloud/oceanbasepro/model/UpdateProjectConfigRequest.h +++ b/oceanbasepro/include/alibabacloud/oceanbasepro/model/UpdateProjectConfigRequest.h @@ -28,6 +28,10 @@ namespace OceanBasePro { namespace Model { class ALIBABACLOUD_OCEANBASEPRO_EXPORT UpdateProjectConfigRequest : public RpcServiceRequest { public: + struct CommonTransferConfig { + std::string sinkStoreFormat; + std::string sourceStoreFormat; + }; struct ReverseIncrTransferConfig { int throttleRps; std::string string; @@ -54,6 +58,8 @@ public: }; UpdateProjectConfigRequest(); ~UpdateProjectConfigRequest(); + CommonTransferConfig getCommonTransferConfig() const; + void setCommonTransferConfig(const CommonTransferConfig &commonTransferConfig); ReverseIncrTransferConfig getReverseIncrTransferConfig() const; void setReverseIncrTransferConfig(const ReverseIncrTransferConfig &reverseIncrTransferConfig); FullTransferConfig getFullTransferConfig() const; @@ -64,6 +70,7 @@ public: void setIncrTransferConfig(const IncrTransferConfig &incrTransferConfig); private: + CommonTransferConfig commonTransferConfig_; ReverseIncrTransferConfig reverseIncrTransferConfig_; FullTransferConfig fullTransferConfig_; std::string id_; diff --git a/oceanbasepro/src/OceanBaseProClient.cc b/oceanbasepro/src/OceanBaseProClient.cc index 1077ce438..f45b7b19a 100644 --- a/oceanbasepro/src/OceanBaseProClient.cc +++ b/oceanbasepro/src/OceanBaseProClient.cc @@ -87,6 +87,42 @@ OceanBaseProClient::BatchKillProcessListOutcomeCallable OceanBaseProClient::batc return task->get_future(); } +OceanBaseProClient::BatchKillSessionListOutcome OceanBaseProClient::batchKillSessionList(const BatchKillSessionListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchKillSessionListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchKillSessionListOutcome(BatchKillSessionListResult(outcome.result())); + else + return BatchKillSessionListOutcome(outcome.error()); +} + +void OceanBaseProClient::batchKillSessionListAsync(const BatchKillSessionListRequest& request, const BatchKillSessionListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchKillSessionList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +OceanBaseProClient::BatchKillSessionListOutcomeCallable OceanBaseProClient::batchKillSessionListCallable(const BatchKillSessionListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchKillSessionList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + OceanBaseProClient::CancelProjectModifyRecordOutcome OceanBaseProClient::cancelProjectModifyRecord(const CancelProjectModifyRecordRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2571,6 +2607,42 @@ OceanBaseProClient::DescribeSecurityIpGroupsOutcomeCallable OceanBaseProClient:: return task->get_future(); } +OceanBaseProClient::DescribeSessionListOutcome OceanBaseProClient::describeSessionList(const DescribeSessionListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeSessionListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeSessionListOutcome(DescribeSessionListResult(outcome.result())); + else + return DescribeSessionListOutcome(outcome.error()); +} + +void OceanBaseProClient::describeSessionListAsync(const DescribeSessionListRequest& request, const DescribeSessionListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeSessionList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +OceanBaseProClient::DescribeSessionListOutcomeCallable OceanBaseProClient::describeSessionListCallable(const DescribeSessionListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeSessionList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + OceanBaseProClient::DescribeSlowSQLHistoryListOutcome OceanBaseProClient::describeSlowSQLHistoryList(const DescribeSlowSQLHistoryListRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/oceanbasepro/src/model/BatchKillSessionListRequest.cc b/oceanbasepro/src/model/BatchKillSessionListRequest.cc new file mode 100644 index 000000000..7a10e5033 --- /dev/null +++ b/oceanbasepro/src/model/BatchKillSessionListRequest.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::OceanBasePro::Model::BatchKillSessionListRequest; + +BatchKillSessionListRequest::BatchKillSessionListRequest() + : RpcServiceRequest("oceanbasepro", "2019-09-01", "BatchKillSessionList") { + setMethod(HttpRequest::Method::Post); +} + +BatchKillSessionListRequest::~BatchKillSessionListRequest() {} + +std::string BatchKillSessionListRequest::getSessionList() const { + return sessionList_; +} + +void BatchKillSessionListRequest::setSessionList(const std::string &sessionList) { + sessionList_ = sessionList; + setBodyParameter(std::string("SessionList"), sessionList); +} + +std::string BatchKillSessionListRequest::getInstanceId() const { + return instanceId_; +} + +void BatchKillSessionListRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), instanceId); +} + +std::string BatchKillSessionListRequest::getTenantId() const { + return tenantId_; +} + +void BatchKillSessionListRequest::setTenantId(const std::string &tenantId) { + tenantId_ = tenantId; + setBodyParameter(std::string("TenantId"), tenantId); +} + diff --git a/oceanbasepro/src/model/BatchKillSessionListResult.cc b/oceanbasepro/src/model/BatchKillSessionListResult.cc new file mode 100644 index 000000000..55fdd3104 --- /dev/null +++ b/oceanbasepro/src/model/BatchKillSessionListResult.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::OceanBasePro; +using namespace AlibabaCloud::OceanBasePro::Model; + +BatchKillSessionListResult::BatchKillSessionListResult() : + ServiceResult() +{} + +BatchKillSessionListResult::BatchKillSessionListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchKillSessionListResult::~BatchKillSessionListResult() +{} + +void BatchKillSessionListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/oceanbasepro/src/model/CreateMySqlDataSourceRequest.cc b/oceanbasepro/src/model/CreateMySqlDataSourceRequest.cc index f7bb90e1e..22e325812 100644 --- a/oceanbasepro/src/model/CreateMySqlDataSourceRequest.cc +++ b/oceanbasepro/src/model/CreateMySqlDataSourceRequest.cc @@ -52,6 +52,15 @@ void CreateMySqlDataSourceRequest::setType(const std::string &type) { setBodyParameter(std::string("Type"), type); } +bool CreateMySqlDataSourceRequest::getUseSsl() const { + return useSsl_; +} + +void CreateMySqlDataSourceRequest::setUseSsl(bool useSsl) { + useSsl_ = useSsl; + setBodyParameter(std::string("UseSsl"), useSsl ? "true" : "false"); +} + std::string CreateMySqlDataSourceRequest::getPassword() const { return password_; } diff --git a/oceanbasepro/src/model/CreateProjectRequest.cc b/oceanbasepro/src/model/CreateProjectRequest.cc index cd88ed056..d37debc2c 100644 --- a/oceanbasepro/src/model/CreateProjectRequest.cc +++ b/oceanbasepro/src/model/CreateProjectRequest.cc @@ -311,6 +311,7 @@ void CreateProjectRequest::setCommonTransferConfig(const CreateProjectRequest::C setBodyParameter(std::string("CommonTransferConfig") + ".MqPartition", std::to_string(commonTransferConfig.mqPartition)); setBodyParameter(std::string("CommonTransferConfig") + ".SyncSchemaColumnName", commonTransferConfig.syncSchemaColumnName); setBodyParameter(std::string("CommonTransferConfig") + ".ActiveActive", commonTransferConfig.activeActive ? "true" : "false"); + setBodyParameter(std::string("CommonTransferConfig") + ".SinkStoreFormat", commonTransferConfig.sinkStoreFormat); setBodyParameter(std::string("CommonTransferConfig") + ".RocketMqEnableMsgTrace", commonTransferConfig.rocketMqEnableMsgTrace ? "true" : "false"); for(int dep1 = 0; dep1 != commonTransferConfig.customColumns.size(); dep1++) { setBodyParameter(std::string("CommonTransferConfig") + ".CustomColumns." + std::to_string(dep1 + 1) + ".Expression", commonTransferConfig.customColumns[dep1].expression); @@ -323,6 +324,7 @@ void CreateProjectRequest::setCommonTransferConfig(const CreateProjectRequest::C setBodyParameter(std::string("CommonTransferConfig") + ".DatahubTopicType", commonTransferConfig.datahubTopicType); setBodyParameter(std::string("CommonTransferConfig") + ".RocketMqMsgTags", commonTransferConfig.rocketMqMsgTags); setBodyParameter(std::string("CommonTransferConfig") + ".DataWorksBusinessName", commonTransferConfig.dataWorksBusinessName); + setBodyParameter(std::string("CommonTransferConfig") + ".SourceStoreFormat", commonTransferConfig.sourceStoreFormat); setBodyParameter(std::string("CommonTransferConfig") + ".SyncSchema", commonTransferConfig.syncSchema ? "true" : "false"); setBodyParameter(std::string("CommonTransferConfig") + ".MqSerializerType", commonTransferConfig.mqSerializerType); } diff --git a/oceanbasepro/src/model/DescribeSessionListRequest.cc b/oceanbasepro/src/model/DescribeSessionListRequest.cc new file mode 100644 index 000000000..864f34cee --- /dev/null +++ b/oceanbasepro/src/model/DescribeSessionListRequest.cc @@ -0,0 +1,45 @@ +/* + * 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::OceanBasePro::Model::DescribeSessionListRequest; + +DescribeSessionListRequest::DescribeSessionListRequest() + : RpcServiceRequest("oceanbasepro", "2019-09-01", "DescribeSessionList") { + setMethod(HttpRequest::Method::Post); +} + +DescribeSessionListRequest::~DescribeSessionListRequest() {} + +std::string DescribeSessionListRequest::getInstanceId() const { + return instanceId_; +} + +void DescribeSessionListRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), instanceId); +} + +std::string DescribeSessionListRequest::getTenantId() const { + return tenantId_; +} + +void DescribeSessionListRequest::setTenantId(const std::string &tenantId) { + tenantId_ = tenantId; + setBodyParameter(std::string("TenantId"), tenantId); +} + diff --git a/oceanbasepro/src/model/DescribeSessionListResult.cc b/oceanbasepro/src/model/DescribeSessionListResult.cc new file mode 100644 index 000000000..ec75b01d8 --- /dev/null +++ b/oceanbasepro/src/model/DescribeSessionListResult.cc @@ -0,0 +1,59 @@ +/* + * 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::OceanBasePro; +using namespace AlibabaCloud::OceanBasePro::Model; + +DescribeSessionListResult::DescribeSessionListResult() : + ServiceResult() +{} + +DescribeSessionListResult::DescribeSessionListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeSessionListResult::~DescribeSessionListResult() +{} + +void DescribeSessionListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["DataItem"]; + for (auto valueDataDataItem : allDataNode) + { + DataItem dataObject; + if(!valueDataDataItem["SessionId"].isNull()) + dataObject.sessionId = valueDataDataItem["SessionId"].asString(); + if(!valueDataDataItem["Host"].isNull()) + dataObject.host = valueDataDataItem["Host"].asString(); + data_.push_back(dataObject); + } + +} + +std::vector DescribeSessionListResult::getData()const +{ + return data_; +} + diff --git a/oceanbasepro/src/model/UpdateProjectConfigRequest.cc b/oceanbasepro/src/model/UpdateProjectConfigRequest.cc index dd188889f..226a8038d 100644 --- a/oceanbasepro/src/model/UpdateProjectConfigRequest.cc +++ b/oceanbasepro/src/model/UpdateProjectConfigRequest.cc @@ -25,6 +25,16 @@ UpdateProjectConfigRequest::UpdateProjectConfigRequest() UpdateProjectConfigRequest::~UpdateProjectConfigRequest() {} +UpdateProjectConfigRequest::CommonTransferConfig UpdateProjectConfigRequest::getCommonTransferConfig() const { + return commonTransferConfig_; +} + +void UpdateProjectConfigRequest::setCommonTransferConfig(const UpdateProjectConfigRequest::CommonTransferConfig &commonTransferConfig) { + commonTransferConfig_ = commonTransferConfig; + setBodyParameter(std::string("CommonTransferConfig") + ".SinkStoreFormat", commonTransferConfig.sinkStoreFormat); + setBodyParameter(std::string("CommonTransferConfig") + ".SourceStoreFormat", commonTransferConfig.sourceStoreFormat); +} + UpdateProjectConfigRequest::ReverseIncrTransferConfig UpdateProjectConfigRequest::getReverseIncrTransferConfig() const { return reverseIncrTransferConfig_; }