diff --git a/VERSION b/VERSION index 4093c95e1..d75cef26d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1923 \ No newline at end of file +1.36.1924 \ No newline at end of file diff --git a/dms-dg/CMakeLists.txt b/dms-dg/CMakeLists.txt new file mode 100644 index 000000000..a78542568 --- /dev/null +++ b/dms-dg/CMakeLists.txt @@ -0,0 +1,162 @@ +# +# 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. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(dms-dg_public_header + include/alibabacloud/dms-dg/Dms_dgClient.h + include/alibabacloud/dms-dg/Dms_dgExport.h ) + +set(dms-dg_public_header_model + include/alibabacloud/dms-dg/model/AddDatabaseRequest.h + include/alibabacloud/dms-dg/model/AddDatabaseResult.h + include/alibabacloud/dms-dg/model/AddDatabaseListRequest.h + include/alibabacloud/dms-dg/model/AddDatabaseListResult.h + include/alibabacloud/dms-dg/model/CheckDGEnabledRequest.h + include/alibabacloud/dms-dg/model/CheckDGEnabledResult.h + include/alibabacloud/dms-dg/model/ConnectDatabaseRequest.h + include/alibabacloud/dms-dg/model/ConnectDatabaseResult.h + include/alibabacloud/dms-dg/model/CreateGatewayRequest.h + include/alibabacloud/dms-dg/model/CreateGatewayResult.h + include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeRequest.h + include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeResult.h + include/alibabacloud/dms-dg/model/DeleteDatabaseRequest.h + include/alibabacloud/dms-dg/model/DeleteDatabaseResult.h + include/alibabacloud/dms-dg/model/DeleteGatewayRequest.h + include/alibabacloud/dms-dg/model/DeleteGatewayResult.h + include/alibabacloud/dms-dg/model/DeleteGatewayInstanceRequest.h + include/alibabacloud/dms-dg/model/DeleteGatewayInstanceResult.h + include/alibabacloud/dms-dg/model/DescribeRegionsRequest.h + include/alibabacloud/dms-dg/model/DescribeRegionsResult.h + include/alibabacloud/dms-dg/model/DownloadGatewayProgramRequest.h + include/alibabacloud/dms-dg/model/DownloadGatewayProgramResult.h + include/alibabacloud/dms-dg/model/FindUserGatewayByIdRequest.h + include/alibabacloud/dms-dg/model/FindUserGatewayByIdResult.h + include/alibabacloud/dms-dg/model/GetUserDatabasesRequest.h + include/alibabacloud/dms-dg/model/GetUserDatabasesResult.h + include/alibabacloud/dms-dg/model/GetUserGatewayInstancesRequest.h + include/alibabacloud/dms-dg/model/GetUserGatewayInstancesResult.h + include/alibabacloud/dms-dg/model/GetUserGatewaysRequest.h + include/alibabacloud/dms-dg/model/GetUserGatewaysResult.h + include/alibabacloud/dms-dg/model/ListDatabaseAccessPointRequest.h + include/alibabacloud/dms-dg/model/ListDatabaseAccessPointResult.h + include/alibabacloud/dms-dg/model/ModifyDatabaseRequest.h + include/alibabacloud/dms-dg/model/ModifyDatabaseResult.h + include/alibabacloud/dms-dg/model/ModifyGatewayRequest.h + include/alibabacloud/dms-dg/model/ModifyGatewayResult.h + include/alibabacloud/dms-dg/model/RetryDatabaseRequest.h + include/alibabacloud/dms-dg/model/RetryDatabaseResult.h + include/alibabacloud/dms-dg/model/StopGatewayRequest.h + include/alibabacloud/dms-dg/model/StopGatewayResult.h ) + +set(dms-dg_src + src/Dms-dgClient.cc + src/model/AddDatabaseRequest.cc + src/model/AddDatabaseResult.cc + src/model/AddDatabaseListRequest.cc + src/model/AddDatabaseListResult.cc + src/model/CheckDGEnabledRequest.cc + src/model/CheckDGEnabledResult.cc + src/model/ConnectDatabaseRequest.cc + src/model/ConnectDatabaseResult.cc + src/model/CreateGatewayRequest.cc + src/model/CreateGatewayResult.cc + src/model/CreateGatewayVerifyCodeRequest.cc + src/model/CreateGatewayVerifyCodeResult.cc + src/model/DeleteDatabaseRequest.cc + src/model/DeleteDatabaseResult.cc + src/model/DeleteGatewayRequest.cc + src/model/DeleteGatewayResult.cc + src/model/DeleteGatewayInstanceRequest.cc + src/model/DeleteGatewayInstanceResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/DownloadGatewayProgramRequest.cc + src/model/DownloadGatewayProgramResult.cc + src/model/FindUserGatewayByIdRequest.cc + src/model/FindUserGatewayByIdResult.cc + src/model/GetUserDatabasesRequest.cc + src/model/GetUserDatabasesResult.cc + src/model/GetUserGatewayInstancesRequest.cc + src/model/GetUserGatewayInstancesResult.cc + src/model/GetUserGatewaysRequest.cc + src/model/GetUserGatewaysResult.cc + src/model/ListDatabaseAccessPointRequest.cc + src/model/ListDatabaseAccessPointResult.cc + src/model/ModifyDatabaseRequest.cc + src/model/ModifyDatabaseResult.cc + src/model/ModifyGatewayRequest.cc + src/model/ModifyGatewayResult.cc + src/model/RetryDatabaseRequest.cc + src/model/RetryDatabaseResult.cc + src/model/StopGatewayRequest.cc + src/model/StopGatewayResult.cc ) + +add_library(dms-dg ${LIB_TYPE} + ${dms-dg_public_header} + ${dms-dg_public_header_model} + ${dms-dg_src}) + +set_target_properties(dms-dg + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}dms-dg + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(dms-dg + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_DMS_DG_LIBRARY) +endif() + +target_include_directories(dms-dg + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(dms-dg + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(dms-dg + jsoncpp) + target_include_directories(dms-dg + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(dms-dg + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(dms-dg + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(dms-dg + PRIVATE /usr/include/jsoncpp) + target_link_libraries(dms-dg + jsoncpp) +endif() + +install(FILES ${dms-dg_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dms-dg) +install(FILES ${dms-dg_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dms-dg/model) +install(TARGETS dms-dg + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/Dms_dgClient.h b/dms-dg/include/alibabacloud/dms-dg/Dms_dgClient.h new file mode 100644 index 000000000..8c152192c --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/Dms_dgClient.h @@ -0,0 +1,206 @@ +/* + * 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_DG_DMS_DGCLIENT_H_ +#define ALIBABACLOUD_DMS_DG_DMS_DGCLIENT_H_ + +#include +#include +#include +#include +#include "Dms_dgExport.h" +#include "model/AddDatabaseRequest.h" +#include "model/AddDatabaseResult.h" +#include "model/AddDatabaseListRequest.h" +#include "model/AddDatabaseListResult.h" +#include "model/CheckDGEnabledRequest.h" +#include "model/CheckDGEnabledResult.h" +#include "model/ConnectDatabaseRequest.h" +#include "model/ConnectDatabaseResult.h" +#include "model/CreateGatewayRequest.h" +#include "model/CreateGatewayResult.h" +#include "model/CreateGatewayVerifyCodeRequest.h" +#include "model/CreateGatewayVerifyCodeResult.h" +#include "model/DeleteDatabaseRequest.h" +#include "model/DeleteDatabaseResult.h" +#include "model/DeleteGatewayRequest.h" +#include "model/DeleteGatewayResult.h" +#include "model/DeleteGatewayInstanceRequest.h" +#include "model/DeleteGatewayInstanceResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/DownloadGatewayProgramRequest.h" +#include "model/DownloadGatewayProgramResult.h" +#include "model/FindUserGatewayByIdRequest.h" +#include "model/FindUserGatewayByIdResult.h" +#include "model/GetUserDatabasesRequest.h" +#include "model/GetUserDatabasesResult.h" +#include "model/GetUserGatewayInstancesRequest.h" +#include "model/GetUserGatewayInstancesResult.h" +#include "model/GetUserGatewaysRequest.h" +#include "model/GetUserGatewaysResult.h" +#include "model/ListDatabaseAccessPointRequest.h" +#include "model/ListDatabaseAccessPointResult.h" +#include "model/ModifyDatabaseRequest.h" +#include "model/ModifyDatabaseResult.h" +#include "model/ModifyGatewayRequest.h" +#include "model/ModifyGatewayResult.h" +#include "model/RetryDatabaseRequest.h" +#include "model/RetryDatabaseResult.h" +#include "model/StopGatewayRequest.h" +#include "model/StopGatewayResult.h" + + +namespace AlibabaCloud +{ + namespace Dms_dg + { + class ALIBABACLOUD_DMS_DG_EXPORT Dms_dgClient : public RpcServiceClient + { + public: + typedef Outcome AddDatabaseOutcome; + typedef std::future AddDatabaseOutcomeCallable; + typedef std::function&)> AddDatabaseAsyncHandler; + typedef Outcome AddDatabaseListOutcome; + typedef std::future AddDatabaseListOutcomeCallable; + typedef std::function&)> AddDatabaseListAsyncHandler; + typedef Outcome CheckDGEnabledOutcome; + typedef std::future CheckDGEnabledOutcomeCallable; + typedef std::function&)> CheckDGEnabledAsyncHandler; + typedef Outcome ConnectDatabaseOutcome; + typedef std::future ConnectDatabaseOutcomeCallable; + typedef std::function&)> ConnectDatabaseAsyncHandler; + typedef Outcome CreateGatewayOutcome; + typedef std::future CreateGatewayOutcomeCallable; + typedef std::function&)> CreateGatewayAsyncHandler; + typedef Outcome CreateGatewayVerifyCodeOutcome; + typedef std::future CreateGatewayVerifyCodeOutcomeCallable; + typedef std::function&)> CreateGatewayVerifyCodeAsyncHandler; + typedef Outcome DeleteDatabaseOutcome; + typedef std::future DeleteDatabaseOutcomeCallable; + typedef std::function&)> DeleteDatabaseAsyncHandler; + typedef Outcome DeleteGatewayOutcome; + typedef std::future DeleteGatewayOutcomeCallable; + typedef std::function&)> DeleteGatewayAsyncHandler; + typedef Outcome DeleteGatewayInstanceOutcome; + typedef std::future DeleteGatewayInstanceOutcomeCallable; + typedef std::function&)> DeleteGatewayInstanceAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome DownloadGatewayProgramOutcome; + typedef std::future DownloadGatewayProgramOutcomeCallable; + typedef std::function&)> DownloadGatewayProgramAsyncHandler; + typedef Outcome FindUserGatewayByIdOutcome; + typedef std::future FindUserGatewayByIdOutcomeCallable; + typedef std::function&)> FindUserGatewayByIdAsyncHandler; + typedef Outcome GetUserDatabasesOutcome; + typedef std::future GetUserDatabasesOutcomeCallable; + typedef std::function&)> GetUserDatabasesAsyncHandler; + typedef Outcome GetUserGatewayInstancesOutcome; + typedef std::future GetUserGatewayInstancesOutcomeCallable; + typedef std::function&)> GetUserGatewayInstancesAsyncHandler; + typedef Outcome GetUserGatewaysOutcome; + typedef std::future GetUserGatewaysOutcomeCallable; + typedef std::function&)> GetUserGatewaysAsyncHandler; + typedef Outcome ListDatabaseAccessPointOutcome; + typedef std::future ListDatabaseAccessPointOutcomeCallable; + typedef std::function&)> ListDatabaseAccessPointAsyncHandler; + typedef Outcome ModifyDatabaseOutcome; + typedef std::future ModifyDatabaseOutcomeCallable; + typedef std::function&)> ModifyDatabaseAsyncHandler; + typedef Outcome ModifyGatewayOutcome; + typedef std::future ModifyGatewayOutcomeCallable; + typedef std::function&)> ModifyGatewayAsyncHandler; + typedef Outcome RetryDatabaseOutcome; + typedef std::future RetryDatabaseOutcomeCallable; + typedef std::function&)> RetryDatabaseAsyncHandler; + typedef Outcome StopGatewayOutcome; + typedef std::future StopGatewayOutcomeCallable; + typedef std::function&)> StopGatewayAsyncHandler; + + Dms_dgClient(const Credentials &credentials, const ClientConfiguration &configuration); + Dms_dgClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + Dms_dgClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~Dms_dgClient(); + AddDatabaseOutcome addDatabase(const Model::AddDatabaseRequest &request)const; + void addDatabaseAsync(const Model::AddDatabaseRequest& request, const AddDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AddDatabaseOutcomeCallable addDatabaseCallable(const Model::AddDatabaseRequest& request) const; + AddDatabaseListOutcome addDatabaseList(const Model::AddDatabaseListRequest &request)const; + void addDatabaseListAsync(const Model::AddDatabaseListRequest& request, const AddDatabaseListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AddDatabaseListOutcomeCallable addDatabaseListCallable(const Model::AddDatabaseListRequest& request) const; + CheckDGEnabledOutcome checkDGEnabled(const Model::CheckDGEnabledRequest &request)const; + void checkDGEnabledAsync(const Model::CheckDGEnabledRequest& request, const CheckDGEnabledAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CheckDGEnabledOutcomeCallable checkDGEnabledCallable(const Model::CheckDGEnabledRequest& request) const; + ConnectDatabaseOutcome connectDatabase(const Model::ConnectDatabaseRequest &request)const; + void connectDatabaseAsync(const Model::ConnectDatabaseRequest& request, const ConnectDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ConnectDatabaseOutcomeCallable connectDatabaseCallable(const Model::ConnectDatabaseRequest& request) const; + CreateGatewayOutcome createGateway(const Model::CreateGatewayRequest &request)const; + void createGatewayAsync(const Model::CreateGatewayRequest& request, const CreateGatewayAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateGatewayOutcomeCallable createGatewayCallable(const Model::CreateGatewayRequest& request) const; + CreateGatewayVerifyCodeOutcome createGatewayVerifyCode(const Model::CreateGatewayVerifyCodeRequest &request)const; + void createGatewayVerifyCodeAsync(const Model::CreateGatewayVerifyCodeRequest& request, const CreateGatewayVerifyCodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateGatewayVerifyCodeOutcomeCallable createGatewayVerifyCodeCallable(const Model::CreateGatewayVerifyCodeRequest& request) const; + 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; + DeleteGatewayOutcome deleteGateway(const Model::DeleteGatewayRequest &request)const; + void deleteGatewayAsync(const Model::DeleteGatewayRequest& request, const DeleteGatewayAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteGatewayOutcomeCallable deleteGatewayCallable(const Model::DeleteGatewayRequest& request) const; + DeleteGatewayInstanceOutcome deleteGatewayInstance(const Model::DeleteGatewayInstanceRequest &request)const; + void deleteGatewayInstanceAsync(const Model::DeleteGatewayInstanceRequest& request, const DeleteGatewayInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteGatewayInstanceOutcomeCallable deleteGatewayInstanceCallable(const Model::DeleteGatewayInstanceRequest& request) const; + DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const; + void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const; + DownloadGatewayProgramOutcome downloadGatewayProgram(const Model::DownloadGatewayProgramRequest &request)const; + void downloadGatewayProgramAsync(const Model::DownloadGatewayProgramRequest& request, const DownloadGatewayProgramAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DownloadGatewayProgramOutcomeCallable downloadGatewayProgramCallable(const Model::DownloadGatewayProgramRequest& request) const; + FindUserGatewayByIdOutcome findUserGatewayById(const Model::FindUserGatewayByIdRequest &request)const; + void findUserGatewayByIdAsync(const Model::FindUserGatewayByIdRequest& request, const FindUserGatewayByIdAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + FindUserGatewayByIdOutcomeCallable findUserGatewayByIdCallable(const Model::FindUserGatewayByIdRequest& request) const; + GetUserDatabasesOutcome getUserDatabases(const Model::GetUserDatabasesRequest &request)const; + void getUserDatabasesAsync(const Model::GetUserDatabasesRequest& request, const GetUserDatabasesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserDatabasesOutcomeCallable getUserDatabasesCallable(const Model::GetUserDatabasesRequest& request) const; + GetUserGatewayInstancesOutcome getUserGatewayInstances(const Model::GetUserGatewayInstancesRequest &request)const; + void getUserGatewayInstancesAsync(const Model::GetUserGatewayInstancesRequest& request, const GetUserGatewayInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserGatewayInstancesOutcomeCallable getUserGatewayInstancesCallable(const Model::GetUserGatewayInstancesRequest& request) const; + GetUserGatewaysOutcome getUserGateways(const Model::GetUserGatewaysRequest &request)const; + void getUserGatewaysAsync(const Model::GetUserGatewaysRequest& request, const GetUserGatewaysAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserGatewaysOutcomeCallable getUserGatewaysCallable(const Model::GetUserGatewaysRequest& request) const; + ListDatabaseAccessPointOutcome listDatabaseAccessPoint(const Model::ListDatabaseAccessPointRequest &request)const; + void listDatabaseAccessPointAsync(const Model::ListDatabaseAccessPointRequest& request, const ListDatabaseAccessPointAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListDatabaseAccessPointOutcomeCallable listDatabaseAccessPointCallable(const Model::ListDatabaseAccessPointRequest& request) const; + ModifyDatabaseOutcome modifyDatabase(const Model::ModifyDatabaseRequest &request)const; + void modifyDatabaseAsync(const Model::ModifyDatabaseRequest& request, const ModifyDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyDatabaseOutcomeCallable modifyDatabaseCallable(const Model::ModifyDatabaseRequest& request) const; + ModifyGatewayOutcome modifyGateway(const Model::ModifyGatewayRequest &request)const; + void modifyGatewayAsync(const Model::ModifyGatewayRequest& request, const ModifyGatewayAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyGatewayOutcomeCallable modifyGatewayCallable(const Model::ModifyGatewayRequest& request) const; + RetryDatabaseOutcome retryDatabase(const Model::RetryDatabaseRequest &request)const; + void retryDatabaseAsync(const Model::RetryDatabaseRequest& request, const RetryDatabaseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RetryDatabaseOutcomeCallable retryDatabaseCallable(const Model::RetryDatabaseRequest& request) const; + StopGatewayOutcome stopGateway(const Model::StopGatewayRequest &request)const; + void stopGatewayAsync(const Model::StopGatewayRequest& request, const StopGatewayAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + StopGatewayOutcomeCallable stopGatewayCallable(const Model::StopGatewayRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_DMS_DG_DMS_DGCLIENT_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/Dms_dgExport.h b/dms-dg/include/alibabacloud/dms-dg/Dms_dgExport.h new file mode 100644 index 000000000..4e72cecfe --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/Dms_dgExport.h @@ -0,0 +1,32 @@ +/* + * 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_DG_DMS_DGEXPORT_H_ +#define ALIBABACLOUD_DMS_DG_DMS_DGEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_DMS_DG_LIBRARY) +# define ALIBABACLOUD_DMS_DG_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_DMS_DG_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_DMS_DG_EXPORT +#endif + +#endif // !ALIBABACLOUD_DMS_DG_DMS_DGEXPORT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListRequest.h new file mode 100644 index 000000000..29d3b989c --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListRequest.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_DG_MODEL_ADDDATABASELISTREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASELISTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT AddDatabaseListRequest : public RpcServiceRequest { +public: + AddDatabaseListRequest(); + ~AddDatabaseListRequest(); + std::string getDatabaseString() const; + void setDatabaseString(const std::string &databaseString); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + +private: + std::string databaseString_; + std::string clientToken_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASELISTREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListResult.h b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListResult.h new file mode 100644 index 000000000..166cc76a0 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseListResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_ADDDATABASELISTRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT AddDatabaseListResult : public ServiceResult + { + public: + + + AddDatabaseListResult(); + explicit AddDatabaseListResult(const std::string &payload); + ~AddDatabaseListResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASELISTRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseRequest.h new file mode 100644 index 000000000..a90721ff7 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseRequest.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_DMS_DG_MODEL_ADDDATABASEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT AddDatabaseRequest : public RpcServiceRequest { +public: + AddDatabaseRequest(); + ~AddDatabaseRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getHost() const; + void setHost(const std::string &host); + std::string getDbUserName() const; + void setDbUserName(const std::string &dbUserName); + std::string getDbDescription() const; + void setDbDescription(const std::string &dbDescription); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + std::string getDbName() const; + void setDbName(const std::string &dbName); + int getPort() const; + void setPort(int port); + std::string getDbPassword() const; + void setDbPassword(const std::string &dbPassword); + std::string getDbType() const; + void setDbType(const std::string &dbType); + +private: + std::string clientToken_; + std::string regionId_; + std::string host_; + std::string dbUserName_; + std::string dbDescription_; + std::string gatewayId_; + std::string dbName_; + int port_; + std::string dbPassword_; + std::string dbType_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseResult.h b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseResult.h new file mode 100644 index 000000000..0559e05e8 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/AddDatabaseResult.h @@ -0,0 +1,78 @@ +/* + * 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_DG_MODEL_ADDDATABASERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT AddDatabaseResult : public ServiceResult + { + public: + struct DbInstance + { + std::string parentId; + int connectPort; + std::string instanceId; + int port; + std::string host; + std::string gatewayId; + std::string dbType; + std::string dbDescription; + std::string connectHost; + std::string vpcId; + std::string serviceType; + std::string networkType; + std::string instanceStatus; + std::string userId; + std::string nodeId; + std::string vpcInstanceId; + std::string regionId; + std::string gatewayName; + }; + + + AddDatabaseResult(); + explicit AddDatabaseResult(const std::string &payload); + ~AddDatabaseResult(); + DbInstance getDbInstance()const; + std::string getErrorMsg()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + DbInstance dbInstance_; + std::string errorMsg_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_ADDDATABASERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledRequest.h new file mode 100644 index 000000000..4c04e7dc2 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledRequest.h @@ -0,0 +1,39 @@ +/* + * 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_DG_MODEL_CHECKDGENABLEDREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CHECKDGENABLEDREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT CheckDGEnabledRequest : public RpcServiceRequest { +public: + CheckDGEnabledRequest(); + ~CheckDGEnabledRequest(); + +private: +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CHECKDGENABLEDREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledResult.h b/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledResult.h new file mode 100644 index 000000000..636de5e7a --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CheckDGEnabledResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_CHECKDGENABLEDRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CHECKDGENABLEDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT CheckDGEnabledResult : public ServiceResult + { + public: + + + CheckDGEnabledResult(); + explicit CheckDGEnabledResult(const std::string &payload); + ~CheckDGEnabledResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CHECKDGENABLEDRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseRequest.h new file mode 100644 index 000000000..cb220c735 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseRequest.h @@ -0,0 +1,60 @@ +/* + * 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_DG_MODEL_CONNECTDATABASEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CONNECTDATABASEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT ConnectDatabaseRequest : public RpcServiceRequest { +public: + ConnectDatabaseRequest(); + ~ConnectDatabaseRequest(); + std::string getDbName() const; + void setDbName(const std::string &dbName); + int getPort() const; + void setPort(int port); + std::string getDbPassword() const; + void setDbPassword(const std::string &dbPassword); + std::string getHost() const; + void setHost(const std::string &host); + std::string getDbType() const; + void setDbType(const std::string &dbType); + std::string getDbUserName() const; + void setDbUserName(const std::string &dbUserName); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string dbName_; + int port_; + std::string dbPassword_; + std::string host_; + std::string dbType_; + std::string dbUserName_; + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CONNECTDATABASEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseResult.h b/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseResult.h new file mode 100644 index 000000000..96bd478c5 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ConnectDatabaseResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_CONNECTDATABASERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CONNECTDATABASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT ConnectDatabaseResult : public ServiceResult + { + public: + + + ConnectDatabaseResult(); + explicit ConnectDatabaseResult(const std::string &payload); + ~ConnectDatabaseResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CONNECTDATABASERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayRequest.h new file mode 100644 index 000000000..f062a779f --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayRequest.h @@ -0,0 +1,48 @@ +/* + * 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_DG_MODEL_CREATEGATEWAYREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT CreateGatewayRequest : public RpcServiceRequest { +public: + CreateGatewayRequest(); + ~CreateGatewayRequest(); + std::string getGatewayDesc() const; + void setGatewayDesc(const std::string &gatewayDesc); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getGatewayName() const; + void setGatewayName(const std::string &gatewayName); + +private: + std::string gatewayDesc_; + std::string regionId_; + std::string gatewayName_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayResult.h b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayResult.h new file mode 100644 index 000000000..153eae6f8 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_CREATEGATEWAYRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT CreateGatewayResult : public ServiceResult + { + public: + + + CreateGatewayResult(); + explicit CreateGatewayResult(const std::string &payload); + ~CreateGatewayResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeRequest.h new file mode 100644 index 000000000..219e7be18 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_CREATEGATEWAYVERIFYCODEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYVERIFYCODEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT CreateGatewayVerifyCodeRequest : public RpcServiceRequest { +public: + CreateGatewayVerifyCodeRequest(); + ~CreateGatewayVerifyCodeRequest(); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYVERIFYCODEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeResult.h b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeResult.h new file mode 100644 index 000000000..e6840941f --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/CreateGatewayVerifyCodeResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_CREATEGATEWAYVERIFYCODERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYVERIFYCODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT CreateGatewayVerifyCodeResult : public ServiceResult + { + public: + + + CreateGatewayVerifyCodeResult(); + explicit CreateGatewayVerifyCodeResult(const std::string &payload); + ~CreateGatewayVerifyCodeResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_CREATEGATEWAYVERIFYCODERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseRequest.h new file mode 100644 index 000000000..9a6599b3f --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_DELETEDATABASEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEDATABASEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT DeleteDatabaseRequest : public RpcServiceRequest { +public: + DeleteDatabaseRequest(); + ~DeleteDatabaseRequest(); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + +private: + std::string instanceId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEDATABASEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseResult.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseResult.h new file mode 100644 index 000000000..920aeea99 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteDatabaseResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_DELETEDATABASERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEDATABASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT DeleteDatabaseResult : public ServiceResult + { + public: + + + DeleteDatabaseResult(); + explicit DeleteDatabaseResult(const std::string &payload); + ~DeleteDatabaseResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEDATABASERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceRequest.h new file mode 100644 index 000000000..ce951ee44 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceRequest.h @@ -0,0 +1,48 @@ +/* + * 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_DG_MODEL_DELETEGATEWAYINSTANCEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYINSTANCEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT DeleteGatewayInstanceRequest : public RpcServiceRequest { +public: + DeleteGatewayInstanceRequest(); + ~DeleteGatewayInstanceRequest(); + std::string getGatewayInstanceId() const; + void setGatewayInstanceId(const std::string &gatewayInstanceId); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayInstanceId_; + std::string regionId_; + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYINSTANCEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceResult.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceResult.h new file mode 100644 index 000000000..cc8e18981 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayInstanceResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_DELETEGATEWAYINSTANCERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYINSTANCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT DeleteGatewayInstanceResult : public ServiceResult + { + public: + + + DeleteGatewayInstanceResult(); + explicit DeleteGatewayInstanceResult(const std::string &payload); + ~DeleteGatewayInstanceResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYINSTANCERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayRequest.h new file mode 100644 index 000000000..715be50ba --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_DELETEGATEWAYREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT DeleteGatewayRequest : public RpcServiceRequest { +public: + DeleteGatewayRequest(); + ~DeleteGatewayRequest(); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayResult.h b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayResult.h new file mode 100644 index 000000000..31cde0246 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DeleteGatewayResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_DELETEGATEWAYRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT DeleteGatewayResult : public ServiceResult + { + public: + + + DeleteGatewayResult(); + explicit DeleteGatewayResult(const std::string &payload); + ~DeleteGatewayResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DELETEGATEWAYRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..116768972 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT DescribeRegionsRequest : public RpcServiceRequest { +public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + +private: + std::string regionId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DESCRIBEREGIONSREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsResult.h b/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsResult.h new file mode 100644 index 000000000..f2cbed2d5 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DescribeRegionsResult.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_DG_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct Region + { + std::string regionId; + std::string regionEndpoint; + std::string localName; + }; + + + DescribeRegionsResult(); + explicit DescribeRegionsResult(const std::string &payload); + ~DescribeRegionsResult(); + std::string getErrorMsg()const; + std::vector getRegions()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::vector regions_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramRequest.h new file mode 100644 index 000000000..e0653b7a7 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramRequest.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_DG_MODEL_DOWNLOADGATEWAYPROGRAMREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DOWNLOADGATEWAYPROGRAMREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT DownloadGatewayProgramRequest : public RpcServiceRequest { +public: + DownloadGatewayProgramRequest(); + ~DownloadGatewayProgramRequest(); + std::string getUserOS() const; + void setUserOS(const std::string &userOS); + std::string getDgVersion() const; + void setDgVersion(const std::string &dgVersion); + +private: + std::string userOS_; + std::string dgVersion_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DOWNLOADGATEWAYPROGRAMREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramResult.h b/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramResult.h new file mode 100644 index 000000000..a91800dd3 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/DownloadGatewayProgramResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_DOWNLOADGATEWAYPROGRAMRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_DOWNLOADGATEWAYPROGRAMRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT DownloadGatewayProgramResult : public ServiceResult + { + public: + + + DownloadGatewayProgramResult(); + explicit DownloadGatewayProgramResult(const std::string &payload); + ~DownloadGatewayProgramResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_DOWNLOADGATEWAYPROGRAMRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdRequest.h new file mode 100644 index 000000000..82c4ff05d --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_FINDUSERGATEWAYBYIDREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_FINDUSERGATEWAYBYIDREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT FindUserGatewayByIdRequest : public RpcServiceRequest { +public: + FindUserGatewayByIdRequest(); + ~FindUserGatewayByIdRequest(); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_FINDUSERGATEWAYBYIDREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdResult.h b/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdResult.h new file mode 100644 index 000000000..92522c220 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/FindUserGatewayByIdResult.h @@ -0,0 +1,71 @@ +/* + * 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_DG_MODEL_FINDUSERGATEWAYBYIDRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_FINDUSERGATEWAYBYIDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT FindUserGatewayByIdResult : public ServiceResult + { + public: + struct Gateway + { + std::string status; + std::string dgVersion; + int numOfExceptionInstance; + std::string userId; + std::string creatorId; + int numOfRunningInstance; + std::string gatewayDesc; + std::string gatewayName; + std::string regionId; + std::string gatewayId; + std::string exceptionMsg; + }; + + + FindUserGatewayByIdResult(); + explicit FindUserGatewayByIdResult(const std::string &payload); + ~FindUserGatewayByIdResult(); + Gateway getGateway()const; + std::string getErrorMsg()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Gateway gateway_; + std::string errorMsg_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_FINDUSERGATEWAYBYIDRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesRequest.h new file mode 100644 index 000000000..871e7b597 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesRequest.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_DMS_DG_MODEL_GETUSERDATABASESREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERDATABASESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT GetUserDatabasesRequest : public RpcServiceRequest { +public: + GetUserDatabasesRequest(); + ~GetUserDatabasesRequest(); + std::string getSearchKey() const; + void setSearchKey(const std::string &searchKey); + std::string getPageNumber() const; + void setPageNumber(const std::string &pageNumber); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getPageSize() const; + void setPageSize(const std::string &pageSize); + std::string getHost() const; + void setHost(const std::string &host); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + int getPort() const; + void setPort(int port); + std::string getDbType() const; + void setDbType(const std::string &dbType); + +private: + std::string searchKey_; + std::string pageNumber_; + std::string regionId_; + std::string pageSize_; + std::string host_; + std::string gatewayId_; + std::string instanceId_; + int port_; + std::string dbType_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERDATABASESREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesResult.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesResult.h new file mode 100644 index 000000000..c332346c2 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserDatabasesResult.h @@ -0,0 +1,81 @@ +/* + * 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_DG_MODEL_GETUSERDATABASESRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERDATABASESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT GetUserDatabasesResult : public ServiceResult + { + public: + struct DbInstance + { + std::string parentId; + int connectPort; + std::string instanceId; + int port; + std::string host; + std::string gatewayId; + std::string dbType; + std::string dbDescription; + long gmtCreate; + std::string connectHost; + std::string vpcId; + std::string serviceType; + std::string networkType; + std::string instanceStatus; + std::string userId; + std::string nodeId; + std::string vpcInstanceId; + std::string regionId; + std::string gatewayName; + }; + + + GetUserDatabasesResult(); + explicit GetUserDatabasesResult(const std::string &payload); + ~GetUserDatabasesResult(); + std::vector getDbInstanceList()const; + std::string getErrorMsg()const; + int getCount()const; + std::string getCode()const; + std::string getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector dbInstanceList_; + std::string errorMsg_; + int count_; + std::string code_; + std::string success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERDATABASESRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesRequest.h new file mode 100644 index 000000000..f8c0a20ca --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesRequest.h @@ -0,0 +1,42 @@ +/* + * 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_DG_MODEL_GETUSERGATEWAYINSTANCESREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYINSTANCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT GetUserGatewayInstancesRequest : public RpcServiceRequest { +public: + GetUserGatewayInstancesRequest(); + ~GetUserGatewayInstancesRequest(); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYINSTANCESREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesResult.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesResult.h new file mode 100644 index 000000000..d86d22c5e --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewayInstancesResult.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_DG_MODEL_GETUSERGATEWAYINSTANCESRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYINSTANCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT GetUserGatewayInstancesResult : public ServiceResult + { + public: + struct GatewayInstance + { + std::string gatewayInstanceId; + std::string outputIP; + std::string message; + long lastUpdateTime; + std::string localIP; + std::string connectEndpointType; + std::string currentVersion; + std::string gatewayInstanceStatus; + std::string currentDaemonVersion; + std::string endPoint; + std::string regionId; + std::string gatewayId; + }; + + + GetUserGatewayInstancesResult(); + explicit GetUserGatewayInstancesResult(const std::string &payload); + ~GetUserGatewayInstancesResult(); + std::vector getGatewayInstanceList()const; + std::string getErrorMsg()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector gatewayInstanceList_; + std::string errorMsg_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYINSTANCESRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysRequest.h new file mode 100644 index 000000000..a297b7586 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysRequest.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_DG_MODEL_GETUSERGATEWAYSREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT GetUserGatewaysRequest : public RpcServiceRequest { +public: + GetUserGatewaysRequest(); + ~GetUserGatewaysRequest(); + std::string getSearchKey() const; + void setSearchKey(const std::string &searchKey); + int getPageNumber() const; + void setPageNumber(int pageNumber); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + int getPageSize() const; + void setPageSize(int pageSize); + +private: + std::string searchKey_; + int pageNumber_; + std::string regionId_; + int pageSize_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYSREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysResult.h b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysResult.h new file mode 100644 index 000000000..058dbb4b6 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/GetUserGatewaysResult.h @@ -0,0 +1,73 @@ +/* + * 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_DG_MODEL_GETUSERGATEWAYSRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT GetUserGatewaysResult : public ServiceResult + { + public: + struct Gateway + { + std::string status; + std::string dgVersion; + int numOfExceptionInstance; + std::string userId; + std::string creatorId; + int numOfRunningInstance; + std::string gatewayDesc; + std::string gatewayName; + std::string regionId; + std::string gatewayId; + std::string exceptionMsg; + }; + + + GetUserGatewaysResult(); + explicit GetUserGatewaysResult(const std::string &payload); + ~GetUserGatewaysResult(); + std::vector getGatewayList()const; + std::string getErrorMsg()const; + int getCount()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector gatewayList_; + std::string errorMsg_; + int count_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_GETUSERGATEWAYSRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointRequest.h new file mode 100644 index 000000000..6966c5ac8 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointRequest.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_DMS_DG_MODEL_LISTDATABASEACCESSPOINTREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_LISTDATABASEACCESSPOINTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT ListDatabaseAccessPointRequest : public RpcServiceRequest { +public: + ListDatabaseAccessPointRequest(); + ~ListDatabaseAccessPointRequest(); + std::string getSearchKey() const; + void setSearchKey(const std::string &searchKey); + std::string getPageNumber() const; + void setPageNumber(const std::string &pageNumber); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getPageSize() const; + void setPageSize(const std::string &pageSize); + std::string getHost() const; + void setHost(const std::string &host); + std::string getDbInstanceId() const; + void setDbInstanceId(const std::string &dbInstanceId); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + int getPort() const; + void setPort(int port); + std::string getVpcId() const; + void setVpcId(const std::string &vpcId); + +private: + std::string searchKey_; + std::string pageNumber_; + std::string regionId_; + std::string pageSize_; + std::string host_; + std::string dbInstanceId_; + std::string gatewayId_; + int port_; + std::string vpcId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_LISTDATABASEACCESSPOINTREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointResult.h b/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointResult.h new file mode 100644 index 000000000..85f254112 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ListDatabaseAccessPointResult.h @@ -0,0 +1,71 @@ +/* + * 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_DG_MODEL_LISTDATABASEACCESSPOINTRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_LISTDATABASEACCESSPOINTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT ListDatabaseAccessPointResult : public ServiceResult + { + public: + struct DbInstanceAccessPoint + { + std::string accessAddr; + long gmtCreate; + std::string vpcId; + long gmtModified; + std::string routerId; + int accessPort; + std::string vpcAzoneId; + std::string dbInstanceId; + std::string vswitchId; + }; + + + ListDatabaseAccessPointResult(); + explicit ListDatabaseAccessPointResult(const std::string &payload); + ~ListDatabaseAccessPointResult(); + std::vector getDbInstanceAccessPointList()const; + std::string getErrorMsg()const; + int getCount()const; + std::string getCode()const; + std::string getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector dbInstanceAccessPointList_; + std::string errorMsg_; + int count_; + std::string code_; + std::string success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_LISTDATABASEACCESSPOINTRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseRequest.h new file mode 100644 index 000000000..94c9f5342 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseRequest.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_DG_MODEL_MODIFYDATABASEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_MODIFYDATABASEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT ModifyDatabaseRequest : public RpcServiceRequest { +public: + ModifyDatabaseRequest(); + ~ModifyDatabaseRequest(); + std::string getHost() const; + void setHost(const std::string &host); + std::string getDbUserName() const; + void setDbUserName(const std::string &dbUserName); + std::string getDbDescription() const; + void setDbDescription(const std::string &dbDescription); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getDbName() const; + void setDbName(const std::string &dbName); + int getPort() const; + void setPort(int port); + std::string getDbPassword() const; + void setDbPassword(const std::string &dbPassword); + std::string getDbType() const; + void setDbType(const std::string &dbType); + +private: + std::string host_; + std::string dbUserName_; + std::string dbDescription_; + std::string instanceId_; + std::string dbName_; + int port_; + std::string dbPassword_; + std::string dbType_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_MODIFYDATABASEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseResult.h b/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseResult.h new file mode 100644 index 000000000..4be88be47 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ModifyDatabaseResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_MODIFYDATABASERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_MODIFYDATABASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT ModifyDatabaseResult : public ServiceResult + { + public: + + + ModifyDatabaseResult(); + explicit ModifyDatabaseResult(const std::string &payload); + ~ModifyDatabaseResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_MODIFYDATABASERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayRequest.h new file mode 100644 index 000000000..4008a704c --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayRequest.h @@ -0,0 +1,48 @@ +/* + * 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_DG_MODEL_MODIFYGATEWAYREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_MODIFYGATEWAYREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT ModifyGatewayRequest : public RpcServiceRequest { +public: + ModifyGatewayRequest(); + ~ModifyGatewayRequest(); + std::string getGatewayDesc() const; + void setGatewayDesc(const std::string &gatewayDesc); + std::string getGatewayName() const; + void setGatewayName(const std::string &gatewayName); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayDesc_; + std::string gatewayName_; + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_MODIFYGATEWAYREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayResult.h b/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayResult.h new file mode 100644 index 000000000..3f3de823f --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/ModifyGatewayResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_MODIFYGATEWAYRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_MODIFYGATEWAYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT ModifyGatewayResult : public ServiceResult + { + public: + + + ModifyGatewayResult(); + explicit ModifyGatewayResult(const std::string &payload); + ~ModifyGatewayResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_MODIFYGATEWAYRESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseRequest.h new file mode 100644 index 000000000..001d0e4c4 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseRequest.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_DMS_DG_MODEL_RETRYDATABASEREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_RETRYDATABASEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT RetryDatabaseRequest : public RpcServiceRequest { +public: + RetryDatabaseRequest(); + ~RetryDatabaseRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getHost() const; + void setHost(const std::string &host); + std::string getDbUserName() const; + void setDbUserName(const std::string &dbUserName); + std::string getDbDescription() const; + void setDbDescription(const std::string &dbDescription); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + std::string getDbName() const; + void setDbName(const std::string &dbName); + int getPort() const; + void setPort(int port); + std::string getDbPassword() const; + void setDbPassword(const std::string &dbPassword); + std::string getDbType() const; + void setDbType(const std::string &dbType); + +private: + std::string clientToken_; + std::string regionId_; + std::string host_; + std::string dbUserName_; + std::string dbDescription_; + std::string gatewayId_; + std::string dbName_; + int port_; + std::string dbPassword_; + std::string dbType_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_RETRYDATABASEREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseResult.h b/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseResult.h new file mode 100644 index 000000000..56056eaa0 --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/RetryDatabaseResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_RETRYDATABASERESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_RETRYDATABASERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT RetryDatabaseResult : public ServiceResult + { + public: + + + RetryDatabaseResult(); + explicit RetryDatabaseResult(const std::string &payload); + ~RetryDatabaseResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_RETRYDATABASERESULT_H_ \ No newline at end of file diff --git a/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayRequest.h b/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayRequest.h new file mode 100644 index 000000000..f91d5d1cf --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayRequest.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_DG_MODEL_STOPGATEWAYREQUEST_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_STOPGATEWAYREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dms_dg { +namespace Model { +class ALIBABACLOUD_DMS_DG_EXPORT StopGatewayRequest : public RpcServiceRequest { +public: + StopGatewayRequest(); + ~StopGatewayRequest(); + std::string getGatewayInstanceId() const; + void setGatewayInstanceId(const std::string &gatewayInstanceId); + std::string getGatewayId() const; + void setGatewayId(const std::string &gatewayId); + +private: + std::string gatewayInstanceId_; + std::string gatewayId_; +}; +} // namespace Model +} // namespace Dms_dg +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DMS_DG_MODEL_STOPGATEWAYREQUEST_H_ diff --git a/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayResult.h b/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayResult.h new file mode 100644 index 000000000..18dc1e8df --- /dev/null +++ b/dms-dg/include/alibabacloud/dms-dg/model/StopGatewayResult.h @@ -0,0 +1,57 @@ +/* + * 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_DG_MODEL_STOPGATEWAYRESULT_H_ +#define ALIBABACLOUD_DMS_DG_MODEL_STOPGATEWAYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dms_dg + { + namespace Model + { + class ALIBABACLOUD_DMS_DG_EXPORT StopGatewayResult : public ServiceResult + { + public: + + + StopGatewayResult(); + explicit StopGatewayResult(const std::string &payload); + ~StopGatewayResult(); + std::string getErrorMsg()const; + std::string getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + std::string data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DMS_DG_MODEL_STOPGATEWAYRESULT_H_ \ No newline at end of file diff --git a/dms-dg/src/Dms-dgClient.cc b/dms-dg/src/Dms-dgClient.cc new file mode 100644 index 000000000..f86a12287 --- /dev/null +++ b/dms-dg/src/Dms-dgClient.cc @@ -0,0 +1,773 @@ +/* + * 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; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +namespace +{ + const std::string SERVICE_NAME = "dms-dg"; +} + +Dms_dgClient::Dms_dgClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dms_dgClient::Dms_dgClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dms_dgClient::Dms_dgClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dms_dgClient::~Dms_dgClient() +{} + +Dms_dgClient::AddDatabaseOutcome Dms_dgClient::addDatabase(const AddDatabaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AddDatabaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AddDatabaseOutcome(AddDatabaseResult(outcome.result())); + else + return AddDatabaseOutcome(outcome.error()); +} + +void Dms_dgClient::addDatabaseAsync(const AddDatabaseRequest& request, const AddDatabaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, addDatabase(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::AddDatabaseOutcomeCallable Dms_dgClient::addDatabaseCallable(const AddDatabaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->addDatabase(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::AddDatabaseListOutcome Dms_dgClient::addDatabaseList(const AddDatabaseListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AddDatabaseListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AddDatabaseListOutcome(AddDatabaseListResult(outcome.result())); + else + return AddDatabaseListOutcome(outcome.error()); +} + +void Dms_dgClient::addDatabaseListAsync(const AddDatabaseListRequest& request, const AddDatabaseListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, addDatabaseList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::AddDatabaseListOutcomeCallable Dms_dgClient::addDatabaseListCallable(const AddDatabaseListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->addDatabaseList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::CheckDGEnabledOutcome Dms_dgClient::checkDGEnabled(const CheckDGEnabledRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CheckDGEnabledOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CheckDGEnabledOutcome(CheckDGEnabledResult(outcome.result())); + else + return CheckDGEnabledOutcome(outcome.error()); +} + +void Dms_dgClient::checkDGEnabledAsync(const CheckDGEnabledRequest& request, const CheckDGEnabledAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, checkDGEnabled(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::CheckDGEnabledOutcomeCallable Dms_dgClient::checkDGEnabledCallable(const CheckDGEnabledRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->checkDGEnabled(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::ConnectDatabaseOutcome Dms_dgClient::connectDatabase(const ConnectDatabaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ConnectDatabaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ConnectDatabaseOutcome(ConnectDatabaseResult(outcome.result())); + else + return ConnectDatabaseOutcome(outcome.error()); +} + +void Dms_dgClient::connectDatabaseAsync(const ConnectDatabaseRequest& request, const ConnectDatabaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, connectDatabase(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::ConnectDatabaseOutcomeCallable Dms_dgClient::connectDatabaseCallable(const ConnectDatabaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->connectDatabase(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::CreateGatewayOutcome Dms_dgClient::createGateway(const CreateGatewayRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateGatewayOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateGatewayOutcome(CreateGatewayResult(outcome.result())); + else + return CreateGatewayOutcome(outcome.error()); +} + +void Dms_dgClient::createGatewayAsync(const CreateGatewayRequest& request, const CreateGatewayAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createGateway(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::CreateGatewayOutcomeCallable Dms_dgClient::createGatewayCallable(const CreateGatewayRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createGateway(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::CreateGatewayVerifyCodeOutcome Dms_dgClient::createGatewayVerifyCode(const CreateGatewayVerifyCodeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateGatewayVerifyCodeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateGatewayVerifyCodeOutcome(CreateGatewayVerifyCodeResult(outcome.result())); + else + return CreateGatewayVerifyCodeOutcome(outcome.error()); +} + +void Dms_dgClient::createGatewayVerifyCodeAsync(const CreateGatewayVerifyCodeRequest& request, const CreateGatewayVerifyCodeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createGatewayVerifyCode(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::CreateGatewayVerifyCodeOutcomeCallable Dms_dgClient::createGatewayVerifyCodeCallable(const CreateGatewayVerifyCodeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createGatewayVerifyCode(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::DeleteDatabaseOutcome Dms_dgClient::deleteDatabase(const DeleteDatabaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteDatabaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteDatabaseOutcome(DeleteDatabaseResult(outcome.result())); + else + return DeleteDatabaseOutcome(outcome.error()); +} + +void Dms_dgClient::deleteDatabaseAsync(const DeleteDatabaseRequest& request, const DeleteDatabaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteDatabase(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::DeleteDatabaseOutcomeCallable Dms_dgClient::deleteDatabaseCallable(const DeleteDatabaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteDatabase(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::DeleteGatewayOutcome Dms_dgClient::deleteGateway(const DeleteGatewayRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteGatewayOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteGatewayOutcome(DeleteGatewayResult(outcome.result())); + else + return DeleteGatewayOutcome(outcome.error()); +} + +void Dms_dgClient::deleteGatewayAsync(const DeleteGatewayRequest& request, const DeleteGatewayAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteGateway(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::DeleteGatewayOutcomeCallable Dms_dgClient::deleteGatewayCallable(const DeleteGatewayRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteGateway(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::DeleteGatewayInstanceOutcome Dms_dgClient::deleteGatewayInstance(const DeleteGatewayInstanceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteGatewayInstanceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteGatewayInstanceOutcome(DeleteGatewayInstanceResult(outcome.result())); + else + return DeleteGatewayInstanceOutcome(outcome.error()); +} + +void Dms_dgClient::deleteGatewayInstanceAsync(const DeleteGatewayInstanceRequest& request, const DeleteGatewayInstanceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteGatewayInstance(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::DeleteGatewayInstanceOutcomeCallable Dms_dgClient::deleteGatewayInstanceCallable(const DeleteGatewayInstanceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteGatewayInstance(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::DescribeRegionsOutcome Dms_dgClient::describeRegions(const DescribeRegionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeRegionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result())); + else + return DescribeRegionsOutcome(outcome.error()); +} + +void Dms_dgClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeRegions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::DescribeRegionsOutcomeCallable Dms_dgClient::describeRegionsCallable(const DescribeRegionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeRegions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::DownloadGatewayProgramOutcome Dms_dgClient::downloadGatewayProgram(const DownloadGatewayProgramRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DownloadGatewayProgramOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DownloadGatewayProgramOutcome(DownloadGatewayProgramResult(outcome.result())); + else + return DownloadGatewayProgramOutcome(outcome.error()); +} + +void Dms_dgClient::downloadGatewayProgramAsync(const DownloadGatewayProgramRequest& request, const DownloadGatewayProgramAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, downloadGatewayProgram(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::DownloadGatewayProgramOutcomeCallable Dms_dgClient::downloadGatewayProgramCallable(const DownloadGatewayProgramRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->downloadGatewayProgram(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::FindUserGatewayByIdOutcome Dms_dgClient::findUserGatewayById(const FindUserGatewayByIdRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return FindUserGatewayByIdOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return FindUserGatewayByIdOutcome(FindUserGatewayByIdResult(outcome.result())); + else + return FindUserGatewayByIdOutcome(outcome.error()); +} + +void Dms_dgClient::findUserGatewayByIdAsync(const FindUserGatewayByIdRequest& request, const FindUserGatewayByIdAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, findUserGatewayById(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::FindUserGatewayByIdOutcomeCallable Dms_dgClient::findUserGatewayByIdCallable(const FindUserGatewayByIdRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->findUserGatewayById(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::GetUserDatabasesOutcome Dms_dgClient::getUserDatabases(const GetUserDatabasesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserDatabasesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserDatabasesOutcome(GetUserDatabasesResult(outcome.result())); + else + return GetUserDatabasesOutcome(outcome.error()); +} + +void Dms_dgClient::getUserDatabasesAsync(const GetUserDatabasesRequest& request, const GetUserDatabasesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserDatabases(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::GetUserDatabasesOutcomeCallable Dms_dgClient::getUserDatabasesCallable(const GetUserDatabasesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserDatabases(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::GetUserGatewayInstancesOutcome Dms_dgClient::getUserGatewayInstances(const GetUserGatewayInstancesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserGatewayInstancesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserGatewayInstancesOutcome(GetUserGatewayInstancesResult(outcome.result())); + else + return GetUserGatewayInstancesOutcome(outcome.error()); +} + +void Dms_dgClient::getUserGatewayInstancesAsync(const GetUserGatewayInstancesRequest& request, const GetUserGatewayInstancesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserGatewayInstances(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::GetUserGatewayInstancesOutcomeCallable Dms_dgClient::getUserGatewayInstancesCallable(const GetUserGatewayInstancesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserGatewayInstances(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::GetUserGatewaysOutcome Dms_dgClient::getUserGateways(const GetUserGatewaysRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserGatewaysOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserGatewaysOutcome(GetUserGatewaysResult(outcome.result())); + else + return GetUserGatewaysOutcome(outcome.error()); +} + +void Dms_dgClient::getUserGatewaysAsync(const GetUserGatewaysRequest& request, const GetUserGatewaysAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserGateways(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::GetUserGatewaysOutcomeCallable Dms_dgClient::getUserGatewaysCallable(const GetUserGatewaysRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserGateways(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::ListDatabaseAccessPointOutcome Dms_dgClient::listDatabaseAccessPoint(const ListDatabaseAccessPointRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListDatabaseAccessPointOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListDatabaseAccessPointOutcome(ListDatabaseAccessPointResult(outcome.result())); + else + return ListDatabaseAccessPointOutcome(outcome.error()); +} + +void Dms_dgClient::listDatabaseAccessPointAsync(const ListDatabaseAccessPointRequest& request, const ListDatabaseAccessPointAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listDatabaseAccessPoint(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::ListDatabaseAccessPointOutcomeCallable Dms_dgClient::listDatabaseAccessPointCallable(const ListDatabaseAccessPointRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listDatabaseAccessPoint(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::ModifyDatabaseOutcome Dms_dgClient::modifyDatabase(const ModifyDatabaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyDatabaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyDatabaseOutcome(ModifyDatabaseResult(outcome.result())); + else + return ModifyDatabaseOutcome(outcome.error()); +} + +void Dms_dgClient::modifyDatabaseAsync(const ModifyDatabaseRequest& request, const ModifyDatabaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyDatabase(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::ModifyDatabaseOutcomeCallable Dms_dgClient::modifyDatabaseCallable(const ModifyDatabaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyDatabase(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::ModifyGatewayOutcome Dms_dgClient::modifyGateway(const ModifyGatewayRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyGatewayOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyGatewayOutcome(ModifyGatewayResult(outcome.result())); + else + return ModifyGatewayOutcome(outcome.error()); +} + +void Dms_dgClient::modifyGatewayAsync(const ModifyGatewayRequest& request, const ModifyGatewayAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyGateway(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::ModifyGatewayOutcomeCallable Dms_dgClient::modifyGatewayCallable(const ModifyGatewayRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyGateway(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::RetryDatabaseOutcome Dms_dgClient::retryDatabase(const RetryDatabaseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RetryDatabaseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RetryDatabaseOutcome(RetryDatabaseResult(outcome.result())); + else + return RetryDatabaseOutcome(outcome.error()); +} + +void Dms_dgClient::retryDatabaseAsync(const RetryDatabaseRequest& request, const RetryDatabaseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, retryDatabase(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::RetryDatabaseOutcomeCallable Dms_dgClient::retryDatabaseCallable(const RetryDatabaseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->retryDatabase(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dms_dgClient::StopGatewayOutcome Dms_dgClient::stopGateway(const StopGatewayRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return StopGatewayOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return StopGatewayOutcome(StopGatewayResult(outcome.result())); + else + return StopGatewayOutcome(outcome.error()); +} + +void Dms_dgClient::stopGatewayAsync(const StopGatewayRequest& request, const StopGatewayAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, stopGateway(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dms_dgClient::StopGatewayOutcomeCallable Dms_dgClient::stopGatewayCallable(const StopGatewayRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->stopGateway(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/dms-dg/src/model/AddDatabaseListRequest.cc b/dms-dg/src/model/AddDatabaseListRequest.cc new file mode 100644 index 000000000..e897193fa --- /dev/null +++ b/dms-dg/src/model/AddDatabaseListRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::AddDatabaseListRequest; + +AddDatabaseListRequest::AddDatabaseListRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "AddDatabaseList") { + setMethod(HttpRequest::Method::Post); +} + +AddDatabaseListRequest::~AddDatabaseListRequest() {} + +std::string AddDatabaseListRequest::getDatabaseString() const { + return databaseString_; +} + +void AddDatabaseListRequest::setDatabaseString(const std::string &databaseString) { + databaseString_ = databaseString; + setBodyParameter(std::string("DatabaseString"), databaseString); +} + +std::string AddDatabaseListRequest::getClientToken() const { + return clientToken_; +} + +void AddDatabaseListRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setBodyParameter(std::string("ClientToken"), clientToken); +} + diff --git a/dms-dg/src/model/AddDatabaseListResult.cc b/dms-dg/src/model/AddDatabaseListResult.cc new file mode 100644 index 000000000..55cd4a46c --- /dev/null +++ b/dms-dg/src/model/AddDatabaseListResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +AddDatabaseListResult::AddDatabaseListResult() : + ServiceResult() +{} + +AddDatabaseListResult::AddDatabaseListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AddDatabaseListResult::~AddDatabaseListResult() +{} + +void AddDatabaseListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string AddDatabaseListResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string AddDatabaseListResult::getData()const +{ + return data_; +} + +std::string AddDatabaseListResult::getCode()const +{ + return code_; +} + +bool AddDatabaseListResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/AddDatabaseRequest.cc b/dms-dg/src/model/AddDatabaseRequest.cc new file mode 100644 index 000000000..8cc995aa1 --- /dev/null +++ b/dms-dg/src/model/AddDatabaseRequest.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::Dms_dg::Model::AddDatabaseRequest; + +AddDatabaseRequest::AddDatabaseRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "AddDatabase") { + setMethod(HttpRequest::Method::Post); +} + +AddDatabaseRequest::~AddDatabaseRequest() {} + +std::string AddDatabaseRequest::getClientToken() const { + return clientToken_; +} + +void AddDatabaseRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setBodyParameter(std::string("ClientToken"), clientToken); +} + +std::string AddDatabaseRequest::getRegionId() const { + return regionId_; +} + +void AddDatabaseRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string AddDatabaseRequest::getHost() const { + return host_; +} + +void AddDatabaseRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string AddDatabaseRequest::getDbUserName() const { + return dbUserName_; +} + +void AddDatabaseRequest::setDbUserName(const std::string &dbUserName) { + dbUserName_ = dbUserName; + setBodyParameter(std::string("DbUserName"), dbUserName); +} + +std::string AddDatabaseRequest::getDbDescription() const { + return dbDescription_; +} + +void AddDatabaseRequest::setDbDescription(const std::string &dbDescription) { + dbDescription_ = dbDescription; + setBodyParameter(std::string("DbDescription"), dbDescription); +} + +std::string AddDatabaseRequest::getGatewayId() const { + return gatewayId_; +} + +void AddDatabaseRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + +std::string AddDatabaseRequest::getDbName() const { + return dbName_; +} + +void AddDatabaseRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); +} + +int AddDatabaseRequest::getPort() const { + return port_; +} + +void AddDatabaseRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string AddDatabaseRequest::getDbPassword() const { + return dbPassword_; +} + +void AddDatabaseRequest::setDbPassword(const std::string &dbPassword) { + dbPassword_ = dbPassword; + setBodyParameter(std::string("DbPassword"), dbPassword); +} + +std::string AddDatabaseRequest::getDbType() const { + return dbType_; +} + +void AddDatabaseRequest::setDbType(const std::string &dbType) { + dbType_ = dbType; + setBodyParameter(std::string("DbType"), dbType); +} + diff --git a/dms-dg/src/model/AddDatabaseResult.cc b/dms-dg/src/model/AddDatabaseResult.cc new file mode 100644 index 000000000..73f019896 --- /dev/null +++ b/dms-dg/src/model/AddDatabaseResult.cc @@ -0,0 +1,107 @@ +/* + * 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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +AddDatabaseResult::AddDatabaseResult() : + ServiceResult() +{} + +AddDatabaseResult::AddDatabaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AddDatabaseResult::~AddDatabaseResult() +{} + +void AddDatabaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dbInstanceNode = value["DbInstance"]; + if(!dbInstanceNode["Port"].isNull()) + dbInstance_.port = std::stoi(dbInstanceNode["Port"].asString()); + if(!dbInstanceNode["Host"].isNull()) + dbInstance_.host = dbInstanceNode["Host"].asString(); + if(!dbInstanceNode["GatewayId"].isNull()) + dbInstance_.gatewayId = dbInstanceNode["GatewayId"].asString(); + if(!dbInstanceNode["DbType"].isNull()) + dbInstance_.dbType = dbInstanceNode["DbType"].asString(); + if(!dbInstanceNode["RegionId"].isNull()) + dbInstance_.regionId = dbInstanceNode["RegionId"].asString(); + if(!dbInstanceNode["ConnectHost"].isNull()) + dbInstance_.connectHost = dbInstanceNode["ConnectHost"].asString(); + if(!dbInstanceNode["ConnectPort"].isNull()) + dbInstance_.connectPort = std::stoi(dbInstanceNode["ConnectPort"].asString()); + if(!dbInstanceNode["ServiceType"].isNull()) + dbInstance_.serviceType = dbInstanceNode["ServiceType"].asString(); + if(!dbInstanceNode["NetworkType"].isNull()) + dbInstance_.networkType = dbInstanceNode["NetworkType"].asString(); + if(!dbInstanceNode["NodeId"].isNull()) + dbInstance_.nodeId = dbInstanceNode["NodeId"].asString(); + if(!dbInstanceNode["InstanceStatus"].isNull()) + dbInstance_.instanceStatus = dbInstanceNode["InstanceStatus"].asString(); + if(!dbInstanceNode["DbDescription"].isNull()) + dbInstance_.dbDescription = dbInstanceNode["DbDescription"].asString(); + if(!dbInstanceNode["InstanceId"].isNull()) + dbInstance_.instanceId = dbInstanceNode["InstanceId"].asString(); + if(!dbInstanceNode["GatewayName"].isNull()) + dbInstance_.gatewayName = dbInstanceNode["GatewayName"].asString(); + if(!dbInstanceNode["UserId"].isNull()) + dbInstance_.userId = dbInstanceNode["UserId"].asString(); + if(!dbInstanceNode["ParentId"].isNull()) + dbInstance_.parentId = dbInstanceNode["ParentId"].asString(); + if(!dbInstanceNode["VpcId"].isNull()) + dbInstance_.vpcId = dbInstanceNode["VpcId"].asString(); + if(!dbInstanceNode["VpcInstanceId"].isNull()) + dbInstance_.vpcInstanceId = dbInstanceNode["VpcInstanceId"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +AddDatabaseResult::DbInstance AddDatabaseResult::getDbInstance()const +{ + return dbInstance_; +} + +std::string AddDatabaseResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string AddDatabaseResult::getCode()const +{ + return code_; +} + +bool AddDatabaseResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/CheckDGEnabledRequest.cc b/dms-dg/src/model/CheckDGEnabledRequest.cc new file mode 100644 index 000000000..a6efcd87d --- /dev/null +++ b/dms-dg/src/model/CheckDGEnabledRequest.cc @@ -0,0 +1,27 @@ +/* + * 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_dg::Model::CheckDGEnabledRequest; + +CheckDGEnabledRequest::CheckDGEnabledRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "CheckDGEnabled") { + setMethod(HttpRequest::Method::Post); +} + +CheckDGEnabledRequest::~CheckDGEnabledRequest() {} + diff --git a/dms-dg/src/model/CheckDGEnabledResult.cc b/dms-dg/src/model/CheckDGEnabledResult.cc new file mode 100644 index 000000000..033efb67c --- /dev/null +++ b/dms-dg/src/model/CheckDGEnabledResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +CheckDGEnabledResult::CheckDGEnabledResult() : + ServiceResult() +{} + +CheckDGEnabledResult::CheckDGEnabledResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CheckDGEnabledResult::~CheckDGEnabledResult() +{} + +void CheckDGEnabledResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string CheckDGEnabledResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string CheckDGEnabledResult::getData()const +{ + return data_; +} + +std::string CheckDGEnabledResult::getCode()const +{ + return code_; +} + +bool CheckDGEnabledResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/ConnectDatabaseRequest.cc b/dms-dg/src/model/ConnectDatabaseRequest.cc new file mode 100644 index 000000000..866abcae6 --- /dev/null +++ b/dms-dg/src/model/ConnectDatabaseRequest.cc @@ -0,0 +1,90 @@ +/* + * 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_dg::Model::ConnectDatabaseRequest; + +ConnectDatabaseRequest::ConnectDatabaseRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "ConnectDatabase") { + setMethod(HttpRequest::Method::Post); +} + +ConnectDatabaseRequest::~ConnectDatabaseRequest() {} + +std::string ConnectDatabaseRequest::getDbName() const { + return dbName_; +} + +void ConnectDatabaseRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); +} + +int ConnectDatabaseRequest::getPort() const { + return port_; +} + +void ConnectDatabaseRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string ConnectDatabaseRequest::getDbPassword() const { + return dbPassword_; +} + +void ConnectDatabaseRequest::setDbPassword(const std::string &dbPassword) { + dbPassword_ = dbPassword; + setBodyParameter(std::string("DbPassword"), dbPassword); +} + +std::string ConnectDatabaseRequest::getHost() const { + return host_; +} + +void ConnectDatabaseRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string ConnectDatabaseRequest::getDbType() const { + return dbType_; +} + +void ConnectDatabaseRequest::setDbType(const std::string &dbType) { + dbType_ = dbType; + setBodyParameter(std::string("DbType"), dbType); +} + +std::string ConnectDatabaseRequest::getDbUserName() const { + return dbUserName_; +} + +void ConnectDatabaseRequest::setDbUserName(const std::string &dbUserName) { + dbUserName_ = dbUserName; + setBodyParameter(std::string("DbUserName"), dbUserName); +} + +std::string ConnectDatabaseRequest::getGatewayId() const { + return gatewayId_; +} + +void ConnectDatabaseRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/ConnectDatabaseResult.cc b/dms-dg/src/model/ConnectDatabaseResult.cc new file mode 100644 index 000000000..bd5ce377d --- /dev/null +++ b/dms-dg/src/model/ConnectDatabaseResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +ConnectDatabaseResult::ConnectDatabaseResult() : + ServiceResult() +{} + +ConnectDatabaseResult::ConnectDatabaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ConnectDatabaseResult::~ConnectDatabaseResult() +{} + +void ConnectDatabaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ConnectDatabaseResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string ConnectDatabaseResult::getData()const +{ + return data_; +} + +std::string ConnectDatabaseResult::getCode()const +{ + return code_; +} + +bool ConnectDatabaseResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/CreateGatewayRequest.cc b/dms-dg/src/model/CreateGatewayRequest.cc new file mode 100644 index 000000000..a4cfe23d2 --- /dev/null +++ b/dms-dg/src/model/CreateGatewayRequest.cc @@ -0,0 +1,54 @@ +/* + * 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_dg::Model::CreateGatewayRequest; + +CreateGatewayRequest::CreateGatewayRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "CreateGateway") { + setMethod(HttpRequest::Method::Post); +} + +CreateGatewayRequest::~CreateGatewayRequest() {} + +std::string CreateGatewayRequest::getGatewayDesc() const { + return gatewayDesc_; +} + +void CreateGatewayRequest::setGatewayDesc(const std::string &gatewayDesc) { + gatewayDesc_ = gatewayDesc; + setBodyParameter(std::string("GatewayDesc"), gatewayDesc); +} + +std::string CreateGatewayRequest::getRegionId() const { + return regionId_; +} + +void CreateGatewayRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string CreateGatewayRequest::getGatewayName() const { + return gatewayName_; +} + +void CreateGatewayRequest::setGatewayName(const std::string &gatewayName) { + gatewayName_ = gatewayName; + setBodyParameter(std::string("GatewayName"), gatewayName); +} + diff --git a/dms-dg/src/model/CreateGatewayResult.cc b/dms-dg/src/model/CreateGatewayResult.cc new file mode 100644 index 000000000..80063dbc6 --- /dev/null +++ b/dms-dg/src/model/CreateGatewayResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +CreateGatewayResult::CreateGatewayResult() : + ServiceResult() +{} + +CreateGatewayResult::CreateGatewayResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateGatewayResult::~CreateGatewayResult() +{} + +void CreateGatewayResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string CreateGatewayResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string CreateGatewayResult::getData()const +{ + return data_; +} + +std::string CreateGatewayResult::getCode()const +{ + return code_; +} + +bool CreateGatewayResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/CreateGatewayVerifyCodeRequest.cc b/dms-dg/src/model/CreateGatewayVerifyCodeRequest.cc new file mode 100644 index 000000000..04a75ce24 --- /dev/null +++ b/dms-dg/src/model/CreateGatewayVerifyCodeRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::CreateGatewayVerifyCodeRequest; + +CreateGatewayVerifyCodeRequest::CreateGatewayVerifyCodeRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "CreateGatewayVerifyCode") { + setMethod(HttpRequest::Method::Post); +} + +CreateGatewayVerifyCodeRequest::~CreateGatewayVerifyCodeRequest() {} + +std::string CreateGatewayVerifyCodeRequest::getGatewayId() const { + return gatewayId_; +} + +void CreateGatewayVerifyCodeRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/CreateGatewayVerifyCodeResult.cc b/dms-dg/src/model/CreateGatewayVerifyCodeResult.cc new file mode 100644 index 000000000..c03099c08 --- /dev/null +++ b/dms-dg/src/model/CreateGatewayVerifyCodeResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +CreateGatewayVerifyCodeResult::CreateGatewayVerifyCodeResult() : + ServiceResult() +{} + +CreateGatewayVerifyCodeResult::CreateGatewayVerifyCodeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateGatewayVerifyCodeResult::~CreateGatewayVerifyCodeResult() +{} + +void CreateGatewayVerifyCodeResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string CreateGatewayVerifyCodeResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string CreateGatewayVerifyCodeResult::getData()const +{ + return data_; +} + +std::string CreateGatewayVerifyCodeResult::getCode()const +{ + return code_; +} + +bool CreateGatewayVerifyCodeResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/DeleteDatabaseRequest.cc b/dms-dg/src/model/DeleteDatabaseRequest.cc new file mode 100644 index 000000000..f5b192056 --- /dev/null +++ b/dms-dg/src/model/DeleteDatabaseRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::DeleteDatabaseRequest; + +DeleteDatabaseRequest::DeleteDatabaseRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "DeleteDatabase") { + setMethod(HttpRequest::Method::Post); +} + +DeleteDatabaseRequest::~DeleteDatabaseRequest() {} + +std::string DeleteDatabaseRequest::getInstanceId() const { + return instanceId_; +} + +void DeleteDatabaseRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), instanceId); +} + diff --git a/dms-dg/src/model/DeleteDatabaseResult.cc b/dms-dg/src/model/DeleteDatabaseResult.cc new file mode 100644 index 000000000..fbe804815 --- /dev/null +++ b/dms-dg/src/model/DeleteDatabaseResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +DeleteDatabaseResult::DeleteDatabaseResult() : + ServiceResult() +{} + +DeleteDatabaseResult::DeleteDatabaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteDatabaseResult::~DeleteDatabaseResult() +{} + +void DeleteDatabaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DeleteDatabaseResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string DeleteDatabaseResult::getData()const +{ + return data_; +} + +std::string DeleteDatabaseResult::getCode()const +{ + return code_; +} + +bool DeleteDatabaseResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/DeleteGatewayInstanceRequest.cc b/dms-dg/src/model/DeleteGatewayInstanceRequest.cc new file mode 100644 index 000000000..6512d5899 --- /dev/null +++ b/dms-dg/src/model/DeleteGatewayInstanceRequest.cc @@ -0,0 +1,54 @@ +/* + * 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_dg::Model::DeleteGatewayInstanceRequest; + +DeleteGatewayInstanceRequest::DeleteGatewayInstanceRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "DeleteGatewayInstance") { + setMethod(HttpRequest::Method::Post); +} + +DeleteGatewayInstanceRequest::~DeleteGatewayInstanceRequest() {} + +std::string DeleteGatewayInstanceRequest::getGatewayInstanceId() const { + return gatewayInstanceId_; +} + +void DeleteGatewayInstanceRequest::setGatewayInstanceId(const std::string &gatewayInstanceId) { + gatewayInstanceId_ = gatewayInstanceId; + setBodyParameter(std::string("GatewayInstanceId"), gatewayInstanceId); +} + +std::string DeleteGatewayInstanceRequest::getRegionId() const { + return regionId_; +} + +void DeleteGatewayInstanceRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string DeleteGatewayInstanceRequest::getGatewayId() const { + return gatewayId_; +} + +void DeleteGatewayInstanceRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/DeleteGatewayInstanceResult.cc b/dms-dg/src/model/DeleteGatewayInstanceResult.cc new file mode 100644 index 000000000..1e0f96a35 --- /dev/null +++ b/dms-dg/src/model/DeleteGatewayInstanceResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +DeleteGatewayInstanceResult::DeleteGatewayInstanceResult() : + ServiceResult() +{} + +DeleteGatewayInstanceResult::DeleteGatewayInstanceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteGatewayInstanceResult::~DeleteGatewayInstanceResult() +{} + +void DeleteGatewayInstanceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DeleteGatewayInstanceResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string DeleteGatewayInstanceResult::getData()const +{ + return data_; +} + +std::string DeleteGatewayInstanceResult::getCode()const +{ + return code_; +} + +bool DeleteGatewayInstanceResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/DeleteGatewayRequest.cc b/dms-dg/src/model/DeleteGatewayRequest.cc new file mode 100644 index 000000000..951d0373d --- /dev/null +++ b/dms-dg/src/model/DeleteGatewayRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::DeleteGatewayRequest; + +DeleteGatewayRequest::DeleteGatewayRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "DeleteGateway") { + setMethod(HttpRequest::Method::Post); +} + +DeleteGatewayRequest::~DeleteGatewayRequest() {} + +std::string DeleteGatewayRequest::getGatewayId() const { + return gatewayId_; +} + +void DeleteGatewayRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/DeleteGatewayResult.cc b/dms-dg/src/model/DeleteGatewayResult.cc new file mode 100644 index 000000000..3299d3e8c --- /dev/null +++ b/dms-dg/src/model/DeleteGatewayResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +DeleteGatewayResult::DeleteGatewayResult() : + ServiceResult() +{} + +DeleteGatewayResult::DeleteGatewayResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteGatewayResult::~DeleteGatewayResult() +{} + +void DeleteGatewayResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DeleteGatewayResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string DeleteGatewayResult::getData()const +{ + return data_; +} + +std::string DeleteGatewayResult::getCode()const +{ + return code_; +} + +bool DeleteGatewayResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/DescribeRegionsRequest.cc b/dms-dg/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..6ca934f24 --- /dev/null +++ b/dms-dg/src/model/DescribeRegionsRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "DescribeRegions") { + setMethod(HttpRequest::Method::Post); +} + +DescribeRegionsRequest::~DescribeRegionsRequest() {} + +std::string DescribeRegionsRequest::getRegionId() const { + return regionId_; +} + +void DescribeRegionsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + diff --git a/dms-dg/src/model/DescribeRegionsResult.cc b/dms-dg/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..ae49d8903 --- /dev/null +++ b/dms-dg/src/model/DescribeRegionsResult.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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +DescribeRegionsResult::DescribeRegionsResult() : + ServiceResult() +{} + +DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRegionsResult::~DescribeRegionsResult() +{} + +void DescribeRegionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allRegionsNode = value["Regions"]["Region"]; + for (auto valueRegionsRegion : allRegionsNode) + { + Region regionsObject; + if(!valueRegionsRegion["RegionEndpoint"].isNull()) + regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString(); + if(!valueRegionsRegion["LocalName"].isNull()) + regionsObject.localName = valueRegionsRegion["LocalName"].asString(); + if(!valueRegionsRegion["RegionId"].isNull()) + regionsObject.regionId = valueRegionsRegion["RegionId"].asString(); + regions_.push_back(regionsObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DescribeRegionsResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + +std::string DescribeRegionsResult::getCode()const +{ + return code_; +} + +bool DescribeRegionsResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/DownloadGatewayProgramRequest.cc b/dms-dg/src/model/DownloadGatewayProgramRequest.cc new file mode 100644 index 000000000..41af2c63b --- /dev/null +++ b/dms-dg/src/model/DownloadGatewayProgramRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::DownloadGatewayProgramRequest; + +DownloadGatewayProgramRequest::DownloadGatewayProgramRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "DownloadGatewayProgram") { + setMethod(HttpRequest::Method::Post); +} + +DownloadGatewayProgramRequest::~DownloadGatewayProgramRequest() {} + +std::string DownloadGatewayProgramRequest::getUserOS() const { + return userOS_; +} + +void DownloadGatewayProgramRequest::setUserOS(const std::string &userOS) { + userOS_ = userOS; + setBodyParameter(std::string("UserOS"), userOS); +} + +std::string DownloadGatewayProgramRequest::getDgVersion() const { + return dgVersion_; +} + +void DownloadGatewayProgramRequest::setDgVersion(const std::string &dgVersion) { + dgVersion_ = dgVersion; + setBodyParameter(std::string("DgVersion"), dgVersion); +} + diff --git a/dms-dg/src/model/DownloadGatewayProgramResult.cc b/dms-dg/src/model/DownloadGatewayProgramResult.cc new file mode 100644 index 000000000..d87346d45 --- /dev/null +++ b/dms-dg/src/model/DownloadGatewayProgramResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +DownloadGatewayProgramResult::DownloadGatewayProgramResult() : + ServiceResult() +{} + +DownloadGatewayProgramResult::DownloadGatewayProgramResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DownloadGatewayProgramResult::~DownloadGatewayProgramResult() +{} + +void DownloadGatewayProgramResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DownloadGatewayProgramResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string DownloadGatewayProgramResult::getData()const +{ + return data_; +} + +std::string DownloadGatewayProgramResult::getCode()const +{ + return code_; +} + +bool DownloadGatewayProgramResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/FindUserGatewayByIdRequest.cc b/dms-dg/src/model/FindUserGatewayByIdRequest.cc new file mode 100644 index 000000000..3d6c15961 --- /dev/null +++ b/dms-dg/src/model/FindUserGatewayByIdRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::FindUserGatewayByIdRequest; + +FindUserGatewayByIdRequest::FindUserGatewayByIdRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "FindUserGatewayById") { + setMethod(HttpRequest::Method::Post); +} + +FindUserGatewayByIdRequest::~FindUserGatewayByIdRequest() {} + +std::string FindUserGatewayByIdRequest::getGatewayId() const { + return gatewayId_; +} + +void FindUserGatewayByIdRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/FindUserGatewayByIdResult.cc b/dms-dg/src/model/FindUserGatewayByIdResult.cc new file mode 100644 index 000000000..70ad2a852 --- /dev/null +++ b/dms-dg/src/model/FindUserGatewayByIdResult.cc @@ -0,0 +1,93 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +FindUserGatewayByIdResult::FindUserGatewayByIdResult() : + ServiceResult() +{} + +FindUserGatewayByIdResult::FindUserGatewayByIdResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +FindUserGatewayByIdResult::~FindUserGatewayByIdResult() +{} + +void FindUserGatewayByIdResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto gatewayNode = value["Gateway"]; + if(!gatewayNode["GatewayDesc"].isNull()) + gateway_.gatewayDesc = gatewayNode["GatewayDesc"].asString(); + if(!gatewayNode["GatewayName"].isNull()) + gateway_.gatewayName = gatewayNode["GatewayName"].asString(); + if(!gatewayNode["RegionId"].isNull()) + gateway_.regionId = gatewayNode["RegionId"].asString(); + if(!gatewayNode["GatewayId"].isNull()) + gateway_.gatewayId = gatewayNode["GatewayId"].asString(); + if(!gatewayNode["Status"].isNull()) + gateway_.status = gatewayNode["Status"].asString(); + if(!gatewayNode["UserId"].isNull()) + gateway_.userId = gatewayNode["UserId"].asString(); + if(!gatewayNode["CreatorId"].isNull()) + gateway_.creatorId = gatewayNode["CreatorId"].asString(); + if(!gatewayNode["DgVersion"].isNull()) + gateway_.dgVersion = gatewayNode["DgVersion"].asString(); + if(!gatewayNode["ExceptionMsg"].isNull()) + gateway_.exceptionMsg = gatewayNode["ExceptionMsg"].asString(); + if(!gatewayNode["NumOfExceptionInstance"].isNull()) + gateway_.numOfExceptionInstance = std::stoi(gatewayNode["NumOfExceptionInstance"].asString()); + if(!gatewayNode["NumOfRunningInstance"].isNull()) + gateway_.numOfRunningInstance = std::stoi(gatewayNode["NumOfRunningInstance"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +FindUserGatewayByIdResult::Gateway FindUserGatewayByIdResult::getGateway()const +{ + return gateway_; +} + +std::string FindUserGatewayByIdResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string FindUserGatewayByIdResult::getCode()const +{ + return code_; +} + +bool FindUserGatewayByIdResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/GetUserDatabasesRequest.cc b/dms-dg/src/model/GetUserDatabasesRequest.cc new file mode 100644 index 000000000..1d7899f98 --- /dev/null +++ b/dms-dg/src/model/GetUserDatabasesRequest.cc @@ -0,0 +1,108 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::GetUserDatabasesRequest; + +GetUserDatabasesRequest::GetUserDatabasesRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "GetUserDatabases") { + setMethod(HttpRequest::Method::Post); +} + +GetUserDatabasesRequest::~GetUserDatabasesRequest() {} + +std::string GetUserDatabasesRequest::getSearchKey() const { + return searchKey_; +} + +void GetUserDatabasesRequest::setSearchKey(const std::string &searchKey) { + searchKey_ = searchKey; + setBodyParameter(std::string("SearchKey"), searchKey); +} + +std::string GetUserDatabasesRequest::getPageNumber() const { + return pageNumber_; +} + +void GetUserDatabasesRequest::setPageNumber(const std::string &pageNumber) { + pageNumber_ = pageNumber; + setBodyParameter(std::string("PageNumber"), pageNumber); +} + +std::string GetUserDatabasesRequest::getRegionId() const { + return regionId_; +} + +void GetUserDatabasesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string GetUserDatabasesRequest::getPageSize() const { + return pageSize_; +} + +void GetUserDatabasesRequest::setPageSize(const std::string &pageSize) { + pageSize_ = pageSize; + setBodyParameter(std::string("PageSize"), pageSize); +} + +std::string GetUserDatabasesRequest::getHost() const { + return host_; +} + +void GetUserDatabasesRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string GetUserDatabasesRequest::getGatewayId() const { + return gatewayId_; +} + +void GetUserDatabasesRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + +std::string GetUserDatabasesRequest::getInstanceId() const { + return instanceId_; +} + +void GetUserDatabasesRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), instanceId); +} + +int GetUserDatabasesRequest::getPort() const { + return port_; +} + +void GetUserDatabasesRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string GetUserDatabasesRequest::getDbType() const { + return dbType_; +} + +void GetUserDatabasesRequest::setDbType(const std::string &dbType) { + dbType_ = dbType; + setBodyParameter(std::string("DbType"), dbType); +} + diff --git a/dms-dg/src/model/GetUserDatabasesResult.cc b/dms-dg/src/model/GetUserDatabasesResult.cc new file mode 100644 index 000000000..48dc63fa2 --- /dev/null +++ b/dms-dg/src/model/GetUserDatabasesResult.cc @@ -0,0 +1,121 @@ +/* + * 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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +GetUserDatabasesResult::GetUserDatabasesResult() : + ServiceResult() +{} + +GetUserDatabasesResult::GetUserDatabasesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserDatabasesResult::~GetUserDatabasesResult() +{} + +void GetUserDatabasesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDbInstanceListNode = value["DbInstanceList"]["DbInstance"]; + for (auto valueDbInstanceListDbInstance : allDbInstanceListNode) + { + DbInstance dbInstanceListObject; + if(!valueDbInstanceListDbInstance["Port"].isNull()) + dbInstanceListObject.port = std::stoi(valueDbInstanceListDbInstance["Port"].asString()); + if(!valueDbInstanceListDbInstance["Host"].isNull()) + dbInstanceListObject.host = valueDbInstanceListDbInstance["Host"].asString(); + if(!valueDbInstanceListDbInstance["GatewayId"].isNull()) + dbInstanceListObject.gatewayId = valueDbInstanceListDbInstance["GatewayId"].asString(); + if(!valueDbInstanceListDbInstance["DbType"].isNull()) + dbInstanceListObject.dbType = valueDbInstanceListDbInstance["DbType"].asString(); + if(!valueDbInstanceListDbInstance["RegionId"].isNull()) + dbInstanceListObject.regionId = valueDbInstanceListDbInstance["RegionId"].asString(); + if(!valueDbInstanceListDbInstance["ConnectHost"].isNull()) + dbInstanceListObject.connectHost = valueDbInstanceListDbInstance["ConnectHost"].asString(); + if(!valueDbInstanceListDbInstance["ConnectPort"].isNull()) + dbInstanceListObject.connectPort = std::stoi(valueDbInstanceListDbInstance["ConnectPort"].asString()); + if(!valueDbInstanceListDbInstance["ServiceType"].isNull()) + dbInstanceListObject.serviceType = valueDbInstanceListDbInstance["ServiceType"].asString(); + if(!valueDbInstanceListDbInstance["NetworkType"].isNull()) + dbInstanceListObject.networkType = valueDbInstanceListDbInstance["NetworkType"].asString(); + if(!valueDbInstanceListDbInstance["NodeId"].isNull()) + dbInstanceListObject.nodeId = valueDbInstanceListDbInstance["NodeId"].asString(); + if(!valueDbInstanceListDbInstance["InstanceStatus"].isNull()) + dbInstanceListObject.instanceStatus = valueDbInstanceListDbInstance["InstanceStatus"].asString(); + if(!valueDbInstanceListDbInstance["DbDescription"].isNull()) + dbInstanceListObject.dbDescription = valueDbInstanceListDbInstance["DbDescription"].asString(); + if(!valueDbInstanceListDbInstance["InstanceId"].isNull()) + dbInstanceListObject.instanceId = valueDbInstanceListDbInstance["InstanceId"].asString(); + if(!valueDbInstanceListDbInstance["GatewayName"].isNull()) + dbInstanceListObject.gatewayName = valueDbInstanceListDbInstance["GatewayName"].asString(); + if(!valueDbInstanceListDbInstance["GmtCreate"].isNull()) + dbInstanceListObject.gmtCreate = std::stol(valueDbInstanceListDbInstance["GmtCreate"].asString()); + if(!valueDbInstanceListDbInstance["UserId"].isNull()) + dbInstanceListObject.userId = valueDbInstanceListDbInstance["UserId"].asString(); + if(!valueDbInstanceListDbInstance["ParentId"].isNull()) + dbInstanceListObject.parentId = valueDbInstanceListDbInstance["ParentId"].asString(); + if(!valueDbInstanceListDbInstance["VpcId"].isNull()) + dbInstanceListObject.vpcId = valueDbInstanceListDbInstance["VpcId"].asString(); + if(!valueDbInstanceListDbInstance["VpcInstanceId"].isNull()) + dbInstanceListObject.vpcInstanceId = valueDbInstanceListDbInstance["VpcInstanceId"].asString(); + dbInstanceList_.push_back(dbInstanceListObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Count"].isNull()) + count_ = std::stoi(value["Count"].asString()); + +} + +std::vector GetUserDatabasesResult::getDbInstanceList()const +{ + return dbInstanceList_; +} + +std::string GetUserDatabasesResult::getErrorMsg()const +{ + return errorMsg_; +} + +int GetUserDatabasesResult::getCount()const +{ + return count_; +} + +std::string GetUserDatabasesResult::getCode()const +{ + return code_; +} + +std::string GetUserDatabasesResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/GetUserGatewayInstancesRequest.cc b/dms-dg/src/model/GetUserGatewayInstancesRequest.cc new file mode 100644 index 000000000..461a9bfc2 --- /dev/null +++ b/dms-dg/src/model/GetUserGatewayInstancesRequest.cc @@ -0,0 +1,36 @@ +/* + * 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_dg::Model::GetUserGatewayInstancesRequest; + +GetUserGatewayInstancesRequest::GetUserGatewayInstancesRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "GetUserGatewayInstances") { + setMethod(HttpRequest::Method::Post); +} + +GetUserGatewayInstancesRequest::~GetUserGatewayInstancesRequest() {} + +std::string GetUserGatewayInstancesRequest::getGatewayId() const { + return gatewayId_; +} + +void GetUserGatewayInstancesRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/GetUserGatewayInstancesResult.cc b/dms-dg/src/model/GetUserGatewayInstancesResult.cc new file mode 100644 index 000000000..ab353ed93 --- /dev/null +++ b/dms-dg/src/model/GetUserGatewayInstancesResult.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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +GetUserGatewayInstancesResult::GetUserGatewayInstancesResult() : + ServiceResult() +{} + +GetUserGatewayInstancesResult::GetUserGatewayInstancesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserGatewayInstancesResult::~GetUserGatewayInstancesResult() +{} + +void GetUserGatewayInstancesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allGatewayInstanceListNode = value["GatewayInstanceList"]["GatewayInstance"]; + for (auto valueGatewayInstanceListGatewayInstance : allGatewayInstanceListNode) + { + GatewayInstance gatewayInstanceListObject; + if(!valueGatewayInstanceListGatewayInstance["GatewayInstanceId"].isNull()) + gatewayInstanceListObject.gatewayInstanceId = valueGatewayInstanceListGatewayInstance["GatewayInstanceId"].asString(); + if(!valueGatewayInstanceListGatewayInstance["GatewayId"].isNull()) + gatewayInstanceListObject.gatewayId = valueGatewayInstanceListGatewayInstance["GatewayId"].asString(); + if(!valueGatewayInstanceListGatewayInstance["LastUpdateTime"].isNull()) + gatewayInstanceListObject.lastUpdateTime = std::stol(valueGatewayInstanceListGatewayInstance["LastUpdateTime"].asString()); + if(!valueGatewayInstanceListGatewayInstance["LocalIP"].isNull()) + gatewayInstanceListObject.localIP = valueGatewayInstanceListGatewayInstance["LocalIP"].asString(); + if(!valueGatewayInstanceListGatewayInstance["OutputIP"].isNull()) + gatewayInstanceListObject.outputIP = valueGatewayInstanceListGatewayInstance["OutputIP"].asString(); + if(!valueGatewayInstanceListGatewayInstance["Message"].isNull()) + gatewayInstanceListObject.message = valueGatewayInstanceListGatewayInstance["Message"].asString(); + if(!valueGatewayInstanceListGatewayInstance["EndPoint"].isNull()) + gatewayInstanceListObject.endPoint = valueGatewayInstanceListGatewayInstance["EndPoint"].asString(); + if(!valueGatewayInstanceListGatewayInstance["CurrentDaemonVersion"].isNull()) + gatewayInstanceListObject.currentDaemonVersion = valueGatewayInstanceListGatewayInstance["CurrentDaemonVersion"].asString(); + if(!valueGatewayInstanceListGatewayInstance["CurrentVersion"].isNull()) + gatewayInstanceListObject.currentVersion = valueGatewayInstanceListGatewayInstance["CurrentVersion"].asString(); + if(!valueGatewayInstanceListGatewayInstance["RegionId"].isNull()) + gatewayInstanceListObject.regionId = valueGatewayInstanceListGatewayInstance["RegionId"].asString(); + if(!valueGatewayInstanceListGatewayInstance["ConnectEndpointType"].isNull()) + gatewayInstanceListObject.connectEndpointType = valueGatewayInstanceListGatewayInstance["ConnectEndpointType"].asString(); + if(!valueGatewayInstanceListGatewayInstance["GatewayInstanceStatus"].isNull()) + gatewayInstanceListObject.gatewayInstanceStatus = valueGatewayInstanceListGatewayInstance["GatewayInstanceStatus"].asString(); + gatewayInstanceList_.push_back(gatewayInstanceListObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::vector GetUserGatewayInstancesResult::getGatewayInstanceList()const +{ + return gatewayInstanceList_; +} + +std::string GetUserGatewayInstancesResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string GetUserGatewayInstancesResult::getCode()const +{ + return code_; +} + +bool GetUserGatewayInstancesResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/GetUserGatewaysRequest.cc b/dms-dg/src/model/GetUserGatewaysRequest.cc new file mode 100644 index 000000000..61794d513 --- /dev/null +++ b/dms-dg/src/model/GetUserGatewaysRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::GetUserGatewaysRequest; + +GetUserGatewaysRequest::GetUserGatewaysRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "GetUserGateways") { + setMethod(HttpRequest::Method::Post); +} + +GetUserGatewaysRequest::~GetUserGatewaysRequest() {} + +std::string GetUserGatewaysRequest::getSearchKey() const { + return searchKey_; +} + +void GetUserGatewaysRequest::setSearchKey(const std::string &searchKey) { + searchKey_ = searchKey; + setBodyParameter(std::string("SearchKey"), searchKey); +} + +int GetUserGatewaysRequest::getPageNumber() const { + return pageNumber_; +} + +void GetUserGatewaysRequest::setPageNumber(int pageNumber) { + pageNumber_ = pageNumber; + setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber)); +} + +std::string GetUserGatewaysRequest::getRegionId() const { + return regionId_; +} + +void GetUserGatewaysRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +int GetUserGatewaysRequest::getPageSize() const { + return pageSize_; +} + +void GetUserGatewaysRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setBodyParameter(std::string("PageSize"), std::to_string(pageSize)); +} + diff --git a/dms-dg/src/model/GetUserGatewaysResult.cc b/dms-dg/src/model/GetUserGatewaysResult.cc new file mode 100644 index 000000000..3178cb8fe --- /dev/null +++ b/dms-dg/src/model/GetUserGatewaysResult.cc @@ -0,0 +1,105 @@ +/* + * 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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +GetUserGatewaysResult::GetUserGatewaysResult() : + ServiceResult() +{} + +GetUserGatewaysResult::GetUserGatewaysResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserGatewaysResult::~GetUserGatewaysResult() +{} + +void GetUserGatewaysResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allGatewayListNode = value["GatewayList"]["Gateway"]; + for (auto valueGatewayListGateway : allGatewayListNode) + { + Gateway gatewayListObject; + if(!valueGatewayListGateway["GatewayDesc"].isNull()) + gatewayListObject.gatewayDesc = valueGatewayListGateway["GatewayDesc"].asString(); + if(!valueGatewayListGateway["GatewayName"].isNull()) + gatewayListObject.gatewayName = valueGatewayListGateway["GatewayName"].asString(); + if(!valueGatewayListGateway["RegionId"].isNull()) + gatewayListObject.regionId = valueGatewayListGateway["RegionId"].asString(); + if(!valueGatewayListGateway["GatewayId"].isNull()) + gatewayListObject.gatewayId = valueGatewayListGateway["GatewayId"].asString(); + if(!valueGatewayListGateway["Status"].isNull()) + gatewayListObject.status = valueGatewayListGateway["Status"].asString(); + if(!valueGatewayListGateway["UserId"].isNull()) + gatewayListObject.userId = valueGatewayListGateway["UserId"].asString(); + if(!valueGatewayListGateway["CreatorId"].isNull()) + gatewayListObject.creatorId = valueGatewayListGateway["CreatorId"].asString(); + if(!valueGatewayListGateway["DgVersion"].isNull()) + gatewayListObject.dgVersion = valueGatewayListGateway["DgVersion"].asString(); + if(!valueGatewayListGateway["ExceptionMsg"].isNull()) + gatewayListObject.exceptionMsg = valueGatewayListGateway["ExceptionMsg"].asString(); + if(!valueGatewayListGateway["NumOfExceptionInstance"].isNull()) + gatewayListObject.numOfExceptionInstance = std::stoi(valueGatewayListGateway["NumOfExceptionInstance"].asString()); + if(!valueGatewayListGateway["NumOfRunningInstance"].isNull()) + gatewayListObject.numOfRunningInstance = std::stoi(valueGatewayListGateway["NumOfRunningInstance"].asString()); + gatewayList_.push_back(gatewayListObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Count"].isNull()) + count_ = std::stoi(value["Count"].asString()); + +} + +std::vector GetUserGatewaysResult::getGatewayList()const +{ + return gatewayList_; +} + +std::string GetUserGatewaysResult::getErrorMsg()const +{ + return errorMsg_; +} + +int GetUserGatewaysResult::getCount()const +{ + return count_; +} + +std::string GetUserGatewaysResult::getCode()const +{ + return code_; +} + +bool GetUserGatewaysResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/ListDatabaseAccessPointRequest.cc b/dms-dg/src/model/ListDatabaseAccessPointRequest.cc new file mode 100644 index 000000000..2b2243f69 --- /dev/null +++ b/dms-dg/src/model/ListDatabaseAccessPointRequest.cc @@ -0,0 +1,108 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::ListDatabaseAccessPointRequest; + +ListDatabaseAccessPointRequest::ListDatabaseAccessPointRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "ListDatabaseAccessPoint") { + setMethod(HttpRequest::Method::Post); +} + +ListDatabaseAccessPointRequest::~ListDatabaseAccessPointRequest() {} + +std::string ListDatabaseAccessPointRequest::getSearchKey() const { + return searchKey_; +} + +void ListDatabaseAccessPointRequest::setSearchKey(const std::string &searchKey) { + searchKey_ = searchKey; + setBodyParameter(std::string("SearchKey"), searchKey); +} + +std::string ListDatabaseAccessPointRequest::getPageNumber() const { + return pageNumber_; +} + +void ListDatabaseAccessPointRequest::setPageNumber(const std::string &pageNumber) { + pageNumber_ = pageNumber; + setBodyParameter(std::string("PageNumber"), pageNumber); +} + +std::string ListDatabaseAccessPointRequest::getRegionId() const { + return regionId_; +} + +void ListDatabaseAccessPointRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string ListDatabaseAccessPointRequest::getPageSize() const { + return pageSize_; +} + +void ListDatabaseAccessPointRequest::setPageSize(const std::string &pageSize) { + pageSize_ = pageSize; + setBodyParameter(std::string("PageSize"), pageSize); +} + +std::string ListDatabaseAccessPointRequest::getHost() const { + return host_; +} + +void ListDatabaseAccessPointRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string ListDatabaseAccessPointRequest::getDbInstanceId() const { + return dbInstanceId_; +} + +void ListDatabaseAccessPointRequest::setDbInstanceId(const std::string &dbInstanceId) { + dbInstanceId_ = dbInstanceId; + setBodyParameter(std::string("DbInstanceId"), dbInstanceId); +} + +std::string ListDatabaseAccessPointRequest::getGatewayId() const { + return gatewayId_; +} + +void ListDatabaseAccessPointRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + +int ListDatabaseAccessPointRequest::getPort() const { + return port_; +} + +void ListDatabaseAccessPointRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string ListDatabaseAccessPointRequest::getVpcId() const { + return vpcId_; +} + +void ListDatabaseAccessPointRequest::setVpcId(const std::string &vpcId) { + vpcId_ = vpcId; + setBodyParameter(std::string("VpcId"), vpcId); +} + diff --git a/dms-dg/src/model/ListDatabaseAccessPointResult.cc b/dms-dg/src/model/ListDatabaseAccessPointResult.cc new file mode 100644 index 000000000..cc8f121a0 --- /dev/null +++ b/dms-dg/src/model/ListDatabaseAccessPointResult.cc @@ -0,0 +1,101 @@ +/* + * 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_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +ListDatabaseAccessPointResult::ListDatabaseAccessPointResult() : + ServiceResult() +{} + +ListDatabaseAccessPointResult::ListDatabaseAccessPointResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListDatabaseAccessPointResult::~ListDatabaseAccessPointResult() +{} + +void ListDatabaseAccessPointResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDbInstanceAccessPointListNode = value["DbInstanceAccessPointList"]["DbInstanceAccessPoint"]; + for (auto valueDbInstanceAccessPointListDbInstanceAccessPoint : allDbInstanceAccessPointListNode) + { + DbInstanceAccessPoint dbInstanceAccessPointListObject; + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["AccessAddr"].isNull()) + dbInstanceAccessPointListObject.accessAddr = valueDbInstanceAccessPointListDbInstanceAccessPoint["AccessAddr"].asString(); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["AccessPort"].isNull()) + dbInstanceAccessPointListObject.accessPort = std::stoi(valueDbInstanceAccessPointListDbInstanceAccessPoint["AccessPort"].asString()); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["DbInstanceId"].isNull()) + dbInstanceAccessPointListObject.dbInstanceId = valueDbInstanceAccessPointListDbInstanceAccessPoint["DbInstanceId"].asString(); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["GmtCreate"].isNull()) + dbInstanceAccessPointListObject.gmtCreate = std::stol(valueDbInstanceAccessPointListDbInstanceAccessPoint["GmtCreate"].asString()); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["GmtModified"].isNull()) + dbInstanceAccessPointListObject.gmtModified = std::stol(valueDbInstanceAccessPointListDbInstanceAccessPoint["GmtModified"].asString()); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["RouterId"].isNull()) + dbInstanceAccessPointListObject.routerId = valueDbInstanceAccessPointListDbInstanceAccessPoint["RouterId"].asString(); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["VpcAzoneId"].isNull()) + dbInstanceAccessPointListObject.vpcAzoneId = valueDbInstanceAccessPointListDbInstanceAccessPoint["VpcAzoneId"].asString(); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["VpcId"].isNull()) + dbInstanceAccessPointListObject.vpcId = valueDbInstanceAccessPointListDbInstanceAccessPoint["VpcId"].asString(); + if(!valueDbInstanceAccessPointListDbInstanceAccessPoint["VswitchId"].isNull()) + dbInstanceAccessPointListObject.vswitchId = valueDbInstanceAccessPointListDbInstanceAccessPoint["VswitchId"].asString(); + dbInstanceAccessPointList_.push_back(dbInstanceAccessPointListObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Count"].isNull()) + count_ = std::stoi(value["Count"].asString()); + +} + +std::vector ListDatabaseAccessPointResult::getDbInstanceAccessPointList()const +{ + return dbInstanceAccessPointList_; +} + +std::string ListDatabaseAccessPointResult::getErrorMsg()const +{ + return errorMsg_; +} + +int ListDatabaseAccessPointResult::getCount()const +{ + return count_; +} + +std::string ListDatabaseAccessPointResult::getCode()const +{ + return code_; +} + +std::string ListDatabaseAccessPointResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/ModifyDatabaseRequest.cc b/dms-dg/src/model/ModifyDatabaseRequest.cc new file mode 100644 index 000000000..52b42de1f --- /dev/null +++ b/dms-dg/src/model/ModifyDatabaseRequest.cc @@ -0,0 +1,99 @@ +/* + * 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_dg::Model::ModifyDatabaseRequest; + +ModifyDatabaseRequest::ModifyDatabaseRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "ModifyDatabase") { + setMethod(HttpRequest::Method::Post); +} + +ModifyDatabaseRequest::~ModifyDatabaseRequest() {} + +std::string ModifyDatabaseRequest::getHost() const { + return host_; +} + +void ModifyDatabaseRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string ModifyDatabaseRequest::getDbUserName() const { + return dbUserName_; +} + +void ModifyDatabaseRequest::setDbUserName(const std::string &dbUserName) { + dbUserName_ = dbUserName; + setBodyParameter(std::string("DbUserName"), dbUserName); +} + +std::string ModifyDatabaseRequest::getDbDescription() const { + return dbDescription_; +} + +void ModifyDatabaseRequest::setDbDescription(const std::string &dbDescription) { + dbDescription_ = dbDescription; + setBodyParameter(std::string("DbDescription"), dbDescription); +} + +std::string ModifyDatabaseRequest::getInstanceId() const { + return instanceId_; +} + +void ModifyDatabaseRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), instanceId); +} + +std::string ModifyDatabaseRequest::getDbName() const { + return dbName_; +} + +void ModifyDatabaseRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); +} + +int ModifyDatabaseRequest::getPort() const { + return port_; +} + +void ModifyDatabaseRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string ModifyDatabaseRequest::getDbPassword() const { + return dbPassword_; +} + +void ModifyDatabaseRequest::setDbPassword(const std::string &dbPassword) { + dbPassword_ = dbPassword; + setBodyParameter(std::string("DbPassword"), dbPassword); +} + +std::string ModifyDatabaseRequest::getDbType() const { + return dbType_; +} + +void ModifyDatabaseRequest::setDbType(const std::string &dbType) { + dbType_ = dbType; + setBodyParameter(std::string("DbType"), dbType); +} + diff --git a/dms-dg/src/model/ModifyDatabaseResult.cc b/dms-dg/src/model/ModifyDatabaseResult.cc new file mode 100644 index 000000000..4bdf34e69 --- /dev/null +++ b/dms-dg/src/model/ModifyDatabaseResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +ModifyDatabaseResult::ModifyDatabaseResult() : + ServiceResult() +{} + +ModifyDatabaseResult::ModifyDatabaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyDatabaseResult::~ModifyDatabaseResult() +{} + +void ModifyDatabaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ModifyDatabaseResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string ModifyDatabaseResult::getData()const +{ + return data_; +} + +std::string ModifyDatabaseResult::getCode()const +{ + return code_; +} + +bool ModifyDatabaseResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/ModifyGatewayRequest.cc b/dms-dg/src/model/ModifyGatewayRequest.cc new file mode 100644 index 000000000..2e4853d46 --- /dev/null +++ b/dms-dg/src/model/ModifyGatewayRequest.cc @@ -0,0 +1,54 @@ +/* + * 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_dg::Model::ModifyGatewayRequest; + +ModifyGatewayRequest::ModifyGatewayRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "ModifyGateway") { + setMethod(HttpRequest::Method::Post); +} + +ModifyGatewayRequest::~ModifyGatewayRequest() {} + +std::string ModifyGatewayRequest::getGatewayDesc() const { + return gatewayDesc_; +} + +void ModifyGatewayRequest::setGatewayDesc(const std::string &gatewayDesc) { + gatewayDesc_ = gatewayDesc; + setBodyParameter(std::string("GatewayDesc"), gatewayDesc); +} + +std::string ModifyGatewayRequest::getGatewayName() const { + return gatewayName_; +} + +void ModifyGatewayRequest::setGatewayName(const std::string &gatewayName) { + gatewayName_ = gatewayName; + setBodyParameter(std::string("GatewayName"), gatewayName); +} + +std::string ModifyGatewayRequest::getGatewayId() const { + return gatewayId_; +} + +void ModifyGatewayRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/ModifyGatewayResult.cc b/dms-dg/src/model/ModifyGatewayResult.cc new file mode 100644 index 000000000..5b615fe94 --- /dev/null +++ b/dms-dg/src/model/ModifyGatewayResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +ModifyGatewayResult::ModifyGatewayResult() : + ServiceResult() +{} + +ModifyGatewayResult::ModifyGatewayResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyGatewayResult::~ModifyGatewayResult() +{} + +void ModifyGatewayResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ModifyGatewayResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string ModifyGatewayResult::getData()const +{ + return data_; +} + +std::string ModifyGatewayResult::getCode()const +{ + return code_; +} + +bool ModifyGatewayResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/RetryDatabaseRequest.cc b/dms-dg/src/model/RetryDatabaseRequest.cc new file mode 100644 index 000000000..c4cadeae7 --- /dev/null +++ b/dms-dg/src/model/RetryDatabaseRequest.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::Dms_dg::Model::RetryDatabaseRequest; + +RetryDatabaseRequest::RetryDatabaseRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "RetryDatabase") { + setMethod(HttpRequest::Method::Post); +} + +RetryDatabaseRequest::~RetryDatabaseRequest() {} + +std::string RetryDatabaseRequest::getClientToken() const { + return clientToken_; +} + +void RetryDatabaseRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setBodyParameter(std::string("ClientToken"), clientToken); +} + +std::string RetryDatabaseRequest::getRegionId() const { + return regionId_; +} + +void RetryDatabaseRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setBodyParameter(std::string("RegionId"), regionId); +} + +std::string RetryDatabaseRequest::getHost() const { + return host_; +} + +void RetryDatabaseRequest::setHost(const std::string &host) { + host_ = host; + setBodyParameter(std::string("Host"), host); +} + +std::string RetryDatabaseRequest::getDbUserName() const { + return dbUserName_; +} + +void RetryDatabaseRequest::setDbUserName(const std::string &dbUserName) { + dbUserName_ = dbUserName; + setBodyParameter(std::string("DbUserName"), dbUserName); +} + +std::string RetryDatabaseRequest::getDbDescription() const { + return dbDescription_; +} + +void RetryDatabaseRequest::setDbDescription(const std::string &dbDescription) { + dbDescription_ = dbDescription; + setBodyParameter(std::string("DbDescription"), dbDescription); +} + +std::string RetryDatabaseRequest::getGatewayId() const { + return gatewayId_; +} + +void RetryDatabaseRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + +std::string RetryDatabaseRequest::getDbName() const { + return dbName_; +} + +void RetryDatabaseRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); +} + +int RetryDatabaseRequest::getPort() const { + return port_; +} + +void RetryDatabaseRequest::setPort(int port) { + port_ = port; + setBodyParameter(std::string("Port"), std::to_string(port)); +} + +std::string RetryDatabaseRequest::getDbPassword() const { + return dbPassword_; +} + +void RetryDatabaseRequest::setDbPassword(const std::string &dbPassword) { + dbPassword_ = dbPassword; + setBodyParameter(std::string("DbPassword"), dbPassword); +} + +std::string RetryDatabaseRequest::getDbType() const { + return dbType_; +} + +void RetryDatabaseRequest::setDbType(const std::string &dbType) { + dbType_ = dbType; + setBodyParameter(std::string("DbType"), dbType); +} + diff --git a/dms-dg/src/model/RetryDatabaseResult.cc b/dms-dg/src/model/RetryDatabaseResult.cc new file mode 100644 index 000000000..a08371b54 --- /dev/null +++ b/dms-dg/src/model/RetryDatabaseResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +RetryDatabaseResult::RetryDatabaseResult() : + ServiceResult() +{} + +RetryDatabaseResult::RetryDatabaseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RetryDatabaseResult::~RetryDatabaseResult() +{} + +void RetryDatabaseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string RetryDatabaseResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string RetryDatabaseResult::getData()const +{ + return data_; +} + +std::string RetryDatabaseResult::getCode()const +{ + return code_; +} + +bool RetryDatabaseResult::getSuccess()const +{ + return success_; +} + diff --git a/dms-dg/src/model/StopGatewayRequest.cc b/dms-dg/src/model/StopGatewayRequest.cc new file mode 100644 index 000000000..a0e6fadf3 --- /dev/null +++ b/dms-dg/src/model/StopGatewayRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Dms_dg::Model::StopGatewayRequest; + +StopGatewayRequest::StopGatewayRequest() + : RpcServiceRequest("dms-dg", "2023-09-14", "StopGateway") { + setMethod(HttpRequest::Method::Post); +} + +StopGatewayRequest::~StopGatewayRequest() {} + +std::string StopGatewayRequest::getGatewayInstanceId() const { + return gatewayInstanceId_; +} + +void StopGatewayRequest::setGatewayInstanceId(const std::string &gatewayInstanceId) { + gatewayInstanceId_ = gatewayInstanceId; + setBodyParameter(std::string("GatewayInstanceId"), gatewayInstanceId); +} + +std::string StopGatewayRequest::getGatewayId() const { + return gatewayId_; +} + +void StopGatewayRequest::setGatewayId(const std::string &gatewayId) { + gatewayId_ = gatewayId; + setBodyParameter(std::string("GatewayId"), gatewayId); +} + diff --git a/dms-dg/src/model/StopGatewayResult.cc b/dms-dg/src/model/StopGatewayResult.cc new file mode 100644 index 000000000..46025f4b0 --- /dev/null +++ b/dms-dg/src/model/StopGatewayResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Dms_dg; +using namespace AlibabaCloud::Dms_dg::Model; + +StopGatewayResult::StopGatewayResult() : + ServiceResult() +{} + +StopGatewayResult::StopGatewayResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +StopGatewayResult::~StopGatewayResult() +{} + +void StopGatewayResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string StopGatewayResult::getErrorMsg()const +{ + return errorMsg_; +} + +std::string StopGatewayResult::getData()const +{ + return data_; +} + +std::string StopGatewayResult::getCode()const +{ + return code_; +} + +bool StopGatewayResult::getSuccess()const +{ + return success_; +} +