Supports the purchase of polardb storage packages.

This commit is contained in:
sdk-team
2021-09-23 08:52:35 +00:00
parent 66430977aa
commit e2b6c81588
23 changed files with 934 additions and 71 deletions

View File

@@ -1,3 +1,8 @@
2021-09-23 Version: 1.36.883
- Supports the purchase of polardb storage packages.
- Support temporary upgrades and allocations of instances.
- Query the detailed information of the node returned by the GDN instance.
2021-09-23 Version: 1.36.882
- Update by sdk platform.

View File

@@ -1 +1 @@
1.36.882
1.36.883

View File

@@ -49,6 +49,8 @@ set(polardb_public_header_model
include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkResult.h
include/alibabacloud/polardb/model/CreateParameterGroupRequest.h
include/alibabacloud/polardb/model/CreateParameterGroupResult.h
include/alibabacloud/polardb/model/CreateStoragePlanRequest.h
include/alibabacloud/polardb/model/CreateStoragePlanResult.h
include/alibabacloud/polardb/model/DeleteAccountRequest.h
include/alibabacloud/polardb/model/DeleteAccountResult.h
include/alibabacloud/polardb/model/DeleteBackupRequest.h
@@ -215,6 +217,8 @@ set(polardb_public_header_model
include/alibabacloud/polardb/model/RevokeAccountPrivilegeResult.h
include/alibabacloud/polardb/model/TagResourcesRequest.h
include/alibabacloud/polardb/model/TagResourcesResult.h
include/alibabacloud/polardb/model/TempModifyDBNodeRequest.h
include/alibabacloud/polardb/model/TempModifyDBNodeResult.h
include/alibabacloud/polardb/model/TransformDBClusterPayTypeRequest.h
include/alibabacloud/polardb/model/TransformDBClusterPayTypeResult.h
include/alibabacloud/polardb/model/UntagResourcesRequest.h
@@ -254,6 +258,8 @@ set(polardb_src
src/model/CreateGlobalDatabaseNetworkResult.cc
src/model/CreateParameterGroupRequest.cc
src/model/CreateParameterGroupResult.cc
src/model/CreateStoragePlanRequest.cc
src/model/CreateStoragePlanResult.cc
src/model/DeleteAccountRequest.cc
src/model/DeleteAccountResult.cc
src/model/DeleteBackupRequest.cc
@@ -420,6 +426,8 @@ set(polardb_src
src/model/RevokeAccountPrivilegeResult.cc
src/model/TagResourcesRequest.cc
src/model/TagResourcesResult.cc
src/model/TempModifyDBNodeRequest.cc
src/model/TempModifyDBNodeResult.cc
src/model/TransformDBClusterPayTypeRequest.cc
src/model/TransformDBClusterPayTypeResult.cc
src/model/UntagResourcesRequest.cc

View File

@@ -50,6 +50,8 @@
#include "model/CreateGlobalDatabaseNetworkResult.h"
#include "model/CreateParameterGroupRequest.h"
#include "model/CreateParameterGroupResult.h"
#include "model/CreateStoragePlanRequest.h"
#include "model/CreateStoragePlanResult.h"
#include "model/DeleteAccountRequest.h"
#include "model/DeleteAccountResult.h"
#include "model/DeleteBackupRequest.h"
@@ -216,6 +218,8 @@
#include "model/RevokeAccountPrivilegeResult.h"
#include "model/TagResourcesRequest.h"
#include "model/TagResourcesResult.h"
#include "model/TempModifyDBNodeRequest.h"
#include "model/TempModifyDBNodeResult.h"
#include "model/TransformDBClusterPayTypeRequest.h"
#include "model/TransformDBClusterPayTypeResult.h"
#include "model/UntagResourcesRequest.h"
@@ -275,6 +279,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateParameterGroupResult> CreateParameterGroupOutcome;
typedef std::future<CreateParameterGroupOutcome> CreateParameterGroupOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::CreateParameterGroupRequest&, const CreateParameterGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateParameterGroupAsyncHandler;
typedef Outcome<Error, Model::CreateStoragePlanResult> CreateStoragePlanOutcome;
typedef std::future<CreateStoragePlanOutcome> CreateStoragePlanOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::CreateStoragePlanRequest&, const CreateStoragePlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateStoragePlanAsyncHandler;
typedef Outcome<Error, Model::DeleteAccountResult> DeleteAccountOutcome;
typedef std::future<DeleteAccountOutcome> DeleteAccountOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DeleteAccountRequest&, const DeleteAccountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteAccountAsyncHandler;
@@ -524,6 +531,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::TagResourcesResult> TagResourcesOutcome;
typedef std::future<TagResourcesOutcome> TagResourcesOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::TagResourcesRequest&, const TagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourcesAsyncHandler;
typedef Outcome<Error, Model::TempModifyDBNodeResult> TempModifyDBNodeOutcome;
typedef std::future<TempModifyDBNodeOutcome> TempModifyDBNodeOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::TempModifyDBNodeRequest&, const TempModifyDBNodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TempModifyDBNodeAsyncHandler;
typedef Outcome<Error, Model::TransformDBClusterPayTypeResult> TransformDBClusterPayTypeOutcome;
typedef std::future<TransformDBClusterPayTypeOutcome> TransformDBClusterPayTypeOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::TransformDBClusterPayTypeRequest&, const TransformDBClusterPayTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TransformDBClusterPayTypeAsyncHandler;
@@ -583,6 +593,9 @@ namespace AlibabaCloud
CreateParameterGroupOutcome createParameterGroup(const Model::CreateParameterGroupRequest &request)const;
void createParameterGroupAsync(const Model::CreateParameterGroupRequest& request, const CreateParameterGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateParameterGroupOutcomeCallable createParameterGroupCallable(const Model::CreateParameterGroupRequest& request) const;
CreateStoragePlanOutcome createStoragePlan(const Model::CreateStoragePlanRequest &request)const;
void createStoragePlanAsync(const Model::CreateStoragePlanRequest& request, const CreateStoragePlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateStoragePlanOutcomeCallable createStoragePlanCallable(const Model::CreateStoragePlanRequest& request) const;
DeleteAccountOutcome deleteAccount(const Model::DeleteAccountRequest &request)const;
void deleteAccountAsync(const Model::DeleteAccountRequest& request, const DeleteAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteAccountOutcomeCallable deleteAccountCallable(const Model::DeleteAccountRequest& request) const;
@@ -832,6 +845,9 @@ namespace AlibabaCloud
TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const;
void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const;
TempModifyDBNodeOutcome tempModifyDBNode(const Model::TempModifyDBNodeRequest &request)const;
void tempModifyDBNodeAsync(const Model::TempModifyDBNodeRequest& request, const TempModifyDBNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TempModifyDBNodeOutcomeCallable tempModifyDBNodeCallable(const Model::TempModifyDBNodeRequest& request) const;
TransformDBClusterPayTypeOutcome transformDBClusterPayType(const Model::TransformDBClusterPayTypeRequest &request)const;
void transformDBClusterPayTypeAsync(const Model::TransformDBClusterPayTypeRequest& request, const TransformDBClusterPayTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TransformDBClusterPayTypeOutcomeCallable transformDBClusterPayTypeCallable(const Model::TransformDBClusterPayTypeRequest& request) const;

View File

@@ -0,0 +1,75 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT CreateStoragePlanRequest : public RpcServiceRequest
{
public:
CreateStoragePlanRequest();
~CreateStoragePlanRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getStorageType()const;
void setStorageType(const std::string& storageType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getPeriod()const;
void setPeriod(const std::string& period);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getUsedTime()const;
void setUsedTime(const std::string& usedTime);
std::string getStorageClass()const;
void setStorageClass(const std::string& storageClass);
private:
long resourceOwnerId_;
std::string clientToken_;
std::string storageType_;
std::string accessKeyId_;
std::string period_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string usedTime_;
std::string storageClass_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANREQUEST_H_

View File

@@ -0,0 +1,53 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANRESULT_H_
#define ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT CreateStoragePlanResult : public ServiceResult
{
public:
CreateStoragePlanResult();
explicit CreateStoragePlanResult(const std::string &payload);
~CreateStoragePlanResult();
std::string getDBInstanceId()const;
std::string getOrderId()const;
protected:
void parse(const std::string &payload);
private:
std::string dBInstanceId_;
std::string orderId_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_CREATESTORAGEPLANRESULT_H_

View File

@@ -35,14 +35,14 @@ namespace AlibabaCloud
struct DBNode
{
std::string dBNodeStatus;
int maxConnections;
std::string zoneId;
int maxConnections;
std::string dBNodeRole;
std::string creationTime;
std::string dBNodeId;
int failoverPriority;
std::string dBNodeClass;
int maxIOPS;
std::string dBNodeClass;
};
struct Tag
{
@@ -59,11 +59,11 @@ namespace AlibabaCloud
std::string getResourceGroupId()const;
long getDataLevel1BackupChainSize()const;
std::string getDBClusterId()const;
std::string getDBClusterNetworkType()const;
std::string getDBType()const;
std::string getDBClusterNetworkType()const;
bool getIsLatestVersion()const;
std::string getDBVersion()const;
long getStorageMax()const;
std::string getDBVersion()const;
std::vector<DBNode> getDBNodes()const;
std::string getZoneIds()const;
std::string getMaintainTime()const;
@@ -74,14 +74,15 @@ namespace AlibabaCloud
std::string getVSwitchId()const;
std::string getDBClusterDescription()const;
std::string getExpired()const;
std::string getLockMode()const;
std::string getPayType()const;
std::string getLockMode()const;
long getStorageUsed()const;
bool getIsProxyLatestVersion()const;
std::string getDBVersionStatus()const;
std::string getSubCategory()const;
std::string getCreationTime()const;
std::string getRegionId()const;
std::string getSubCategory()const;
long getSQLSize()const;
std::string getRegionId()const;
std::string getExpireTime()const;
protected:
@@ -92,11 +93,11 @@ namespace AlibabaCloud
std::string resourceGroupId_;
long dataLevel1BackupChainSize_;
std::string dBClusterId_;
std::string dBClusterNetworkType_;
std::string dBType_;
std::string dBClusterNetworkType_;
bool isLatestVersion_;
std::string dBVersion_;
long storageMax_;
std::string dBVersion_;
std::vector<DBNode> dBNodes_;
std::string zoneIds_;
std::string maintainTime_;
@@ -107,14 +108,15 @@ namespace AlibabaCloud
std::string vSwitchId_;
std::string dBClusterDescription_;
std::string expired_;
std::string lockMode_;
std::string payType_;
std::string lockMode_;
long storageUsed_;
bool isProxyLatestVersion_;
std::string dBVersionStatus_;
std::string subCategory_;
std::string creationTime_;
std::string regionId_;
std::string subCategory_;
long sQLSize_;
std::string regionId_;
std::string expireTime_;
};

View File

@@ -48,6 +48,7 @@ namespace AlibabaCloud
std::string dBNodeClass;
};
int deletionLock;
std::string category;
std::string resourceGroupId;
std::string zoneId;
std::string dBClusterStatus;

View File

@@ -40,6 +40,18 @@ namespace AlibabaCloud
};
struct DBCluster
{
struct DBNode
{
std::string dBNodeStatus;
std::string zoneId;
int maxConnections;
std::string dBNodeRole;
std::string creationTime;
std::string dBNodeId;
int failoverPriority;
std::string dBNodeClass;
int maxIOPS;
};
std::string dBClusterStatus;
std::string dBClusterId;
std::string dBClusterDescription;
@@ -51,6 +63,7 @@ namespace AlibabaCloud
std::string storageUsed;
std::string role;
std::string dBVersion;
std::vector<DBCluster::DBNode> dBNodes;
std::string regionId;
std::string expireTime;
};

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getDBClusterDescription()const;
void setDBClusterDescription(const std::string& dBClusterDescription);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getAccessKeyId()const;
@@ -47,6 +49,8 @@ namespace AlibabaCloud
void setPageSize(int pageSize);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOrderId()const;
void setOrderId(const std::string& orderId);
std::string getDBClusterId()const;
void setDBClusterId(const std::string& dBClusterId);
std::string getOwnerAccount()const;
@@ -60,11 +64,13 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string dBClusterDescription_;
int pageNumber_;
std::string accessKeyId_;
std::string regionId_;
int pageSize_;
std::string resourceOwnerAccount_;
std::string orderId_;
std::string dBClusterId_;
std::string ownerAccount_;
long ownerId_;

View File

@@ -38,11 +38,11 @@ namespace AlibabaCloud
{
std::string status;
std::string action;
std::string taskId;
std::string plannedTime;
std::string taskId;
std::string dbClusterDescription;
std::string plannedStartTime;
std::string dBClusterId;
std::string plannedStartTime;
std::string region;
std::string orderId;
std::string plannedEndTime;

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.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODEREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT TempModifyDBNodeRequest : public RpcServiceRequest
{
public:
struct DBNode
{
std::string targetClass;
std::string zoneId;
};
public:
TempModifyDBNodeRequest();
~TempModifyDBNodeRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getRestoreTime()const;
void setRestoreTime(const std::string& restoreTime);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
void setDBClusterId(const std::string& dBClusterId);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
std::string getOperationType()const;
void setOperationType(const std::string& operationType);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getModifyType()const;
void setModifyType(const std::string& modifyType);
std::vector<DBNode> getDBNode()const;
void setDBNode(const std::vector<DBNode>& dBNode);
private:
long resourceOwnerId_;
std::string clientToken_;
std::string accessKeyId_;
std::string restoreTime_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;
std::string operationType_;
long ownerId_;
std::string modifyType_;
std::vector<DBNode> dBNode_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODEREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODERESULT_H_
#define ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT TempModifyDBNodeResult : public ServiceResult
{
public:
TempModifyDBNodeResult();
explicit TempModifyDBNodeResult(const std::string &payload);
~TempModifyDBNodeResult();
std::vector<std::string> getDBNodeIds()const;
std::string getDBClusterId()const;
std::string getOrderId()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> dBNodeIds_;
std::string dBClusterId_;
std::string orderId_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_TEMPMODIFYDBNODERESULT_H_

View File

@@ -555,6 +555,42 @@ PolardbClient::CreateParameterGroupOutcomeCallable PolardbClient::createParamete
return task->get_future();
}
PolardbClient::CreateStoragePlanOutcome PolardbClient::createStoragePlan(const CreateStoragePlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateStoragePlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateStoragePlanOutcome(CreateStoragePlanResult(outcome.result()));
else
return CreateStoragePlanOutcome(outcome.error());
}
void PolardbClient::createStoragePlanAsync(const CreateStoragePlanRequest& request, const CreateStoragePlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createStoragePlan(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::CreateStoragePlanOutcomeCallable PolardbClient::createStoragePlanCallable(const CreateStoragePlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateStoragePlanOutcome()>>(
[this, request]()
{
return this->createStoragePlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DeleteAccountOutcome PolardbClient::deleteAccount(const DeleteAccountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3543,6 +3579,42 @@ PolardbClient::TagResourcesOutcomeCallable PolardbClient::tagResourcesCallable(c
return task->get_future();
}
PolardbClient::TempModifyDBNodeOutcome PolardbClient::tempModifyDBNode(const TempModifyDBNodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TempModifyDBNodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TempModifyDBNodeOutcome(TempModifyDBNodeResult(outcome.result()));
else
return TempModifyDBNodeOutcome(outcome.error());
}
void PolardbClient::tempModifyDBNodeAsync(const TempModifyDBNodeRequest& request, const TempModifyDBNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, tempModifyDBNode(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::TempModifyDBNodeOutcomeCallable PolardbClient::tempModifyDBNodeCallable(const TempModifyDBNodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TempModifyDBNodeOutcome()>>(
[this, request]()
{
return this->tempModifyDBNode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::TransformDBClusterPayTypeOutcome PolardbClient::transformDBClusterPayType(const TransformDBClusterPayTypeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,139 @@
/*
* 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/CreateStoragePlanRequest.h>
using AlibabaCloud::Polardb::Model::CreateStoragePlanRequest;
CreateStoragePlanRequest::CreateStoragePlanRequest() :
RpcServiceRequest("polardb", "2017-08-01", "CreateStoragePlan")
{
setMethod(HttpRequest::Method::Post);
}
CreateStoragePlanRequest::~CreateStoragePlanRequest()
{}
long CreateStoragePlanRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void CreateStoragePlanRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateStoragePlanRequest::getClientToken()const
{
return clientToken_;
}
void CreateStoragePlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateStoragePlanRequest::getStorageType()const
{
return storageType_;
}
void CreateStoragePlanRequest::setStorageType(const std::string& storageType)
{
storageType_ = storageType;
setParameter("StorageType", storageType);
}
std::string CreateStoragePlanRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateStoragePlanRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateStoragePlanRequest::getPeriod()const
{
return period_;
}
void CreateStoragePlanRequest::setPeriod(const std::string& period)
{
period_ = period;
setParameter("Period", period);
}
std::string CreateStoragePlanRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void CreateStoragePlanRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string CreateStoragePlanRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void CreateStoragePlanRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long CreateStoragePlanRequest::getOwnerId()const
{
return ownerId_;
}
void CreateStoragePlanRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateStoragePlanRequest::getUsedTime()const
{
return usedTime_;
}
void CreateStoragePlanRequest::setUsedTime(const std::string& usedTime)
{
usedTime_ = usedTime;
setParameter("UsedTime", usedTime);
}
std::string CreateStoragePlanRequest::getStorageClass()const
{
return storageClass_;
}
void CreateStoragePlanRequest::setStorageClass(const std::string& storageClass)
{
storageClass_ = storageClass;
setParameter("StorageClass", storageClass);
}

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/CreateStoragePlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
CreateStoragePlanResult::CreateStoragePlanResult() :
ServiceResult()
{}
CreateStoragePlanResult::CreateStoragePlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateStoragePlanResult::~CreateStoragePlanResult()
{}
void CreateStoragePlanResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["DBInstanceId"].isNull())
dBInstanceId_ = value["DBInstanceId"].asString();
if(!value["OrderId"].isNull())
orderId_ = value["OrderId"].asString();
}
std::string CreateStoragePlanResult::getDBInstanceId()const
{
return dBInstanceId_;
}
std::string CreateStoragePlanResult::getOrderId()const
{
return orderId_;
}

View File

@@ -43,34 +43,34 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
for (auto valueDBNodesDBNode : allDBNodesNode)
{
DBNode dBNodesObject;
if(!valueDBNodesDBNode["DBNodeStatus"].isNull())
dBNodesObject.dBNodeStatus = valueDBNodesDBNode["DBNodeStatus"].asString();
if(!valueDBNodesDBNode["MaxConnections"].isNull())
dBNodesObject.maxConnections = std::stoi(valueDBNodesDBNode["MaxConnections"].asString());
if(!valueDBNodesDBNode["ZoneId"].isNull())
dBNodesObject.zoneId = valueDBNodesDBNode["ZoneId"].asString();
if(!valueDBNodesDBNode["DBNodeRole"].isNull())
dBNodesObject.dBNodeRole = valueDBNodesDBNode["DBNodeRole"].asString();
if(!valueDBNodesDBNode["CreationTime"].isNull())
dBNodesObject.creationTime = valueDBNodesDBNode["CreationTime"].asString();
if(!valueDBNodesDBNode["DBNodeId"].isNull())
dBNodesObject.dBNodeId = valueDBNodesDBNode["DBNodeId"].asString();
if(!valueDBNodesDBNode["FailoverPriority"].isNull())
dBNodesObject.failoverPriority = std::stoi(valueDBNodesDBNode["FailoverPriority"].asString());
if(!valueDBNodesDBNode["DBNodeClass"].isNull())
dBNodesObject.dBNodeClass = valueDBNodesDBNode["DBNodeClass"].asString();
if(!valueDBNodesDBNode["MaxIOPS"].isNull())
dBNodesObject.maxIOPS = std::stoi(valueDBNodesDBNode["MaxIOPS"].asString());
if(!valueDBNodesDBNode["DBNodeClass"].isNull())
dBNodesObject.dBNodeClass = valueDBNodesDBNode["DBNodeClass"].asString();
if(!valueDBNodesDBNode["DBNodeRole"].isNull())
dBNodesObject.dBNodeRole = valueDBNodesDBNode["DBNodeRole"].asString();
if(!valueDBNodesDBNode["ZoneId"].isNull())
dBNodesObject.zoneId = valueDBNodesDBNode["ZoneId"].asString();
if(!valueDBNodesDBNode["MaxConnections"].isNull())
dBNodesObject.maxConnections = std::stoi(valueDBNodesDBNode["MaxConnections"].asString());
if(!valueDBNodesDBNode["DBNodeStatus"].isNull())
dBNodesObject.dBNodeStatus = valueDBNodesDBNode["DBNodeStatus"].asString();
if(!valueDBNodesDBNode["DBNodeId"].isNull())
dBNodesObject.dBNodeId = valueDBNodesDBNode["DBNodeId"].asString();
dBNodes_.push_back(dBNodesObject);
}
auto allTagsNode = value["Tags"]["Tag"];
for (auto valueTagsTag : allTagsNode)
{
Tag tagsObject;
if(!valueTagsTag["Value"].isNull())
tagsObject.value = valueTagsTag["Value"].asString();
if(!valueTagsTag["Key"].isNull())
tagsObject.key = valueTagsTag["Key"].asString();
if(!valueTagsTag["Value"].isNull())
tagsObject.value = valueTagsTag["Value"].asString();
tags_.push_back(tagsObject);
}
if(!value["DeletionLock"].isNull())
@@ -83,16 +83,16 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
dataLevel1BackupChainSize_ = std::stol(value["DataLevel1BackupChainSize"].asString());
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
if(!value["DBClusterNetworkType"].isNull())
dBClusterNetworkType_ = value["DBClusterNetworkType"].asString();
if(!value["DBType"].isNull())
dBType_ = value["DBType"].asString();
if(!value["DBClusterNetworkType"].isNull())
dBClusterNetworkType_ = value["DBClusterNetworkType"].asString();
if(!value["IsLatestVersion"].isNull())
isLatestVersion_ = value["IsLatestVersion"].asString() == "true";
if(!value["DBVersion"].isNull())
dBVersion_ = value["DBVersion"].asString();
if(!value["StorageMax"].isNull())
storageMax_ = std::stol(value["StorageMax"].asString());
if(!value["DBVersion"].isNull())
dBVersion_ = value["DBVersion"].asString();
if(!value["ZoneIds"].isNull())
zoneIds_ = value["ZoneIds"].asString();
if(!value["MaintainTime"].isNull())
@@ -109,24 +109,26 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
dBClusterDescription_ = value["DBClusterDescription"].asString();
if(!value["Expired"].isNull())
expired_ = value["Expired"].asString();
if(!value["LockMode"].isNull())
lockMode_ = value["LockMode"].asString();
if(!value["PayType"].isNull())
payType_ = value["PayType"].asString();
if(!value["LockMode"].isNull())
lockMode_ = value["LockMode"].asString();
if(!value["StorageUsed"].isNull())
storageUsed_ = std::stol(value["StorageUsed"].asString());
if(!value["DBVersionStatus"].isNull())
dBVersionStatus_ = value["DBVersionStatus"].asString();
if(!value["SubCategory"].isNull())
subCategory_ = value["SubCategory"].asString();
if(!value["CreationTime"].isNull())
creationTime_ = value["CreationTime"].asString();
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["SQLSize"].isNull())
sQLSize_ = std::stol(value["SQLSize"].asString());
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["ExpireTime"].isNull())
expireTime_ = value["ExpireTime"].asString();
if(!value["SubCategory"].isNull())
subCategory_ = value["SubCategory"].asString();
if(!value["IsProxyLatestVersion"].isNull())
isProxyLatestVersion_ = value["IsProxyLatestVersion"].asString() == "true";
}
@@ -155,31 +157,31 @@ std::string DescribeDBClusterAttributeResult::getDBClusterId()const
return dBClusterId_;
}
std::string DescribeDBClusterAttributeResult::getDBClusterNetworkType()const
{
return dBClusterNetworkType_;
}
std::string DescribeDBClusterAttributeResult::getDBType()const
{
return dBType_;
}
std::string DescribeDBClusterAttributeResult::getDBClusterNetworkType()const
{
return dBClusterNetworkType_;
}
bool DescribeDBClusterAttributeResult::getIsLatestVersion()const
{
return isLatestVersion_;
}
std::string DescribeDBClusterAttributeResult::getDBVersion()const
{
return dBVersion_;
}
long DescribeDBClusterAttributeResult::getStorageMax()const
{
return storageMax_;
}
std::string DescribeDBClusterAttributeResult::getDBVersion()const
{
return dBVersion_;
}
std::vector<DescribeDBClusterAttributeResult::DBNode> DescribeDBClusterAttributeResult::getDBNodes()const
{
return dBNodes_;
@@ -230,39 +232,39 @@ std::string DescribeDBClusterAttributeResult::getExpired()const
return expired_;
}
std::string DescribeDBClusterAttributeResult::getLockMode()const
{
return lockMode_;
}
std::string DescribeDBClusterAttributeResult::getPayType()const
{
return payType_;
}
std::string DescribeDBClusterAttributeResult::getLockMode()const
{
return lockMode_;
}
long DescribeDBClusterAttributeResult::getStorageUsed()const
{
return storageUsed_;
}
bool DescribeDBClusterAttributeResult::getIsProxyLatestVersion()const
{
return isProxyLatestVersion_;
}
std::string DescribeDBClusterAttributeResult::getDBVersionStatus()const
{
return dBVersionStatus_;
}
std::string DescribeDBClusterAttributeResult::getSubCategory()const
{
return subCategory_;
}
std::string DescribeDBClusterAttributeResult::getCreationTime()const
{
return creationTime_;
}
std::string DescribeDBClusterAttributeResult::getRegionId()const
std::string DescribeDBClusterAttributeResult::getSubCategory()const
{
return regionId_;
return subCategory_;
}
long DescribeDBClusterAttributeResult::getSQLSize()const
@@ -270,6 +272,11 @@ long DescribeDBClusterAttributeResult::getSQLSize()const
return sQLSize_;
}
std::string DescribeDBClusterAttributeResult::getRegionId()const
{
return regionId_;
}
std::string DescribeDBClusterAttributeResult::getExpireTime()const
{
return expireTime_;

View File

@@ -83,6 +83,8 @@ void DescribeDBClustersResult::parse(const std::string &payload)
itemsObject.zoneId = valueItemsDBCluster["ZoneId"].asString();
if(!valueItemsDBCluster["Engine"].isNull())
itemsObject.engine = valueItemsDBCluster["Engine"].asString();
if(!valueItemsDBCluster["Category"].isNull())
itemsObject.category = valueItemsDBCluster["Category"].asString();
auto allTagsNode = valueItemsDBCluster["Tags"]["Tag"];
for (auto valueItemsDBClusterTagsTag : allTagsNode)
{

View File

@@ -81,6 +81,30 @@ void DescribeGlobalDatabaseNetworkResult::parse(const std::string &payload)
dBClustersObject.dBClusterDescription = valueDBClustersDBCluster["DBClusterDescription"].asString();
if(!valueDBClustersDBCluster["Role"].isNull())
dBClustersObject.role = valueDBClustersDBCluster["Role"].asString();
auto allDBNodesNode = valueDBClustersDBCluster["DBNodes"]["DBNode"];
for (auto valueDBClustersDBClusterDBNodesDBNode : allDBNodesNode)
{
DBCluster::DBNode dBNodesObject;
if(!valueDBClustersDBClusterDBNodesDBNode["DBNodeClass"].isNull())
dBNodesObject.dBNodeClass = valueDBClustersDBClusterDBNodesDBNode["DBNodeClass"].asString();
if(!valueDBClustersDBClusterDBNodesDBNode["ZoneId"].isNull())
dBNodesObject.zoneId = valueDBClustersDBClusterDBNodesDBNode["ZoneId"].asString();
if(!valueDBClustersDBClusterDBNodesDBNode["CreationTime"].isNull())
dBNodesObject.creationTime = valueDBClustersDBClusterDBNodesDBNode["CreationTime"].asString();
if(!valueDBClustersDBClusterDBNodesDBNode["DBNodeRole"].isNull())
dBNodesObject.dBNodeRole = valueDBClustersDBClusterDBNodesDBNode["DBNodeRole"].asString();
if(!valueDBClustersDBClusterDBNodesDBNode["DBNodeStatus"].isNull())
dBNodesObject.dBNodeStatus = valueDBClustersDBClusterDBNodesDBNode["DBNodeStatus"].asString();
if(!valueDBClustersDBClusterDBNodesDBNode["FailoverPriority"].isNull())
dBNodesObject.failoverPriority = std::stoi(valueDBClustersDBClusterDBNodesDBNode["FailoverPriority"].asString());
if(!valueDBClustersDBClusterDBNodesDBNode["MaxConnections"].isNull())
dBNodesObject.maxConnections = std::stoi(valueDBClustersDBClusterDBNodesDBNode["MaxConnections"].asString());
if(!valueDBClustersDBClusterDBNodesDBNode["MaxIOPS"].isNull())
dBNodesObject.maxIOPS = std::stoi(valueDBClustersDBClusterDBNodesDBNode["MaxIOPS"].asString());
if(!valueDBClustersDBClusterDBNodesDBNode["DBNodeId"].isNull())
dBNodesObject.dBNodeId = valueDBClustersDBClusterDBNodesDBNode["DBNodeId"].asString();
dBClustersObject.dBNodes.push_back(dBNodesObject);
}
dBClusters_.push_back(dBClustersObject);
}
if(!value["GDNStatus"].isNull())

View File

@@ -38,6 +38,17 @@ void DescribeScheduleTasksRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeScheduleTasksRequest::getDBClusterDescription()const
{
return dBClusterDescription_;
}
void DescribeScheduleTasksRequest::setDBClusterDescription(const std::string& dBClusterDescription)
{
dBClusterDescription_ = dBClusterDescription;
setParameter("DBClusterDescription", dBClusterDescription);
}
int DescribeScheduleTasksRequest::getPageNumber()const
{
return pageNumber_;
@@ -93,6 +104,17 @@ void DescribeScheduleTasksRequest::setResourceOwnerAccount(const std::string& re
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeScheduleTasksRequest::getOrderId()const
{
return orderId_;
}
void DescribeScheduleTasksRequest::setOrderId(const std::string& orderId)
{
orderId_ = orderId;
setParameter("OrderId", orderId);
}
std::string DescribeScheduleTasksRequest::getDBClusterId()const
{
return dBClusterId_;

View File

@@ -42,10 +42,10 @@ void DescribeScheduleTasksResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["TotalRecordCount"].isNull())
data_.totalRecordCount = std::stoi(dataNode["TotalRecordCount"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageNumber"].isNull())
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
auto allTimerInfosNode = dataNode["TimerInfos"]["timerInfosItem"];
for (auto dataNodeTimerInfostimerInfosItem : allTimerInfosNode)
{
@@ -54,24 +54,24 @@ void DescribeScheduleTasksResult::parse(const std::string &payload)
timerInfosItemObject.status = dataNodeTimerInfostimerInfosItem["Status"].asString();
if(!dataNodeTimerInfostimerInfosItem["Action"].isNull())
timerInfosItemObject.action = dataNodeTimerInfostimerInfosItem["Action"].asString();
if(!dataNodeTimerInfostimerInfosItem["TaskId"].isNull())
timerInfosItemObject.taskId = dataNodeTimerInfostimerInfosItem["TaskId"].asString();
if(!dataNodeTimerInfostimerInfosItem["PlannedEndTime"].isNull())
timerInfosItemObject.plannedEndTime = dataNodeTimerInfostimerInfosItem["PlannedEndTime"].asString();
if(!dataNodeTimerInfostimerInfosItem["PlannedTime"].isNull())
timerInfosItemObject.plannedTime = dataNodeTimerInfostimerInfosItem["PlannedTime"].asString();
if(!dataNodeTimerInfostimerInfosItem["DbClusterDescription"].isNull())
timerInfosItemObject.dbClusterDescription = dataNodeTimerInfostimerInfosItem["DbClusterDescription"].asString();
if(!dataNodeTimerInfostimerInfosItem["PlannedStartTime"].isNull())
timerInfosItemObject.plannedStartTime = dataNodeTimerInfostimerInfosItem["PlannedStartTime"].asString();
if(!dataNodeTimerInfostimerInfosItem["DBClusterId"].isNull())
timerInfosItemObject.dBClusterId = dataNodeTimerInfostimerInfosItem["DBClusterId"].asString();
if(!dataNodeTimerInfostimerInfosItem["Region"].isNull())
timerInfosItemObject.region = dataNodeTimerInfostimerInfosItem["Region"].asString();
if(!dataNodeTimerInfostimerInfosItem["PlannedStartTime"].isNull())
timerInfosItemObject.plannedStartTime = dataNodeTimerInfostimerInfosItem["PlannedStartTime"].asString();
if(!dataNodeTimerInfostimerInfosItem["TaskId"].isNull())
timerInfosItemObject.taskId = dataNodeTimerInfostimerInfosItem["TaskId"].asString();
if(!dataNodeTimerInfostimerInfosItem["OrderId"].isNull())
timerInfosItemObject.orderId = dataNodeTimerInfostimerInfosItem["OrderId"].asString();
if(!dataNodeTimerInfostimerInfosItem["PlannedEndTime"].isNull())
timerInfosItemObject.plannedEndTime = dataNodeTimerInfostimerInfosItem["PlannedEndTime"].asString();
if(!dataNodeTimerInfostimerInfosItem["DbClusterStatus"].isNull())
timerInfosItemObject.dbClusterStatus = dataNodeTimerInfostimerInfosItem["DbClusterStatus"].asString();
if(!dataNodeTimerInfostimerInfosItem["DbClusterDescription"].isNull())
timerInfosItemObject.dbClusterDescription = dataNodeTimerInfostimerInfosItem["DbClusterDescription"].asString();
data_.timerInfos.push_back(timerInfosItemObject);
}
if(!value["Message"].isNull())

View File

@@ -0,0 +1,155 @@
/*
* 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/TempModifyDBNodeRequest.h>
using AlibabaCloud::Polardb::Model::TempModifyDBNodeRequest;
TempModifyDBNodeRequest::TempModifyDBNodeRequest() :
RpcServiceRequest("polardb", "2017-08-01", "TempModifyDBNode")
{
setMethod(HttpRequest::Method::Post);
}
TempModifyDBNodeRequest::~TempModifyDBNodeRequest()
{}
long TempModifyDBNodeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void TempModifyDBNodeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string TempModifyDBNodeRequest::getClientToken()const
{
return clientToken_;
}
void TempModifyDBNodeRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string TempModifyDBNodeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void TempModifyDBNodeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string TempModifyDBNodeRequest::getRestoreTime()const
{
return restoreTime_;
}
void TempModifyDBNodeRequest::setRestoreTime(const std::string& restoreTime)
{
restoreTime_ = restoreTime;
setParameter("RestoreTime", restoreTime);
}
std::string TempModifyDBNodeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void TempModifyDBNodeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string TempModifyDBNodeRequest::getDBClusterId()const
{
return dBClusterId_;
}
void TempModifyDBNodeRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string TempModifyDBNodeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void TempModifyDBNodeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string TempModifyDBNodeRequest::getOperationType()const
{
return operationType_;
}
void TempModifyDBNodeRequest::setOperationType(const std::string& operationType)
{
operationType_ = operationType;
setParameter("OperationType", operationType);
}
long TempModifyDBNodeRequest::getOwnerId()const
{
return ownerId_;
}
void TempModifyDBNodeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string TempModifyDBNodeRequest::getModifyType()const
{
return modifyType_;
}
void TempModifyDBNodeRequest::setModifyType(const std::string& modifyType)
{
modifyType_ = modifyType;
setParameter("ModifyType", modifyType);
}
std::vector<TempModifyDBNodeRequest::DBNode> TempModifyDBNodeRequest::getDBNode()const
{
return dBNode_;
}
void TempModifyDBNodeRequest::setDBNode(const std::vector<DBNode>& dBNode)
{
dBNode_ = dBNode;
for(int dep1 = 0; dep1!= dBNode.size(); dep1++) {
auto dBNodeObj = dBNode.at(dep1);
std::string dBNodeObjStr = "DBNode." + std::to_string(dep1 + 1);
setParameter(dBNodeObjStr + ".TargetClass", dBNodeObj.targetClass);
setParameter(dBNodeObjStr + ".ZoneId", dBNodeObj.zoneId);
}
}

View File

@@ -0,0 +1,66 @@
/*
* 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/TempModifyDBNodeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
TempModifyDBNodeResult::TempModifyDBNodeResult() :
ServiceResult()
{}
TempModifyDBNodeResult::TempModifyDBNodeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TempModifyDBNodeResult::~TempModifyDBNodeResult()
{}
void TempModifyDBNodeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDBNodeIds = value["DBNodeIds"]["DBNodeId"];
for (const auto &item : allDBNodeIds)
dBNodeIds_.push_back(item.asString());
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
if(!value["OrderId"].isNull())
orderId_ = value["OrderId"].asString();
}
std::vector<std::string> TempModifyDBNodeResult::getDBNodeIds()const
{
return dBNodeIds_;
}
std::string TempModifyDBNodeResult::getDBClusterId()const
{
return dBClusterId_;
}
std::string TempModifyDBNodeResult::getOrderId()const
{
return orderId_;
}