From 6877b35beb46e91209328bd06680e5101a99db1d Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 7 Jul 2021 08:34:24 +0000 Subject: [PATCH] Add ModifyResourceGroup API. --- CHANGELOG | 3 + VERSION | 2 +- dds/CMakeLists.txt | 8 + dds/include/alibabacloud/dds/DdsClient.h | 16 ++ .../dds/model/CreateNodeRequest.h | 6 + .../dds/model/ModifyNodeSpecBatchRequest.h | 93 ++++++++ .../dds/model/ModifyNodeSpecBatchResult.h | 51 +++++ .../dds/model/ModifyResourceGroupRequest.h | 72 ++++++ .../dds/model/ModifyResourceGroupResult.h | 49 +++++ dds/src/DdsClient.cc | 78 ++++++- dds/src/model/CreateNodeRequest.cc | 22 ++ dds/src/model/ModifyNodeSpecBatchRequest.cc | 205 ++++++++++++++++++ dds/src/model/ModifyNodeSpecBatchResult.cc | 51 +++++ dds/src/model/ModifyResourceGroupRequest.cc | 128 +++++++++++ dds/src/model/ModifyResourceGroupResult.cc | 44 ++++ 15 files changed, 824 insertions(+), 4 deletions(-) create mode 100644 dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchRequest.h create mode 100644 dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchResult.h create mode 100644 dds/include/alibabacloud/dds/model/ModifyResourceGroupRequest.h create mode 100644 dds/include/alibabacloud/dds/model/ModifyResourceGroupResult.h create mode 100644 dds/src/model/ModifyNodeSpecBatchRequest.cc create mode 100644 dds/src/model/ModifyNodeSpecBatchResult.cc create mode 100644 dds/src/model/ModifyResourceGroupRequest.cc create mode 100644 dds/src/model/ModifyResourceGroupResult.cc diff --git a/CHANGELOG b/CHANGELOG index a835a4837..c9f8f9e0f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-07-07 Version: 1.36.810 +- Add ModifyResourceGroup API. + 2021-07-07 Version: 1.36.809 - Support FilterKey for RestoreInstance. - DescribeInstanceAttribute add return argument BackupLogStartTime. diff --git a/VERSION b/VERSION index 3b31f6c94..05a9c9e07 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.809 \ No newline at end of file +1.36.810 \ No newline at end of file diff --git a/dds/CMakeLists.txt b/dds/CMakeLists.txt index da0f8b978..47a5788ba 100644 --- a/dds/CMakeLists.txt +++ b/dds/CMakeLists.txt @@ -167,8 +167,12 @@ set(dds_public_header_model include/alibabacloud/dds/model/ModifyInstanceVpcAuthModeResult.h include/alibabacloud/dds/model/ModifyNodeSpecRequest.h include/alibabacloud/dds/model/ModifyNodeSpecResult.h + include/alibabacloud/dds/model/ModifyNodeSpecBatchRequest.h + include/alibabacloud/dds/model/ModifyNodeSpecBatchResult.h include/alibabacloud/dds/model/ModifyParametersRequest.h include/alibabacloud/dds/model/ModifyParametersResult.h + include/alibabacloud/dds/model/ModifyResourceGroupRequest.h + include/alibabacloud/dds/model/ModifyResourceGroupResult.h include/alibabacloud/dds/model/ModifySecurityGroupConfigurationRequest.h include/alibabacloud/dds/model/ModifySecurityGroupConfigurationResult.h include/alibabacloud/dds/model/ModifySecurityIpsRequest.h @@ -346,8 +350,12 @@ set(dds_src src/model/ModifyInstanceVpcAuthModeResult.cc src/model/ModifyNodeSpecRequest.cc src/model/ModifyNodeSpecResult.cc + src/model/ModifyNodeSpecBatchRequest.cc + src/model/ModifyNodeSpecBatchResult.cc src/model/ModifyParametersRequest.cc src/model/ModifyParametersResult.cc + src/model/ModifyResourceGroupRequest.cc + src/model/ModifyResourceGroupResult.cc src/model/ModifySecurityGroupConfigurationRequest.cc src/model/ModifySecurityGroupConfigurationResult.cc src/model/ModifySecurityIpsRequest.cc diff --git a/dds/include/alibabacloud/dds/DdsClient.h b/dds/include/alibabacloud/dds/DdsClient.h index c869c3408..35035304c 100644 --- a/dds/include/alibabacloud/dds/DdsClient.h +++ b/dds/include/alibabacloud/dds/DdsClient.h @@ -168,8 +168,12 @@ #include "model/ModifyInstanceVpcAuthModeResult.h" #include "model/ModifyNodeSpecRequest.h" #include "model/ModifyNodeSpecResult.h" +#include "model/ModifyNodeSpecBatchRequest.h" +#include "model/ModifyNodeSpecBatchResult.h" #include "model/ModifyParametersRequest.h" #include "model/ModifyParametersResult.h" +#include "model/ModifyResourceGroupRequest.h" +#include "model/ModifyResourceGroupResult.h" #include "model/ModifySecurityGroupConfigurationRequest.h" #include "model/ModifySecurityGroupConfigurationResult.h" #include "model/ModifySecurityIpsRequest.h" @@ -426,9 +430,15 @@ namespace AlibabaCloud typedef Outcome ModifyNodeSpecOutcome; typedef std::future ModifyNodeSpecOutcomeCallable; typedef std::function&)> ModifyNodeSpecAsyncHandler; + typedef Outcome ModifyNodeSpecBatchOutcome; + typedef std::future ModifyNodeSpecBatchOutcomeCallable; + typedef std::function&)> ModifyNodeSpecBatchAsyncHandler; typedef Outcome ModifyParametersOutcome; typedef std::future ModifyParametersOutcomeCallable; typedef std::function&)> ModifyParametersAsyncHandler; + typedef Outcome ModifyResourceGroupOutcome; + typedef std::future ModifyResourceGroupOutcomeCallable; + typedef std::function&)> ModifyResourceGroupAsyncHandler; typedef Outcome ModifySecurityGroupConfigurationOutcome; typedef std::future ModifySecurityGroupConfigurationOutcomeCallable; typedef std::function&)> ModifySecurityGroupConfigurationAsyncHandler; @@ -695,9 +705,15 @@ namespace AlibabaCloud ModifyNodeSpecOutcome modifyNodeSpec(const Model::ModifyNodeSpecRequest &request)const; void modifyNodeSpecAsync(const Model::ModifyNodeSpecRequest& request, const ModifyNodeSpecAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyNodeSpecOutcomeCallable modifyNodeSpecCallable(const Model::ModifyNodeSpecRequest& request) const; + ModifyNodeSpecBatchOutcome modifyNodeSpecBatch(const Model::ModifyNodeSpecBatchRequest &request)const; + void modifyNodeSpecBatchAsync(const Model::ModifyNodeSpecBatchRequest& request, const ModifyNodeSpecBatchAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyNodeSpecBatchOutcomeCallable modifyNodeSpecBatchCallable(const Model::ModifyNodeSpecBatchRequest& request) const; ModifyParametersOutcome modifyParameters(const Model::ModifyParametersRequest &request)const; void modifyParametersAsync(const Model::ModifyParametersRequest& request, const ModifyParametersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyParametersOutcomeCallable modifyParametersCallable(const Model::ModifyParametersRequest& request) const; + ModifyResourceGroupOutcome modifyResourceGroup(const Model::ModifyResourceGroupRequest &request)const; + void modifyResourceGroupAsync(const Model::ModifyResourceGroupRequest& request, const ModifyResourceGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyResourceGroupOutcomeCallable modifyResourceGroupCallable(const Model::ModifyResourceGroupRequest& request) const; ModifySecurityGroupConfigurationOutcome modifySecurityGroupConfiguration(const Model::ModifySecurityGroupConfigurationRequest &request)const; void modifySecurityGroupConfigurationAsync(const Model::ModifySecurityGroupConfigurationRequest& request, const ModifySecurityGroupConfigurationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifySecurityGroupConfigurationOutcomeCallable modifySecurityGroupConfigurationCallable(const Model::ModifySecurityGroupConfigurationRequest& request) const; diff --git a/dds/include/alibabacloud/dds/model/CreateNodeRequest.h b/dds/include/alibabacloud/dds/model/CreateNodeRequest.h index 2a3936a7b..10cc3524c 100644 --- a/dds/include/alibabacloud/dds/model/CreateNodeRequest.h +++ b/dds/include/alibabacloud/dds/model/CreateNodeRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setClientToken(const std::string& clientToken); int getReadonlyReplicas()const; void setReadonlyReplicas(int readonlyReplicas); + std::string getCouponNo()const; + void setCouponNo(const std::string& couponNo); std::string getNodeClass()const; void setNodeClass(const std::string& nodeClass); std::string getAccessKeyId()const; @@ -51,6 +53,8 @@ namespace AlibabaCloud void setSecurityToken(const std::string& securityToken); std::string getDBInstanceId()const; void setDBInstanceId(const std::string& dBInstanceId); + std::string getBusinessInfo()const; + void setBusinessInfo(const std::string& businessInfo); bool getAutoPay()const; void setAutoPay(bool autoPay); std::string getFromApp()const; @@ -69,10 +73,12 @@ namespace AlibabaCloud std::string nodeType_; std::string clientToken_; int readonlyReplicas_; + std::string couponNo_; std::string nodeClass_; std::string accessKeyId_; std::string securityToken_; std::string dBInstanceId_; + std::string businessInfo_; bool autoPay_; std::string fromApp_; std::string resourceOwnerAccount_; diff --git a/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchRequest.h b/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchRequest.h new file mode 100644 index 000000000..3d6b31a15 --- /dev/null +++ b/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchRequest.h @@ -0,0 +1,93 @@ +/* + * 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_DDS_MODEL_MODIFYNODESPECBATCHREQUEST_H_ +#define ALIBABACLOUD_DDS_MODEL_MODIFYNODESPECBATCHREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT ModifyNodeSpecBatchRequest : public RpcServiceRequest + { + + public: + ModifyNodeSpecBatchRequest(); + ~ModifyNodeSpecBatchRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + std::string getNodesInfo()const; + void setNodesInfo(const std::string& nodesInfo); + std::string getCouponNo()const; + void setCouponNo(const std::string& couponNo); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getEffectiveTime()const; + void setEffectiveTime(const std::string& effectiveTime); + std::string getDBInstanceId()const; + void setDBInstanceId(const std::string& dBInstanceId); + std::string getBusinessInfo()const; + void setBusinessInfo(const std::string& businessInfo); + bool getAutoPay()const; + void setAutoPay(bool autoPay); + std::string getFromApp()const; + void setFromApp(const std::string& fromApp); + 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 getOrderType()const; + void setOrderType(const std::string& orderType); + + private: + long resourceOwnerId_; + std::string clientToken_; + std::string nodesInfo_; + std::string couponNo_; + std::string accessKeyId_; + std::string securityToken_; + std::string regionId_; + std::string effectiveTime_; + std::string dBInstanceId_; + std::string businessInfo_; + bool autoPay_; + std::string fromApp_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string orderType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYNODESPECBATCHREQUEST_H_ \ No newline at end of file diff --git a/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchResult.h b/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchResult.h new file mode 100644 index 000000000..ec4466970 --- /dev/null +++ b/dds/include/alibabacloud/dds/model/ModifyNodeSpecBatchResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_DDS_MODEL_MODIFYNODESPECBATCHRESULT_H_ +#define ALIBABACLOUD_DDS_MODEL_MODIFYNODESPECBATCHRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT ModifyNodeSpecBatchResult : public ServiceResult + { + public: + + + ModifyNodeSpecBatchResult(); + explicit ModifyNodeSpecBatchResult(const std::string &payload); + ~ModifyNodeSpecBatchResult(); + std::string getOrderId()const; + + protected: + void parse(const std::string &payload); + private: + std::string orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYNODESPECBATCHRESULT_H_ \ No newline at end of file diff --git a/dds/include/alibabacloud/dds/model/ModifyResourceGroupRequest.h b/dds/include/alibabacloud/dds/model/ModifyResourceGroupRequest.h new file mode 100644 index 000000000..f5c3470f9 --- /dev/null +++ b/dds/include/alibabacloud/dds/model/ModifyResourceGroupRequest.h @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DDS_MODEL_MODIFYRESOURCEGROUPREQUEST_H_ +#define ALIBABACLOUD_DDS_MODEL_MODIFYRESOURCEGROUPREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT ModifyResourceGroupRequest : public RpcServiceRequest + { + + public: + ModifyResourceGroupRequest(); + ~ModifyResourceGroupRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getDBInstanceId()const; + void setDBInstanceId(const std::string& dBInstanceId); + 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); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string resourceGroupId_; + std::string securityToken_; + std::string regionId_; + std::string dBInstanceId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYRESOURCEGROUPREQUEST_H_ \ No newline at end of file diff --git a/dds/include/alibabacloud/dds/model/ModifyResourceGroupResult.h b/dds/include/alibabacloud/dds/model/ModifyResourceGroupResult.h new file mode 100644 index 000000000..f62c14d49 --- /dev/null +++ b/dds/include/alibabacloud/dds/model/ModifyResourceGroupResult.h @@ -0,0 +1,49 @@ +/* + * 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_DDS_MODEL_MODIFYRESOURCEGROUPRESULT_H_ +#define ALIBABACLOUD_DDS_MODEL_MODIFYRESOURCEGROUPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT ModifyResourceGroupResult : public ServiceResult + { + public: + + + ModifyResourceGroupResult(); + explicit ModifyResourceGroupResult(const std::string &payload); + ~ModifyResourceGroupResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYRESOURCEGROUPRESULT_H_ \ No newline at end of file diff --git a/dds/src/DdsClient.cc b/dds/src/DdsClient.cc index 5976801f4..727f105a9 100644 --- a/dds/src/DdsClient.cc +++ b/dds/src/DdsClient.cc @@ -31,21 +31,21 @@ DdsClient::DdsClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "Dds"); } DdsClient::DdsClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "Dds"); } DdsClient::DdsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "Dds"); } DdsClient::~DdsClient() @@ -2679,6 +2679,42 @@ DdsClient::ModifyNodeSpecOutcomeCallable DdsClient::modifyNodeSpecCallable(const return task->get_future(); } +DdsClient::ModifyNodeSpecBatchOutcome DdsClient::modifyNodeSpecBatch(const ModifyNodeSpecBatchRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyNodeSpecBatchOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyNodeSpecBatchOutcome(ModifyNodeSpecBatchResult(outcome.result())); + else + return ModifyNodeSpecBatchOutcome(outcome.error()); +} + +void DdsClient::modifyNodeSpecBatchAsync(const ModifyNodeSpecBatchRequest& request, const ModifyNodeSpecBatchAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyNodeSpecBatch(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DdsClient::ModifyNodeSpecBatchOutcomeCallable DdsClient::modifyNodeSpecBatchCallable(const ModifyNodeSpecBatchRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyNodeSpecBatch(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DdsClient::ModifyParametersOutcome DdsClient::modifyParameters(const ModifyParametersRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2715,6 +2751,42 @@ DdsClient::ModifyParametersOutcomeCallable DdsClient::modifyParametersCallable(c return task->get_future(); } +DdsClient::ModifyResourceGroupOutcome DdsClient::modifyResourceGroup(const ModifyResourceGroupRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyResourceGroupOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyResourceGroupOutcome(ModifyResourceGroupResult(outcome.result())); + else + return ModifyResourceGroupOutcome(outcome.error()); +} + +void DdsClient::modifyResourceGroupAsync(const ModifyResourceGroupRequest& request, const ModifyResourceGroupAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyResourceGroup(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DdsClient::ModifyResourceGroupOutcomeCallable DdsClient::modifyResourceGroupCallable(const ModifyResourceGroupRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyResourceGroup(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DdsClient::ModifySecurityGroupConfigurationOutcome DdsClient::modifySecurityGroupConfiguration(const ModifySecurityGroupConfigurationRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dds/src/model/CreateNodeRequest.cc b/dds/src/model/CreateNodeRequest.cc index 742d5b076..0f4a9a2c0 100644 --- a/dds/src/model/CreateNodeRequest.cc +++ b/dds/src/model/CreateNodeRequest.cc @@ -71,6 +71,17 @@ void CreateNodeRequest::setReadonlyReplicas(int readonlyReplicas) setParameter("ReadonlyReplicas", std::to_string(readonlyReplicas)); } +std::string CreateNodeRequest::getCouponNo()const +{ + return couponNo_; +} + +void CreateNodeRequest::setCouponNo(const std::string& couponNo) +{ + couponNo_ = couponNo; + setParameter("CouponNo", couponNo); +} + std::string CreateNodeRequest::getNodeClass()const { return nodeClass_; @@ -115,6 +126,17 @@ void CreateNodeRequest::setDBInstanceId(const std::string& dBInstanceId) setParameter("DBInstanceId", dBInstanceId); } +std::string CreateNodeRequest::getBusinessInfo()const +{ + return businessInfo_; +} + +void CreateNodeRequest::setBusinessInfo(const std::string& businessInfo) +{ + businessInfo_ = businessInfo; + setParameter("BusinessInfo", businessInfo); +} + bool CreateNodeRequest::getAutoPay()const { return autoPay_; diff --git a/dds/src/model/ModifyNodeSpecBatchRequest.cc b/dds/src/model/ModifyNodeSpecBatchRequest.cc new file mode 100644 index 000000000..00c6f232d --- /dev/null +++ b/dds/src/model/ModifyNodeSpecBatchRequest.cc @@ -0,0 +1,205 @@ +/* + * 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 + +using AlibabaCloud::Dds::Model::ModifyNodeSpecBatchRequest; + +ModifyNodeSpecBatchRequest::ModifyNodeSpecBatchRequest() : + RpcServiceRequest("dds", "2015-12-01", "ModifyNodeSpecBatch") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyNodeSpecBatchRequest::~ModifyNodeSpecBatchRequest() +{} + +long ModifyNodeSpecBatchRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void ModifyNodeSpecBatchRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string ModifyNodeSpecBatchRequest::getClientToken()const +{ + return clientToken_; +} + +void ModifyNodeSpecBatchRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + +std::string ModifyNodeSpecBatchRequest::getNodesInfo()const +{ + return nodesInfo_; +} + +void ModifyNodeSpecBatchRequest::setNodesInfo(const std::string& nodesInfo) +{ + nodesInfo_ = nodesInfo; + setParameter("NodesInfo", nodesInfo); +} + +std::string ModifyNodeSpecBatchRequest::getCouponNo()const +{ + return couponNo_; +} + +void ModifyNodeSpecBatchRequest::setCouponNo(const std::string& couponNo) +{ + couponNo_ = couponNo; + setParameter("CouponNo", couponNo); +} + +std::string ModifyNodeSpecBatchRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ModifyNodeSpecBatchRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ModifyNodeSpecBatchRequest::getSecurityToken()const +{ + return securityToken_; +} + +void ModifyNodeSpecBatchRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string ModifyNodeSpecBatchRequest::getRegionId()const +{ + return regionId_; +} + +void ModifyNodeSpecBatchRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ModifyNodeSpecBatchRequest::getEffectiveTime()const +{ + return effectiveTime_; +} + +void ModifyNodeSpecBatchRequest::setEffectiveTime(const std::string& effectiveTime) +{ + effectiveTime_ = effectiveTime; + setParameter("EffectiveTime", effectiveTime); +} + +std::string ModifyNodeSpecBatchRequest::getDBInstanceId()const +{ + return dBInstanceId_; +} + +void ModifyNodeSpecBatchRequest::setDBInstanceId(const std::string& dBInstanceId) +{ + dBInstanceId_ = dBInstanceId; + setParameter("DBInstanceId", dBInstanceId); +} + +std::string ModifyNodeSpecBatchRequest::getBusinessInfo()const +{ + return businessInfo_; +} + +void ModifyNodeSpecBatchRequest::setBusinessInfo(const std::string& businessInfo) +{ + businessInfo_ = businessInfo; + setParameter("BusinessInfo", businessInfo); +} + +bool ModifyNodeSpecBatchRequest::getAutoPay()const +{ + return autoPay_; +} + +void ModifyNodeSpecBatchRequest::setAutoPay(bool autoPay) +{ + autoPay_ = autoPay; + setParameter("AutoPay", autoPay ? "true" : "false"); +} + +std::string ModifyNodeSpecBatchRequest::getFromApp()const +{ + return fromApp_; +} + +void ModifyNodeSpecBatchRequest::setFromApp(const std::string& fromApp) +{ + fromApp_ = fromApp; + setParameter("FromApp", fromApp); +} + +std::string ModifyNodeSpecBatchRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void ModifyNodeSpecBatchRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string ModifyNodeSpecBatchRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void ModifyNodeSpecBatchRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long ModifyNodeSpecBatchRequest::getOwnerId()const +{ + return ownerId_; +} + +void ModifyNodeSpecBatchRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string ModifyNodeSpecBatchRequest::getOrderType()const +{ + return orderType_; +} + +void ModifyNodeSpecBatchRequest::setOrderType(const std::string& orderType) +{ + orderType_ = orderType; + setParameter("OrderType", orderType); +} + diff --git a/dds/src/model/ModifyNodeSpecBatchResult.cc b/dds/src/model/ModifyNodeSpecBatchResult.cc new file mode 100644 index 000000000..d5962df27 --- /dev/null +++ b/dds/src/model/ModifyNodeSpecBatchResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Dds; +using namespace AlibabaCloud::Dds::Model; + +ModifyNodeSpecBatchResult::ModifyNodeSpecBatchResult() : + ServiceResult() +{} + +ModifyNodeSpecBatchResult::ModifyNodeSpecBatchResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyNodeSpecBatchResult::~ModifyNodeSpecBatchResult() +{} + +void ModifyNodeSpecBatchResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["OrderId"].isNull()) + orderId_ = value["OrderId"].asString(); + +} + +std::string ModifyNodeSpecBatchResult::getOrderId()const +{ + return orderId_; +} + diff --git a/dds/src/model/ModifyResourceGroupRequest.cc b/dds/src/model/ModifyResourceGroupRequest.cc new file mode 100644 index 000000000..079ab7d37 --- /dev/null +++ b/dds/src/model/ModifyResourceGroupRequest.cc @@ -0,0 +1,128 @@ +/* + * 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 + +using AlibabaCloud::Dds::Model::ModifyResourceGroupRequest; + +ModifyResourceGroupRequest::ModifyResourceGroupRequest() : + RpcServiceRequest("dds", "2015-12-01", "ModifyResourceGroup") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyResourceGroupRequest::~ModifyResourceGroupRequest() +{} + +long ModifyResourceGroupRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void ModifyResourceGroupRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string ModifyResourceGroupRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ModifyResourceGroupRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ModifyResourceGroupRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void ModifyResourceGroupRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string ModifyResourceGroupRequest::getSecurityToken()const +{ + return securityToken_; +} + +void ModifyResourceGroupRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string ModifyResourceGroupRequest::getRegionId()const +{ + return regionId_; +} + +void ModifyResourceGroupRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ModifyResourceGroupRequest::getDBInstanceId()const +{ + return dBInstanceId_; +} + +void ModifyResourceGroupRequest::setDBInstanceId(const std::string& dBInstanceId) +{ + dBInstanceId_ = dBInstanceId; + setParameter("DBInstanceId", dBInstanceId); +} + +std::string ModifyResourceGroupRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void ModifyResourceGroupRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string ModifyResourceGroupRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void ModifyResourceGroupRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long ModifyResourceGroupRequest::getOwnerId()const +{ + return ownerId_; +} + +void ModifyResourceGroupRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/dds/src/model/ModifyResourceGroupResult.cc b/dds/src/model/ModifyResourceGroupResult.cc new file mode 100644 index 000000000..a2685fc07 --- /dev/null +++ b/dds/src/model/ModifyResourceGroupResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Dds; +using namespace AlibabaCloud::Dds::Model; + +ModifyResourceGroupResult::ModifyResourceGroupResult() : + ServiceResult() +{} + +ModifyResourceGroupResult::ModifyResourceGroupResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyResourceGroupResult::~ModifyResourceGroupResult() +{} + +void ModifyResourceGroupResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +