Supported DescribeMaskingRules.

This commit is contained in:
sdk-team
2021-07-29 08:42:01 +00:00
parent d10310dfdf
commit 59cfd7acc2
24 changed files with 889 additions and 35 deletions

View File

@@ -879,6 +879,42 @@ PolardbClient::DeleteGlobalDatabaseNetworkOutcomeCallable PolardbClient::deleteG
return task->get_future();
}
PolardbClient::DeleteMaskingRulesOutcome PolardbClient::deleteMaskingRules(const DeleteMaskingRulesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteMaskingRulesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteMaskingRulesOutcome(DeleteMaskingRulesResult(outcome.result()));
else
return DeleteMaskingRulesOutcome(outcome.error());
}
void PolardbClient::deleteMaskingRulesAsync(const DeleteMaskingRulesRequest& request, const DeleteMaskingRulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteMaskingRules(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DeleteMaskingRulesOutcomeCallable PolardbClient::deleteMaskingRulesCallable(const DeleteMaskingRulesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteMaskingRulesOutcome()>>(
[this, request]()
{
return this->deleteMaskingRules(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DeleteParameterGroupOutcome PolardbClient::deleteParameterGroup(const DeleteParameterGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1959,6 +1995,42 @@ PolardbClient::DescribeLogBackupPolicyOutcomeCallable PolardbClient::describeLog
return task->get_future();
}
PolardbClient::DescribeMaskingRulesOutcome PolardbClient::describeMaskingRules(const DescribeMaskingRulesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeMaskingRulesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeMaskingRulesOutcome(DescribeMaskingRulesResult(outcome.result()));
else
return DescribeMaskingRulesOutcome(outcome.error());
}
void PolardbClient::describeMaskingRulesAsync(const DescribeMaskingRulesRequest& request, const DescribeMaskingRulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeMaskingRules(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeMaskingRulesOutcomeCallable PolardbClient::describeMaskingRulesCallable(const DescribeMaskingRulesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeMaskingRulesOutcome()>>(
[this, request]()
{
return this->describeMaskingRules(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeMetaListOutcome PolardbClient::describeMetaList(const DescribeMetaListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3183,6 +3255,42 @@ PolardbClient::ModifyLogBackupPolicyOutcomeCallable PolardbClient::modifyLogBack
return task->get_future();
}
PolardbClient::ModifyMaskingRulesOutcome PolardbClient::modifyMaskingRules(const ModifyMaskingRulesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyMaskingRulesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyMaskingRulesOutcome(ModifyMaskingRulesResult(outcome.result()));
else
return ModifyMaskingRulesOutcome(outcome.error());
}
void PolardbClient::modifyMaskingRulesAsync(const ModifyMaskingRulesRequest& request, const ModifyMaskingRulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyMaskingRules(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::ModifyMaskingRulesOutcomeCallable PolardbClient::modifyMaskingRulesCallable(const ModifyMaskingRulesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyMaskingRulesOutcome()>>(
[this, request]()
{
return this->modifyMaskingRules(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::ModifyPendingMaintenanceActionOutcome PolardbClient::modifyPendingMaintenanceAction(const ModifyPendingMaintenanceActionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -39,6 +39,13 @@ void CreateParameterGroupResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ParameterGroupId"].isNull())
parameterGroupId_ = value["ParameterGroupId"].asString();
}
std::string CreateParameterGroupResult::getParameterGroupId()const
{
return parameterGroupId_;
}

View File

@@ -0,0 +1,51 @@
/*
* 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/polardb/model/DeleteMaskingRulesRequest.h>
using AlibabaCloud::Polardb::Model::DeleteMaskingRulesRequest;
DeleteMaskingRulesRequest::DeleteMaskingRulesRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DeleteMaskingRules")
{
setMethod(HttpRequest::Method::Post);
}
DeleteMaskingRulesRequest::~DeleteMaskingRulesRequest()
{}
std::string DeleteMaskingRulesRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DeleteMaskingRulesRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DeleteMaskingRulesRequest::getRuleNameList()const
{
return ruleNameList_;
}
void DeleteMaskingRulesRequest::setRuleNameList(const std::string& ruleNameList)
{
ruleNameList_ = ruleNameList;
setParameter("RuleNameList", ruleNameList);
}

View File

@@ -0,0 +1,58 @@
/*
* 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/polardb/model/DeleteMaskingRulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DeleteMaskingRulesResult::DeleteMaskingRulesResult() :
ServiceResult()
{}
DeleteMaskingRulesResult::DeleteMaskingRulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteMaskingRulesResult::~DeleteMaskingRulesResult()
{}
void DeleteMaskingRulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteMaskingRulesResult::getMessage()const
{
return message_;
}
bool DeleteMaskingRulesResult::getSuccess()const
{
return success_;
}

View File

@@ -43,10 +43,10 @@ void DescribeDBClusterAvailableResourcesResult::parse(const std::string &payload
for (auto valueAvailableZonesAvailableZone : allAvailableZonesNode)
{
AvailableZone availableZonesObject;
if(!valueAvailableZonesAvailableZone["RegionId"].isNull())
availableZonesObject.regionId = valueAvailableZonesAvailableZone["RegionId"].asString();
if(!valueAvailableZonesAvailableZone["ZoneId"].isNull())
availableZonesObject.zoneId = valueAvailableZonesAvailableZone["ZoneId"].asString();
if(!valueAvailableZonesAvailableZone["RegionId"].isNull())
availableZonesObject.regionId = valueAvailableZonesAvailableZone["RegionId"].asString();
auto allSupportedEnginesNode = valueAvailableZonesAvailableZone["SupportedEngines"]["SupportedEngine"];
for (auto valueAvailableZonesAvailableZoneSupportedEnginesSupportedEngine : allSupportedEnginesNode)
{

View File

@@ -0,0 +1,51 @@
/*
* 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/polardb/model/DescribeMaskingRulesRequest.h>
using AlibabaCloud::Polardb::Model::DescribeMaskingRulesRequest;
DescribeMaskingRulesRequest::DescribeMaskingRulesRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeMaskingRules")
{
setMethod(HttpRequest::Method::Post);
}
DescribeMaskingRulesRequest::~DescribeMaskingRulesRequest()
{}
std::string DescribeMaskingRulesRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeMaskingRulesRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeMaskingRulesRequest::getRuleNameList()const
{
return ruleNameList_;
}
void DescribeMaskingRulesRequest::setRuleNameList(const std::string& ruleNameList)
{
ruleNameList_ = ruleNameList;
setParameter("RuleNameList", ruleNameList);
}

View File

@@ -0,0 +1,67 @@
/*
* 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/polardb/model/DescribeMaskingRulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeMaskingRulesResult::DescribeMaskingRulesResult() :
ServiceResult()
{}
DescribeMaskingRulesResult::DescribeMaskingRulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeMaskingRulesResult::~DescribeMaskingRulesResult()
{}
void DescribeMaskingRulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allRuleList = dataNode["RuleList"]["RuleList"];
for (auto value : allRuleList)
data_.ruleList.push_back(value.asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DescribeMaskingRulesResult::getMessage()const
{
return message_;
}
DescribeMaskingRulesResult::Data DescribeMaskingRulesResult::getData()const
{
return data_;
}
bool DescribeMaskingRulesResult::getSuccess()const
{
return success_;
}

View File

@@ -43,24 +43,24 @@ void DescribeParameterGroupsResult::parse(const std::string &payload)
for (auto valueParameterGroupsParameterGroupsItem : allParameterGroupsNode)
{
ParameterGroupsItem parameterGroupsObject;
if(!valueParameterGroupsParameterGroupsItem["DBType"].isNull())
parameterGroupsObject.dBType = valueParameterGroupsParameterGroupsItem["DBType"].asString();
if(!valueParameterGroupsParameterGroupsItem["DBVersion"].isNull())
parameterGroupsObject.dBVersion = valueParameterGroupsParameterGroupsItem["DBVersion"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupId"].isNull())
parameterGroupsObject.parameterGroupId = valueParameterGroupsParameterGroupsItem["ParameterGroupId"].asString();
if(!valueParameterGroupsParameterGroupsItem["ForceRestart"].isNull())
parameterGroupsObject.forceRestart = valueParameterGroupsParameterGroupsItem["ForceRestart"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupName"].isNull())
parameterGroupsObject.parameterGroupName = valueParameterGroupsParameterGroupsItem["ParameterGroupName"].asString();
if(!valueParameterGroupsParameterGroupsItem["CreateTime"].isNull())
parameterGroupsObject.createTime = valueParameterGroupsParameterGroupsItem["CreateTime"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupDesc"].isNull())
parameterGroupsObject.parameterGroupDesc = valueParameterGroupsParameterGroupsItem["ParameterGroupDesc"].asString();
if(!valueParameterGroupsParameterGroupsItem["ForceRestart"].isNull())
parameterGroupsObject.forceRestart = valueParameterGroupsParameterGroupsItem["ForceRestart"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupType"].isNull())
parameterGroupsObject.parameterGroupType = valueParameterGroupsParameterGroupsItem["ParameterGroupType"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterCounts"].isNull())
parameterGroupsObject.parameterCounts = std::stol(valueParameterGroupsParameterGroupsItem["ParameterCounts"].asString());
if(!valueParameterGroupsParameterGroupsItem["DBType"].isNull())
parameterGroupsObject.dBType = valueParameterGroupsParameterGroupsItem["DBType"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupDesc"].isNull())
parameterGroupsObject.parameterGroupDesc = valueParameterGroupsParameterGroupsItem["ParameterGroupDesc"].asString();
if(!valueParameterGroupsParameterGroupsItem["CreateTime"].isNull())
parameterGroupsObject.createTime = valueParameterGroupsParameterGroupsItem["CreateTime"].asString();
if(!valueParameterGroupsParameterGroupsItem["ParameterGroupId"].isNull())
parameterGroupsObject.parameterGroupId = valueParameterGroupsParameterGroupsItem["ParameterGroupId"].asString();
parameterGroups_.push_back(parameterGroupsObject);
}

View File

@@ -43,34 +43,34 @@ void DescribePendingMaintenanceActionResult::parse(const std::string &payload)
for (auto valueItemsItemsItem : allItemsNode)
{
ItemsItem itemsObject;
if(!valueItemsItemsItem["Id"].isNull())
itemsObject.id = std::stoi(valueItemsItemsItem["Id"].asString());
if(!valueItemsItemsItem["DBClusterId"].isNull())
itemsObject.dBClusterId = valueItemsItemsItem["DBClusterId"].asString();
if(!valueItemsItemsItem["DBType"].isNull())
itemsObject.dBType = valueItemsItemsItem["DBType"].asString();
if(!valueItemsItemsItem["StartTime"].isNull())
itemsObject.startTime = valueItemsItemsItem["StartTime"].asString();
if(!valueItemsItemsItem["SwitchTime"].isNull())
itemsObject.switchTime = valueItemsItemsItem["SwitchTime"].asString();
if(!valueItemsItemsItem["Deadline"].isNull())
itemsObject.deadline = valueItemsItemsItem["Deadline"].asString();
if(!valueItemsItemsItem["Status"].isNull())
itemsObject.status = std::stoi(valueItemsItemsItem["Status"].asString());
if(!valueItemsItemsItem["CreatedTime"].isNull())
itemsObject.createdTime = valueItemsItemsItem["CreatedTime"].asString();
if(!valueItemsItemsItem["ModifiedTime"].isNull())
itemsObject.modifiedTime = valueItemsItemsItem["ModifiedTime"].asString();
if(!valueItemsItemsItem["ResultInfo"].isNull())
itemsObject.resultInfo = valueItemsItemsItem["ResultInfo"].asString();
if(!valueItemsItemsItem["PrepareInterval"].isNull())
itemsObject.prepareInterval = valueItemsItemsItem["PrepareInterval"].asString();
if(!valueItemsItemsItem["Deadline"].isNull())
itemsObject.deadline = valueItemsItemsItem["Deadline"].asString();
if(!valueItemsItemsItem["DBType"].isNull())
itemsObject.dBType = valueItemsItemsItem["DBType"].asString();
if(!valueItemsItemsItem["TaskType"].isNull())
itemsObject.taskType = valueItemsItemsItem["TaskType"].asString();
if(!valueItemsItemsItem["StartTime"].isNull())
itemsObject.startTime = valueItemsItemsItem["StartTime"].asString();
if(!valueItemsItemsItem["DBVersion"].isNull())
itemsObject.dBVersion = valueItemsItemsItem["DBVersion"].asString();
if(!valueItemsItemsItem["ModifiedTime"].isNull())
itemsObject.modifiedTime = valueItemsItemsItem["ModifiedTime"].asString();
if(!valueItemsItemsItem["DBClusterId"].isNull())
itemsObject.dBClusterId = valueItemsItemsItem["DBClusterId"].asString();
if(!valueItemsItemsItem["Region"].isNull())
itemsObject.region = valueItemsItemsItem["Region"].asString();
if(!valueItemsItemsItem["ResultInfo"].isNull())
itemsObject.resultInfo = valueItemsItemsItem["ResultInfo"].asString();
if(!valueItemsItemsItem["CreatedTime"].isNull())
itemsObject.createdTime = valueItemsItemsItem["CreatedTime"].asString();
if(!valueItemsItemsItem["Id"].isNull())
itemsObject.id = std::stoi(valueItemsItemsItem["Id"].asString());
if(!valueItemsItemsItem["SwitchTime"].isNull())
itemsObject.switchTime = valueItemsItemsItem["SwitchTime"].asString();
items_.push_back(itemsObject);
}
if(!value["TotalRecordCount"].isNull())

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/polardb/model/ModifyMaskingRulesRequest.h>
using AlibabaCloud::Polardb::Model::ModifyMaskingRulesRequest;
ModifyMaskingRulesRequest::ModifyMaskingRulesRequest() :
RpcServiceRequest("polardb", "2017-08-01", "ModifyMaskingRules")
{
setMethod(HttpRequest::Method::Post);
}
ModifyMaskingRulesRequest::~ModifyMaskingRulesRequest()
{}
std::string ModifyMaskingRulesRequest::getDBClusterId()const
{
return dBClusterId_;
}
void ModifyMaskingRulesRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string ModifyMaskingRulesRequest::getRuleName()const
{
return ruleName_;
}
void ModifyMaskingRulesRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}
std::string ModifyMaskingRulesRequest::getRuleConfig()const
{
return ruleConfig_;
}
void ModifyMaskingRulesRequest::setRuleConfig(const std::string& ruleConfig)
{
ruleConfig_ = ruleConfig;
setParameter("RuleConfig", ruleConfig);
}
std::string ModifyMaskingRulesRequest::getEnable()const
{
return enable_;
}
void ModifyMaskingRulesRequest::setEnable(const std::string& enable)
{
enable_ = enable;
setParameter("Enable", enable);
}
std::string ModifyMaskingRulesRequest::getRuleNameList()const
{
return ruleNameList_;
}
void ModifyMaskingRulesRequest::setRuleNameList(const std::string& ruleNameList)
{
ruleNameList_ = ruleNameList;
setParameter("RuleNameList", ruleNameList);
}

View File

@@ -0,0 +1,58 @@
/*
* 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/polardb/model/ModifyMaskingRulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
ModifyMaskingRulesResult::ModifyMaskingRulesResult() :
ServiceResult()
{}
ModifyMaskingRulesResult::ModifyMaskingRulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyMaskingRulesResult::~ModifyMaskingRulesResult()
{}
void ModifyMaskingRulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string ModifyMaskingRulesResult::getMessage()const
{
return message_;
}
bool ModifyMaskingRulesResult::getSuccess()const
{
return success_;
}