diff --git a/CHANGELOG b/CHANGELOG index 8d29e14d2..10bb01567 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2020-09-19 Version: patch +- Support query user tenant list and current active tenant. +- Support query table meta information via table GUID. + 2020-09-18 Version: patch - Update DetectLungNodule, DetectSpineMRI, DetectKneeXRay, DetectCovid19Cad. diff --git a/dms-enterprise/CMakeLists.txt b/dms-enterprise/CMakeLists.txt index b4dd9ff75..15373313c 100644 --- a/dms-enterprise/CMakeLists.txt +++ b/dms-enterprise/CMakeLists.txt @@ -61,12 +61,20 @@ set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/GetInstanceResult.h include/alibabacloud/dms-enterprise/model/GetLogicDatabaseRequest.h include/alibabacloud/dms-enterprise/model/GetLogicDatabaseResult.h + include/alibabacloud/dms-enterprise/model/GetMetaTableColumnRequest.h + include/alibabacloud/dms-enterprise/model/GetMetaTableColumnResult.h + include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoRequest.h + include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoResult.h include/alibabacloud/dms-enterprise/model/GetOpLogRequest.h include/alibabacloud/dms-enterprise/model/GetOpLogResult.h include/alibabacloud/dms-enterprise/model/GetOrderBaseInfoRequest.h include/alibabacloud/dms-enterprise/model/GetOrderBaseInfoResult.h + include/alibabacloud/dms-enterprise/model/GetTableDBTopologyRequest.h + include/alibabacloud/dms-enterprise/model/GetTableDBTopologyResult.h include/alibabacloud/dms-enterprise/model/GetUserRequest.h include/alibabacloud/dms-enterprise/model/GetUserResult.h + include/alibabacloud/dms-enterprise/model/GetUserActiveTenantRequest.h + include/alibabacloud/dms-enterprise/model/GetUserActiveTenantResult.h include/alibabacloud/dms-enterprise/model/GrantUserPermissionRequest.h include/alibabacloud/dms-enterprise/model/GrantUserPermissionResult.h include/alibabacloud/dms-enterprise/model/ListColumnsRequest.h @@ -93,6 +101,8 @@ set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/ListTablesResult.h include/alibabacloud/dms-enterprise/model/ListUserPermissionsRequest.h include/alibabacloud/dms-enterprise/model/ListUserPermissionsResult.h + include/alibabacloud/dms-enterprise/model/ListUserTenantsRequest.h + include/alibabacloud/dms-enterprise/model/ListUserTenantsResult.h include/alibabacloud/dms-enterprise/model/ListUsersRequest.h include/alibabacloud/dms-enterprise/model/ListUsersResult.h include/alibabacloud/dms-enterprise/model/ListWorkFlowNodesRequest.h @@ -164,12 +174,20 @@ set(dms-enterprise_src src/model/GetInstanceResult.cc src/model/GetLogicDatabaseRequest.cc src/model/GetLogicDatabaseResult.cc + src/model/GetMetaTableColumnRequest.cc + src/model/GetMetaTableColumnResult.cc + src/model/GetMetaTableDetailInfoRequest.cc + src/model/GetMetaTableDetailInfoResult.cc src/model/GetOpLogRequest.cc src/model/GetOpLogResult.cc src/model/GetOrderBaseInfoRequest.cc src/model/GetOrderBaseInfoResult.cc + src/model/GetTableDBTopologyRequest.cc + src/model/GetTableDBTopologyResult.cc src/model/GetUserRequest.cc src/model/GetUserResult.cc + src/model/GetUserActiveTenantRequest.cc + src/model/GetUserActiveTenantResult.cc src/model/GrantUserPermissionRequest.cc src/model/GrantUserPermissionResult.cc src/model/ListColumnsRequest.cc @@ -196,6 +214,8 @@ set(dms-enterprise_src src/model/ListTablesResult.cc src/model/ListUserPermissionsRequest.cc src/model/ListUserPermissionsResult.cc + src/model/ListUserTenantsRequest.cc + src/model/ListUserTenantsResult.cc src/model/ListUsersRequest.cc src/model/ListUsersResult.cc src/model/ListWorkFlowNodesRequest.cc diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h index 9a4eb0536..633428b1d 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h @@ -62,12 +62,20 @@ #include "model/GetInstanceResult.h" #include "model/GetLogicDatabaseRequest.h" #include "model/GetLogicDatabaseResult.h" +#include "model/GetMetaTableColumnRequest.h" +#include "model/GetMetaTableColumnResult.h" +#include "model/GetMetaTableDetailInfoRequest.h" +#include "model/GetMetaTableDetailInfoResult.h" #include "model/GetOpLogRequest.h" #include "model/GetOpLogResult.h" #include "model/GetOrderBaseInfoRequest.h" #include "model/GetOrderBaseInfoResult.h" +#include "model/GetTableDBTopologyRequest.h" +#include "model/GetTableDBTopologyResult.h" #include "model/GetUserRequest.h" #include "model/GetUserResult.h" +#include "model/GetUserActiveTenantRequest.h" +#include "model/GetUserActiveTenantResult.h" #include "model/GrantUserPermissionRequest.h" #include "model/GrantUserPermissionResult.h" #include "model/ListColumnsRequest.h" @@ -94,6 +102,8 @@ #include "model/ListTablesResult.h" #include "model/ListUserPermissionsRequest.h" #include "model/ListUserPermissionsResult.h" +#include "model/ListUserTenantsRequest.h" +#include "model/ListUserTenantsResult.h" #include "model/ListUsersRequest.h" #include "model/ListUsersResult.h" #include "model/ListWorkFlowNodesRequest.h" @@ -191,15 +201,27 @@ namespace AlibabaCloud typedef Outcome GetLogicDatabaseOutcome; typedef std::future GetLogicDatabaseOutcomeCallable; typedef std::function&)> GetLogicDatabaseAsyncHandler; + typedef Outcome GetMetaTableColumnOutcome; + typedef std::future GetMetaTableColumnOutcomeCallable; + typedef std::function&)> GetMetaTableColumnAsyncHandler; + typedef Outcome GetMetaTableDetailInfoOutcome; + typedef std::future GetMetaTableDetailInfoOutcomeCallable; + typedef std::function&)> GetMetaTableDetailInfoAsyncHandler; typedef Outcome GetOpLogOutcome; typedef std::future GetOpLogOutcomeCallable; typedef std::function&)> GetOpLogAsyncHandler; typedef Outcome GetOrderBaseInfoOutcome; typedef std::future GetOrderBaseInfoOutcomeCallable; typedef std::function&)> GetOrderBaseInfoAsyncHandler; + typedef Outcome GetTableDBTopologyOutcome; + typedef std::future GetTableDBTopologyOutcomeCallable; + typedef std::function&)> GetTableDBTopologyAsyncHandler; typedef Outcome GetUserOutcome; typedef std::future GetUserOutcomeCallable; typedef std::function&)> GetUserAsyncHandler; + typedef Outcome GetUserActiveTenantOutcome; + typedef std::future GetUserActiveTenantOutcomeCallable; + typedef std::function&)> GetUserActiveTenantAsyncHandler; typedef Outcome GrantUserPermissionOutcome; typedef std::future GrantUserPermissionOutcomeCallable; typedef std::function&)> GrantUserPermissionAsyncHandler; @@ -239,6 +261,9 @@ namespace AlibabaCloud typedef Outcome ListUserPermissionsOutcome; typedef std::future ListUserPermissionsOutcomeCallable; typedef std::function&)> ListUserPermissionsAsyncHandler; + typedef Outcome ListUserTenantsOutcome; + typedef std::future ListUserTenantsOutcomeCallable; + typedef std::function&)> ListUserTenantsAsyncHandler; typedef Outcome ListUsersOutcome; typedef std::future ListUsersOutcomeCallable; typedef std::function&)> ListUsersAsyncHandler; @@ -346,15 +371,27 @@ namespace AlibabaCloud GetLogicDatabaseOutcome getLogicDatabase(const Model::GetLogicDatabaseRequest &request)const; void getLogicDatabaseAsync(const Model::GetLogicDatabaseRequest& request, const GetLogicDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetLogicDatabaseOutcomeCallable getLogicDatabaseCallable(const Model::GetLogicDatabaseRequest& request) const; + GetMetaTableColumnOutcome getMetaTableColumn(const Model::GetMetaTableColumnRequest &request)const; + void getMetaTableColumnAsync(const Model::GetMetaTableColumnRequest& request, const GetMetaTableColumnAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMetaTableColumnOutcomeCallable getMetaTableColumnCallable(const Model::GetMetaTableColumnRequest& request) const; + GetMetaTableDetailInfoOutcome getMetaTableDetailInfo(const Model::GetMetaTableDetailInfoRequest &request)const; + void getMetaTableDetailInfoAsync(const Model::GetMetaTableDetailInfoRequest& request, const GetMetaTableDetailInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMetaTableDetailInfoOutcomeCallable getMetaTableDetailInfoCallable(const Model::GetMetaTableDetailInfoRequest& request) const; GetOpLogOutcome getOpLog(const Model::GetOpLogRequest &request)const; void getOpLogAsync(const Model::GetOpLogRequest& request, const GetOpLogAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetOpLogOutcomeCallable getOpLogCallable(const Model::GetOpLogRequest& request) const; GetOrderBaseInfoOutcome getOrderBaseInfo(const Model::GetOrderBaseInfoRequest &request)const; void getOrderBaseInfoAsync(const Model::GetOrderBaseInfoRequest& request, const GetOrderBaseInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetOrderBaseInfoOutcomeCallable getOrderBaseInfoCallable(const Model::GetOrderBaseInfoRequest& request) const; + GetTableDBTopologyOutcome getTableDBTopology(const Model::GetTableDBTopologyRequest &request)const; + void getTableDBTopologyAsync(const Model::GetTableDBTopologyRequest& request, const GetTableDBTopologyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetTableDBTopologyOutcomeCallable getTableDBTopologyCallable(const Model::GetTableDBTopologyRequest& request) const; GetUserOutcome getUser(const Model::GetUserRequest &request)const; void getUserAsync(const Model::GetUserRequest& request, const GetUserAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetUserOutcomeCallable getUserCallable(const Model::GetUserRequest& request) const; + GetUserActiveTenantOutcome getUserActiveTenant(const Model::GetUserActiveTenantRequest &request)const; + void getUserActiveTenantAsync(const Model::GetUserActiveTenantRequest& request, const GetUserActiveTenantAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserActiveTenantOutcomeCallable getUserActiveTenantCallable(const Model::GetUserActiveTenantRequest& request) const; GrantUserPermissionOutcome grantUserPermission(const Model::GrantUserPermissionRequest &request)const; void grantUserPermissionAsync(const Model::GrantUserPermissionRequest& request, const GrantUserPermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GrantUserPermissionOutcomeCallable grantUserPermissionCallable(const Model::GrantUserPermissionRequest& request) const; @@ -394,6 +431,9 @@ namespace AlibabaCloud ListUserPermissionsOutcome listUserPermissions(const Model::ListUserPermissionsRequest &request)const; void listUserPermissionsAsync(const Model::ListUserPermissionsRequest& request, const ListUserPermissionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListUserPermissionsOutcomeCallable listUserPermissionsCallable(const Model::ListUserPermissionsRequest& request) const; + ListUserTenantsOutcome listUserTenants(const Model::ListUserTenantsRequest &request)const; + void listUserTenantsAsync(const Model::ListUserTenantsRequest& request, const ListUserTenantsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListUserTenantsOutcomeCallable listUserTenantsCallable(const Model::ListUserTenantsRequest& request) const; ListUsersOutcome listUsers(const Model::ListUsersRequest &request)const; void listUsersAsync(const Model::ListUsersRequest& request, const ListUsersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListUsersOutcomeCallable listUsersCallable(const Model::ListUsersRequest& request) const; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnRequest.h new file mode 100644 index 000000000..3b4b04461 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnRequest.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_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetMetaTableColumnRequest : public RpcServiceRequest + { + + public: + GetMetaTableColumnRequest(); + ~GetMetaTableColumnRequest(); + + std::string getTableGuid()const; + void setTableGuid(const std::string& tableGuid); + long getTid()const; + void setTid(long tid); + + private: + std::string tableGuid_; + long tid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnResult.h new file mode 100644 index 000000000..cb5e49c49 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableColumnResult.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_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetMetaTableColumnResult : public ServiceResult + { + public: + struct Column + { + std::string columnId; + std::string columnName; + std::string columnType; + std::string description; + int position; + bool autoIncrement; + std::string securityLevel; + int dataLength; + int dataScale; + std::string primaryKey; + int dataPrecision; + bool nullable; + }; + + + GetMetaTableColumnResult(); + explicit GetMetaTableColumnResult(const std::string &payload); + ~GetMetaTableColumnResult(); + std::vector getColumnList()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector columnList_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLECOLUMNRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoRequest.h new file mode 100644 index 000000000..faa923ca7 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoRequest.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_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFOREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetMetaTableDetailInfoRequest : public RpcServiceRequest + { + + public: + GetMetaTableDetailInfoRequest(); + ~GetMetaTableDetailInfoRequest(); + + std::string getTableGuid()const; + void setTableGuid(const std::string& tableGuid); + long getTid()const; + void setTid(long tid); + + private: + std::string tableGuid_; + long tid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFOREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoResult.h new file mode 100644 index 000000000..b51f6de89 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetMetaTableDetailInfoResult.h @@ -0,0 +1,83 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFORESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetMetaTableDetailInfoResult : public ServiceResult + { + public: + struct DetailInfo + { + struct Column + { + std::string columnId; + std::string columnName; + std::string description; + std::string columnType; + std::string position; + bool autoIncrement; + int dataLength; + int dataScale; + int dataPrecision; + bool nullable; + }; + struct Index + { + std::string indexName; + std::string indexId; + std::vector indexColumns; + bool unique; + std::string indexType; + }; + std::vector columnList; + std::vector indexList; + }; + + + GetMetaTableDetailInfoResult(); + explicit GetMetaTableDetailInfoResult(const std::string &payload); + ~GetMetaTableDetailInfoResult(); + DetailInfo getDetailInfo()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + DetailInfo detailInfo_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETMETATABLEDETAILINFORESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyRequest.h new file mode 100644 index 000000000..1116927ed --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyRequest.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_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetTableDBTopologyRequest : public RpcServiceRequest + { + + public: + GetTableDBTopologyRequest(); + ~GetTableDBTopologyRequest(); + + std::string getTableGuid()const; + void setTableGuid(const std::string& tableGuid); + long getTid()const; + void setTid(long tid); + + private: + std::string tableGuid_; + long tid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyResult.h new file mode 100644 index 000000000..60e7526ef --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetTableDBTopologyResult.h @@ -0,0 +1,85 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetTableDBTopologyResult : public ServiceResult + { + public: + struct DBTopology + { + struct DataSource + { + struct Database + { + struct Table + { + std::string tableId; + std::string tableName; + std::string tableType; + }; + std::string dbId; + std::string dbName; + std::vector tableList; + std::string envType; + std::string dbType; + }; + std::vector databaseList; + int port; + std::string host; + std::string dbType; + std::string sid; + }; + std::string tableName; + std::string tableGuid; + std::vector dataSourceList; + }; + + + GetTableDBTopologyResult(); + explicit GetTableDBTopologyResult(const std::string &payload); + ~GetTableDBTopologyResult(); + DBTopology getDBTopology()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + DBTopology dBTopology_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETTABLEDBTOPOLOGYRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantRequest.h new file mode 100644 index 000000000..bd0c1b707 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantRequest.h @@ -0,0 +1,45 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetUserActiveTenantRequest : public RpcServiceRequest + { + + public: + GetUserActiveTenantRequest(); + ~GetUserActiveTenantRequest(); + + + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantResult.h new file mode 100644 index 000000000..af73053ec --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserActiveTenantResult.h @@ -0,0 +1,63 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetUserActiveTenantResult : public ServiceResult + { + public: + struct Tenant + { + std::string status; + std::string tenantName; + long tid; + }; + + + GetUserActiveTenantResult(); + explicit GetUserActiveTenantResult(const std::string &payload); + ~GetUserActiveTenantResult(); + Tenant getTenant()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Tenant tenant_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETUSERACTIVETENANTRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesRequest.h index 4076ad682..181f5ba29 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getSearchName()const; void setSearchName(const std::string& searchName); + bool getReturnGuid()const; + void setReturnGuid(bool returnGuid); int getPageSize()const; void setPageSize(int pageSize); std::string getDatabaseId()const; @@ -48,6 +50,7 @@ namespace AlibabaCloud private: std::string searchName_; + bool returnGuid_; int pageSize_; std::string databaseId_; long tid_; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesResult.h index 37e4b7e59..f69202419 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListLogicTablesResult.h @@ -36,11 +36,13 @@ namespace AlibabaCloud { std::string tableId; std::string tableName; + std::string tableGuid; std::string tableExpr; std::string tableCount; std::string databaseId; std::vector ownerNameList; bool logic; + std::string schemaName; std::vector ownerIdList; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesRequest.h index b6bc8ed25..73d74d146 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getSearchName()const; void setSearchName(const std::string& searchName); + bool getReturnGuid()const; + void setReturnGuid(bool returnGuid); int getPageSize()const; void setPageSize(int pageSize); std::string getDatabaseId()const; @@ -48,6 +50,7 @@ namespace AlibabaCloud private: std::string searchName_; + bool returnGuid_; int pageSize_; std::string databaseId_; long tid_; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesResult.h index 9f6a0972c..6f3868621 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTablesResult.h @@ -35,13 +35,15 @@ namespace AlibabaCloud struct Table { std::string tableId; - std::string tableName; std::string tableType; - std::string tableSchemaName; + std::string description; std::string databaseId; std::string encoding; - std::vector ownerNameList; long numRows; + std::string tableName; + std::string tableGuid; + std::string tableSchemaName; + std::vector ownerNameList; long storeCapacity; std::string engine; std::vector ownerIdList; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsRequest.h new file mode 100644 index 000000000..3eb85de59 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsRequest.h @@ -0,0 +1,45 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSREQUEST_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListUserTenantsRequest : public RpcServiceRequest + { + + public: + ListUserTenantsRequest(); + ~ListUserTenantsRequest(); + + + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsResult.h new file mode 100644 index 000000000..504063f06 --- /dev/null +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUserTenantsResult.h @@ -0,0 +1,63 @@ +/* + * 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_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSRESULT_H_ +#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_enterprise + { + namespace Model + { + class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListUserTenantsResult : public ServiceResult + { + public: + struct Tenant + { + std::string status; + std::string tenantName; + long tid; + }; + + + ListUserTenantsResult(); + explicit ListUserTenantsResult(const std::string &payload); + ~ListUserTenantsResult(); + std::vector getTenantList()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector tenantList_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTUSERTENANTSRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterInstanceRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterInstanceRequest.h index 2d8790b5c..9b3da4e6b 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterInstanceRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterInstanceRequest.h @@ -75,6 +75,8 @@ namespace AlibabaCloud void setVpcId(const std::string& vpcId); long getDbaUid()const; void setDbaUid(long dbaUid); + bool getSkipTest()const; + void setSkipTest(bool skipTest); std::string getSafeRule()const; void setSafeRule(const std::string& safeRule); @@ -99,6 +101,7 @@ namespace AlibabaCloud int port_; std::string vpcId_; long dbaUid_; + bool skipTest_; std::string safeRule_; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableRequest.h index ab7305d25..a6c95dbf1 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableRequest.h @@ -35,12 +35,8 @@ namespace AlibabaCloud SearchTableRequest(); ~SearchTableRequest(); - std::string getSearchTarget()const; - void setSearchTarget(const std::string& searchTarget); - int getPageSize()const; - void setPageSize(int pageSize); - std::string getEnvType()const; - void setEnvType(const std::string& envType); + bool getReturnGuid()const; + void setReturnGuid(bool returnGuid); std::string getSearchKey()const; void setSearchKey(const std::string& searchKey); std::string getSearchRange()const; @@ -49,15 +45,25 @@ namespace AlibabaCloud void setTid(long tid); int getPageNumber()const; void setPageNumber(int pageNumber); + std::string getSearchTarget()const; + void setSearchTarget(const std::string& searchTarget); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getEnvType()const; + void setEnvType(const std::string& envType); + std::string getDbType()const; + void setDbType(const std::string& dbType); private: - std::string searchTarget_; - int pageSize_; - std::string envType_; + bool returnGuid_; std::string searchKey_; std::string searchRange_; long tid_; int pageNumber_; + std::string searchTarget_; + int pageSize_; + std::string envType_; + std::string dbType_; }; } diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableResult.h index d18b53215..a27642fdd 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/SearchTableResult.h @@ -35,15 +35,19 @@ namespace AlibabaCloud struct SearchTable { std::string tableId; - std::string tableName; - std::string tableSchemaName; + std::string description; std::string databaseId; std::string encoding; + std::string dBSearchName; + std::string envType; + std::string dbType; + std::string tableName; + std::string tableGuid; + std::string tableSchemaName; + std::string dbName; std::vector ownerNameList; bool logic; - std::string dBSearchName; std::string engine; - std::string envType; std::vector ownerIdList; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/UpdateInstanceRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/UpdateInstanceRequest.h index ac3783689..de72a8cdb 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/UpdateInstanceRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/UpdateInstanceRequest.h @@ -77,6 +77,8 @@ namespace AlibabaCloud void setPort(int port); std::string getVpcId()const; void setVpcId(const std::string& vpcId); + bool getSkipTest()const; + void setSkipTest(bool skipTest); private: std::string safeRuleId_; @@ -100,6 +102,7 @@ namespace AlibabaCloud std::string instanceId_; int port_; std::string vpcId_; + bool skipTest_; }; } diff --git a/dms-enterprise/src/Dms-enterpriseClient.cc b/dms-enterprise/src/Dms-enterpriseClient.cc index 9c4eaeda9..8b3c12233 100644 --- a/dms-enterprise/src/Dms-enterpriseClient.cc +++ b/dms-enterprise/src/Dms-enterpriseClient.cc @@ -771,6 +771,78 @@ Dms_enterpriseClient::GetLogicDatabaseOutcomeCallable Dms_enterpriseClient::getL return task->get_future(); } +Dms_enterpriseClient::GetMetaTableColumnOutcome Dms_enterpriseClient::getMetaTableColumn(const GetMetaTableColumnRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMetaTableColumnOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMetaTableColumnOutcome(GetMetaTableColumnResult(outcome.result())); + else + return GetMetaTableColumnOutcome(outcome.error()); +} + +void Dms_enterpriseClient::getMetaTableColumnAsync(const GetMetaTableColumnRequest& request, const GetMetaTableColumnAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMetaTableColumn(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::GetMetaTableColumnOutcomeCallable Dms_enterpriseClient::getMetaTableColumnCallable(const GetMetaTableColumnRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMetaTableColumn(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_enterpriseClient::GetMetaTableDetailInfoOutcome Dms_enterpriseClient::getMetaTableDetailInfo(const GetMetaTableDetailInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMetaTableDetailInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMetaTableDetailInfoOutcome(GetMetaTableDetailInfoResult(outcome.result())); + else + return GetMetaTableDetailInfoOutcome(outcome.error()); +} + +void Dms_enterpriseClient::getMetaTableDetailInfoAsync(const GetMetaTableDetailInfoRequest& request, const GetMetaTableDetailInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMetaTableDetailInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::GetMetaTableDetailInfoOutcomeCallable Dms_enterpriseClient::getMetaTableDetailInfoCallable(const GetMetaTableDetailInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMetaTableDetailInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::GetOpLogOutcome Dms_enterpriseClient::getOpLog(const GetOpLogRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -843,6 +915,42 @@ Dms_enterpriseClient::GetOrderBaseInfoOutcomeCallable Dms_enterpriseClient::getO return task->get_future(); } +Dms_enterpriseClient::GetTableDBTopologyOutcome Dms_enterpriseClient::getTableDBTopology(const GetTableDBTopologyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetTableDBTopologyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetTableDBTopologyOutcome(GetTableDBTopologyResult(outcome.result())); + else + return GetTableDBTopologyOutcome(outcome.error()); +} + +void Dms_enterpriseClient::getTableDBTopologyAsync(const GetTableDBTopologyRequest& request, const GetTableDBTopologyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getTableDBTopology(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::GetTableDBTopologyOutcomeCallable Dms_enterpriseClient::getTableDBTopologyCallable(const GetTableDBTopologyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getTableDBTopology(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::GetUserOutcome Dms_enterpriseClient::getUser(const GetUserRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -879,6 +987,42 @@ Dms_enterpriseClient::GetUserOutcomeCallable Dms_enterpriseClient::getUserCallab return task->get_future(); } +Dms_enterpriseClient::GetUserActiveTenantOutcome Dms_enterpriseClient::getUserActiveTenant(const GetUserActiveTenantRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserActiveTenantOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserActiveTenantOutcome(GetUserActiveTenantResult(outcome.result())); + else + return GetUserActiveTenantOutcome(outcome.error()); +} + +void Dms_enterpriseClient::getUserActiveTenantAsync(const GetUserActiveTenantRequest& request, const GetUserActiveTenantAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserActiveTenant(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::GetUserActiveTenantOutcomeCallable Dms_enterpriseClient::getUserActiveTenantCallable(const GetUserActiveTenantRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserActiveTenant(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::GrantUserPermissionOutcome Dms_enterpriseClient::grantUserPermission(const GrantUserPermissionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1347,6 +1491,42 @@ Dms_enterpriseClient::ListUserPermissionsOutcomeCallable Dms_enterpriseClient::l return task->get_future(); } +Dms_enterpriseClient::ListUserTenantsOutcome Dms_enterpriseClient::listUserTenants(const ListUserTenantsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListUserTenantsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListUserTenantsOutcome(ListUserTenantsResult(outcome.result())); + else + return ListUserTenantsOutcome(outcome.error()); +} + +void Dms_enterpriseClient::listUserTenantsAsync(const ListUserTenantsRequest& request, const ListUserTenantsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listUserTenants(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_enterpriseClient::ListUserTenantsOutcomeCallable Dms_enterpriseClient::listUserTenantsCallable(const ListUserTenantsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listUserTenants(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Dms_enterpriseClient::ListUsersOutcome Dms_enterpriseClient::listUsers(const ListUsersRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dms-enterprise/src/model/GetMetaTableColumnRequest.cc b/dms-enterprise/src/model/GetMetaTableColumnRequest.cc new file mode 100644 index 000000000..6d3f2155d --- /dev/null +++ b/dms-enterprise/src/model/GetMetaTableColumnRequest.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 + +using AlibabaCloud::Dms_enterprise::Model::GetMetaTableColumnRequest; + +GetMetaTableColumnRequest::GetMetaTableColumnRequest() : + RpcServiceRequest("dms-enterprise", "2018-11-01", "GetMetaTableColumn") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMetaTableColumnRequest::~GetMetaTableColumnRequest() +{} + +std::string GetMetaTableColumnRequest::getTableGuid()const +{ + return tableGuid_; +} + +void GetMetaTableColumnRequest::setTableGuid(const std::string& tableGuid) +{ + tableGuid_ = tableGuid; + setParameter("TableGuid", tableGuid); +} + +long GetMetaTableColumnRequest::getTid()const +{ + return tid_; +} + +void GetMetaTableColumnRequest::setTid(long tid) +{ + tid_ = tid; + setParameter("Tid", std::to_string(tid)); +} + diff --git a/dms-enterprise/src/model/GetMetaTableColumnResult.cc b/dms-enterprise/src/model/GetMetaTableColumnResult.cc new file mode 100644 index 000000000..a7b67d121 --- /dev/null +++ b/dms-enterprise/src/model/GetMetaTableColumnResult.cc @@ -0,0 +1,100 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +GetMetaTableColumnResult::GetMetaTableColumnResult() : + ServiceResult() +{} + +GetMetaTableColumnResult::GetMetaTableColumnResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMetaTableColumnResult::~GetMetaTableColumnResult() +{} + +void GetMetaTableColumnResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allColumnListNode = value["ColumnList"]["Column"]; + for (auto valueColumnListColumn : allColumnListNode) + { + Column columnListObject; + if(!valueColumnListColumn["ColumnId"].isNull()) + columnListObject.columnId = valueColumnListColumn["ColumnId"].asString(); + if(!valueColumnListColumn["ColumnName"].isNull()) + columnListObject.columnName = valueColumnListColumn["ColumnName"].asString(); + if(!valueColumnListColumn["ColumnType"].isNull()) + columnListObject.columnType = valueColumnListColumn["ColumnType"].asString(); + if(!valueColumnListColumn["DataLength"].isNull()) + columnListObject.dataLength = std::stoi(valueColumnListColumn["DataLength"].asString()); + if(!valueColumnListColumn["Description"].isNull()) + columnListObject.description = valueColumnListColumn["Description"].asString(); + if(!valueColumnListColumn["Position"].isNull()) + columnListObject.position = std::stoi(valueColumnListColumn["Position"].asString()); + if(!valueColumnListColumn["AutoIncrement"].isNull()) + columnListObject.autoIncrement = valueColumnListColumn["AutoIncrement"].asString() == "true"; + if(!valueColumnListColumn["Nullable"].isNull()) + columnListObject.nullable = valueColumnListColumn["Nullable"].asString() == "true"; + if(!valueColumnListColumn["SecurityLevel"].isNull()) + columnListObject.securityLevel = valueColumnListColumn["SecurityLevel"].asString(); + if(!valueColumnListColumn["PrimaryKey"].isNull()) + columnListObject.primaryKey = valueColumnListColumn["PrimaryKey"].asString(); + if(!valueColumnListColumn["DataScale"].isNull()) + columnListObject.dataScale = std::stoi(valueColumnListColumn["DataScale"].asString()); + if(!valueColumnListColumn["DataPrecision"].isNull()) + columnListObject.dataPrecision = std::stoi(valueColumnListColumn["DataPrecision"].asString()); + columnList_.push_back(columnListObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + +} + +std::vector GetMetaTableColumnResult::getColumnList()const +{ + return columnList_; +} + +std::string GetMetaTableColumnResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetMetaTableColumnResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetMetaTableColumnResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/GetMetaTableDetailInfoRequest.cc b/dms-enterprise/src/model/GetMetaTableDetailInfoRequest.cc new file mode 100644 index 000000000..49fb3ab1b --- /dev/null +++ b/dms-enterprise/src/model/GetMetaTableDetailInfoRequest.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 + +using AlibabaCloud::Dms_enterprise::Model::GetMetaTableDetailInfoRequest; + +GetMetaTableDetailInfoRequest::GetMetaTableDetailInfoRequest() : + RpcServiceRequest("dms-enterprise", "2018-11-01", "GetMetaTableDetailInfo") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMetaTableDetailInfoRequest::~GetMetaTableDetailInfoRequest() +{} + +std::string GetMetaTableDetailInfoRequest::getTableGuid()const +{ + return tableGuid_; +} + +void GetMetaTableDetailInfoRequest::setTableGuid(const std::string& tableGuid) +{ + tableGuid_ = tableGuid; + setParameter("TableGuid", tableGuid); +} + +long GetMetaTableDetailInfoRequest::getTid()const +{ + return tid_; +} + +void GetMetaTableDetailInfoRequest::setTid(long tid) +{ + tid_ = tid; + setParameter("Tid", std::to_string(tid)); +} + diff --git a/dms-enterprise/src/model/GetMetaTableDetailInfoResult.cc b/dms-enterprise/src/model/GetMetaTableDetailInfoResult.cc new file mode 100644 index 000000000..f717fa04c --- /dev/null +++ b/dms-enterprise/src/model/GetMetaTableDetailInfoResult.cc @@ -0,0 +1,114 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +GetMetaTableDetailInfoResult::GetMetaTableDetailInfoResult() : + ServiceResult() +{} + +GetMetaTableDetailInfoResult::GetMetaTableDetailInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMetaTableDetailInfoResult::~GetMetaTableDetailInfoResult() +{} + +void GetMetaTableDetailInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto detailInfoNode = value["DetailInfo"]; + auto allColumnListNode = detailInfoNode["ColumnList"]["Column"]; + for (auto detailInfoNodeColumnListColumn : allColumnListNode) + { + DetailInfo::Column columnObject; + if(!detailInfoNodeColumnListColumn["Description"].isNull()) + columnObject.description = detailInfoNodeColumnListColumn["Description"].asString(); + if(!detailInfoNodeColumnListColumn["ColumnType"].isNull()) + columnObject.columnType = detailInfoNodeColumnListColumn["ColumnType"].asString(); + if(!detailInfoNodeColumnListColumn["Position"].isNull()) + columnObject.position = detailInfoNodeColumnListColumn["Position"].asString(); + if(!detailInfoNodeColumnListColumn["DataLength"].isNull()) + columnObject.dataLength = std::stoi(detailInfoNodeColumnListColumn["DataLength"].asString()); + if(!detailInfoNodeColumnListColumn["Nullable"].isNull()) + columnObject.nullable = detailInfoNodeColumnListColumn["Nullable"].asString() == "true"; + if(!detailInfoNodeColumnListColumn["ColumnName"].isNull()) + columnObject.columnName = detailInfoNodeColumnListColumn["ColumnName"].asString(); + if(!detailInfoNodeColumnListColumn["AutoIncrement"].isNull()) + columnObject.autoIncrement = detailInfoNodeColumnListColumn["AutoIncrement"].asString() == "true"; + if(!detailInfoNodeColumnListColumn["DataPrecision"].isNull()) + columnObject.dataPrecision = std::stoi(detailInfoNodeColumnListColumn["DataPrecision"].asString()); + if(!detailInfoNodeColumnListColumn["DataScale"].isNull()) + columnObject.dataScale = std::stoi(detailInfoNodeColumnListColumn["DataScale"].asString()); + if(!detailInfoNodeColumnListColumn["ColumnId"].isNull()) + columnObject.columnId = detailInfoNodeColumnListColumn["ColumnId"].asString(); + detailInfo_.columnList.push_back(columnObject); + } + auto allIndexListNode = detailInfoNode["IndexList"]["Index"]; + for (auto detailInfoNodeIndexListIndex : allIndexListNode) + { + DetailInfo::Index indexObject; + if(!detailInfoNodeIndexListIndex["IndexName"].isNull()) + indexObject.indexName = detailInfoNodeIndexListIndex["IndexName"].asString(); + if(!detailInfoNodeIndexListIndex["IndexType"].isNull()) + indexObject.indexType = detailInfoNodeIndexListIndex["IndexType"].asString(); + if(!detailInfoNodeIndexListIndex["Unique"].isNull()) + indexObject.unique = detailInfoNodeIndexListIndex["Unique"].asString() == "true"; + if(!detailInfoNodeIndexListIndex["IndexId"].isNull()) + indexObject.indexId = detailInfoNodeIndexListIndex["IndexId"].asString(); + auto allIndexColumns = value["IndexColumns"]["ColumnNames"]; + for (auto value : allIndexColumns) + indexObject.indexColumns.push_back(value.asString()); + detailInfo_.indexList.push_back(indexObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + +} + +GetMetaTableDetailInfoResult::DetailInfo GetMetaTableDetailInfoResult::getDetailInfo()const +{ + return detailInfo_; +} + +std::string GetMetaTableDetailInfoResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetMetaTableDetailInfoResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetMetaTableDetailInfoResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/GetTableDBTopologyRequest.cc b/dms-enterprise/src/model/GetTableDBTopologyRequest.cc new file mode 100644 index 000000000..650f77ea8 --- /dev/null +++ b/dms-enterprise/src/model/GetTableDBTopologyRequest.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 + +using AlibabaCloud::Dms_enterprise::Model::GetTableDBTopologyRequest; + +GetTableDBTopologyRequest::GetTableDBTopologyRequest() : + RpcServiceRequest("dms-enterprise", "2018-11-01", "GetTableDBTopology") +{ + setMethod(HttpRequest::Method::Post); +} + +GetTableDBTopologyRequest::~GetTableDBTopologyRequest() +{} + +std::string GetTableDBTopologyRequest::getTableGuid()const +{ + return tableGuid_; +} + +void GetTableDBTopologyRequest::setTableGuid(const std::string& tableGuid) +{ + tableGuid_ = tableGuid; + setParameter("TableGuid", tableGuid); +} + +long GetTableDBTopologyRequest::getTid()const +{ + return tid_; +} + +void GetTableDBTopologyRequest::setTid(long tid) +{ + tid_ = tid; + setParameter("Tid", std::to_string(tid)); +} + diff --git a/dms-enterprise/src/model/GetTableDBTopologyResult.cc b/dms-enterprise/src/model/GetTableDBTopologyResult.cc new file mode 100644 index 000000000..7ec970598 --- /dev/null +++ b/dms-enterprise/src/model/GetTableDBTopologyResult.cc @@ -0,0 +1,115 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +GetTableDBTopologyResult::GetTableDBTopologyResult() : + ServiceResult() +{} + +GetTableDBTopologyResult::GetTableDBTopologyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetTableDBTopologyResult::~GetTableDBTopologyResult() +{} + +void GetTableDBTopologyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dBTopologyNode = value["DBTopology"]; + if(!dBTopologyNode["TableName"].isNull()) + dBTopology_.tableName = dBTopologyNode["TableName"].asString(); + if(!dBTopologyNode["TableGuid"].isNull()) + dBTopology_.tableGuid = dBTopologyNode["TableGuid"].asString(); + auto allDataSourceListNode = dBTopologyNode["DataSourceList"]["DataSource"]; + for (auto dBTopologyNodeDataSourceListDataSource : allDataSourceListNode) + { + DBTopology::DataSource dataSourceObject; + if(!dBTopologyNodeDataSourceListDataSource["Host"].isNull()) + dataSourceObject.host = dBTopologyNodeDataSourceListDataSource["Host"].asString(); + if(!dBTopologyNodeDataSourceListDataSource["Port"].isNull()) + dataSourceObject.port = std::stoi(dBTopologyNodeDataSourceListDataSource["Port"].asString()); + if(!dBTopologyNodeDataSourceListDataSource["DbType"].isNull()) + dataSourceObject.dbType = dBTopologyNodeDataSourceListDataSource["DbType"].asString(); + if(!dBTopologyNodeDataSourceListDataSource["Sid"].isNull()) + dataSourceObject.sid = dBTopologyNodeDataSourceListDataSource["Sid"].asString(); + auto allDatabaseListNode = allDataSourceListNode["DatabaseList"]["Database"]; + for (auto allDataSourceListNodeDatabaseListDatabase : allDatabaseListNode) + { + DBTopology::DataSource::Database databaseListObject; + if(!allDataSourceListNodeDatabaseListDatabase["DbName"].isNull()) + databaseListObject.dbName = allDataSourceListNodeDatabaseListDatabase["DbName"].asString(); + if(!allDataSourceListNodeDatabaseListDatabase["DbId"].isNull()) + databaseListObject.dbId = allDataSourceListNodeDatabaseListDatabase["DbId"].asString(); + if(!allDataSourceListNodeDatabaseListDatabase["EnvType"].isNull()) + databaseListObject.envType = allDataSourceListNodeDatabaseListDatabase["EnvType"].asString(); + if(!allDataSourceListNodeDatabaseListDatabase["DbType"].isNull()) + databaseListObject.dbType = allDataSourceListNodeDatabaseListDatabase["DbType"].asString(); + auto allTableListNode = allDatabaseListNode["TableList"]["Table"]; + for (auto allDatabaseListNodeTableListTable : allTableListNode) + { + DBTopology::DataSource::Database::Table tableListObject; + if(!allDatabaseListNodeTableListTable["TableName"].isNull()) + tableListObject.tableName = allDatabaseListNodeTableListTable["TableName"].asString(); + if(!allDatabaseListNodeTableListTable["TableId"].isNull()) + tableListObject.tableId = allDatabaseListNodeTableListTable["TableId"].asString(); + if(!allDatabaseListNodeTableListTable["TableType"].isNull()) + tableListObject.tableType = allDatabaseListNodeTableListTable["TableType"].asString(); + databaseListObject.tableList.push_back(tableListObject); + } + dataSourceObject.databaseList.push_back(databaseListObject); + } + dBTopology_.dataSourceList.push_back(dataSourceObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + +} + +GetTableDBTopologyResult::DBTopology GetTableDBTopologyResult::getDBTopology()const +{ + return dBTopology_; +} + +std::string GetTableDBTopologyResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetTableDBTopologyResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetTableDBTopologyResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/GetUserActiveTenantRequest.cc b/dms-enterprise/src/model/GetUserActiveTenantRequest.cc new file mode 100644 index 000000000..d3d6c0996 --- /dev/null +++ b/dms-enterprise/src/model/GetUserActiveTenantRequest.cc @@ -0,0 +1,29 @@ +/* + * 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::Dms_enterprise::Model::GetUserActiveTenantRequest; + +GetUserActiveTenantRequest::GetUserActiveTenantRequest() : + RpcServiceRequest("dms-enterprise", "2018-11-01", "GetUserActiveTenant") +{ + setMethod(HttpRequest::Method::Post); +} + +GetUserActiveTenantRequest::~GetUserActiveTenantRequest() +{} + diff --git a/dms-enterprise/src/model/GetUserActiveTenantResult.cc b/dms-enterprise/src/model/GetUserActiveTenantResult.cc new file mode 100644 index 000000000..ebc50463f --- /dev/null +++ b/dms-enterprise/src/model/GetUserActiveTenantResult.cc @@ -0,0 +1,77 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +GetUserActiveTenantResult::GetUserActiveTenantResult() : + ServiceResult() +{} + +GetUserActiveTenantResult::GetUserActiveTenantResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserActiveTenantResult::~GetUserActiveTenantResult() +{} + +void GetUserActiveTenantResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto tenantNode = value["Tenant"]; + if(!tenantNode["Tid"].isNull()) + tenant_.tid = std::stol(tenantNode["Tid"].asString()); + if(!tenantNode["TenantName"].isNull()) + tenant_.tenantName = tenantNode["TenantName"].asString(); + if(!tenantNode["Status"].isNull()) + tenant_.status = tenantNode["Status"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + +} + +GetUserActiveTenantResult::Tenant GetUserActiveTenantResult::getTenant()const +{ + return tenant_; +} + +std::string GetUserActiveTenantResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetUserActiveTenantResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetUserActiveTenantResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/ListLogicTablesRequest.cc b/dms-enterprise/src/model/ListLogicTablesRequest.cc index 4d418b63e..8d24dc755 100644 --- a/dms-enterprise/src/model/ListLogicTablesRequest.cc +++ b/dms-enterprise/src/model/ListLogicTablesRequest.cc @@ -38,6 +38,17 @@ void ListLogicTablesRequest::setSearchName(const std::string& searchName) setParameter("SearchName", searchName); } +bool ListLogicTablesRequest::getReturnGuid()const +{ + return returnGuid_; +} + +void ListLogicTablesRequest::setReturnGuid(bool returnGuid) +{ + returnGuid_ = returnGuid; + setParameter("ReturnGuid", returnGuid ? "true" : "false"); +} + int ListLogicTablesRequest::getPageSize()const { return pageSize_; diff --git a/dms-enterprise/src/model/ListLogicTablesResult.cc b/dms-enterprise/src/model/ListLogicTablesResult.cc index d55e34963..a49901402 100644 --- a/dms-enterprise/src/model/ListLogicTablesResult.cc +++ b/dms-enterprise/src/model/ListLogicTablesResult.cc @@ -55,6 +55,10 @@ void ListLogicTablesResult::parse(const std::string &payload) logicTableListObject.tableExpr = valueLogicTableListLogicTable["TableExpr"].asString(); if(!valueLogicTableListLogicTable["TableCount"].isNull()) logicTableListObject.tableCount = valueLogicTableListLogicTable["TableCount"].asString(); + if(!valueLogicTableListLogicTable["TableGuid"].isNull()) + logicTableListObject.tableGuid = valueLogicTableListLogicTable["TableGuid"].asString(); + if(!valueLogicTableListLogicTable["SchemaName"].isNull()) + logicTableListObject.schemaName = valueLogicTableListLogicTable["SchemaName"].asString(); auto allOwnerIdList = value["OwnerIdList"]["OwnerIds"]; for (auto value : allOwnerIdList) logicTableListObject.ownerIdList.push_back(value.asString()); diff --git a/dms-enterprise/src/model/ListTablesRequest.cc b/dms-enterprise/src/model/ListTablesRequest.cc index bc7502c66..c5776c192 100644 --- a/dms-enterprise/src/model/ListTablesRequest.cc +++ b/dms-enterprise/src/model/ListTablesRequest.cc @@ -38,6 +38,17 @@ void ListTablesRequest::setSearchName(const std::string& searchName) setParameter("SearchName", searchName); } +bool ListTablesRequest::getReturnGuid()const +{ + return returnGuid_; +} + +void ListTablesRequest::setReturnGuid(bool returnGuid) +{ + returnGuid_ = returnGuid; + setParameter("ReturnGuid", returnGuid ? "true" : "false"); +} + int ListTablesRequest::getPageSize()const { return pageSize_; diff --git a/dms-enterprise/src/model/ListTablesResult.cc b/dms-enterprise/src/model/ListTablesResult.cc index 5514b4be3..6976cb7af 100644 --- a/dms-enterprise/src/model/ListTablesResult.cc +++ b/dms-enterprise/src/model/ListTablesResult.cc @@ -61,6 +61,10 @@ void ListTablesResult::parse(const std::string &payload) tableListObject.numRows = std::stol(valueTableListTable["NumRows"].asString()); if(!valueTableListTable["StoreCapacity"].isNull()) tableListObject.storeCapacity = std::stol(valueTableListTable["StoreCapacity"].asString()); + if(!valueTableListTable["TableGuid"].isNull()) + tableListObject.tableGuid = valueTableListTable["TableGuid"].asString(); + if(!valueTableListTable["Description"].isNull()) + tableListObject.description = valueTableListTable["Description"].asString(); auto allOwnerIdList = value["OwnerIdList"]["OwnerIds"]; for (auto value : allOwnerIdList) tableListObject.ownerIdList.push_back(value.asString()); diff --git a/dms-enterprise/src/model/ListUserTenantsRequest.cc b/dms-enterprise/src/model/ListUserTenantsRequest.cc new file mode 100644 index 000000000..585c35964 --- /dev/null +++ b/dms-enterprise/src/model/ListUserTenantsRequest.cc @@ -0,0 +1,29 @@ +/* + * 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::Dms_enterprise::Model::ListUserTenantsRequest; + +ListUserTenantsRequest::ListUserTenantsRequest() : + RpcServiceRequest("dms-enterprise", "2018-11-01", "ListUserTenants") +{ + setMethod(HttpRequest::Method::Post); +} + +ListUserTenantsRequest::~ListUserTenantsRequest() +{} + diff --git a/dms-enterprise/src/model/ListUserTenantsResult.cc b/dms-enterprise/src/model/ListUserTenantsResult.cc new file mode 100644 index 000000000..f835931f0 --- /dev/null +++ b/dms-enterprise/src/model/ListUserTenantsResult.cc @@ -0,0 +1,82 @@ +/* + * 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::Dms_enterprise; +using namespace AlibabaCloud::Dms_enterprise::Model; + +ListUserTenantsResult::ListUserTenantsResult() : + ServiceResult() +{} + +ListUserTenantsResult::ListUserTenantsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListUserTenantsResult::~ListUserTenantsResult() +{} + +void ListUserTenantsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTenantListNode = value["TenantList"]["Tenant"]; + for (auto valueTenantListTenant : allTenantListNode) + { + Tenant tenantListObject; + if(!valueTenantListTenant["Tid"].isNull()) + tenantListObject.tid = std::stol(valueTenantListTenant["Tid"].asString()); + if(!valueTenantListTenant["TenantName"].isNull()) + tenantListObject.tenantName = valueTenantListTenant["TenantName"].asString(); + if(!valueTenantListTenant["Status"].isNull()) + tenantListObject.status = valueTenantListTenant["Status"].asString(); + tenantList_.push_back(tenantListObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + +} + +std::vector ListUserTenantsResult::getTenantList()const +{ + return tenantList_; +} + +std::string ListUserTenantsResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListUserTenantsResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ListUserTenantsResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-enterprise/src/model/RegisterInstanceRequest.cc b/dms-enterprise/src/model/RegisterInstanceRequest.cc index 5a578855f..a20413937 100644 --- a/dms-enterprise/src/model/RegisterInstanceRequest.cc +++ b/dms-enterprise/src/model/RegisterInstanceRequest.cc @@ -247,6 +247,17 @@ void RegisterInstanceRequest::setDbaUid(long dbaUid) setParameter("DbaUid", std::to_string(dbaUid)); } +bool RegisterInstanceRequest::getSkipTest()const +{ + return skipTest_; +} + +void RegisterInstanceRequest::setSkipTest(bool skipTest) +{ + skipTest_ = skipTest; + setParameter("SkipTest", skipTest ? "true" : "false"); +} + std::string RegisterInstanceRequest::getSafeRule()const { return safeRule_; diff --git a/dms-enterprise/src/model/SearchTableRequest.cc b/dms-enterprise/src/model/SearchTableRequest.cc index 8f5c0b580..5f998d904 100644 --- a/dms-enterprise/src/model/SearchTableRequest.cc +++ b/dms-enterprise/src/model/SearchTableRequest.cc @@ -27,37 +27,15 @@ SearchTableRequest::SearchTableRequest() : SearchTableRequest::~SearchTableRequest() {} -std::string SearchTableRequest::getSearchTarget()const +bool SearchTableRequest::getReturnGuid()const { - return searchTarget_; + return returnGuid_; } -void SearchTableRequest::setSearchTarget(const std::string& searchTarget) +void SearchTableRequest::setReturnGuid(bool returnGuid) { - searchTarget_ = searchTarget; - setParameter("SearchTarget", searchTarget); -} - -int SearchTableRequest::getPageSize()const -{ - return pageSize_; -} - -void SearchTableRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); -} - -std::string SearchTableRequest::getEnvType()const -{ - return envType_; -} - -void SearchTableRequest::setEnvType(const std::string& envType) -{ - envType_ = envType; - setParameter("EnvType", envType); + returnGuid_ = returnGuid; + setParameter("ReturnGuid", returnGuid ? "true" : "false"); } std::string SearchTableRequest::getSearchKey()const @@ -104,3 +82,47 @@ void SearchTableRequest::setPageNumber(int pageNumber) setParameter("PageNumber", std::to_string(pageNumber)); } +std::string SearchTableRequest::getSearchTarget()const +{ + return searchTarget_; +} + +void SearchTableRequest::setSearchTarget(const std::string& searchTarget) +{ + searchTarget_ = searchTarget; + setParameter("SearchTarget", searchTarget); +} + +int SearchTableRequest::getPageSize()const +{ + return pageSize_; +} + +void SearchTableRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string SearchTableRequest::getEnvType()const +{ + return envType_; +} + +void SearchTableRequest::setEnvType(const std::string& envType) +{ + envType_ = envType; + setParameter("EnvType", envType); +} + +std::string SearchTableRequest::getDbType()const +{ + return dbType_; +} + +void SearchTableRequest::setDbType(const std::string& dbType) +{ + dbType_ = dbType; + setParameter("DbType", dbType); +} + diff --git a/dms-enterprise/src/model/SearchTableResult.cc b/dms-enterprise/src/model/SearchTableResult.cc index f7cf729e4..107b8d53b 100644 --- a/dms-enterprise/src/model/SearchTableResult.cc +++ b/dms-enterprise/src/model/SearchTableResult.cc @@ -61,6 +61,14 @@ void SearchTableResult::parse(const std::string &payload) searchTableListObject.envType = valueSearchTableListSearchTable["EnvType"].asString(); if(!valueSearchTableListSearchTable["DBSearchName"].isNull()) searchTableListObject.dBSearchName = valueSearchTableListSearchTable["DBSearchName"].asString(); + if(!valueSearchTableListSearchTable["DbType"].isNull()) + searchTableListObject.dbType = valueSearchTableListSearchTable["DbType"].asString(); + if(!valueSearchTableListSearchTable["Description"].isNull()) + searchTableListObject.description = valueSearchTableListSearchTable["Description"].asString(); + if(!valueSearchTableListSearchTable["DbName"].isNull()) + searchTableListObject.dbName = valueSearchTableListSearchTable["DbName"].asString(); + if(!valueSearchTableListSearchTable["TableGuid"].isNull()) + searchTableListObject.tableGuid = valueSearchTableListSearchTable["TableGuid"].asString(); auto allOwnerIdList = value["OwnerIdList"]["OwnerIds"]; for (auto value : allOwnerIdList) searchTableListObject.ownerIdList.push_back(value.asString()); diff --git a/dms-enterprise/src/model/UpdateInstanceRequest.cc b/dms-enterprise/src/model/UpdateInstanceRequest.cc index 033a5ca5e..beed15384 100644 --- a/dms-enterprise/src/model/UpdateInstanceRequest.cc +++ b/dms-enterprise/src/model/UpdateInstanceRequest.cc @@ -258,3 +258,14 @@ void UpdateInstanceRequest::setVpcId(const std::string& vpcId) setParameter("VpcId", vpcId); } +bool UpdateInstanceRequest::getSkipTest()const +{ + return skipTest_; +} + +void UpdateInstanceRequest::setSkipTest(bool skipTest) +{ + skipTest_ = skipTest; + setParameter("SkipTest", skipTest ? "true" : "false"); +} +