diff --git a/CHANGELOG b/CHANGELOG index 1f5131c91..0f2e1baa6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-06-08 Version: 1.36.453 +- Generate dbfs sdk. + 2020-06-08 Version: 1.36.452 - Support offline instance. diff --git a/VERSION b/VERSION index b46514107..21381f039 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.452 \ No newline at end of file +1.36.453 \ No newline at end of file diff --git a/dbfs/CMakeLists.txt b/dbfs/CMakeLists.txt new file mode 100644 index 000000000..9e6639695 --- /dev/null +++ b/dbfs/CMakeLists.txt @@ -0,0 +1,110 @@ +# +# 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(dbfs_public_header + include/alibabacloud/dbfs/DBFSClient.h + include/alibabacloud/dbfs/DBFSExport.h ) + +set(dbfs_public_header_model + include/alibabacloud/dbfs/model/AttachDbfsRequest.h + include/alibabacloud/dbfs/model/AttachDbfsResult.h + include/alibabacloud/dbfs/model/CreateDbfsRequest.h + include/alibabacloud/dbfs/model/CreateDbfsResult.h + include/alibabacloud/dbfs/model/DeleteDbfsRequest.h + include/alibabacloud/dbfs/model/DeleteDbfsResult.h + include/alibabacloud/dbfs/model/DetachDbfsRequest.h + include/alibabacloud/dbfs/model/DetachDbfsResult.h + include/alibabacloud/dbfs/model/GetDbfsRequest.h + include/alibabacloud/dbfs/model/GetDbfsResult.h + include/alibabacloud/dbfs/model/ListDbfsRequest.h + include/alibabacloud/dbfs/model/ListDbfsResult.h + include/alibabacloud/dbfs/model/ResizeDbfsRequest.h + include/alibabacloud/dbfs/model/ResizeDbfsResult.h ) + +set(dbfs_src + src/DBFSClient.cc + src/model/AttachDbfsRequest.cc + src/model/AttachDbfsResult.cc + src/model/CreateDbfsRequest.cc + src/model/CreateDbfsResult.cc + src/model/DeleteDbfsRequest.cc + src/model/DeleteDbfsResult.cc + src/model/DetachDbfsRequest.cc + src/model/DetachDbfsResult.cc + src/model/GetDbfsRequest.cc + src/model/GetDbfsResult.cc + src/model/ListDbfsRequest.cc + src/model/ListDbfsResult.cc + src/model/ResizeDbfsRequest.cc + src/model/ResizeDbfsResult.cc ) + +add_library(dbfs ${LIB_TYPE} + ${dbfs_public_header} + ${dbfs_public_header_model} + ${dbfs_src}) + +set_target_properties(dbfs + 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}dbfs + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(dbfs + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_DBFS_LIBRARY) +endif() + +target_include_directories(dbfs + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(dbfs + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(dbfs + jsoncpp) + target_include_directories(dbfs + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(dbfs + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(dbfs + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(dbfs + PRIVATE /usr/include/jsoncpp) + target_link_libraries(dbfs + jsoncpp) +endif() + +install(FILES ${dbfs_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dbfs) +install(FILES ${dbfs_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dbfs/model) +install(TARGETS dbfs + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/DBFSClient.h b/dbfs/include/alibabacloud/dbfs/DBFSClient.h new file mode 100644 index 000000000..134f654a8 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/DBFSClient.h @@ -0,0 +1,102 @@ +/* + * 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_DBFS_DBFSCLIENT_H_ +#define ALIBABACLOUD_DBFS_DBFSCLIENT_H_ + +#include +#include +#include +#include +#include "DBFSExport.h" +#include "model/AttachDbfsRequest.h" +#include "model/AttachDbfsResult.h" +#include "model/CreateDbfsRequest.h" +#include "model/CreateDbfsResult.h" +#include "model/DeleteDbfsRequest.h" +#include "model/DeleteDbfsResult.h" +#include "model/DetachDbfsRequest.h" +#include "model/DetachDbfsResult.h" +#include "model/GetDbfsRequest.h" +#include "model/GetDbfsResult.h" +#include "model/ListDbfsRequest.h" +#include "model/ListDbfsResult.h" +#include "model/ResizeDbfsRequest.h" +#include "model/ResizeDbfsResult.h" + + +namespace AlibabaCloud +{ + namespace DBFS + { + class ALIBABACLOUD_DBFS_EXPORT DBFSClient : public RpcServiceClient + { + public: + typedef Outcome AttachDbfsOutcome; + typedef std::future AttachDbfsOutcomeCallable; + typedef std::function&)> AttachDbfsAsyncHandler; + typedef Outcome CreateDbfsOutcome; + typedef std::future CreateDbfsOutcomeCallable; + typedef std::function&)> CreateDbfsAsyncHandler; + typedef Outcome DeleteDbfsOutcome; + typedef std::future DeleteDbfsOutcomeCallable; + typedef std::function&)> DeleteDbfsAsyncHandler; + typedef Outcome DetachDbfsOutcome; + typedef std::future DetachDbfsOutcomeCallable; + typedef std::function&)> DetachDbfsAsyncHandler; + typedef Outcome GetDbfsOutcome; + typedef std::future GetDbfsOutcomeCallable; + typedef std::function&)> GetDbfsAsyncHandler; + typedef Outcome ListDbfsOutcome; + typedef std::future ListDbfsOutcomeCallable; + typedef std::function&)> ListDbfsAsyncHandler; + typedef Outcome ResizeDbfsOutcome; + typedef std::future ResizeDbfsOutcomeCallable; + typedef std::function&)> ResizeDbfsAsyncHandler; + + DBFSClient(const Credentials &credentials, const ClientConfiguration &configuration); + DBFSClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + DBFSClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~DBFSClient(); + AttachDbfsOutcome attachDbfs(const Model::AttachDbfsRequest &request)const; + void attachDbfsAsync(const Model::AttachDbfsRequest& request, const AttachDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AttachDbfsOutcomeCallable attachDbfsCallable(const Model::AttachDbfsRequest& request) const; + CreateDbfsOutcome createDbfs(const Model::CreateDbfsRequest &request)const; + void createDbfsAsync(const Model::CreateDbfsRequest& request, const CreateDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateDbfsOutcomeCallable createDbfsCallable(const Model::CreateDbfsRequest& request) const; + DeleteDbfsOutcome deleteDbfs(const Model::DeleteDbfsRequest &request)const; + void deleteDbfsAsync(const Model::DeleteDbfsRequest& request, const DeleteDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteDbfsOutcomeCallable deleteDbfsCallable(const Model::DeleteDbfsRequest& request) const; + DetachDbfsOutcome detachDbfs(const Model::DetachDbfsRequest &request)const; + void detachDbfsAsync(const Model::DetachDbfsRequest& request, const DetachDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetachDbfsOutcomeCallable detachDbfsCallable(const Model::DetachDbfsRequest& request) const; + GetDbfsOutcome getDbfs(const Model::GetDbfsRequest &request)const; + void getDbfsAsync(const Model::GetDbfsRequest& request, const GetDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetDbfsOutcomeCallable getDbfsCallable(const Model::GetDbfsRequest& request) const; + ListDbfsOutcome listDbfs(const Model::ListDbfsRequest &request)const; + void listDbfsAsync(const Model::ListDbfsRequest& request, const ListDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListDbfsOutcomeCallable listDbfsCallable(const Model::ListDbfsRequest& request) const; + ResizeDbfsOutcome resizeDbfs(const Model::ResizeDbfsRequest &request)const; + void resizeDbfsAsync(const Model::ResizeDbfsRequest& request, const ResizeDbfsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ResizeDbfsOutcomeCallable resizeDbfsCallable(const Model::ResizeDbfsRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_DBFS_DBFSCLIENT_H_ diff --git a/dbfs/include/alibabacloud/dbfs/DBFSExport.h b/dbfs/include/alibabacloud/dbfs/DBFSExport.h new file mode 100644 index 000000000..eb9522dcd --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/DBFSExport.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_DBFS_DBFSEXPORT_H_ +#define ALIBABACLOUD_DBFS_DBFSEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_DBFS_LIBRARY) +# define ALIBABACLOUD_DBFS_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_DBFS_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_DBFS_EXPORT +#endif + +#endif // !ALIBABACLOUD_DBFS_DBFSEXPORT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/AttachDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/AttachDbfsRequest.h new file mode 100644 index 000000000..4b9f66fed --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/AttachDbfsRequest.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_DBFS_MODEL_ATTACHDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_ATTACHDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT AttachDbfsRequest : public RpcServiceRequest + { + + public: + AttachDbfsRequest(); + ~AttachDbfsRequest(); + + std::string getECSInstanceId()const; + void setECSInstanceId(const std::string& eCSInstanceId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getFsId()const; + void setFsId(const std::string& fsId); + + private: + std::string eCSInstanceId_; + std::string regionId_; + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_ATTACHDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/AttachDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/AttachDbfsResult.h new file mode 100644 index 000000000..5e6a29fab --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/AttachDbfsResult.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_DBFS_MODEL_ATTACHDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_ATTACHDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT AttachDbfsResult : public ServiceResult + { + public: + + + AttachDbfsResult(); + explicit AttachDbfsResult(const std::string &payload); + ~AttachDbfsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_ATTACHDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/CreateDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/CreateDbfsRequest.h new file mode 100644 index 000000000..5e922ad30 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/CreateDbfsRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DBFS_MODEL_CREATEDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_CREATEDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT CreateDbfsRequest : public RpcServiceRequest + { + + public: + CreateDbfsRequest(); + ~CreateDbfsRequest(); + + int getSizeG()const; + void setSizeG(int sizeG); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + std::string getFsName()const; + void setFsName(const std::string& fsName); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getZoneId()const; + void setZoneId(const std::string& zoneId); + std::string getCategory()const; + void setCategory(const std::string& category); + + private: + int sizeG_; + std::string clientToken_; + std::string fsName_; + std::string regionId_; + std::string zoneId_; + std::string category_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_CREATEDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/CreateDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/CreateDbfsResult.h new file mode 100644 index 000000000..79b78b526 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/CreateDbfsResult.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_DBFS_MODEL_CREATEDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_CREATEDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT CreateDbfsResult : public ServiceResult + { + public: + + + CreateDbfsResult(); + explicit CreateDbfsResult(const std::string &payload); + ~CreateDbfsResult(); + std::string getFsId()const; + + protected: + void parse(const std::string &payload); + private: + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_CREATEDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsRequest.h new file mode 100644 index 000000000..a8c75143f --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsRequest.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_DBFS_MODEL_DELETEDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_DELETEDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT DeleteDbfsRequest : public RpcServiceRequest + { + + public: + DeleteDbfsRequest(); + ~DeleteDbfsRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getFsId()const; + void setFsId(const std::string& fsId); + + private: + std::string regionId_; + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_DELETEDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsResult.h new file mode 100644 index 000000000..7a6a2210e --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/DeleteDbfsResult.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_DBFS_MODEL_DELETEDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_DELETEDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT DeleteDbfsResult : public ServiceResult + { + public: + + + DeleteDbfsResult(); + explicit DeleteDbfsResult(const std::string &payload); + ~DeleteDbfsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_DELETEDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/DetachDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/DetachDbfsRequest.h new file mode 100644 index 000000000..cc6847780 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/DetachDbfsRequest.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_DBFS_MODEL_DETACHDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_DETACHDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT DetachDbfsRequest : public RpcServiceRequest + { + + public: + DetachDbfsRequest(); + ~DetachDbfsRequest(); + + std::string getECSInstanceId()const; + void setECSInstanceId(const std::string& eCSInstanceId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getFsId()const; + void setFsId(const std::string& fsId); + + private: + std::string eCSInstanceId_; + std::string regionId_; + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_DETACHDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/DetachDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/DetachDbfsResult.h new file mode 100644 index 000000000..30fb97240 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/DetachDbfsResult.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_DBFS_MODEL_DETACHDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_DETACHDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT DetachDbfsResult : public ServiceResult + { + public: + + + DetachDbfsResult(); + explicit DetachDbfsResult(const std::string &payload); + ~DetachDbfsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_DETACHDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/GetDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/GetDbfsRequest.h new file mode 100644 index 000000000..736b06732 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/GetDbfsRequest.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_DBFS_MODEL_GETDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_GETDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT GetDbfsRequest : public RpcServiceRequest + { + + public: + GetDbfsRequest(); + ~GetDbfsRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getFsId()const; + void setFsId(const std::string& fsId); + + private: + std::string regionId_; + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_GETDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/GetDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/GetDbfsResult.h new file mode 100644 index 000000000..9e6d3879d --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/GetDbfsResult.h @@ -0,0 +1,64 @@ +/* + * 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_DBFS_MODEL_GETDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_GETDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT GetDbfsResult : public ServiceResult + { + public: + struct Info + { + std::string status; + std::string category; + std::string fsName; + std::string zoneId; + int sizeG; + std::string dBFSClusterId; + std::string fsId; + std::string regionId; + int attachNodeNumber; + std::string payType; + }; + + + GetDbfsResult(); + explicit GetDbfsResult(const std::string &payload); + ~GetDbfsResult(); + std::vector getDBFSInfo()const; + + protected: + void parse(const std::string &payload); + private: + std::vector dBFSInfo_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_GETDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/ListDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/ListDbfsRequest.h new file mode 100644 index 000000000..97ce038cf --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/ListDbfsRequest.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_DBFS_MODEL_LISTDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_LISTDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT ListDbfsRequest : public RpcServiceRequest + { + + public: + ListDbfsRequest(); + ~ListDbfsRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_LISTDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/ListDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/ListDbfsResult.h new file mode 100644 index 000000000..cc597be30 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/ListDbfsResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_DBFS_MODEL_LISTDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_LISTDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT ListDbfsResult : public ServiceResult + { + public: + struct Info + { + std::string status; + std::string category; + std::string fsName; + std::string zoneId; + int sizeG; + std::string dBFSClusterId; + std::string fsId; + std::string regionId; + int attachNodeNumber; + std::string payType; + }; + + + ListDbfsResult(); + explicit ListDbfsResult(const std::string &payload); + ~ListDbfsResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getDBFSInfo()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector dBFSInfo_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_LISTDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsRequest.h b/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsRequest.h new file mode 100644 index 000000000..29f119553 --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsRequest.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_DBFS_MODEL_RESIZEDBFSREQUEST_H_ +#define ALIBABACLOUD_DBFS_MODEL_RESIZEDBFSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT ResizeDbfsRequest : public RpcServiceRequest + { + + public: + ResizeDbfsRequest(); + ~ResizeDbfsRequest(); + + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + int getNewSizeG()const; + void setNewSizeG(int newSizeG); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getFsId()const; + void setFsId(const std::string& fsId); + + private: + std::string clientToken_; + int newSizeG_; + std::string regionId_; + std::string fsId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_RESIZEDBFSREQUEST_H_ \ No newline at end of file diff --git a/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsResult.h b/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsResult.h new file mode 100644 index 000000000..39260d14f --- /dev/null +++ b/dbfs/include/alibabacloud/dbfs/model/ResizeDbfsResult.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_DBFS_MODEL_RESIZEDBFSRESULT_H_ +#define ALIBABACLOUD_DBFS_MODEL_RESIZEDBFSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace DBFS + { + namespace Model + { + class ALIBABACLOUD_DBFS_EXPORT ResizeDbfsResult : public ServiceResult + { + public: + + + ResizeDbfsResult(); + explicit ResizeDbfsResult(const std::string &payload); + ~ResizeDbfsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_DBFS_MODEL_RESIZEDBFSRESULT_H_ \ No newline at end of file diff --git a/dbfs/src/DBFSClient.cc b/dbfs/src/DBFSClient.cc new file mode 100644 index 000000000..703f9a55f --- /dev/null +++ b/dbfs/src/DBFSClient.cc @@ -0,0 +1,305 @@ +/* + * 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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +namespace +{ + const std::string SERVICE_NAME = "DBFS"; +} + +DBFSClient::DBFSClient(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, ""); +} + +DBFSClient::DBFSClient(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, ""); +} + +DBFSClient::DBFSClient(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, ""); +} + +DBFSClient::~DBFSClient() +{} + +DBFSClient::AttachDbfsOutcome DBFSClient::attachDbfs(const AttachDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AttachDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AttachDbfsOutcome(AttachDbfsResult(outcome.result())); + else + return AttachDbfsOutcome(outcome.error()); +} + +void DBFSClient::attachDbfsAsync(const AttachDbfsRequest& request, const AttachDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, attachDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::AttachDbfsOutcomeCallable DBFSClient::attachDbfsCallable(const AttachDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->attachDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::CreateDbfsOutcome DBFSClient::createDbfs(const CreateDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateDbfsOutcome(CreateDbfsResult(outcome.result())); + else + return CreateDbfsOutcome(outcome.error()); +} + +void DBFSClient::createDbfsAsync(const CreateDbfsRequest& request, const CreateDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::CreateDbfsOutcomeCallable DBFSClient::createDbfsCallable(const CreateDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::DeleteDbfsOutcome DBFSClient::deleteDbfs(const DeleteDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteDbfsOutcome(DeleteDbfsResult(outcome.result())); + else + return DeleteDbfsOutcome(outcome.error()); +} + +void DBFSClient::deleteDbfsAsync(const DeleteDbfsRequest& request, const DeleteDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::DeleteDbfsOutcomeCallable DBFSClient::deleteDbfsCallable(const DeleteDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::DetachDbfsOutcome DBFSClient::detachDbfs(const DetachDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetachDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetachDbfsOutcome(DetachDbfsResult(outcome.result())); + else + return DetachDbfsOutcome(outcome.error()); +} + +void DBFSClient::detachDbfsAsync(const DetachDbfsRequest& request, const DetachDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detachDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::DetachDbfsOutcomeCallable DBFSClient::detachDbfsCallable(const DetachDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detachDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::GetDbfsOutcome DBFSClient::getDbfs(const GetDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetDbfsOutcome(GetDbfsResult(outcome.result())); + else + return GetDbfsOutcome(outcome.error()); +} + +void DBFSClient::getDbfsAsync(const GetDbfsRequest& request, const GetDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::GetDbfsOutcomeCallable DBFSClient::getDbfsCallable(const GetDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::ListDbfsOutcome DBFSClient::listDbfs(const ListDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListDbfsOutcome(ListDbfsResult(outcome.result())); + else + return ListDbfsOutcome(outcome.error()); +} + +void DBFSClient::listDbfsAsync(const ListDbfsRequest& request, const ListDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::ListDbfsOutcomeCallable DBFSClient::listDbfsCallable(const ListDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +DBFSClient::ResizeDbfsOutcome DBFSClient::resizeDbfs(const ResizeDbfsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ResizeDbfsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ResizeDbfsOutcome(ResizeDbfsResult(outcome.result())); + else + return ResizeDbfsOutcome(outcome.error()); +} + +void DBFSClient::resizeDbfsAsync(const ResizeDbfsRequest& request, const ResizeDbfsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, resizeDbfs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DBFSClient::ResizeDbfsOutcomeCallable DBFSClient::resizeDbfsCallable(const ResizeDbfsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->resizeDbfs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/dbfs/src/model/AttachDbfsRequest.cc b/dbfs/src/model/AttachDbfsRequest.cc new file mode 100644 index 000000000..9c5edef28 --- /dev/null +++ b/dbfs/src/model/AttachDbfsRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::DBFS::Model::AttachDbfsRequest; + +AttachDbfsRequest::AttachDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "AttachDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +AttachDbfsRequest::~AttachDbfsRequest() +{} + +std::string AttachDbfsRequest::getECSInstanceId()const +{ + return eCSInstanceId_; +} + +void AttachDbfsRequest::setECSInstanceId(const std::string& eCSInstanceId) +{ + eCSInstanceId_ = eCSInstanceId; + setParameter("ECSInstanceId", eCSInstanceId); +} + +std::string AttachDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void AttachDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string AttachDbfsRequest::getFsId()const +{ + return fsId_; +} + +void AttachDbfsRequest::setFsId(const std::string& fsId) +{ + fsId_ = fsId; + setParameter("FsId", fsId); +} + diff --git a/dbfs/src/model/AttachDbfsResult.cc b/dbfs/src/model/AttachDbfsResult.cc new file mode 100644 index 000000000..84fe849ab --- /dev/null +++ b/dbfs/src/model/AttachDbfsResult.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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +AttachDbfsResult::AttachDbfsResult() : + ServiceResult() +{} + +AttachDbfsResult::AttachDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AttachDbfsResult::~AttachDbfsResult() +{} + +void AttachDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/dbfs/src/model/CreateDbfsRequest.cc b/dbfs/src/model/CreateDbfsRequest.cc new file mode 100644 index 000000000..63fad02a5 --- /dev/null +++ b/dbfs/src/model/CreateDbfsRequest.cc @@ -0,0 +1,95 @@ +/* + * 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::DBFS::Model::CreateDbfsRequest; + +CreateDbfsRequest::CreateDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "CreateDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateDbfsRequest::~CreateDbfsRequest() +{} + +int CreateDbfsRequest::getSizeG()const +{ + return sizeG_; +} + +void CreateDbfsRequest::setSizeG(int sizeG) +{ + sizeG_ = sizeG; + setParameter("SizeG", std::to_string(sizeG)); +} + +std::string CreateDbfsRequest::getClientToken()const +{ + return clientToken_; +} + +void CreateDbfsRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + +std::string CreateDbfsRequest::getFsName()const +{ + return fsName_; +} + +void CreateDbfsRequest::setFsName(const std::string& fsName) +{ + fsName_ = fsName; + setParameter("FsName", fsName); +} + +std::string CreateDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void CreateDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string CreateDbfsRequest::getZoneId()const +{ + return zoneId_; +} + +void CreateDbfsRequest::setZoneId(const std::string& zoneId) +{ + zoneId_ = zoneId; + setParameter("ZoneId", zoneId); +} + +std::string CreateDbfsRequest::getCategory()const +{ + return category_; +} + +void CreateDbfsRequest::setCategory(const std::string& category) +{ + category_ = category; + setParameter("Category", category); +} + diff --git a/dbfs/src/model/CreateDbfsResult.cc b/dbfs/src/model/CreateDbfsResult.cc new file mode 100644 index 000000000..15d7872e9 --- /dev/null +++ b/dbfs/src/model/CreateDbfsResult.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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +CreateDbfsResult::CreateDbfsResult() : + ServiceResult() +{} + +CreateDbfsResult::CreateDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateDbfsResult::~CreateDbfsResult() +{} + +void CreateDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["FsId"].isNull()) + fsId_ = value["FsId"].asString(); + +} + +std::string CreateDbfsResult::getFsId()const +{ + return fsId_; +} + diff --git a/dbfs/src/model/DeleteDbfsRequest.cc b/dbfs/src/model/DeleteDbfsRequest.cc new file mode 100644 index 000000000..79200c1f0 --- /dev/null +++ b/dbfs/src/model/DeleteDbfsRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::DBFS::Model::DeleteDbfsRequest; + +DeleteDbfsRequest::DeleteDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "DeleteDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteDbfsRequest::~DeleteDbfsRequest() +{} + +std::string DeleteDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void DeleteDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string DeleteDbfsRequest::getFsId()const +{ + return fsId_; +} + +void DeleteDbfsRequest::setFsId(const std::string& fsId) +{ + fsId_ = fsId; + setParameter("FsId", fsId); +} + diff --git a/dbfs/src/model/DeleteDbfsResult.cc b/dbfs/src/model/DeleteDbfsResult.cc new file mode 100644 index 000000000..99b9e971a --- /dev/null +++ b/dbfs/src/model/DeleteDbfsResult.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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +DeleteDbfsResult::DeleteDbfsResult() : + ServiceResult() +{} + +DeleteDbfsResult::DeleteDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteDbfsResult::~DeleteDbfsResult() +{} + +void DeleteDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/dbfs/src/model/DetachDbfsRequest.cc b/dbfs/src/model/DetachDbfsRequest.cc new file mode 100644 index 000000000..5afcbfe5f --- /dev/null +++ b/dbfs/src/model/DetachDbfsRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::DBFS::Model::DetachDbfsRequest; + +DetachDbfsRequest::DetachDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "DetachDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +DetachDbfsRequest::~DetachDbfsRequest() +{} + +std::string DetachDbfsRequest::getECSInstanceId()const +{ + return eCSInstanceId_; +} + +void DetachDbfsRequest::setECSInstanceId(const std::string& eCSInstanceId) +{ + eCSInstanceId_ = eCSInstanceId; + setParameter("ECSInstanceId", eCSInstanceId); +} + +std::string DetachDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void DetachDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string DetachDbfsRequest::getFsId()const +{ + return fsId_; +} + +void DetachDbfsRequest::setFsId(const std::string& fsId) +{ + fsId_ = fsId; + setParameter("FsId", fsId); +} + diff --git a/dbfs/src/model/DetachDbfsResult.cc b/dbfs/src/model/DetachDbfsResult.cc new file mode 100644 index 000000000..d742ca0c4 --- /dev/null +++ b/dbfs/src/model/DetachDbfsResult.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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +DetachDbfsResult::DetachDbfsResult() : + ServiceResult() +{} + +DetachDbfsResult::DetachDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetachDbfsResult::~DetachDbfsResult() +{} + +void DetachDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/dbfs/src/model/GetDbfsRequest.cc b/dbfs/src/model/GetDbfsRequest.cc new file mode 100644 index 000000000..9d0c27ee7 --- /dev/null +++ b/dbfs/src/model/GetDbfsRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::DBFS::Model::GetDbfsRequest; + +GetDbfsRequest::GetDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "GetDbfs") +{ + setMethod(HttpRequest::Method::Get); +} + +GetDbfsRequest::~GetDbfsRequest() +{} + +std::string GetDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void GetDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string GetDbfsRequest::getFsId()const +{ + return fsId_; +} + +void GetDbfsRequest::setFsId(const std::string& fsId) +{ + fsId_ = fsId; + setParameter("FsId", fsId); +} + diff --git a/dbfs/src/model/GetDbfsResult.cc b/dbfs/src/model/GetDbfsResult.cc new file mode 100644 index 000000000..184cde51b --- /dev/null +++ b/dbfs/src/model/GetDbfsResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +GetDbfsResult::GetDbfsResult() : + ServiceResult() +{} + +GetDbfsResult::GetDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetDbfsResult::~GetDbfsResult() +{} + +void GetDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDBFSInfoNode = value["DBFSInfo"]["Info"]; + for (auto valueDBFSInfoInfo : allDBFSInfoNode) + { + Info dBFSInfoObject; + if(!valueDBFSInfoInfo["FsName"].isNull()) + dBFSInfoObject.fsName = valueDBFSInfoInfo["FsName"].asString(); + if(!valueDBFSInfoInfo["DBFSClusterId"].isNull()) + dBFSInfoObject.dBFSClusterId = valueDBFSInfoInfo["DBFSClusterId"].asString(); + if(!valueDBFSInfoInfo["Category"].isNull()) + dBFSInfoObject.category = valueDBFSInfoInfo["Category"].asString(); + if(!valueDBFSInfoInfo["Status"].isNull()) + dBFSInfoObject.status = valueDBFSInfoInfo["Status"].asString(); + if(!valueDBFSInfoInfo["RegionId"].isNull()) + dBFSInfoObject.regionId = valueDBFSInfoInfo["RegionId"].asString(); + if(!valueDBFSInfoInfo["ZoneId"].isNull()) + dBFSInfoObject.zoneId = valueDBFSInfoInfo["ZoneId"].asString(); + if(!valueDBFSInfoInfo["AttachNodeNumber"].isNull()) + dBFSInfoObject.attachNodeNumber = std::stoi(valueDBFSInfoInfo["AttachNodeNumber"].asString()); + if(!valueDBFSInfoInfo["PayType"].isNull()) + dBFSInfoObject.payType = valueDBFSInfoInfo["PayType"].asString(); + if(!valueDBFSInfoInfo["FsId"].isNull()) + dBFSInfoObject.fsId = valueDBFSInfoInfo["FsId"].asString(); + if(!valueDBFSInfoInfo["SizeG"].isNull()) + dBFSInfoObject.sizeG = std::stoi(valueDBFSInfoInfo["SizeG"].asString()); + dBFSInfo_.push_back(dBFSInfoObject); + } + +} + +std::vector GetDbfsResult::getDBFSInfo()const +{ + return dBFSInfo_; +} + diff --git a/dbfs/src/model/ListDbfsRequest.cc b/dbfs/src/model/ListDbfsRequest.cc new file mode 100644 index 000000000..39c8ce97e --- /dev/null +++ b/dbfs/src/model/ListDbfsRequest.cc @@ -0,0 +1,40 @@ +/* + * 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::DBFS::Model::ListDbfsRequest; + +ListDbfsRequest::ListDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "ListDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +ListDbfsRequest::~ListDbfsRequest() +{} + +std::string ListDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void ListDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + diff --git a/dbfs/src/model/ListDbfsResult.cc b/dbfs/src/model/ListDbfsResult.cc new file mode 100644 index 000000000..368a48693 --- /dev/null +++ b/dbfs/src/model/ListDbfsResult.cc @@ -0,0 +1,96 @@ +/* + * 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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +ListDbfsResult::ListDbfsResult() : + ServiceResult() +{} + +ListDbfsResult::ListDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListDbfsResult::~ListDbfsResult() +{} + +void ListDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDBFSInfoNode = value["DBFSInfo"]["Info"]; + for (auto valueDBFSInfoInfo : allDBFSInfoNode) + { + Info dBFSInfoObject; + if(!valueDBFSInfoInfo["FsName"].isNull()) + dBFSInfoObject.fsName = valueDBFSInfoInfo["FsName"].asString(); + if(!valueDBFSInfoInfo["DBFSClusterId"].isNull()) + dBFSInfoObject.dBFSClusterId = valueDBFSInfoInfo["DBFSClusterId"].asString(); + if(!valueDBFSInfoInfo["Category"].isNull()) + dBFSInfoObject.category = valueDBFSInfoInfo["Category"].asString(); + if(!valueDBFSInfoInfo["Status"].isNull()) + dBFSInfoObject.status = valueDBFSInfoInfo["Status"].asString(); + if(!valueDBFSInfoInfo["RegionId"].isNull()) + dBFSInfoObject.regionId = valueDBFSInfoInfo["RegionId"].asString(); + if(!valueDBFSInfoInfo["ZoneId"].isNull()) + dBFSInfoObject.zoneId = valueDBFSInfoInfo["ZoneId"].asString(); + if(!valueDBFSInfoInfo["AttachNodeNumber"].isNull()) + dBFSInfoObject.attachNodeNumber = std::stoi(valueDBFSInfoInfo["AttachNodeNumber"].asString()); + if(!valueDBFSInfoInfo["PayType"].isNull()) + dBFSInfoObject.payType = valueDBFSInfoInfo["PayType"].asString(); + if(!valueDBFSInfoInfo["FsId"].isNull()) + dBFSInfoObject.fsId = valueDBFSInfoInfo["FsId"].asString(); + if(!valueDBFSInfoInfo["SizeG"].isNull()) + dBFSInfoObject.sizeG = std::stoi(valueDBFSInfoInfo["SizeG"].asString()); + dBFSInfo_.push_back(dBFSInfoObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + +} + +int ListDbfsResult::getTotalCount()const +{ + return totalCount_; +} + +int ListDbfsResult::getPageSize()const +{ + return pageSize_; +} + +int ListDbfsResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListDbfsResult::getDBFSInfo()const +{ + return dBFSInfo_; +} + diff --git a/dbfs/src/model/ResizeDbfsRequest.cc b/dbfs/src/model/ResizeDbfsRequest.cc new file mode 100644 index 000000000..6f4a44954 --- /dev/null +++ b/dbfs/src/model/ResizeDbfsRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::DBFS::Model::ResizeDbfsRequest; + +ResizeDbfsRequest::ResizeDbfsRequest() : + RpcServiceRequest("dbfs", "2020-02-19", "ResizeDbfs") +{ + setMethod(HttpRequest::Method::Post); +} + +ResizeDbfsRequest::~ResizeDbfsRequest() +{} + +std::string ResizeDbfsRequest::getClientToken()const +{ + return clientToken_; +} + +void ResizeDbfsRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + +int ResizeDbfsRequest::getNewSizeG()const +{ + return newSizeG_; +} + +void ResizeDbfsRequest::setNewSizeG(int newSizeG) +{ + newSizeG_ = newSizeG; + setParameter("NewSizeG", std::to_string(newSizeG)); +} + +std::string ResizeDbfsRequest::getRegionId()const +{ + return regionId_; +} + +void ResizeDbfsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ResizeDbfsRequest::getFsId()const +{ + return fsId_; +} + +void ResizeDbfsRequest::setFsId(const std::string& fsId) +{ + fsId_ = fsId; + setParameter("FsId", fsId); +} + diff --git a/dbfs/src/model/ResizeDbfsResult.cc b/dbfs/src/model/ResizeDbfsResult.cc new file mode 100644 index 000000000..b3453d1c6 --- /dev/null +++ b/dbfs/src/model/ResizeDbfsResult.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::DBFS; +using namespace AlibabaCloud::DBFS::Model; + +ResizeDbfsResult::ResizeDbfsResult() : + ServiceResult() +{} + +ResizeDbfsResult::ResizeDbfsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ResizeDbfsResult::~ResizeDbfsResult() +{} + +void ResizeDbfsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +