From cbcd5856968e6af8328300a88cfa902eb61da9a2 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 21 Feb 2023 05:36:39 +0000 Subject: [PATCH] Lingjun Controller Initial Version Released. --- VERSION | 2 +- eflo-controller/CMakeLists.txt | 154 ++++ .../eflo-controller/Eflo_controllerClient.h | 190 +++++ .../eflo-controller/Eflo_controllerExport.h | 32 + .../model/ChangeResourceGroupRequest.h | 54 ++ .../model/ChangeResourceGroupResult.h | 49 ++ .../model/CreateClusterRequest.h | 111 +++ .../model/CreateClusterResult.h | 53 ++ .../model/DeleteClusterRequest.h | 42 ++ .../model/DeleteClusterResult.h | 49 ++ .../model/DescribeClusterRequest.h | 42 ++ .../model/DescribeClusterResult.h | 84 +++ .../model/DescribeNodeRequest.h | 42 ++ .../model/DescribeNodeResult.h | 84 +++ .../model/DescribeRegionsRequest.h | 42 ++ .../model/DescribeRegionsResult.h | 56 ++ .../model/DescribeTaskRequest.h | 42 ++ .../model/DescribeTaskResult.h | 85 +++ .../model/DescribeZonesRequest.h | 42 ++ .../model/DescribeZonesResult.h | 56 ++ .../model/ExtendClusterRequest.h | 58 ++ .../model/ExtendClusterResult.h | 51 ++ .../model/ListClusterNodesRequest.h | 51 ++ .../model/ListClusterNodesResult.h | 75 ++ .../model/ListClustersRequest.h | 48 ++ .../model/ListClustersResult.h | 68 ++ .../model/ListFreeNodesRequest.h | 48 ++ .../model/ListFreeNodesResult.h | 62 ++ .../model/ListTagResourcesRequest.h | 61 ++ .../model/ListTagResourcesResult.h | 60 ++ .../model/RebootNodesRequest.h | 48 ++ .../eflo-controller/model/RebootNodesResult.h | 51 ++ .../model/ReimageNodesRequest.h | 54 ++ .../model/ReimageNodesResult.h | 51 ++ .../model/ShrinkClusterRequest.h | 56 ++ .../model/ShrinkClusterResult.h | 51 ++ .../model/TagResourcesRequest.h | 58 ++ .../model/TagResourcesResult.h | 49 ++ .../model/UntagResourcesRequest.h | 57 ++ .../model/UntagResourcesResult.h | 49 ++ eflo-controller/src/Eflo-controllerClient.cc | 701 ++++++++++++++++++ .../src/model/ChangeResourceGroupRequest.cc | 72 ++ .../src/model/ChangeResourceGroupResult.cc | 44 ++ .../src/model/CreateClusterRequest.cc | 140 ++++ .../src/model/CreateClusterResult.cc | 58 ++ .../src/model/DeleteClusterRequest.cc | 36 + .../src/model/DeleteClusterResult.cc | 44 ++ .../src/model/DescribeClusterRequest.cc | 36 + .../src/model/DescribeClusterResult.cc | 149 ++++ .../src/model/DescribeNodeRequest.cc | 36 + .../src/model/DescribeNodeResult.cc | 154 ++++ .../src/model/DescribeRegionsRequest.cc | 36 + .../src/model/DescribeRegionsResult.cc | 59 ++ .../src/model/DescribeTaskRequest.cc | 36 + .../src/model/DescribeTaskResult.cc | 136 ++++ .../src/model/DescribeZonesRequest.cc | 36 + .../src/model/DescribeZonesResult.cc | 59 ++ .../src/model/ExtendClusterRequest.cc | 61 ++ .../src/model/ExtendClusterResult.cc | 51 ++ .../src/model/ListClusterNodesRequest.cc | 63 ++ .../src/model/ListClusterNodesResult.cc | 98 +++ .../src/model/ListClustersRequest.cc | 54 ++ .../src/model/ListClustersResult.cc | 86 +++ .../src/model/ListFreeNodesRequest.cc | 54 ++ .../src/model/ListFreeNodesResult.cc | 74 ++ .../src/model/ListTagResourcesRequest.cc | 85 +++ .../src/model/ListTagResourcesResult.cc | 70 ++ .../src/model/RebootNodesRequest.cc | 56 ++ .../src/model/RebootNodesResult.cc | 51 ++ .../src/model/ReimageNodesRequest.cc | 59 ++ .../src/model/ReimageNodesResult.cc | 51 ++ .../src/model/ShrinkClusterRequest.cc | 59 ++ .../src/model/ShrinkClusterResult.cc | 51 ++ .../src/model/TagResourcesRequest.cc | 76 ++ .../src/model/TagResourcesResult.cc | 44 ++ .../src/model/UntagResourcesRequest.cc | 79 ++ .../src/model/UntagResourcesResult.cc | 44 ++ 77 files changed, 5514 insertions(+), 1 deletion(-) create mode 100644 eflo-controller/CMakeLists.txt create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerClient.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerExport.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesResult.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesRequest.h create mode 100644 eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesResult.h create mode 100644 eflo-controller/src/Eflo-controllerClient.cc create mode 100644 eflo-controller/src/model/ChangeResourceGroupRequest.cc create mode 100644 eflo-controller/src/model/ChangeResourceGroupResult.cc create mode 100644 eflo-controller/src/model/CreateClusterRequest.cc create mode 100644 eflo-controller/src/model/CreateClusterResult.cc create mode 100644 eflo-controller/src/model/DeleteClusterRequest.cc create mode 100644 eflo-controller/src/model/DeleteClusterResult.cc create mode 100644 eflo-controller/src/model/DescribeClusterRequest.cc create mode 100644 eflo-controller/src/model/DescribeClusterResult.cc create mode 100644 eflo-controller/src/model/DescribeNodeRequest.cc create mode 100644 eflo-controller/src/model/DescribeNodeResult.cc create mode 100644 eflo-controller/src/model/DescribeRegionsRequest.cc create mode 100644 eflo-controller/src/model/DescribeRegionsResult.cc create mode 100644 eflo-controller/src/model/DescribeTaskRequest.cc create mode 100644 eflo-controller/src/model/DescribeTaskResult.cc create mode 100644 eflo-controller/src/model/DescribeZonesRequest.cc create mode 100644 eflo-controller/src/model/DescribeZonesResult.cc create mode 100644 eflo-controller/src/model/ExtendClusterRequest.cc create mode 100644 eflo-controller/src/model/ExtendClusterResult.cc create mode 100644 eflo-controller/src/model/ListClusterNodesRequest.cc create mode 100644 eflo-controller/src/model/ListClusterNodesResult.cc create mode 100644 eflo-controller/src/model/ListClustersRequest.cc create mode 100644 eflo-controller/src/model/ListClustersResult.cc create mode 100644 eflo-controller/src/model/ListFreeNodesRequest.cc create mode 100644 eflo-controller/src/model/ListFreeNodesResult.cc create mode 100644 eflo-controller/src/model/ListTagResourcesRequest.cc create mode 100644 eflo-controller/src/model/ListTagResourcesResult.cc create mode 100644 eflo-controller/src/model/RebootNodesRequest.cc create mode 100644 eflo-controller/src/model/RebootNodesResult.cc create mode 100644 eflo-controller/src/model/ReimageNodesRequest.cc create mode 100644 eflo-controller/src/model/ReimageNodesResult.cc create mode 100644 eflo-controller/src/model/ShrinkClusterRequest.cc create mode 100644 eflo-controller/src/model/ShrinkClusterResult.cc create mode 100644 eflo-controller/src/model/TagResourcesRequest.cc create mode 100644 eflo-controller/src/model/TagResourcesResult.cc create mode 100644 eflo-controller/src/model/UntagResourcesRequest.cc create mode 100644 eflo-controller/src/model/UntagResourcesResult.cc diff --git a/VERSION b/VERSION index bc2ca3aed..ff7b65797 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1456 \ No newline at end of file +1.36.1457 \ No newline at end of file diff --git a/eflo-controller/CMakeLists.txt b/eflo-controller/CMakeLists.txt new file mode 100644 index 000000000..9dfb7cd9a --- /dev/null +++ b/eflo-controller/CMakeLists.txt @@ -0,0 +1,154 @@ +# +# 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(eflo-controller_public_header + include/alibabacloud/eflo-controller/Eflo_controllerClient.h + include/alibabacloud/eflo-controller/Eflo_controllerExport.h ) + +set(eflo-controller_public_header_model + include/alibabacloud/eflo-controller/model/ChangeResourceGroupRequest.h + include/alibabacloud/eflo-controller/model/ChangeResourceGroupResult.h + include/alibabacloud/eflo-controller/model/CreateClusterRequest.h + include/alibabacloud/eflo-controller/model/CreateClusterResult.h + include/alibabacloud/eflo-controller/model/DeleteClusterRequest.h + include/alibabacloud/eflo-controller/model/DeleteClusterResult.h + include/alibabacloud/eflo-controller/model/DescribeClusterRequest.h + include/alibabacloud/eflo-controller/model/DescribeClusterResult.h + include/alibabacloud/eflo-controller/model/DescribeNodeRequest.h + include/alibabacloud/eflo-controller/model/DescribeNodeResult.h + include/alibabacloud/eflo-controller/model/DescribeRegionsRequest.h + include/alibabacloud/eflo-controller/model/DescribeRegionsResult.h + include/alibabacloud/eflo-controller/model/DescribeTaskRequest.h + include/alibabacloud/eflo-controller/model/DescribeTaskResult.h + include/alibabacloud/eflo-controller/model/DescribeZonesRequest.h + include/alibabacloud/eflo-controller/model/DescribeZonesResult.h + include/alibabacloud/eflo-controller/model/ExtendClusterRequest.h + include/alibabacloud/eflo-controller/model/ExtendClusterResult.h + include/alibabacloud/eflo-controller/model/ListClusterNodesRequest.h + include/alibabacloud/eflo-controller/model/ListClusterNodesResult.h + include/alibabacloud/eflo-controller/model/ListClustersRequest.h + include/alibabacloud/eflo-controller/model/ListClustersResult.h + include/alibabacloud/eflo-controller/model/ListFreeNodesRequest.h + include/alibabacloud/eflo-controller/model/ListFreeNodesResult.h + include/alibabacloud/eflo-controller/model/ListTagResourcesRequest.h + include/alibabacloud/eflo-controller/model/ListTagResourcesResult.h + include/alibabacloud/eflo-controller/model/RebootNodesRequest.h + include/alibabacloud/eflo-controller/model/RebootNodesResult.h + include/alibabacloud/eflo-controller/model/ReimageNodesRequest.h + include/alibabacloud/eflo-controller/model/ReimageNodesResult.h + include/alibabacloud/eflo-controller/model/ShrinkClusterRequest.h + include/alibabacloud/eflo-controller/model/ShrinkClusterResult.h + include/alibabacloud/eflo-controller/model/TagResourcesRequest.h + include/alibabacloud/eflo-controller/model/TagResourcesResult.h + include/alibabacloud/eflo-controller/model/UntagResourcesRequest.h + include/alibabacloud/eflo-controller/model/UntagResourcesResult.h ) + +set(eflo-controller_src + src/Eflo-controllerClient.cc + src/model/ChangeResourceGroupRequest.cc + src/model/ChangeResourceGroupResult.cc + src/model/CreateClusterRequest.cc + src/model/CreateClusterResult.cc + src/model/DeleteClusterRequest.cc + src/model/DeleteClusterResult.cc + src/model/DescribeClusterRequest.cc + src/model/DescribeClusterResult.cc + src/model/DescribeNodeRequest.cc + src/model/DescribeNodeResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/DescribeTaskRequest.cc + src/model/DescribeTaskResult.cc + src/model/DescribeZonesRequest.cc + src/model/DescribeZonesResult.cc + src/model/ExtendClusterRequest.cc + src/model/ExtendClusterResult.cc + src/model/ListClusterNodesRequest.cc + src/model/ListClusterNodesResult.cc + src/model/ListClustersRequest.cc + src/model/ListClustersResult.cc + src/model/ListFreeNodesRequest.cc + src/model/ListFreeNodesResult.cc + src/model/ListTagResourcesRequest.cc + src/model/ListTagResourcesResult.cc + src/model/RebootNodesRequest.cc + src/model/RebootNodesResult.cc + src/model/ReimageNodesRequest.cc + src/model/ReimageNodesResult.cc + src/model/ShrinkClusterRequest.cc + src/model/ShrinkClusterResult.cc + src/model/TagResourcesRequest.cc + src/model/TagResourcesResult.cc + src/model/UntagResourcesRequest.cc + src/model/UntagResourcesResult.cc ) + +add_library(eflo-controller ${LIB_TYPE} + ${eflo-controller_public_header} + ${eflo-controller_public_header_model} + ${eflo-controller_src}) + +set_target_properties(eflo-controller + 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}eflo-controller + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(eflo-controller + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_EFLO_CONTROLLER_LIBRARY) +endif() + +target_include_directories(eflo-controller + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(eflo-controller + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(eflo-controller + jsoncpp) + target_include_directories(eflo-controller + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(eflo-controller + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(eflo-controller + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(eflo-controller + PRIVATE /usr/include/jsoncpp) + target_link_libraries(eflo-controller + jsoncpp) +endif() + +install(FILES ${eflo-controller_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/eflo-controller) +install(FILES ${eflo-controller_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/eflo-controller/model) +install(TARGETS eflo-controller + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerClient.h b/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerClient.h new file mode 100644 index 000000000..53d1925e9 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerClient.h @@ -0,0 +1,190 @@ +/* + * 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_EFLO_CONTROLLER_EFLO_CONTROLLERCLIENT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_EFLO_CONTROLLERCLIENT_H_ + +#include +#include +#include +#include +#include "Eflo_controllerExport.h" +#include "model/ChangeResourceGroupRequest.h" +#include "model/ChangeResourceGroupResult.h" +#include "model/CreateClusterRequest.h" +#include "model/CreateClusterResult.h" +#include "model/DeleteClusterRequest.h" +#include "model/DeleteClusterResult.h" +#include "model/DescribeClusterRequest.h" +#include "model/DescribeClusterResult.h" +#include "model/DescribeNodeRequest.h" +#include "model/DescribeNodeResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/DescribeTaskRequest.h" +#include "model/DescribeTaskResult.h" +#include "model/DescribeZonesRequest.h" +#include "model/DescribeZonesResult.h" +#include "model/ExtendClusterRequest.h" +#include "model/ExtendClusterResult.h" +#include "model/ListClusterNodesRequest.h" +#include "model/ListClusterNodesResult.h" +#include "model/ListClustersRequest.h" +#include "model/ListClustersResult.h" +#include "model/ListFreeNodesRequest.h" +#include "model/ListFreeNodesResult.h" +#include "model/ListTagResourcesRequest.h" +#include "model/ListTagResourcesResult.h" +#include "model/RebootNodesRequest.h" +#include "model/RebootNodesResult.h" +#include "model/ReimageNodesRequest.h" +#include "model/ReimageNodesResult.h" +#include "model/ShrinkClusterRequest.h" +#include "model/ShrinkClusterResult.h" +#include "model/TagResourcesRequest.h" +#include "model/TagResourcesResult.h" +#include "model/UntagResourcesRequest.h" +#include "model/UntagResourcesResult.h" + + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT Eflo_controllerClient : public RpcServiceClient + { + public: + typedef Outcome ChangeResourceGroupOutcome; + typedef std::future ChangeResourceGroupOutcomeCallable; + typedef std::function&)> ChangeResourceGroupAsyncHandler; + typedef Outcome CreateClusterOutcome; + typedef std::future CreateClusterOutcomeCallable; + typedef std::function&)> CreateClusterAsyncHandler; + typedef Outcome DeleteClusterOutcome; + typedef std::future DeleteClusterOutcomeCallable; + typedef std::function&)> DeleteClusterAsyncHandler; + typedef Outcome DescribeClusterOutcome; + typedef std::future DescribeClusterOutcomeCallable; + typedef std::function&)> DescribeClusterAsyncHandler; + typedef Outcome DescribeNodeOutcome; + typedef std::future DescribeNodeOutcomeCallable; + typedef std::function&)> DescribeNodeAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome DescribeTaskOutcome; + typedef std::future DescribeTaskOutcomeCallable; + typedef std::function&)> DescribeTaskAsyncHandler; + typedef Outcome DescribeZonesOutcome; + typedef std::future DescribeZonesOutcomeCallable; + typedef std::function&)> DescribeZonesAsyncHandler; + typedef Outcome ExtendClusterOutcome; + typedef std::future ExtendClusterOutcomeCallable; + typedef std::function&)> ExtendClusterAsyncHandler; + typedef Outcome ListClusterNodesOutcome; + typedef std::future ListClusterNodesOutcomeCallable; + typedef std::function&)> ListClusterNodesAsyncHandler; + typedef Outcome ListClustersOutcome; + typedef std::future ListClustersOutcomeCallable; + typedef std::function&)> ListClustersAsyncHandler; + typedef Outcome ListFreeNodesOutcome; + typedef std::future ListFreeNodesOutcomeCallable; + typedef std::function&)> ListFreeNodesAsyncHandler; + typedef Outcome ListTagResourcesOutcome; + typedef std::future ListTagResourcesOutcomeCallable; + typedef std::function&)> ListTagResourcesAsyncHandler; + typedef Outcome RebootNodesOutcome; + typedef std::future RebootNodesOutcomeCallable; + typedef std::function&)> RebootNodesAsyncHandler; + typedef Outcome ReimageNodesOutcome; + typedef std::future ReimageNodesOutcomeCallable; + typedef std::function&)> ReimageNodesAsyncHandler; + typedef Outcome ShrinkClusterOutcome; + typedef std::future ShrinkClusterOutcomeCallable; + typedef std::function&)> ShrinkClusterAsyncHandler; + typedef Outcome TagResourcesOutcome; + typedef std::future TagResourcesOutcomeCallable; + typedef std::function&)> TagResourcesAsyncHandler; + typedef Outcome UntagResourcesOutcome; + typedef std::future UntagResourcesOutcomeCallable; + typedef std::function&)> UntagResourcesAsyncHandler; + + Eflo_controllerClient(const Credentials &credentials, const ClientConfiguration &configuration); + Eflo_controllerClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + Eflo_controllerClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~Eflo_controllerClient(); + ChangeResourceGroupOutcome changeResourceGroup(const Model::ChangeResourceGroupRequest &request)const; + void changeResourceGroupAsync(const Model::ChangeResourceGroupRequest& request, const ChangeResourceGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ChangeResourceGroupOutcomeCallable changeResourceGroupCallable(const Model::ChangeResourceGroupRequest& request) const; + CreateClusterOutcome createCluster(const Model::CreateClusterRequest &request)const; + void createClusterAsync(const Model::CreateClusterRequest& request, const CreateClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateClusterOutcomeCallable createClusterCallable(const Model::CreateClusterRequest& request) const; + DeleteClusterOutcome deleteCluster(const Model::DeleteClusterRequest &request)const; + void deleteClusterAsync(const Model::DeleteClusterRequest& request, const DeleteClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteClusterOutcomeCallable deleteClusterCallable(const Model::DeleteClusterRequest& request) const; + DescribeClusterOutcome describeCluster(const Model::DescribeClusterRequest &request)const; + void describeClusterAsync(const Model::DescribeClusterRequest& request, const DescribeClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeClusterOutcomeCallable describeClusterCallable(const Model::DescribeClusterRequest& request) const; + DescribeNodeOutcome describeNode(const Model::DescribeNodeRequest &request)const; + void describeNodeAsync(const Model::DescribeNodeRequest& request, const DescribeNodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeNodeOutcomeCallable describeNodeCallable(const Model::DescribeNodeRequest& 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; + DescribeTaskOutcome describeTask(const Model::DescribeTaskRequest &request)const; + void describeTaskAsync(const Model::DescribeTaskRequest& request, const DescribeTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeTaskOutcomeCallable describeTaskCallable(const Model::DescribeTaskRequest& request) const; + DescribeZonesOutcome describeZones(const Model::DescribeZonesRequest &request)const; + void describeZonesAsync(const Model::DescribeZonesRequest& request, const DescribeZonesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeZonesOutcomeCallable describeZonesCallable(const Model::DescribeZonesRequest& request) const; + ExtendClusterOutcome extendCluster(const Model::ExtendClusterRequest &request)const; + void extendClusterAsync(const Model::ExtendClusterRequest& request, const ExtendClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ExtendClusterOutcomeCallable extendClusterCallable(const Model::ExtendClusterRequest& request) const; + ListClusterNodesOutcome listClusterNodes(const Model::ListClusterNodesRequest &request)const; + void listClusterNodesAsync(const Model::ListClusterNodesRequest& request, const ListClusterNodesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListClusterNodesOutcomeCallable listClusterNodesCallable(const Model::ListClusterNodesRequest& request) const; + ListClustersOutcome listClusters(const Model::ListClustersRequest &request)const; + void listClustersAsync(const Model::ListClustersRequest& request, const ListClustersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListClustersOutcomeCallable listClustersCallable(const Model::ListClustersRequest& request) const; + ListFreeNodesOutcome listFreeNodes(const Model::ListFreeNodesRequest &request)const; + void listFreeNodesAsync(const Model::ListFreeNodesRequest& request, const ListFreeNodesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListFreeNodesOutcomeCallable listFreeNodesCallable(const Model::ListFreeNodesRequest& request) const; + ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; + void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; + RebootNodesOutcome rebootNodes(const Model::RebootNodesRequest &request)const; + void rebootNodesAsync(const Model::RebootNodesRequest& request, const RebootNodesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RebootNodesOutcomeCallable rebootNodesCallable(const Model::RebootNodesRequest& request) const; + ReimageNodesOutcome reimageNodes(const Model::ReimageNodesRequest &request)const; + void reimageNodesAsync(const Model::ReimageNodesRequest& request, const ReimageNodesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ReimageNodesOutcomeCallable reimageNodesCallable(const Model::ReimageNodesRequest& request) const; + ShrinkClusterOutcome shrinkCluster(const Model::ShrinkClusterRequest &request)const; + void shrinkClusterAsync(const Model::ShrinkClusterRequest& request, const ShrinkClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ShrinkClusterOutcomeCallable shrinkClusterCallable(const Model::ShrinkClusterRequest& request) const; + TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; + void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; + UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const; + void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_EFLO_CONTROLLERCLIENT_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerExport.h b/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerExport.h new file mode 100644 index 000000000..82de01783 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/Eflo_controllerExport.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_EFLO_CONTROLLER_EFLO_CONTROLLEREXPORT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_EFLO_CONTROLLEREXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_EFLO_CONTROLLER_LIBRARY) +# define ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_EFLO_CONTROLLER_EXPORT +#endif + +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_EFLO_CONTROLLEREXPORT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupRequest.h new file mode 100644 index 000000000..d6d0b1882 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ChangeResourceGroupRequest : public RpcServiceRequest { +public: + ChangeResourceGroupRequest(); + ~ChangeResourceGroupRequest(); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getResourceRegionId() const; + void setResourceRegionId(const std::string &resourceRegionId); + std::string getResourceId() const; + void setResourceId(const std::string &resourceId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getService() const; + void setService(const std::string &service); + +private: + std::string resourceGroupId_; + std::string resourceRegionId_; + std::string resourceId_; + std::string resourceType_; + std::string service_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupResult.h new file mode 100644 index 000000000..8eb81a6e6 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ChangeResourceGroupResult.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_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ChangeResourceGroupResult : public ServiceResult + { + public: + + + ChangeResourceGroupResult(); + explicit ChangeResourceGroupResult(const std::string &payload); + ~ChangeResourceGroupResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CHANGERESOURCEGROUPRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterRequest.h new file mode 100644 index 000000000..af207ba3c --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterRequest.h @@ -0,0 +1,111 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_CREATECLUSTERREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CREATECLUSTERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT CreateClusterRequest : public RpcServiceRequest { +public: + struct Components { + std::string componentType; + struct ComponentConfig { + ObjectOfAny basicArgs; + ObjectOfAny objectOfAny; + std::vector nodeUnits; + }; + ComponentConfig componentConfig; + }; + struct Networks { + struct NewVpdInfo { + std::string monitorVswitchId; + struct VpdSubnetsItem { + std::string subnetType; + std::string zoneId; + std::string subnetCidr; + }; + VpdSubnetsItem vpdSubnetsItem; + std::vector vpdSubnets; + std::string cloudLinkId; + std::string vpdCidr; + std::string cloudLinkCidr; + std::string cenId; + std::string monitorVpcId; + }; + NewVpdInfo newVpdInfo; + }; + struct NodeGroups { + std::string nodeGroupName; + struct NodesItem { + std::string hostname; + std::string loginPassword; + std::string nodeId; + }; + NodesItem nodesItem; + std::vector nodes; + std::string imageId; + std::string nodeGroupDescription; + std::string zoneId; + std::string machineType; + }; + struct Tag { + std::string value; + std::string key; + }; + CreateClusterRequest(); + ~CreateClusterRequest(); + std::vector getComponents() const; + void setComponents(const std::vector &components); + std::string getClusterName() const; + void setClusterName(const std::string &clusterName); + Networks getNetworks() const; + void setNetworks(const Networks &networks); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getClusterDescription() const; + void setClusterDescription(const std::string &clusterDescription); + std::vector getNodeGroups() const; + void setNodeGroups(const std::vector &nodeGroups); + std::vector getTag() const; + void setTag(const std::vector &tag); + bool getIgnoreFailedNodeTasks() const; + void setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks); + std::string getClusterType() const; + void setClusterType(const std::string &clusterType); + +private: + std::vector components_; + std::string clusterName_; + Networks networks_; + std::string resourceGroupId_; + std::string clusterDescription_; + std::vector nodeGroups_; + std::vector tag_; + bool ignoreFailedNodeTasks_; + std::string clusterType_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CREATECLUSTERREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterResult.h new file mode 100644 index 000000000..feebaee7e --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/CreateClusterResult.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_EFLO_CONTROLLER_MODEL_CREATECLUSTERRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CREATECLUSTERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT CreateClusterResult : public ServiceResult + { + public: + + + CreateClusterResult(); + explicit CreateClusterResult(const std::string &payload); + ~CreateClusterResult(); + std::string getTaskId()const; + std::string getClusterId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + std::string clusterId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_CREATECLUSTERRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterRequest.h new file mode 100644 index 000000000..be9ef20e1 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterRequest.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_EFLO_CONTROLLER_MODEL_DELETECLUSTERREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DELETECLUSTERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DeleteClusterRequest : public RpcServiceRequest { +public: + DeleteClusterRequest(); + ~DeleteClusterRequest(); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + +private: + std::string clusterId_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DELETECLUSTERREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterResult.h new file mode 100644 index 000000000..7d4f994ed --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DeleteClusterResult.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_EFLO_CONTROLLER_MODEL_DELETECLUSTERRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DELETECLUSTERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DeleteClusterResult : public ServiceResult + { + public: + + + DeleteClusterResult(); + explicit DeleteClusterResult(const std::string &payload); + ~DeleteClusterResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DELETECLUSTERRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterRequest.h new file mode 100644 index 000000000..1a6ea744e --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterRequest.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_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeClusterRequest : public RpcServiceRequest { +public: + DescribeClusterRequest(); + ~DescribeClusterRequest(); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + +private: + std::string clusterId_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterResult.h new file mode 100644 index 000000000..69c80ed38 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeClusterResult.h @@ -0,0 +1,84 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeClusterResult : public ServiceResult + { + public: + struct ComponentsItem + { + std::string componentType; + std::string componentId; + }; + struct NetworksItem + { + std::string vpdId; + }; + + + DescribeClusterResult(); + explicit DescribeClusterResult(const std::string &payload); + ~DescribeClusterResult(); + std::vector getNetworks()const; + std::string getTaskId()const; + long getNodeCount()const; + std::string getResourceGroupId()const; + std::string getClusterId()const; + std::string getCreateTime()const; + long getNodeGroupCount()const; + std::string getOperatingState()const; + std::string getClusterType()const; + std::vector getComponents()const; + std::string getUpdateTime()const; + std::string getClusterName()const; + std::string getClusterDescription()const; + + protected: + void parse(const std::string &payload); + private: + std::vector networks_; + std::string taskId_; + long nodeCount_; + std::string resourceGroupId_; + std::string clusterId_; + std::string createTime_; + long nodeGroupCount_; + std::string operatingState_; + std::string clusterType_; + std::vector components_; + std::string updateTime_; + std::string clusterName_; + std::string clusterDescription_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBECLUSTERRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeRequest.h new file mode 100644 index 000000000..c3b87f881 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeRequest.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_EFLO_CONTROLLER_MODEL_DESCRIBENODEREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBENODEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeNodeRequest : public RpcServiceRequest { +public: + DescribeNodeRequest(); + ~DescribeNodeRequest(); + std::string getNodeId() const; + void setNodeId(const std::string &nodeId); + +private: + std::string nodeId_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBENODEREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeResult.h new file mode 100644 index 000000000..7cdae684a --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeNodeResult.h @@ -0,0 +1,84 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_DESCRIBENODERESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBENODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeNodeResult : public ServiceResult + { + public: + struct NetworksItem + { + std::string bondName; + std::string vpdId; + std::string ip; + std::string subnetId; + }; + + + DescribeNodeResult(); + explicit DescribeNodeResult(const std::string &payload); + ~DescribeNodeResult(); + std::vector getNetworks()const; + std::string getNodeGroupName()const; + std::string getZoneId()const; + std::string getClusterId()const; + std::string getCreateTime()const; + std::string getHostname()const; + std::string getMachineType()const; + std::string getOperatingState()const; + std::string getNodeGroupId()const; + std::string getExpiredTime()const; + std::string getImageId()const; + std::string getNodeId()const; + std::string getClusterName()const; + std::string getSn()const; + + protected: + void parse(const std::string &payload); + private: + std::vector networks_; + std::string nodeGroupName_; + std::string zoneId_; + std::string clusterId_; + std::string createTime_; + std::string hostname_; + std::string machineType_; + std::string operatingState_; + std::string nodeGroupId_; + std::string expiredTime_; + std::string imageId_; + std::string nodeId_; + std::string clusterName_; + std::string sn_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBENODERESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..02155d549 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/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_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeRegionsRequest : public RpcServiceRequest { +public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + std::string getAcceptLanguage() const; + void setAcceptLanguage(const std::string &acceptLanguage); + +private: + std::string acceptLanguage_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsResult.h new file mode 100644 index 000000000..967e16fac --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeRegionsResult.h @@ -0,0 +1,56 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct RegionsItem + { + std::string regionId; + std::string localName; + }; + + + DescribeRegionsResult(); + explicit DescribeRegionsResult(const std::string &payload); + ~DescribeRegionsResult(); + std::vector getRegions()const; + + protected: + void parse(const std::string &payload); + private: + std::vector regions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskRequest.h new file mode 100644 index 000000000..9951c9865 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskRequest.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_EFLO_CONTROLLER_MODEL_DESCRIBETASKREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBETASKREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeTaskRequest : public RpcServiceRequest { +public: + DescribeTaskRequest(); + ~DescribeTaskRequest(); + std::string getTaskId() const; + void setTaskId(const std::string &taskId); + +private: + std::string taskId_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBETASKREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskResult.h new file mode 100644 index 000000000..782231a07 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeTaskResult.h @@ -0,0 +1,85 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBETASKRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBETASKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeTaskResult : public ServiceResult + { + public: + struct StepsItem + { + struct SubTasksItem + { + std::string taskId; + std::string message; + std::string taskType; + std::string createTime; + std::string updateTime; + std::string taskState; + }; + std::string stepState; + std::string message; + std::string stepType; + std::string startTime; + std::string updateTime; + std::string stageTag; + std::string stepName; + std::vector subTasks; + }; + + + DescribeTaskResult(); + explicit DescribeTaskResult(const std::string &payload); + ~DescribeTaskResult(); + std::vector getSteps()const; + std::string getMessage()const; + std::string getClusterId()const; + std::string getTaskType()const; + std::string getCreateTime()const; + std::string getUpdateTime()const; + std::string getClusterName()const; + std::string getTaskState()const; + + protected: + void parse(const std::string &payload); + private: + std::vector steps_; + std::string message_; + std::string clusterId_; + std::string taskType_; + std::string createTime_; + std::string updateTime_; + std::string clusterName_; + std::string taskState_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBETASKRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesRequest.h new file mode 100644 index 000000000..f6d093755 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesRequest.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_EFLO_CONTROLLER_MODEL_DESCRIBEZONESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEZONESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeZonesRequest : public RpcServiceRequest { +public: + DescribeZonesRequest(); + ~DescribeZonesRequest(); + std::string getAcceptLanguage() const; + void setAcceptLanguage(const std::string &acceptLanguage); + +private: + std::string acceptLanguage_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEZONESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesResult.h new file mode 100644 index 000000000..318242a37 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/DescribeZonesResult.h @@ -0,0 +1,56 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_DESCRIBEZONESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEZONESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT DescribeZonesResult : public ServiceResult + { + public: + struct ZonesItem + { + std::string zoneId; + std::string localName; + }; + + + DescribeZonesResult(); + explicit DescribeZonesResult(const std::string &payload); + ~DescribeZonesResult(); + std::vector getZones()const; + + protected: + void parse(const std::string &payload); + private: + std::vector zones_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_DESCRIBEZONESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterRequest.h new file mode 100644 index 000000000..cdbdbc5f3 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterRequest.h @@ -0,0 +1,58 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ExtendClusterRequest : public RpcServiceRequest { +public: + struct NodeGroups { + struct NodesItem { + std::string hostname; + std::string loginPassword; + std::string nodeId; + }; + NodesItem nodesItem; + std::vector nodes; + std::string nodeGroupId; + }; + ExtendClusterRequest(); + ~ExtendClusterRequest(); + bool getIgnoreFailedNodeTasks() const; + void setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + std::vector getNodeGroups() const; + void setNodeGroups(const std::vector &nodeGroups); + +private: + bool ignoreFailedNodeTasks_; + std::string clusterId_; + std::vector nodeGroups_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterResult.h new file mode 100644 index 000000000..10cf80b33 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ExtendClusterResult.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_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ExtendClusterResult : public ServiceResult + { + public: + + + ExtendClusterResult(); + explicit ExtendClusterResult(const std::string &payload); + ~ExtendClusterResult(); + std::string getTaskId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_EXTENDCLUSTERRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesRequest.h new file mode 100644 index 000000000..482fa8b83 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesRequest.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_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListClusterNodesRequest : public RpcServiceRequest { +public: + ListClusterNodesRequest(); + ~ListClusterNodesRequest(); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + std::string getNodeGroupId() const; + void setNodeGroupId(const std::string &nodeGroupId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + long getMaxResults() const; + void setMaxResults(long maxResults); + +private: + std::string clusterId_; + std::string nodeGroupId_; + std::string nextToken_; + long maxResults_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesResult.h new file mode 100644 index 000000000..de30a0f8c --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClusterNodesResult.h @@ -0,0 +1,75 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListClusterNodesResult : public ServiceResult + { + public: + struct NodesItem + { + struct NetworksItem + { + std::string bondName; + std::string vpdId; + std::string ip; + std::string subnetId; + }; + std::vector networks; + std::string nodeGroupName; + std::string zoneId; + std::string nodeGroupId; + std::string createTime; + std::string expiredTime; + std::string hostname; + std::string imageId; + std::string machineType; + std::string nodeId; + std::string operatingState; + std::string sn; + }; + + + ListClusterNodesResult(); + explicit ListClusterNodesResult(const std::string &payload); + ~ListClusterNodesResult(); + std::string getNextToken()const; + std::vector getNodes()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector nodes_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERNODESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersRequest.h new file mode 100644 index 000000000..178270f9a --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersRequest.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_EFLO_CONTROLLER_MODEL_LISTCLUSTERSREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListClustersRequest : public RpcServiceRequest { +public: + ListClustersRequest(); + ~ListClustersRequest(); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + long getMaxResults() const; + void setMaxResults(long maxResults); + +private: + std::string resourceGroupId_; + std::string nextToken_; + long maxResults_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERSREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersResult.h new file mode 100644 index 000000000..552655848 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListClustersResult.h @@ -0,0 +1,68 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_LISTCLUSTERSRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListClustersResult : public ServiceResult + { + public: + struct ClustersItem + { + ObjectOfAny components; + std::string taskId; + long nodeCount; + std::string resourceGroupId; + std::string clusterId; + std::string createTime; + std::string updateTime; + std::string clusterName; + long nodeGroupCount; + std::string operatingState; + std::string clusterType; + std::string clusterDescription; + }; + + + ListClustersResult(); + explicit ListClustersResult(const std::string &payload); + ~ListClustersResult(); + std::string getNextToken()const; + std::vector getClusters()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector clusters_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTCLUSTERSRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesRequest.h new file mode 100644 index 000000000..db4aa42e1 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesRequest.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_EFLO_CONTROLLER_MODEL_LISTFREENODESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTFREENODESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListFreeNodesRequest : public RpcServiceRequest { +public: + ListFreeNodesRequest(); + ~ListFreeNodesRequest(); + std::string getMachineType() const; + void setMachineType(const std::string &machineType); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + long getMaxResults() const; + void setMaxResults(long maxResults); + +private: + std::string machineType_; + std::string nextToken_; + long maxResults_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTFREENODESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesResult.h new file mode 100644 index 000000000..11bdacb3a --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListFreeNodesResult.h @@ -0,0 +1,62 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_LISTFREENODESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTFREENODESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListFreeNodesResult : public ServiceResult + { + public: + struct NodesItem + { + std::string zoneId; + std::string createTime; + std::string expiredTime; + std::string nodeId; + std::string machineType; + std::string sn; + }; + + + ListFreeNodesResult(); + explicit ListFreeNodesResult(const std::string &payload); + ~ListFreeNodesResult(); + std::string getNextToken()const; + std::vector getNodes()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector nodes_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTFREENODESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesRequest.h new file mode 100644 index 000000000..c1b491d5e --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesRequest.h @@ -0,0 +1,61 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListTagResourcesRequest : public RpcServiceRequest { +public: + struct Tag { + std::string value; + std::string key; + }; + ListTagResourcesRequest(); + ~ListTagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getService() const; + void setService(const std::string &service); + +private: + std::string regionId_; + std::string nextToken_; + std::vector tag_; + std::vector resourceId_; + std::string resourceType_; + std::string service_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesResult.h new file mode 100644 index 000000000..9c4f807d5 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ListTagResourcesResult.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_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ListTagResourcesResult : public ServiceResult + { + public: + struct TagResource + { + std::string resourceId; + std::string tagKey; + std::string resourceType; + std::string tagValue; + }; + + + ListTagResourcesResult(); + explicit ListTagResourcesResult(const std::string &payload); + ~ListTagResourcesResult(); + std::string getNextToken()const; + std::vector getTagResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector tagResources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_LISTTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesRequest.h new file mode 100644 index 000000000..a3f4b1ddc --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesRequest.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_EFLO_CONTROLLER_MODEL_REBOOTNODESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REBOOTNODESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT RebootNodesRequest : public RpcServiceRequest { +public: + RebootNodesRequest(); + ~RebootNodesRequest(); + bool getIgnoreFailedNodeTasks() const; + void setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + std::vector getNodes() const; + void setNodes(const std::vector &nodes); + +private: + bool ignoreFailedNodeTasks_; + std::string clusterId_; + std::vector nodes_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REBOOTNODESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesResult.h new file mode 100644 index 000000000..ab9fe3bc4 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/RebootNodesResult.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_EFLO_CONTROLLER_MODEL_REBOOTNODESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REBOOTNODESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT RebootNodesResult : public ServiceResult + { + public: + + + RebootNodesResult(); + explicit RebootNodesResult(const std::string &payload); + ~RebootNodesResult(); + std::string getTaskId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REBOOTNODESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesRequest.h new file mode 100644 index 000000000..7a67a4b88 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REIMAGENODESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REIMAGENODESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ReimageNodesRequest : public RpcServiceRequest { +public: + struct Nodes { + std::string hostname; + std::string imageId; + std::string loginPassword; + std::string nodeId; + }; + ReimageNodesRequest(); + ~ReimageNodesRequest(); + bool getIgnoreFailedNodeTasks() const; + void setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + std::vector getNodes() const; + void setNodes(const std::vector &nodes); + +private: + bool ignoreFailedNodeTasks_; + std::string clusterId_; + std::vector nodes_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REIMAGENODESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesResult.h new file mode 100644 index 000000000..9381ff456 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ReimageNodesResult.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_EFLO_CONTROLLER_MODEL_REIMAGENODESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REIMAGENODESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ReimageNodesResult : public ServiceResult + { + public: + + + ReimageNodesResult(); + explicit ReimageNodesResult(const std::string &payload); + ~ReimageNodesResult(); + std::string getTaskId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_REIMAGENODESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterRequest.h new file mode 100644 index 000000000..c73ff541c --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterRequest.h @@ -0,0 +1,56 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ShrinkClusterRequest : public RpcServiceRequest { +public: + struct NodeGroups { + struct NodesItem { + std::string nodeId; + }; + NodesItem nodesItem; + std::vector nodes; + std::string nodeGroupId; + }; + ShrinkClusterRequest(); + ~ShrinkClusterRequest(); + bool getIgnoreFailedNodeTasks() const; + void setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks); + std::string getClusterId() const; + void setClusterId(const std::string &clusterId); + std::vector getNodeGroups() const; + void setNodeGroups(const std::vector &nodeGroups); + +private: + bool ignoreFailedNodeTasks_; + std::string clusterId_; + std::vector nodeGroups_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterResult.h new file mode 100644 index 000000000..31557449c --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/ShrinkClusterResult.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_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT ShrinkClusterResult : public ServiceResult + { + public: + + + ShrinkClusterResult(); + explicit ShrinkClusterResult(const std::string &payload); + ~ShrinkClusterResult(); + std::string getTaskId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_SHRINKCLUSTERRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesRequest.h new file mode 100644 index 000000000..c65d794a9 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesRequest.h @@ -0,0 +1,58 @@ +/* + * 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_EFLO_CONTROLLER_MODEL_TAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_TAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT TagResourcesRequest : public RpcServiceRequest { +public: + struct Tag { + std::string value; + std::string key; + }; + TagResourcesRequest(); + ~TagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getService() const; + void setService(const std::string &service); + +private: + std::string regionId_; + std::vector tag_; + std::vector resourceId_; + std::string resourceType_; + std::string service_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_TAGRESOURCESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesResult.h new file mode 100644 index 000000000..9921e8f8b --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/TagResourcesResult.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_EFLO_CONTROLLER_MODEL_TAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_TAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT TagResourcesResult : public ServiceResult + { + public: + + + TagResourcesResult(); + explicit TagResourcesResult(const std::string &payload); + ~TagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_TAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesRequest.h b/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesRequest.h new file mode 100644 index 000000000..e99516f8a --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesRequest.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_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eflo_controller { +namespace Model { +class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT UntagResourcesRequest : public RpcServiceRequest { +public: + UntagResourcesRequest(); + ~UntagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + bool getAll() const; + void setAll(bool all); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getService() const; + void setService(const std::string &service); + std::vector getTagKey() const; + void setTagKey(const std::vector &tagKey); + +private: + std::string regionId_; + bool all_; + std::vector resourceId_; + std::string resourceType_; + std::string service_; + std::vector tagKey_; +}; +} // namespace Model +} // namespace Eflo_controller +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESREQUEST_H_ diff --git a/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesResult.h b/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesResult.h new file mode 100644 index 000000000..6cf191a61 --- /dev/null +++ b/eflo-controller/include/alibabacloud/eflo-controller/model/UntagResourcesResult.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_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eflo_controller + { + namespace Model + { + class ALIBABACLOUD_EFLO_CONTROLLER_EXPORT UntagResourcesResult : public ServiceResult + { + public: + + + UntagResourcesResult(); + explicit UntagResourcesResult(const std::string &payload); + ~UntagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EFLO_CONTROLLER_MODEL_UNTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/eflo-controller/src/Eflo-controllerClient.cc b/eflo-controller/src/Eflo-controllerClient.cc new file mode 100644 index 000000000..aed3d1870 --- /dev/null +++ b/eflo-controller/src/Eflo-controllerClient.cc @@ -0,0 +1,701 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +namespace +{ + const std::string SERVICE_NAME = "eflo-controller"; +} + +Eflo_controllerClient::Eflo_controllerClient(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, ""); +} + +Eflo_controllerClient::Eflo_controllerClient(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, ""); +} + +Eflo_controllerClient::Eflo_controllerClient(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, ""); +} + +Eflo_controllerClient::~Eflo_controllerClient() +{} + +Eflo_controllerClient::ChangeResourceGroupOutcome Eflo_controllerClient::changeResourceGroup(const ChangeResourceGroupRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ChangeResourceGroupOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ChangeResourceGroupOutcome(ChangeResourceGroupResult(outcome.result())); + else + return ChangeResourceGroupOutcome(outcome.error()); +} + +void Eflo_controllerClient::changeResourceGroupAsync(const ChangeResourceGroupRequest& request, const ChangeResourceGroupAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, changeResourceGroup(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ChangeResourceGroupOutcomeCallable Eflo_controllerClient::changeResourceGroupCallable(const ChangeResourceGroupRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->changeResourceGroup(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::CreateClusterOutcome Eflo_controllerClient::createCluster(const CreateClusterRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateClusterOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateClusterOutcome(CreateClusterResult(outcome.result())); + else + return CreateClusterOutcome(outcome.error()); +} + +void Eflo_controllerClient::createClusterAsync(const CreateClusterRequest& request, const CreateClusterAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createCluster(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::CreateClusterOutcomeCallable Eflo_controllerClient::createClusterCallable(const CreateClusterRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createCluster(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::DeleteClusterOutcome Eflo_controllerClient::deleteCluster(const DeleteClusterRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteClusterOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteClusterOutcome(DeleteClusterResult(outcome.result())); + else + return DeleteClusterOutcome(outcome.error()); +} + +void Eflo_controllerClient::deleteClusterAsync(const DeleteClusterRequest& request, const DeleteClusterAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteCluster(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::DeleteClusterOutcomeCallable Eflo_controllerClient::deleteClusterCallable(const DeleteClusterRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteCluster(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::DescribeClusterOutcome Eflo_controllerClient::describeCluster(const DescribeClusterRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeClusterOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeClusterOutcome(DescribeClusterResult(outcome.result())); + else + return DescribeClusterOutcome(outcome.error()); +} + +void Eflo_controllerClient::describeClusterAsync(const DescribeClusterRequest& request, const DescribeClusterAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeCluster(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::DescribeClusterOutcomeCallable Eflo_controllerClient::describeClusterCallable(const DescribeClusterRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeCluster(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::DescribeNodeOutcome Eflo_controllerClient::describeNode(const DescribeNodeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeNodeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeNodeOutcome(DescribeNodeResult(outcome.result())); + else + return DescribeNodeOutcome(outcome.error()); +} + +void Eflo_controllerClient::describeNodeAsync(const DescribeNodeRequest& request, const DescribeNodeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeNode(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::DescribeNodeOutcomeCallable Eflo_controllerClient::describeNodeCallable(const DescribeNodeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeNode(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::DescribeRegionsOutcome Eflo_controllerClient::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 Eflo_controllerClient::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)); +} + +Eflo_controllerClient::DescribeRegionsOutcomeCallable Eflo_controllerClient::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(); +} + +Eflo_controllerClient::DescribeTaskOutcome Eflo_controllerClient::describeTask(const DescribeTaskRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeTaskOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeTaskOutcome(DescribeTaskResult(outcome.result())); + else + return DescribeTaskOutcome(outcome.error()); +} + +void Eflo_controllerClient::describeTaskAsync(const DescribeTaskRequest& request, const DescribeTaskAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeTask(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::DescribeTaskOutcomeCallable Eflo_controllerClient::describeTaskCallable(const DescribeTaskRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeTask(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::DescribeZonesOutcome Eflo_controllerClient::describeZones(const DescribeZonesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeZonesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeZonesOutcome(DescribeZonesResult(outcome.result())); + else + return DescribeZonesOutcome(outcome.error()); +} + +void Eflo_controllerClient::describeZonesAsync(const DescribeZonesRequest& request, const DescribeZonesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeZones(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::DescribeZonesOutcomeCallable Eflo_controllerClient::describeZonesCallable(const DescribeZonesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeZones(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ExtendClusterOutcome Eflo_controllerClient::extendCluster(const ExtendClusterRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ExtendClusterOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ExtendClusterOutcome(ExtendClusterResult(outcome.result())); + else + return ExtendClusterOutcome(outcome.error()); +} + +void Eflo_controllerClient::extendClusterAsync(const ExtendClusterRequest& request, const ExtendClusterAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, extendCluster(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ExtendClusterOutcomeCallable Eflo_controllerClient::extendClusterCallable(const ExtendClusterRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->extendCluster(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ListClusterNodesOutcome Eflo_controllerClient::listClusterNodes(const ListClusterNodesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListClusterNodesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListClusterNodesOutcome(ListClusterNodesResult(outcome.result())); + else + return ListClusterNodesOutcome(outcome.error()); +} + +void Eflo_controllerClient::listClusterNodesAsync(const ListClusterNodesRequest& request, const ListClusterNodesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listClusterNodes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ListClusterNodesOutcomeCallable Eflo_controllerClient::listClusterNodesCallable(const ListClusterNodesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listClusterNodes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ListClustersOutcome Eflo_controllerClient::listClusters(const ListClustersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListClustersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListClustersOutcome(ListClustersResult(outcome.result())); + else + return ListClustersOutcome(outcome.error()); +} + +void Eflo_controllerClient::listClustersAsync(const ListClustersRequest& request, const ListClustersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listClusters(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ListClustersOutcomeCallable Eflo_controllerClient::listClustersCallable(const ListClustersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listClusters(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ListFreeNodesOutcome Eflo_controllerClient::listFreeNodes(const ListFreeNodesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListFreeNodesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListFreeNodesOutcome(ListFreeNodesResult(outcome.result())); + else + return ListFreeNodesOutcome(outcome.error()); +} + +void Eflo_controllerClient::listFreeNodesAsync(const ListFreeNodesRequest& request, const ListFreeNodesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listFreeNodes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ListFreeNodesOutcomeCallable Eflo_controllerClient::listFreeNodesCallable(const ListFreeNodesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listFreeNodes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ListTagResourcesOutcome Eflo_controllerClient::listTagResources(const ListTagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result())); + else + return ListTagResourcesOutcome(outcome.error()); +} + +void Eflo_controllerClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ListTagResourcesOutcomeCallable Eflo_controllerClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::RebootNodesOutcome Eflo_controllerClient::rebootNodes(const RebootNodesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RebootNodesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RebootNodesOutcome(RebootNodesResult(outcome.result())); + else + return RebootNodesOutcome(outcome.error()); +} + +void Eflo_controllerClient::rebootNodesAsync(const RebootNodesRequest& request, const RebootNodesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, rebootNodes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::RebootNodesOutcomeCallable Eflo_controllerClient::rebootNodesCallable(const RebootNodesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->rebootNodes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ReimageNodesOutcome Eflo_controllerClient::reimageNodes(const ReimageNodesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ReimageNodesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ReimageNodesOutcome(ReimageNodesResult(outcome.result())); + else + return ReimageNodesOutcome(outcome.error()); +} + +void Eflo_controllerClient::reimageNodesAsync(const ReimageNodesRequest& request, const ReimageNodesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, reimageNodes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ReimageNodesOutcomeCallable Eflo_controllerClient::reimageNodesCallable(const ReimageNodesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->reimageNodes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::ShrinkClusterOutcome Eflo_controllerClient::shrinkCluster(const ShrinkClusterRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ShrinkClusterOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ShrinkClusterOutcome(ShrinkClusterResult(outcome.result())); + else + return ShrinkClusterOutcome(outcome.error()); +} + +void Eflo_controllerClient::shrinkClusterAsync(const ShrinkClusterRequest& request, const ShrinkClusterAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, shrinkCluster(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::ShrinkClusterOutcomeCallable Eflo_controllerClient::shrinkClusterCallable(const ShrinkClusterRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->shrinkCluster(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::TagResourcesOutcome Eflo_controllerClient::tagResources(const TagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TagResourcesOutcome(TagResourcesResult(outcome.result())); + else + return TagResourcesOutcome(outcome.error()); +} + +void Eflo_controllerClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, tagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::TagResourcesOutcomeCallable Eflo_controllerClient::tagResourcesCallable(const TagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->tagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Eflo_controllerClient::UntagResourcesOutcome Eflo_controllerClient::untagResources(const UntagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UntagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UntagResourcesOutcome(UntagResourcesResult(outcome.result())); + else + return UntagResourcesOutcome(outcome.error()); +} + +void Eflo_controllerClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, untagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Eflo_controllerClient::UntagResourcesOutcomeCallable Eflo_controllerClient::untagResourcesCallable(const UntagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->untagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/eflo-controller/src/model/ChangeResourceGroupRequest.cc b/eflo-controller/src/model/ChangeResourceGroupRequest.cc new file mode 100644 index 000000000..31955d88b --- /dev/null +++ b/eflo-controller/src/model/ChangeResourceGroupRequest.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 + +using AlibabaCloud::Eflo_controller::Model::ChangeResourceGroupRequest; + +ChangeResourceGroupRequest::ChangeResourceGroupRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ChangeResourceGroup") { + setMethod(HttpRequest::Method::Post); +} + +ChangeResourceGroupRequest::~ChangeResourceGroupRequest() {} + +std::string ChangeResourceGroupRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ChangeResourceGroupRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string ChangeResourceGroupRequest::getResourceRegionId() const { + return resourceRegionId_; +} + +void ChangeResourceGroupRequest::setResourceRegionId(const std::string &resourceRegionId) { + resourceRegionId_ = resourceRegionId; + setParameter(std::string("ResourceRegionId"), resourceRegionId); +} + +std::string ChangeResourceGroupRequest::getResourceId() const { + return resourceId_; +} + +void ChangeResourceGroupRequest::setResourceId(const std::string &resourceId) { + resourceId_ = resourceId; + setParameter(std::string("ResourceId"), resourceId); +} + +std::string ChangeResourceGroupRequest::getResourceType() const { + return resourceType_; +} + +void ChangeResourceGroupRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ChangeResourceGroupRequest::getService() const { + return service_; +} + +void ChangeResourceGroupRequest::setService(const std::string &service) { + service_ = service; + setParameter(std::string("Service"), service); +} + diff --git a/eflo-controller/src/model/ChangeResourceGroupResult.cc b/eflo-controller/src/model/ChangeResourceGroupResult.cc new file mode 100644 index 000000000..cef34bed5 --- /dev/null +++ b/eflo-controller/src/model/ChangeResourceGroupResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ChangeResourceGroupResult::ChangeResourceGroupResult() : + ServiceResult() +{} + +ChangeResourceGroupResult::ChangeResourceGroupResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ChangeResourceGroupResult::~ChangeResourceGroupResult() +{} + +void ChangeResourceGroupResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/eflo-controller/src/model/CreateClusterRequest.cc b/eflo-controller/src/model/CreateClusterRequest.cc new file mode 100644 index 000000000..9edbe4f89 --- /dev/null +++ b/eflo-controller/src/model/CreateClusterRequest.cc @@ -0,0 +1,140 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Eflo_controller::Model::CreateClusterRequest; + +CreateClusterRequest::CreateClusterRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "CreateCluster") { + setMethod(HttpRequest::Method::Post); +} + +CreateClusterRequest::~CreateClusterRequest() {} + +std::vector CreateClusterRequest::getComponents() const { + return components_; +} + +void CreateClusterRequest::setComponents(const std::vector &components) { + components_ = components; + for(int dep1 = 0; dep1 != components.size(); dep1++) { + setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ComponentType", components[dep1].componentType); + setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ComponentConfig.BasicArgs", std::to_string(components[dep1].componentConfig.basicArgs)); + for(int dep2 = 0; dep2 != components[dep1].componentConfig.nodeUnits.size(); dep2++) { + setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ComponentConfig.NodeUnits." + std::to_string(dep2 + 1), std::to_string(components[dep1].componentConfig.nodeUnits[dep2])); + } + } +} + +std::string CreateClusterRequest::getClusterName() const { + return clusterName_; +} + +void CreateClusterRequest::setClusterName(const std::string &clusterName) { + clusterName_ = clusterName; + setBodyParameter(std::string("ClusterName"), clusterName); +} + +CreateClusterRequest::Networks CreateClusterRequest::getNetworks() const { + return networks_; +} + +void CreateClusterRequest::setNetworks(const CreateClusterRequest::Networks &networks) { + networks_ = networks; + setBodyParameter(std::string("Networks") + ".NewVpdInfo.MonitorVswitchId", networks.newVpdInfo.monitorVswitchId); + for(int dep1 = 0; dep1 != networks.newVpdInfo.vpdSubnets.size(); dep1++) { + setBodyParameter(std::string("Networks") + ".NewVpdInfo.VpdSubnets." + std::to_string(dep1 + 1) + ".SubnetType", networks.newVpdInfo.vpdSubnets[dep1].subnetType); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.VpdSubnets." + std::to_string(dep1 + 1) + ".ZoneId", networks.newVpdInfo.vpdSubnets[dep1].zoneId); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.VpdSubnets." + std::to_string(dep1 + 1) + ".SubnetCidr", networks.newVpdInfo.vpdSubnets[dep1].subnetCidr); + } + setBodyParameter(std::string("Networks") + ".NewVpdInfo.CloudLinkId", networks.newVpdInfo.cloudLinkId); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.VpdCidr", networks.newVpdInfo.vpdCidr); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.CloudLinkCidr", networks.newVpdInfo.cloudLinkCidr); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.CenId", networks.newVpdInfo.cenId); + setBodyParameter(std::string("Networks") + ".NewVpdInfo.MonitorVpcId", networks.newVpdInfo.monitorVpcId); +} + +std::string CreateClusterRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateClusterRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setBodyParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string CreateClusterRequest::getClusterDescription() const { + return clusterDescription_; +} + +void CreateClusterRequest::setClusterDescription(const std::string &clusterDescription) { + clusterDescription_ = clusterDescription; + setBodyParameter(std::string("ClusterDescription"), clusterDescription); +} + +std::vector CreateClusterRequest::getNodeGroups() const { + return nodeGroups_; +} + +void CreateClusterRequest::setNodeGroups(const std::vector &nodeGroups) { + nodeGroups_ = nodeGroups; + for(int dep1 = 0; dep1 != nodeGroups.size(); dep1++) { + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".NodeGroupName", nodeGroups[dep1].nodeGroupName); + for(int dep2 = 0; dep2 != nodeGroups[dep1].nodes.size(); dep2++) { + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".Hostname", nodeGroups[dep1].nodes[dep2].hostname); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".LoginPassword", nodeGroups[dep1].nodes[dep2].loginPassword); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".NodeId", nodeGroups[dep1].nodes[dep2].nodeId); + } + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".ImageId", nodeGroups[dep1].imageId); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".NodeGroupDescription", nodeGroups[dep1].nodeGroupDescription); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".ZoneId", nodeGroups[dep1].zoneId); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".MachineType", nodeGroups[dep1].machineType); + } +} + +std::vector CreateClusterRequest::getTag() const { + return tag_; +} + +void CreateClusterRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +bool CreateClusterRequest::getIgnoreFailedNodeTasks() const { + return ignoreFailedNodeTasks_; +} + +void CreateClusterRequest::setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks) { + ignoreFailedNodeTasks_ = ignoreFailedNodeTasks; + setBodyParameter(std::string("IgnoreFailedNodeTasks"), ignoreFailedNodeTasks ? "true" : "false"); +} + +std::string CreateClusterRequest::getClusterType() const { + return clusterType_; +} + +void CreateClusterRequest::setClusterType(const std::string &clusterType) { + clusterType_ = clusterType; + setBodyParameter(std::string("ClusterType"), clusterType); +} + diff --git a/eflo-controller/src/model/CreateClusterResult.cc b/eflo-controller/src/model/CreateClusterResult.cc new file mode 100644 index 000000000..11a91f832 --- /dev/null +++ b/eflo-controller/src/model/CreateClusterResult.cc @@ -0,0 +1,58 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +CreateClusterResult::CreateClusterResult() : + ServiceResult() +{} + +CreateClusterResult::CreateClusterResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateClusterResult::~CreateClusterResult() +{} + +void CreateClusterResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ClusterId"].isNull()) + clusterId_ = value["ClusterId"].asString(); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string CreateClusterResult::getTaskId()const +{ + return taskId_; +} + +std::string CreateClusterResult::getClusterId()const +{ + return clusterId_; +} + diff --git a/eflo-controller/src/model/DeleteClusterRequest.cc b/eflo-controller/src/model/DeleteClusterRequest.cc new file mode 100644 index 000000000..0892e22f1 --- /dev/null +++ b/eflo-controller/src/model/DeleteClusterRequest.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::Eflo_controller::Model::DeleteClusterRequest; + +DeleteClusterRequest::DeleteClusterRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DeleteCluster") { + setMethod(HttpRequest::Method::Post); +} + +DeleteClusterRequest::~DeleteClusterRequest() {} + +std::string DeleteClusterRequest::getClusterId() const { + return clusterId_; +} + +void DeleteClusterRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + diff --git a/eflo-controller/src/model/DeleteClusterResult.cc b/eflo-controller/src/model/DeleteClusterResult.cc new file mode 100644 index 000000000..1e2c81816 --- /dev/null +++ b/eflo-controller/src/model/DeleteClusterResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +DeleteClusterResult::DeleteClusterResult() : + ServiceResult() +{} + +DeleteClusterResult::DeleteClusterResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteClusterResult::~DeleteClusterResult() +{} + +void DeleteClusterResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/eflo-controller/src/model/DescribeClusterRequest.cc b/eflo-controller/src/model/DescribeClusterRequest.cc new file mode 100644 index 000000000..3be2fe80f --- /dev/null +++ b/eflo-controller/src/model/DescribeClusterRequest.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::Eflo_controller::Model::DescribeClusterRequest; + +DescribeClusterRequest::DescribeClusterRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DescribeCluster") { + setMethod(HttpRequest::Method::Post); +} + +DescribeClusterRequest::~DescribeClusterRequest() {} + +std::string DescribeClusterRequest::getClusterId() const { + return clusterId_; +} + +void DescribeClusterRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + diff --git a/eflo-controller/src/model/DescribeClusterResult.cc b/eflo-controller/src/model/DescribeClusterResult.cc new file mode 100644 index 000000000..c86523390 --- /dev/null +++ b/eflo-controller/src/model/DescribeClusterResult.cc @@ -0,0 +1,149 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +DescribeClusterResult::DescribeClusterResult() : + ServiceResult() +{} + +DescribeClusterResult::DescribeClusterResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeClusterResult::~DescribeClusterResult() +{} + +void DescribeClusterResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allComponentsNode = value["Components"]["ComponentsItem"]; + for (auto valueComponentsComponentsItem : allComponentsNode) + { + ComponentsItem componentsObject; + if(!valueComponentsComponentsItem["ComponentType"].isNull()) + componentsObject.componentType = valueComponentsComponentsItem["ComponentType"].asString(); + if(!valueComponentsComponentsItem["ComponentId"].isNull()) + componentsObject.componentId = valueComponentsComponentsItem["ComponentId"].asString(); + components_.push_back(componentsObject); + } + auto allNetworksNode = value["Networks"]["NetworksItem"]; + for (auto valueNetworksNetworksItem : allNetworksNode) + { + NetworksItem networksObject; + if(!valueNetworksNetworksItem["VpdId"].isNull()) + networksObject.vpdId = valueNetworksNetworksItem["VpdId"].asString(); + networks_.push_back(networksObject); + } + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["NodeCount"].isNull()) + nodeCount_ = std::stol(value["NodeCount"].asString()); + if(!value["NodeGroupCount"].isNull()) + nodeGroupCount_ = std::stol(value["NodeGroupCount"].asString()); + if(!value["UpdateTime"].isNull()) + updateTime_ = value["UpdateTime"].asString(); + if(!value["ClusterDescription"].isNull()) + clusterDescription_ = value["ClusterDescription"].asString(); + if(!value["OperatingState"].isNull()) + operatingState_ = value["OperatingState"].asString(); + if(!value["ClusterId"].isNull()) + clusterId_ = value["ClusterId"].asString(); + if(!value["ClusterName"].isNull()) + clusterName_ = value["ClusterName"].asString(); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + if(!value["ClusterType"].isNull()) + clusterType_ = value["ClusterType"].asString(); + if(!value["ResourceGroupId"].isNull()) + resourceGroupId_ = value["ResourceGroupId"].asString(); + +} + +std::vector DescribeClusterResult::getNetworks()const +{ + return networks_; +} + +std::string DescribeClusterResult::getTaskId()const +{ + return taskId_; +} + +long DescribeClusterResult::getNodeCount()const +{ + return nodeCount_; +} + +std::string DescribeClusterResult::getResourceGroupId()const +{ + return resourceGroupId_; +} + +std::string DescribeClusterResult::getClusterId()const +{ + return clusterId_; +} + +std::string DescribeClusterResult::getCreateTime()const +{ + return createTime_; +} + +long DescribeClusterResult::getNodeGroupCount()const +{ + return nodeGroupCount_; +} + +std::string DescribeClusterResult::getOperatingState()const +{ + return operatingState_; +} + +std::string DescribeClusterResult::getClusterType()const +{ + return clusterType_; +} + +std::vector DescribeClusterResult::getComponents()const +{ + return components_; +} + +std::string DescribeClusterResult::getUpdateTime()const +{ + return updateTime_; +} + +std::string DescribeClusterResult::getClusterName()const +{ + return clusterName_; +} + +std::string DescribeClusterResult::getClusterDescription()const +{ + return clusterDescription_; +} + diff --git a/eflo-controller/src/model/DescribeNodeRequest.cc b/eflo-controller/src/model/DescribeNodeRequest.cc new file mode 100644 index 000000000..acc5cf02a --- /dev/null +++ b/eflo-controller/src/model/DescribeNodeRequest.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::Eflo_controller::Model::DescribeNodeRequest; + +DescribeNodeRequest::DescribeNodeRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DescribeNode") { + setMethod(HttpRequest::Method::Post); +} + +DescribeNodeRequest::~DescribeNodeRequest() {} + +std::string DescribeNodeRequest::getNodeId() const { + return nodeId_; +} + +void DescribeNodeRequest::setNodeId(const std::string &nodeId) { + nodeId_ = nodeId; + setBodyParameter(std::string("NodeId"), nodeId); +} + diff --git a/eflo-controller/src/model/DescribeNodeResult.cc b/eflo-controller/src/model/DescribeNodeResult.cc new file mode 100644 index 000000000..c8ac1bf8d --- /dev/null +++ b/eflo-controller/src/model/DescribeNodeResult.cc @@ -0,0 +1,154 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +DescribeNodeResult::DescribeNodeResult() : + ServiceResult() +{} + +DescribeNodeResult::DescribeNodeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeNodeResult::~DescribeNodeResult() +{} + +void DescribeNodeResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allNetworksNode = value["Networks"]["NetworksItem"]; + for (auto valueNetworksNetworksItem : allNetworksNode) + { + NetworksItem networksObject; + if(!valueNetworksNetworksItem["BondName"].isNull()) + networksObject.bondName = valueNetworksNetworksItem["BondName"].asString(); + if(!valueNetworksNetworksItem["Ip"].isNull()) + networksObject.ip = valueNetworksNetworksItem["Ip"].asString(); + if(!valueNetworksNetworksItem["SubnetId"].isNull()) + networksObject.subnetId = valueNetworksNetworksItem["SubnetId"].asString(); + if(!valueNetworksNetworksItem["VpdId"].isNull()) + networksObject.vpdId = valueNetworksNetworksItem["VpdId"].asString(); + networks_.push_back(networksObject); + } + if(!value["NodeGroupName"].isNull()) + nodeGroupName_ = value["NodeGroupName"].asString(); + if(!value["ClusterId"].isNull()) + clusterId_ = value["ClusterId"].asString(); + if(!value["ClusterName"].isNull()) + clusterName_ = value["ClusterName"].asString(); + if(!value["ZoneId"].isNull()) + zoneId_ = value["ZoneId"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["NodeGroupId"].isNull()) + nodeGroupId_ = value["NodeGroupId"].asString(); + if(!value["Hostname"].isNull()) + hostname_ = value["Hostname"].asString(); + if(!value["ImageId"].isNull()) + imageId_ = value["ImageId"].asString(); + if(!value["MachineType"].isNull()) + machineType_ = value["MachineType"].asString(); + if(!value["NodeId"].isNull()) + nodeId_ = value["NodeId"].asString(); + if(!value["Sn"].isNull()) + sn_ = value["Sn"].asString(); + if(!value["OperatingState"].isNull()) + operatingState_ = value["OperatingState"].asString(); + if(!value["ExpiredTime"].isNull()) + expiredTime_ = value["ExpiredTime"].asString(); + +} + +std::vector DescribeNodeResult::getNetworks()const +{ + return networks_; +} + +std::string DescribeNodeResult::getNodeGroupName()const +{ + return nodeGroupName_; +} + +std::string DescribeNodeResult::getZoneId()const +{ + return zoneId_; +} + +std::string DescribeNodeResult::getClusterId()const +{ + return clusterId_; +} + +std::string DescribeNodeResult::getCreateTime()const +{ + return createTime_; +} + +std::string DescribeNodeResult::getHostname()const +{ + return hostname_; +} + +std::string DescribeNodeResult::getMachineType()const +{ + return machineType_; +} + +std::string DescribeNodeResult::getOperatingState()const +{ + return operatingState_; +} + +std::string DescribeNodeResult::getNodeGroupId()const +{ + return nodeGroupId_; +} + +std::string DescribeNodeResult::getExpiredTime()const +{ + return expiredTime_; +} + +std::string DescribeNodeResult::getImageId()const +{ + return imageId_; +} + +std::string DescribeNodeResult::getNodeId()const +{ + return nodeId_; +} + +std::string DescribeNodeResult::getClusterName()const +{ + return clusterName_; +} + +std::string DescribeNodeResult::getSn()const +{ + return sn_; +} + diff --git a/eflo-controller/src/model/DescribeRegionsRequest.cc b/eflo-controller/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..1d5959fc9 --- /dev/null +++ b/eflo-controller/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::Eflo_controller::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DescribeRegions") { + setMethod(HttpRequest::Method::Post); +} + +DescribeRegionsRequest::~DescribeRegionsRequest() {} + +std::string DescribeRegionsRequest::getAcceptLanguage() const { + return acceptLanguage_; +} + +void DescribeRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) { + acceptLanguage_ = acceptLanguage; + setBodyParameter(std::string("AcceptLanguage"), acceptLanguage); +} + diff --git a/eflo-controller/src/model/DescribeRegionsResult.cc b/eflo-controller/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..0de3ac208 --- /dev/null +++ b/eflo-controller/src/model/DescribeRegionsResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::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"]["RegionsItem"]; + for (auto valueRegionsRegionsItem : allRegionsNode) + { + RegionsItem regionsObject; + if(!valueRegionsRegionsItem["LocalName"].isNull()) + regionsObject.localName = valueRegionsRegionsItem["LocalName"].asString(); + if(!valueRegionsRegionsItem["RegionId"].isNull()) + regionsObject.regionId = valueRegionsRegionsItem["RegionId"].asString(); + regions_.push_back(regionsObject); + } + +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + diff --git a/eflo-controller/src/model/DescribeTaskRequest.cc b/eflo-controller/src/model/DescribeTaskRequest.cc new file mode 100644 index 000000000..6e3e2eee5 --- /dev/null +++ b/eflo-controller/src/model/DescribeTaskRequest.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::Eflo_controller::Model::DescribeTaskRequest; + +DescribeTaskRequest::DescribeTaskRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DescribeTask") { + setMethod(HttpRequest::Method::Post); +} + +DescribeTaskRequest::~DescribeTaskRequest() {} + +std::string DescribeTaskRequest::getTaskId() const { + return taskId_; +} + +void DescribeTaskRequest::setTaskId(const std::string &taskId) { + taskId_ = taskId; + setBodyParameter(std::string("TaskId"), taskId); +} + diff --git a/eflo-controller/src/model/DescribeTaskResult.cc b/eflo-controller/src/model/DescribeTaskResult.cc new file mode 100644 index 000000000..ce0887eb6 --- /dev/null +++ b/eflo-controller/src/model/DescribeTaskResult.cc @@ -0,0 +1,136 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +DescribeTaskResult::DescribeTaskResult() : + ServiceResult() +{} + +DescribeTaskResult::DescribeTaskResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeTaskResult::~DescribeTaskResult() +{} + +void DescribeTaskResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allStepsNode = value["Steps"]["StepsItem"]; + for (auto valueStepsStepsItem : allStepsNode) + { + StepsItem stepsObject; + if(!valueStepsStepsItem["StepName"].isNull()) + stepsObject.stepName = valueStepsStepsItem["StepName"].asString(); + if(!valueStepsStepsItem["StepState"].isNull()) + stepsObject.stepState = valueStepsStepsItem["StepState"].asString(); + if(!valueStepsStepsItem["StepType"].isNull()) + stepsObject.stepType = valueStepsStepsItem["StepType"].asString(); + if(!valueStepsStepsItem["StageTag"].isNull()) + stepsObject.stageTag = valueStepsStepsItem["StageTag"].asString(); + if(!valueStepsStepsItem["Message"].isNull()) + stepsObject.message = valueStepsStepsItem["Message"].asString(); + if(!valueStepsStepsItem["StartTime"].isNull()) + stepsObject.startTime = valueStepsStepsItem["StartTime"].asString(); + if(!valueStepsStepsItem["UpdateTime"].isNull()) + stepsObject.updateTime = valueStepsStepsItem["UpdateTime"].asString(); + auto allSubTasksNode = valueStepsStepsItem["SubTasks"]["SubTasksItem"]; + for (auto valueStepsStepsItemSubTasksSubTasksItem : allSubTasksNode) + { + StepsItem::SubTasksItem subTasksObject; + if(!valueStepsStepsItemSubTasksSubTasksItem["TaskId"].isNull()) + subTasksObject.taskId = valueStepsStepsItemSubTasksSubTasksItem["TaskId"].asString(); + if(!valueStepsStepsItemSubTasksSubTasksItem["TaskType"].isNull()) + subTasksObject.taskType = valueStepsStepsItemSubTasksSubTasksItem["TaskType"].asString(); + if(!valueStepsStepsItemSubTasksSubTasksItem["CreateTime"].isNull()) + subTasksObject.createTime = valueStepsStepsItemSubTasksSubTasksItem["CreateTime"].asString(); + if(!valueStepsStepsItemSubTasksSubTasksItem["UpdateTime"].isNull()) + subTasksObject.updateTime = valueStepsStepsItemSubTasksSubTasksItem["UpdateTime"].asString(); + if(!valueStepsStepsItemSubTasksSubTasksItem["Message"].isNull()) + subTasksObject.message = valueStepsStepsItemSubTasksSubTasksItem["Message"].asString(); + if(!valueStepsStepsItemSubTasksSubTasksItem["TaskState"].isNull()) + subTasksObject.taskState = valueStepsStepsItemSubTasksSubTasksItem["TaskState"].asString(); + stepsObject.subTasks.push_back(subTasksObject); + } + steps_.push_back(stepsObject); + } + if(!value["ClusterId"].isNull()) + clusterId_ = value["ClusterId"].asString(); + if(!value["ClusterName"].isNull()) + clusterName_ = value["ClusterName"].asString(); + if(!value["TaskState"].isNull()) + taskState_ = value["TaskState"].asString(); + if(!value["TaskType"].isNull()) + taskType_ = value["TaskType"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = value["CreateTime"].asString(); + if(!value["UpdateTime"].isNull()) + updateTime_ = value["UpdateTime"].asString(); + +} + +std::vector DescribeTaskResult::getSteps()const +{ + return steps_; +} + +std::string DescribeTaskResult::getMessage()const +{ + return message_; +} + +std::string DescribeTaskResult::getClusterId()const +{ + return clusterId_; +} + +std::string DescribeTaskResult::getTaskType()const +{ + return taskType_; +} + +std::string DescribeTaskResult::getCreateTime()const +{ + return createTime_; +} + +std::string DescribeTaskResult::getUpdateTime()const +{ + return updateTime_; +} + +std::string DescribeTaskResult::getClusterName()const +{ + return clusterName_; +} + +std::string DescribeTaskResult::getTaskState()const +{ + return taskState_; +} + diff --git a/eflo-controller/src/model/DescribeZonesRequest.cc b/eflo-controller/src/model/DescribeZonesRequest.cc new file mode 100644 index 000000000..53f3249ee --- /dev/null +++ b/eflo-controller/src/model/DescribeZonesRequest.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::Eflo_controller::Model::DescribeZonesRequest; + +DescribeZonesRequest::DescribeZonesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "DescribeZones") { + setMethod(HttpRequest::Method::Post); +} + +DescribeZonesRequest::~DescribeZonesRequest() {} + +std::string DescribeZonesRequest::getAcceptLanguage() const { + return acceptLanguage_; +} + +void DescribeZonesRequest::setAcceptLanguage(const std::string &acceptLanguage) { + acceptLanguage_ = acceptLanguage; + setBodyParameter(std::string("AcceptLanguage"), acceptLanguage); +} + diff --git a/eflo-controller/src/model/DescribeZonesResult.cc b/eflo-controller/src/model/DescribeZonesResult.cc new file mode 100644 index 000000000..3c2c67743 --- /dev/null +++ b/eflo-controller/src/model/DescribeZonesResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +DescribeZonesResult::DescribeZonesResult() : + ServiceResult() +{} + +DescribeZonesResult::DescribeZonesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeZonesResult::~DescribeZonesResult() +{} + +void DescribeZonesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allZonesNode = value["Zones"]["ZonesItem"]; + for (auto valueZonesZonesItem : allZonesNode) + { + ZonesItem zonesObject; + if(!valueZonesZonesItem["LocalName"].isNull()) + zonesObject.localName = valueZonesZonesItem["LocalName"].asString(); + if(!valueZonesZonesItem["ZoneId"].isNull()) + zonesObject.zoneId = valueZonesZonesItem["ZoneId"].asString(); + zones_.push_back(zonesObject); + } + +} + +std::vector DescribeZonesResult::getZones()const +{ + return zones_; +} + diff --git a/eflo-controller/src/model/ExtendClusterRequest.cc b/eflo-controller/src/model/ExtendClusterRequest.cc new file mode 100644 index 000000000..40509e4a2 --- /dev/null +++ b/eflo-controller/src/model/ExtendClusterRequest.cc @@ -0,0 +1,61 @@ +/* + * 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::Eflo_controller::Model::ExtendClusterRequest; + +ExtendClusterRequest::ExtendClusterRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ExtendCluster") { + setMethod(HttpRequest::Method::Post); +} + +ExtendClusterRequest::~ExtendClusterRequest() {} + +bool ExtendClusterRequest::getIgnoreFailedNodeTasks() const { + return ignoreFailedNodeTasks_; +} + +void ExtendClusterRequest::setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks) { + ignoreFailedNodeTasks_ = ignoreFailedNodeTasks; + setBodyParameter(std::string("IgnoreFailedNodeTasks"), ignoreFailedNodeTasks ? "true" : "false"); +} + +std::string ExtendClusterRequest::getClusterId() const { + return clusterId_; +} + +void ExtendClusterRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + +std::vector ExtendClusterRequest::getNodeGroups() const { + return nodeGroups_; +} + +void ExtendClusterRequest::setNodeGroups(const std::vector &nodeGroups) { + nodeGroups_ = nodeGroups; + for(int dep1 = 0; dep1 != nodeGroups.size(); dep1++) { + for(int dep2 = 0; dep2 != nodeGroups[dep1].nodes.size(); dep2++) { + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".Hostname", nodeGroups[dep1].nodes[dep2].hostname); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".LoginPassword", nodeGroups[dep1].nodes[dep2].loginPassword); + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".NodeId", nodeGroups[dep1].nodes[dep2].nodeId); + } + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".NodeGroupId", nodeGroups[dep1].nodeGroupId); + } +} + diff --git a/eflo-controller/src/model/ExtendClusterResult.cc b/eflo-controller/src/model/ExtendClusterResult.cc new file mode 100644 index 000000000..db65d832d --- /dev/null +++ b/eflo-controller/src/model/ExtendClusterResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ExtendClusterResult::ExtendClusterResult() : + ServiceResult() +{} + +ExtendClusterResult::ExtendClusterResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ExtendClusterResult::~ExtendClusterResult() +{} + +void ExtendClusterResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string ExtendClusterResult::getTaskId()const +{ + return taskId_; +} + diff --git a/eflo-controller/src/model/ListClusterNodesRequest.cc b/eflo-controller/src/model/ListClusterNodesRequest.cc new file mode 100644 index 000000000..1a9406fca --- /dev/null +++ b/eflo-controller/src/model/ListClusterNodesRequest.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::Eflo_controller::Model::ListClusterNodesRequest; + +ListClusterNodesRequest::ListClusterNodesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ListClusterNodes") { + setMethod(HttpRequest::Method::Post); +} + +ListClusterNodesRequest::~ListClusterNodesRequest() {} + +std::string ListClusterNodesRequest::getClusterId() const { + return clusterId_; +} + +void ListClusterNodesRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + +std::string ListClusterNodesRequest::getNodeGroupId() const { + return nodeGroupId_; +} + +void ListClusterNodesRequest::setNodeGroupId(const std::string &nodeGroupId) { + nodeGroupId_ = nodeGroupId; + setBodyParameter(std::string("NodeGroupId"), nodeGroupId); +} + +std::string ListClusterNodesRequest::getNextToken() const { + return nextToken_; +} + +void ListClusterNodesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setBodyParameter(std::string("NextToken"), nextToken); +} + +long ListClusterNodesRequest::getMaxResults() const { + return maxResults_; +} + +void ListClusterNodesRequest::setMaxResults(long maxResults) { + maxResults_ = maxResults; + setBodyParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/eflo-controller/src/model/ListClusterNodesResult.cc b/eflo-controller/src/model/ListClusterNodesResult.cc new file mode 100644 index 000000000..63cafc1ce --- /dev/null +++ b/eflo-controller/src/model/ListClusterNodesResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ListClusterNodesResult::ListClusterNodesResult() : + ServiceResult() +{} + +ListClusterNodesResult::ListClusterNodesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListClusterNodesResult::~ListClusterNodesResult() +{} + +void ListClusterNodesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allNodesNode = value["Nodes"]["NodesItem"]; + for (auto valueNodesNodesItem : allNodesNode) + { + NodesItem nodesObject; + if(!valueNodesNodesItem["CreateTime"].isNull()) + nodesObject.createTime = valueNodesNodesItem["CreateTime"].asString(); + if(!valueNodesNodesItem["ExpiredTime"].isNull()) + nodesObject.expiredTime = valueNodesNodesItem["ExpiredTime"].asString(); + if(!valueNodesNodesItem["Hostname"].isNull()) + nodesObject.hostname = valueNodesNodesItem["Hostname"].asString(); + if(!valueNodesNodesItem["ImageId"].isNull()) + nodesObject.imageId = valueNodesNodesItem["ImageId"].asString(); + if(!valueNodesNodesItem["MachineType"].isNull()) + nodesObject.machineType = valueNodesNodesItem["MachineType"].asString(); + if(!valueNodesNodesItem["NodeGroupId"].isNull()) + nodesObject.nodeGroupId = valueNodesNodesItem["NodeGroupId"].asString(); + if(!valueNodesNodesItem["NodeGroupName"].isNull()) + nodesObject.nodeGroupName = valueNodesNodesItem["NodeGroupName"].asString(); + if(!valueNodesNodesItem["NodeId"].isNull()) + nodesObject.nodeId = valueNodesNodesItem["NodeId"].asString(); + if(!valueNodesNodesItem["OperatingState"].isNull()) + nodesObject.operatingState = valueNodesNodesItem["OperatingState"].asString(); + if(!valueNodesNodesItem["Sn"].isNull()) + nodesObject.sn = valueNodesNodesItem["Sn"].asString(); + if(!valueNodesNodesItem["ZoneId"].isNull()) + nodesObject.zoneId = valueNodesNodesItem["ZoneId"].asString(); + auto allNetworksNode = valueNodesNodesItem["Networks"]["NetworksItem"]; + for (auto valueNodesNodesItemNetworksNetworksItem : allNetworksNode) + { + NodesItem::NetworksItem networksObject; + if(!valueNodesNodesItemNetworksNetworksItem["BondName"].isNull()) + networksObject.bondName = valueNodesNodesItemNetworksNetworksItem["BondName"].asString(); + if(!valueNodesNodesItemNetworksNetworksItem["Ip"].isNull()) + networksObject.ip = valueNodesNodesItemNetworksNetworksItem["Ip"].asString(); + if(!valueNodesNodesItemNetworksNetworksItem["SubnetId"].isNull()) + networksObject.subnetId = valueNodesNodesItemNetworksNetworksItem["SubnetId"].asString(); + if(!valueNodesNodesItemNetworksNetworksItem["VpdId"].isNull()) + networksObject.vpdId = valueNodesNodesItemNetworksNetworksItem["VpdId"].asString(); + nodesObject.networks.push_back(networksObject); + } + nodes_.push_back(nodesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListClusterNodesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListClusterNodesResult::getNodes()const +{ + return nodes_; +} + diff --git a/eflo-controller/src/model/ListClustersRequest.cc b/eflo-controller/src/model/ListClustersRequest.cc new file mode 100644 index 000000000..4fc2ac9ca --- /dev/null +++ b/eflo-controller/src/model/ListClustersRequest.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::Eflo_controller::Model::ListClustersRequest; + +ListClustersRequest::ListClustersRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ListClusters") { + setMethod(HttpRequest::Method::Post); +} + +ListClustersRequest::~ListClustersRequest() {} + +std::string ListClustersRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListClustersRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setBodyParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string ListClustersRequest::getNextToken() const { + return nextToken_; +} + +void ListClustersRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setBodyParameter(std::string("NextToken"), nextToken); +} + +long ListClustersRequest::getMaxResults() const { + return maxResults_; +} + +void ListClustersRequest::setMaxResults(long maxResults) { + maxResults_ = maxResults; + setBodyParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/eflo-controller/src/model/ListClustersResult.cc b/eflo-controller/src/model/ListClustersResult.cc new file mode 100644 index 000000000..92e66fdf9 --- /dev/null +++ b/eflo-controller/src/model/ListClustersResult.cc @@ -0,0 +1,86 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ListClustersResult::ListClustersResult() : + ServiceResult() +{} + +ListClustersResult::ListClustersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListClustersResult::~ListClustersResult() +{} + +void ListClustersResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allClustersNode = value["Clusters"]["ClustersItem"]; + for (auto valueClustersClustersItem : allClustersNode) + { + ClustersItem clustersObject; + if(!valueClustersClustersItem["Components"].isNull()) + clustersObject.components = valueClustersClustersItem["Components"].asString(); + if(!valueClustersClustersItem["ClusterId"].isNull()) + clustersObject.clusterId = valueClustersClustersItem["ClusterId"].asString(); + if(!valueClustersClustersItem["ClusterName"].isNull()) + clustersObject.clusterName = valueClustersClustersItem["ClusterName"].asString(); + if(!valueClustersClustersItem["OperatingState"].isNull()) + clustersObject.operatingState = valueClustersClustersItem["OperatingState"].asString(); + if(!valueClustersClustersItem["TaskId"].isNull()) + clustersObject.taskId = valueClustersClustersItem["TaskId"].asString(); + if(!valueClustersClustersItem["ClusterType"].isNull()) + clustersObject.clusterType = valueClustersClustersItem["ClusterType"].asString(); + if(!valueClustersClustersItem["NodeCount"].isNull()) + clustersObject.nodeCount = std::stol(valueClustersClustersItem["NodeCount"].asString()); + if(!valueClustersClustersItem["NodeGroupCount"].isNull()) + clustersObject.nodeGroupCount = std::stol(valueClustersClustersItem["NodeGroupCount"].asString()); + if(!valueClustersClustersItem["CreateTime"].isNull()) + clustersObject.createTime = valueClustersClustersItem["CreateTime"].asString(); + if(!valueClustersClustersItem["UpdateTime"].isNull()) + clustersObject.updateTime = valueClustersClustersItem["UpdateTime"].asString(); + if(!valueClustersClustersItem["ClusterDescription"].isNull()) + clustersObject.clusterDescription = valueClustersClustersItem["ClusterDescription"].asString(); + if(!valueClustersClustersItem["ResourceGroupId"].isNull()) + clustersObject.resourceGroupId = valueClustersClustersItem["ResourceGroupId"].asString(); + clusters_.push_back(clustersObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListClustersResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListClustersResult::getClusters()const +{ + return clusters_; +} + diff --git a/eflo-controller/src/model/ListFreeNodesRequest.cc b/eflo-controller/src/model/ListFreeNodesRequest.cc new file mode 100644 index 000000000..58f3390c5 --- /dev/null +++ b/eflo-controller/src/model/ListFreeNodesRequest.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::Eflo_controller::Model::ListFreeNodesRequest; + +ListFreeNodesRequest::ListFreeNodesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ListFreeNodes") { + setMethod(HttpRequest::Method::Post); +} + +ListFreeNodesRequest::~ListFreeNodesRequest() {} + +std::string ListFreeNodesRequest::getMachineType() const { + return machineType_; +} + +void ListFreeNodesRequest::setMachineType(const std::string &machineType) { + machineType_ = machineType; + setBodyParameter(std::string("MachineType"), machineType); +} + +std::string ListFreeNodesRequest::getNextToken() const { + return nextToken_; +} + +void ListFreeNodesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setBodyParameter(std::string("NextToken"), nextToken); +} + +long ListFreeNodesRequest::getMaxResults() const { + return maxResults_; +} + +void ListFreeNodesRequest::setMaxResults(long maxResults) { + maxResults_ = maxResults; + setBodyParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/eflo-controller/src/model/ListFreeNodesResult.cc b/eflo-controller/src/model/ListFreeNodesResult.cc new file mode 100644 index 000000000..6f1ded751 --- /dev/null +++ b/eflo-controller/src/model/ListFreeNodesResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ListFreeNodesResult::ListFreeNodesResult() : + ServiceResult() +{} + +ListFreeNodesResult::ListFreeNodesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListFreeNodesResult::~ListFreeNodesResult() +{} + +void ListFreeNodesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allNodesNode = value["Nodes"]["nodesItem"]; + for (auto valueNodesnodesItem : allNodesNode) + { + NodesItem nodesObject; + if(!valueNodesnodesItem["ZoneId"].isNull()) + nodesObject.zoneId = valueNodesnodesItem["ZoneId"].asString(); + if(!valueNodesnodesItem["CreateTime"].isNull()) + nodesObject.createTime = valueNodesnodesItem["CreateTime"].asString(); + if(!valueNodesnodesItem["NodeId"].isNull()) + nodesObject.nodeId = valueNodesnodesItem["NodeId"].asString(); + if(!valueNodesnodesItem["MachineType"].isNull()) + nodesObject.machineType = valueNodesnodesItem["MachineType"].asString(); + if(!valueNodesnodesItem["Sn"].isNull()) + nodesObject.sn = valueNodesnodesItem["Sn"].asString(); + if(!valueNodesnodesItem["ExpiredTime"].isNull()) + nodesObject.expiredTime = valueNodesnodesItem["ExpiredTime"].asString(); + nodes_.push_back(nodesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListFreeNodesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListFreeNodesResult::getNodes()const +{ + return nodes_; +} + diff --git a/eflo-controller/src/model/ListTagResourcesRequest.cc b/eflo-controller/src/model/ListTagResourcesRequest.cc new file mode 100644 index 000000000..ad4a04809 --- /dev/null +++ b/eflo-controller/src/model/ListTagResourcesRequest.cc @@ -0,0 +1,85 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Eflo_controller::Model::ListTagResourcesRequest; + +ListTagResourcesRequest::ListTagResourcesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ListTagResources") { + setMethod(HttpRequest::Method::Post); +} + +ListTagResourcesRequest::~ListTagResourcesRequest() {} + +std::string ListTagResourcesRequest::getRegionId() const { + return regionId_; +} + +void ListTagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string ListTagResourcesRequest::getNextToken() const { + return nextToken_; +} + +void ListTagResourcesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListTagResourcesRequest::getTag() const { + return tag_; +} + +void ListTagResourcesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::vector ListTagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void ListTagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string ListTagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void ListTagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListTagResourcesRequest::getService() const { + return service_; +} + +void ListTagResourcesRequest::setService(const std::string &service) { + service_ = service; + setParameter(std::string("Service"), service); +} + diff --git a/eflo-controller/src/model/ListTagResourcesResult.cc b/eflo-controller/src/model/ListTagResourcesResult.cc new file mode 100644 index 000000000..498c418d0 --- /dev/null +++ b/eflo-controller/src/model/ListTagResourcesResult.cc @@ -0,0 +1,70 @@ +/* + * 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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ListTagResourcesResult::ListTagResourcesResult() : + ServiceResult() +{} + +ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTagResourcesResult::~ListTagResourcesResult() +{} + +void ListTagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTagResourcesNode = value["TagResources"]["TagResource"]; + for (auto valueTagResourcesTagResource : allTagResourcesNode) + { + TagResource tagResourcesObject; + if(!valueTagResourcesTagResource["TagKey"].isNull()) + tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString(); + if(!valueTagResourcesTagResource["TagValue"].isNull()) + tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString(); + if(!valueTagResourcesTagResource["ResourceId"].isNull()) + tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString(); + if(!valueTagResourcesTagResource["ResourceType"].isNull()) + tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString(); + tagResources_.push_back(tagResourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListTagResourcesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListTagResourcesResult::getTagResources()const +{ + return tagResources_; +} + diff --git a/eflo-controller/src/model/RebootNodesRequest.cc b/eflo-controller/src/model/RebootNodesRequest.cc new file mode 100644 index 000000000..3b6652219 --- /dev/null +++ b/eflo-controller/src/model/RebootNodesRequest.cc @@ -0,0 +1,56 @@ +/* + * 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::Eflo_controller::Model::RebootNodesRequest; + +RebootNodesRequest::RebootNodesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "RebootNodes") { + setMethod(HttpRequest::Method::Post); +} + +RebootNodesRequest::~RebootNodesRequest() {} + +bool RebootNodesRequest::getIgnoreFailedNodeTasks() const { + return ignoreFailedNodeTasks_; +} + +void RebootNodesRequest::setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks) { + ignoreFailedNodeTasks_ = ignoreFailedNodeTasks; + setBodyParameter(std::string("IgnoreFailedNodeTasks"), ignoreFailedNodeTasks ? "true" : "false"); +} + +std::string RebootNodesRequest::getClusterId() const { + return clusterId_; +} + +void RebootNodesRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + +std::vector RebootNodesRequest::getNodes() const { + return nodes_; +} + +void RebootNodesRequest::setNodes(const std::vector &nodes) { + nodes_ = nodes; + for(int dep1 = 0; dep1 != nodes.size(); dep1++) { + setBodyParameter(std::string("Nodes") + "." + std::to_string(dep1 + 1), nodes[dep1]); + } +} + diff --git a/eflo-controller/src/model/RebootNodesResult.cc b/eflo-controller/src/model/RebootNodesResult.cc new file mode 100644 index 000000000..13b2e9ee9 --- /dev/null +++ b/eflo-controller/src/model/RebootNodesResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +RebootNodesResult::RebootNodesResult() : + ServiceResult() +{} + +RebootNodesResult::RebootNodesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RebootNodesResult::~RebootNodesResult() +{} + +void RebootNodesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string RebootNodesResult::getTaskId()const +{ + return taskId_; +} + diff --git a/eflo-controller/src/model/ReimageNodesRequest.cc b/eflo-controller/src/model/ReimageNodesRequest.cc new file mode 100644 index 000000000..9c0cba43a --- /dev/null +++ b/eflo-controller/src/model/ReimageNodesRequest.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 + +using AlibabaCloud::Eflo_controller::Model::ReimageNodesRequest; + +ReimageNodesRequest::ReimageNodesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ReimageNodes") { + setMethod(HttpRequest::Method::Post); +} + +ReimageNodesRequest::~ReimageNodesRequest() {} + +bool ReimageNodesRequest::getIgnoreFailedNodeTasks() const { + return ignoreFailedNodeTasks_; +} + +void ReimageNodesRequest::setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks) { + ignoreFailedNodeTasks_ = ignoreFailedNodeTasks; + setBodyParameter(std::string("IgnoreFailedNodeTasks"), ignoreFailedNodeTasks ? "true" : "false"); +} + +std::string ReimageNodesRequest::getClusterId() const { + return clusterId_; +} + +void ReimageNodesRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + +std::vector ReimageNodesRequest::getNodes() const { + return nodes_; +} + +void ReimageNodesRequest::setNodes(const std::vector &nodes) { + nodes_ = nodes; + for(int dep1 = 0; dep1 != nodes.size(); dep1++) { + setBodyParameter(std::string("Nodes") + "." + std::to_string(dep1 + 1) + ".Hostname", nodes[dep1].hostname); + setBodyParameter(std::string("Nodes") + "." + std::to_string(dep1 + 1) + ".ImageId", nodes[dep1].imageId); + setBodyParameter(std::string("Nodes") + "." + std::to_string(dep1 + 1) + ".LoginPassword", nodes[dep1].loginPassword); + setBodyParameter(std::string("Nodes") + "." + std::to_string(dep1 + 1) + ".NodeId", nodes[dep1].nodeId); + } +} + diff --git a/eflo-controller/src/model/ReimageNodesResult.cc b/eflo-controller/src/model/ReimageNodesResult.cc new file mode 100644 index 000000000..fba3f7ab0 --- /dev/null +++ b/eflo-controller/src/model/ReimageNodesResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ReimageNodesResult::ReimageNodesResult() : + ServiceResult() +{} + +ReimageNodesResult::ReimageNodesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ReimageNodesResult::~ReimageNodesResult() +{} + +void ReimageNodesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string ReimageNodesResult::getTaskId()const +{ + return taskId_; +} + diff --git a/eflo-controller/src/model/ShrinkClusterRequest.cc b/eflo-controller/src/model/ShrinkClusterRequest.cc new file mode 100644 index 000000000..334c678d0 --- /dev/null +++ b/eflo-controller/src/model/ShrinkClusterRequest.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 + +using AlibabaCloud::Eflo_controller::Model::ShrinkClusterRequest; + +ShrinkClusterRequest::ShrinkClusterRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "ShrinkCluster") { + setMethod(HttpRequest::Method::Post); +} + +ShrinkClusterRequest::~ShrinkClusterRequest() {} + +bool ShrinkClusterRequest::getIgnoreFailedNodeTasks() const { + return ignoreFailedNodeTasks_; +} + +void ShrinkClusterRequest::setIgnoreFailedNodeTasks(bool ignoreFailedNodeTasks) { + ignoreFailedNodeTasks_ = ignoreFailedNodeTasks; + setBodyParameter(std::string("IgnoreFailedNodeTasks"), ignoreFailedNodeTasks ? "true" : "false"); +} + +std::string ShrinkClusterRequest::getClusterId() const { + return clusterId_; +} + +void ShrinkClusterRequest::setClusterId(const std::string &clusterId) { + clusterId_ = clusterId; + setBodyParameter(std::string("ClusterId"), clusterId); +} + +std::vector ShrinkClusterRequest::getNodeGroups() const { + return nodeGroups_; +} + +void ShrinkClusterRequest::setNodeGroups(const std::vector &nodeGroups) { + nodeGroups_ = nodeGroups; + for(int dep1 = 0; dep1 != nodeGroups.size(); dep1++) { + for(int dep2 = 0; dep2 != nodeGroups[dep1].nodes.size(); dep2++) { + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".Nodes." + std::to_string(dep2 + 1) + ".NodeId", nodeGroups[dep1].nodes[dep2].nodeId); + } + setBodyParameter(std::string("NodeGroups") + "." + std::to_string(dep1 + 1) + ".NodeGroupId", nodeGroups[dep1].nodeGroupId); + } +} + diff --git a/eflo-controller/src/model/ShrinkClusterResult.cc b/eflo-controller/src/model/ShrinkClusterResult.cc new file mode 100644 index 000000000..265545a1a --- /dev/null +++ b/eflo-controller/src/model/ShrinkClusterResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +ShrinkClusterResult::ShrinkClusterResult() : + ServiceResult() +{} + +ShrinkClusterResult::ShrinkClusterResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ShrinkClusterResult::~ShrinkClusterResult() +{} + +void ShrinkClusterResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string ShrinkClusterResult::getTaskId()const +{ + return taskId_; +} + diff --git a/eflo-controller/src/model/TagResourcesRequest.cc b/eflo-controller/src/model/TagResourcesRequest.cc new file mode 100644 index 000000000..df8025f1a --- /dev/null +++ b/eflo-controller/src/model/TagResourcesRequest.cc @@ -0,0 +1,76 @@ +/* + * 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::Eflo_controller::Model::TagResourcesRequest; + +TagResourcesRequest::TagResourcesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "TagResources") { + setMethod(HttpRequest::Method::Post); +} + +TagResourcesRequest::~TagResourcesRequest() {} + +std::string TagResourcesRequest::getRegionId() const { + return regionId_; +} + +void TagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector TagResourcesRequest::getTag() const { + return tag_; +} + +void TagResourcesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::vector TagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void TagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string TagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void TagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string TagResourcesRequest::getService() const { + return service_; +} + +void TagResourcesRequest::setService(const std::string &service) { + service_ = service; + setParameter(std::string("Service"), service); +} + diff --git a/eflo-controller/src/model/TagResourcesResult.cc b/eflo-controller/src/model/TagResourcesResult.cc new file mode 100644 index 000000000..d4f5b63d6 --- /dev/null +++ b/eflo-controller/src/model/TagResourcesResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +TagResourcesResult::TagResourcesResult() : + ServiceResult() +{} + +TagResourcesResult::TagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TagResourcesResult::~TagResourcesResult() +{} + +void TagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/eflo-controller/src/model/UntagResourcesRequest.cc b/eflo-controller/src/model/UntagResourcesRequest.cc new file mode 100644 index 000000000..5386d4488 --- /dev/null +++ b/eflo-controller/src/model/UntagResourcesRequest.cc @@ -0,0 +1,79 @@ +/* + * 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::Eflo_controller::Model::UntagResourcesRequest; + +UntagResourcesRequest::UntagResourcesRequest() + : RpcServiceRequest("eflo-controller", "2022-12-15", "UntagResources") { + setMethod(HttpRequest::Method::Post); +} + +UntagResourcesRequest::~UntagResourcesRequest() {} + +std::string UntagResourcesRequest::getRegionId() const { + return regionId_; +} + +void UntagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +bool UntagResourcesRequest::getAll() const { + return all_; +} + +void UntagResourcesRequest::setAll(bool all) { + all_ = all; + setParameter(std::string("All"), all ? "true" : "false"); +} + +std::vector UntagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void UntagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string UntagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void UntagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string UntagResourcesRequest::getService() const { + return service_; +} + +void UntagResourcesRequest::setService(const std::string &service) { + service_ = service; + setParameter(std::string("Service"), service); +} + +std::vector UntagResourcesRequest::getTagKey() const { + return tagKey_; +} + +void UntagResourcesRequest::setTagKey(const std::vector &tagKey) { + tagKey_ = tagKey; +} + diff --git a/eflo-controller/src/model/UntagResourcesResult.cc b/eflo-controller/src/model/UntagResourcesResult.cc new file mode 100644 index 000000000..5754ffc01 --- /dev/null +++ b/eflo-controller/src/model/UntagResourcesResult.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::Eflo_controller; +using namespace AlibabaCloud::Eflo_controller::Model; + +UntagResourcesResult::UntagResourcesResult() : + ServiceResult() +{} + +UntagResourcesResult::UntagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UntagResourcesResult::~UntagResourcesResult() +{} + +void UntagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +