Generated 2019-09-01 for OceanBasePro.
This commit is contained in:
@@ -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<const AsyncCallerContext>& 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<std::packaged_task<BatchKillSessionListOutcome()>>(
|
||||
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeSessionListOutcome()>>(
|
||||
[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();
|
||||
|
||||
54
oceanbasepro/src/model/BatchKillSessionListRequest.cc
Normal file
54
oceanbasepro/src/model/BatchKillSessionListRequest.cc
Normal file
@@ -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 <alibabacloud/oceanbasepro/model/BatchKillSessionListRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
44
oceanbasepro/src/model/BatchKillSessionListResult.cc
Normal file
44
oceanbasepro/src/model/BatchKillSessionListResult.cc
Normal file
@@ -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 <alibabacloud/oceanbasepro/model/BatchKillSessionListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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());
|
||||
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
45
oceanbasepro/src/model/DescribeSessionListRequest.cc
Normal file
45
oceanbasepro/src/model/DescribeSessionListRequest.cc
Normal file
@@ -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 <alibabacloud/oceanbasepro/model/DescribeSessionListRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
59
oceanbasepro/src/model/DescribeSessionListResult.cc
Normal file
59
oceanbasepro/src/model/DescribeSessionListResult.cc
Normal file
@@ -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 <alibabacloud/oceanbasepro/model/DescribeSessionListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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::DataItem> DescribeSessionListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user