diff --git a/CHANGELOG b/CHANGELOG index d0d670385..f28dedea2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,12 @@ +2021-06-22 Version: 1.36.796 +- Supported CreateGlobalDatabaseNetwork for PolarDB Global Database Network. +- Supported ModifyGlobalDatabaseNetwork for PolarDB Global Database Network. +- Supported DeleteGlobalDatabaseNetwork for PolarDB Global Database Network. +- Supported DescribeGlobalDatabaseNetworks for PolarDB Global Database Network. +- Supported DescribeGlobalDatabaseNetwork for PolarDB Global Database Network. +- Supported RemoveDBClusterFromGDN for PolarDB Global Database Network. +- Supported parameter SSLEnabled for ModifyDBClusterSSL changed to non-required. + 2021-06-21 Version: 1.36.795 - Public V430. diff --git a/VERSION b/VERSION index 5c8511bf5..d84d8bb68 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.795 \ No newline at end of file +1.36.796 \ No newline at end of file diff --git a/polardb/CMakeLists.txt b/polardb/CMakeLists.txt index e420a0bea..09312c5ee 100644 --- a/polardb/CMakeLists.txt +++ b/polardb/CMakeLists.txt @@ -45,6 +45,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/CreateDBNodesResult.h include/alibabacloud/polardb/model/CreateDatabaseRequest.h include/alibabacloud/polardb/model/CreateDatabaseResult.h + include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkRequest.h + include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkResult.h include/alibabacloud/polardb/model/CreateParameterGroupRequest.h include/alibabacloud/polardb/model/CreateParameterGroupResult.h include/alibabacloud/polardb/model/DeleteAccountRequest.h @@ -63,6 +65,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/DeleteDBNodesResult.h include/alibabacloud/polardb/model/DeleteDatabaseRequest.h include/alibabacloud/polardb/model/DeleteDatabaseResult.h + include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkRequest.h + include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkResult.h include/alibabacloud/polardb/model/DeleteParameterGroupRequest.h include/alibabacloud/polardb/model/DeleteParameterGroupResult.h include/alibabacloud/polardb/model/DescribeAccountsRequest.h @@ -117,6 +121,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/DescribeDatabasesResult.h include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h include/alibabacloud/polardb/model/DescribeDetachedBackupsResult.h + include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkRequest.h + include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkResult.h include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksRequest.h include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h include/alibabacloud/polardb/model/DescribeLogBackupPolicyRequest.h @@ -185,10 +191,14 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/ModifyDBEndpointAddressResult.h include/alibabacloud/polardb/model/ModifyDBNodeClassRequest.h include/alibabacloud/polardb/model/ModifyDBNodeClassResult.h + include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkRequest.h + include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkResult.h include/alibabacloud/polardb/model/ModifyLogBackupPolicyRequest.h include/alibabacloud/polardb/model/ModifyLogBackupPolicyResult.h include/alibabacloud/polardb/model/ModifyPendingMaintenanceActionRequest.h include/alibabacloud/polardb/model/ModifyPendingMaintenanceActionResult.h + include/alibabacloud/polardb/model/RemoveDBClusterFromGDNRequest.h + include/alibabacloud/polardb/model/RemoveDBClusterFromGDNResult.h include/alibabacloud/polardb/model/ResetAccountRequest.h include/alibabacloud/polardb/model/ResetAccountResult.h include/alibabacloud/polardb/model/RestartDBNodeRequest.h @@ -234,6 +244,8 @@ set(polardb_src src/model/CreateDBNodesResult.cc src/model/CreateDatabaseRequest.cc src/model/CreateDatabaseResult.cc + src/model/CreateGlobalDatabaseNetworkRequest.cc + src/model/CreateGlobalDatabaseNetworkResult.cc src/model/CreateParameterGroupRequest.cc src/model/CreateParameterGroupResult.cc src/model/DeleteAccountRequest.cc @@ -252,6 +264,8 @@ set(polardb_src src/model/DeleteDBNodesResult.cc src/model/DeleteDatabaseRequest.cc src/model/DeleteDatabaseResult.cc + src/model/DeleteGlobalDatabaseNetworkRequest.cc + src/model/DeleteGlobalDatabaseNetworkResult.cc src/model/DeleteParameterGroupRequest.cc src/model/DeleteParameterGroupResult.cc src/model/DescribeAccountsRequest.cc @@ -306,6 +320,8 @@ set(polardb_src src/model/DescribeDatabasesResult.cc src/model/DescribeDetachedBackupsRequest.cc src/model/DescribeDetachedBackupsResult.cc + src/model/DescribeGlobalDatabaseNetworkRequest.cc + src/model/DescribeGlobalDatabaseNetworkResult.cc src/model/DescribeGlobalDatabaseNetworksRequest.cc src/model/DescribeGlobalDatabaseNetworksResult.cc src/model/DescribeLogBackupPolicyRequest.cc @@ -374,10 +390,14 @@ set(polardb_src src/model/ModifyDBEndpointAddressResult.cc src/model/ModifyDBNodeClassRequest.cc src/model/ModifyDBNodeClassResult.cc + src/model/ModifyGlobalDatabaseNetworkRequest.cc + src/model/ModifyGlobalDatabaseNetworkResult.cc src/model/ModifyLogBackupPolicyRequest.cc src/model/ModifyLogBackupPolicyResult.cc src/model/ModifyPendingMaintenanceActionRequest.cc src/model/ModifyPendingMaintenanceActionResult.cc + src/model/RemoveDBClusterFromGDNRequest.cc + src/model/RemoveDBClusterFromGDNResult.cc src/model/ResetAccountRequest.cc src/model/ResetAccountResult.cc src/model/RestartDBNodeRequest.cc diff --git a/polardb/include/alibabacloud/polardb/PolardbClient.h b/polardb/include/alibabacloud/polardb/PolardbClient.h index 3c3df6773..0dfdd8dcc 100644 --- a/polardb/include/alibabacloud/polardb/PolardbClient.h +++ b/polardb/include/alibabacloud/polardb/PolardbClient.h @@ -46,6 +46,8 @@ #include "model/CreateDBNodesResult.h" #include "model/CreateDatabaseRequest.h" #include "model/CreateDatabaseResult.h" +#include "model/CreateGlobalDatabaseNetworkRequest.h" +#include "model/CreateGlobalDatabaseNetworkResult.h" #include "model/CreateParameterGroupRequest.h" #include "model/CreateParameterGroupResult.h" #include "model/DeleteAccountRequest.h" @@ -64,6 +66,8 @@ #include "model/DeleteDBNodesResult.h" #include "model/DeleteDatabaseRequest.h" #include "model/DeleteDatabaseResult.h" +#include "model/DeleteGlobalDatabaseNetworkRequest.h" +#include "model/DeleteGlobalDatabaseNetworkResult.h" #include "model/DeleteParameterGroupRequest.h" #include "model/DeleteParameterGroupResult.h" #include "model/DescribeAccountsRequest.h" @@ -118,6 +122,8 @@ #include "model/DescribeDatabasesResult.h" #include "model/DescribeDetachedBackupsRequest.h" #include "model/DescribeDetachedBackupsResult.h" +#include "model/DescribeGlobalDatabaseNetworkRequest.h" +#include "model/DescribeGlobalDatabaseNetworkResult.h" #include "model/DescribeGlobalDatabaseNetworksRequest.h" #include "model/DescribeGlobalDatabaseNetworksResult.h" #include "model/DescribeLogBackupPolicyRequest.h" @@ -186,10 +192,14 @@ #include "model/ModifyDBEndpointAddressResult.h" #include "model/ModifyDBNodeClassRequest.h" #include "model/ModifyDBNodeClassResult.h" +#include "model/ModifyGlobalDatabaseNetworkRequest.h" +#include "model/ModifyGlobalDatabaseNetworkResult.h" #include "model/ModifyLogBackupPolicyRequest.h" #include "model/ModifyLogBackupPolicyResult.h" #include "model/ModifyPendingMaintenanceActionRequest.h" #include "model/ModifyPendingMaintenanceActionResult.h" +#include "model/RemoveDBClusterFromGDNRequest.h" +#include "model/RemoveDBClusterFromGDNResult.h" #include "model/ResetAccountRequest.h" #include "model/ResetAccountResult.h" #include "model/RestartDBNodeRequest.h" @@ -253,6 +263,9 @@ namespace AlibabaCloud typedef Outcome CreateDatabaseOutcome; typedef std::future CreateDatabaseOutcomeCallable; typedef std::function&)> CreateDatabaseAsyncHandler; + typedef Outcome CreateGlobalDatabaseNetworkOutcome; + typedef std::future CreateGlobalDatabaseNetworkOutcomeCallable; + typedef std::function&)> CreateGlobalDatabaseNetworkAsyncHandler; typedef Outcome CreateParameterGroupOutcome; typedef std::future CreateParameterGroupOutcomeCallable; typedef std::function&)> CreateParameterGroupAsyncHandler; @@ -280,6 +293,9 @@ namespace AlibabaCloud typedef Outcome DeleteDatabaseOutcome; typedef std::future DeleteDatabaseOutcomeCallable; typedef std::function&)> DeleteDatabaseAsyncHandler; + typedef Outcome DeleteGlobalDatabaseNetworkOutcome; + typedef std::future DeleteGlobalDatabaseNetworkOutcomeCallable; + typedef std::function&)> DeleteGlobalDatabaseNetworkAsyncHandler; typedef Outcome DeleteParameterGroupOutcome; typedef std::future DeleteParameterGroupOutcomeCallable; typedef std::function&)> DeleteParameterGroupAsyncHandler; @@ -361,6 +377,9 @@ namespace AlibabaCloud typedef Outcome DescribeDetachedBackupsOutcome; typedef std::future DescribeDetachedBackupsOutcomeCallable; typedef std::function&)> DescribeDetachedBackupsAsyncHandler; + typedef Outcome DescribeGlobalDatabaseNetworkOutcome; + typedef std::future DescribeGlobalDatabaseNetworkOutcomeCallable; + typedef std::function&)> DescribeGlobalDatabaseNetworkAsyncHandler; typedef Outcome DescribeGlobalDatabaseNetworksOutcome; typedef std::future DescribeGlobalDatabaseNetworksOutcomeCallable; typedef std::function&)> DescribeGlobalDatabaseNetworksAsyncHandler; @@ -463,12 +482,18 @@ namespace AlibabaCloud typedef Outcome ModifyDBNodeClassOutcome; typedef std::future ModifyDBNodeClassOutcomeCallable; typedef std::function&)> ModifyDBNodeClassAsyncHandler; + typedef Outcome ModifyGlobalDatabaseNetworkOutcome; + typedef std::future ModifyGlobalDatabaseNetworkOutcomeCallable; + typedef std::function&)> ModifyGlobalDatabaseNetworkAsyncHandler; typedef Outcome ModifyLogBackupPolicyOutcome; typedef std::future ModifyLogBackupPolicyOutcomeCallable; typedef std::function&)> ModifyLogBackupPolicyAsyncHandler; typedef Outcome ModifyPendingMaintenanceActionOutcome; typedef std::future ModifyPendingMaintenanceActionOutcomeCallable; typedef std::function&)> ModifyPendingMaintenanceActionAsyncHandler; + typedef Outcome RemoveDBClusterFromGDNOutcome; + typedef std::future RemoveDBClusterFromGDNOutcomeCallable; + typedef std::function&)> RemoveDBClusterFromGDNAsyncHandler; typedef Outcome ResetAccountOutcome; typedef std::future ResetAccountOutcomeCallable; typedef std::function&)> ResetAccountAsyncHandler; @@ -537,6 +562,9 @@ namespace AlibabaCloud CreateDatabaseOutcome createDatabase(const Model::CreateDatabaseRequest &request)const; void createDatabaseAsync(const Model::CreateDatabaseRequest& request, const CreateDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateDatabaseOutcomeCallable createDatabaseCallable(const Model::CreateDatabaseRequest& request) const; + CreateGlobalDatabaseNetworkOutcome createGlobalDatabaseNetwork(const Model::CreateGlobalDatabaseNetworkRequest &request)const; + void createGlobalDatabaseNetworkAsync(const Model::CreateGlobalDatabaseNetworkRequest& request, const CreateGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateGlobalDatabaseNetworkOutcomeCallable createGlobalDatabaseNetworkCallable(const Model::CreateGlobalDatabaseNetworkRequest& request) const; CreateParameterGroupOutcome createParameterGroup(const Model::CreateParameterGroupRequest &request)const; void createParameterGroupAsync(const Model::CreateParameterGroupRequest& request, const CreateParameterGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateParameterGroupOutcomeCallable createParameterGroupCallable(const Model::CreateParameterGroupRequest& request) const; @@ -564,6 +592,9 @@ namespace AlibabaCloud DeleteDatabaseOutcome deleteDatabase(const Model::DeleteDatabaseRequest &request)const; void deleteDatabaseAsync(const Model::DeleteDatabaseRequest& request, const DeleteDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteDatabaseOutcomeCallable deleteDatabaseCallable(const Model::DeleteDatabaseRequest& request) const; + DeleteGlobalDatabaseNetworkOutcome deleteGlobalDatabaseNetwork(const Model::DeleteGlobalDatabaseNetworkRequest &request)const; + void deleteGlobalDatabaseNetworkAsync(const Model::DeleteGlobalDatabaseNetworkRequest& request, const DeleteGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteGlobalDatabaseNetworkOutcomeCallable deleteGlobalDatabaseNetworkCallable(const Model::DeleteGlobalDatabaseNetworkRequest& request) const; DeleteParameterGroupOutcome deleteParameterGroup(const Model::DeleteParameterGroupRequest &request)const; void deleteParameterGroupAsync(const Model::DeleteParameterGroupRequest& request, const DeleteParameterGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteParameterGroupOutcomeCallable deleteParameterGroupCallable(const Model::DeleteParameterGroupRequest& request) const; @@ -645,6 +676,9 @@ namespace AlibabaCloud DescribeDetachedBackupsOutcome describeDetachedBackups(const Model::DescribeDetachedBackupsRequest &request)const; void describeDetachedBackupsAsync(const Model::DescribeDetachedBackupsRequest& request, const DescribeDetachedBackupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDetachedBackupsOutcomeCallable describeDetachedBackupsCallable(const Model::DescribeDetachedBackupsRequest& request) const; + DescribeGlobalDatabaseNetworkOutcome describeGlobalDatabaseNetwork(const Model::DescribeGlobalDatabaseNetworkRequest &request)const; + void describeGlobalDatabaseNetworkAsync(const Model::DescribeGlobalDatabaseNetworkRequest& request, const DescribeGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeGlobalDatabaseNetworkOutcomeCallable describeGlobalDatabaseNetworkCallable(const Model::DescribeGlobalDatabaseNetworkRequest& request) const; DescribeGlobalDatabaseNetworksOutcome describeGlobalDatabaseNetworks(const Model::DescribeGlobalDatabaseNetworksRequest &request)const; void describeGlobalDatabaseNetworksAsync(const Model::DescribeGlobalDatabaseNetworksRequest& request, const DescribeGlobalDatabaseNetworksAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeGlobalDatabaseNetworksOutcomeCallable describeGlobalDatabaseNetworksCallable(const Model::DescribeGlobalDatabaseNetworksRequest& request) const; @@ -747,12 +781,18 @@ namespace AlibabaCloud ModifyDBNodeClassOutcome modifyDBNodeClass(const Model::ModifyDBNodeClassRequest &request)const; void modifyDBNodeClassAsync(const Model::ModifyDBNodeClassRequest& request, const ModifyDBNodeClassAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyDBNodeClassOutcomeCallable modifyDBNodeClassCallable(const Model::ModifyDBNodeClassRequest& request) const; + ModifyGlobalDatabaseNetworkOutcome modifyGlobalDatabaseNetwork(const Model::ModifyGlobalDatabaseNetworkRequest &request)const; + void modifyGlobalDatabaseNetworkAsync(const Model::ModifyGlobalDatabaseNetworkRequest& request, const ModifyGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyGlobalDatabaseNetworkOutcomeCallable modifyGlobalDatabaseNetworkCallable(const Model::ModifyGlobalDatabaseNetworkRequest& request) const; ModifyLogBackupPolicyOutcome modifyLogBackupPolicy(const Model::ModifyLogBackupPolicyRequest &request)const; void modifyLogBackupPolicyAsync(const Model::ModifyLogBackupPolicyRequest& request, const ModifyLogBackupPolicyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyLogBackupPolicyOutcomeCallable modifyLogBackupPolicyCallable(const Model::ModifyLogBackupPolicyRequest& request) const; ModifyPendingMaintenanceActionOutcome modifyPendingMaintenanceAction(const Model::ModifyPendingMaintenanceActionRequest &request)const; void modifyPendingMaintenanceActionAsync(const Model::ModifyPendingMaintenanceActionRequest& request, const ModifyPendingMaintenanceActionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyPendingMaintenanceActionOutcomeCallable modifyPendingMaintenanceActionCallable(const Model::ModifyPendingMaintenanceActionRequest& request) const; + RemoveDBClusterFromGDNOutcome removeDBClusterFromGDN(const Model::RemoveDBClusterFromGDNRequest &request)const; + void removeDBClusterFromGDNAsync(const Model::RemoveDBClusterFromGDNRequest& request, const RemoveDBClusterFromGDNAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RemoveDBClusterFromGDNOutcomeCallable removeDBClusterFromGDNCallable(const Model::RemoveDBClusterFromGDNRequest& request) const; ResetAccountOutcome resetAccount(const Model::ResetAccountRequest &request)const; void resetAccountAsync(const Model::ResetAccountRequest& request, const ResetAccountAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ResetAccountOutcomeCallable resetAccountCallable(const Model::ResetAccountRequest& request) const; diff --git a/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkRequest.h b/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkRequest.h new file mode 100644 index 000000000..37c257095 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkRequest.h @@ -0,0 +1,69 @@ +/* + * 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_CREATEGLOBALDATABASENETWORKREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_CREATEGLOBALDATABASENETWORKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT CreateGlobalDatabaseNetworkRequest : public RpcServiceRequest + { + + public: + CreateGlobalDatabaseNetworkRequest(); + ~CreateGlobalDatabaseNetworkRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getGDNDescription()const; + void setGDNDescription(const std::string& gDNDescription); + 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); + long getOwnerId()const; + void setOwnerId(long ownerId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string gDNDescription_; + std::string resourceOwnerAccount_; + std::string dBClusterId_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_CREATEGLOBALDATABASENETWORKREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkResult.h b/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkResult.h new file mode 100644 index 000000000..af1a5fc62 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/CreateGlobalDatabaseNetworkResult.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_POLARDB_MODEL_CREATEGLOBALDATABASENETWORKRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_CREATEGLOBALDATABASENETWORKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT CreateGlobalDatabaseNetworkResult : public ServiceResult + { + public: + + + CreateGlobalDatabaseNetworkResult(); + explicit CreateGlobalDatabaseNetworkResult(const std::string &payload); + ~CreateGlobalDatabaseNetworkResult(); + std::string getGDNId()const; + + protected: + void parse(const std::string &payload); + private: + std::string gDNId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_CREATEGLOBALDATABASENETWORKRESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkRequest.h b/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkRequest.h new file mode 100644 index 000000000..915b6d9a0 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DeleteGlobalDatabaseNetworkRequest : public RpcServiceRequest + { + + public: + DeleteGlobalDatabaseNetworkRequest(); + ~DeleteGlobalDatabaseNetworkRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getGDNId()const; + void setGDNId(const std::string& gDNId); + 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 securityToken_; + std::string gDNId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkResult.h b/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkResult.h new file mode 100644 index 000000000..e6629e631 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DeleteGlobalDatabaseNetworkResult.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_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DeleteGlobalDatabaseNetworkResult : public ServiceResult + { + public: + + + DeleteGlobalDatabaseNetworkResult(); + explicit DeleteGlobalDatabaseNetworkResult(const std::string &payload); + ~DeleteGlobalDatabaseNetworkResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DELETEGLOBALDATABASENETWORKRESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h b/polardb/include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h index 4ebbebe56..aa0d03c53 100644 --- a/polardb/include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h +++ b/polardb/include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h @@ -52,8 +52,8 @@ namespace AlibabaCloud std::string getDBVersion()const; std::string getEndTime()const; std::string getStartTime()const; - std::string getDBNodeId()const; std::string getDBType()const; + std::string getDBNodeId()const; std::string getEngine()const; protected: @@ -63,8 +63,8 @@ namespace AlibabaCloud std::string dBVersion_; std::string endTime_; std::string startTime_; - std::string dBNodeId_; std::string dBType_; + std::string dBNodeId_; std::string engine_; }; diff --git a/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkRequest.h b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkRequest.h new file mode 100644 index 000000000..b454459ee --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DescribeGlobalDatabaseNetworkRequest : public RpcServiceRequest + { + + public: + DescribeGlobalDatabaseNetworkRequest(); + ~DescribeGlobalDatabaseNetworkRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getGDNId()const; + void setGDNId(const std::string& gDNId); + 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 securityToken_; + std::string gDNId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkResult.h b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkResult.h new file mode 100644 index 000000000..9fd46e995 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworkResult.h @@ -0,0 +1,87 @@ +/* + * 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_DESCRIBEGLOBALDATABASENETWORKRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DescribeGlobalDatabaseNetworkResult : public ServiceResult + { + public: + struct Connection + { + std::string port; + std::string connectionString; + std::string netType; + }; + struct DBCluster + { + std::string dBClusterStatus; + std::string dBClusterId; + std::string dBClusterDescription; + std::string expired; + std::string payType; + std::string dBType; + std::string replicaLag; + std::string dBNodeClass; + std::string storageUsed; + std::string role; + std::string dBVersion; + std::string regionId; + std::string expireTime; + }; + + + DescribeGlobalDatabaseNetworkResult(); + explicit DescribeGlobalDatabaseNetworkResult(const std::string &payload); + ~DescribeGlobalDatabaseNetworkResult(); + std::vector getConnections()const; + std::string getGDNStatus()const; + std::string getDBVersion()const; + std::string getGDNId()const; + std::string getCreateTime()const; + std::string getDBType()const; + std::string getGDNDescription()const; + std::vector getDBClusters()const; + + protected: + void parse(const std::string &payload); + private: + std::vector connections_; + std::string gDNStatus_; + std::string dBVersion_; + std::string gDNId_; + std::string createTime_; + std::string dBType_; + std::string gDNDescription_; + std::vector dBClusters_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKRESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h index 90c043083..a23dd77d5 100644 --- a/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h +++ b/polardb/include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h @@ -44,8 +44,8 @@ namespace AlibabaCloud std::string dBVersion; std::string gDNId; std::string createTime; - std::string gDNDescription; std::string dBType; + std::string gDNDescription; std::vector dBClusters; }; diff --git a/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkRequest.h b/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkRequest.h new file mode 100644 index 000000000..c0a735d47 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkRequest.h @@ -0,0 +1,69 @@ +/* + * 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_MODIFYGLOBALDATABASENETWORKREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_MODIFYGLOBALDATABASENETWORKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ModifyGlobalDatabaseNetworkRequest : public RpcServiceRequest + { + + public: + ModifyGlobalDatabaseNetworkRequest(); + ~ModifyGlobalDatabaseNetworkRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getGDNId()const; + void setGDNId(const std::string& gDNId); + std::string getGDNDescription()const; + void setGDNDescription(const std::string& gDNDescription); + 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 securityToken_; + std::string gDNId_; + std::string gDNDescription_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYGLOBALDATABASENETWORKREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkResult.h b/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkResult.h new file mode 100644 index 000000000..7b7878926 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkResult.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_POLARDB_MODEL_MODIFYGLOBALDATABASENETWORKRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_MODIFYGLOBALDATABASENETWORKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ModifyGlobalDatabaseNetworkResult : public ServiceResult + { + public: + + + ModifyGlobalDatabaseNetworkResult(); + explicit ModifyGlobalDatabaseNetworkResult(const std::string &payload); + ~ModifyGlobalDatabaseNetworkResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYGLOBALDATABASENETWORKRESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNRequest.h b/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNRequest.h new file mode 100644 index 000000000..651813449 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNRequest.h @@ -0,0 +1,69 @@ +/* + * 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_REMOVEDBCLUSTERFROMGDNREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_REMOVEDBCLUSTERFROMGDNREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT RemoveDBClusterFromGDNRequest : public RpcServiceRequest + { + + public: + RemoveDBClusterFromGDNRequest(); + ~RemoveDBClusterFromGDNRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getGDNId()const; + void setGDNId(const std::string& gDNId); + 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); + long getOwnerId()const; + void setOwnerId(long ownerId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string gDNId_; + std::string resourceOwnerAccount_; + std::string dBClusterId_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_REMOVEDBCLUSTERFROMGDNREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNResult.h b/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNResult.h new file mode 100644 index 000000000..c6bae0c1f --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/RemoveDBClusterFromGDNResult.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_POLARDB_MODEL_REMOVEDBCLUSTERFROMGDNRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_REMOVEDBCLUSTERFROMGDNRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT RemoveDBClusterFromGDNResult : public ServiceResult + { + public: + + + RemoveDBClusterFromGDNResult(); + explicit RemoveDBClusterFromGDNResult(const std::string &payload); + ~RemoveDBClusterFromGDNResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_REMOVEDBCLUSTERFROMGDNRESULT_H_ \ No newline at end of file diff --git a/polardb/src/PolardbClient.cc b/polardb/src/PolardbClient.cc index d88454c09..e27751229 100644 --- a/polardb/src/PolardbClient.cc +++ b/polardb/src/PolardbClient.cc @@ -483,6 +483,42 @@ PolardbClient::CreateDatabaseOutcomeCallable PolardbClient::createDatabaseCallab return task->get_future(); } +PolardbClient::CreateGlobalDatabaseNetworkOutcome PolardbClient::createGlobalDatabaseNetwork(const CreateGlobalDatabaseNetworkRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateGlobalDatabaseNetworkOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateGlobalDatabaseNetworkOutcome(CreateGlobalDatabaseNetworkResult(outcome.result())); + else + return CreateGlobalDatabaseNetworkOutcome(outcome.error()); +} + +void PolardbClient::createGlobalDatabaseNetworkAsync(const CreateGlobalDatabaseNetworkRequest& request, const CreateGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createGlobalDatabaseNetwork(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::CreateGlobalDatabaseNetworkOutcomeCallable PolardbClient::createGlobalDatabaseNetworkCallable(const CreateGlobalDatabaseNetworkRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createGlobalDatabaseNetwork(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::CreateParameterGroupOutcome PolardbClient::createParameterGroup(const CreateParameterGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -807,6 +843,42 @@ PolardbClient::DeleteDatabaseOutcomeCallable PolardbClient::deleteDatabaseCallab return task->get_future(); } +PolardbClient::DeleteGlobalDatabaseNetworkOutcome PolardbClient::deleteGlobalDatabaseNetwork(const DeleteGlobalDatabaseNetworkRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteGlobalDatabaseNetworkOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteGlobalDatabaseNetworkOutcome(DeleteGlobalDatabaseNetworkResult(outcome.result())); + else + return DeleteGlobalDatabaseNetworkOutcome(outcome.error()); +} + +void PolardbClient::deleteGlobalDatabaseNetworkAsync(const DeleteGlobalDatabaseNetworkRequest& request, const DeleteGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteGlobalDatabaseNetwork(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::DeleteGlobalDatabaseNetworkOutcomeCallable PolardbClient::deleteGlobalDatabaseNetworkCallable(const DeleteGlobalDatabaseNetworkRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteGlobalDatabaseNetwork(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::DeleteParameterGroupOutcome PolardbClient::deleteParameterGroup(const DeleteParameterGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1779,6 +1851,42 @@ PolardbClient::DescribeDetachedBackupsOutcomeCallable PolardbClient::describeDet return task->get_future(); } +PolardbClient::DescribeGlobalDatabaseNetworkOutcome PolardbClient::describeGlobalDatabaseNetwork(const DescribeGlobalDatabaseNetworkRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeGlobalDatabaseNetworkOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeGlobalDatabaseNetworkOutcome(DescribeGlobalDatabaseNetworkResult(outcome.result())); + else + return DescribeGlobalDatabaseNetworkOutcome(outcome.error()); +} + +void PolardbClient::describeGlobalDatabaseNetworkAsync(const DescribeGlobalDatabaseNetworkRequest& request, const DescribeGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeGlobalDatabaseNetwork(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::DescribeGlobalDatabaseNetworkOutcomeCallable PolardbClient::describeGlobalDatabaseNetworkCallable(const DescribeGlobalDatabaseNetworkRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeGlobalDatabaseNetwork(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::DescribeGlobalDatabaseNetworksOutcome PolardbClient::describeGlobalDatabaseNetworks(const DescribeGlobalDatabaseNetworksRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3003,6 +3111,42 @@ PolardbClient::ModifyDBNodeClassOutcomeCallable PolardbClient::modifyDBNodeClass return task->get_future(); } +PolardbClient::ModifyGlobalDatabaseNetworkOutcome PolardbClient::modifyGlobalDatabaseNetwork(const ModifyGlobalDatabaseNetworkRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyGlobalDatabaseNetworkOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyGlobalDatabaseNetworkOutcome(ModifyGlobalDatabaseNetworkResult(outcome.result())); + else + return ModifyGlobalDatabaseNetworkOutcome(outcome.error()); +} + +void PolardbClient::modifyGlobalDatabaseNetworkAsync(const ModifyGlobalDatabaseNetworkRequest& request, const ModifyGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyGlobalDatabaseNetwork(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::ModifyGlobalDatabaseNetworkOutcomeCallable PolardbClient::modifyGlobalDatabaseNetworkCallable(const ModifyGlobalDatabaseNetworkRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyGlobalDatabaseNetwork(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::ModifyLogBackupPolicyOutcome PolardbClient::modifyLogBackupPolicy(const ModifyLogBackupPolicyRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3075,6 +3219,42 @@ PolardbClient::ModifyPendingMaintenanceActionOutcomeCallable PolardbClient::modi return task->get_future(); } +PolardbClient::RemoveDBClusterFromGDNOutcome PolardbClient::removeDBClusterFromGDN(const RemoveDBClusterFromGDNRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RemoveDBClusterFromGDNOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RemoveDBClusterFromGDNOutcome(RemoveDBClusterFromGDNResult(outcome.result())); + else + return RemoveDBClusterFromGDNOutcome(outcome.error()); +} + +void PolardbClient::removeDBClusterFromGDNAsync(const RemoveDBClusterFromGDNRequest& request, const RemoveDBClusterFromGDNAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, removeDBClusterFromGDN(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::RemoveDBClusterFromGDNOutcomeCallable PolardbClient::removeDBClusterFromGDNCallable(const RemoveDBClusterFromGDNRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->removeDBClusterFromGDN(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::ResetAccountOutcome PolardbClient::resetAccount(const ResetAccountRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/polardb/src/model/CreateGlobalDatabaseNetworkRequest.cc b/polardb/src/model/CreateGlobalDatabaseNetworkRequest.cc new file mode 100644 index 000000000..75df92dfa --- /dev/null +++ b/polardb/src/model/CreateGlobalDatabaseNetworkRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Polardb::Model::CreateGlobalDatabaseNetworkRequest; + +CreateGlobalDatabaseNetworkRequest::CreateGlobalDatabaseNetworkRequest() : + RpcServiceRequest("polardb", "2017-08-01", "CreateGlobalDatabaseNetwork") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateGlobalDatabaseNetworkRequest::~CreateGlobalDatabaseNetworkRequest() +{} + +long CreateGlobalDatabaseNetworkRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void CreateGlobalDatabaseNetworkRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string CreateGlobalDatabaseNetworkRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void CreateGlobalDatabaseNetworkRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string CreateGlobalDatabaseNetworkRequest::getSecurityToken()const +{ + return securityToken_; +} + +void CreateGlobalDatabaseNetworkRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string CreateGlobalDatabaseNetworkRequest::getGDNDescription()const +{ + return gDNDescription_; +} + +void CreateGlobalDatabaseNetworkRequest::setGDNDescription(const std::string& gDNDescription) +{ + gDNDescription_ = gDNDescription; + setParameter("GDNDescription", gDNDescription); +} + +std::string CreateGlobalDatabaseNetworkRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void CreateGlobalDatabaseNetworkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string CreateGlobalDatabaseNetworkRequest::getDBClusterId()const +{ + return dBClusterId_; +} + +void CreateGlobalDatabaseNetworkRequest::setDBClusterId(const std::string& dBClusterId) +{ + dBClusterId_ = dBClusterId; + setParameter("DBClusterId", dBClusterId); +} + +std::string CreateGlobalDatabaseNetworkRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void CreateGlobalDatabaseNetworkRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long CreateGlobalDatabaseNetworkRequest::getOwnerId()const +{ + return ownerId_; +} + +void CreateGlobalDatabaseNetworkRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/CreateGlobalDatabaseNetworkResult.cc b/polardb/src/model/CreateGlobalDatabaseNetworkResult.cc new file mode 100644 index 000000000..ba8891863 --- /dev/null +++ b/polardb/src/model/CreateGlobalDatabaseNetworkResult.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::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +CreateGlobalDatabaseNetworkResult::CreateGlobalDatabaseNetworkResult() : + ServiceResult() +{} + +CreateGlobalDatabaseNetworkResult::CreateGlobalDatabaseNetworkResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateGlobalDatabaseNetworkResult::~CreateGlobalDatabaseNetworkResult() +{} + +void CreateGlobalDatabaseNetworkResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["GDNId"].isNull()) + gDNId_ = value["GDNId"].asString(); + +} + +std::string CreateGlobalDatabaseNetworkResult::getGDNId()const +{ + return gDNId_; +} + diff --git a/polardb/src/model/DeleteGlobalDatabaseNetworkRequest.cc b/polardb/src/model/DeleteGlobalDatabaseNetworkRequest.cc new file mode 100644 index 000000000..324f5198f --- /dev/null +++ b/polardb/src/model/DeleteGlobalDatabaseNetworkRequest.cc @@ -0,0 +1,106 @@ +/* + * 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::Polardb::Model::DeleteGlobalDatabaseNetworkRequest; + +DeleteGlobalDatabaseNetworkRequest::DeleteGlobalDatabaseNetworkRequest() : + RpcServiceRequest("polardb", "2017-08-01", "DeleteGlobalDatabaseNetwork") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteGlobalDatabaseNetworkRequest::~DeleteGlobalDatabaseNetworkRequest() +{} + +long DeleteGlobalDatabaseNetworkRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void DeleteGlobalDatabaseNetworkRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string DeleteGlobalDatabaseNetworkRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void DeleteGlobalDatabaseNetworkRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string DeleteGlobalDatabaseNetworkRequest::getSecurityToken()const +{ + return securityToken_; +} + +void DeleteGlobalDatabaseNetworkRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string DeleteGlobalDatabaseNetworkRequest::getGDNId()const +{ + return gDNId_; +} + +void DeleteGlobalDatabaseNetworkRequest::setGDNId(const std::string& gDNId) +{ + gDNId_ = gDNId; + setParameter("GDNId", gDNId); +} + +std::string DeleteGlobalDatabaseNetworkRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void DeleteGlobalDatabaseNetworkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string DeleteGlobalDatabaseNetworkRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void DeleteGlobalDatabaseNetworkRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long DeleteGlobalDatabaseNetworkRequest::getOwnerId()const +{ + return ownerId_; +} + +void DeleteGlobalDatabaseNetworkRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/DeleteGlobalDatabaseNetworkResult.cc b/polardb/src/model/DeleteGlobalDatabaseNetworkResult.cc new file mode 100644 index 000000000..7da58b9f3 --- /dev/null +++ b/polardb/src/model/DeleteGlobalDatabaseNetworkResult.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::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +DeleteGlobalDatabaseNetworkResult::DeleteGlobalDatabaseNetworkResult() : + ServiceResult() +{} + +DeleteGlobalDatabaseNetworkResult::DeleteGlobalDatabaseNetworkResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteGlobalDatabaseNetworkResult::~DeleteGlobalDatabaseNetworkResult() +{} + +void DeleteGlobalDatabaseNetworkResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/polardb/src/model/DescribeDBNodePerformanceResult.cc b/polardb/src/model/DescribeDBNodePerformanceResult.cc index 20c417f1a..12d899826 100644 --- a/polardb/src/model/DescribeDBNodePerformanceResult.cc +++ b/polardb/src/model/DescribeDBNodePerformanceResult.cc @@ -59,18 +59,18 @@ void DescribeDBNodePerformanceResult::parse(const std::string &payload) } performanceKeys_.push_back(performanceKeysObject); } + if(!value["DBVersion"].isNull()) + dBVersion_ = value["DBVersion"].asString(); + if(!value["EndTime"].isNull()) + endTime_ = value["EndTime"].asString(); + if(!value["StartTime"].isNull()) + startTime_ = value["StartTime"].asString(); + if(!value["DBType"].isNull()) + dBType_ = value["DBType"].asString(); if(!value["DBNodeId"].isNull()) dBNodeId_ = value["DBNodeId"].asString(); if(!value["Engine"].isNull()) engine_ = value["Engine"].asString(); - if(!value["DBType"].isNull()) - dBType_ = value["DBType"].asString(); - if(!value["DBVersion"].isNull()) - dBVersion_ = value["DBVersion"].asString(); - if(!value["StartTime"].isNull()) - startTime_ = value["StartTime"].asString(); - if(!value["EndTime"].isNull()) - endTime_ = value["EndTime"].asString(); } @@ -94,16 +94,16 @@ std::string DescribeDBNodePerformanceResult::getStartTime()const return startTime_; } -std::string DescribeDBNodePerformanceResult::getDBNodeId()const -{ - return dBNodeId_; -} - std::string DescribeDBNodePerformanceResult::getDBType()const { return dBType_; } +std::string DescribeDBNodePerformanceResult::getDBNodeId()const +{ + return dBNodeId_; +} + std::string DescribeDBNodePerformanceResult::getEngine()const { return engine_; diff --git a/polardb/src/model/DescribeGlobalDatabaseNetworkRequest.cc b/polardb/src/model/DescribeGlobalDatabaseNetworkRequest.cc new file mode 100644 index 000000000..e9a0c0056 --- /dev/null +++ b/polardb/src/model/DescribeGlobalDatabaseNetworkRequest.cc @@ -0,0 +1,106 @@ +/* + * 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::Polardb::Model::DescribeGlobalDatabaseNetworkRequest; + +DescribeGlobalDatabaseNetworkRequest::DescribeGlobalDatabaseNetworkRequest() : + RpcServiceRequest("polardb", "2017-08-01", "DescribeGlobalDatabaseNetwork") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeGlobalDatabaseNetworkRequest::~DescribeGlobalDatabaseNetworkRequest() +{} + +long DescribeGlobalDatabaseNetworkRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void DescribeGlobalDatabaseNetworkRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string DescribeGlobalDatabaseNetworkRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void DescribeGlobalDatabaseNetworkRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string DescribeGlobalDatabaseNetworkRequest::getSecurityToken()const +{ + return securityToken_; +} + +void DescribeGlobalDatabaseNetworkRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string DescribeGlobalDatabaseNetworkRequest::getGDNId()const +{ + return gDNId_; +} + +void DescribeGlobalDatabaseNetworkRequest::setGDNId(const std::string& gDNId) +{ + gDNId_ = gDNId; + setParameter("GDNId", gDNId); +} + +std::string DescribeGlobalDatabaseNetworkRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void DescribeGlobalDatabaseNetworkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string DescribeGlobalDatabaseNetworkRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void DescribeGlobalDatabaseNetworkRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long DescribeGlobalDatabaseNetworkRequest::getOwnerId()const +{ + return ownerId_; +} + +void DescribeGlobalDatabaseNetworkRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/DescribeGlobalDatabaseNetworkResult.cc b/polardb/src/model/DescribeGlobalDatabaseNetworkResult.cc new file mode 100644 index 000000000..866acc9f7 --- /dev/null +++ b/polardb/src/model/DescribeGlobalDatabaseNetworkResult.cc @@ -0,0 +1,140 @@ +/* + * 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::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +DescribeGlobalDatabaseNetworkResult::DescribeGlobalDatabaseNetworkResult() : + ServiceResult() +{} + +DescribeGlobalDatabaseNetworkResult::DescribeGlobalDatabaseNetworkResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeGlobalDatabaseNetworkResult::~DescribeGlobalDatabaseNetworkResult() +{} + +void DescribeGlobalDatabaseNetworkResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allConnectionsNode = value["Connections"]["Connection"]; + for (auto valueConnectionsConnection : allConnectionsNode) + { + Connection connectionsObject; + if(!valueConnectionsConnection["ConnectionString"].isNull()) + connectionsObject.connectionString = valueConnectionsConnection["ConnectionString"].asString(); + if(!valueConnectionsConnection["NetType"].isNull()) + connectionsObject.netType = valueConnectionsConnection["NetType"].asString(); + if(!valueConnectionsConnection["Port"].isNull()) + connectionsObject.port = valueConnectionsConnection["Port"].asString(); + connections_.push_back(connectionsObject); + } + auto allDBClustersNode = value["DBClusters"]["DBCluster"]; + for (auto valueDBClustersDBCluster : allDBClustersNode) + { + DBCluster dBClustersObject; + if(!valueDBClustersDBCluster["ReplicaLag"].isNull()) + dBClustersObject.replicaLag = valueDBClustersDBCluster["ReplicaLag"].asString(); + if(!valueDBClustersDBCluster["ExpireTime"].isNull()) + dBClustersObject.expireTime = valueDBClustersDBCluster["ExpireTime"].asString(); + if(!valueDBClustersDBCluster["Expired"].isNull()) + dBClustersObject.expired = valueDBClustersDBCluster["Expired"].asString(); + if(!valueDBClustersDBCluster["DBNodeClass"].isNull()) + dBClustersObject.dBNodeClass = valueDBClustersDBCluster["DBNodeClass"].asString(); + if(!valueDBClustersDBCluster["PayType"].isNull()) + dBClustersObject.payType = valueDBClustersDBCluster["PayType"].asString(); + if(!valueDBClustersDBCluster["DBType"].isNull()) + dBClustersObject.dBType = valueDBClustersDBCluster["DBType"].asString(); + if(!valueDBClustersDBCluster["RegionId"].isNull()) + dBClustersObject.regionId = valueDBClustersDBCluster["RegionId"].asString(); + if(!valueDBClustersDBCluster["DBVersion"].isNull()) + dBClustersObject.dBVersion = valueDBClustersDBCluster["DBVersion"].asString(); + if(!valueDBClustersDBCluster["DBClusterId"].isNull()) + dBClustersObject.dBClusterId = valueDBClustersDBCluster["DBClusterId"].asString(); + if(!valueDBClustersDBCluster["DBClusterStatus"].isNull()) + dBClustersObject.dBClusterStatus = valueDBClustersDBCluster["DBClusterStatus"].asString(); + if(!valueDBClustersDBCluster["StorageUsed"].isNull()) + dBClustersObject.storageUsed = valueDBClustersDBCluster["StorageUsed"].asString(); + if(!valueDBClustersDBCluster["DBClusterDescription"].isNull()) + dBClustersObject.dBClusterDescription = valueDBClustersDBCluster["DBClusterDescription"].asString(); + if(!valueDBClustersDBCluster["Role"].isNull()) + dBClustersObject.role = valueDBClustersDBCluster["Role"].asString(); + dBClusters_.push_back(dBClustersObject); + } + if(!value["GDNStatus"].isNull()) + gDNStatus_ = value["GDNStatus"].asString(); + if(!value["DBVersion"].isNull()) + dBVersion_ = value["DBVersion"].asString(); + if(!value["GDNId"].isNull()) + gDNId_ = value["GDNId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["DBType"].isNull()) + dBType_ = value["DBType"].asString(); + if(!value["GDNDescription"].isNull()) + gDNDescription_ = value["GDNDescription"].asString(); + +} + +std::vector DescribeGlobalDatabaseNetworkResult::getConnections()const +{ + return connections_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getGDNStatus()const +{ + return gDNStatus_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getDBVersion()const +{ + return dBVersion_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getGDNId()const +{ + return gDNId_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getCreateTime()const +{ + return createTime_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getDBType()const +{ + return dBType_; +} + +std::string DescribeGlobalDatabaseNetworkResult::getGDNDescription()const +{ + return gDNDescription_; +} + +std::vector DescribeGlobalDatabaseNetworkResult::getDBClusters()const +{ + return dBClusters_; +} + diff --git a/polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc b/polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc index c21127725..24381b4bc 100644 --- a/polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc +++ b/polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc @@ -43,26 +43,26 @@ void DescribeGlobalDatabaseNetworksResult::parse(const std::string &payload) for (auto valueItemsGlobalDatabaseNetwork : allItemsNode) { GlobalDatabaseNetwork itemsObject; - if(!valueItemsGlobalDatabaseNetwork["GDNStatus"].isNull()) - itemsObject.gDNStatus = valueItemsGlobalDatabaseNetwork["GDNStatus"].asString(); if(!valueItemsGlobalDatabaseNetwork["DBVersion"].isNull()) itemsObject.dBVersion = valueItemsGlobalDatabaseNetwork["DBVersion"].asString(); if(!valueItemsGlobalDatabaseNetwork["GDNId"].isNull()) itemsObject.gDNId = valueItemsGlobalDatabaseNetwork["GDNId"].asString(); if(!valueItemsGlobalDatabaseNetwork["CreateTime"].isNull()) itemsObject.createTime = valueItemsGlobalDatabaseNetwork["CreateTime"].asString(); - if(!valueItemsGlobalDatabaseNetwork["GDNDescription"].isNull()) - itemsObject.gDNDescription = valueItemsGlobalDatabaseNetwork["GDNDescription"].asString(); + if(!valueItemsGlobalDatabaseNetwork["GDNStatus"].isNull()) + itemsObject.gDNStatus = valueItemsGlobalDatabaseNetwork["GDNStatus"].asString(); if(!valueItemsGlobalDatabaseNetwork["DBType"].isNull()) itemsObject.dBType = valueItemsGlobalDatabaseNetwork["DBType"].asString(); + if(!valueItemsGlobalDatabaseNetwork["GDNDescription"].isNull()) + itemsObject.gDNDescription = valueItemsGlobalDatabaseNetwork["GDNDescription"].asString(); auto allDBClustersNode = valueItemsGlobalDatabaseNetwork["DBClusters"]["DBCluster"]; for (auto valueItemsGlobalDatabaseNetworkDBClustersDBCluster : allDBClustersNode) { GlobalDatabaseNetwork::DBCluster dBClustersObject; - if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].isNull()) - dBClustersObject.role = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].asString(); if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["DBClusterId"].isNull()) dBClustersObject.dBClusterId = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["DBClusterId"].asString(); + if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].isNull()) + dBClustersObject.role = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].asString(); if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["RegionId"].isNull()) dBClustersObject.regionId = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["RegionId"].asString(); itemsObject.dBClusters.push_back(dBClustersObject); diff --git a/polardb/src/model/ModifyGlobalDatabaseNetworkRequest.cc b/polardb/src/model/ModifyGlobalDatabaseNetworkRequest.cc new file mode 100644 index 000000000..43146cefb --- /dev/null +++ b/polardb/src/model/ModifyGlobalDatabaseNetworkRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Polardb::Model::ModifyGlobalDatabaseNetworkRequest; + +ModifyGlobalDatabaseNetworkRequest::ModifyGlobalDatabaseNetworkRequest() : + RpcServiceRequest("polardb", "2017-08-01", "ModifyGlobalDatabaseNetwork") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyGlobalDatabaseNetworkRequest::~ModifyGlobalDatabaseNetworkRequest() +{} + +long ModifyGlobalDatabaseNetworkRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void ModifyGlobalDatabaseNetworkRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ModifyGlobalDatabaseNetworkRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getSecurityToken()const +{ + return securityToken_; +} + +void ModifyGlobalDatabaseNetworkRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getGDNId()const +{ + return gDNId_; +} + +void ModifyGlobalDatabaseNetworkRequest::setGDNId(const std::string& gDNId) +{ + gDNId_ = gDNId; + setParameter("GDNId", gDNId); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getGDNDescription()const +{ + return gDNDescription_; +} + +void ModifyGlobalDatabaseNetworkRequest::setGDNDescription(const std::string& gDNDescription) +{ + gDNDescription_ = gDNDescription; + setParameter("GDNDescription", gDNDescription); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void ModifyGlobalDatabaseNetworkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string ModifyGlobalDatabaseNetworkRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void ModifyGlobalDatabaseNetworkRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long ModifyGlobalDatabaseNetworkRequest::getOwnerId()const +{ + return ownerId_; +} + +void ModifyGlobalDatabaseNetworkRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/ModifyGlobalDatabaseNetworkResult.cc b/polardb/src/model/ModifyGlobalDatabaseNetworkResult.cc new file mode 100644 index 000000000..c8f24dcd3 --- /dev/null +++ b/polardb/src/model/ModifyGlobalDatabaseNetworkResult.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::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +ModifyGlobalDatabaseNetworkResult::ModifyGlobalDatabaseNetworkResult() : + ServiceResult() +{} + +ModifyGlobalDatabaseNetworkResult::ModifyGlobalDatabaseNetworkResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyGlobalDatabaseNetworkResult::~ModifyGlobalDatabaseNetworkResult() +{} + +void ModifyGlobalDatabaseNetworkResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/polardb/src/model/RemoveDBClusterFromGDNRequest.cc b/polardb/src/model/RemoveDBClusterFromGDNRequest.cc new file mode 100644 index 000000000..b28c634ad --- /dev/null +++ b/polardb/src/model/RemoveDBClusterFromGDNRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Polardb::Model::RemoveDBClusterFromGDNRequest; + +RemoveDBClusterFromGDNRequest::RemoveDBClusterFromGDNRequest() : + RpcServiceRequest("polardb", "2017-08-01", "RemoveDBClusterFromGDN") +{ + setMethod(HttpRequest::Method::Post); +} + +RemoveDBClusterFromGDNRequest::~RemoveDBClusterFromGDNRequest() +{} + +long RemoveDBClusterFromGDNRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void RemoveDBClusterFromGDNRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string RemoveDBClusterFromGDNRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void RemoveDBClusterFromGDNRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string RemoveDBClusterFromGDNRequest::getSecurityToken()const +{ + return securityToken_; +} + +void RemoveDBClusterFromGDNRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string RemoveDBClusterFromGDNRequest::getGDNId()const +{ + return gDNId_; +} + +void RemoveDBClusterFromGDNRequest::setGDNId(const std::string& gDNId) +{ + gDNId_ = gDNId; + setParameter("GDNId", gDNId); +} + +std::string RemoveDBClusterFromGDNRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void RemoveDBClusterFromGDNRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string RemoveDBClusterFromGDNRequest::getDBClusterId()const +{ + return dBClusterId_; +} + +void RemoveDBClusterFromGDNRequest::setDBClusterId(const std::string& dBClusterId) +{ + dBClusterId_ = dBClusterId; + setParameter("DBClusterId", dBClusterId); +} + +std::string RemoveDBClusterFromGDNRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void RemoveDBClusterFromGDNRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long RemoveDBClusterFromGDNRequest::getOwnerId()const +{ + return ownerId_; +} + +void RemoveDBClusterFromGDNRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/RemoveDBClusterFromGDNResult.cc b/polardb/src/model/RemoveDBClusterFromGDNResult.cc new file mode 100644 index 000000000..0a21a5067 --- /dev/null +++ b/polardb/src/model/RemoveDBClusterFromGDNResult.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::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +RemoveDBClusterFromGDNResult::RemoveDBClusterFromGDNResult() : + ServiceResult() +{} + +RemoveDBClusterFromGDNResult::RemoveDBClusterFromGDNResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RemoveDBClusterFromGDNResult::~RemoveDBClusterFromGDNResult() +{} + +void RemoveDBClusterFromGDNResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +