diff --git a/VERSION b/VERSION index 60d2fc151..5369d4248 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1844 \ No newline at end of file +1.36.1845 \ No newline at end of file diff --git a/resourcesharing/CMakeLists.txt b/resourcesharing/CMakeLists.txt new file mode 100644 index 000000000..5c04e7338 --- /dev/null +++ b/resourcesharing/CMakeLists.txt @@ -0,0 +1,170 @@ +# +# 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(resourcesharing_public_header + include/alibabacloud/resourcesharing/ResourceSharingClient.h + include/alibabacloud/resourcesharing/ResourceSharingExport.h ) + +set(resourcesharing_public_header_model + include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationRequest.h + include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationResult.h + include/alibabacloud/resourcesharing/model/AssociateResourceShareRequest.h + include/alibabacloud/resourcesharing/model/AssociateResourceShareResult.h + include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionRequest.h + include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionResult.h + include/alibabacloud/resourcesharing/model/ChangeResourceGroupRequest.h + include/alibabacloud/resourcesharing/model/ChangeResourceGroupResult.h + include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusRequest.h + include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusResult.h + include/alibabacloud/resourcesharing/model/CreateResourceShareRequest.h + include/alibabacloud/resourcesharing/model/CreateResourceShareResult.h + include/alibabacloud/resourcesharing/model/DeleteResourceShareRequest.h + include/alibabacloud/resourcesharing/model/DeleteResourceShareResult.h + include/alibabacloud/resourcesharing/model/DescribeRegionsRequest.h + include/alibabacloud/resourcesharing/model/DescribeRegionsResult.h + include/alibabacloud/resourcesharing/model/DisassociateResourceShareRequest.h + include/alibabacloud/resourcesharing/model/DisassociateResourceShareResult.h + include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionRequest.h + include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionResult.h + include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryRequest.h + include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryResult.h + include/alibabacloud/resourcesharing/model/GetPermissionRequest.h + include/alibabacloud/resourcesharing/model/GetPermissionResult.h + include/alibabacloud/resourcesharing/model/ListPermissionVersionsRequest.h + include/alibabacloud/resourcesharing/model/ListPermissionVersionsResult.h + include/alibabacloud/resourcesharing/model/ListPermissionsRequest.h + include/alibabacloud/resourcesharing/model/ListPermissionsResult.h + include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsRequest.h + include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsResult.h + include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsRequest.h + include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsResult.h + include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsRequest.h + include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsResult.h + include/alibabacloud/resourcesharing/model/ListResourceSharesRequest.h + include/alibabacloud/resourcesharing/model/ListResourceSharesResult.h + include/alibabacloud/resourcesharing/model/ListSharedResourcesRequest.h + include/alibabacloud/resourcesharing/model/ListSharedResourcesResult.h + include/alibabacloud/resourcesharing/model/ListSharedTargetsRequest.h + include/alibabacloud/resourcesharing/model/ListSharedTargetsResult.h + include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationRequest.h + include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationResult.h + include/alibabacloud/resourcesharing/model/UpdateResourceShareRequest.h + include/alibabacloud/resourcesharing/model/UpdateResourceShareResult.h ) + +set(resourcesharing_src + src/ResourceSharingClient.cc + src/model/AcceptResourceShareInvitationRequest.cc + src/model/AcceptResourceShareInvitationResult.cc + src/model/AssociateResourceShareRequest.cc + src/model/AssociateResourceShareResult.cc + src/model/AssociateResourceSharePermissionRequest.cc + src/model/AssociateResourceSharePermissionResult.cc + src/model/ChangeResourceGroupRequest.cc + src/model/ChangeResourceGroupResult.cc + src/model/CheckSharingWithResourceDirectoryStatusRequest.cc + src/model/CheckSharingWithResourceDirectoryStatusResult.cc + src/model/CreateResourceShareRequest.cc + src/model/CreateResourceShareResult.cc + src/model/DeleteResourceShareRequest.cc + src/model/DeleteResourceShareResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/DisassociateResourceShareRequest.cc + src/model/DisassociateResourceShareResult.cc + src/model/DisassociateResourceSharePermissionRequest.cc + src/model/DisassociateResourceSharePermissionResult.cc + src/model/EnableSharingWithResourceDirectoryRequest.cc + src/model/EnableSharingWithResourceDirectoryResult.cc + src/model/GetPermissionRequest.cc + src/model/GetPermissionResult.cc + src/model/ListPermissionVersionsRequest.cc + src/model/ListPermissionVersionsResult.cc + src/model/ListPermissionsRequest.cc + src/model/ListPermissionsResult.cc + src/model/ListResourceShareAssociationsRequest.cc + src/model/ListResourceShareAssociationsResult.cc + src/model/ListResourceShareInvitationsRequest.cc + src/model/ListResourceShareInvitationsResult.cc + src/model/ListResourceSharePermissionsRequest.cc + src/model/ListResourceSharePermissionsResult.cc + src/model/ListResourceSharesRequest.cc + src/model/ListResourceSharesResult.cc + src/model/ListSharedResourcesRequest.cc + src/model/ListSharedResourcesResult.cc + src/model/ListSharedTargetsRequest.cc + src/model/ListSharedTargetsResult.cc + src/model/RejectResourceShareInvitationRequest.cc + src/model/RejectResourceShareInvitationResult.cc + src/model/UpdateResourceShareRequest.cc + src/model/UpdateResourceShareResult.cc ) + +add_library(resourcesharing ${LIB_TYPE} + ${resourcesharing_public_header} + ${resourcesharing_public_header_model} + ${resourcesharing_src}) + +set_target_properties(resourcesharing + 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}resourcesharing + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(resourcesharing + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_RESOURCESHARING_LIBRARY) +endif() + +target_include_directories(resourcesharing + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(resourcesharing + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(resourcesharing + jsoncpp) + target_include_directories(resourcesharing + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(resourcesharing + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(resourcesharing + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(resourcesharing + PRIVATE /usr/include/jsoncpp) + target_link_libraries(resourcesharing + jsoncpp) +endif() + +install(FILES ${resourcesharing_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/resourcesharing) +install(FILES ${resourcesharing_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/resourcesharing/model) +install(TARGETS resourcesharing + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingClient.h b/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingClient.h new file mode 100644 index 000000000..1509ad06c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingClient.h @@ -0,0 +1,222 @@ +/* + * 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_RESOURCESHARING_RESOURCESHARINGCLIENT_H_ +#define ALIBABACLOUD_RESOURCESHARING_RESOURCESHARINGCLIENT_H_ + +#include +#include +#include +#include +#include "ResourceSharingExport.h" +#include "model/AcceptResourceShareInvitationRequest.h" +#include "model/AcceptResourceShareInvitationResult.h" +#include "model/AssociateResourceShareRequest.h" +#include "model/AssociateResourceShareResult.h" +#include "model/AssociateResourceSharePermissionRequest.h" +#include "model/AssociateResourceSharePermissionResult.h" +#include "model/ChangeResourceGroupRequest.h" +#include "model/ChangeResourceGroupResult.h" +#include "model/CheckSharingWithResourceDirectoryStatusRequest.h" +#include "model/CheckSharingWithResourceDirectoryStatusResult.h" +#include "model/CreateResourceShareRequest.h" +#include "model/CreateResourceShareResult.h" +#include "model/DeleteResourceShareRequest.h" +#include "model/DeleteResourceShareResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/DisassociateResourceShareRequest.h" +#include "model/DisassociateResourceShareResult.h" +#include "model/DisassociateResourceSharePermissionRequest.h" +#include "model/DisassociateResourceSharePermissionResult.h" +#include "model/EnableSharingWithResourceDirectoryRequest.h" +#include "model/EnableSharingWithResourceDirectoryResult.h" +#include "model/GetPermissionRequest.h" +#include "model/GetPermissionResult.h" +#include "model/ListPermissionVersionsRequest.h" +#include "model/ListPermissionVersionsResult.h" +#include "model/ListPermissionsRequest.h" +#include "model/ListPermissionsResult.h" +#include "model/ListResourceShareAssociationsRequest.h" +#include "model/ListResourceShareAssociationsResult.h" +#include "model/ListResourceShareInvitationsRequest.h" +#include "model/ListResourceShareInvitationsResult.h" +#include "model/ListResourceSharePermissionsRequest.h" +#include "model/ListResourceSharePermissionsResult.h" +#include "model/ListResourceSharesRequest.h" +#include "model/ListResourceSharesResult.h" +#include "model/ListSharedResourcesRequest.h" +#include "model/ListSharedResourcesResult.h" +#include "model/ListSharedTargetsRequest.h" +#include "model/ListSharedTargetsResult.h" +#include "model/RejectResourceShareInvitationRequest.h" +#include "model/RejectResourceShareInvitationResult.h" +#include "model/UpdateResourceShareRequest.h" +#include "model/UpdateResourceShareResult.h" + + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ResourceSharingClient : public RpcServiceClient + { + public: + typedef Outcome AcceptResourceShareInvitationOutcome; + typedef std::future AcceptResourceShareInvitationOutcomeCallable; + typedef std::function&)> AcceptResourceShareInvitationAsyncHandler; + typedef Outcome AssociateResourceShareOutcome; + typedef std::future AssociateResourceShareOutcomeCallable; + typedef std::function&)> AssociateResourceShareAsyncHandler; + typedef Outcome AssociateResourceSharePermissionOutcome; + typedef std::future AssociateResourceSharePermissionOutcomeCallable; + typedef std::function&)> AssociateResourceSharePermissionAsyncHandler; + typedef Outcome ChangeResourceGroupOutcome; + typedef std::future ChangeResourceGroupOutcomeCallable; + typedef std::function&)> ChangeResourceGroupAsyncHandler; + typedef Outcome CheckSharingWithResourceDirectoryStatusOutcome; + typedef std::future CheckSharingWithResourceDirectoryStatusOutcomeCallable; + typedef std::function&)> CheckSharingWithResourceDirectoryStatusAsyncHandler; + typedef Outcome CreateResourceShareOutcome; + typedef std::future CreateResourceShareOutcomeCallable; + typedef std::function&)> CreateResourceShareAsyncHandler; + typedef Outcome DeleteResourceShareOutcome; + typedef std::future DeleteResourceShareOutcomeCallable; + typedef std::function&)> DeleteResourceShareAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome DisassociateResourceShareOutcome; + typedef std::future DisassociateResourceShareOutcomeCallable; + typedef std::function&)> DisassociateResourceShareAsyncHandler; + typedef Outcome DisassociateResourceSharePermissionOutcome; + typedef std::future DisassociateResourceSharePermissionOutcomeCallable; + typedef std::function&)> DisassociateResourceSharePermissionAsyncHandler; + typedef Outcome EnableSharingWithResourceDirectoryOutcome; + typedef std::future EnableSharingWithResourceDirectoryOutcomeCallable; + typedef std::function&)> EnableSharingWithResourceDirectoryAsyncHandler; + typedef Outcome GetPermissionOutcome; + typedef std::future GetPermissionOutcomeCallable; + typedef std::function&)> GetPermissionAsyncHandler; + typedef Outcome ListPermissionVersionsOutcome; + typedef std::future ListPermissionVersionsOutcomeCallable; + typedef std::function&)> ListPermissionVersionsAsyncHandler; + typedef Outcome ListPermissionsOutcome; + typedef std::future ListPermissionsOutcomeCallable; + typedef std::function&)> ListPermissionsAsyncHandler; + typedef Outcome ListResourceShareAssociationsOutcome; + typedef std::future ListResourceShareAssociationsOutcomeCallable; + typedef std::function&)> ListResourceShareAssociationsAsyncHandler; + typedef Outcome ListResourceShareInvitationsOutcome; + typedef std::future ListResourceShareInvitationsOutcomeCallable; + typedef std::function&)> ListResourceShareInvitationsAsyncHandler; + typedef Outcome ListResourceSharePermissionsOutcome; + typedef std::future ListResourceSharePermissionsOutcomeCallable; + typedef std::function&)> ListResourceSharePermissionsAsyncHandler; + typedef Outcome ListResourceSharesOutcome; + typedef std::future ListResourceSharesOutcomeCallable; + typedef std::function&)> ListResourceSharesAsyncHandler; + typedef Outcome ListSharedResourcesOutcome; + typedef std::future ListSharedResourcesOutcomeCallable; + typedef std::function&)> ListSharedResourcesAsyncHandler; + typedef Outcome ListSharedTargetsOutcome; + typedef std::future ListSharedTargetsOutcomeCallable; + typedef std::function&)> ListSharedTargetsAsyncHandler; + typedef Outcome RejectResourceShareInvitationOutcome; + typedef std::future RejectResourceShareInvitationOutcomeCallable; + typedef std::function&)> RejectResourceShareInvitationAsyncHandler; + typedef Outcome UpdateResourceShareOutcome; + typedef std::future UpdateResourceShareOutcomeCallable; + typedef std::function&)> UpdateResourceShareAsyncHandler; + + ResourceSharingClient(const Credentials &credentials, const ClientConfiguration &configuration); + ResourceSharingClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + ResourceSharingClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~ResourceSharingClient(); + AcceptResourceShareInvitationOutcome acceptResourceShareInvitation(const Model::AcceptResourceShareInvitationRequest &request)const; + void acceptResourceShareInvitationAsync(const Model::AcceptResourceShareInvitationRequest& request, const AcceptResourceShareInvitationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AcceptResourceShareInvitationOutcomeCallable acceptResourceShareInvitationCallable(const Model::AcceptResourceShareInvitationRequest& request) const; + AssociateResourceShareOutcome associateResourceShare(const Model::AssociateResourceShareRequest &request)const; + void associateResourceShareAsync(const Model::AssociateResourceShareRequest& request, const AssociateResourceShareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AssociateResourceShareOutcomeCallable associateResourceShareCallable(const Model::AssociateResourceShareRequest& request) const; + AssociateResourceSharePermissionOutcome associateResourceSharePermission(const Model::AssociateResourceSharePermissionRequest &request)const; + void associateResourceSharePermissionAsync(const Model::AssociateResourceSharePermissionRequest& request, const AssociateResourceSharePermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AssociateResourceSharePermissionOutcomeCallable associateResourceSharePermissionCallable(const Model::AssociateResourceSharePermissionRequest& request) const; + 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; + CheckSharingWithResourceDirectoryStatusOutcome checkSharingWithResourceDirectoryStatus(const Model::CheckSharingWithResourceDirectoryStatusRequest &request)const; + void checkSharingWithResourceDirectoryStatusAsync(const Model::CheckSharingWithResourceDirectoryStatusRequest& request, const CheckSharingWithResourceDirectoryStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CheckSharingWithResourceDirectoryStatusOutcomeCallable checkSharingWithResourceDirectoryStatusCallable(const Model::CheckSharingWithResourceDirectoryStatusRequest& request) const; + CreateResourceShareOutcome createResourceShare(const Model::CreateResourceShareRequest &request)const; + void createResourceShareAsync(const Model::CreateResourceShareRequest& request, const CreateResourceShareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateResourceShareOutcomeCallable createResourceShareCallable(const Model::CreateResourceShareRequest& request) const; + DeleteResourceShareOutcome deleteResourceShare(const Model::DeleteResourceShareRequest &request)const; + void deleteResourceShareAsync(const Model::DeleteResourceShareRequest& request, const DeleteResourceShareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteResourceShareOutcomeCallable deleteResourceShareCallable(const Model::DeleteResourceShareRequest& 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; + DisassociateResourceShareOutcome disassociateResourceShare(const Model::DisassociateResourceShareRequest &request)const; + void disassociateResourceShareAsync(const Model::DisassociateResourceShareRequest& request, const DisassociateResourceShareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DisassociateResourceShareOutcomeCallable disassociateResourceShareCallable(const Model::DisassociateResourceShareRequest& request) const; + DisassociateResourceSharePermissionOutcome disassociateResourceSharePermission(const Model::DisassociateResourceSharePermissionRequest &request)const; + void disassociateResourceSharePermissionAsync(const Model::DisassociateResourceSharePermissionRequest& request, const DisassociateResourceSharePermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DisassociateResourceSharePermissionOutcomeCallable disassociateResourceSharePermissionCallable(const Model::DisassociateResourceSharePermissionRequest& request) const; + EnableSharingWithResourceDirectoryOutcome enableSharingWithResourceDirectory(const Model::EnableSharingWithResourceDirectoryRequest &request)const; + void enableSharingWithResourceDirectoryAsync(const Model::EnableSharingWithResourceDirectoryRequest& request, const EnableSharingWithResourceDirectoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EnableSharingWithResourceDirectoryOutcomeCallable enableSharingWithResourceDirectoryCallable(const Model::EnableSharingWithResourceDirectoryRequest& request) const; + GetPermissionOutcome getPermission(const Model::GetPermissionRequest &request)const; + void getPermissionAsync(const Model::GetPermissionRequest& request, const GetPermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetPermissionOutcomeCallable getPermissionCallable(const Model::GetPermissionRequest& request) const; + ListPermissionVersionsOutcome listPermissionVersions(const Model::ListPermissionVersionsRequest &request)const; + void listPermissionVersionsAsync(const Model::ListPermissionVersionsRequest& request, const ListPermissionVersionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListPermissionVersionsOutcomeCallable listPermissionVersionsCallable(const Model::ListPermissionVersionsRequest& request) const; + ListPermissionsOutcome listPermissions(const Model::ListPermissionsRequest &request)const; + void listPermissionsAsync(const Model::ListPermissionsRequest& request, const ListPermissionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListPermissionsOutcomeCallable listPermissionsCallable(const Model::ListPermissionsRequest& request) const; + ListResourceShareAssociationsOutcome listResourceShareAssociations(const Model::ListResourceShareAssociationsRequest &request)const; + void listResourceShareAssociationsAsync(const Model::ListResourceShareAssociationsRequest& request, const ListResourceShareAssociationsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourceShareAssociationsOutcomeCallable listResourceShareAssociationsCallable(const Model::ListResourceShareAssociationsRequest& request) const; + ListResourceShareInvitationsOutcome listResourceShareInvitations(const Model::ListResourceShareInvitationsRequest &request)const; + void listResourceShareInvitationsAsync(const Model::ListResourceShareInvitationsRequest& request, const ListResourceShareInvitationsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourceShareInvitationsOutcomeCallable listResourceShareInvitationsCallable(const Model::ListResourceShareInvitationsRequest& request) const; + ListResourceSharePermissionsOutcome listResourceSharePermissions(const Model::ListResourceSharePermissionsRequest &request)const; + void listResourceSharePermissionsAsync(const Model::ListResourceSharePermissionsRequest& request, const ListResourceSharePermissionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourceSharePermissionsOutcomeCallable listResourceSharePermissionsCallable(const Model::ListResourceSharePermissionsRequest& request) const; + ListResourceSharesOutcome listResourceShares(const Model::ListResourceSharesRequest &request)const; + void listResourceSharesAsync(const Model::ListResourceSharesRequest& request, const ListResourceSharesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourceSharesOutcomeCallable listResourceSharesCallable(const Model::ListResourceSharesRequest& request) const; + ListSharedResourcesOutcome listSharedResources(const Model::ListSharedResourcesRequest &request)const; + void listSharedResourcesAsync(const Model::ListSharedResourcesRequest& request, const ListSharedResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListSharedResourcesOutcomeCallable listSharedResourcesCallable(const Model::ListSharedResourcesRequest& request) const; + ListSharedTargetsOutcome listSharedTargets(const Model::ListSharedTargetsRequest &request)const; + void listSharedTargetsAsync(const Model::ListSharedTargetsRequest& request, const ListSharedTargetsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListSharedTargetsOutcomeCallable listSharedTargetsCallable(const Model::ListSharedTargetsRequest& request) const; + RejectResourceShareInvitationOutcome rejectResourceShareInvitation(const Model::RejectResourceShareInvitationRequest &request)const; + void rejectResourceShareInvitationAsync(const Model::RejectResourceShareInvitationRequest& request, const RejectResourceShareInvitationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RejectResourceShareInvitationOutcomeCallable rejectResourceShareInvitationCallable(const Model::RejectResourceShareInvitationRequest& request) const; + UpdateResourceShareOutcome updateResourceShare(const Model::UpdateResourceShareRequest &request)const; + void updateResourceShareAsync(const Model::UpdateResourceShareRequest& request, const UpdateResourceShareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateResourceShareOutcomeCallable updateResourceShareCallable(const Model::UpdateResourceShareRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_RESOURCESHARING_RESOURCESHARINGCLIENT_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingExport.h b/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingExport.h new file mode 100644 index 000000000..da1c8c85c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/ResourceSharingExport.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_RESOURCESHARING_RESOURCESHARINGEXPORT_H_ +#define ALIBABACLOUD_RESOURCESHARING_RESOURCESHARINGEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_RESOURCESHARING_LIBRARY) +# define ALIBABACLOUD_RESOURCESHARING_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_RESOURCESHARING_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_RESOURCESHARING_EXPORT +#endif + +#endif // !ALIBABACLOUD_RESOURCESHARING_RESOURCESHARINGEXPORT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationRequest.h new file mode 100644 index 000000000..6fad8e604 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationRequest.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_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT AcceptResourceShareInvitationRequest : public RpcServiceRequest { +public: + AcceptResourceShareInvitationRequest(); + ~AcceptResourceShareInvitationRequest(); + std::string getResourceShareInvitationId() const; + void setResourceShareInvitationId(const std::string &resourceShareInvitationId); + +private: + std::string resourceShareInvitationId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationResult.h new file mode 100644 index 000000000..8bb07670f --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AcceptResourceShareInvitationResult.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_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT AcceptResourceShareInvitationResult : public ServiceResult + { + public: + struct ResourceShareInvitation + { + struct AcceptInvitationFailedDetail + { + std::string status; + std::string resourceId; + std::string associateType; + std::string resourceType; + std::string statusMessage; + }; + std::vector acceptInvitationFailedDetails; + std::string resourceShareId; + std::string resourceShareName; + std::string status; + std::string senderAccountId; + std::string receiverAccountId; + std::string createTime; + std::string resourceShareInvitationId; + }; + + + AcceptResourceShareInvitationResult(); + explicit AcceptResourceShareInvitationResult(const std::string &payload); + ~AcceptResourceShareInvitationResult(); + ResourceShareInvitation getResourceShareInvitation()const; + + protected: + void parse(const std::string &payload); + private: + ResourceShareInvitation resourceShareInvitation_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ACCEPTRESOURCESHAREINVITATIONRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionRequest.h new file mode 100644 index 000000000..98373ab76 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionRequest.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_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT AssociateResourceSharePermissionRequest : public RpcServiceRequest { +public: + AssociateResourceSharePermissionRequest(); + ~AssociateResourceSharePermissionRequest(); + bool getReplace() const; + void setReplace(bool replace); + std::string getPermissionName() const; + void setPermissionName(const std::string &permissionName); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + +private: + bool replace_; + std::string permissionName_; + std::string resourceShareId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionResult.h new file mode 100644 index 000000000..3ee97a2ec --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceSharePermissionResult.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_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT AssociateResourceSharePermissionResult : public ServiceResult + { + public: + + + AssociateResourceSharePermissionResult(); + explicit AssociateResourceSharePermissionResult(const std::string &payload); + ~AssociateResourceSharePermissionResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareRequest.h new file mode 100644 index 000000000..4bd49abb8 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareRequest.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_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT AssociateResourceShareRequest : public RpcServiceRequest { +public: + struct Resources { + std::string resourceId; + std::string resourceType; + }; + struct TargetProperties { + std::string targetId; + std::string property; + }; + AssociateResourceShareRequest(); + ~AssociateResourceShareRequest(); + std::vector getResources() const; + void setResources(const std::vector &resources); + std::vector getTargets() const; + void setTargets(const std::vector &targets); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + std::vector getPermissionNames() const; + void setPermissionNames(const std::vector &permissionNames); + std::vector getTargetProperties() const; + void setTargetProperties(const std::vector &targetProperties); + +private: + std::vector resources_; + std::vector targets_; + std::string resourceShareId_; + std::vector permissionNames_; + std::vector targetProperties_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHAREREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareResult.h new file mode 100644 index 000000000..77f64b5f5 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/AssociateResourceShareResult.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_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHARERESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHARERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT AssociateResourceShareResult : public ServiceResult + { + public: + struct ResourceShareAssociation + { + std::string entityId; + std::string resourceShareName; + std::string entityType; + std::string resourceShareId; + std::string associationStatusMessage; + std::string associationType; + std::string createTime; + std::string updateTime; + std::string targetProperty; + std::string associationStatus; + }; + + + AssociateResourceShareResult(); + explicit AssociateResourceShareResult(const std::string &payload); + ~AssociateResourceShareResult(); + std::vector getResourceShareAssociations()const; + + protected: + void parse(const std::string &payload); + private: + std::vector resourceShareAssociations_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ASSOCIATERESOURCESHARERESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ChangeResourceGroupRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ChangeResourceGroupRequest.h new file mode 100644 index 000000000..da1a4a080 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/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_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_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 ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ChangeResourceGroupResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ChangeResourceGroupResult.h new file mode 100644 index 000000000..da7a15112 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/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_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ChangeResourceGroupResult : public ServiceResult + { + public: + + + ChangeResourceGroupResult(); + explicit ChangeResourceGroupResult(const std::string &payload); + ~ChangeResourceGroupResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CHANGERESOURCEGROUPRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusRequest.h new file mode 100644 index 000000000..e7393582c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusRequest.h @@ -0,0 +1,39 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT CheckSharingWithResourceDirectoryStatusRequest : public RpcServiceRequest { +public: + CheckSharingWithResourceDirectoryStatusRequest(); + ~CheckSharingWithResourceDirectoryStatusRequest(); + +private: +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusResult.h new file mode 100644 index 000000000..40ded60b1 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/CheckSharingWithResourceDirectoryStatusResult.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_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT CheckSharingWithResourceDirectoryStatusResult : public ServiceResult + { + public: + + + CheckSharingWithResourceDirectoryStatusResult(); + explicit CheckSharingWithResourceDirectoryStatusResult(const std::string &payload); + ~CheckSharingWithResourceDirectoryStatusResult(); + bool getEnableSharingWithRd()const; + + protected: + void parse(const std::string &payload); + private: + bool enableSharingWithRd_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CHECKSHARINGWITHRESOURCEDIRECTORYSTATUSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareRequest.h new file mode 100644 index 000000000..5f787979d --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareRequest.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_RESOURCESHARING_MODEL_CREATERESOURCESHAREREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CREATERESOURCESHAREREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT CreateResourceShareRequest : public RpcServiceRequest { +public: + struct Resources { + std::string resourceId; + std::string resourceType; + }; + struct TargetProperties { + std::string targetId; + std::string property; + }; + CreateResourceShareRequest(); + ~CreateResourceShareRequest(); + std::string getResourceShareName() const; + void setResourceShareName(const std::string &resourceShareName); + std::vector getTargets() const; + void setTargets(const std::vector &targets); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::vector getResources() const; + void setResources(const std::vector &resources); + bool getAllowExternalTargets() const; + void setAllowExternalTargets(bool allowExternalTargets); + std::vector getPermissionNames() const; + void setPermissionNames(const std::vector &permissionNames); + std::vector getTargetProperties() const; + void setTargetProperties(const std::vector &targetProperties); + +private: + std::string resourceShareName_; + std::vector targets_; + std::string resourceGroupId_; + std::vector resources_; + bool allowExternalTargets_; + std::vector permissionNames_; + std::vector targetProperties_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CREATERESOURCESHAREREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareResult.h new file mode 100644 index 000000000..999e5460c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/CreateResourceShareResult.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_RESOURCESHARING_MODEL_CREATERESOURCESHARERESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_CREATERESOURCESHARERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT CreateResourceShareResult : public ServiceResult + { + public: + struct ResourceShare + { + std::string resourceShareName; + std::string resourceShareId; + std::string createTime; + std::string resourceShareStatus; + std::string updateTime; + std::string resourceShareOwner; + bool allowExternalTargets; + }; + + + CreateResourceShareResult(); + explicit CreateResourceShareResult(const std::string &payload); + ~CreateResourceShareResult(); + ResourceShare getResourceShare()const; + + protected: + void parse(const std::string &payload); + private: + ResourceShare resourceShare_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_CREATERESOURCESHARERESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareRequest.h new file mode 100644 index 000000000..4615aac49 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareRequest.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_RESOURCESHARING_MODEL_DELETERESOURCESHAREREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DELETERESOURCESHAREREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT DeleteResourceShareRequest : public RpcServiceRequest { +public: + DeleteResourceShareRequest(); + ~DeleteResourceShareRequest(); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + +private: + std::string resourceShareId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DELETERESOURCESHAREREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareResult.h new file mode 100644 index 000000000..17fcdd014 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DeleteResourceShareResult.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_RESOURCESHARING_MODEL_DELETERESOURCESHARERESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DELETERESOURCESHARERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT DeleteResourceShareResult : public ServiceResult + { + public: + + + DeleteResourceShareResult(); + explicit DeleteResourceShareResult(const std::string &payload); + ~DeleteResourceShareResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DELETERESOURCESHARERESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DescribeRegionsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..c90b8e652 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/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_RESOURCESHARING_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT DescribeRegionsRequest : public RpcServiceRequest { +public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + std::string getAcceptLanguage() const; + void setAcceptLanguage(const std::string &acceptLanguage); + +private: + std::string acceptLanguage_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DESCRIBEREGIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DescribeRegionsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DescribeRegionsResult.h new file mode 100644 index 000000000..476928003 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DescribeRegionsResult.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_RESOURCESHARING_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct Region + { + std::string regionId; + std::string regionEndpoint; + std::string localName; + }; + + + DescribeRegionsResult(); + explicit DescribeRegionsResult(const std::string &payload); + ~DescribeRegionsResult(); + std::vector getRegions()const; + + protected: + void parse(const std::string &payload); + private: + std::vector regions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionRequest.h new file mode 100644 index 000000000..e8021ea57 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionRequest.h @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT DisassociateResourceSharePermissionRequest : public RpcServiceRequest { +public: + DisassociateResourceSharePermissionRequest(); + ~DisassociateResourceSharePermissionRequest(); + std::string getPermissionName() const; + void setPermissionName(const std::string &permissionName); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + +private: + std::string permissionName_; + std::string resourceShareId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionResult.h new file mode 100644 index 000000000..98bd81b1a --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceSharePermissionResult.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_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT DisassociateResourceSharePermissionResult : public ServiceResult + { + public: + + + DisassociateResourceSharePermissionResult(); + explicit DisassociateResourceSharePermissionResult(const std::string &payload); + ~DisassociateResourceSharePermissionResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREPERMISSIONRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareRequest.h new file mode 100644 index 000000000..3226492eb --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareRequest.h @@ -0,0 +1,55 @@ +/* + * 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_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT DisassociateResourceShareRequest : public RpcServiceRequest { +public: + struct Resources { + std::string resourceId; + std::string resourceType; + }; + DisassociateResourceShareRequest(); + ~DisassociateResourceShareRequest(); + std::string getResourceOwner() const; + void setResourceOwner(const std::string &resourceOwner); + std::vector getResources() const; + void setResources(const std::vector &resources); + std::vector getTargets() const; + void setTargets(const std::vector &targets); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + +private: + std::string resourceOwner_; + std::vector resources_; + std::vector targets_; + std::string resourceShareId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHAREREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareResult.h new file mode 100644 index 000000000..33ca23a79 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/DisassociateResourceShareResult.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_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHARERESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHARERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT DisassociateResourceShareResult : public ServiceResult + { + public: + struct ResourceShareAssociation + { + std::string entityId; + std::string resourceShareName; + std::string entityType; + std::string resourceShareId; + std::string associationStatusMessage; + std::string associationType; + std::string createTime; + std::string updateTime; + std::string targetProperty; + std::string associationStatus; + }; + + + DisassociateResourceShareResult(); + explicit DisassociateResourceShareResult(const std::string &payload); + ~DisassociateResourceShareResult(); + std::vector getResourceShareAssociations()const; + + protected: + void parse(const std::string &payload); + private: + std::vector resourceShareAssociations_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_DISASSOCIATERESOURCESHARERESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryRequest.h new file mode 100644 index 000000000..2fef21ce9 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryRequest.h @@ -0,0 +1,39 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT EnableSharingWithResourceDirectoryRequest : public RpcServiceRequest { +public: + EnableSharingWithResourceDirectoryRequest(); + ~EnableSharingWithResourceDirectoryRequest(); + +private: +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryResult.h new file mode 100644 index 000000000..4bd7a2320 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/EnableSharingWithResourceDirectoryResult.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_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT EnableSharingWithResourceDirectoryResult : public ServiceResult + { + public: + + + EnableSharingWithResourceDirectoryResult(); + explicit EnableSharingWithResourceDirectoryResult(const std::string &payload); + ~EnableSharingWithResourceDirectoryResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_ENABLESHARINGWITHRESOURCEDIRECTORYRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionRequest.h new file mode 100644 index 000000000..df64a7545 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionRequest.h @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_GETPERMISSIONREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_GETPERMISSIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT GetPermissionRequest : public RpcServiceRequest { +public: + GetPermissionRequest(); + ~GetPermissionRequest(); + std::string getPermissionVersion() const; + void setPermissionVersion(const std::string &permissionVersion); + std::string getPermissionName() const; + void setPermissionName(const std::string &permissionName); + +private: + std::string permissionVersion_; + std::string permissionName_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_GETPERMISSIONREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionResult.h new file mode 100644 index 000000000..6dce05b58 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/GetPermissionResult.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_RESOURCESHARING_MODEL_GETPERMISSIONRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_GETPERMISSIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT GetPermissionResult : public ServiceResult + { + public: + struct Permission + { + std::string permissionName; + bool defaultVersion; + std::string createTime; + std::string permission; + std::string updateTime; + std::string resourceType; + bool defaultPermission; + std::string permissionVersion; + }; + + + GetPermissionResult(); + explicit GetPermissionResult(const std::string &payload); + ~GetPermissionResult(); + Permission getPermission()const; + + protected: + void parse(const std::string &payload); + private: + Permission permission_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_GETPERMISSIONRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsRequest.h new file mode 100644 index 000000000..ed4e213e7 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsRequest.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_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListPermissionVersionsRequest : public RpcServiceRequest { +public: + ListPermissionVersionsRequest(); + ~ListPermissionVersionsRequest(); + std::string getPermissionName() const; + void setPermissionName(const std::string &permissionName); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::string permissionName_; + std::string nextToken_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsResult.h new file mode 100644 index 000000000..0ef5153cd --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionVersionsResult.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_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListPermissionVersionsResult : public ServiceResult + { + public: + struct Permission + { + std::string permissionName; + bool defaultVersion; + std::string createTime; + std::string updateTime; + std::string resourceType; + bool defaultPermission; + std::string permissionVersion; + }; + + + ListPermissionVersionsResult(); + explicit ListPermissionVersionsResult(const std::string &payload); + ~ListPermissionVersionsResult(); + std::string getNextToken()const; + std::vector getPermissions()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector permissions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONVERSIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsRequest.h new file mode 100644 index 000000000..8636b0907 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsRequest.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_RESOURCESHARING_MODEL_LISTPERMISSIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListPermissionsRequest : public RpcServiceRequest { +public: + ListPermissionsRequest(); + ~ListPermissionsRequest(); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::string resourceType_; + std::string nextToken_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsResult.h new file mode 100644 index 000000000..71e559162 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListPermissionsResult.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_RESOURCESHARING_MODEL_LISTPERMISSIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListPermissionsResult : public ServiceResult + { + public: + struct Permission + { + std::string permissionName; + bool defaultVersion; + std::string createTime; + std::string updateTime; + std::string resourceType; + bool defaultPermission; + std::string permissionVersion; + }; + + + ListPermissionsResult(); + explicit ListPermissionsResult(const std::string &payload); + ~ListPermissionsResult(); + std::string getNextToken()const; + std::vector getPermissions()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector permissions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTPERMISSIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsRequest.h new file mode 100644 index 000000000..048d0e501 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsRequest.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_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceShareAssociationsRequest : public RpcServiceRequest { +public: + ListResourceShareAssociationsRequest(); + ~ListResourceShareAssociationsRequest(); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getResourceShareIds() const; + void setResourceShareIds(const std::vector &resourceShareIds); + std::string getResourceId() const; + void setResourceId(const std::string &resourceId); + std::string getTarget() const; + void setTarget(const std::string &target); + std::string getAssociationType() const; + void setAssociationType(const std::string &associationType); + std::string getAssociationStatus() const; + void setAssociationStatus(const std::string &associationStatus); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::string nextToken_; + std::vector resourceShareIds_; + std::string resourceId_; + std::string target_; + std::string associationType_; + std::string associationStatus_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsResult.h new file mode 100644 index 000000000..d279426dd --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareAssociationsResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceShareAssociationsResult : public ServiceResult + { + public: + struct ResourceShareAssociation + { + struct AssociationFailedDetail + { + std::string status; + std::string entityId; + std::string entityType; + std::string associateType; + std::string statusMessage; + }; + std::string entityId; + std::string resourceShareName; + std::string entityType; + std::string resourceShareId; + std::string associationStatusMessage; + std::vector associationFailedDetails; + std::string associationType; + std::string createTime; + std::string updateTime; + bool external; + std::string targetProperty; + std::string associationStatus; + }; + + + ListResourceShareAssociationsResult(); + explicit ListResourceShareAssociationsResult(const std::string &payload); + ~ListResourceShareAssociationsResult(); + std::vector getResourceShareAssociations()const; + std::string getNextToken()const; + + protected: + void parse(const std::string &payload); + private: + std::vector resourceShareAssociations_; + std::string nextToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREASSOCIATIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsRequest.h new file mode 100644 index 000000000..6ea46bd4f --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsRequest.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_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceShareInvitationsRequest : public RpcServiceRequest { +public: + ListResourceShareInvitationsRequest(); + ~ListResourceShareInvitationsRequest(); + std::vector getResourceShareInvitationIds() const; + void setResourceShareInvitationIds(const std::vector &resourceShareInvitationIds); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getResourceShareIds() const; + void setResourceShareIds(const std::vector &resourceShareIds); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::vector resourceShareInvitationIds_; + std::string nextToken_; + std::vector resourceShareIds_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsResult.h new file mode 100644 index 000000000..75959fea6 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceShareInvitationsResult.h @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceShareInvitationsResult : public ServiceResult + { + public: + struct ResourceShareInvitation + { + struct InvitationFailedDetail + { + std::string status; + std::string resourceId; + std::string associateType; + std::string resourceType; + std::string statusMessage; + }; + std::string status; + std::string resourceShareId; + std::string resourceShareName; + std::string senderAccountId; + std::string receiverAccountId; + std::string createTime; + std::vector invitationFailedDetails; + std::string resourceShareInvitationId; + }; + + + ListResourceShareInvitationsResult(); + explicit ListResourceShareInvitationsResult(const std::string &payload); + ~ListResourceShareInvitationsResult(); + std::vector getResourceShareInvitations()const; + std::string getNextToken()const; + + protected: + void parse(const std::string &payload); + private: + std::vector resourceShareInvitations_; + std::string nextToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREINVITATIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsRequest.h new file mode 100644 index 000000000..4dd071a2c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsRequest.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_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceSharePermissionsRequest : public RpcServiceRequest { +public: + ListResourceSharePermissionsRequest(); + ~ListResourceSharePermissionsRequest(); + std::string getResourceOwner() const; + void setResourceOwner(const std::string &resourceOwner); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getMaxResults() const; + void setMaxResults(int maxResults); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + +private: + std::string resourceOwner_; + std::string nextToken_; + int maxResults_; + std::string resourceShareId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsResult.h new file mode 100644 index 000000000..52bfde239 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharePermissionsResult.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_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceSharePermissionsResult : public ServiceResult + { + public: + struct Permission + { + std::string permissionName; + bool defaultVersion; + std::string createTime; + std::string updateTime; + std::string resourceType; + bool defaultPermission; + std::string permissionVersion; + }; + + + ListResourceSharePermissionsResult(); + explicit ListResourceSharePermissionsResult(const std::string &payload); + ~ListResourceSharePermissionsResult(); + std::string getNextToken()const; + std::vector getPermissions()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector permissions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHAREPERMISSIONSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesRequest.h new file mode 100644 index 000000000..915387b6a --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesRequest.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_RESOURCESHARING_MODEL_LISTRESOURCESHARESREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHARESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceSharesRequest : public RpcServiceRequest { +public: + ListResourceSharesRequest(); + ~ListResourceSharesRequest(); + std::string getResourceShareName() const; + void setResourceShareName(const std::string &resourceShareName); + std::string getPermissionName() const; + void setPermissionName(const std::string &permissionName); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getResourceShareIds() const; + void setResourceShareIds(const std::vector &resourceShareIds); + std::string getResourceOwner() const; + void setResourceOwner(const std::string &resourceOwner); + std::string getResourceShareStatus() const; + void setResourceShareStatus(const std::string &resourceShareStatus); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::string resourceShareName_; + std::string permissionName_; + std::string resourceGroupId_; + std::string nextToken_; + std::vector resourceShareIds_; + std::string resourceOwner_; + std::string resourceShareStatus_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHARESREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesResult.h new file mode 100644 index 000000000..71228808e --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListResourceSharesResult.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_RESOURCESHARING_MODEL_LISTRESOURCESHARESRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHARESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListResourceSharesResult : public ServiceResult + { + public: + struct ResourceShare + { + std::string resourceShareName; + std::string resourceShareId; + std::string resourceGroupId; + std::string createTime; + std::string resourceShareStatus; + std::string updateTime; + std::string resourceShareOwner; + bool allowExternalTargets; + }; + + + ListResourceSharesResult(); + explicit ListResourceSharesResult(const std::string &payload); + ~ListResourceSharesResult(); + std::vector getResourceShares()const; + std::string getNextToken()const; + + protected: + void parse(const std::string &payload); + private: + std::vector resourceShares_; + std::string nextToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTRESOURCESHARESRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesRequest.h new file mode 100644 index 000000000..4a5ce96d6 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesRequest.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_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListSharedResourcesRequest : public RpcServiceRequest { +public: + ListSharedResourcesRequest(); + ~ListSharedResourcesRequest(); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getResourceShareIds() const; + void setResourceShareIds(const std::vector &resourceShareIds); + std::string getResourceOwner() const; + void setResourceOwner(const std::string &resourceOwner); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getTarget() const; + void setTarget(const std::string &target); + int getMaxResults() const; + void setMaxResults(int maxResults); + std::vector getResourceIds() const; + void setResourceIds(const std::vector &resourceIds); + +private: + std::string nextToken_; + std::vector resourceShareIds_; + std::string resourceOwner_; + std::string resourceType_; + std::string target_; + int maxResults_; + std::vector resourceIds_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesResult.h new file mode 100644 index 000000000..8da7fe040 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedResourcesResult.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_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListSharedResourcesResult : public ServiceResult + { + public: + struct SharedResource + { + std::string resourceShareId; + std::string resourceId; + std::string createTime; + std::string updateTime; + std::string resourceStatusMessage; + std::string resourceStatus; + std::string resourceType; + }; + + + ListSharedResourcesResult(); + explicit ListSharedResourcesResult(const std::string &payload); + ~ListSharedResourcesResult(); + std::string getNextToken()const; + std::vector getSharedResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector sharedResources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDRESOURCESRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsRequest.h new file mode 100644 index 000000000..161189068 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsRequest.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_RESOURCESHARING_MODEL_LISTSHAREDTARGETSREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDTARGETSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT ListSharedTargetsRequest : public RpcServiceRequest { +public: + ListSharedTargetsRequest(); + ~ListSharedTargetsRequest(); + std::vector getTargets() const; + void setTargets(const std::vector &targets); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getResourceShareIds() const; + void setResourceShareIds(const std::vector &resourceShareIds); + std::string getResourceId() const; + void setResourceId(const std::string &resourceId); + std::string getResourceOwner() const; + void setResourceOwner(const std::string &resourceOwner); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::vector targets_; + std::string nextToken_; + std::vector resourceShareIds_; + std::string resourceId_; + std::string resourceOwner_; + std::string resourceType_; + int maxResults_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDTARGETSREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsResult.h new file mode 100644 index 000000000..f91e204e6 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/ListSharedTargetsResult.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_RESOURCESHARING_MODEL_LISTSHAREDTARGETSRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDTARGETSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT ListSharedTargetsResult : public ServiceResult + { + public: + struct SharedTarget + { + std::string resourceShareId; + std::string createTime; + std::string updateTime; + bool external; + std::string targetProperty; + std::string targetId; + }; + + + ListSharedTargetsResult(); + explicit ListSharedTargetsResult(const std::string &payload); + ~ListSharedTargetsResult(); + std::string getNextToken()const; + std::vector getSharedTargets()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector sharedTargets_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_LISTSHAREDTARGETSRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationRequest.h new file mode 100644 index 000000000..167c02f1c --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationRequest.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_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT RejectResourceShareInvitationRequest : public RpcServiceRequest { +public: + RejectResourceShareInvitationRequest(); + ~RejectResourceShareInvitationRequest(); + std::string getResourceShareInvitationId() const; + void setResourceShareInvitationId(const std::string &resourceShareInvitationId); + +private: + std::string resourceShareInvitationId_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationResult.h new file mode 100644 index 000000000..f344351aa --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/RejectResourceShareInvitationResult.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_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONRESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT RejectResourceShareInvitationResult : public ServiceResult + { + public: + struct ResourceShareInvitation + { + std::string resourceShareId; + std::string resourceShareName; + std::string status; + std::string senderAccountId; + std::string receiverAccountId; + std::string createTime; + std::string resourceShareInvitationId; + }; + + + RejectResourceShareInvitationResult(); + explicit RejectResourceShareInvitationResult(const std::string &payload); + ~RejectResourceShareInvitationResult(); + ResourceShareInvitation getResourceShareInvitation()const; + + protected: + void parse(const std::string &payload); + private: + ResourceShareInvitation resourceShareInvitation_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_REJECTRESOURCESHAREINVITATIONRESULT_H_ \ No newline at end of file diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareRequest.h b/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareRequest.h new file mode 100644 index 000000000..10050c95f --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareRequest.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_RESOURCESHARING_MODEL_UPDATERESOURCESHAREREQUEST_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_UPDATERESOURCESHAREREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ResourceSharing { +namespace Model { +class ALIBABACLOUD_RESOURCESHARING_EXPORT UpdateResourceShareRequest : public RpcServiceRequest { +public: + UpdateResourceShareRequest(); + ~UpdateResourceShareRequest(); + std::string getResourceShareName() const; + void setResourceShareName(const std::string &resourceShareName); + std::string getResourceShareId() const; + void setResourceShareId(const std::string &resourceShareId); + bool getAllowExternalTargets() const; + void setAllowExternalTargets(bool allowExternalTargets); + +private: + std::string resourceShareName_; + std::string resourceShareId_; + bool allowExternalTargets_; +}; +} // namespace Model +} // namespace ResourceSharing +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_UPDATERESOURCESHAREREQUEST_H_ diff --git a/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareResult.h b/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareResult.h new file mode 100644 index 000000000..fa98cac26 --- /dev/null +++ b/resourcesharing/include/alibabacloud/resourcesharing/model/UpdateResourceShareResult.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_RESOURCESHARING_MODEL_UPDATERESOURCESHARERESULT_H_ +#define ALIBABACLOUD_RESOURCESHARING_MODEL_UPDATERESOURCESHARERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ResourceSharing + { + namespace Model + { + class ALIBABACLOUD_RESOURCESHARING_EXPORT UpdateResourceShareResult : public ServiceResult + { + public: + struct ResourceShare + { + std::string resourceShareName; + std::string resourceShareId; + std::string createTime; + std::string resourceShareStatus; + std::string updateTime; + std::string resourceShareOwner; + bool allowExternalTargets; + }; + + + UpdateResourceShareResult(); + explicit UpdateResourceShareResult(const std::string &payload); + ~UpdateResourceShareResult(); + ResourceShare getResourceShare()const; + + protected: + void parse(const std::string &payload); + private: + ResourceShare resourceShare_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RESOURCESHARING_MODEL_UPDATERESOURCESHARERESULT_H_ \ No newline at end of file diff --git a/resourcesharing/src/ResourceSharingClient.cc b/resourcesharing/src/ResourceSharingClient.cc new file mode 100644 index 000000000..3fb1e3d15 --- /dev/null +++ b/resourcesharing/src/ResourceSharingClient.cc @@ -0,0 +1,845 @@ +/* + * 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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +namespace +{ + const std::string SERVICE_NAME = "ResourceSharing"; +} + +ResourceSharingClient::ResourceSharingClient(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, "ressharing"); +} + +ResourceSharingClient::ResourceSharingClient(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, "ressharing"); +} + +ResourceSharingClient::ResourceSharingClient(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, "ressharing"); +} + +ResourceSharingClient::~ResourceSharingClient() +{} + +ResourceSharingClient::AcceptResourceShareInvitationOutcome ResourceSharingClient::acceptResourceShareInvitation(const AcceptResourceShareInvitationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AcceptResourceShareInvitationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AcceptResourceShareInvitationOutcome(AcceptResourceShareInvitationResult(outcome.result())); + else + return AcceptResourceShareInvitationOutcome(outcome.error()); +} + +void ResourceSharingClient::acceptResourceShareInvitationAsync(const AcceptResourceShareInvitationRequest& request, const AcceptResourceShareInvitationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, acceptResourceShareInvitation(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::AcceptResourceShareInvitationOutcomeCallable ResourceSharingClient::acceptResourceShareInvitationCallable(const AcceptResourceShareInvitationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->acceptResourceShareInvitation(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::AssociateResourceShareOutcome ResourceSharingClient::associateResourceShare(const AssociateResourceShareRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AssociateResourceShareOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AssociateResourceShareOutcome(AssociateResourceShareResult(outcome.result())); + else + return AssociateResourceShareOutcome(outcome.error()); +} + +void ResourceSharingClient::associateResourceShareAsync(const AssociateResourceShareRequest& request, const AssociateResourceShareAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, associateResourceShare(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::AssociateResourceShareOutcomeCallable ResourceSharingClient::associateResourceShareCallable(const AssociateResourceShareRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->associateResourceShare(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::AssociateResourceSharePermissionOutcome ResourceSharingClient::associateResourceSharePermission(const AssociateResourceSharePermissionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AssociateResourceSharePermissionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AssociateResourceSharePermissionOutcome(AssociateResourceSharePermissionResult(outcome.result())); + else + return AssociateResourceSharePermissionOutcome(outcome.error()); +} + +void ResourceSharingClient::associateResourceSharePermissionAsync(const AssociateResourceSharePermissionRequest& request, const AssociateResourceSharePermissionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, associateResourceSharePermission(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::AssociateResourceSharePermissionOutcomeCallable ResourceSharingClient::associateResourceSharePermissionCallable(const AssociateResourceSharePermissionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->associateResourceSharePermission(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ChangeResourceGroupOutcome ResourceSharingClient::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 ResourceSharingClient::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)); +} + +ResourceSharingClient::ChangeResourceGroupOutcomeCallable ResourceSharingClient::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(); +} + +ResourceSharingClient::CheckSharingWithResourceDirectoryStatusOutcome ResourceSharingClient::checkSharingWithResourceDirectoryStatus(const CheckSharingWithResourceDirectoryStatusRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CheckSharingWithResourceDirectoryStatusOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CheckSharingWithResourceDirectoryStatusOutcome(CheckSharingWithResourceDirectoryStatusResult(outcome.result())); + else + return CheckSharingWithResourceDirectoryStatusOutcome(outcome.error()); +} + +void ResourceSharingClient::checkSharingWithResourceDirectoryStatusAsync(const CheckSharingWithResourceDirectoryStatusRequest& request, const CheckSharingWithResourceDirectoryStatusAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, checkSharingWithResourceDirectoryStatus(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::CheckSharingWithResourceDirectoryStatusOutcomeCallable ResourceSharingClient::checkSharingWithResourceDirectoryStatusCallable(const CheckSharingWithResourceDirectoryStatusRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->checkSharingWithResourceDirectoryStatus(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::CreateResourceShareOutcome ResourceSharingClient::createResourceShare(const CreateResourceShareRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateResourceShareOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateResourceShareOutcome(CreateResourceShareResult(outcome.result())); + else + return CreateResourceShareOutcome(outcome.error()); +} + +void ResourceSharingClient::createResourceShareAsync(const CreateResourceShareRequest& request, const CreateResourceShareAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createResourceShare(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::CreateResourceShareOutcomeCallable ResourceSharingClient::createResourceShareCallable(const CreateResourceShareRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createResourceShare(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::DeleteResourceShareOutcome ResourceSharingClient::deleteResourceShare(const DeleteResourceShareRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteResourceShareOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteResourceShareOutcome(DeleteResourceShareResult(outcome.result())); + else + return DeleteResourceShareOutcome(outcome.error()); +} + +void ResourceSharingClient::deleteResourceShareAsync(const DeleteResourceShareRequest& request, const DeleteResourceShareAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteResourceShare(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::DeleteResourceShareOutcomeCallable ResourceSharingClient::deleteResourceShareCallable(const DeleteResourceShareRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteResourceShare(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::DescribeRegionsOutcome ResourceSharingClient::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 ResourceSharingClient::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)); +} + +ResourceSharingClient::DescribeRegionsOutcomeCallable ResourceSharingClient::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(); +} + +ResourceSharingClient::DisassociateResourceShareOutcome ResourceSharingClient::disassociateResourceShare(const DisassociateResourceShareRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DisassociateResourceShareOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DisassociateResourceShareOutcome(DisassociateResourceShareResult(outcome.result())); + else + return DisassociateResourceShareOutcome(outcome.error()); +} + +void ResourceSharingClient::disassociateResourceShareAsync(const DisassociateResourceShareRequest& request, const DisassociateResourceShareAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, disassociateResourceShare(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::DisassociateResourceShareOutcomeCallable ResourceSharingClient::disassociateResourceShareCallable(const DisassociateResourceShareRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->disassociateResourceShare(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::DisassociateResourceSharePermissionOutcome ResourceSharingClient::disassociateResourceSharePermission(const DisassociateResourceSharePermissionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DisassociateResourceSharePermissionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DisassociateResourceSharePermissionOutcome(DisassociateResourceSharePermissionResult(outcome.result())); + else + return DisassociateResourceSharePermissionOutcome(outcome.error()); +} + +void ResourceSharingClient::disassociateResourceSharePermissionAsync(const DisassociateResourceSharePermissionRequest& request, const DisassociateResourceSharePermissionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, disassociateResourceSharePermission(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::DisassociateResourceSharePermissionOutcomeCallable ResourceSharingClient::disassociateResourceSharePermissionCallable(const DisassociateResourceSharePermissionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->disassociateResourceSharePermission(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::EnableSharingWithResourceDirectoryOutcome ResourceSharingClient::enableSharingWithResourceDirectory(const EnableSharingWithResourceDirectoryRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EnableSharingWithResourceDirectoryOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EnableSharingWithResourceDirectoryOutcome(EnableSharingWithResourceDirectoryResult(outcome.result())); + else + return EnableSharingWithResourceDirectoryOutcome(outcome.error()); +} + +void ResourceSharingClient::enableSharingWithResourceDirectoryAsync(const EnableSharingWithResourceDirectoryRequest& request, const EnableSharingWithResourceDirectoryAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, enableSharingWithResourceDirectory(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::EnableSharingWithResourceDirectoryOutcomeCallable ResourceSharingClient::enableSharingWithResourceDirectoryCallable(const EnableSharingWithResourceDirectoryRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->enableSharingWithResourceDirectory(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::GetPermissionOutcome ResourceSharingClient::getPermission(const GetPermissionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetPermissionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetPermissionOutcome(GetPermissionResult(outcome.result())); + else + return GetPermissionOutcome(outcome.error()); +} + +void ResourceSharingClient::getPermissionAsync(const GetPermissionRequest& request, const GetPermissionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getPermission(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::GetPermissionOutcomeCallable ResourceSharingClient::getPermissionCallable(const GetPermissionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getPermission(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListPermissionVersionsOutcome ResourceSharingClient::listPermissionVersions(const ListPermissionVersionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListPermissionVersionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListPermissionVersionsOutcome(ListPermissionVersionsResult(outcome.result())); + else + return ListPermissionVersionsOutcome(outcome.error()); +} + +void ResourceSharingClient::listPermissionVersionsAsync(const ListPermissionVersionsRequest& request, const ListPermissionVersionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listPermissionVersions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListPermissionVersionsOutcomeCallable ResourceSharingClient::listPermissionVersionsCallable(const ListPermissionVersionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listPermissionVersions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListPermissionsOutcome ResourceSharingClient::listPermissions(const ListPermissionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListPermissionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListPermissionsOutcome(ListPermissionsResult(outcome.result())); + else + return ListPermissionsOutcome(outcome.error()); +} + +void ResourceSharingClient::listPermissionsAsync(const ListPermissionsRequest& request, const ListPermissionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listPermissions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListPermissionsOutcomeCallable ResourceSharingClient::listPermissionsCallable(const ListPermissionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listPermissions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListResourceShareAssociationsOutcome ResourceSharingClient::listResourceShareAssociations(const ListResourceShareAssociationsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourceShareAssociationsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourceShareAssociationsOutcome(ListResourceShareAssociationsResult(outcome.result())); + else + return ListResourceShareAssociationsOutcome(outcome.error()); +} + +void ResourceSharingClient::listResourceShareAssociationsAsync(const ListResourceShareAssociationsRequest& request, const ListResourceShareAssociationsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourceShareAssociations(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListResourceShareAssociationsOutcomeCallable ResourceSharingClient::listResourceShareAssociationsCallable(const ListResourceShareAssociationsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourceShareAssociations(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListResourceShareInvitationsOutcome ResourceSharingClient::listResourceShareInvitations(const ListResourceShareInvitationsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourceShareInvitationsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourceShareInvitationsOutcome(ListResourceShareInvitationsResult(outcome.result())); + else + return ListResourceShareInvitationsOutcome(outcome.error()); +} + +void ResourceSharingClient::listResourceShareInvitationsAsync(const ListResourceShareInvitationsRequest& request, const ListResourceShareInvitationsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourceShareInvitations(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListResourceShareInvitationsOutcomeCallable ResourceSharingClient::listResourceShareInvitationsCallable(const ListResourceShareInvitationsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourceShareInvitations(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListResourceSharePermissionsOutcome ResourceSharingClient::listResourceSharePermissions(const ListResourceSharePermissionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourceSharePermissionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourceSharePermissionsOutcome(ListResourceSharePermissionsResult(outcome.result())); + else + return ListResourceSharePermissionsOutcome(outcome.error()); +} + +void ResourceSharingClient::listResourceSharePermissionsAsync(const ListResourceSharePermissionsRequest& request, const ListResourceSharePermissionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourceSharePermissions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListResourceSharePermissionsOutcomeCallable ResourceSharingClient::listResourceSharePermissionsCallable(const ListResourceSharePermissionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourceSharePermissions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListResourceSharesOutcome ResourceSharingClient::listResourceShares(const ListResourceSharesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourceSharesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourceSharesOutcome(ListResourceSharesResult(outcome.result())); + else + return ListResourceSharesOutcome(outcome.error()); +} + +void ResourceSharingClient::listResourceSharesAsync(const ListResourceSharesRequest& request, const ListResourceSharesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourceShares(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListResourceSharesOutcomeCallable ResourceSharingClient::listResourceSharesCallable(const ListResourceSharesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourceShares(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListSharedResourcesOutcome ResourceSharingClient::listSharedResources(const ListSharedResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListSharedResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListSharedResourcesOutcome(ListSharedResourcesResult(outcome.result())); + else + return ListSharedResourcesOutcome(outcome.error()); +} + +void ResourceSharingClient::listSharedResourcesAsync(const ListSharedResourcesRequest& request, const ListSharedResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listSharedResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListSharedResourcesOutcomeCallable ResourceSharingClient::listSharedResourcesCallable(const ListSharedResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listSharedResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::ListSharedTargetsOutcome ResourceSharingClient::listSharedTargets(const ListSharedTargetsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListSharedTargetsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListSharedTargetsOutcome(ListSharedTargetsResult(outcome.result())); + else + return ListSharedTargetsOutcome(outcome.error()); +} + +void ResourceSharingClient::listSharedTargetsAsync(const ListSharedTargetsRequest& request, const ListSharedTargetsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listSharedTargets(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::ListSharedTargetsOutcomeCallable ResourceSharingClient::listSharedTargetsCallable(const ListSharedTargetsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listSharedTargets(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::RejectResourceShareInvitationOutcome ResourceSharingClient::rejectResourceShareInvitation(const RejectResourceShareInvitationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RejectResourceShareInvitationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RejectResourceShareInvitationOutcome(RejectResourceShareInvitationResult(outcome.result())); + else + return RejectResourceShareInvitationOutcome(outcome.error()); +} + +void ResourceSharingClient::rejectResourceShareInvitationAsync(const RejectResourceShareInvitationRequest& request, const RejectResourceShareInvitationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, rejectResourceShareInvitation(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::RejectResourceShareInvitationOutcomeCallable ResourceSharingClient::rejectResourceShareInvitationCallable(const RejectResourceShareInvitationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->rejectResourceShareInvitation(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ResourceSharingClient::UpdateResourceShareOutcome ResourceSharingClient::updateResourceShare(const UpdateResourceShareRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateResourceShareOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateResourceShareOutcome(UpdateResourceShareResult(outcome.result())); + else + return UpdateResourceShareOutcome(outcome.error()); +} + +void ResourceSharingClient::updateResourceShareAsync(const UpdateResourceShareRequest& request, const UpdateResourceShareAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateResourceShare(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ResourceSharingClient::UpdateResourceShareOutcomeCallable ResourceSharingClient::updateResourceShareCallable(const UpdateResourceShareRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateResourceShare(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/resourcesharing/src/model/AcceptResourceShareInvitationRequest.cc b/resourcesharing/src/model/AcceptResourceShareInvitationRequest.cc new file mode 100644 index 000000000..a63d77a13 --- /dev/null +++ b/resourcesharing/src/model/AcceptResourceShareInvitationRequest.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::ResourceSharing::Model::AcceptResourceShareInvitationRequest; + +AcceptResourceShareInvitationRequest::AcceptResourceShareInvitationRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "AcceptResourceShareInvitation") { + setMethod(HttpRequest::Method::Post); +} + +AcceptResourceShareInvitationRequest::~AcceptResourceShareInvitationRequest() {} + +std::string AcceptResourceShareInvitationRequest::getResourceShareInvitationId() const { + return resourceShareInvitationId_; +} + +void AcceptResourceShareInvitationRequest::setResourceShareInvitationId(const std::string &resourceShareInvitationId) { + resourceShareInvitationId_ = resourceShareInvitationId; + setParameter(std::string("ResourceShareInvitationId"), resourceShareInvitationId); +} + diff --git a/resourcesharing/src/model/AcceptResourceShareInvitationResult.cc b/resourcesharing/src/model/AcceptResourceShareInvitationResult.cc new file mode 100644 index 000000000..9260756ae --- /dev/null +++ b/resourcesharing/src/model/AcceptResourceShareInvitationResult.cc @@ -0,0 +1,80 @@ +/* + * 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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +AcceptResourceShareInvitationResult::AcceptResourceShareInvitationResult() : + ServiceResult() +{} + +AcceptResourceShareInvitationResult::AcceptResourceShareInvitationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AcceptResourceShareInvitationResult::~AcceptResourceShareInvitationResult() +{} + +void AcceptResourceShareInvitationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resourceShareInvitationNode = value["ResourceShareInvitation"]; + if(!resourceShareInvitationNode["ResourceShareInvitationId"].isNull()) + resourceShareInvitation_.resourceShareInvitationId = resourceShareInvitationNode["ResourceShareInvitationId"].asString(); + if(!resourceShareInvitationNode["ResourceShareId"].isNull()) + resourceShareInvitation_.resourceShareId = resourceShareInvitationNode["ResourceShareId"].asString(); + if(!resourceShareInvitationNode["ResourceShareName"].isNull()) + resourceShareInvitation_.resourceShareName = resourceShareInvitationNode["ResourceShareName"].asString(); + if(!resourceShareInvitationNode["SenderAccountId"].isNull()) + resourceShareInvitation_.senderAccountId = resourceShareInvitationNode["SenderAccountId"].asString(); + if(!resourceShareInvitationNode["ReceiverAccountId"].isNull()) + resourceShareInvitation_.receiverAccountId = resourceShareInvitationNode["ReceiverAccountId"].asString(); + if(!resourceShareInvitationNode["CreateTime"].isNull()) + resourceShareInvitation_.createTime = resourceShareInvitationNode["CreateTime"].asString(); + if(!resourceShareInvitationNode["Status"].isNull()) + resourceShareInvitation_.status = resourceShareInvitationNode["Status"].asString(); + auto allAcceptInvitationFailedDetailsNode = resourceShareInvitationNode["AcceptInvitationFailedDetails"]["AcceptInvitationFailedDetail"]; + for (auto resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail : allAcceptInvitationFailedDetailsNode) + { + ResourceShareInvitation::AcceptInvitationFailedDetail acceptInvitationFailedDetailObject; + if(!resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["Status"].isNull()) + acceptInvitationFailedDetailObject.status = resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["Status"].asString(); + if(!resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["StatusMessage"].isNull()) + acceptInvitationFailedDetailObject.statusMessage = resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["StatusMessage"].asString(); + if(!resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["AssociateType"].isNull()) + acceptInvitationFailedDetailObject.associateType = resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["AssociateType"].asString(); + if(!resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["ResourceId"].isNull()) + acceptInvitationFailedDetailObject.resourceId = resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["ResourceId"].asString(); + if(!resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["ResourceType"].isNull()) + acceptInvitationFailedDetailObject.resourceType = resourceShareInvitationNodeAcceptInvitationFailedDetailsAcceptInvitationFailedDetail["ResourceType"].asString(); + resourceShareInvitation_.acceptInvitationFailedDetails.push_back(acceptInvitationFailedDetailObject); + } + +} + +AcceptResourceShareInvitationResult::ResourceShareInvitation AcceptResourceShareInvitationResult::getResourceShareInvitation()const +{ + return resourceShareInvitation_; +} + diff --git a/resourcesharing/src/model/AssociateResourceSharePermissionRequest.cc b/resourcesharing/src/model/AssociateResourceSharePermissionRequest.cc new file mode 100644 index 000000000..0ba11d346 --- /dev/null +++ b/resourcesharing/src/model/AssociateResourceSharePermissionRequest.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::ResourceSharing::Model::AssociateResourceSharePermissionRequest; + +AssociateResourceSharePermissionRequest::AssociateResourceSharePermissionRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "AssociateResourceSharePermission") { + setMethod(HttpRequest::Method::Post); +} + +AssociateResourceSharePermissionRequest::~AssociateResourceSharePermissionRequest() {} + +bool AssociateResourceSharePermissionRequest::getReplace() const { + return replace_; +} + +void AssociateResourceSharePermissionRequest::setReplace(bool replace) { + replace_ = replace; + setParameter(std::string("Replace"), replace ? "true" : "false"); +} + +std::string AssociateResourceSharePermissionRequest::getPermissionName() const { + return permissionName_; +} + +void AssociateResourceSharePermissionRequest::setPermissionName(const std::string &permissionName) { + permissionName_ = permissionName; + setParameter(std::string("PermissionName"), permissionName); +} + +std::string AssociateResourceSharePermissionRequest::getResourceShareId() const { + return resourceShareId_; +} + +void AssociateResourceSharePermissionRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + diff --git a/resourcesharing/src/model/AssociateResourceSharePermissionResult.cc b/resourcesharing/src/model/AssociateResourceSharePermissionResult.cc new file mode 100644 index 000000000..4c2b81db0 --- /dev/null +++ b/resourcesharing/src/model/AssociateResourceSharePermissionResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +AssociateResourceSharePermissionResult::AssociateResourceSharePermissionResult() : + ServiceResult() +{} + +AssociateResourceSharePermissionResult::AssociateResourceSharePermissionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AssociateResourceSharePermissionResult::~AssociateResourceSharePermissionResult() +{} + +void AssociateResourceSharePermissionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/resourcesharing/src/model/AssociateResourceShareRequest.cc b/resourcesharing/src/model/AssociateResourceShareRequest.cc new file mode 100644 index 000000000..08f35fe17 --- /dev/null +++ b/resourcesharing/src/model/AssociateResourceShareRequest.cc @@ -0,0 +1,78 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ResourceSharing::Model::AssociateResourceShareRequest; + +AssociateResourceShareRequest::AssociateResourceShareRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "AssociateResourceShare") { + setMethod(HttpRequest::Method::Post); +} + +AssociateResourceShareRequest::~AssociateResourceShareRequest() {} + +std::vector AssociateResourceShareRequest::getResources() const { + return resources_; +} + +void AssociateResourceShareRequest::setResources(const std::vector &resources) { + resources_ = resources; + for(int dep1 = 0; dep1 != resources.size(); dep1++) { + auto resourcesObj = resources.at(dep1); + std::string resourcesObjStr = std::string("Resources") + "." + std::to_string(dep1 + 1); + setParameter(resourcesObjStr + ".ResourceId", resourcesObj.resourceId); + setParameter(resourcesObjStr + ".ResourceType", resourcesObj.resourceType); + } +} + +std::vector AssociateResourceShareRequest::getTargets() const { + return targets_; +} + +void AssociateResourceShareRequest::setTargets(const std::vector &targets) { + targets_ = targets; +} + +std::string AssociateResourceShareRequest::getResourceShareId() const { + return resourceShareId_; +} + +void AssociateResourceShareRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + +std::vector AssociateResourceShareRequest::getPermissionNames() const { + return permissionNames_; +} + +void AssociateResourceShareRequest::setPermissionNames(const std::vector &permissionNames) { + permissionNames_ = permissionNames; +} + +std::vector AssociateResourceShareRequest::getTargetProperties() const { + return targetProperties_; +} + +void AssociateResourceShareRequest::setTargetProperties(const std::vector &targetProperties) { + targetProperties_ = targetProperties; + for(int dep1 = 0; dep1 != targetProperties.size(); dep1++) { + setParameter(std::string("TargetProperties") + "." + std::to_string(dep1 + 1) + ".TargetId", targetProperties[dep1].targetId); + setParameter(std::string("TargetProperties") + "." + std::to_string(dep1 + 1) + ".Property", targetProperties[dep1].property); + } +} + diff --git a/resourcesharing/src/model/AssociateResourceShareResult.cc b/resourcesharing/src/model/AssociateResourceShareResult.cc new file mode 100644 index 000000000..c29e0245a --- /dev/null +++ b/resourcesharing/src/model/AssociateResourceShareResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +AssociateResourceShareResult::AssociateResourceShareResult() : + ServiceResult() +{} + +AssociateResourceShareResult::AssociateResourceShareResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AssociateResourceShareResult::~AssociateResourceShareResult() +{} + +void AssociateResourceShareResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourceShareAssociationsNode = value["ResourceShareAssociations"]["ResourceShareAssociation"]; + for (auto valueResourceShareAssociationsResourceShareAssociation : allResourceShareAssociationsNode) + { + ResourceShareAssociation resourceShareAssociationsObject; + if(!valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].isNull()) + resourceShareAssociationsObject.updateTime = valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityId"].isNull()) + resourceShareAssociationsObject.entityId = valueResourceShareAssociationsResourceShareAssociation["EntityId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].isNull()) + resourceShareAssociationsObject.resourceShareName = valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["CreateTime"].isNull()) + resourceShareAssociationsObject.createTime = valueResourceShareAssociationsResourceShareAssociation["CreateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityType"].isNull()) + resourceShareAssociationsObject.entityType = valueResourceShareAssociationsResourceShareAssociation["EntityType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].isNull()) + resourceShareAssociationsObject.resourceShareId = valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].isNull()) + resourceShareAssociationsObject.associationStatusMessage = valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationType"].isNull()) + resourceShareAssociationsObject.associationType = valueResourceShareAssociationsResourceShareAssociation["AssociationType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].isNull()) + resourceShareAssociationsObject.associationStatus = valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].isNull()) + resourceShareAssociationsObject.targetProperty = valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].asString(); + resourceShareAssociations_.push_back(resourceShareAssociationsObject); + } + +} + +std::vector AssociateResourceShareResult::getResourceShareAssociations()const +{ + return resourceShareAssociations_; +} + diff --git a/resourcesharing/src/model/ChangeResourceGroupRequest.cc b/resourcesharing/src/model/ChangeResourceGroupRequest.cc new file mode 100644 index 000000000..8e2bd95c2 --- /dev/null +++ b/resourcesharing/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::ResourceSharing::Model::ChangeResourceGroupRequest; + +ChangeResourceGroupRequest::ChangeResourceGroupRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "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/resourcesharing/src/model/ChangeResourceGroupResult.cc b/resourcesharing/src/model/ChangeResourceGroupResult.cc new file mode 100644 index 000000000..476240d94 --- /dev/null +++ b/resourcesharing/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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::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/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusRequest.cc b/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusRequest.cc new file mode 100644 index 000000000..322032246 --- /dev/null +++ b/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusRequest.cc @@ -0,0 +1,27 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ResourceSharing::Model::CheckSharingWithResourceDirectoryStatusRequest; + +CheckSharingWithResourceDirectoryStatusRequest::CheckSharingWithResourceDirectoryStatusRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "CheckSharingWithResourceDirectoryStatus") { + setMethod(HttpRequest::Method::Post); +} + +CheckSharingWithResourceDirectoryStatusRequest::~CheckSharingWithResourceDirectoryStatusRequest() {} + diff --git a/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusResult.cc b/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusResult.cc new file mode 100644 index 000000000..d79e00217 --- /dev/null +++ b/resourcesharing/src/model/CheckSharingWithResourceDirectoryStatusResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +CheckSharingWithResourceDirectoryStatusResult::CheckSharingWithResourceDirectoryStatusResult() : + ServiceResult() +{} + +CheckSharingWithResourceDirectoryStatusResult::CheckSharingWithResourceDirectoryStatusResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CheckSharingWithResourceDirectoryStatusResult::~CheckSharingWithResourceDirectoryStatusResult() +{} + +void CheckSharingWithResourceDirectoryStatusResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["EnableSharingWithRd"].isNull()) + enableSharingWithRd_ = value["EnableSharingWithRd"].asString() == "true"; + +} + +bool CheckSharingWithResourceDirectoryStatusResult::getEnableSharingWithRd()const +{ + return enableSharingWithRd_; +} + diff --git a/resourcesharing/src/model/CreateResourceShareRequest.cc b/resourcesharing/src/model/CreateResourceShareRequest.cc new file mode 100644 index 000000000..b90cc794c --- /dev/null +++ b/resourcesharing/src/model/CreateResourceShareRequest.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 + +using AlibabaCloud::ResourceSharing::Model::CreateResourceShareRequest; + +CreateResourceShareRequest::CreateResourceShareRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "CreateResourceShare") { + setMethod(HttpRequest::Method::Post); +} + +CreateResourceShareRequest::~CreateResourceShareRequest() {} + +std::string CreateResourceShareRequest::getResourceShareName() const { + return resourceShareName_; +} + +void CreateResourceShareRequest::setResourceShareName(const std::string &resourceShareName) { + resourceShareName_ = resourceShareName; + setParameter(std::string("ResourceShareName"), resourceShareName); +} + +std::vector CreateResourceShareRequest::getTargets() const { + return targets_; +} + +void CreateResourceShareRequest::setTargets(const std::vector &targets) { + targets_ = targets; +} + +std::string CreateResourceShareRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateResourceShareRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::vector CreateResourceShareRequest::getResources() const { + return resources_; +} + +void CreateResourceShareRequest::setResources(const std::vector &resources) { + resources_ = resources; + for(int dep1 = 0; dep1 != resources.size(); dep1++) { + auto resourcesObj = resources.at(dep1); + std::string resourcesObjStr = std::string("Resources") + "." + std::to_string(dep1 + 1); + setParameter(resourcesObjStr + ".ResourceId", resourcesObj.resourceId); + setParameter(resourcesObjStr + ".ResourceType", resourcesObj.resourceType); + } +} + +bool CreateResourceShareRequest::getAllowExternalTargets() const { + return allowExternalTargets_; +} + +void CreateResourceShareRequest::setAllowExternalTargets(bool allowExternalTargets) { + allowExternalTargets_ = allowExternalTargets; + setParameter(std::string("AllowExternalTargets"), allowExternalTargets ? "true" : "false"); +} + +std::vector CreateResourceShareRequest::getPermissionNames() const { + return permissionNames_; +} + +void CreateResourceShareRequest::setPermissionNames(const std::vector &permissionNames) { + permissionNames_ = permissionNames; +} + +std::vector CreateResourceShareRequest::getTargetProperties() const { + return targetProperties_; +} + +void CreateResourceShareRequest::setTargetProperties(const std::vector &targetProperties) { + targetProperties_ = targetProperties; + for(int dep1 = 0; dep1 != targetProperties.size(); dep1++) { + setParameter(std::string("TargetProperties") + "." + std::to_string(dep1 + 1) + ".TargetId", targetProperties[dep1].targetId); + setParameter(std::string("TargetProperties") + "." + std::to_string(dep1 + 1) + ".Property", targetProperties[dep1].property); + } +} + diff --git a/resourcesharing/src/model/CreateResourceShareResult.cc b/resourcesharing/src/model/CreateResourceShareResult.cc new file mode 100644 index 000000000..ee3047f73 --- /dev/null +++ b/resourcesharing/src/model/CreateResourceShareResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +CreateResourceShareResult::CreateResourceShareResult() : + ServiceResult() +{} + +CreateResourceShareResult::CreateResourceShareResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateResourceShareResult::~CreateResourceShareResult() +{} + +void CreateResourceShareResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resourceShareNode = value["ResourceShare"]; + if(!resourceShareNode["UpdateTime"].isNull()) + resourceShare_.updateTime = resourceShareNode["UpdateTime"].asString(); + if(!resourceShareNode["ResourceShareName"].isNull()) + resourceShare_.resourceShareName = resourceShareNode["ResourceShareName"].asString(); + if(!resourceShareNode["ResourceShareOwner"].isNull()) + resourceShare_.resourceShareOwner = resourceShareNode["ResourceShareOwner"].asString(); + if(!resourceShareNode["CreateTime"].isNull()) + resourceShare_.createTime = resourceShareNode["CreateTime"].asString(); + if(!resourceShareNode["ResourceShareId"].isNull()) + resourceShare_.resourceShareId = resourceShareNode["ResourceShareId"].asString(); + if(!resourceShareNode["ResourceShareStatus"].isNull()) + resourceShare_.resourceShareStatus = resourceShareNode["ResourceShareStatus"].asString(); + if(!resourceShareNode["AllowExternalTargets"].isNull()) + resourceShare_.allowExternalTargets = resourceShareNode["AllowExternalTargets"].asString() == "true"; + +} + +CreateResourceShareResult::ResourceShare CreateResourceShareResult::getResourceShare()const +{ + return resourceShare_; +} + diff --git a/resourcesharing/src/model/DeleteResourceShareRequest.cc b/resourcesharing/src/model/DeleteResourceShareRequest.cc new file mode 100644 index 000000000..3c40c6dbf --- /dev/null +++ b/resourcesharing/src/model/DeleteResourceShareRequest.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::ResourceSharing::Model::DeleteResourceShareRequest; + +DeleteResourceShareRequest::DeleteResourceShareRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "DeleteResourceShare") { + setMethod(HttpRequest::Method::Post); +} + +DeleteResourceShareRequest::~DeleteResourceShareRequest() {} + +std::string DeleteResourceShareRequest::getResourceShareId() const { + return resourceShareId_; +} + +void DeleteResourceShareRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + diff --git a/resourcesharing/src/model/DeleteResourceShareResult.cc b/resourcesharing/src/model/DeleteResourceShareResult.cc new file mode 100644 index 000000000..c4de88a6e --- /dev/null +++ b/resourcesharing/src/model/DeleteResourceShareResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +DeleteResourceShareResult::DeleteResourceShareResult() : + ServiceResult() +{} + +DeleteResourceShareResult::DeleteResourceShareResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteResourceShareResult::~DeleteResourceShareResult() +{} + +void DeleteResourceShareResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/resourcesharing/src/model/DescribeRegionsRequest.cc b/resourcesharing/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..1b2dea9f0 --- /dev/null +++ b/resourcesharing/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::ResourceSharing::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "DescribeRegions") { + setMethod(HttpRequest::Method::Post); +} + +DescribeRegionsRequest::~DescribeRegionsRequest() {} + +std::string DescribeRegionsRequest::getAcceptLanguage() const { + return acceptLanguage_; +} + +void DescribeRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) { + acceptLanguage_ = acceptLanguage; + setParameter(std::string("AcceptLanguage"), acceptLanguage); +} + diff --git a/resourcesharing/src/model/DescribeRegionsResult.cc b/resourcesharing/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..dd5de1f72 --- /dev/null +++ b/resourcesharing/src/model/DescribeRegionsResult.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 +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +DescribeRegionsResult::DescribeRegionsResult() : + ServiceResult() +{} + +DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRegionsResult::~DescribeRegionsResult() +{} + +void DescribeRegionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allRegionsNode = value["Regions"]["Region"]; + for (auto valueRegionsRegion : allRegionsNode) + { + Region regionsObject; + if(!valueRegionsRegion["RegionEndpoint"].isNull()) + regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString(); + if(!valueRegionsRegion["LocalName"].isNull()) + regionsObject.localName = valueRegionsRegion["LocalName"].asString(); + if(!valueRegionsRegion["RegionId"].isNull()) + regionsObject.regionId = valueRegionsRegion["RegionId"].asString(); + regions_.push_back(regionsObject); + } + +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + diff --git a/resourcesharing/src/model/DisassociateResourceSharePermissionRequest.cc b/resourcesharing/src/model/DisassociateResourceSharePermissionRequest.cc new file mode 100644 index 000000000..93d506b36 --- /dev/null +++ b/resourcesharing/src/model/DisassociateResourceSharePermissionRequest.cc @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ResourceSharing::Model::DisassociateResourceSharePermissionRequest; + +DisassociateResourceSharePermissionRequest::DisassociateResourceSharePermissionRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "DisassociateResourceSharePermission") { + setMethod(HttpRequest::Method::Post); +} + +DisassociateResourceSharePermissionRequest::~DisassociateResourceSharePermissionRequest() {} + +std::string DisassociateResourceSharePermissionRequest::getPermissionName() const { + return permissionName_; +} + +void DisassociateResourceSharePermissionRequest::setPermissionName(const std::string &permissionName) { + permissionName_ = permissionName; + setParameter(std::string("PermissionName"), permissionName); +} + +std::string DisassociateResourceSharePermissionRequest::getResourceShareId() const { + return resourceShareId_; +} + +void DisassociateResourceSharePermissionRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + diff --git a/resourcesharing/src/model/DisassociateResourceSharePermissionResult.cc b/resourcesharing/src/model/DisassociateResourceSharePermissionResult.cc new file mode 100644 index 000000000..488c8633f --- /dev/null +++ b/resourcesharing/src/model/DisassociateResourceSharePermissionResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +DisassociateResourceSharePermissionResult::DisassociateResourceSharePermissionResult() : + ServiceResult() +{} + +DisassociateResourceSharePermissionResult::DisassociateResourceSharePermissionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DisassociateResourceSharePermissionResult::~DisassociateResourceSharePermissionResult() +{} + +void DisassociateResourceSharePermissionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/resourcesharing/src/model/DisassociateResourceShareRequest.cc b/resourcesharing/src/model/DisassociateResourceShareRequest.cc new file mode 100644 index 000000000..041bb897d --- /dev/null +++ b/resourcesharing/src/model/DisassociateResourceShareRequest.cc @@ -0,0 +1,67 @@ +/* + * 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::ResourceSharing::Model::DisassociateResourceShareRequest; + +DisassociateResourceShareRequest::DisassociateResourceShareRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "DisassociateResourceShare") { + setMethod(HttpRequest::Method::Post); +} + +DisassociateResourceShareRequest::~DisassociateResourceShareRequest() {} + +std::string DisassociateResourceShareRequest::getResourceOwner() const { + return resourceOwner_; +} + +void DisassociateResourceShareRequest::setResourceOwner(const std::string &resourceOwner) { + resourceOwner_ = resourceOwner; + setParameter(std::string("ResourceOwner"), resourceOwner); +} + +std::vector DisassociateResourceShareRequest::getResources() const { + return resources_; +} + +void DisassociateResourceShareRequest::setResources(const std::vector &resources) { + resources_ = resources; + for(int dep1 = 0; dep1 != resources.size(); dep1++) { + auto resourcesObj = resources.at(dep1); + std::string resourcesObjStr = std::string("Resources") + "." + std::to_string(dep1 + 1); + setParameter(resourcesObjStr + ".ResourceId", resourcesObj.resourceId); + setParameter(resourcesObjStr + ".ResourceType", resourcesObj.resourceType); + } +} + +std::vector DisassociateResourceShareRequest::getTargets() const { + return targets_; +} + +void DisassociateResourceShareRequest::setTargets(const std::vector &targets) { + targets_ = targets; +} + +std::string DisassociateResourceShareRequest::getResourceShareId() const { + return resourceShareId_; +} + +void DisassociateResourceShareRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + diff --git a/resourcesharing/src/model/DisassociateResourceShareResult.cc b/resourcesharing/src/model/DisassociateResourceShareResult.cc new file mode 100644 index 000000000..36b1e52f2 --- /dev/null +++ b/resourcesharing/src/model/DisassociateResourceShareResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +DisassociateResourceShareResult::DisassociateResourceShareResult() : + ServiceResult() +{} + +DisassociateResourceShareResult::DisassociateResourceShareResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DisassociateResourceShareResult::~DisassociateResourceShareResult() +{} + +void DisassociateResourceShareResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourceShareAssociationsNode = value["ResourceShareAssociations"]["ResourceShareAssociation"]; + for (auto valueResourceShareAssociationsResourceShareAssociation : allResourceShareAssociationsNode) + { + ResourceShareAssociation resourceShareAssociationsObject; + if(!valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].isNull()) + resourceShareAssociationsObject.updateTime = valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityId"].isNull()) + resourceShareAssociationsObject.entityId = valueResourceShareAssociationsResourceShareAssociation["EntityId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].isNull()) + resourceShareAssociationsObject.resourceShareName = valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["CreateTime"].isNull()) + resourceShareAssociationsObject.createTime = valueResourceShareAssociationsResourceShareAssociation["CreateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityType"].isNull()) + resourceShareAssociationsObject.entityType = valueResourceShareAssociationsResourceShareAssociation["EntityType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].isNull()) + resourceShareAssociationsObject.resourceShareId = valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].isNull()) + resourceShareAssociationsObject.associationStatusMessage = valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationType"].isNull()) + resourceShareAssociationsObject.associationType = valueResourceShareAssociationsResourceShareAssociation["AssociationType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].isNull()) + resourceShareAssociationsObject.associationStatus = valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].isNull()) + resourceShareAssociationsObject.targetProperty = valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].asString(); + resourceShareAssociations_.push_back(resourceShareAssociationsObject); + } + +} + +std::vector DisassociateResourceShareResult::getResourceShareAssociations()const +{ + return resourceShareAssociations_; +} + diff --git a/resourcesharing/src/model/EnableSharingWithResourceDirectoryRequest.cc b/resourcesharing/src/model/EnableSharingWithResourceDirectoryRequest.cc new file mode 100644 index 000000000..397d7933b --- /dev/null +++ b/resourcesharing/src/model/EnableSharingWithResourceDirectoryRequest.cc @@ -0,0 +1,27 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ResourceSharing::Model::EnableSharingWithResourceDirectoryRequest; + +EnableSharingWithResourceDirectoryRequest::EnableSharingWithResourceDirectoryRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "EnableSharingWithResourceDirectory") { + setMethod(HttpRequest::Method::Post); +} + +EnableSharingWithResourceDirectoryRequest::~EnableSharingWithResourceDirectoryRequest() {} + diff --git a/resourcesharing/src/model/EnableSharingWithResourceDirectoryResult.cc b/resourcesharing/src/model/EnableSharingWithResourceDirectoryResult.cc new file mode 100644 index 000000000..04a2226c1 --- /dev/null +++ b/resourcesharing/src/model/EnableSharingWithResourceDirectoryResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +EnableSharingWithResourceDirectoryResult::EnableSharingWithResourceDirectoryResult() : + ServiceResult() +{} + +EnableSharingWithResourceDirectoryResult::EnableSharingWithResourceDirectoryResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EnableSharingWithResourceDirectoryResult::~EnableSharingWithResourceDirectoryResult() +{} + +void EnableSharingWithResourceDirectoryResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/resourcesharing/src/model/GetPermissionRequest.cc b/resourcesharing/src/model/GetPermissionRequest.cc new file mode 100644 index 000000000..67e8a32b5 --- /dev/null +++ b/resourcesharing/src/model/GetPermissionRequest.cc @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ResourceSharing::Model::GetPermissionRequest; + +GetPermissionRequest::GetPermissionRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "GetPermission") { + setMethod(HttpRequest::Method::Post); +} + +GetPermissionRequest::~GetPermissionRequest() {} + +std::string GetPermissionRequest::getPermissionVersion() const { + return permissionVersion_; +} + +void GetPermissionRequest::setPermissionVersion(const std::string &permissionVersion) { + permissionVersion_ = permissionVersion; + setParameter(std::string("PermissionVersion"), permissionVersion); +} + +std::string GetPermissionRequest::getPermissionName() const { + return permissionName_; +} + +void GetPermissionRequest::setPermissionName(const std::string &permissionName) { + permissionName_ = permissionName; + setParameter(std::string("PermissionName"), permissionName); +} + diff --git a/resourcesharing/src/model/GetPermissionResult.cc b/resourcesharing/src/model/GetPermissionResult.cc new file mode 100644 index 000000000..e9227eab6 --- /dev/null +++ b/resourcesharing/src/model/GetPermissionResult.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +GetPermissionResult::GetPermissionResult() : + ServiceResult() +{} + +GetPermissionResult::GetPermissionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetPermissionResult::~GetPermissionResult() +{} + +void GetPermissionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto permissionNode = value["Permission"]; + if(!permissionNode["PermissionName"].isNull()) + permission_.permissionName = permissionNode["PermissionName"].asString(); + if(!permissionNode["PermissionVersion"].isNull()) + permission_.permissionVersion = permissionNode["PermissionVersion"].asString(); + if(!permissionNode["Permission"].isNull()) + permission_.permission = permissionNode["Permission"].asString(); + if(!permissionNode["ResourceType"].isNull()) + permission_.resourceType = permissionNode["ResourceType"].asString(); + if(!permissionNode["DefaultVersion"].isNull()) + permission_.defaultVersion = permissionNode["DefaultVersion"].asString() == "true"; + if(!permissionNode["CreateTime"].isNull()) + permission_.createTime = permissionNode["CreateTime"].asString(); + if(!permissionNode["UpdateTime"].isNull()) + permission_.updateTime = permissionNode["UpdateTime"].asString(); + if(!permissionNode["DefaultPermission"].isNull()) + permission_.defaultPermission = permissionNode["DefaultPermission"].asString() == "true"; + +} + +GetPermissionResult::Permission GetPermissionResult::getPermission()const +{ + return permission_; +} + diff --git a/resourcesharing/src/model/ListPermissionVersionsRequest.cc b/resourcesharing/src/model/ListPermissionVersionsRequest.cc new file mode 100644 index 000000000..4fb92800b --- /dev/null +++ b/resourcesharing/src/model/ListPermissionVersionsRequest.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::ResourceSharing::Model::ListPermissionVersionsRequest; + +ListPermissionVersionsRequest::ListPermissionVersionsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListPermissionVersions") { + setMethod(HttpRequest::Method::Post); +} + +ListPermissionVersionsRequest::~ListPermissionVersionsRequest() {} + +std::string ListPermissionVersionsRequest::getPermissionName() const { + return permissionName_; +} + +void ListPermissionVersionsRequest::setPermissionName(const std::string &permissionName) { + permissionName_ = permissionName; + setParameter(std::string("PermissionName"), permissionName); +} + +std::string ListPermissionVersionsRequest::getNextToken() const { + return nextToken_; +} + +void ListPermissionVersionsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +int ListPermissionVersionsRequest::getMaxResults() const { + return maxResults_; +} + +void ListPermissionVersionsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListPermissionVersionsResult.cc b/resourcesharing/src/model/ListPermissionVersionsResult.cc new file mode 100644 index 000000000..5cbe9e2b0 --- /dev/null +++ b/resourcesharing/src/model/ListPermissionVersionsResult.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 +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListPermissionVersionsResult::ListPermissionVersionsResult() : + ServiceResult() +{} + +ListPermissionVersionsResult::ListPermissionVersionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListPermissionVersionsResult::~ListPermissionVersionsResult() +{} + +void ListPermissionVersionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPermissionsNode = value["Permissions"]["Permission"]; + for (auto valuePermissionsPermission : allPermissionsNode) + { + Permission permissionsObject; + if(!valuePermissionsPermission["PermissionName"].isNull()) + permissionsObject.permissionName = valuePermissionsPermission["PermissionName"].asString(); + if(!valuePermissionsPermission["PermissionVersion"].isNull()) + permissionsObject.permissionVersion = valuePermissionsPermission["PermissionVersion"].asString(); + if(!valuePermissionsPermission["DefaultVersion"].isNull()) + permissionsObject.defaultVersion = valuePermissionsPermission["DefaultVersion"].asString() == "true"; + if(!valuePermissionsPermission["CreateTime"].isNull()) + permissionsObject.createTime = valuePermissionsPermission["CreateTime"].asString(); + if(!valuePermissionsPermission["UpdateTime"].isNull()) + permissionsObject.updateTime = valuePermissionsPermission["UpdateTime"].asString(); + if(!valuePermissionsPermission["ResourceType"].isNull()) + permissionsObject.resourceType = valuePermissionsPermission["ResourceType"].asString(); + if(!valuePermissionsPermission["DefaultPermission"].isNull()) + permissionsObject.defaultPermission = valuePermissionsPermission["DefaultPermission"].asString() == "true"; + permissions_.push_back(permissionsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListPermissionVersionsResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListPermissionVersionsResult::getPermissions()const +{ + return permissions_; +} + diff --git a/resourcesharing/src/model/ListPermissionsRequest.cc b/resourcesharing/src/model/ListPermissionsRequest.cc new file mode 100644 index 000000000..1eb19176d --- /dev/null +++ b/resourcesharing/src/model/ListPermissionsRequest.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::ResourceSharing::Model::ListPermissionsRequest; + +ListPermissionsRequest::ListPermissionsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListPermissions") { + setMethod(HttpRequest::Method::Post); +} + +ListPermissionsRequest::~ListPermissionsRequest() {} + +std::string ListPermissionsRequest::getResourceType() const { + return resourceType_; +} + +void ListPermissionsRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListPermissionsRequest::getNextToken() const { + return nextToken_; +} + +void ListPermissionsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +int ListPermissionsRequest::getMaxResults() const { + return maxResults_; +} + +void ListPermissionsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListPermissionsResult.cc b/resourcesharing/src/model/ListPermissionsResult.cc new file mode 100644 index 000000000..02304e95f --- /dev/null +++ b/resourcesharing/src/model/ListPermissionsResult.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 +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListPermissionsResult::ListPermissionsResult() : + ServiceResult() +{} + +ListPermissionsResult::ListPermissionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListPermissionsResult::~ListPermissionsResult() +{} + +void ListPermissionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPermissionsNode = value["Permissions"]["Permission"]; + for (auto valuePermissionsPermission : allPermissionsNode) + { + Permission permissionsObject; + if(!valuePermissionsPermission["PermissionName"].isNull()) + permissionsObject.permissionName = valuePermissionsPermission["PermissionName"].asString(); + if(!valuePermissionsPermission["PermissionVersion"].isNull()) + permissionsObject.permissionVersion = valuePermissionsPermission["PermissionVersion"].asString(); + if(!valuePermissionsPermission["DefaultVersion"].isNull()) + permissionsObject.defaultVersion = valuePermissionsPermission["DefaultVersion"].asString() == "true"; + if(!valuePermissionsPermission["CreateTime"].isNull()) + permissionsObject.createTime = valuePermissionsPermission["CreateTime"].asString(); + if(!valuePermissionsPermission["UpdateTime"].isNull()) + permissionsObject.updateTime = valuePermissionsPermission["UpdateTime"].asString(); + if(!valuePermissionsPermission["ResourceType"].isNull()) + permissionsObject.resourceType = valuePermissionsPermission["ResourceType"].asString(); + if(!valuePermissionsPermission["DefaultPermission"].isNull()) + permissionsObject.defaultPermission = valuePermissionsPermission["DefaultPermission"].asString() == "true"; + permissions_.push_back(permissionsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListPermissionsResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListPermissionsResult::getPermissions()const +{ + return permissions_; +} + diff --git a/resourcesharing/src/model/ListResourceShareAssociationsRequest.cc b/resourcesharing/src/model/ListResourceShareAssociationsRequest.cc new file mode 100644 index 000000000..0ebd4f15e --- /dev/null +++ b/resourcesharing/src/model/ListResourceShareAssociationsRequest.cc @@ -0,0 +1,89 @@ +/* + * 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::ResourceSharing::Model::ListResourceShareAssociationsRequest; + +ListResourceShareAssociationsRequest::ListResourceShareAssociationsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListResourceShareAssociations") { + setMethod(HttpRequest::Method::Post); +} + +ListResourceShareAssociationsRequest::~ListResourceShareAssociationsRequest() {} + +std::string ListResourceShareAssociationsRequest::getNextToken() const { + return nextToken_; +} + +void ListResourceShareAssociationsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListResourceShareAssociationsRequest::getResourceShareIds() const { + return resourceShareIds_; +} + +void ListResourceShareAssociationsRequest::setResourceShareIds(const std::vector &resourceShareIds) { + resourceShareIds_ = resourceShareIds; +} + +std::string ListResourceShareAssociationsRequest::getResourceId() const { + return resourceId_; +} + +void ListResourceShareAssociationsRequest::setResourceId(const std::string &resourceId) { + resourceId_ = resourceId; + setParameter(std::string("ResourceId"), resourceId); +} + +std::string ListResourceShareAssociationsRequest::getTarget() const { + return target_; +} + +void ListResourceShareAssociationsRequest::setTarget(const std::string &target) { + target_ = target; + setParameter(std::string("Target"), target); +} + +std::string ListResourceShareAssociationsRequest::getAssociationType() const { + return associationType_; +} + +void ListResourceShareAssociationsRequest::setAssociationType(const std::string &associationType) { + associationType_ = associationType; + setParameter(std::string("AssociationType"), associationType); +} + +std::string ListResourceShareAssociationsRequest::getAssociationStatus() const { + return associationStatus_; +} + +void ListResourceShareAssociationsRequest::setAssociationStatus(const std::string &associationStatus) { + associationStatus_ = associationStatus; + setParameter(std::string("AssociationStatus"), associationStatus); +} + +int ListResourceShareAssociationsRequest::getMaxResults() const { + return maxResults_; +} + +void ListResourceShareAssociationsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListResourceShareAssociationsResult.cc b/resourcesharing/src/model/ListResourceShareAssociationsResult.cc new file mode 100644 index 000000000..5c11bb415 --- /dev/null +++ b/resourcesharing/src/model/ListResourceShareAssociationsResult.cc @@ -0,0 +1,100 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListResourceShareAssociationsResult::ListResourceShareAssociationsResult() : + ServiceResult() +{} + +ListResourceShareAssociationsResult::ListResourceShareAssociationsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourceShareAssociationsResult::~ListResourceShareAssociationsResult() +{} + +void ListResourceShareAssociationsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourceShareAssociationsNode = value["ResourceShareAssociations"]["ResourceShareAssociation"]; + for (auto valueResourceShareAssociationsResourceShareAssociation : allResourceShareAssociationsNode) + { + ResourceShareAssociation resourceShareAssociationsObject; + if(!valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].isNull()) + resourceShareAssociationsObject.updateTime = valueResourceShareAssociationsResourceShareAssociation["UpdateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityId"].isNull()) + resourceShareAssociationsObject.entityId = valueResourceShareAssociationsResourceShareAssociation["EntityId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].isNull()) + resourceShareAssociationsObject.resourceShareName = valueResourceShareAssociationsResourceShareAssociation["ResourceShareName"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["CreateTime"].isNull()) + resourceShareAssociationsObject.createTime = valueResourceShareAssociationsResourceShareAssociation["CreateTime"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["EntityType"].isNull()) + resourceShareAssociationsObject.entityType = valueResourceShareAssociationsResourceShareAssociation["EntityType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].isNull()) + resourceShareAssociationsObject.resourceShareId = valueResourceShareAssociationsResourceShareAssociation["ResourceShareId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].isNull()) + resourceShareAssociationsObject.associationStatusMessage = valueResourceShareAssociationsResourceShareAssociation["AssociationStatusMessage"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationType"].isNull()) + resourceShareAssociationsObject.associationType = valueResourceShareAssociationsResourceShareAssociation["AssociationType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].isNull()) + resourceShareAssociationsObject.associationStatus = valueResourceShareAssociationsResourceShareAssociation["AssociationStatus"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociation["External"].isNull()) + resourceShareAssociationsObject.external = valueResourceShareAssociationsResourceShareAssociation["External"].asString() == "true"; + if(!valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].isNull()) + resourceShareAssociationsObject.targetProperty = valueResourceShareAssociationsResourceShareAssociation["TargetProperty"].asString(); + auto allAssociationFailedDetailsNode = valueResourceShareAssociationsResourceShareAssociation["AssociationFailedDetails"]["AssociationFailedDetail"]; + for (auto valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail : allAssociationFailedDetailsNode) + { + ResourceShareAssociation::AssociationFailedDetail associationFailedDetailsObject; + if(!valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["Status"].isNull()) + associationFailedDetailsObject.status = valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["Status"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["StatusMessage"].isNull()) + associationFailedDetailsObject.statusMessage = valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["StatusMessage"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["AssociateType"].isNull()) + associationFailedDetailsObject.associateType = valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["AssociateType"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["EntityId"].isNull()) + associationFailedDetailsObject.entityId = valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["EntityId"].asString(); + if(!valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["EntityType"].isNull()) + associationFailedDetailsObject.entityType = valueResourceShareAssociationsResourceShareAssociationAssociationFailedDetailsAssociationFailedDetail["EntityType"].asString(); + resourceShareAssociationsObject.associationFailedDetails.push_back(associationFailedDetailsObject); + } + resourceShareAssociations_.push_back(resourceShareAssociationsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::vector ListResourceShareAssociationsResult::getResourceShareAssociations()const +{ + return resourceShareAssociations_; +} + +std::string ListResourceShareAssociationsResult::getNextToken()const +{ + return nextToken_; +} + diff --git a/resourcesharing/src/model/ListResourceShareInvitationsRequest.cc b/resourcesharing/src/model/ListResourceShareInvitationsRequest.cc new file mode 100644 index 000000000..eb5eece5a --- /dev/null +++ b/resourcesharing/src/model/ListResourceShareInvitationsRequest.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::ResourceSharing::Model::ListResourceShareInvitationsRequest; + +ListResourceShareInvitationsRequest::ListResourceShareInvitationsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListResourceShareInvitations") { + setMethod(HttpRequest::Method::Post); +} + +ListResourceShareInvitationsRequest::~ListResourceShareInvitationsRequest() {} + +std::vector ListResourceShareInvitationsRequest::getResourceShareInvitationIds() const { + return resourceShareInvitationIds_; +} + +void ListResourceShareInvitationsRequest::setResourceShareInvitationIds(const std::vector &resourceShareInvitationIds) { + resourceShareInvitationIds_ = resourceShareInvitationIds; +} + +std::string ListResourceShareInvitationsRequest::getNextToken() const { + return nextToken_; +} + +void ListResourceShareInvitationsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListResourceShareInvitationsRequest::getResourceShareIds() const { + return resourceShareIds_; +} + +void ListResourceShareInvitationsRequest::setResourceShareIds(const std::vector &resourceShareIds) { + resourceShareIds_ = resourceShareIds; +} + +int ListResourceShareInvitationsRequest::getMaxResults() const { + return maxResults_; +} + +void ListResourceShareInvitationsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListResourceShareInvitationsResult.cc b/resourcesharing/src/model/ListResourceShareInvitationsResult.cc new file mode 100644 index 000000000..27d82c4ed --- /dev/null +++ b/resourcesharing/src/model/ListResourceShareInvitationsResult.cc @@ -0,0 +1,92 @@ +/* + * 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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListResourceShareInvitationsResult::ListResourceShareInvitationsResult() : + ServiceResult() +{} + +ListResourceShareInvitationsResult::ListResourceShareInvitationsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourceShareInvitationsResult::~ListResourceShareInvitationsResult() +{} + +void ListResourceShareInvitationsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourceShareInvitationsNode = value["ResourceShareInvitations"]["ResourceShareInvitation"]; + for (auto valueResourceShareInvitationsResourceShareInvitation : allResourceShareInvitationsNode) + { + ResourceShareInvitation resourceShareInvitationsObject; + if(!valueResourceShareInvitationsResourceShareInvitation["Status"].isNull()) + resourceShareInvitationsObject.status = valueResourceShareInvitationsResourceShareInvitation["Status"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["CreateTime"].isNull()) + resourceShareInvitationsObject.createTime = valueResourceShareInvitationsResourceShareInvitation["CreateTime"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["ResourceShareId"].isNull()) + resourceShareInvitationsObject.resourceShareId = valueResourceShareInvitationsResourceShareInvitation["ResourceShareId"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["ResourceShareName"].isNull()) + resourceShareInvitationsObject.resourceShareName = valueResourceShareInvitationsResourceShareInvitation["ResourceShareName"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["SenderAccountId"].isNull()) + resourceShareInvitationsObject.senderAccountId = valueResourceShareInvitationsResourceShareInvitation["SenderAccountId"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["ReceiverAccountId"].isNull()) + resourceShareInvitationsObject.receiverAccountId = valueResourceShareInvitationsResourceShareInvitation["ReceiverAccountId"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitation["ResourceShareInvitationId"].isNull()) + resourceShareInvitationsObject.resourceShareInvitationId = valueResourceShareInvitationsResourceShareInvitation["ResourceShareInvitationId"].asString(); + auto allInvitationFailedDetailsNode = valueResourceShareInvitationsResourceShareInvitation["InvitationFailedDetails"]["InvitationFailedDetail"]; + for (auto valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail : allInvitationFailedDetailsNode) + { + ResourceShareInvitation::InvitationFailedDetail invitationFailedDetailsObject; + if(!valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["Status"].isNull()) + invitationFailedDetailsObject.status = valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["Status"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["StatusMessage"].isNull()) + invitationFailedDetailsObject.statusMessage = valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["StatusMessage"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["AssociateType"].isNull()) + invitationFailedDetailsObject.associateType = valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["AssociateType"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["ResourceId"].isNull()) + invitationFailedDetailsObject.resourceId = valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["ResourceId"].asString(); + if(!valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["ResourceType"].isNull()) + invitationFailedDetailsObject.resourceType = valueResourceShareInvitationsResourceShareInvitationInvitationFailedDetailsInvitationFailedDetail["ResourceType"].asString(); + resourceShareInvitationsObject.invitationFailedDetails.push_back(invitationFailedDetailsObject); + } + resourceShareInvitations_.push_back(resourceShareInvitationsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::vector ListResourceShareInvitationsResult::getResourceShareInvitations()const +{ + return resourceShareInvitations_; +} + +std::string ListResourceShareInvitationsResult::getNextToken()const +{ + return nextToken_; +} + diff --git a/resourcesharing/src/model/ListResourceSharePermissionsRequest.cc b/resourcesharing/src/model/ListResourceSharePermissionsRequest.cc new file mode 100644 index 000000000..a30961519 --- /dev/null +++ b/resourcesharing/src/model/ListResourceSharePermissionsRequest.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::ResourceSharing::Model::ListResourceSharePermissionsRequest; + +ListResourceSharePermissionsRequest::ListResourceSharePermissionsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListResourceSharePermissions") { + setMethod(HttpRequest::Method::Post); +} + +ListResourceSharePermissionsRequest::~ListResourceSharePermissionsRequest() {} + +std::string ListResourceSharePermissionsRequest::getResourceOwner() const { + return resourceOwner_; +} + +void ListResourceSharePermissionsRequest::setResourceOwner(const std::string &resourceOwner) { + resourceOwner_ = resourceOwner; + setParameter(std::string("ResourceOwner"), resourceOwner); +} + +std::string ListResourceSharePermissionsRequest::getNextToken() const { + return nextToken_; +} + +void ListResourceSharePermissionsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +int ListResourceSharePermissionsRequest::getMaxResults() const { + return maxResults_; +} + +void ListResourceSharePermissionsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + +std::string ListResourceSharePermissionsRequest::getResourceShareId() const { + return resourceShareId_; +} + +void ListResourceSharePermissionsRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + diff --git a/resourcesharing/src/model/ListResourceSharePermissionsResult.cc b/resourcesharing/src/model/ListResourceSharePermissionsResult.cc new file mode 100644 index 000000000..7bf0566ea --- /dev/null +++ b/resourcesharing/src/model/ListResourceSharePermissionsResult.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 +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListResourceSharePermissionsResult::ListResourceSharePermissionsResult() : + ServiceResult() +{} + +ListResourceSharePermissionsResult::ListResourceSharePermissionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourceSharePermissionsResult::~ListResourceSharePermissionsResult() +{} + +void ListResourceSharePermissionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPermissionsNode = value["Permissions"]["Permission"]; + for (auto valuePermissionsPermission : allPermissionsNode) + { + Permission permissionsObject; + if(!valuePermissionsPermission["PermissionName"].isNull()) + permissionsObject.permissionName = valuePermissionsPermission["PermissionName"].asString(); + if(!valuePermissionsPermission["PermissionVersion"].isNull()) + permissionsObject.permissionVersion = valuePermissionsPermission["PermissionVersion"].asString(); + if(!valuePermissionsPermission["DefaultVersion"].isNull()) + permissionsObject.defaultVersion = valuePermissionsPermission["DefaultVersion"].asString() == "true"; + if(!valuePermissionsPermission["CreateTime"].isNull()) + permissionsObject.createTime = valuePermissionsPermission["CreateTime"].asString(); + if(!valuePermissionsPermission["UpdateTime"].isNull()) + permissionsObject.updateTime = valuePermissionsPermission["UpdateTime"].asString(); + if(!valuePermissionsPermission["ResourceType"].isNull()) + permissionsObject.resourceType = valuePermissionsPermission["ResourceType"].asString(); + if(!valuePermissionsPermission["DefaultPermission"].isNull()) + permissionsObject.defaultPermission = valuePermissionsPermission["DefaultPermission"].asString() == "true"; + permissions_.push_back(permissionsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListResourceSharePermissionsResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListResourceSharePermissionsResult::getPermissions()const +{ + return permissions_; +} + diff --git a/resourcesharing/src/model/ListResourceSharesRequest.cc b/resourcesharing/src/model/ListResourceSharesRequest.cc new file mode 100644 index 000000000..ec763eba8 --- /dev/null +++ b/resourcesharing/src/model/ListResourceSharesRequest.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 + +using AlibabaCloud::ResourceSharing::Model::ListResourceSharesRequest; + +ListResourceSharesRequest::ListResourceSharesRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListResourceShares") { + setMethod(HttpRequest::Method::Post); +} + +ListResourceSharesRequest::~ListResourceSharesRequest() {} + +std::string ListResourceSharesRequest::getResourceShareName() const { + return resourceShareName_; +} + +void ListResourceSharesRequest::setResourceShareName(const std::string &resourceShareName) { + resourceShareName_ = resourceShareName; + setParameter(std::string("ResourceShareName"), resourceShareName); +} + +std::string ListResourceSharesRequest::getPermissionName() const { + return permissionName_; +} + +void ListResourceSharesRequest::setPermissionName(const std::string &permissionName) { + permissionName_ = permissionName; + setParameter(std::string("PermissionName"), permissionName); +} + +std::string ListResourceSharesRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListResourceSharesRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string ListResourceSharesRequest::getNextToken() const { + return nextToken_; +} + +void ListResourceSharesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListResourceSharesRequest::getResourceShareIds() const { + return resourceShareIds_; +} + +void ListResourceSharesRequest::setResourceShareIds(const std::vector &resourceShareIds) { + resourceShareIds_ = resourceShareIds; +} + +std::string ListResourceSharesRequest::getResourceOwner() const { + return resourceOwner_; +} + +void ListResourceSharesRequest::setResourceOwner(const std::string &resourceOwner) { + resourceOwner_ = resourceOwner; + setParameter(std::string("ResourceOwner"), resourceOwner); +} + +std::string ListResourceSharesRequest::getResourceShareStatus() const { + return resourceShareStatus_; +} + +void ListResourceSharesRequest::setResourceShareStatus(const std::string &resourceShareStatus) { + resourceShareStatus_ = resourceShareStatus; + setParameter(std::string("ResourceShareStatus"), resourceShareStatus); +} + +int ListResourceSharesRequest::getMaxResults() const { + return maxResults_; +} + +void ListResourceSharesRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListResourceSharesResult.cc b/resourcesharing/src/model/ListResourceSharesResult.cc new file mode 100644 index 000000000..3ef377b41 --- /dev/null +++ b/resourcesharing/src/model/ListResourceSharesResult.cc @@ -0,0 +1,78 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListResourceSharesResult::ListResourceSharesResult() : + ServiceResult() +{} + +ListResourceSharesResult::ListResourceSharesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourceSharesResult::~ListResourceSharesResult() +{} + +void ListResourceSharesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourceSharesNode = value["ResourceShares"]["ResourceShare"]; + for (auto valueResourceSharesResourceShare : allResourceSharesNode) + { + ResourceShare resourceSharesObject; + if(!valueResourceSharesResourceShare["UpdateTime"].isNull()) + resourceSharesObject.updateTime = valueResourceSharesResourceShare["UpdateTime"].asString(); + if(!valueResourceSharesResourceShare["ResourceShareName"].isNull()) + resourceSharesObject.resourceShareName = valueResourceSharesResourceShare["ResourceShareName"].asString(); + if(!valueResourceSharesResourceShare["ResourceShareOwner"].isNull()) + resourceSharesObject.resourceShareOwner = valueResourceSharesResourceShare["ResourceShareOwner"].asString(); + if(!valueResourceSharesResourceShare["CreateTime"].isNull()) + resourceSharesObject.createTime = valueResourceSharesResourceShare["CreateTime"].asString(); + if(!valueResourceSharesResourceShare["ResourceShareId"].isNull()) + resourceSharesObject.resourceShareId = valueResourceSharesResourceShare["ResourceShareId"].asString(); + if(!valueResourceSharesResourceShare["ResourceShareStatus"].isNull()) + resourceSharesObject.resourceShareStatus = valueResourceSharesResourceShare["ResourceShareStatus"].asString(); + if(!valueResourceSharesResourceShare["AllowExternalTargets"].isNull()) + resourceSharesObject.allowExternalTargets = valueResourceSharesResourceShare["AllowExternalTargets"].asString() == "true"; + if(!valueResourceSharesResourceShare["ResourceGroupId"].isNull()) + resourceSharesObject.resourceGroupId = valueResourceSharesResourceShare["ResourceGroupId"].asString(); + resourceShares_.push_back(resourceSharesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::vector ListResourceSharesResult::getResourceShares()const +{ + return resourceShares_; +} + +std::string ListResourceSharesResult::getNextToken()const +{ + return nextToken_; +} + diff --git a/resourcesharing/src/model/ListSharedResourcesRequest.cc b/resourcesharing/src/model/ListSharedResourcesRequest.cc new file mode 100644 index 000000000..c2fcc04c4 --- /dev/null +++ b/resourcesharing/src/model/ListSharedResourcesRequest.cc @@ -0,0 +1,88 @@ +/* + * 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::ResourceSharing::Model::ListSharedResourcesRequest; + +ListSharedResourcesRequest::ListSharedResourcesRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListSharedResources") { + setMethod(HttpRequest::Method::Post); +} + +ListSharedResourcesRequest::~ListSharedResourcesRequest() {} + +std::string ListSharedResourcesRequest::getNextToken() const { + return nextToken_; +} + +void ListSharedResourcesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListSharedResourcesRequest::getResourceShareIds() const { + return resourceShareIds_; +} + +void ListSharedResourcesRequest::setResourceShareIds(const std::vector &resourceShareIds) { + resourceShareIds_ = resourceShareIds; +} + +std::string ListSharedResourcesRequest::getResourceOwner() const { + return resourceOwner_; +} + +void ListSharedResourcesRequest::setResourceOwner(const std::string &resourceOwner) { + resourceOwner_ = resourceOwner; + setParameter(std::string("ResourceOwner"), resourceOwner); +} + +std::string ListSharedResourcesRequest::getResourceType() const { + return resourceType_; +} + +void ListSharedResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListSharedResourcesRequest::getTarget() const { + return target_; +} + +void ListSharedResourcesRequest::setTarget(const std::string &target) { + target_ = target; + setParameter(std::string("Target"), target); +} + +int ListSharedResourcesRequest::getMaxResults() const { + return maxResults_; +} + +void ListSharedResourcesRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + +std::vector ListSharedResourcesRequest::getResourceIds() const { + return resourceIds_; +} + +void ListSharedResourcesRequest::setResourceIds(const std::vector &resourceIds) { + resourceIds_ = resourceIds; +} + diff --git a/resourcesharing/src/model/ListSharedResourcesResult.cc b/resourcesharing/src/model/ListSharedResourcesResult.cc new file mode 100644 index 000000000..06ea8fb74 --- /dev/null +++ b/resourcesharing/src/model/ListSharedResourcesResult.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 +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListSharedResourcesResult::ListSharedResourcesResult() : + ServiceResult() +{} + +ListSharedResourcesResult::ListSharedResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListSharedResourcesResult::~ListSharedResourcesResult() +{} + +void ListSharedResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allSharedResourcesNode = value["SharedResources"]["SharedResource"]; + for (auto valueSharedResourcesSharedResource : allSharedResourcesNode) + { + SharedResource sharedResourcesObject; + if(!valueSharedResourcesSharedResource["UpdateTime"].isNull()) + sharedResourcesObject.updateTime = valueSharedResourcesSharedResource["UpdateTime"].asString(); + if(!valueSharedResourcesSharedResource["ResourceType"].isNull()) + sharedResourcesObject.resourceType = valueSharedResourcesSharedResource["ResourceType"].asString(); + if(!valueSharedResourcesSharedResource["CreateTime"].isNull()) + sharedResourcesObject.createTime = valueSharedResourcesSharedResource["CreateTime"].asString(); + if(!valueSharedResourcesSharedResource["ResourceShareId"].isNull()) + sharedResourcesObject.resourceShareId = valueSharedResourcesSharedResource["ResourceShareId"].asString(); + if(!valueSharedResourcesSharedResource["ResourceId"].isNull()) + sharedResourcesObject.resourceId = valueSharedResourcesSharedResource["ResourceId"].asString(); + if(!valueSharedResourcesSharedResource["ResourceStatus"].isNull()) + sharedResourcesObject.resourceStatus = valueSharedResourcesSharedResource["ResourceStatus"].asString(); + if(!valueSharedResourcesSharedResource["ResourceStatusMessage"].isNull()) + sharedResourcesObject.resourceStatusMessage = valueSharedResourcesSharedResource["ResourceStatusMessage"].asString(); + sharedResources_.push_back(sharedResourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListSharedResourcesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListSharedResourcesResult::getSharedResources()const +{ + return sharedResources_; +} + diff --git a/resourcesharing/src/model/ListSharedTargetsRequest.cc b/resourcesharing/src/model/ListSharedTargetsRequest.cc new file mode 100644 index 000000000..297ef910a --- /dev/null +++ b/resourcesharing/src/model/ListSharedTargetsRequest.cc @@ -0,0 +1,88 @@ +/* + * 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::ResourceSharing::Model::ListSharedTargetsRequest; + +ListSharedTargetsRequest::ListSharedTargetsRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "ListSharedTargets") { + setMethod(HttpRequest::Method::Post); +} + +ListSharedTargetsRequest::~ListSharedTargetsRequest() {} + +std::vector ListSharedTargetsRequest::getTargets() const { + return targets_; +} + +void ListSharedTargetsRequest::setTargets(const std::vector &targets) { + targets_ = targets; +} + +std::string ListSharedTargetsRequest::getNextToken() const { + return nextToken_; +} + +void ListSharedTargetsRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListSharedTargetsRequest::getResourceShareIds() const { + return resourceShareIds_; +} + +void ListSharedTargetsRequest::setResourceShareIds(const std::vector &resourceShareIds) { + resourceShareIds_ = resourceShareIds; +} + +std::string ListSharedTargetsRequest::getResourceId() const { + return resourceId_; +} + +void ListSharedTargetsRequest::setResourceId(const std::string &resourceId) { + resourceId_ = resourceId; + setParameter(std::string("ResourceId"), resourceId); +} + +std::string ListSharedTargetsRequest::getResourceOwner() const { + return resourceOwner_; +} + +void ListSharedTargetsRequest::setResourceOwner(const std::string &resourceOwner) { + resourceOwner_ = resourceOwner; + setParameter(std::string("ResourceOwner"), resourceOwner); +} + +std::string ListSharedTargetsRequest::getResourceType() const { + return resourceType_; +} + +void ListSharedTargetsRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +int ListSharedTargetsRequest::getMaxResults() const { + return maxResults_; +} + +void ListSharedTargetsRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/resourcesharing/src/model/ListSharedTargetsResult.cc b/resourcesharing/src/model/ListSharedTargetsResult.cc new file mode 100644 index 000000000..492c3a70b --- /dev/null +++ b/resourcesharing/src/model/ListSharedTargetsResult.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::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +ListSharedTargetsResult::ListSharedTargetsResult() : + ServiceResult() +{} + +ListSharedTargetsResult::ListSharedTargetsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListSharedTargetsResult::~ListSharedTargetsResult() +{} + +void ListSharedTargetsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allSharedTargetsNode = value["SharedTargets"]["SharedTarget"]; + for (auto valueSharedTargetsSharedTarget : allSharedTargetsNode) + { + SharedTarget sharedTargetsObject; + if(!valueSharedTargetsSharedTarget["TargetId"].isNull()) + sharedTargetsObject.targetId = valueSharedTargetsSharedTarget["TargetId"].asString(); + if(!valueSharedTargetsSharedTarget["UpdateTime"].isNull()) + sharedTargetsObject.updateTime = valueSharedTargetsSharedTarget["UpdateTime"].asString(); + if(!valueSharedTargetsSharedTarget["CreateTime"].isNull()) + sharedTargetsObject.createTime = valueSharedTargetsSharedTarget["CreateTime"].asString(); + if(!valueSharedTargetsSharedTarget["ResourceShareId"].isNull()) + sharedTargetsObject.resourceShareId = valueSharedTargetsSharedTarget["ResourceShareId"].asString(); + if(!valueSharedTargetsSharedTarget["External"].isNull()) + sharedTargetsObject.external = valueSharedTargetsSharedTarget["External"].asString() == "true"; + if(!valueSharedTargetsSharedTarget["TargetProperty"].isNull()) + sharedTargetsObject.targetProperty = valueSharedTargetsSharedTarget["TargetProperty"].asString(); + sharedTargets_.push_back(sharedTargetsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListSharedTargetsResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListSharedTargetsResult::getSharedTargets()const +{ + return sharedTargets_; +} + diff --git a/resourcesharing/src/model/RejectResourceShareInvitationRequest.cc b/resourcesharing/src/model/RejectResourceShareInvitationRequest.cc new file mode 100644 index 000000000..4f68bde01 --- /dev/null +++ b/resourcesharing/src/model/RejectResourceShareInvitationRequest.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::ResourceSharing::Model::RejectResourceShareInvitationRequest; + +RejectResourceShareInvitationRequest::RejectResourceShareInvitationRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "RejectResourceShareInvitation") { + setMethod(HttpRequest::Method::Post); +} + +RejectResourceShareInvitationRequest::~RejectResourceShareInvitationRequest() {} + +std::string RejectResourceShareInvitationRequest::getResourceShareInvitationId() const { + return resourceShareInvitationId_; +} + +void RejectResourceShareInvitationRequest::setResourceShareInvitationId(const std::string &resourceShareInvitationId) { + resourceShareInvitationId_ = resourceShareInvitationId; + setParameter(std::string("ResourceShareInvitationId"), resourceShareInvitationId); +} + diff --git a/resourcesharing/src/model/RejectResourceShareInvitationResult.cc b/resourcesharing/src/model/RejectResourceShareInvitationResult.cc new file mode 100644 index 000000000..680b4e12f --- /dev/null +++ b/resourcesharing/src/model/RejectResourceShareInvitationResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +RejectResourceShareInvitationResult::RejectResourceShareInvitationResult() : + ServiceResult() +{} + +RejectResourceShareInvitationResult::RejectResourceShareInvitationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RejectResourceShareInvitationResult::~RejectResourceShareInvitationResult() +{} + +void RejectResourceShareInvitationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resourceShareInvitationNode = value["ResourceShareInvitation"]; + if(!resourceShareInvitationNode["ResourceShareInvitationId"].isNull()) + resourceShareInvitation_.resourceShareInvitationId = resourceShareInvitationNode["ResourceShareInvitationId"].asString(); + if(!resourceShareInvitationNode["ResourceShareId"].isNull()) + resourceShareInvitation_.resourceShareId = resourceShareInvitationNode["ResourceShareId"].asString(); + if(!resourceShareInvitationNode["ResourceShareName"].isNull()) + resourceShareInvitation_.resourceShareName = resourceShareInvitationNode["ResourceShareName"].asString(); + if(!resourceShareInvitationNode["SenderAccountId"].isNull()) + resourceShareInvitation_.senderAccountId = resourceShareInvitationNode["SenderAccountId"].asString(); + if(!resourceShareInvitationNode["ReceiverAccountId"].isNull()) + resourceShareInvitation_.receiverAccountId = resourceShareInvitationNode["ReceiverAccountId"].asString(); + if(!resourceShareInvitationNode["CreateTime"].isNull()) + resourceShareInvitation_.createTime = resourceShareInvitationNode["CreateTime"].asString(); + if(!resourceShareInvitationNode["Status"].isNull()) + resourceShareInvitation_.status = resourceShareInvitationNode["Status"].asString(); + +} + +RejectResourceShareInvitationResult::ResourceShareInvitation RejectResourceShareInvitationResult::getResourceShareInvitation()const +{ + return resourceShareInvitation_; +} + diff --git a/resourcesharing/src/model/UpdateResourceShareRequest.cc b/resourcesharing/src/model/UpdateResourceShareRequest.cc new file mode 100644 index 000000000..2f98b228e --- /dev/null +++ b/resourcesharing/src/model/UpdateResourceShareRequest.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::ResourceSharing::Model::UpdateResourceShareRequest; + +UpdateResourceShareRequest::UpdateResourceShareRequest() + : RpcServiceRequest("resourcesharing", "2020-01-10", "UpdateResourceShare") { + setMethod(HttpRequest::Method::Post); +} + +UpdateResourceShareRequest::~UpdateResourceShareRequest() {} + +std::string UpdateResourceShareRequest::getResourceShareName() const { + return resourceShareName_; +} + +void UpdateResourceShareRequest::setResourceShareName(const std::string &resourceShareName) { + resourceShareName_ = resourceShareName; + setParameter(std::string("ResourceShareName"), resourceShareName); +} + +std::string UpdateResourceShareRequest::getResourceShareId() const { + return resourceShareId_; +} + +void UpdateResourceShareRequest::setResourceShareId(const std::string &resourceShareId) { + resourceShareId_ = resourceShareId; + setParameter(std::string("ResourceShareId"), resourceShareId); +} + +bool UpdateResourceShareRequest::getAllowExternalTargets() const { + return allowExternalTargets_; +} + +void UpdateResourceShareRequest::setAllowExternalTargets(bool allowExternalTargets) { + allowExternalTargets_ = allowExternalTargets; + setParameter(std::string("AllowExternalTargets"), allowExternalTargets ? "true" : "false"); +} + diff --git a/resourcesharing/src/model/UpdateResourceShareResult.cc b/resourcesharing/src/model/UpdateResourceShareResult.cc new file mode 100644 index 000000000..35dff5414 --- /dev/null +++ b/resourcesharing/src/model/UpdateResourceShareResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::ResourceSharing; +using namespace AlibabaCloud::ResourceSharing::Model; + +UpdateResourceShareResult::UpdateResourceShareResult() : + ServiceResult() +{} + +UpdateResourceShareResult::UpdateResourceShareResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateResourceShareResult::~UpdateResourceShareResult() +{} + +void UpdateResourceShareResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resourceShareNode = value["ResourceShare"]; + if(!resourceShareNode["UpdateTime"].isNull()) + resourceShare_.updateTime = resourceShareNode["UpdateTime"].asString(); + if(!resourceShareNode["ResourceShareName"].isNull()) + resourceShare_.resourceShareName = resourceShareNode["ResourceShareName"].asString(); + if(!resourceShareNode["ResourceShareOwner"].isNull()) + resourceShare_.resourceShareOwner = resourceShareNode["ResourceShareOwner"].asString(); + if(!resourceShareNode["CreateTime"].isNull()) + resourceShare_.createTime = resourceShareNode["CreateTime"].asString(); + if(!resourceShareNode["ResourceShareId"].isNull()) + resourceShare_.resourceShareId = resourceShareNode["ResourceShareId"].asString(); + if(!resourceShareNode["ResourceShareStatus"].isNull()) + resourceShare_.resourceShareStatus = resourceShareNode["ResourceShareStatus"].asString(); + if(!resourceShareNode["AllowExternalTargets"].isNull()) + resourceShare_.allowExternalTargets = resourceShareNode["AllowExternalTargets"].asString() == "true"; + +} + +UpdateResourceShareResult::ResourceShare UpdateResourceShareResult::getResourceShare()const +{ + return resourceShare_; +} +