Support CreateProcCorrectAPI.

This commit is contained in:
sdk-team
2023-09-20 09:22:38 +00:00
parent 5550c66a4c
commit 71e4c1576e
24 changed files with 1249 additions and 1 deletions

View File

@@ -375,6 +375,42 @@ Dms_enterpriseClient::ChangeColumnSecLevelOutcomeCallable Dms_enterpriseClient::
return task->get_future();
}
Dms_enterpriseClient::ChangeColumnSecurityLevelOutcome Dms_enterpriseClient::changeColumnSecurityLevel(const ChangeColumnSecurityLevelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ChangeColumnSecurityLevelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ChangeColumnSecurityLevelOutcome(ChangeColumnSecurityLevelResult(outcome.result()));
else
return ChangeColumnSecurityLevelOutcome(outcome.error());
}
void Dms_enterpriseClient::changeColumnSecurityLevelAsync(const ChangeColumnSecurityLevelRequest& request, const ChangeColumnSecurityLevelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, changeColumnSecurityLevel(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ChangeColumnSecurityLevelOutcomeCallable Dms_enterpriseClient::changeColumnSecurityLevelCallable(const ChangeColumnSecurityLevelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ChangeColumnSecurityLevelOutcome()>>(
[this, request]()
{
return this->changeColumnSecurityLevel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ChangeLhDagOwnerOutcome Dms_enterpriseClient::changeLhDagOwner(const ChangeLhDagOwnerRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -879,6 +915,42 @@ Dms_enterpriseClient::CreateOrderOutcomeCallable Dms_enterpriseClient::createOrd
return task->get_future();
}
Dms_enterpriseClient::CreateProcCorrectOrderOutcome Dms_enterpriseClient::createProcCorrectOrder(const CreateProcCorrectOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateProcCorrectOrderOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateProcCorrectOrderOutcome(CreateProcCorrectOrderResult(outcome.result()));
else
return CreateProcCorrectOrderOutcome(outcome.error());
}
void Dms_enterpriseClient::createProcCorrectOrderAsync(const CreateProcCorrectOrderRequest& request, const CreateProcCorrectOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createProcCorrectOrder(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::CreateProcCorrectOrderOutcomeCallable Dms_enterpriseClient::createProcCorrectOrderCallable(const CreateProcCorrectOrderRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateProcCorrectOrderOutcome()>>(
[this, request]()
{
return this->createProcCorrectOrder(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::CreateProxyOutcome Dms_enterpriseClient::createProxy(const CreateProxyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2103,6 +2175,42 @@ Dms_enterpriseClient::GetAuthorityTemplateItemOutcomeCallable Dms_enterpriseClie
return task->get_future();
}
Dms_enterpriseClient::GetClassificationTemplateOutcome Dms_enterpriseClient::getClassificationTemplate(const GetClassificationTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetClassificationTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetClassificationTemplateOutcome(GetClassificationTemplateResult(outcome.result()));
else
return GetClassificationTemplateOutcome(outcome.error());
}
void Dms_enterpriseClient::getClassificationTemplateAsync(const GetClassificationTemplateRequest& request, const GetClassificationTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getClassificationTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetClassificationTemplateOutcomeCallable Dms_enterpriseClient::getClassificationTemplateCallable(const GetClassificationTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetClassificationTemplateOutcome()>>(
[this, request]()
{
return this->getClassificationTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetDBTaskSQLJobLogOutcome Dms_enterpriseClient::getDBTaskSQLJobLog(const GetDBTaskSQLJobLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5271,6 +5379,42 @@ Dms_enterpriseClient::ListSensitiveDataAuditLogOutcomeCallable Dms_enterpriseCli
return task->get_future();
}
Dms_enterpriseClient::ListSensitivityLevelOutcome Dms_enterpriseClient::listSensitivityLevel(const ListSensitivityLevelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSensitivityLevelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSensitivityLevelOutcome(ListSensitivityLevelResult(outcome.result()));
else
return ListSensitivityLevelOutcome(outcome.error());
}
void Dms_enterpriseClient::listSensitivityLevelAsync(const ListSensitivityLevelRequest& request, const ListSensitivityLevelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSensitivityLevel(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListSensitivityLevelOutcomeCallable Dms_enterpriseClient::listSensitivityLevelCallable(const ListSensitivityLevelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSensitivityLevelOutcome()>>(
[this, request]()
{
return this->listSensitivityLevel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListStandardGroupsOutcome Dms_enterpriseClient::listStandardGroups(const ListStandardGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,90 @@
/*
* 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/ChangeColumnSecurityLevelRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ChangeColumnSecurityLevelRequest;
ChangeColumnSecurityLevelRequest::ChangeColumnSecurityLevelRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ChangeColumnSecurityLevel") {
setMethod(HttpRequest::Method::Post);
}
ChangeColumnSecurityLevelRequest::~ChangeColumnSecurityLevelRequest() {}
std::string ChangeColumnSecurityLevelRequest::getNewSensitivityLevel() const {
return newSensitivityLevel_;
}
void ChangeColumnSecurityLevelRequest::setNewSensitivityLevel(const std::string &newSensitivityLevel) {
newSensitivityLevel_ = newSensitivityLevel;
setParameter(std::string("NewSensitivityLevel"), newSensitivityLevel);
}
long ChangeColumnSecurityLevelRequest::getTid() const {
return tid_;
}
void ChangeColumnSecurityLevelRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
std::string ChangeColumnSecurityLevelRequest::getTableName() const {
return tableName_;
}
void ChangeColumnSecurityLevelRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}
std::string ChangeColumnSecurityLevelRequest::getSchemaName() const {
return schemaName_;
}
void ChangeColumnSecurityLevelRequest::setSchemaName(const std::string &schemaName) {
schemaName_ = schemaName;
setParameter(std::string("SchemaName"), schemaName);
}
bool ChangeColumnSecurityLevelRequest::getIsLogic() const {
return isLogic_;
}
void ChangeColumnSecurityLevelRequest::setIsLogic(bool isLogic) {
isLogic_ = isLogic;
setParameter(std::string("IsLogic"), isLogic ? "true" : "false");
}
std::string ChangeColumnSecurityLevelRequest::getColumnName() const {
return columnName_;
}
void ChangeColumnSecurityLevelRequest::setColumnName(const std::string &columnName) {
columnName_ = columnName;
setParameter(std::string("ColumnName"), columnName);
}
long ChangeColumnSecurityLevelRequest::getDbId() const {
return dbId_;
}
void ChangeColumnSecurityLevelRequest::setDbId(long dbId) {
dbId_ = dbId;
setParameter(std::string("DbId"), std::to_string(dbId));
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dms-enterprise/model/ChangeColumnSecurityLevelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ChangeColumnSecurityLevelResult::ChangeColumnSecurityLevelResult() :
ServiceResult()
{}
ChangeColumnSecurityLevelResult::ChangeColumnSecurityLevelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ChangeColumnSecurityLevelResult::~ChangeColumnSecurityLevelResult()
{}
void ChangeColumnSecurityLevelResult::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["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string ChangeColumnSecurityLevelResult::getErrorCode()const
{
return errorCode_;
}
std::string ChangeColumnSecurityLevelResult::getErrorMessage()const
{
return errorMessage_;
}
bool ChangeColumnSecurityLevelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/CreateProcCorrectOrderRequest.h>
using AlibabaCloud::Dms_enterprise::Model::CreateProcCorrectOrderRequest;
CreateProcCorrectOrderRequest::CreateProcCorrectOrderRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "CreateProcCorrectOrder") {
setMethod(HttpRequest::Method::Post);
}
CreateProcCorrectOrderRequest::~CreateProcCorrectOrderRequest() {}
long CreateProcCorrectOrderRequest::getTid() const {
return tid_;
}
void CreateProcCorrectOrderRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
CreateProcCorrectOrderRequest::Param CreateProcCorrectOrderRequest::getParam() const {
return param_;
}
void CreateProcCorrectOrderRequest::setParam(const CreateProcCorrectOrderRequest::Param &param) {
param_ = param;
setParameter(std::string("Param") + ".Classify", param.classify);
setParameter(std::string("Param") + ".RollbackSQL", param.rollbackSQL);
setParameter(std::string("Param") + ".RollbackSqlType", param.rollbackSqlType);
for(int dep1 = 0; dep1 != param.dbItemList.size(); dep1++) {
setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".DbId", std::to_string(param.dbItemList[dep1].dbId));
setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".Logic", param.dbItemList[dep1].logic ? "true" : "false");
}
setParameter(std::string("Param") + ".ExecSQL", param.execSQL);
setParameter(std::string("Param") + ".RollbackAttachmentName", param.rollbackAttachmentName);
}
std::vector<CreateProcCorrectOrderRequest::long> CreateProcCorrectOrderRequest::getRelatedUserList() const {
return relatedUserList_;
}
void CreateProcCorrectOrderRequest::setRelatedUserList(const std::vector<CreateProcCorrectOrderRequest::long> &relatedUserList) {
relatedUserList_ = relatedUserList;
for(int dep1 = 0; dep1 != relatedUserList.size(); dep1++) {
setParameter(std::string("RelatedUserList") + "." + std::to_string(dep1 + 1), std::to_string(relatedUserList[dep1]));
}
}
std::string CreateProcCorrectOrderRequest::getAttachmentKey() const {
return attachmentKey_;
}
void CreateProcCorrectOrderRequest::setAttachmentKey(const std::string &attachmentKey) {
attachmentKey_ = attachmentKey;
setParameter(std::string("AttachmentKey"), attachmentKey);
}
std::string CreateProcCorrectOrderRequest::getComment() const {
return comment_;
}
void CreateProcCorrectOrderRequest::setComment(const std::string &comment) {
comment_ = comment;
setParameter(std::string("Comment"), comment);
}

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/CreateProcCorrectOrderResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
CreateProcCorrectOrderResult::CreateProcCorrectOrderResult() :
ServiceResult()
{}
CreateProcCorrectOrderResult::CreateProcCorrectOrderResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateProcCorrectOrderResult::~CreateProcCorrectOrderResult()
{}
void CreateProcCorrectOrderResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCreateOrderResult = value["CreateOrderResult"]["OrderIds"];
for (const auto &item : allCreateOrderResult)
createOrderResult_.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> CreateProcCorrectOrderResult::getCreateOrderResult()const
{
return createOrderResult_;
}
std::string CreateProcCorrectOrderResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateProcCorrectOrderResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateProcCorrectOrderResult::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/GetClassificationTemplateRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetClassificationTemplateRequest;
GetClassificationTemplateRequest::GetClassificationTemplateRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetClassificationTemplate") {
setMethod(HttpRequest::Method::Post);
}
GetClassificationTemplateRequest::~GetClassificationTemplateRequest() {}
long GetClassificationTemplateRequest::getTid() const {
return tid_;
}
void GetClassificationTemplateRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
long GetClassificationTemplateRequest::getInstanceId() const {
return instanceId_;
}
void GetClassificationTemplateRequest::setInstanceId(long instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), std::to_string(instanceId));
}

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/GetClassificationTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetClassificationTemplateResult::GetClassificationTemplateResult() :
ServiceResult()
{}
GetClassificationTemplateResult::GetClassificationTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetClassificationTemplateResult::~GetClassificationTemplateResult()
{}
void GetClassificationTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto classificationResourceTemplateMapNode = value["ClassificationResourceTemplateMap"];
if(!classificationResourceTemplateMapNode["TemplateId"].isNull())
classificationResourceTemplateMap_.templateId = std::stol(classificationResourceTemplateMapNode["TemplateId"].asString());
if(!classificationResourceTemplateMapNode["TemplateType"].isNull())
classificationResourceTemplateMap_.templateType = classificationResourceTemplateMapNode["TemplateType"].asString();
if(!classificationResourceTemplateMapNode["ResourceId"].isNull())
classificationResourceTemplateMap_.resourceId = std::stol(classificationResourceTemplateMapNode["ResourceId"].asString());
if(!classificationResourceTemplateMapNode["ResourceType"].isNull())
classificationResourceTemplateMap_.resourceType = classificationResourceTemplateMapNode["ResourceType"].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";
}
GetClassificationTemplateResult::ClassificationResourceTemplateMap GetClassificationTemplateResult::getClassificationResourceTemplateMap()const
{
return classificationResourceTemplateMap_;
}
std::string GetClassificationTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string GetClassificationTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetClassificationTemplateResult::getSuccess()const
{
return success_;
}

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/ListSensitivityLevelRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListSensitivityLevelRequest;
ListSensitivityLevelRequest::ListSensitivityLevelRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ListSensitivityLevel") {
setMethod(HttpRequest::Method::Get);
}
ListSensitivityLevelRequest::~ListSensitivityLevelRequest() {}
long ListSensitivityLevelRequest::getTid() const {
return tid_;
}
void ListSensitivityLevelRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
std::string ListSensitivityLevelRequest::getTemplateType() const {
return templateType_;
}
void ListSensitivityLevelRequest::setTemplateType(const std::string &templateType) {
templateType_ = templateType;
setParameter(std::string("TemplateType"), templateType);
}
long ListSensitivityLevelRequest::getTemplateId() const {
return templateId_;
}
void ListSensitivityLevelRequest::setTemplateId(long templateId) {
templateId_ = templateId;
setParameter(std::string("TemplateId"), std::to_string(templateId));
}

View File

@@ -0,0 +1,84 @@
/*
* 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/ListSensitivityLevelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListSensitivityLevelResult::ListSensitivityLevelResult() :
ServiceResult()
{}
ListSensitivityLevelResult::ListSensitivityLevelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSensitivityLevelResult::~ListSensitivityLevelResult()
{}
void ListSensitivityLevelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSensitivityLevelListNode = value["SensitivityLevelList"]["SensitivityLevelListItem"];
for (auto valueSensitivityLevelListSensitivityLevelListItem : allSensitivityLevelListNode)
{
SensitivityLevelListItem sensitivityLevelListObject;
if(!valueSensitivityLevelListSensitivityLevelListItem["Name"].isNull())
sensitivityLevelListObject.name = valueSensitivityLevelListSensitivityLevelListItem["Name"].asString();
if(!valueSensitivityLevelListSensitivityLevelListItem["TemplateId"].isNull())
sensitivityLevelListObject.templateId = valueSensitivityLevelListSensitivityLevelListItem["TemplateId"].asString();
if(!valueSensitivityLevelListSensitivityLevelListItem["TemplateType"].isNull())
sensitivityLevelListObject.templateType = valueSensitivityLevelListSensitivityLevelListItem["TemplateType"].asString();
if(!valueSensitivityLevelListSensitivityLevelListItem["IsPlain"].isNull())
sensitivityLevelListObject.isPlain = valueSensitivityLevelListSensitivityLevelListItem["IsPlain"].asString() == "true";
sensitivityLevelList_.push_back(sensitivityLevelListObject);
}
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<ListSensitivityLevelResult::SensitivityLevelListItem> ListSensitivityLevelResult::getSensitivityLevelList()const
{
return sensitivityLevelList_;
}
std::string ListSensitivityLevelResult::getErrorCode()const
{
return errorCode_;
}
std::string ListSensitivityLevelResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListSensitivityLevelResult::getSuccess()const
{
return success_;
}

View File

@@ -43,6 +43,15 @@ void ModifyDesensitizationStrategyRequest::setTid(long tid) {
setParameter(std::string("Tid"), std::to_string(tid));
}
bool ModifyDesensitizationStrategyRequest::getIsDefault() const {
return isDefault_;
}
void ModifyDesensitizationStrategyRequest::setIsDefault(bool isDefault) {
isDefault_ = isDefault;
setParameter(std::string("IsDefault"), isDefault ? "true" : "false");
}
std::string ModifyDesensitizationStrategyRequest::getTableName() const {
return tableName_;
}

View File

@@ -43,3 +43,12 @@ void RefundPayAsYouGoOrderRequest::setOrderId(const std::string &orderId) {
setParameter(std::string("OrderId"), orderId);
}
std::string RefundPayAsYouGoOrderRequest::getInstanceId() const {
return instanceId_;
}
void RefundPayAsYouGoOrderRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}