Update some parameters.

This commit is contained in:
sdk-team
2023-05-12 03:22:08 +00:00
parent 188d8467c7
commit 4ec6eb47bf
20 changed files with 430 additions and 1 deletions

View File

@@ -4371,6 +4371,42 @@ PolardbClient::ResetAccountOutcomeCallable PolardbClient::resetAccountCallable(c
return task->get_future();
}
PolardbClient::ResetGlobalDatabaseNetworkOutcome PolardbClient::resetGlobalDatabaseNetwork(const ResetGlobalDatabaseNetworkRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ResetGlobalDatabaseNetworkOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ResetGlobalDatabaseNetworkOutcome(ResetGlobalDatabaseNetworkResult(outcome.result()));
else
return ResetGlobalDatabaseNetworkOutcome(outcome.error());
}
void PolardbClient::resetGlobalDatabaseNetworkAsync(const ResetGlobalDatabaseNetworkRequest& request, const ResetGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, resetGlobalDatabaseNetwork(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::ResetGlobalDatabaseNetworkOutcomeCallable PolardbClient::resetGlobalDatabaseNetworkCallable(const ResetGlobalDatabaseNetworkRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ResetGlobalDatabaseNetworkOutcome()>>(
[this, request]()
{
return this->resetGlobalDatabaseNetwork(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::RestartDBNodeOutcome PolardbClient::restartDBNode(const RestartDBNodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -264,6 +264,15 @@ void CreateDBClusterRequest::setScaleRoNumMax(const std::string &scaleRoNumMax)
setParameter(std::string("ScaleRoNumMax"), scaleRoNumMax);
}
std::string CreateDBClusterRequest::getStandbyAZ() const {
return standbyAZ_;
}
void CreateDBClusterRequest::setStandbyAZ(const std::string &standbyAZ) {
standbyAZ_ = standbyAZ;
setParameter(std::string("StandbyAZ"), standbyAZ);
}
std::string CreateDBClusterRequest::getClientToken() const {
return clientToken_;
}
@@ -408,6 +417,15 @@ void CreateDBClusterRequest::setDBVersion(const std::string &dBVersion) {
setParameter(std::string("DBVersion"), dBVersion);
}
std::string CreateDBClusterRequest::getStrictConsistency() const {
return strictConsistency_;
}
void CreateDBClusterRequest::setStrictConsistency(const std::string &strictConsistency) {
strictConsistency_ = strictConsistency;
setParameter(std::string("StrictConsistency"), strictConsistency);
}
std::string CreateDBClusterRequest::getCloneDataPoint() const {
return cloneDataPoint_;
}

View File

@@ -43,6 +43,29 @@ void CreateDBEndpointAddressRequest::setConnectionStringPrefix(const std::string
setParameter(std::string("ConnectionStringPrefix"), connectionStringPrefix);
}
std::vector<CreateDBEndpointAddressRequest::ZoneInfo> CreateDBEndpointAddressRequest::getZoneInfo() const {
return zoneInfo_;
}
void CreateDBEndpointAddressRequest::setZoneInfo(const std::vector<CreateDBEndpointAddressRequest::ZoneInfo> &zoneInfo) {
zoneInfo_ = zoneInfo;
for(int dep1 = 0; dep1 != zoneInfo.size(); dep1++) {
auto zoneInfoObj = zoneInfo.at(dep1);
std::string zoneInfoObjStr = std::string("ZoneInfo") + "." + std::to_string(dep1 + 1);
setParameter(zoneInfoObjStr + ".VSwitchId", zoneInfoObj.vSwitchId);
setParameter(zoneInfoObjStr + ".ZoneId", zoneInfoObj.zoneId);
}
}
std::string CreateDBEndpointAddressRequest::getSecurityGroupId() const {
return securityGroupId_;
}
void CreateDBEndpointAddressRequest::setSecurityGroupId(const std::string &securityGroupId) {
securityGroupId_ = securityGroupId;
setParameter(std::string("SecurityGroupId"), securityGroupId);
}
std::string CreateDBEndpointAddressRequest::getDBEndpointId() const {
return dBEndpointId_;
}
@@ -106,3 +129,12 @@ void CreateDBEndpointAddressRequest::setNetType(const std::string &netType) {
setParameter(std::string("NetType"), netType);
}
std::string CreateDBEndpointAddressRequest::getVPCId() const {
return vPCId_;
}
void CreateDBEndpointAddressRequest::setVPCId(const std::string &vPCId) {
vPCId_ = vPCId;
setParameter(std::string("VPCId"), vPCId);
}

View File

@@ -168,6 +168,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
storageType_ = value["StorageType"].asString();
if(!value["ServerlessType"].isNull())
serverlessType_ = value["ServerlessType"].asString();
if(!value["StrictConsistency"].isNull())
strictConsistency_ = value["StrictConsistency"].asString();
if(!value["ProxyCpuCores"].isNull())
proxyCpuCores_ = value["ProxyCpuCores"].asString();
if(!value["ProxyStandardCpuCores"].isNull())
@@ -338,6 +340,11 @@ std::string DescribeDBClusterAttributeResult::getLockMode()const
return lockMode_;
}
std::string DescribeDBClusterAttributeResult::getStrictConsistency()const
{
return strictConsistency_;
}
long DescribeDBClusterAttributeResult::getStorageUsed()const
{
return storageUsed_;

View File

@@ -43,6 +43,15 @@ void DescribeDBClusterServerlessConfRequest::setAccessKeyId(const std::string &a
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string DescribeDBClusterServerlessConfRequest::getRequestType() const {
return requestType_;
}
void DescribeDBClusterServerlessConfRequest::setRequestType(const std::string &requestType) {
requestType_ = requestType;
setParameter(std::string("RequestType"), requestType);
}
std::string DescribeDBClusterServerlessConfRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -57,6 +57,10 @@ void DescribeDBClusterServerlessConfResult::parse(const std::string &payload)
scaleApRoNumMin_ = value["ScaleApRoNumMin"].asString();
if(!value["ScaleApRoNumMax"].isNull())
scaleApRoNumMax_ = value["ScaleApRoNumMax"].asString();
if(!value["Switchs"].isNull())
switchs_ = value["Switchs"].asString();
if(!value["DBMaxscaleId"].isNull())
dBMaxscaleId_ = value["DBMaxscaleId"].asString();
}
@@ -65,6 +69,11 @@ std::string DescribeDBClusterServerlessConfResult::getScaleRoNumMin()const
return scaleRoNumMin_;
}
std::string DescribeDBClusterServerlessConfResult::getDBMaxscaleId()const
{
return dBMaxscaleId_;
}
std::string DescribeDBClusterServerlessConfResult::getAllowShutDown()const
{
return allowShutDown_;
@@ -105,3 +114,8 @@ std::string DescribeDBClusterServerlessConfResult::getSecondsUntilAutoPause()con
return secondsUntilAutoPause_;
}
std::string DescribeDBClusterServerlessConfResult::getSwitchs()const
{
return switchs_;
}

View File

@@ -59,6 +59,8 @@ void DescribeDBClustersResult::parse(const std::string &payload)
itemsObject.storagePayType = valueItemsDBCluster["StoragePayType"].asString();
if(!valueItemsDBCluster["ServerlessType"].isNull())
itemsObject.serverlessType = valueItemsDBCluster["ServerlessType"].asString();
if(!valueItemsDBCluster["StrictConsistency"].isNull())
itemsObject.strictConsistency = valueItemsDBCluster["StrictConsistency"].asString();
if(!valueItemsDBCluster["DBNodeClass"].isNull())
itemsObject.dBNodeClass = valueItemsDBCluster["DBNodeClass"].asString();
if(!valueItemsDBCluster["DBType"].isNull())
@@ -115,6 +117,8 @@ void DescribeDBClustersResult::parse(const std::string &payload)
dBNodesObject.dBNodeId = valueItemsDBClusterDBNodesDBNode["DBNodeId"].asString();
if(!valueItemsDBClusterDBNodesDBNode["RegionId"].isNull())
dBNodesObject.regionId = valueItemsDBClusterDBNodesDBNode["RegionId"].asString();
if(!valueItemsDBClusterDBNodesDBNode["Serverless"].isNull())
dBNodesObject.serverless = valueItemsDBClusterDBNodesDBNode["Serverless"].asString();
itemsObject.dBNodes.push_back(dBNodesObject);
}
items_.push_back(itemsObject);

View File

@@ -0,0 +1,108 @@
/*
* 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/ResetGlobalDatabaseNetworkRequest.h>
using AlibabaCloud::Polardb::Model::ResetGlobalDatabaseNetworkRequest;
ResetGlobalDatabaseNetworkRequest::ResetGlobalDatabaseNetworkRequest()
: RpcServiceRequest("polardb", "2017-08-01", "ResetGlobalDatabaseNetwork") {
setMethod(HttpRequest::Method::Post);
}
ResetGlobalDatabaseNetworkRequest::~ResetGlobalDatabaseNetworkRequest() {}
long ResetGlobalDatabaseNetworkRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void ResetGlobalDatabaseNetworkRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string ResetGlobalDatabaseNetworkRequest::getAccessKeyId() const {
return accessKeyId_;
}
void ResetGlobalDatabaseNetworkRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string ResetGlobalDatabaseNetworkRequest::getSecurityToken() const {
return securityToken_;
}
void ResetGlobalDatabaseNetworkRequest::setSecurityToken(const std::string &securityToken) {
securityToken_ = securityToken;
setParameter(std::string("SecurityToken"), securityToken);
}
std::string ResetGlobalDatabaseNetworkRequest::getRegionId() const {
return regionId_;
}
void ResetGlobalDatabaseNetworkRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string ResetGlobalDatabaseNetworkRequest::getGDNId() const {
return gDNId_;
}
void ResetGlobalDatabaseNetworkRequest::setGDNId(const std::string &gDNId) {
gDNId_ = gDNId;
setParameter(std::string("GDNId"), gDNId);
}
std::string ResetGlobalDatabaseNetworkRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void ResetGlobalDatabaseNetworkRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
std::string ResetGlobalDatabaseNetworkRequest::getDBClusterId() const {
return dBClusterId_;
}
void ResetGlobalDatabaseNetworkRequest::setDBClusterId(const std::string &dBClusterId) {
dBClusterId_ = dBClusterId;
setParameter(std::string("DBClusterId"), dBClusterId);
}
std::string ResetGlobalDatabaseNetworkRequest::getOwnerAccount() const {
return ownerAccount_;
}
void ResetGlobalDatabaseNetworkRequest::setOwnerAccount(const std::string &ownerAccount) {
ownerAccount_ = ownerAccount;
setParameter(std::string("OwnerAccount"), ownerAccount);
}
long ResetGlobalDatabaseNetworkRequest::getOwnerId() const {
return ownerId_;
}
void ResetGlobalDatabaseNetworkRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/ResetGlobalDatabaseNetworkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
ResetGlobalDatabaseNetworkResult::ResetGlobalDatabaseNetworkResult() :
ServiceResult()
{}
ResetGlobalDatabaseNetworkResult::ResetGlobalDatabaseNetworkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ResetGlobalDatabaseNetworkResult::~ResetGlobalDatabaseNetworkResult()
{}
void ResetGlobalDatabaseNetworkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}