From 133087387bf24709bc6bd1b95b88924e479ba97e Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 24 Nov 2020 12:21:04 +0000 Subject: [PATCH] Create lindorm Open api. --- CHANGELOG | 3 + hitsdb/CMakeLists.txt | 98 +++++++++ .../alibabacloud/hitsdb/HitsdbClient.h | 78 +++++++ .../alibabacloud/hitsdb/HitsdbExport.h | 32 +++ .../model/GetInstanceIpWhiteListRequest.h | 69 ++++++ .../model/GetInstanceIpWhiteListResult.h | 53 +++++ .../GetLindormInstanceEngineListRequest.h | 66 ++++++ .../GetLindormInstanceEngineListResult.h | 65 ++++++ .../model/GetLindormInstanceListRequest.h | 78 +++++++ .../model/GetLindormInstanceListResult.h | 74 +++++++ .../model/UpdateInstanceIpWhiteListRequest.h | 72 +++++++ .../model/UpdateInstanceIpWhiteListResult.h | 49 +++++ hitsdb/src/HitsdbClient.cc | 197 ++++++++++++++++++ .../model/GetInstanceIpWhiteListRequest.cc | 117 +++++++++++ .../src/model/GetInstanceIpWhiteListResult.cc | 59 ++++++ .../GetLindormInstanceEngineListRequest.cc | 106 ++++++++++ .../GetLindormInstanceEngineListResult.cc | 78 +++++++ .../model/GetLindormInstanceListRequest.cc | 150 +++++++++++++ .../src/model/GetLindormInstanceListResult.cc | 104 +++++++++ .../model/UpdateInstanceIpWhiteListRequest.cc | 128 ++++++++++++ .../model/UpdateInstanceIpWhiteListResult.cc | 44 ++++ 21 files changed, 1720 insertions(+) create mode 100644 hitsdb/CMakeLists.txt create mode 100644 hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/HitsdbExport.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h create mode 100644 hitsdb/src/HitsdbClient.cc create mode 100644 hitsdb/src/model/GetInstanceIpWhiteListRequest.cc create mode 100644 hitsdb/src/model/GetInstanceIpWhiteListResult.cc create mode 100644 hitsdb/src/model/GetLindormInstanceEngineListRequest.cc create mode 100644 hitsdb/src/model/GetLindormInstanceEngineListResult.cc create mode 100644 hitsdb/src/model/GetLindormInstanceListRequest.cc create mode 100644 hitsdb/src/model/GetLindormInstanceListResult.cc create mode 100644 hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc create mode 100644 hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc diff --git a/CHANGELOG b/CHANGELOG index a9ab6ae2c..842aabd62 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-11-24 Version: patch +- Create lindorm Open api. + 2020-11-24 Version: patch - Update SearchFace. diff --git a/hitsdb/CMakeLists.txt b/hitsdb/CMakeLists.txt new file mode 100644 index 000000000..a686fa89c --- /dev/null +++ b/hitsdb/CMakeLists.txt @@ -0,0 +1,98 @@ +# +# 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(hitsdb_public_header + include/alibabacloud/hitsdb/HitsdbClient.h + include/alibabacloud/hitsdb/HitsdbExport.h ) + +set(hitsdb_public_header_model + include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.h + include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h + include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListRequest.h + include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h + include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.h + include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h + include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h + include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h ) + +set(hitsdb_src + src/HitsdbClient.cc + src/model/GetInstanceIpWhiteListRequest.cc + src/model/GetInstanceIpWhiteListResult.cc + src/model/GetLindormInstanceEngineListRequest.cc + src/model/GetLindormInstanceEngineListResult.cc + src/model/GetLindormInstanceListRequest.cc + src/model/GetLindormInstanceListResult.cc + src/model/UpdateInstanceIpWhiteListRequest.cc + src/model/UpdateInstanceIpWhiteListResult.cc ) + +add_library(hitsdb ${LIB_TYPE} + ${hitsdb_public_header} + ${hitsdb_public_header_model} + ${hitsdb_src}) + +set_target_properties(hitsdb + 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}hitsdb + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(hitsdb + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_HITSDB_LIBRARY) +endif() + +target_include_directories(hitsdb + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(hitsdb + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(hitsdb + jsoncpp) + target_include_directories(hitsdb + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(hitsdb + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(hitsdb + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(hitsdb + PRIVATE /usr/include/jsoncpp) + target_link_libraries(hitsdb + jsoncpp) +endif() + +install(FILES ${hitsdb_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/hitsdb) +install(FILES ${hitsdb_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/hitsdb/model) +install(TARGETS hitsdb + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h new file mode 100644 index 000000000..27d3cda93 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.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_HITSDB_HITSDBCLIENT_H_ +#define ALIBABACLOUD_HITSDB_HITSDBCLIENT_H_ + +#include +#include +#include +#include +#include "HitsdbExport.h" +#include "model/GetInstanceIpWhiteListRequest.h" +#include "model/GetInstanceIpWhiteListResult.h" +#include "model/GetLindormInstanceEngineListRequest.h" +#include "model/GetLindormInstanceEngineListResult.h" +#include "model/GetLindormInstanceListRequest.h" +#include "model/GetLindormInstanceListResult.h" +#include "model/UpdateInstanceIpWhiteListRequest.h" +#include "model/UpdateInstanceIpWhiteListResult.h" + + +namespace AlibabaCloud +{ + namespace Hitsdb + { + class ALIBABACLOUD_HITSDB_EXPORT HitsdbClient : public RpcServiceClient + { + public: + typedef Outcome GetInstanceIpWhiteListOutcome; + typedef std::future GetInstanceIpWhiteListOutcomeCallable; + typedef std::function&)> GetInstanceIpWhiteListAsyncHandler; + typedef Outcome GetLindormInstanceEngineListOutcome; + typedef std::future GetLindormInstanceEngineListOutcomeCallable; + typedef std::function&)> GetLindormInstanceEngineListAsyncHandler; + typedef Outcome GetLindormInstanceListOutcome; + typedef std::future GetLindormInstanceListOutcomeCallable; + typedef std::function&)> GetLindormInstanceListAsyncHandler; + typedef Outcome UpdateInstanceIpWhiteListOutcome; + typedef std::future UpdateInstanceIpWhiteListOutcomeCallable; + typedef std::function&)> UpdateInstanceIpWhiteListAsyncHandler; + + HitsdbClient(const Credentials &credentials, const ClientConfiguration &configuration); + HitsdbClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + HitsdbClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~HitsdbClient(); + GetInstanceIpWhiteListOutcome getInstanceIpWhiteList(const Model::GetInstanceIpWhiteListRequest &request)const; + void getInstanceIpWhiteListAsync(const Model::GetInstanceIpWhiteListRequest& request, const GetInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetInstanceIpWhiteListOutcomeCallable getInstanceIpWhiteListCallable(const Model::GetInstanceIpWhiteListRequest& request) const; + GetLindormInstanceEngineListOutcome getLindormInstanceEngineList(const Model::GetLindormInstanceEngineListRequest &request)const; + void getLindormInstanceEngineListAsync(const Model::GetLindormInstanceEngineListRequest& request, const GetLindormInstanceEngineListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetLindormInstanceEngineListOutcomeCallable getLindormInstanceEngineListCallable(const Model::GetLindormInstanceEngineListRequest& request) const; + GetLindormInstanceListOutcome getLindormInstanceList(const Model::GetLindormInstanceListRequest &request)const; + void getLindormInstanceListAsync(const Model::GetLindormInstanceListRequest& request, const GetLindormInstanceListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetLindormInstanceListOutcomeCallable getLindormInstanceListCallable(const Model::GetLindormInstanceListRequest& request) const; + UpdateInstanceIpWhiteListOutcome updateInstanceIpWhiteList(const Model::UpdateInstanceIpWhiteListRequest &request)const; + void updateInstanceIpWhiteListAsync(const Model::UpdateInstanceIpWhiteListRequest& request, const UpdateInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateInstanceIpWhiteListOutcomeCallable updateInstanceIpWhiteListCallable(const Model::UpdateInstanceIpWhiteListRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_HITSDB_HITSDBCLIENT_H_ diff --git a/hitsdb/include/alibabacloud/hitsdb/HitsdbExport.h b/hitsdb/include/alibabacloud/hitsdb/HitsdbExport.h new file mode 100644 index 000000000..af45b067d --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/HitsdbExport.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_HITSDB_HITSDBEXPORT_H_ +#define ALIBABACLOUD_HITSDB_HITSDBEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_HITSDB_LIBRARY) +# define ALIBABACLOUD_HITSDB_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_HITSDB_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_HITSDB_EXPORT +#endif + +#endif // !ALIBABACLOUD_HITSDB_HITSDBEXPORT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.h new file mode 100644 index 000000000..c160f02df --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.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_HITSDB_MODEL_GETINSTANCEIPWHITELISTREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETINSTANCEIPWHITELISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetInstanceIpWhiteListRequest : public RpcServiceRequest + { + + public: + GetInstanceIpWhiteListRequest(); + ~GetInstanceIpWhiteListRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getGroupName()const; + void setGroupName(const std::string& groupName); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string groupName_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETINSTANCEIPWHITELISTREQUEST_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h new file mode 100644 index 000000000..1e6b4b5ab --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_HITSDB_MODEL_GETINSTANCEIPWHITELISTRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETINSTANCEIPWHITELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetInstanceIpWhiteListResult : public ServiceResult + { + public: + + + GetInstanceIpWhiteListResult(); + explicit GetInstanceIpWhiteListResult(const std::string &payload); + ~GetInstanceIpWhiteListResult(); + std::vector getIpList()const; + std::string getInstanceId()const; + + protected: + void parse(const std::string &payload); + private: + std::vector ipList_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETINSTANCEIPWHITELISTRESULT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListRequest.h new file mode 100644 index 000000000..7a09df662 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListRequest.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_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetLindormInstanceEngineListRequest : public RpcServiceRequest + { + + public: + GetLindormInstanceEngineListRequest(); + ~GetLindormInstanceEngineListRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTREQUEST_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h new file mode 100644 index 000000000..da83ec5cf --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h @@ -0,0 +1,65 @@ +/* + * 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_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetLindormInstanceEngineListResult : public ServiceResult + { + public: + struct EngineInfo + { + struct NetInfo + { + int port; + std::string connectionString; + std::string netType; + int accessType; + }; + std::vector netInfoList; + std::string engineType; + }; + + + GetLindormInstanceEngineListResult(); + explicit GetLindormInstanceEngineListResult(const std::string &payload); + ~GetLindormInstanceEngineListResult(); + std::vector getEngineList()const; + std::string getInstanceId()const; + + protected: + void parse(const std::string &payload); + private: + std::vector engineList_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCEENGINELISTRESULT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.h new file mode 100644 index 000000000..9050c62a9 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.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_HITSDB_MODEL_GETLINDORMINSTANCELISTREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCELISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetLindormInstanceListRequest : public RpcServiceRequest + { + + public: + GetLindormInstanceListRequest(); + ~GetLindormInstanceListRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + int getSupportEngine()const; + void setSupportEngine(int supportEngine); + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getQueryStr()const; + void setQueryStr(const std::string& queryStr); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getServiceType()const; + void setServiceType(const std::string& serviceType); + + private: + long resourceOwnerId_; + int supportEngine_; + int pageNumber_; + std::string accessKeyId_; + std::string securityToken_; + int pageSize_; + std::string queryStr_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string serviceType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCELISTREQUEST_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h new file mode 100644 index 000000000..ed6dc66da --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h @@ -0,0 +1,74 @@ +/* + * 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_HITSDB_MODEL_GETLINDORMINSTANCELISTRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetLindormInstanceListResult : public ServiceResult + { + public: + struct LindormInstanceSummary + { + std::string instanceStorage; + std::string zoneId; + std::string instanceId; + std::string createTime; + std::string payType; + std::string vpcId; + std::string instanceAlias; + std::string instanceStatus; + std::string networkType; + std::string serviceType; + std::string engineType; + std::string regionId; + std::string expireTime; + long aliUid; + }; + + + GetLindormInstanceListResult(); + explicit GetLindormInstanceListResult(const std::string &payload); + ~GetLindormInstanceListResult(); + int getPageSize()const; + int getPageNumber()const; + int getTotal()const; + std::vector getInstanceList()const; + + protected: + void parse(const std::string &payload); + private: + int pageSize_; + int pageNumber_; + int total_; + std::vector instanceList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMINSTANCELISTRESULT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h new file mode 100644 index 000000000..27f188901 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.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_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT UpdateInstanceIpWhiteListRequest : public RpcServiceRequest + { + + public: + UpdateInstanceIpWhiteListRequest(); + ~UpdateInstanceIpWhiteListRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getGroupName()const; + void setGroupName(const std::string& groupName); + std::string getSecurityIpList()const; + void setSecurityIpList(const std::string& securityIpList); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string groupName_; + std::string securityIpList_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTREQUEST_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h new file mode 100644 index 000000000..fae95b775 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT UpdateInstanceIpWhiteListResult : public ServiceResult + { + public: + + + UpdateInstanceIpWhiteListResult(); + explicit UpdateInstanceIpWhiteListResult(const std::string &payload); + ~UpdateInstanceIpWhiteListResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCEIPWHITELISTRESULT_H_ \ No newline at end of file diff --git a/hitsdb/src/HitsdbClient.cc b/hitsdb/src/HitsdbClient.cc new file mode 100644 index 000000000..a0269efda --- /dev/null +++ b/hitsdb/src/HitsdbClient.cc @@ -0,0 +1,197 @@ +/* + * 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::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +namespace +{ + const std::string SERVICE_NAME = "hitsdb"; +} + +HitsdbClient::HitsdbClient(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, "hitsdb"); +} + +HitsdbClient::HitsdbClient(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, "hitsdb"); +} + +HitsdbClient::HitsdbClient(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, "hitsdb"); +} + +HitsdbClient::~HitsdbClient() +{} + +HitsdbClient::GetInstanceIpWhiteListOutcome HitsdbClient::getInstanceIpWhiteList(const GetInstanceIpWhiteListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetInstanceIpWhiteListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetInstanceIpWhiteListOutcome(GetInstanceIpWhiteListResult(outcome.result())); + else + return GetInstanceIpWhiteListOutcome(outcome.error()); +} + +void HitsdbClient::getInstanceIpWhiteListAsync(const GetInstanceIpWhiteListRequest& request, const GetInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getInstanceIpWhiteList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::GetInstanceIpWhiteListOutcomeCallable HitsdbClient::getInstanceIpWhiteListCallable(const GetInstanceIpWhiteListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getInstanceIpWhiteList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +HitsdbClient::GetLindormInstanceEngineListOutcome HitsdbClient::getLindormInstanceEngineList(const GetLindormInstanceEngineListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetLindormInstanceEngineListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetLindormInstanceEngineListOutcome(GetLindormInstanceEngineListResult(outcome.result())); + else + return GetLindormInstanceEngineListOutcome(outcome.error()); +} + +void HitsdbClient::getLindormInstanceEngineListAsync(const GetLindormInstanceEngineListRequest& request, const GetLindormInstanceEngineListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getLindormInstanceEngineList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::GetLindormInstanceEngineListOutcomeCallable HitsdbClient::getLindormInstanceEngineListCallable(const GetLindormInstanceEngineListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getLindormInstanceEngineList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +HitsdbClient::GetLindormInstanceListOutcome HitsdbClient::getLindormInstanceList(const GetLindormInstanceListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetLindormInstanceListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetLindormInstanceListOutcome(GetLindormInstanceListResult(outcome.result())); + else + return GetLindormInstanceListOutcome(outcome.error()); +} + +void HitsdbClient::getLindormInstanceListAsync(const GetLindormInstanceListRequest& request, const GetLindormInstanceListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getLindormInstanceList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::GetLindormInstanceListOutcomeCallable HitsdbClient::getLindormInstanceListCallable(const GetLindormInstanceListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getLindormInstanceList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +HitsdbClient::UpdateInstanceIpWhiteListOutcome HitsdbClient::updateInstanceIpWhiteList(const UpdateInstanceIpWhiteListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateInstanceIpWhiteListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateInstanceIpWhiteListOutcome(UpdateInstanceIpWhiteListResult(outcome.result())); + else + return UpdateInstanceIpWhiteListOutcome(outcome.error()); +} + +void HitsdbClient::updateInstanceIpWhiteListAsync(const UpdateInstanceIpWhiteListRequest& request, const UpdateInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateInstanceIpWhiteList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::UpdateInstanceIpWhiteListOutcomeCallable HitsdbClient::updateInstanceIpWhiteListCallable(const UpdateInstanceIpWhiteListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateInstanceIpWhiteList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/hitsdb/src/model/GetInstanceIpWhiteListRequest.cc b/hitsdb/src/model/GetInstanceIpWhiteListRequest.cc new file mode 100644 index 000000000..8ae2b6c80 --- /dev/null +++ b/hitsdb/src/model/GetInstanceIpWhiteListRequest.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::Hitsdb::Model::GetInstanceIpWhiteListRequest; + +GetInstanceIpWhiteListRequest::GetInstanceIpWhiteListRequest() : + RpcServiceRequest("hitsdb", "2020-06-15", "GetInstanceIpWhiteList") +{ + setMethod(HttpRequest::Method::Post); +} + +GetInstanceIpWhiteListRequest::~GetInstanceIpWhiteListRequest() +{} + +long GetInstanceIpWhiteListRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetInstanceIpWhiteListRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetInstanceIpWhiteListRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GetInstanceIpWhiteListRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string GetInstanceIpWhiteListRequest::getSecurityToken()const +{ + return securityToken_; +} + +void GetInstanceIpWhiteListRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string GetInstanceIpWhiteListRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void GetInstanceIpWhiteListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string GetInstanceIpWhiteListRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void GetInstanceIpWhiteListRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long GetInstanceIpWhiteListRequest::getOwnerId()const +{ + return ownerId_; +} + +void GetInstanceIpWhiteListRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string GetInstanceIpWhiteListRequest::getGroupName()const +{ + return groupName_; +} + +void GetInstanceIpWhiteListRequest::setGroupName(const std::string& groupName) +{ + groupName_ = groupName; + setParameter("GroupName", groupName); +} + +std::string GetInstanceIpWhiteListRequest::getInstanceId()const +{ + return instanceId_; +} + +void GetInstanceIpWhiteListRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + diff --git a/hitsdb/src/model/GetInstanceIpWhiteListResult.cc b/hitsdb/src/model/GetInstanceIpWhiteListResult.cc new file mode 100644 index 000000000..963146ef9 --- /dev/null +++ b/hitsdb/src/model/GetInstanceIpWhiteListResult.cc @@ -0,0 +1,59 @@ +/* + * 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::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +GetInstanceIpWhiteListResult::GetInstanceIpWhiteListResult() : + ServiceResult() +{} + +GetInstanceIpWhiteListResult::GetInstanceIpWhiteListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetInstanceIpWhiteListResult::~GetInstanceIpWhiteListResult() +{} + +void GetInstanceIpWhiteListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allIpList = value["IpList"]["IpList"]; + for (const auto &item : allIpList) + ipList_.push_back(item.asString()); + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + +} + +std::vector GetInstanceIpWhiteListResult::getIpList()const +{ + return ipList_; +} + +std::string GetInstanceIpWhiteListResult::getInstanceId()const +{ + return instanceId_; +} + diff --git a/hitsdb/src/model/GetLindormInstanceEngineListRequest.cc b/hitsdb/src/model/GetLindormInstanceEngineListRequest.cc new file mode 100644 index 000000000..eee103d7d --- /dev/null +++ b/hitsdb/src/model/GetLindormInstanceEngineListRequest.cc @@ -0,0 +1,106 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Hitsdb::Model::GetLindormInstanceEngineListRequest; + +GetLindormInstanceEngineListRequest::GetLindormInstanceEngineListRequest() : + RpcServiceRequest("hitsdb", "2020-06-15", "GetLindormInstanceEngineList") +{ + setMethod(HttpRequest::Method::Post); +} + +GetLindormInstanceEngineListRequest::~GetLindormInstanceEngineListRequest() +{} + +long GetLindormInstanceEngineListRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetLindormInstanceEngineListRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetLindormInstanceEngineListRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GetLindormInstanceEngineListRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string GetLindormInstanceEngineListRequest::getSecurityToken()const +{ + return securityToken_; +} + +void GetLindormInstanceEngineListRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string GetLindormInstanceEngineListRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void GetLindormInstanceEngineListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string GetLindormInstanceEngineListRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void GetLindormInstanceEngineListRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long GetLindormInstanceEngineListRequest::getOwnerId()const +{ + return ownerId_; +} + +void GetLindormInstanceEngineListRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string GetLindormInstanceEngineListRequest::getInstanceId()const +{ + return instanceId_; +} + +void GetLindormInstanceEngineListRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + diff --git a/hitsdb/src/model/GetLindormInstanceEngineListResult.cc b/hitsdb/src/model/GetLindormInstanceEngineListResult.cc new file mode 100644 index 000000000..033ba6806 --- /dev/null +++ b/hitsdb/src/model/GetLindormInstanceEngineListResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +GetLindormInstanceEngineListResult::GetLindormInstanceEngineListResult() : + ServiceResult() +{} + +GetLindormInstanceEngineListResult::GetLindormInstanceEngineListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetLindormInstanceEngineListResult::~GetLindormInstanceEngineListResult() +{} + +void GetLindormInstanceEngineListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allEngineListNode = value["EngineList"]["EngineInfo"]; + for (auto valueEngineListEngineInfo : allEngineListNode) + { + EngineInfo engineListObject; + if(!valueEngineListEngineInfo["EngineType"].isNull()) + engineListObject.engineType = valueEngineListEngineInfo["EngineType"].asString(); + auto allNetInfoListNode = valueEngineListEngineInfo["NetInfoList"]["NetInfo"]; + for (auto valueEngineListEngineInfoNetInfoListNetInfo : allNetInfoListNode) + { + EngineInfo::NetInfo netInfoListObject; + if(!valueEngineListEngineInfoNetInfoListNetInfo["NetType"].isNull()) + netInfoListObject.netType = valueEngineListEngineInfoNetInfoListNetInfo["NetType"].asString(); + if(!valueEngineListEngineInfoNetInfoListNetInfo["ConnectionString"].isNull()) + netInfoListObject.connectionString = valueEngineListEngineInfoNetInfoListNetInfo["ConnectionString"].asString(); + if(!valueEngineListEngineInfoNetInfoListNetInfo["Port"].isNull()) + netInfoListObject.port = std::stoi(valueEngineListEngineInfoNetInfoListNetInfo["Port"].asString()); + if(!valueEngineListEngineInfoNetInfoListNetInfo["AccessType"].isNull()) + netInfoListObject.accessType = std::stoi(valueEngineListEngineInfoNetInfoListNetInfo["AccessType"].asString()); + engineListObject.netInfoList.push_back(netInfoListObject); + } + engineList_.push_back(engineListObject); + } + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + +} + +std::vector GetLindormInstanceEngineListResult::getEngineList()const +{ + return engineList_; +} + +std::string GetLindormInstanceEngineListResult::getInstanceId()const +{ + return instanceId_; +} + diff --git a/hitsdb/src/model/GetLindormInstanceListRequest.cc b/hitsdb/src/model/GetLindormInstanceListRequest.cc new file mode 100644 index 000000000..73d62b432 --- /dev/null +++ b/hitsdb/src/model/GetLindormInstanceListRequest.cc @@ -0,0 +1,150 @@ +/* + * 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::Hitsdb::Model::GetLindormInstanceListRequest; + +GetLindormInstanceListRequest::GetLindormInstanceListRequest() : + RpcServiceRequest("hitsdb", "2020-06-15", "GetLindormInstanceList") +{ + setMethod(HttpRequest::Method::Post); +} + +GetLindormInstanceListRequest::~GetLindormInstanceListRequest() +{} + +long GetLindormInstanceListRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetLindormInstanceListRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +int GetLindormInstanceListRequest::getSupportEngine()const +{ + return supportEngine_; +} + +void GetLindormInstanceListRequest::setSupportEngine(int supportEngine) +{ + supportEngine_ = supportEngine; + setParameter("SupportEngine", std::to_string(supportEngine)); +} + +int GetLindormInstanceListRequest::getPageNumber()const +{ + return pageNumber_; +} + +void GetLindormInstanceListRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string GetLindormInstanceListRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GetLindormInstanceListRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string GetLindormInstanceListRequest::getSecurityToken()const +{ + return securityToken_; +} + +void GetLindormInstanceListRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +int GetLindormInstanceListRequest::getPageSize()const +{ + return pageSize_; +} + +void GetLindormInstanceListRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string GetLindormInstanceListRequest::getQueryStr()const +{ + return queryStr_; +} + +void GetLindormInstanceListRequest::setQueryStr(const std::string& queryStr) +{ + queryStr_ = queryStr; + setParameter("QueryStr", queryStr); +} + +std::string GetLindormInstanceListRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void GetLindormInstanceListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string GetLindormInstanceListRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void GetLindormInstanceListRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long GetLindormInstanceListRequest::getOwnerId()const +{ + return ownerId_; +} + +void GetLindormInstanceListRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string GetLindormInstanceListRequest::getServiceType()const +{ + return serviceType_; +} + +void GetLindormInstanceListRequest::setServiceType(const std::string& serviceType) +{ + serviceType_ = serviceType; + setParameter("ServiceType", serviceType); +} + diff --git a/hitsdb/src/model/GetLindormInstanceListResult.cc b/hitsdb/src/model/GetLindormInstanceListResult.cc new file mode 100644 index 000000000..ee32d2bfd --- /dev/null +++ b/hitsdb/src/model/GetLindormInstanceListResult.cc @@ -0,0 +1,104 @@ +/* + * 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::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +GetLindormInstanceListResult::GetLindormInstanceListResult() : + ServiceResult() +{} + +GetLindormInstanceListResult::GetLindormInstanceListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetLindormInstanceListResult::~GetLindormInstanceListResult() +{} + +void GetLindormInstanceListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allInstanceListNode = value["InstanceList"]["LindormInstanceSummary"]; + for (auto valueInstanceListLindormInstanceSummary : allInstanceListNode) + { + LindormInstanceSummary instanceListObject; + if(!valueInstanceListLindormInstanceSummary["InstanceId"].isNull()) + instanceListObject.instanceId = valueInstanceListLindormInstanceSummary["InstanceId"].asString(); + if(!valueInstanceListLindormInstanceSummary["InstanceAlias"].isNull()) + instanceListObject.instanceAlias = valueInstanceListLindormInstanceSummary["InstanceAlias"].asString(); + if(!valueInstanceListLindormInstanceSummary["RegionId"].isNull()) + instanceListObject.regionId = valueInstanceListLindormInstanceSummary["RegionId"].asString(); + if(!valueInstanceListLindormInstanceSummary["ZoneId"].isNull()) + instanceListObject.zoneId = valueInstanceListLindormInstanceSummary["ZoneId"].asString(); + if(!valueInstanceListLindormInstanceSummary["InstanceStatus"].isNull()) + instanceListObject.instanceStatus = valueInstanceListLindormInstanceSummary["InstanceStatus"].asString(); + if(!valueInstanceListLindormInstanceSummary["PayType"].isNull()) + instanceListObject.payType = valueInstanceListLindormInstanceSummary["PayType"].asString(); + if(!valueInstanceListLindormInstanceSummary["NetworkType"].isNull()) + instanceListObject.networkType = valueInstanceListLindormInstanceSummary["NetworkType"].asString(); + if(!valueInstanceListLindormInstanceSummary["CreateTime"].isNull()) + instanceListObject.createTime = valueInstanceListLindormInstanceSummary["CreateTime"].asString(); + if(!valueInstanceListLindormInstanceSummary["ExpireTime"].isNull()) + instanceListObject.expireTime = valueInstanceListLindormInstanceSummary["ExpireTime"].asString(); + if(!valueInstanceListLindormInstanceSummary["InstanceStorage"].isNull()) + instanceListObject.instanceStorage = valueInstanceListLindormInstanceSummary["InstanceStorage"].asString(); + if(!valueInstanceListLindormInstanceSummary["ServiceType"].isNull()) + instanceListObject.serviceType = valueInstanceListLindormInstanceSummary["ServiceType"].asString(); + if(!valueInstanceListLindormInstanceSummary["EngineType"].isNull()) + instanceListObject.engineType = valueInstanceListLindormInstanceSummary["EngineType"].asString(); + if(!valueInstanceListLindormInstanceSummary["AliUid"].isNull()) + instanceListObject.aliUid = std::stol(valueInstanceListLindormInstanceSummary["AliUid"].asString()); + if(!valueInstanceListLindormInstanceSummary["VpcId"].isNull()) + instanceListObject.vpcId = valueInstanceListLindormInstanceSummary["VpcId"].asString(); + instanceList_.push_back(instanceListObject); + } + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["Total"].isNull()) + total_ = std::stoi(value["Total"].asString()); + +} + +int GetLindormInstanceListResult::getPageSize()const +{ + return pageSize_; +} + +int GetLindormInstanceListResult::getPageNumber()const +{ + return pageNumber_; +} + +int GetLindormInstanceListResult::getTotal()const +{ + return total_; +} + +std::vector GetLindormInstanceListResult::getInstanceList()const +{ + return instanceList_; +} + diff --git a/hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc b/hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc new file mode 100644 index 000000000..5455b744a --- /dev/null +++ b/hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc @@ -0,0 +1,128 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Hitsdb::Model::UpdateInstanceIpWhiteListRequest; + +UpdateInstanceIpWhiteListRequest::UpdateInstanceIpWhiteListRequest() : + RpcServiceRequest("hitsdb", "2020-06-15", "UpdateInstanceIpWhiteList") +{ + setMethod(HttpRequest::Method::Post); +} + +UpdateInstanceIpWhiteListRequest::~UpdateInstanceIpWhiteListRequest() +{} + +long UpdateInstanceIpWhiteListRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void UpdateInstanceIpWhiteListRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string UpdateInstanceIpWhiteListRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void UpdateInstanceIpWhiteListRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string UpdateInstanceIpWhiteListRequest::getSecurityToken()const +{ + return securityToken_; +} + +void UpdateInstanceIpWhiteListRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string UpdateInstanceIpWhiteListRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void UpdateInstanceIpWhiteListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string UpdateInstanceIpWhiteListRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void UpdateInstanceIpWhiteListRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long UpdateInstanceIpWhiteListRequest::getOwnerId()const +{ + return ownerId_; +} + +void UpdateInstanceIpWhiteListRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string UpdateInstanceIpWhiteListRequest::getGroupName()const +{ + return groupName_; +} + +void UpdateInstanceIpWhiteListRequest::setGroupName(const std::string& groupName) +{ + groupName_ = groupName; + setParameter("GroupName", groupName); +} + +std::string UpdateInstanceIpWhiteListRequest::getSecurityIpList()const +{ + return securityIpList_; +} + +void UpdateInstanceIpWhiteListRequest::setSecurityIpList(const std::string& securityIpList) +{ + securityIpList_ = securityIpList; + setParameter("SecurityIpList", securityIpList); +} + +std::string UpdateInstanceIpWhiteListRequest::getInstanceId()const +{ + return instanceId_; +} + +void UpdateInstanceIpWhiteListRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + diff --git a/hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc b/hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc new file mode 100644 index 000000000..f6c8658f0 --- /dev/null +++ b/hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +UpdateInstanceIpWhiteListResult::UpdateInstanceIpWhiteListResult() : + ServiceResult() +{} + +UpdateInstanceIpWhiteListResult::UpdateInstanceIpWhiteListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateInstanceIpWhiteListResult::~UpdateInstanceIpWhiteListResult() +{} + +void UpdateInstanceIpWhiteListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +