Supported ListDataImportSQLPreCheckDetail,GetDataImportSQL,ListDataImportSQLType API.

This commit is contained in:
sdk-team
2023-04-11 04:01:18 +00:00
parent 3d20963438
commit 2b7e50c691
48 changed files with 2710 additions and 13 deletions

View File

@@ -411,6 +411,42 @@ Dms_enterpriseClient::CloseOrderOutcomeCallable Dms_enterpriseClient::closeOrder
return task->get_future();
}
Dms_enterpriseClient::CreateAuthorityTemplateOutcome Dms_enterpriseClient::createAuthorityTemplate(const CreateAuthorityTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateAuthorityTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateAuthorityTemplateOutcome(CreateAuthorityTemplateResult(outcome.result()));
else
return CreateAuthorityTemplateOutcome(outcome.error());
}
void Dms_enterpriseClient::createAuthorityTemplateAsync(const CreateAuthorityTemplateRequest& request, const CreateAuthorityTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createAuthorityTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::CreateAuthorityTemplateOutcomeCallable Dms_enterpriseClient::createAuthorityTemplateCallable(const CreateAuthorityTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateAuthorityTemplateOutcome()>>(
[this, request]()
{
return this->createAuthorityTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::CreateDataCorrectOrderOutcome Dms_enterpriseClient::createDataCorrectOrder(const CreateDataCorrectOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1779,6 +1815,78 @@ Dms_enterpriseClient::GetApprovalDetailOutcomeCallable Dms_enterpriseClient::get
return task->get_future();
}
Dms_enterpriseClient::GetAuthorityTemplateOutcome Dms_enterpriseClient::getAuthorityTemplate(const GetAuthorityTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetAuthorityTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetAuthorityTemplateOutcome(GetAuthorityTemplateResult(outcome.result()));
else
return GetAuthorityTemplateOutcome(outcome.error());
}
void Dms_enterpriseClient::getAuthorityTemplateAsync(const GetAuthorityTemplateRequest& request, const GetAuthorityTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getAuthorityTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetAuthorityTemplateOutcomeCallable Dms_enterpriseClient::getAuthorityTemplateCallable(const GetAuthorityTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetAuthorityTemplateOutcome()>>(
[this, request]()
{
return this->getAuthorityTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetAuthorityTemplateItemOutcome Dms_enterpriseClient::getAuthorityTemplateItem(const GetAuthorityTemplateItemRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetAuthorityTemplateItemOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetAuthorityTemplateItemOutcome(GetAuthorityTemplateItemResult(outcome.result()));
else
return GetAuthorityTemplateItemOutcome(outcome.error());
}
void Dms_enterpriseClient::getAuthorityTemplateItemAsync(const GetAuthorityTemplateItemRequest& request, const GetAuthorityTemplateItemAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getAuthorityTemplateItem(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetAuthorityTemplateItemOutcomeCallable Dms_enterpriseClient::getAuthorityTemplateItemCallable(const GetAuthorityTemplateItemRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetAuthorityTemplateItemOutcome()>>(
[this, request]()
{
return this->getAuthorityTemplateItem(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetDBTaskSQLJobLogOutcome Dms_enterpriseClient::getDBTaskSQLJobLog(const GetDBTaskSQLJobLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2175,6 +2283,42 @@ Dms_enterpriseClient::GetDataExportOrderDetailOutcomeCallable Dms_enterpriseClie
return task->get_future();
}
Dms_enterpriseClient::GetDataImportSQLOutcome Dms_enterpriseClient::getDataImportSQL(const GetDataImportSQLRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetDataImportSQLOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetDataImportSQLOutcome(GetDataImportSQLResult(outcome.result()));
else
return GetDataImportSQLOutcome(outcome.error());
}
void Dms_enterpriseClient::getDataImportSQLAsync(const GetDataImportSQLRequest& request, const GetDataImportSQLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getDataImportSQL(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetDataImportSQLOutcomeCallable Dms_enterpriseClient::getDataImportSQLCallable(const GetDataImportSQLRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetDataImportSQLOutcome()>>(
[this, request]()
{
return this->getDataImportSQL(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetDatabaseOutcome Dms_enterpriseClient::getDatabase(const GetDatabaseRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3327,6 +3471,42 @@ Dms_enterpriseClient::GetUserUploadFileJobOutcomeCallable Dms_enterpriseClient::
return task->get_future();
}
Dms_enterpriseClient::GrantTemplateAuthorityOutcome Dms_enterpriseClient::grantTemplateAuthority(const GrantTemplateAuthorityRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GrantTemplateAuthorityOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GrantTemplateAuthorityOutcome(GrantTemplateAuthorityResult(outcome.result()));
else
return GrantTemplateAuthorityOutcome(outcome.error());
}
void Dms_enterpriseClient::grantTemplateAuthorityAsync(const GrantTemplateAuthorityRequest& request, const GrantTemplateAuthorityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, grantTemplateAuthority(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GrantTemplateAuthorityOutcomeCallable Dms_enterpriseClient::grantTemplateAuthorityCallable(const GrantTemplateAuthorityRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GrantTemplateAuthorityOutcome()>>(
[this, request]()
{
return this->grantTemplateAuthority(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GrantUserPermissionOutcome Dms_enterpriseClient::grantUserPermission(const GrantUserPermissionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3687,6 +3867,78 @@ Dms_enterpriseClient::ListDataCorrectPreCheckSQLOutcomeCallable Dms_enterpriseCl
return task->get_future();
}
Dms_enterpriseClient::ListDataImportSQLPreCheckDetailOutcome Dms_enterpriseClient::listDataImportSQLPreCheckDetail(const ListDataImportSQLPreCheckDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDataImportSQLPreCheckDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDataImportSQLPreCheckDetailOutcome(ListDataImportSQLPreCheckDetailResult(outcome.result()));
else
return ListDataImportSQLPreCheckDetailOutcome(outcome.error());
}
void Dms_enterpriseClient::listDataImportSQLPreCheckDetailAsync(const ListDataImportSQLPreCheckDetailRequest& request, const ListDataImportSQLPreCheckDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDataImportSQLPreCheckDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListDataImportSQLPreCheckDetailOutcomeCallable Dms_enterpriseClient::listDataImportSQLPreCheckDetailCallable(const ListDataImportSQLPreCheckDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDataImportSQLPreCheckDetailOutcome()>>(
[this, request]()
{
return this->listDataImportSQLPreCheckDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListDataImportSQLTypeOutcome Dms_enterpriseClient::listDataImportSQLType(const ListDataImportSQLTypeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDataImportSQLTypeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDataImportSQLTypeOutcome(ListDataImportSQLTypeResult(outcome.result()));
else
return ListDataImportSQLTypeOutcome(outcome.error());
}
void Dms_enterpriseClient::listDataImportSQLTypeAsync(const ListDataImportSQLTypeRequest& request, const ListDataImportSQLTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDataImportSQLType(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListDataImportSQLTypeOutcomeCallable Dms_enterpriseClient::listDataImportSQLTypeCallable(const ListDataImportSQLTypeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDataImportSQLTypeOutcome()>>(
[this, request]()
{
return this->listDataImportSQLType(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListDatabaseUserPermssionsOutcome Dms_enterpriseClient::listDatabaseUserPermssions(const ListDatabaseUserPermssionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5631,6 +5883,42 @@ Dms_enterpriseClient::RetryDataCorrectPreCheckOutcomeCallable Dms_enterpriseClie
return task->get_future();
}
Dms_enterpriseClient::RevokeTemplateAuthorityOutcome Dms_enterpriseClient::revokeTemplateAuthority(const RevokeTemplateAuthorityRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RevokeTemplateAuthorityOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RevokeTemplateAuthorityOutcome(RevokeTemplateAuthorityResult(outcome.result()));
else
return RevokeTemplateAuthorityOutcome(outcome.error());
}
void Dms_enterpriseClient::revokeTemplateAuthorityAsync(const RevokeTemplateAuthorityRequest& request, const RevokeTemplateAuthorityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, revokeTemplateAuthority(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::RevokeTemplateAuthorityOutcomeCallable Dms_enterpriseClient::revokeTemplateAuthorityCallable(const RevokeTemplateAuthorityRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RevokeTemplateAuthorityOutcome()>>(
[this, request]()
{
return this->revokeTemplateAuthority(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::RevokeUserPermissionOutcome Dms_enterpriseClient::revokeUserPermission(const RevokeUserPermissionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5991,6 +6279,42 @@ Dms_enterpriseClient::SyncInstanceMetaOutcomeCallable Dms_enterpriseClient::sync
return task->get_future();
}
Dms_enterpriseClient::UpdateAuthorityTemplateOutcome Dms_enterpriseClient::updateAuthorityTemplate(const UpdateAuthorityTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateAuthorityTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateAuthorityTemplateOutcome(UpdateAuthorityTemplateResult(outcome.result()));
else
return UpdateAuthorityTemplateOutcome(outcome.error());
}
void Dms_enterpriseClient::updateAuthorityTemplateAsync(const UpdateAuthorityTemplateRequest& request, const UpdateAuthorityTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateAuthorityTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::UpdateAuthorityTemplateOutcomeCallable Dms_enterpriseClient::updateAuthorityTemplateCallable(const UpdateAuthorityTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateAuthorityTemplateOutcome()>>(
[this, request]()
{
return this->updateAuthorityTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::UpdateInstanceOutcome Dms_enterpriseClient::updateInstance(const UpdateInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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/dms-enterprise/model/CreateAuthorityTemplateRequest.h>
using AlibabaCloud::Dms_enterprise::Model::CreateAuthorityTemplateRequest;
CreateAuthorityTemplateRequest::CreateAuthorityTemplateRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "CreateAuthorityTemplate") {
setMethod(HttpRequest::Method::Post);
}
CreateAuthorityTemplateRequest::~CreateAuthorityTemplateRequest() {}
std::string CreateAuthorityTemplateRequest::getDescription() const {
return description_;
}
void CreateAuthorityTemplateRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
long CreateAuthorityTemplateRequest::getTid() const {
return tid_;
}
void CreateAuthorityTemplateRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
std::string CreateAuthorityTemplateRequest::getName() const {
return name_;
}
void CreateAuthorityTemplateRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}

View File

@@ -0,0 +1,81 @@
/*
* 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/dms-enterprise/model/CreateAuthorityTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
CreateAuthorityTemplateResult::CreateAuthorityTemplateResult() :
ServiceResult()
{}
CreateAuthorityTemplateResult::CreateAuthorityTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateAuthorityTemplateResult::~CreateAuthorityTemplateResult()
{}
void CreateAuthorityTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto authorityTemplateViewNode = value["AuthorityTemplateView"];
if(!authorityTemplateViewNode["TemplateId"].isNull())
authorityTemplateView_.templateId = std::stol(authorityTemplateViewNode["TemplateId"].asString());
if(!authorityTemplateViewNode["Name"].isNull())
authorityTemplateView_.name = authorityTemplateViewNode["Name"].asString();
if(!authorityTemplateViewNode["CreatorId"].isNull())
authorityTemplateView_.creatorId = std::stol(authorityTemplateViewNode["CreatorId"].asString());
if(!authorityTemplateViewNode["Description"].isNull())
authorityTemplateView_.description = authorityTemplateViewNode["Description"].asString();
if(!authorityTemplateViewNode["CreateTime"].isNull())
authorityTemplateView_.createTime = authorityTemplateViewNode["CreateTime"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateAuthorityTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateAuthorityTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateAuthorityTemplateResult::getSuccess()const
{
return success_;
}
CreateAuthorityTemplateResult::AuthorityTemplateView CreateAuthorityTemplateResult::getAuthorityTemplateView()const
{
return authorityTemplateView_;
}

View 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/dms-enterprise/model/GetAuthorityTemplateItemRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetAuthorityTemplateItemRequest;
GetAuthorityTemplateItemRequest::GetAuthorityTemplateItemRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetAuthorityTemplateItem") {
setMethod(HttpRequest::Method::Post);
}
GetAuthorityTemplateItemRequest::~GetAuthorityTemplateItemRequest() {}
long GetAuthorityTemplateItemRequest::getTid() const {
return tid_;
}
void GetAuthorityTemplateItemRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GetAuthorityTemplateItemRequest::getTemplateId() const {
return templateId_;
}
void GetAuthorityTemplateItemRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}

View File

@@ -0,0 +1,92 @@
/*
* 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/dms-enterprise/model/GetAuthorityTemplateItemResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetAuthorityTemplateItemResult::GetAuthorityTemplateItemResult() :
ServiceResult()
{}
GetAuthorityTemplateItemResult::GetAuthorityTemplateItemResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAuthorityTemplateItemResult::~GetAuthorityTemplateItemResult()
{}
void GetAuthorityTemplateItemResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAuthorityTemplateItemListNode = value["AuthorityTemplateItemList"]["AuthorityTemplateItem"];
for (auto valueAuthorityTemplateItemListAuthorityTemplateItem : allAuthorityTemplateItemListNode)
{
AuthorityTemplateItem authorityTemplateItemListObject;
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["ItemId"].isNull())
authorityTemplateItemListObject.itemId = std::stol(valueAuthorityTemplateItemListAuthorityTemplateItem["ItemId"].asString());
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["TemplateId"].isNull())
authorityTemplateItemListObject.templateId = std::stol(valueAuthorityTemplateItemListAuthorityTemplateItem["TemplateId"].asString());
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["ModifierId"].isNull())
authorityTemplateItemListObject.modifierId = std::stol(valueAuthorityTemplateItemListAuthorityTemplateItem["ModifierId"].asString());
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["ResourceType"].isNull())
authorityTemplateItemListObject.resourceType = valueAuthorityTemplateItemListAuthorityTemplateItem["ResourceType"].asString();
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["InstanceId"].isNull())
authorityTemplateItemListObject.instanceId = std::stol(valueAuthorityTemplateItemListAuthorityTemplateItem["InstanceId"].asString());
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["DbId"].isNull())
authorityTemplateItemListObject.dbId = std::stol(valueAuthorityTemplateItemListAuthorityTemplateItem["DbId"].asString());
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["TableName"].isNull())
authorityTemplateItemListObject.tableName = valueAuthorityTemplateItemListAuthorityTemplateItem["TableName"].asString();
if(!valueAuthorityTemplateItemListAuthorityTemplateItem["Attribute"].isNull())
authorityTemplateItemListObject.attribute = valueAuthorityTemplateItemListAuthorityTemplateItem["Attribute"].asString();
authorityTemplateItemList_.push_back(authorityTemplateItemListObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::vector<GetAuthorityTemplateItemResult::AuthorityTemplateItem> GetAuthorityTemplateItemResult::getAuthorityTemplateItemList()const
{
return authorityTemplateItemList_;
}
std::string GetAuthorityTemplateItemResult::getErrorCode()const
{
return errorCode_;
}
std::string GetAuthorityTemplateItemResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetAuthorityTemplateItemResult::getSuccess()const
{
return success_;
}

View 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/dms-enterprise/model/GetAuthorityTemplateRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetAuthorityTemplateRequest;
GetAuthorityTemplateRequest::GetAuthorityTemplateRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetAuthorityTemplate") {
setMethod(HttpRequest::Method::Post);
}
GetAuthorityTemplateRequest::~GetAuthorityTemplateRequest() {}
long GetAuthorityTemplateRequest::getTid() const {
return tid_;
}
void GetAuthorityTemplateRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GetAuthorityTemplateRequest::getTemplateId() const {
return templateId_;
}
void GetAuthorityTemplateRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}

View File

@@ -0,0 +1,103 @@
/*
* 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/dms-enterprise/model/GetAuthorityTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetAuthorityTemplateResult::GetAuthorityTemplateResult() :
ServiceResult()
{}
GetAuthorityTemplateResult::GetAuthorityTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAuthorityTemplateResult::~GetAuthorityTemplateResult()
{}
void GetAuthorityTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto authorityTemplateViewNode = value["AuthorityTemplateView"];
if(!authorityTemplateViewNode["TemplateId"].isNull())
authorityTemplateView_.templateId = std::stol(authorityTemplateViewNode["TemplateId"].asString());
if(!authorityTemplateViewNode["CreatorId"].isNull())
authorityTemplateView_.creatorId = std::stol(authorityTemplateViewNode["CreatorId"].asString());
if(!authorityTemplateViewNode["Name"].isNull())
authorityTemplateView_.name = authorityTemplateViewNode["Name"].asString();
if(!authorityTemplateViewNode["Description"].isNull())
authorityTemplateView_.description = authorityTemplateViewNode["Description"].asString();
if(!authorityTemplateViewNode["CreateTime"].isNull())
authorityTemplateView_.createTime = authorityTemplateViewNode["CreateTime"].asString();
auto allAuthorityTemplateItemListNode = authorityTemplateViewNode["AuthorityTemplateItemList"]["AuthorityTemplateItem"];
for (auto authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem : allAuthorityTemplateItemListNode)
{
AuthorityTemplateView::AuthorityTemplateItem authorityTemplateItemObject;
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ItemId"].isNull())
authorityTemplateItemObject.itemId = std::stol(authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ItemId"].asString());
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["TemplateId"].isNull())
authorityTemplateItemObject.templateId = std::stol(authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["TemplateId"].asString());
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ModifierId"].isNull())
authorityTemplateItemObject.modifierId = std::stol(authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ModifierId"].asString());
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ResourceType"].isNull())
authorityTemplateItemObject.resourceType = authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["ResourceType"].asString();
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["InstanceId"].isNull())
authorityTemplateItemObject.instanceId = std::stol(authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["InstanceId"].asString());
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["DbId"].isNull())
authorityTemplateItemObject.dbId = std::stol(authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["DbId"].asString());
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["TableName"].isNull())
authorityTemplateItemObject.tableName = authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["TableName"].asString();
if(!authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["Attribute"].isNull())
authorityTemplateItemObject.attribute = authorityTemplateViewNodeAuthorityTemplateItemListAuthorityTemplateItem["Attribute"].asString();
authorityTemplateView_.authorityTemplateItemList.push_back(authorityTemplateItemObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetAuthorityTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string GetAuthorityTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetAuthorityTemplateResult::getSuccess()const
{
return success_;
}
GetAuthorityTemplateResult::AuthorityTemplateView GetAuthorityTemplateResult::getAuthorityTemplateView()const
{
return authorityTemplateView_;
}

View 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/dms-enterprise/model/GetDataImportSQLRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetDataImportSQLRequest;
GetDataImportSQLRequest::GetDataImportSQLRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetDataImportSQL") {
setMethod(HttpRequest::Method::Post);
}
GetDataImportSQLRequest::~GetDataImportSQLRequest() {}
long GetDataImportSQLRequest::getTid() const {
return tid_;
}
void GetDataImportSQLRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GetDataImportSQLRequest::getSqlId() const {
return sqlId_;
}
void GetDataImportSQLRequest::setSqlId(long sqlId) {
sqlId_ = sqlId;
setParameter(std::string("SqlId"), std::to_string(sqlId));
}
long GetDataImportSQLRequest::getOrderId() const {
return orderId_;
}
void GetDataImportSQLRequest::setOrderId(long orderId) {
orderId_ = orderId;
setParameter(std::string("OrderId"), std::to_string(orderId));
}

View File

@@ -0,0 +1,73 @@
/*
* 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/dms-enterprise/model/GetDataImportSQLResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetDataImportSQLResult::GetDataImportSQLResult() :
ServiceResult()
{}
GetDataImportSQLResult::GetDataImportSQLResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDataImportSQLResult::~GetDataImportSQLResult()
{}
void GetDataImportSQLResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto sQLDetailNode = value["SQLDetail"];
if(!sQLDetailNode["ExecSql"].isNull())
sQLDetail_.execSql = sQLDetailNode["ExecSql"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
}
GetDataImportSQLResult::SQLDetail GetDataImportSQLResult::getSQLDetail()const
{
return sQLDetail_;
}
std::string GetDataImportSQLResult::getErrorCode()const
{
return errorCode_;
}
std::string GetDataImportSQLResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetDataImportSQLResult::getSuccess()const
{
return success_;
}

View File

@@ -43,12 +43,3 @@ void GetProxyRequest::setProxyId(long proxyId) {
setParameter(std::string("ProxyId"), std::to_string(proxyId));
}
long GetProxyRequest::getInstanceId() const {
return instanceId_;
}
void GetProxyRequest::setInstanceId(long instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), std::to_string(instanceId));
}

View File

@@ -67,6 +67,8 @@ void GetProxyResult::parse(const std::string &payload)
protocolType_ = value["ProtocolType"].asString();
if(!value["ProtocolPort"].isNull())
protocolPort_ = std::stoi(value["ProtocolPort"].asString());
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
}
@@ -120,6 +122,11 @@ int GetProxyResult::getProtocolPort()const
return protocolPort_;
}
std::string GetProxyResult::getRegionId()const
{
return regionId_;
}
std::string GetProxyResult::getErrorMessage()const
{
return errorMessage_;

View File

@@ -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 <alibabacloud/dms-enterprise/model/GrantTemplateAuthorityRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GrantTemplateAuthorityRequest;
GrantTemplateAuthorityRequest::GrantTemplateAuthorityRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GrantTemplateAuthority") {
setMethod(HttpRequest::Method::Post);
}
GrantTemplateAuthorityRequest::~GrantTemplateAuthorityRequest() {}
std::string GrantTemplateAuthorityRequest::getExpireDate() const {
return expireDate_;
}
void GrantTemplateAuthorityRequest::setExpireDate(const std::string &expireDate) {
expireDate_ = expireDate;
setParameter(std::string("ExpireDate"), expireDate);
}
long GrantTemplateAuthorityRequest::getTid() const {
return tid_;
}
void GrantTemplateAuthorityRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GrantTemplateAuthorityRequest::getTemplateId() const {
return templateId_;
}
void GrantTemplateAuthorityRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}
std::string GrantTemplateAuthorityRequest::getUserIds() const {
return userIds_;
}
void GrantTemplateAuthorityRequest::setUserIds(const std::string &userIds) {
userIds_ = userIds;
setParameter(std::string("UserIds"), userIds);
}
std::string GrantTemplateAuthorityRequest::getComment() const {
return comment_;
}
void GrantTemplateAuthorityRequest::setComment(const std::string &comment) {
comment_ = comment;
setParameter(std::string("Comment"), comment);
}

View File

@@ -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 <alibabacloud/dms-enterprise/model/GrantTemplateAuthorityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GrantTemplateAuthorityResult::GrantTemplateAuthorityResult() :
ServiceResult()
{}
GrantTemplateAuthorityResult::GrantTemplateAuthorityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GrantTemplateAuthorityResult::~GrantTemplateAuthorityResult()
{}
void GrantTemplateAuthorityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Result"].isNull())
result_ = value["Result"].asString() == "true";
}
std::string GrantTemplateAuthorityResult::getErrorCode()const
{
return errorCode_;
}
std::string GrantTemplateAuthorityResult::getErrorMessage()const
{
return errorMessage_;
}
bool GrantTemplateAuthorityResult::getSuccess()const
{
return success_;
}
bool GrantTemplateAuthorityResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,81 @@
/*
* 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/dms-enterprise/model/ListDataImportSQLPreCheckDetailRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListDataImportSQLPreCheckDetailRequest;
ListDataImportSQLPreCheckDetailRequest::ListDataImportSQLPreCheckDetailRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ListDataImportSQLPreCheckDetail") {
setMethod(HttpRequest::Method::Post);
}
ListDataImportSQLPreCheckDetailRequest::~ListDataImportSQLPreCheckDetailRequest() {}
long ListDataImportSQLPreCheckDetailRequest::getPageNumer() const {
return pageNumer_;
}
void ListDataImportSQLPreCheckDetailRequest::setPageNumer(long pageNumer) {
pageNumer_ = pageNumer;
setParameter(std::string("PageNumer"), std::to_string(pageNumer));
}
long ListDataImportSQLPreCheckDetailRequest::getTid() const {
return tid_;
}
void ListDataImportSQLPreCheckDetailRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
std::string ListDataImportSQLPreCheckDetailRequest::getStatusCode() const {
return statusCode_;
}
void ListDataImportSQLPreCheckDetailRequest::setStatusCode(const std::string &statusCode) {
statusCode_ = statusCode;
setParameter(std::string("StatusCode"), statusCode);
}
long ListDataImportSQLPreCheckDetailRequest::getPageSize() const {
return pageSize_;
}
void ListDataImportSQLPreCheckDetailRequest::setPageSize(long pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListDataImportSQLPreCheckDetailRequest::getSqlType() const {
return sqlType_;
}
void ListDataImportSQLPreCheckDetailRequest::setSqlType(const std::string &sqlType) {
sqlType_ = sqlType;
setParameter(std::string("SqlType"), sqlType);
}
long ListDataImportSQLPreCheckDetailRequest::getOrderId() const {
return orderId_;
}
void ListDataImportSQLPreCheckDetailRequest::setOrderId(long orderId) {
orderId_ = orderId;
setParameter(std::string("OrderId"), std::to_string(orderId));
}

View File

@@ -0,0 +1,91 @@
/*
* 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/dms-enterprise/model/ListDataImportSQLPreCheckDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListDataImportSQLPreCheckDetailResult::ListDataImportSQLPreCheckDetailResult() :
ServiceResult()
{}
ListDataImportSQLPreCheckDetailResult::ListDataImportSQLPreCheckDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDataImportSQLPreCheckDetailResult::~ListDataImportSQLPreCheckDetailResult()
{}
void ListDataImportSQLPreCheckDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPreCheckSQLDetailListNode = value["PreCheckSQLDetailList"]["PreCheckSQLDetail"];
for (auto valuePreCheckSQLDetailListPreCheckSQLDetail : allPreCheckSQLDetailListNode)
{
PreCheckSQLDetail preCheckSQLDetailListObject;
if(!valuePreCheckSQLDetailListPreCheckSQLDetail["SqlId"].isNull())
preCheckSQLDetailListObject.sqlId = std::stol(valuePreCheckSQLDetailListPreCheckSQLDetail["SqlId"].asString());
if(!valuePreCheckSQLDetailListPreCheckSQLDetail["SqlType"].isNull())
preCheckSQLDetailListObject.sqlType = valuePreCheckSQLDetailListPreCheckSQLDetail["SqlType"].asString();
if(!valuePreCheckSQLDetailListPreCheckSQLDetail["StatusCode"].isNull())
preCheckSQLDetailListObject.statusCode = valuePreCheckSQLDetailListPreCheckSQLDetail["StatusCode"].asString();
if(!valuePreCheckSQLDetailListPreCheckSQLDetail["Skip"].isNull())
preCheckSQLDetailListObject.skip = valuePreCheckSQLDetailListPreCheckSQLDetail["Skip"].asString() == "true";
preCheckSQLDetailList_.push_back(preCheckSQLDetailListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListDataImportSQLPreCheckDetailResult::getTotalCount()const
{
return totalCount_;
}
std::vector<ListDataImportSQLPreCheckDetailResult::PreCheckSQLDetail> ListDataImportSQLPreCheckDetailResult::getPreCheckSQLDetailList()const
{
return preCheckSQLDetailList_;
}
std::string ListDataImportSQLPreCheckDetailResult::getErrorCode()const
{
return errorCode_;
}
std::string ListDataImportSQLPreCheckDetailResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListDataImportSQLPreCheckDetailResult::getSuccess()const
{
return success_;
}

View 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/dms-enterprise/model/ListDataImportSQLTypeRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListDataImportSQLTypeRequest;
ListDataImportSQLTypeRequest::ListDataImportSQLTypeRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ListDataImportSQLType") {
setMethod(HttpRequest::Method::Post);
}
ListDataImportSQLTypeRequest::~ListDataImportSQLTypeRequest() {}
long ListDataImportSQLTypeRequest::getTid() const {
return tid_;
}
void ListDataImportSQLTypeRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long ListDataImportSQLTypeRequest::getOrderId() const {
return orderId_;
}
void ListDataImportSQLTypeRequest::setOrderId(long orderId) {
orderId_ = orderId;
setParameter(std::string("OrderId"), std::to_string(orderId));
}

View File

@@ -0,0 +1,73 @@
/*
* 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/dms-enterprise/model/ListDataImportSQLTypeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListDataImportSQLTypeResult::ListDataImportSQLTypeResult() :
ServiceResult()
{}
ListDataImportSQLTypeResult::ListDataImportSQLTypeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDataImportSQLTypeResult::~ListDataImportSQLTypeResult()
{}
void ListDataImportSQLTypeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSqlTypeResult = value["SqlTypeResult"]["sqlTypes"];
for (const auto &item : allSqlTypeResult)
sqlTypeResult_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
}
std::vector<std::string> ListDataImportSQLTypeResult::getSqlTypeResult()const
{
return sqlTypeResult_;
}
std::string ListDataImportSQLTypeResult::getErrorCode()const
{
return errorCode_;
}
std::string ListDataImportSQLTypeResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListDataImportSQLTypeResult::getSuccess()const
{
return success_;
}

View File

@@ -65,6 +65,8 @@ void ListProxiesResult::parse(const std::string &payload)
proxyListObject.protocolType = valueProxyListProxyListItem["ProtocolType"].asString();
if(!valueProxyListProxyListItem["ProtocolPort"].isNull())
proxyListObject.protocolPort = std::stoi(valueProxyListProxyListItem["ProtocolPort"].asString());
if(!valueProxyListProxyListItem["RegionId"].isNull())
proxyListObject.regionId = valueProxyListProxyListItem["RegionId"].asString();
proxyList_.push_back(proxyListObject);
}
if(!value["Success"].isNull())

View 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/dms-enterprise/model/RevokeTemplateAuthorityRequest.h>
using AlibabaCloud::Dms_enterprise::Model::RevokeTemplateAuthorityRequest;
RevokeTemplateAuthorityRequest::RevokeTemplateAuthorityRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "RevokeTemplateAuthority") {
setMethod(HttpRequest::Method::Post);
}
RevokeTemplateAuthorityRequest::~RevokeTemplateAuthorityRequest() {}
long RevokeTemplateAuthorityRequest::getTid() const {
return tid_;
}
void RevokeTemplateAuthorityRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long RevokeTemplateAuthorityRequest::getTemplateId() const {
return templateId_;
}
void RevokeTemplateAuthorityRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}
std::string RevokeTemplateAuthorityRequest::getUserIds() const {
return userIds_;
}
void RevokeTemplateAuthorityRequest::setUserIds(const std::string &userIds) {
userIds_ = userIds;
setParameter(std::string("UserIds"), userIds);
}

View File

@@ -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 <alibabacloud/dms-enterprise/model/RevokeTemplateAuthorityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
RevokeTemplateAuthorityResult::RevokeTemplateAuthorityResult() :
ServiceResult()
{}
RevokeTemplateAuthorityResult::RevokeTemplateAuthorityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RevokeTemplateAuthorityResult::~RevokeTemplateAuthorityResult()
{}
void RevokeTemplateAuthorityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Result"].isNull())
result_ = value["Result"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string RevokeTemplateAuthorityResult::getErrorCode()const
{
return errorCode_;
}
std::string RevokeTemplateAuthorityResult::getErrorMessage()const
{
return errorMessage_;
}
bool RevokeTemplateAuthorityResult::getSuccess()const
{
return success_;
}
bool RevokeTemplateAuthorityResult::getResult()const
{
return result_;
}

View File

@@ -69,6 +69,8 @@ void SearchDatabaseResult::parse(const std::string &payload)
searchDatabaseListObject.searchName = valueSearchDatabaseListSearchDatabase["SearchName"].asString();
if(!valueSearchDatabaseListSearchDatabase["Alias"].isNull())
searchDatabaseListObject.alias = valueSearchDatabaseListSearchDatabase["Alias"].asString();
if(!valueSearchDatabaseListSearchDatabase["CatalogName"].isNull())
searchDatabaseListObject.catalogName = valueSearchDatabaseListSearchDatabase["CatalogName"].asString();
auto allOwnerIdList = value["OwnerIdList"]["OwnerIds"];
for (auto value : allOwnerIdList)
searchDatabaseListObject.ownerIdList.push_back(value.asString());

View File

@@ -0,0 +1,63 @@
/*
* 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/dms-enterprise/model/UpdateAuthorityTemplateRequest.h>
using AlibabaCloud::Dms_enterprise::Model::UpdateAuthorityTemplateRequest;
UpdateAuthorityTemplateRequest::UpdateAuthorityTemplateRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "UpdateAuthorityTemplate") {
setMethod(HttpRequest::Method::Post);
}
UpdateAuthorityTemplateRequest::~UpdateAuthorityTemplateRequest() {}
std::string UpdateAuthorityTemplateRequest::getDescription() const {
return description_;
}
void UpdateAuthorityTemplateRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
long UpdateAuthorityTemplateRequest::getTid() const {
return tid_;
}
void UpdateAuthorityTemplateRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long UpdateAuthorityTemplateRequest::getTemplateId() const {
return templateId_;
}
void UpdateAuthorityTemplateRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}
std::string UpdateAuthorityTemplateRequest::getName() const {
return name_;
}
void UpdateAuthorityTemplateRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}

View File

@@ -0,0 +1,79 @@
/*
* 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/dms-enterprise/model/UpdateAuthorityTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
UpdateAuthorityTemplateResult::UpdateAuthorityTemplateResult() :
ServiceResult()
{}
UpdateAuthorityTemplateResult::UpdateAuthorityTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateAuthorityTemplateResult::~UpdateAuthorityTemplateResult()
{}
void UpdateAuthorityTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto authorityTemplateViewNode = value["AuthorityTemplateView"];
if(!authorityTemplateViewNode["TemplateId"].isNull())
authorityTemplateView_.templateId = std::stol(authorityTemplateViewNode["TemplateId"].asString());
if(!authorityTemplateViewNode["CreatorId"].isNull())
authorityTemplateView_.creatorId = std::stol(authorityTemplateViewNode["CreatorId"].asString());
if(!authorityTemplateViewNode["Name"].isNull())
authorityTemplateView_.name = authorityTemplateViewNode["Name"].asString();
if(!authorityTemplateViewNode["Description"].isNull())
authorityTemplateView_.description = authorityTemplateViewNode["Description"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string UpdateAuthorityTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string UpdateAuthorityTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool UpdateAuthorityTemplateResult::getSuccess()const
{
return success_;
}
UpdateAuthorityTemplateResult::AuthorityTemplateView UpdateAuthorityTemplateResult::getAuthorityTemplateView()const
{
return authorityTemplateView_;
}