From c98efebbad4667febb7be3e0eb137e590647cc42 Mon Sep 17 00:00:00 2001 From: "haowei.yao" Date: Thu, 21 Mar 2019 17:12:57 +0800 Subject: [PATCH] =?UTF-8?q?KMS=20SDK=20Auto=20Released=20By=20shenshi,Vers?= =?UTF-8?q?ion=EF=BC=9A1.34.57?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: haowei.yao --- CHANGELOG | 3 + CMakeLists.txt | 3 +- VERSION | 2 +- kms/CMakeLists.txt | 170 ++++ kms/include/alibabacloud/kms/KmsClient.h | 222 +++++ kms/include/alibabacloud/kms/KmsExport.h | 32 + .../kms/model/CancelKeyDeletionRequest.h | 51 ++ .../kms/model/CancelKeyDeletionResult.h | 49 + .../kms/model/CreateAliasRequest.h | 54 ++ .../kms/model/CreateAliasResult.h | 49 + .../alibabacloud/kms/model/CreateKeyRequest.h | 57 ++ .../alibabacloud/kms/model/CreateKeyResult.h | 64 ++ .../alibabacloud/kms/model/DecryptRequest.h | 54 ++ .../alibabacloud/kms/model/DecryptResult.h | 53 ++ .../kms/model/DeleteAliasRequest.h | 51 ++ .../kms/model/DeleteAliasResult.h | 49 + .../kms/model/DeleteKeyMaterialRequest.h | 51 ++ .../kms/model/DeleteKeyMaterialResult.h | 49 + .../kms/model/DescribeKeyRequest.h | 51 ++ .../kms/model/DescribeKeyResult.h | 64 ++ .../kms/model/DescribeRegionsRequest.h | 48 + .../kms/model/DescribeRegionsResult.h | 55 ++ .../kms/model/DisableKeyRequest.h | 51 ++ .../alibabacloud/kms/model/DisableKeyResult.h | 49 + .../alibabacloud/kms/model/EnableKeyRequest.h | 51 ++ .../alibabacloud/kms/model/EnableKeyResult.h | 49 + .../alibabacloud/kms/model/EncryptRequest.h | 57 ++ .../alibabacloud/kms/model/EncryptResult.h | 53 ++ .../kms/model/GenerateDataKeyRequest.h | 60 ++ .../kms/model/GenerateDataKeyResult.h | 55 ++ .../kms/model/GetParametersForImportRequest.h | 57 ++ .../kms/model/GetParametersForImportResult.h | 57 ++ .../kms/model/ImportKeyMaterialRequest.h | 60 ++ .../kms/model/ImportKeyMaterialResult.h | 49 + .../kms/model/ListAliasesByKeyIdRequest.h | 57 ++ .../kms/model/ListAliasesByKeyIdResult.h | 63 ++ .../kms/model/ListAliasesRequest.h | 54 ++ .../kms/model/ListAliasesResult.h | 63 ++ .../alibabacloud/kms/model/ListKeysRequest.h | 54 ++ .../alibabacloud/kms/model/ListKeysResult.h | 62 ++ .../kms/model/ListResourceTagsRequest.h | 51 ++ .../kms/model/ListResourceTagsResult.h | 57 ++ .../kms/model/ScheduleKeyDeletionRequest.h | 54 ++ .../kms/model/ScheduleKeyDeletionResult.h | 49 + .../kms/model/TagResourceRequest.h | 54 ++ .../kms/model/TagResourceResult.h | 49 + .../kms/model/UntagResourceRequest.h | 54 ++ .../kms/model/UntagResourceResult.h | 51 ++ .../kms/model/UpdateAliasRequest.h | 54 ++ .../kms/model/UpdateAliasResult.h | 49 + kms/src/KmsClient.cc | 845 ++++++++++++++++++ kms/src/model/CancelKeyDeletionRequest.cc | 49 + kms/src/model/CancelKeyDeletionResult.cc | 45 + kms/src/model/CreateAliasRequest.cc | 60 ++ kms/src/model/CreateAliasResult.cc | 45 + kms/src/model/CreateKeyRequest.cc | 71 ++ kms/src/model/CreateKeyResult.cc | 71 ++ kms/src/model/DecryptRequest.cc | 60 ++ kms/src/model/DecryptResult.cc | 59 ++ kms/src/model/DeleteAliasRequest.cc | 49 + kms/src/model/DeleteAliasResult.cc | 45 + kms/src/model/DeleteKeyMaterialRequest.cc | 49 + kms/src/model/DeleteKeyMaterialResult.cc | 45 + kms/src/model/DescribeKeyRequest.cc | 49 + kms/src/model/DescribeKeyResult.cc | 71 ++ kms/src/model/DescribeRegionsRequest.cc | 38 + kms/src/model/DescribeRegionsResult.cc | 58 ++ kms/src/model/DisableKeyRequest.cc | 49 + kms/src/model/DisableKeyResult.cc | 45 + kms/src/model/EnableKeyRequest.cc | 49 + kms/src/model/EnableKeyResult.cc | 45 + kms/src/model/EncryptRequest.cc | 71 ++ kms/src/model/EncryptResult.cc | 59 ++ kms/src/model/GenerateDataKeyRequest.cc | 82 ++ kms/src/model/GenerateDataKeyResult.cc | 66 ++ .../model/GetParametersForImportRequest.cc | 71 ++ kms/src/model/GetParametersForImportResult.cc | 73 ++ kms/src/model/ImportKeyMaterialRequest.cc | 82 ++ kms/src/model/ImportKeyMaterialResult.cc | 45 + kms/src/model/ListAliasesByKeyIdRequest.cc | 71 ++ kms/src/model/ListAliasesByKeyIdResult.cc | 83 ++ kms/src/model/ListAliasesRequest.cc | 60 ++ kms/src/model/ListAliasesResult.cc | 83 ++ kms/src/model/ListKeysRequest.cc | 60 ++ kms/src/model/ListKeysResult.cc | 81 ++ kms/src/model/ListResourceTagsRequest.cc | 49 + kms/src/model/ListResourceTagsResult.cc | 62 ++ kms/src/model/ScheduleKeyDeletionRequest.cc | 60 ++ kms/src/model/ScheduleKeyDeletionResult.cc | 45 + kms/src/model/TagResourceRequest.cc | 60 ++ kms/src/model/TagResourceResult.cc | 45 + kms/src/model/UntagResourceRequest.cc | 60 ++ kms/src/model/UntagResourceResult.cc | 52 ++ kms/src/model/UpdateAliasRequest.cc | 60 ++ kms/src/model/UpdateAliasResult.cc | 45 + 95 files changed, 6224 insertions(+), 2 deletions(-) create mode 100644 kms/CMakeLists.txt create mode 100644 kms/include/alibabacloud/kms/KmsClient.h create mode 100644 kms/include/alibabacloud/kms/KmsExport.h create mode 100644 kms/include/alibabacloud/kms/model/CancelKeyDeletionRequest.h create mode 100644 kms/include/alibabacloud/kms/model/CancelKeyDeletionResult.h create mode 100644 kms/include/alibabacloud/kms/model/CreateAliasRequest.h create mode 100644 kms/include/alibabacloud/kms/model/CreateAliasResult.h create mode 100644 kms/include/alibabacloud/kms/model/CreateKeyRequest.h create mode 100644 kms/include/alibabacloud/kms/model/CreateKeyResult.h create mode 100644 kms/include/alibabacloud/kms/model/DecryptRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DecryptResult.h create mode 100644 kms/include/alibabacloud/kms/model/DeleteAliasRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DeleteAliasResult.h create mode 100644 kms/include/alibabacloud/kms/model/DeleteKeyMaterialRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DeleteKeyMaterialResult.h create mode 100644 kms/include/alibabacloud/kms/model/DescribeKeyRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DescribeKeyResult.h create mode 100644 kms/include/alibabacloud/kms/model/DescribeRegionsRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DescribeRegionsResult.h create mode 100644 kms/include/alibabacloud/kms/model/DisableKeyRequest.h create mode 100644 kms/include/alibabacloud/kms/model/DisableKeyResult.h create mode 100644 kms/include/alibabacloud/kms/model/EnableKeyRequest.h create mode 100644 kms/include/alibabacloud/kms/model/EnableKeyResult.h create mode 100644 kms/include/alibabacloud/kms/model/EncryptRequest.h create mode 100644 kms/include/alibabacloud/kms/model/EncryptResult.h create mode 100644 kms/include/alibabacloud/kms/model/GenerateDataKeyRequest.h create mode 100644 kms/include/alibabacloud/kms/model/GenerateDataKeyResult.h create mode 100644 kms/include/alibabacloud/kms/model/GetParametersForImportRequest.h create mode 100644 kms/include/alibabacloud/kms/model/GetParametersForImportResult.h create mode 100644 kms/include/alibabacloud/kms/model/ImportKeyMaterialRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ImportKeyMaterialResult.h create mode 100644 kms/include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ListAliasesByKeyIdResult.h create mode 100644 kms/include/alibabacloud/kms/model/ListAliasesRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ListAliasesResult.h create mode 100644 kms/include/alibabacloud/kms/model/ListKeysRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ListKeysResult.h create mode 100644 kms/include/alibabacloud/kms/model/ListResourceTagsRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ListResourceTagsResult.h create mode 100644 kms/include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.h create mode 100644 kms/include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h create mode 100644 kms/include/alibabacloud/kms/model/TagResourceRequest.h create mode 100644 kms/include/alibabacloud/kms/model/TagResourceResult.h create mode 100644 kms/include/alibabacloud/kms/model/UntagResourceRequest.h create mode 100644 kms/include/alibabacloud/kms/model/UntagResourceResult.h create mode 100644 kms/include/alibabacloud/kms/model/UpdateAliasRequest.h create mode 100644 kms/include/alibabacloud/kms/model/UpdateAliasResult.h create mode 100644 kms/src/KmsClient.cc create mode 100644 kms/src/model/CancelKeyDeletionRequest.cc create mode 100644 kms/src/model/CancelKeyDeletionResult.cc create mode 100644 kms/src/model/CreateAliasRequest.cc create mode 100644 kms/src/model/CreateAliasResult.cc create mode 100644 kms/src/model/CreateKeyRequest.cc create mode 100644 kms/src/model/CreateKeyResult.cc create mode 100644 kms/src/model/DecryptRequest.cc create mode 100644 kms/src/model/DecryptResult.cc create mode 100644 kms/src/model/DeleteAliasRequest.cc create mode 100644 kms/src/model/DeleteAliasResult.cc create mode 100644 kms/src/model/DeleteKeyMaterialRequest.cc create mode 100644 kms/src/model/DeleteKeyMaterialResult.cc create mode 100644 kms/src/model/DescribeKeyRequest.cc create mode 100644 kms/src/model/DescribeKeyResult.cc create mode 100644 kms/src/model/DescribeRegionsRequest.cc create mode 100644 kms/src/model/DescribeRegionsResult.cc create mode 100644 kms/src/model/DisableKeyRequest.cc create mode 100644 kms/src/model/DisableKeyResult.cc create mode 100644 kms/src/model/EnableKeyRequest.cc create mode 100644 kms/src/model/EnableKeyResult.cc create mode 100644 kms/src/model/EncryptRequest.cc create mode 100644 kms/src/model/EncryptResult.cc create mode 100644 kms/src/model/GenerateDataKeyRequest.cc create mode 100644 kms/src/model/GenerateDataKeyResult.cc create mode 100644 kms/src/model/GetParametersForImportRequest.cc create mode 100644 kms/src/model/GetParametersForImportResult.cc create mode 100644 kms/src/model/ImportKeyMaterialRequest.cc create mode 100644 kms/src/model/ImportKeyMaterialResult.cc create mode 100644 kms/src/model/ListAliasesByKeyIdRequest.cc create mode 100644 kms/src/model/ListAliasesByKeyIdResult.cc create mode 100644 kms/src/model/ListAliasesRequest.cc create mode 100644 kms/src/model/ListAliasesResult.cc create mode 100644 kms/src/model/ListKeysRequest.cc create mode 100644 kms/src/model/ListKeysResult.cc create mode 100644 kms/src/model/ListResourceTagsRequest.cc create mode 100644 kms/src/model/ListResourceTagsResult.cc create mode 100644 kms/src/model/ScheduleKeyDeletionRequest.cc create mode 100644 kms/src/model/ScheduleKeyDeletionResult.cc create mode 100644 kms/src/model/TagResourceRequest.cc create mode 100644 kms/src/model/TagResourceResult.cc create mode 100644 kms/src/model/UntagResourceRequest.cc create mode 100644 kms/src/model/UntagResourceResult.cc create mode 100644 kms/src/model/UpdateAliasRequest.cc create mode 100644 kms/src/model/UpdateAliasResult.cc diff --git a/CHANGELOG b/CHANGELOG index 788a772b4..dc94b67b2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2019-03-21 Version: 1.34.57 +1, Update Dependency + 2019-03-21 Version: 1.34.56 1, Update Dependency diff --git a/CMakeLists.txt b/CMakeLists.txt index a07921700..8a480fd41 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,4 +108,5 @@ add_subdirectory(cloudwf) add_subdirectory(alidns) add_subdirectory(httpdns) -add_subdirectory(crm) \ No newline at end of file +add_subdirectory(crm) +add_subdirectory(kms) \ No newline at end of file diff --git a/VERSION b/VERSION index 2025f05c5..406cfcf62 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.34.56 \ No newline at end of file +1.34.57 \ No newline at end of file diff --git a/kms/CMakeLists.txt b/kms/CMakeLists.txt new file mode 100644 index 000000000..ada9ed995 --- /dev/null +++ b/kms/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(kms_public_header + include/alibabacloud/kms/KmsClient.h + include/alibabacloud/kms/KmsExport.h ) + +set(kms_public_header_model + include/alibabacloud/kms/model/ListAliasesRequest.h + include/alibabacloud/kms/model/ListAliasesResult.h + include/alibabacloud/kms/model/GenerateDataKeyRequest.h + include/alibabacloud/kms/model/GenerateDataKeyResult.h + include/alibabacloud/kms/model/CancelKeyDeletionRequest.h + include/alibabacloud/kms/model/CancelKeyDeletionResult.h + include/alibabacloud/kms/model/DisableKeyRequest.h + include/alibabacloud/kms/model/DisableKeyResult.h + include/alibabacloud/kms/model/DeleteAliasRequest.h + include/alibabacloud/kms/model/DeleteAliasResult.h + include/alibabacloud/kms/model/DecryptRequest.h + include/alibabacloud/kms/model/DecryptResult.h + include/alibabacloud/kms/model/TagResourceRequest.h + include/alibabacloud/kms/model/TagResourceResult.h + include/alibabacloud/kms/model/DescribeKeyRequest.h + include/alibabacloud/kms/model/DescribeKeyResult.h + include/alibabacloud/kms/model/CreateAliasRequest.h + include/alibabacloud/kms/model/CreateAliasResult.h + include/alibabacloud/kms/model/DeleteKeyMaterialRequest.h + include/alibabacloud/kms/model/DeleteKeyMaterialResult.h + include/alibabacloud/kms/model/ListResourceTagsRequest.h + include/alibabacloud/kms/model/ListResourceTagsResult.h + include/alibabacloud/kms/model/ImportKeyMaterialRequest.h + include/alibabacloud/kms/model/ImportKeyMaterialResult.h + include/alibabacloud/kms/model/EncryptRequest.h + include/alibabacloud/kms/model/EncryptResult.h + include/alibabacloud/kms/model/UntagResourceRequest.h + include/alibabacloud/kms/model/UntagResourceResult.h + include/alibabacloud/kms/model/UpdateAliasRequest.h + include/alibabacloud/kms/model/UpdateAliasResult.h + include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.h + include/alibabacloud/kms/model/ListAliasesByKeyIdResult.h + include/alibabacloud/kms/model/EnableKeyRequest.h + include/alibabacloud/kms/model/EnableKeyResult.h + include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.h + include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h + include/alibabacloud/kms/model/DescribeRegionsRequest.h + include/alibabacloud/kms/model/DescribeRegionsResult.h + include/alibabacloud/kms/model/ListKeysRequest.h + include/alibabacloud/kms/model/ListKeysResult.h + include/alibabacloud/kms/model/GetParametersForImportRequest.h + include/alibabacloud/kms/model/GetParametersForImportResult.h + include/alibabacloud/kms/model/CreateKeyRequest.h + include/alibabacloud/kms/model/CreateKeyResult.h ) + +set(kms_src + src/KmsClient.cc + src/model/ListAliasesRequest.cc + src/model/ListAliasesResult.cc + src/model/GenerateDataKeyRequest.cc + src/model/GenerateDataKeyResult.cc + src/model/CancelKeyDeletionRequest.cc + src/model/CancelKeyDeletionResult.cc + src/model/DisableKeyRequest.cc + src/model/DisableKeyResult.cc + src/model/DeleteAliasRequest.cc + src/model/DeleteAliasResult.cc + src/model/DecryptRequest.cc + src/model/DecryptResult.cc + src/model/TagResourceRequest.cc + src/model/TagResourceResult.cc + src/model/DescribeKeyRequest.cc + src/model/DescribeKeyResult.cc + src/model/CreateAliasRequest.cc + src/model/CreateAliasResult.cc + src/model/DeleteKeyMaterialRequest.cc + src/model/DeleteKeyMaterialResult.cc + src/model/ListResourceTagsRequest.cc + src/model/ListResourceTagsResult.cc + src/model/ImportKeyMaterialRequest.cc + src/model/ImportKeyMaterialResult.cc + src/model/EncryptRequest.cc + src/model/EncryptResult.cc + src/model/UntagResourceRequest.cc + src/model/UntagResourceResult.cc + src/model/UpdateAliasRequest.cc + src/model/UpdateAliasResult.cc + src/model/ListAliasesByKeyIdRequest.cc + src/model/ListAliasesByKeyIdResult.cc + src/model/EnableKeyRequest.cc + src/model/EnableKeyResult.cc + src/model/ScheduleKeyDeletionRequest.cc + src/model/ScheduleKeyDeletionResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/ListKeysRequest.cc + src/model/ListKeysResult.cc + src/model/GetParametersForImportRequest.cc + src/model/GetParametersForImportResult.cc + src/model/CreateKeyRequest.cc + src/model/CreateKeyResult.cc ) + +add_library(kms ${LIB_TYPE} + ${kms_public_header} + ${kms_public_header_model} + ${kms_src}) + +set_target_properties(kms + 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}kms + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(kms + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_KMS_LIBRARY) +endif() + +target_include_directories(kms + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(kms + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(kms + jsoncpp) + target_include_directories(kms + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(kms + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(kms + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(kms + PRIVATE /usr/include/jsoncpp) + target_link_libraries(kms + jsoncpp) +endif() + +install(FILES ${kms_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/kms) +install(FILES ${kms_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/kms/model) +install(TARGETS kms + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/KmsClient.h b/kms/include/alibabacloud/kms/KmsClient.h new file mode 100644 index 000000000..440e757c3 --- /dev/null +++ b/kms/include/alibabacloud/kms/KmsClient.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_KMS_KMSCLIENT_H_ +#define ALIBABACLOUD_KMS_KMSCLIENT_H_ + +#include +#include +#include +#include +#include "KmsExport.h" +#include "model/ListAliasesRequest.h" +#include "model/ListAliasesResult.h" +#include "model/GenerateDataKeyRequest.h" +#include "model/GenerateDataKeyResult.h" +#include "model/CancelKeyDeletionRequest.h" +#include "model/CancelKeyDeletionResult.h" +#include "model/DisableKeyRequest.h" +#include "model/DisableKeyResult.h" +#include "model/DeleteAliasRequest.h" +#include "model/DeleteAliasResult.h" +#include "model/DecryptRequest.h" +#include "model/DecryptResult.h" +#include "model/TagResourceRequest.h" +#include "model/TagResourceResult.h" +#include "model/DescribeKeyRequest.h" +#include "model/DescribeKeyResult.h" +#include "model/CreateAliasRequest.h" +#include "model/CreateAliasResult.h" +#include "model/DeleteKeyMaterialRequest.h" +#include "model/DeleteKeyMaterialResult.h" +#include "model/ListResourceTagsRequest.h" +#include "model/ListResourceTagsResult.h" +#include "model/ImportKeyMaterialRequest.h" +#include "model/ImportKeyMaterialResult.h" +#include "model/EncryptRequest.h" +#include "model/EncryptResult.h" +#include "model/UntagResourceRequest.h" +#include "model/UntagResourceResult.h" +#include "model/UpdateAliasRequest.h" +#include "model/UpdateAliasResult.h" +#include "model/ListAliasesByKeyIdRequest.h" +#include "model/ListAliasesByKeyIdResult.h" +#include "model/EnableKeyRequest.h" +#include "model/EnableKeyResult.h" +#include "model/ScheduleKeyDeletionRequest.h" +#include "model/ScheduleKeyDeletionResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/ListKeysRequest.h" +#include "model/ListKeysResult.h" +#include "model/GetParametersForImportRequest.h" +#include "model/GetParametersForImportResult.h" +#include "model/CreateKeyRequest.h" +#include "model/CreateKeyResult.h" + + +namespace AlibabaCloud +{ + namespace Kms + { + class ALIBABACLOUD_KMS_EXPORT KmsClient : public RpcServiceClient + { + public: + typedef Outcome ListAliasesOutcome; + typedef std::future ListAliasesOutcomeCallable; + typedef std::function&)> ListAliasesAsyncHandler; + typedef Outcome GenerateDataKeyOutcome; + typedef std::future GenerateDataKeyOutcomeCallable; + typedef std::function&)> GenerateDataKeyAsyncHandler; + typedef Outcome CancelKeyDeletionOutcome; + typedef std::future CancelKeyDeletionOutcomeCallable; + typedef std::function&)> CancelKeyDeletionAsyncHandler; + typedef Outcome DisableKeyOutcome; + typedef std::future DisableKeyOutcomeCallable; + typedef std::function&)> DisableKeyAsyncHandler; + typedef Outcome DeleteAliasOutcome; + typedef std::future DeleteAliasOutcomeCallable; + typedef std::function&)> DeleteAliasAsyncHandler; + typedef Outcome DecryptOutcome; + typedef std::future DecryptOutcomeCallable; + typedef std::function&)> DecryptAsyncHandler; + typedef Outcome TagResourceOutcome; + typedef std::future TagResourceOutcomeCallable; + typedef std::function&)> TagResourceAsyncHandler; + typedef Outcome DescribeKeyOutcome; + typedef std::future DescribeKeyOutcomeCallable; + typedef std::function&)> DescribeKeyAsyncHandler; + typedef Outcome CreateAliasOutcome; + typedef std::future CreateAliasOutcomeCallable; + typedef std::function&)> CreateAliasAsyncHandler; + typedef Outcome DeleteKeyMaterialOutcome; + typedef std::future DeleteKeyMaterialOutcomeCallable; + typedef std::function&)> DeleteKeyMaterialAsyncHandler; + typedef Outcome ListResourceTagsOutcome; + typedef std::future ListResourceTagsOutcomeCallable; + typedef std::function&)> ListResourceTagsAsyncHandler; + typedef Outcome ImportKeyMaterialOutcome; + typedef std::future ImportKeyMaterialOutcomeCallable; + typedef std::function&)> ImportKeyMaterialAsyncHandler; + typedef Outcome EncryptOutcome; + typedef std::future EncryptOutcomeCallable; + typedef std::function&)> EncryptAsyncHandler; + typedef Outcome UntagResourceOutcome; + typedef std::future UntagResourceOutcomeCallable; + typedef std::function&)> UntagResourceAsyncHandler; + typedef Outcome UpdateAliasOutcome; + typedef std::future UpdateAliasOutcomeCallable; + typedef std::function&)> UpdateAliasAsyncHandler; + typedef Outcome ListAliasesByKeyIdOutcome; + typedef std::future ListAliasesByKeyIdOutcomeCallable; + typedef std::function&)> ListAliasesByKeyIdAsyncHandler; + typedef Outcome EnableKeyOutcome; + typedef std::future EnableKeyOutcomeCallable; + typedef std::function&)> EnableKeyAsyncHandler; + typedef Outcome ScheduleKeyDeletionOutcome; + typedef std::future ScheduleKeyDeletionOutcomeCallable; + typedef std::function&)> ScheduleKeyDeletionAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome ListKeysOutcome; + typedef std::future ListKeysOutcomeCallable; + typedef std::function&)> ListKeysAsyncHandler; + typedef Outcome GetParametersForImportOutcome; + typedef std::future GetParametersForImportOutcomeCallable; + typedef std::function&)> GetParametersForImportAsyncHandler; + typedef Outcome CreateKeyOutcome; + typedef std::future CreateKeyOutcomeCallable; + typedef std::function&)> CreateKeyAsyncHandler; + + KmsClient(const Credentials &credentials, const ClientConfiguration &configuration); + KmsClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + KmsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~KmsClient(); + ListAliasesOutcome listAliases(const Model::ListAliasesRequest &request)const; + void listAliasesAsync(const Model::ListAliasesRequest& request, const ListAliasesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListAliasesOutcomeCallable listAliasesCallable(const Model::ListAliasesRequest& request) const; + GenerateDataKeyOutcome generateDataKey(const Model::GenerateDataKeyRequest &request)const; + void generateDataKeyAsync(const Model::GenerateDataKeyRequest& request, const GenerateDataKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GenerateDataKeyOutcomeCallable generateDataKeyCallable(const Model::GenerateDataKeyRequest& request) const; + CancelKeyDeletionOutcome cancelKeyDeletion(const Model::CancelKeyDeletionRequest &request)const; + void cancelKeyDeletionAsync(const Model::CancelKeyDeletionRequest& request, const CancelKeyDeletionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CancelKeyDeletionOutcomeCallable cancelKeyDeletionCallable(const Model::CancelKeyDeletionRequest& request) const; + DisableKeyOutcome disableKey(const Model::DisableKeyRequest &request)const; + void disableKeyAsync(const Model::DisableKeyRequest& request, const DisableKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DisableKeyOutcomeCallable disableKeyCallable(const Model::DisableKeyRequest& request) const; + DeleteAliasOutcome deleteAlias(const Model::DeleteAliasRequest &request)const; + void deleteAliasAsync(const Model::DeleteAliasRequest& request, const DeleteAliasAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteAliasOutcomeCallable deleteAliasCallable(const Model::DeleteAliasRequest& request) const; + DecryptOutcome decrypt(const Model::DecryptRequest &request)const; + void decryptAsync(const Model::DecryptRequest& request, const DecryptAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DecryptOutcomeCallable decryptCallable(const Model::DecryptRequest& request) const; + TagResourceOutcome tagResource(const Model::TagResourceRequest &request)const; + void tagResourceAsync(const Model::TagResourceRequest& request, const TagResourceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TagResourceOutcomeCallable tagResourceCallable(const Model::TagResourceRequest& request) const; + DescribeKeyOutcome describeKey(const Model::DescribeKeyRequest &request)const; + void describeKeyAsync(const Model::DescribeKeyRequest& request, const DescribeKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeKeyOutcomeCallable describeKeyCallable(const Model::DescribeKeyRequest& request) const; + CreateAliasOutcome createAlias(const Model::CreateAliasRequest &request)const; + void createAliasAsync(const Model::CreateAliasRequest& request, const CreateAliasAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateAliasOutcomeCallable createAliasCallable(const Model::CreateAliasRequest& request) const; + DeleteKeyMaterialOutcome deleteKeyMaterial(const Model::DeleteKeyMaterialRequest &request)const; + void deleteKeyMaterialAsync(const Model::DeleteKeyMaterialRequest& request, const DeleteKeyMaterialAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteKeyMaterialOutcomeCallable deleteKeyMaterialCallable(const Model::DeleteKeyMaterialRequest& request) const; + ListResourceTagsOutcome listResourceTags(const Model::ListResourceTagsRequest &request)const; + void listResourceTagsAsync(const Model::ListResourceTagsRequest& request, const ListResourceTagsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourceTagsOutcomeCallable listResourceTagsCallable(const Model::ListResourceTagsRequest& request) const; + ImportKeyMaterialOutcome importKeyMaterial(const Model::ImportKeyMaterialRequest &request)const; + void importKeyMaterialAsync(const Model::ImportKeyMaterialRequest& request, const ImportKeyMaterialAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ImportKeyMaterialOutcomeCallable importKeyMaterialCallable(const Model::ImportKeyMaterialRequest& request) const; + EncryptOutcome encrypt(const Model::EncryptRequest &request)const; + void encryptAsync(const Model::EncryptRequest& request, const EncryptAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EncryptOutcomeCallable encryptCallable(const Model::EncryptRequest& request) const; + UntagResourceOutcome untagResource(const Model::UntagResourceRequest &request)const; + void untagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UntagResourceOutcomeCallable untagResourceCallable(const Model::UntagResourceRequest& request) const; + UpdateAliasOutcome updateAlias(const Model::UpdateAliasRequest &request)const; + void updateAliasAsync(const Model::UpdateAliasRequest& request, const UpdateAliasAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateAliasOutcomeCallable updateAliasCallable(const Model::UpdateAliasRequest& request) const; + ListAliasesByKeyIdOutcome listAliasesByKeyId(const Model::ListAliasesByKeyIdRequest &request)const; + void listAliasesByKeyIdAsync(const Model::ListAliasesByKeyIdRequest& request, const ListAliasesByKeyIdAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListAliasesByKeyIdOutcomeCallable listAliasesByKeyIdCallable(const Model::ListAliasesByKeyIdRequest& request) const; + EnableKeyOutcome enableKey(const Model::EnableKeyRequest &request)const; + void enableKeyAsync(const Model::EnableKeyRequest& request, const EnableKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EnableKeyOutcomeCallable enableKeyCallable(const Model::EnableKeyRequest& request) const; + ScheduleKeyDeletionOutcome scheduleKeyDeletion(const Model::ScheduleKeyDeletionRequest &request)const; + void scheduleKeyDeletionAsync(const Model::ScheduleKeyDeletionRequest& request, const ScheduleKeyDeletionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ScheduleKeyDeletionOutcomeCallable scheduleKeyDeletionCallable(const Model::ScheduleKeyDeletionRequest& 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; + ListKeysOutcome listKeys(const Model::ListKeysRequest &request)const; + void listKeysAsync(const Model::ListKeysRequest& request, const ListKeysAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListKeysOutcomeCallable listKeysCallable(const Model::ListKeysRequest& request) const; + GetParametersForImportOutcome getParametersForImport(const Model::GetParametersForImportRequest &request)const; + void getParametersForImportAsync(const Model::GetParametersForImportRequest& request, const GetParametersForImportAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetParametersForImportOutcomeCallable getParametersForImportCallable(const Model::GetParametersForImportRequest& request) const; + CreateKeyOutcome createKey(const Model::CreateKeyRequest &request)const; + void createKeyAsync(const Model::CreateKeyRequest& request, const CreateKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateKeyOutcomeCallable createKeyCallable(const Model::CreateKeyRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_KMS_KMSCLIENT_H_ diff --git a/kms/include/alibabacloud/kms/KmsExport.h b/kms/include/alibabacloud/kms/KmsExport.h new file mode 100644 index 000000000..a39e8ef71 --- /dev/null +++ b/kms/include/alibabacloud/kms/KmsExport.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_KMS_KMSEXPORT_H_ +#define ALIBABACLOUD_KMS_KMSEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_KMS_LIBRARY) +# define ALIBABACLOUD_KMS_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_KMS_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_KMS_EXPORT +#endif + +#endif // !ALIBABACLOUD_KMS_KMSEXPORT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CancelKeyDeletionRequest.h b/kms/include/alibabacloud/kms/model/CancelKeyDeletionRequest.h new file mode 100644 index 000000000..d3862c78c --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CancelKeyDeletionRequest.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_KMS_MODEL_CANCELKEYDELETIONREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_CANCELKEYDELETIONREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CancelKeyDeletionRequest : public RpcServiceRequest + { + + public: + CancelKeyDeletionRequest(); + ~CancelKeyDeletionRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CANCELKEYDELETIONREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CancelKeyDeletionResult.h b/kms/include/alibabacloud/kms/model/CancelKeyDeletionResult.h new file mode 100644 index 000000000..53388e917 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CancelKeyDeletionResult.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_KMS_MODEL_CANCELKEYDELETIONRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_CANCELKEYDELETIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CancelKeyDeletionResult : public ServiceResult + { + public: + + + CancelKeyDeletionResult(); + explicit CancelKeyDeletionResult(const std::string &payload); + ~CancelKeyDeletionResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CANCELKEYDELETIONRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CreateAliasRequest.h b/kms/include/alibabacloud/kms/model/CreateAliasRequest.h new file mode 100644 index 000000000..b565e6103 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CreateAliasRequest.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_KMS_MODEL_CREATEALIASREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_CREATEALIASREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CreateAliasRequest : public RpcServiceRequest + { + + public: + CreateAliasRequest(); + ~CreateAliasRequest(); + + std::string getAliasName()const; + void setAliasName(const std::string& aliasName); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string aliasName_; + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CREATEALIASREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CreateAliasResult.h b/kms/include/alibabacloud/kms/model/CreateAliasResult.h new file mode 100644 index 000000000..be2c0add9 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CreateAliasResult.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_KMS_MODEL_CREATEALIASRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_CREATEALIASRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CreateAliasResult : public ServiceResult + { + public: + + + CreateAliasResult(); + explicit CreateAliasResult(const std::string &payload); + ~CreateAliasResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CREATEALIASRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CreateKeyRequest.h b/kms/include/alibabacloud/kms/model/CreateKeyRequest.h new file mode 100644 index 000000000..56556f269 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CreateKeyRequest.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_KMS_MODEL_CREATEKEYREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_CREATEKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CreateKeyRequest : public RpcServiceRequest + { + + public: + CreateKeyRequest(); + ~CreateKeyRequest(); + + std::string getKeyUsage()const; + void setKeyUsage(const std::string& keyUsage); + std::string getOrigin()const; + void setOrigin(const std::string& origin); + std::string getDescription()const; + void setDescription(const std::string& description); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyUsage_; + std::string origin_; + std::string description_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CREATEKEYREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/CreateKeyResult.h b/kms/include/alibabacloud/kms/model/CreateKeyResult.h new file mode 100644 index 000000000..0918b2348 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/CreateKeyResult.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_KMS_MODEL_CREATEKEYRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_CREATEKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT CreateKeyResult : public ServiceResult + { + public: + struct KeyMetadata + { + std::string origin; + std::string creationDate; + std::string description; + std::string materialExpireTime; + std::string keyUsage; + std::string keyId; + std::string creator; + std::string arn; + std::string keyState; + std::string deleteDate; + }; + + + CreateKeyResult(); + explicit CreateKeyResult(const std::string &payload); + ~CreateKeyResult(); + KeyMetadata getKeyMetadata()const; + + protected: + void parse(const std::string &payload); + private: + KeyMetadata keyMetadata_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_CREATEKEYRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DecryptRequest.h b/kms/include/alibabacloud/kms/model/DecryptRequest.h new file mode 100644 index 000000000..835808d56 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DecryptRequest.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_KMS_MODEL_DECRYPTREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DECRYPTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DecryptRequest : public RpcServiceRequest + { + + public: + DecryptRequest(); + ~DecryptRequest(); + + std::string getEncryptionContext()const; + void setEncryptionContext(const std::string& encryptionContext); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + std::string getCiphertextBlob()const; + void setCiphertextBlob(const std::string& ciphertextBlob); + + private: + std::string encryptionContext_; + std::string sTSToken_; + std::string ciphertextBlob_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DECRYPTREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DecryptResult.h b/kms/include/alibabacloud/kms/model/DecryptResult.h new file mode 100644 index 000000000..3c2d94994 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DecryptResult.h @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_KMS_MODEL_DECRYPTRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DECRYPTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DecryptResult : public ServiceResult + { + public: + + + DecryptResult(); + explicit DecryptResult(const std::string &payload); + ~DecryptResult(); + std::string getPlaintext()const; + std::string getKeyId()const; + + protected: + void parse(const std::string &payload); + private: + std::string plaintext_; + std::string keyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DECRYPTRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DeleteAliasRequest.h b/kms/include/alibabacloud/kms/model/DeleteAliasRequest.h new file mode 100644 index 000000000..e357ddb78 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DeleteAliasRequest.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_KMS_MODEL_DELETEALIASREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DELETEALIASREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DeleteAliasRequest : public RpcServiceRequest + { + + public: + DeleteAliasRequest(); + ~DeleteAliasRequest(); + + std::string getAliasName()const; + void setAliasName(const std::string& aliasName); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string aliasName_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DELETEALIASREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DeleteAliasResult.h b/kms/include/alibabacloud/kms/model/DeleteAliasResult.h new file mode 100644 index 000000000..dea37fc46 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DeleteAliasResult.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_KMS_MODEL_DELETEALIASRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DELETEALIASRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DeleteAliasResult : public ServiceResult + { + public: + + + DeleteAliasResult(); + explicit DeleteAliasResult(const std::string &payload); + ~DeleteAliasResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DELETEALIASRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DeleteKeyMaterialRequest.h b/kms/include/alibabacloud/kms/model/DeleteKeyMaterialRequest.h new file mode 100644 index 000000000..637d485a8 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DeleteKeyMaterialRequest.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_KMS_MODEL_DELETEKEYMATERIALREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DELETEKEYMATERIALREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DeleteKeyMaterialRequest : public RpcServiceRequest + { + + public: + DeleteKeyMaterialRequest(); + ~DeleteKeyMaterialRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DELETEKEYMATERIALREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DeleteKeyMaterialResult.h b/kms/include/alibabacloud/kms/model/DeleteKeyMaterialResult.h new file mode 100644 index 000000000..76cd40484 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DeleteKeyMaterialResult.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_KMS_MODEL_DELETEKEYMATERIALRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DELETEKEYMATERIALRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DeleteKeyMaterialResult : public ServiceResult + { + public: + + + DeleteKeyMaterialResult(); + explicit DeleteKeyMaterialResult(const std::string &payload); + ~DeleteKeyMaterialResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DELETEKEYMATERIALRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DescribeKeyRequest.h b/kms/include/alibabacloud/kms/model/DescribeKeyRequest.h new file mode 100644 index 000000000..1a1bfa40f --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DescribeKeyRequest.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_KMS_MODEL_DESCRIBEKEYREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DescribeKeyRequest : public RpcServiceRequest + { + + public: + DescribeKeyRequest(); + ~DescribeKeyRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DescribeKeyResult.h b/kms/include/alibabacloud/kms/model/DescribeKeyResult.h new file mode 100644 index 000000000..d84c17e5c --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DescribeKeyResult.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_KMS_MODEL_DESCRIBEKEYRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DescribeKeyResult : public ServiceResult + { + public: + struct KeyMetadata + { + std::string origin; + std::string creationDate; + std::string description; + std::string materialExpireTime; + std::string keyUsage; + std::string keyId; + std::string creator; + std::string arn; + std::string keyState; + std::string deleteDate; + }; + + + DescribeKeyResult(); + explicit DescribeKeyResult(const std::string &payload); + ~DescribeKeyResult(); + KeyMetadata getKeyMetadata()const; + + protected: + void parse(const std::string &payload); + private: + KeyMetadata keyMetadata_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DescribeRegionsRequest.h b/kms/include/alibabacloud/kms/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..e40375794 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DescribeRegionsRequest.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_KMS_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DescribeRegionsRequest : public RpcServiceRequest + { + + public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DESCRIBEREGIONSREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DescribeRegionsResult.h b/kms/include/alibabacloud/kms/model/DescribeRegionsResult.h new file mode 100644 index 000000000..3dd250929 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DescribeRegionsResult.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_KMS_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct Region + { + std::string regionId; + }; + + + 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_KMS_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DisableKeyRequest.h b/kms/include/alibabacloud/kms/model/DisableKeyRequest.h new file mode 100644 index 000000000..4c232ebda --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DisableKeyRequest.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_KMS_MODEL_DISABLEKEYREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_DISABLEKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DisableKeyRequest : public RpcServiceRequest + { + + public: + DisableKeyRequest(); + ~DisableKeyRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DISABLEKEYREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/DisableKeyResult.h b/kms/include/alibabacloud/kms/model/DisableKeyResult.h new file mode 100644 index 000000000..ad5dc986d --- /dev/null +++ b/kms/include/alibabacloud/kms/model/DisableKeyResult.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_KMS_MODEL_DISABLEKEYRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_DISABLEKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT DisableKeyResult : public ServiceResult + { + public: + + + DisableKeyResult(); + explicit DisableKeyResult(const std::string &payload); + ~DisableKeyResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_DISABLEKEYRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/EnableKeyRequest.h b/kms/include/alibabacloud/kms/model/EnableKeyRequest.h new file mode 100644 index 000000000..35787ee75 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/EnableKeyRequest.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_KMS_MODEL_ENABLEKEYREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_ENABLEKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT EnableKeyRequest : public RpcServiceRequest + { + + public: + EnableKeyRequest(); + ~EnableKeyRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_ENABLEKEYREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/EnableKeyResult.h b/kms/include/alibabacloud/kms/model/EnableKeyResult.h new file mode 100644 index 000000000..84d808e7f --- /dev/null +++ b/kms/include/alibabacloud/kms/model/EnableKeyResult.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_KMS_MODEL_ENABLEKEYRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_ENABLEKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT EnableKeyResult : public ServiceResult + { + public: + + + EnableKeyResult(); + explicit EnableKeyResult(const std::string &payload); + ~EnableKeyResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_ENABLEKEYRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/EncryptRequest.h b/kms/include/alibabacloud/kms/model/EncryptRequest.h new file mode 100644 index 000000000..a3d5a1d6b --- /dev/null +++ b/kms/include/alibabacloud/kms/model/EncryptRequest.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_KMS_MODEL_ENCRYPTREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_ENCRYPTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT EncryptRequest : public RpcServiceRequest + { + + public: + EncryptRequest(); + ~EncryptRequest(); + + std::string getEncryptionContext()const; + void setEncryptionContext(const std::string& encryptionContext); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + std::string getPlaintext()const; + void setPlaintext(const std::string& plaintext); + + private: + std::string encryptionContext_; + std::string keyId_; + std::string sTSToken_; + std::string plaintext_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_ENCRYPTREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/EncryptResult.h b/kms/include/alibabacloud/kms/model/EncryptResult.h new file mode 100644 index 000000000..17fca41cb --- /dev/null +++ b/kms/include/alibabacloud/kms/model/EncryptResult.h @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_KMS_MODEL_ENCRYPTRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_ENCRYPTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT EncryptResult : public ServiceResult + { + public: + + + EncryptResult(); + explicit EncryptResult(const std::string &payload); + ~EncryptResult(); + std::string getCiphertextBlob()const; + std::string getKeyId()const; + + protected: + void parse(const std::string &payload); + private: + std::string ciphertextBlob_; + std::string keyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_ENCRYPTRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/GenerateDataKeyRequest.h b/kms/include/alibabacloud/kms/model/GenerateDataKeyRequest.h new file mode 100644 index 000000000..9766eb547 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/GenerateDataKeyRequest.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_KMS_MODEL_GENERATEDATAKEYREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT GenerateDataKeyRequest : public RpcServiceRequest + { + + public: + GenerateDataKeyRequest(); + ~GenerateDataKeyRequest(); + + std::string getEncryptionContext()const; + void setEncryptionContext(const std::string& encryptionContext); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getKeySpec()const; + void setKeySpec(const std::string& keySpec); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + int getNumberOfBytes()const; + void setNumberOfBytes(int numberOfBytes); + + private: + std::string encryptionContext_; + std::string keyId_; + std::string keySpec_; + std::string sTSToken_; + int numberOfBytes_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/GenerateDataKeyResult.h b/kms/include/alibabacloud/kms/model/GenerateDataKeyResult.h new file mode 100644 index 000000000..db977cec2 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/GenerateDataKeyResult.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_KMS_MODEL_GENERATEDATAKEYRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT GenerateDataKeyResult : public ServiceResult + { + public: + + + GenerateDataKeyResult(); + explicit GenerateDataKeyResult(const std::string &payload); + ~GenerateDataKeyResult(); + std::string getCiphertextBlob()const; + std::string getPlaintext()const; + std::string getKeyId()const; + + protected: + void parse(const std::string &payload); + private: + std::string ciphertextBlob_; + std::string plaintext_; + std::string keyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/GetParametersForImportRequest.h b/kms/include/alibabacloud/kms/model/GetParametersForImportRequest.h new file mode 100644 index 000000000..b1c81a1fe --- /dev/null +++ b/kms/include/alibabacloud/kms/model/GetParametersForImportRequest.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_KMS_MODEL_GETPARAMETERSFORIMPORTREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_GETPARAMETERSFORIMPORTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT GetParametersForImportRequest : public RpcServiceRequest + { + + public: + GetParametersForImportRequest(); + ~GetParametersForImportRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + std::string getWrappingAlgorithm()const; + void setWrappingAlgorithm(const std::string& wrappingAlgorithm); + std::string getWrappingKeySpec()const; + void setWrappingKeySpec(const std::string& wrappingKeySpec); + + private: + std::string keyId_; + std::string sTSToken_; + std::string wrappingAlgorithm_; + std::string wrappingKeySpec_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_GETPARAMETERSFORIMPORTREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/GetParametersForImportResult.h b/kms/include/alibabacloud/kms/model/GetParametersForImportResult.h new file mode 100644 index 000000000..399ff2a48 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/GetParametersForImportResult.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_KMS_MODEL_GETPARAMETERSFORIMPORTRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_GETPARAMETERSFORIMPORTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT GetParametersForImportResult : public ServiceResult + { + public: + + + GetParametersForImportResult(); + explicit GetParametersForImportResult(const std::string &payload); + ~GetParametersForImportResult(); + std::string getPublicKey()const; + std::string getKeyId()const; + std::string getTokenExpireTime()const; + std::string getImportToken()const; + + protected: + void parse(const std::string &payload); + private: + std::string publicKey_; + std::string keyId_; + std::string tokenExpireTime_; + std::string importToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_GETPARAMETERSFORIMPORTRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ImportKeyMaterialRequest.h b/kms/include/alibabacloud/kms/model/ImportKeyMaterialRequest.h new file mode 100644 index 000000000..03c59672b --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ImportKeyMaterialRequest.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_KMS_MODEL_IMPORTKEYMATERIALREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_IMPORTKEYMATERIALREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ImportKeyMaterialRequest : public RpcServiceRequest + { + + public: + ImportKeyMaterialRequest(); + ~ImportKeyMaterialRequest(); + + std::string getImportToken()const; + void setImportToken(const std::string& importToken); + std::string getEncryptedKeyMaterial()const; + void setEncryptedKeyMaterial(const std::string& encryptedKeyMaterial); + long getKeyMaterialExpireUnix()const; + void setKeyMaterialExpireUnix(long keyMaterialExpireUnix); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string importToken_; + std::string encryptedKeyMaterial_; + long keyMaterialExpireUnix_; + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_IMPORTKEYMATERIALREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ImportKeyMaterialResult.h b/kms/include/alibabacloud/kms/model/ImportKeyMaterialResult.h new file mode 100644 index 000000000..e21662810 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ImportKeyMaterialResult.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_KMS_MODEL_IMPORTKEYMATERIALRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_IMPORTKEYMATERIALRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ImportKeyMaterialResult : public ServiceResult + { + public: + + + ImportKeyMaterialResult(); + explicit ImportKeyMaterialResult(const std::string &payload); + ~ImportKeyMaterialResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_IMPORTKEYMATERIALRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.h b/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.h new file mode 100644 index 000000000..b10a99cca --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.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_KMS_MODEL_LISTALIASESBYKEYIDREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTALIASESBYKEYIDREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListAliasesByKeyIdRequest : public RpcServiceRequest + { + + public: + ListAliasesByKeyIdRequest(); + ~ListAliasesByKeyIdRequest(); + + int getPageSize()const; + void setPageSize(int pageSize); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + int getPageNumber()const; + void setPageNumber(int pageNumber); + + private: + int pageSize_; + std::string keyId_; + std::string sTSToken_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTALIASESBYKEYIDREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdResult.h b/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdResult.h new file mode 100644 index 000000000..aedd7727c --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListAliasesByKeyIdResult.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_KMS_MODEL_LISTALIASESBYKEYIDRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTALIASESBYKEYIDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListAliasesByKeyIdResult : public ServiceResult + { + public: + struct Alias + { + std::string aliasName; + std::string keyId; + std::string aliasArn; + }; + + + ListAliasesByKeyIdResult(); + explicit ListAliasesByKeyIdResult(const std::string &payload); + ~ListAliasesByKeyIdResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getAliases()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector aliases_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTALIASESBYKEYIDRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListAliasesRequest.h b/kms/include/alibabacloud/kms/model/ListAliasesRequest.h new file mode 100644 index 000000000..3fcfef47c --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListAliasesRequest.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_KMS_MODEL_LISTALIASESREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTALIASESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListAliasesRequest : public RpcServiceRequest + { + + public: + ListAliasesRequest(); + ~ListAliasesRequest(); + + int getPageSize()const; + void setPageSize(int pageSize); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + int getPageNumber()const; + void setPageNumber(int pageNumber); + + private: + int pageSize_; + std::string sTSToken_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTALIASESREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListAliasesResult.h b/kms/include/alibabacloud/kms/model/ListAliasesResult.h new file mode 100644 index 000000000..4216c6ae5 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListAliasesResult.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_KMS_MODEL_LISTALIASESRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTALIASESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListAliasesResult : public ServiceResult + { + public: + struct Alias + { + std::string aliasName; + std::string keyId; + std::string aliasArn; + }; + + + ListAliasesResult(); + explicit ListAliasesResult(const std::string &payload); + ~ListAliasesResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getAliases()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector aliases_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTALIASESRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListKeysRequest.h b/kms/include/alibabacloud/kms/model/ListKeysRequest.h new file mode 100644 index 000000000..18118472f --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListKeysRequest.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_KMS_MODEL_LISTKEYSREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTKEYSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListKeysRequest : public RpcServiceRequest + { + + public: + ListKeysRequest(); + ~ListKeysRequest(); + + int getPageSize()const; + void setPageSize(int pageSize); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + int getPageNumber()const; + void setPageNumber(int pageNumber); + + private: + int pageSize_; + std::string sTSToken_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTKEYSREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListKeysResult.h b/kms/include/alibabacloud/kms/model/ListKeysResult.h new file mode 100644 index 000000000..1f237ca6e --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListKeysResult.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_KMS_MODEL_LISTKEYSRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTKEYSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListKeysResult : public ServiceResult + { + public: + struct Key + { + std::string keyId; + std::string keyArn; + }; + + + ListKeysResult(); + explicit ListKeysResult(const std::string &payload); + ~ListKeysResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getKeys()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector keys_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTKEYSRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListResourceTagsRequest.h b/kms/include/alibabacloud/kms/model/ListResourceTagsRequest.h new file mode 100644 index 000000000..76dfaeb9e --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListResourceTagsRequest.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_KMS_MODEL_LISTRESOURCETAGSREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTRESOURCETAGSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListResourceTagsRequest : public RpcServiceRequest + { + + public: + ListResourceTagsRequest(); + ~ListResourceTagsRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTRESOURCETAGSREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ListResourceTagsResult.h b/kms/include/alibabacloud/kms/model/ListResourceTagsResult.h new file mode 100644 index 000000000..7228ec6f5 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ListResourceTagsResult.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_KMS_MODEL_LISTRESOURCETAGSRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_LISTRESOURCETAGSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ListResourceTagsResult : public ServiceResult + { + public: + struct Tag + { + std::string tagKey; + std::string keyId; + std::string tagValue; + }; + + + ListResourceTagsResult(); + explicit ListResourceTagsResult(const std::string &payload); + ~ListResourceTagsResult(); + std::vector getTags()const; + + protected: + void parse(const std::string &payload); + private: + std::vector tags_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_LISTRESOURCETAGSRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.h b/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.h new file mode 100644 index 000000000..1ee7eae50 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.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_KMS_MODEL_SCHEDULEKEYDELETIONREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_SCHEDULEKEYDELETIONREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ScheduleKeyDeletionRequest : public RpcServiceRequest + { + + public: + ScheduleKeyDeletionRequest(); + ~ScheduleKeyDeletionRequest(); + + int getPendingWindowInDays()const; + void setPendingWindowInDays(int pendingWindowInDays); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + int pendingWindowInDays_; + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_SCHEDULEKEYDELETIONREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h b/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h new file mode 100644 index 000000000..4043a4049 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/ScheduleKeyDeletionResult.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_KMS_MODEL_SCHEDULEKEYDELETIONRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_SCHEDULEKEYDELETIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT ScheduleKeyDeletionResult : public ServiceResult + { + public: + + + ScheduleKeyDeletionResult(); + explicit ScheduleKeyDeletionResult(const std::string &payload); + ~ScheduleKeyDeletionResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_SCHEDULEKEYDELETIONRESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/TagResourceRequest.h b/kms/include/alibabacloud/kms/model/TagResourceRequest.h new file mode 100644 index 000000000..e6266fcfc --- /dev/null +++ b/kms/include/alibabacloud/kms/model/TagResourceRequest.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_KMS_MODEL_TAGRESOURCEREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_TAGRESOURCEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT TagResourceRequest : public RpcServiceRequest + { + + public: + TagResourceRequest(); + ~TagResourceRequest(); + + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + std::string getTags()const; + void setTags(const std::string& tags); + + private: + std::string keyId_; + std::string sTSToken_; + std::string tags_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_TAGRESOURCEREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/TagResourceResult.h b/kms/include/alibabacloud/kms/model/TagResourceResult.h new file mode 100644 index 000000000..f62aafa93 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/TagResourceResult.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_KMS_MODEL_TAGRESOURCERESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_TAGRESOURCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT TagResourceResult : public ServiceResult + { + public: + + + TagResourceResult(); + explicit TagResourceResult(const std::string &payload); + ~TagResourceResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_TAGRESOURCERESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/UntagResourceRequest.h b/kms/include/alibabacloud/kms/model/UntagResourceRequest.h new file mode 100644 index 000000000..08038241f --- /dev/null +++ b/kms/include/alibabacloud/kms/model/UntagResourceRequest.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_KMS_MODEL_UNTAGRESOURCEREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_UNTAGRESOURCEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT UntagResourceRequest : public RpcServiceRequest + { + + public: + UntagResourceRequest(); + ~UntagResourceRequest(); + + std::string getTagKeys()const; + void setTagKeys(const std::string& tagKeys); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string tagKeys_; + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_UNTAGRESOURCEREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/UntagResourceResult.h b/kms/include/alibabacloud/kms/model/UntagResourceResult.h new file mode 100644 index 000000000..0d1da6c5f --- /dev/null +++ b/kms/include/alibabacloud/kms/model/UntagResourceResult.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_KMS_MODEL_UNTAGRESOURCERESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_UNTAGRESOURCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT UntagResourceResult : public ServiceResult + { + public: + + + UntagResourceResult(); + explicit UntagResourceResult(const std::string &payload); + ~UntagResourceResult(); + std::string getKeyId()const; + + protected: + void parse(const std::string &payload); + private: + std::string keyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_UNTAGRESOURCERESULT_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/UpdateAliasRequest.h b/kms/include/alibabacloud/kms/model/UpdateAliasRequest.h new file mode 100644 index 000000000..2225a6558 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/UpdateAliasRequest.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_KMS_MODEL_UPDATEALIASREQUEST_H_ +#define ALIBABACLOUD_KMS_MODEL_UPDATEALIASREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT UpdateAliasRequest : public RpcServiceRequest + { + + public: + UpdateAliasRequest(); + ~UpdateAliasRequest(); + + std::string getAliasName()const; + void setAliasName(const std::string& aliasName); + std::string getKeyId()const; + void setKeyId(const std::string& keyId); + std::string getSTSToken()const; + void setSTSToken(const std::string& sTSToken); + + private: + std::string aliasName_; + std::string keyId_; + std::string sTSToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEALIASREQUEST_H_ \ No newline at end of file diff --git a/kms/include/alibabacloud/kms/model/UpdateAliasResult.h b/kms/include/alibabacloud/kms/model/UpdateAliasResult.h new file mode 100644 index 000000000..a70145230 --- /dev/null +++ b/kms/include/alibabacloud/kms/model/UpdateAliasResult.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_KMS_MODEL_UPDATEALIASRESULT_H_ +#define ALIBABACLOUD_KMS_MODEL_UPDATEALIASRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Kms + { + namespace Model + { + class ALIBABACLOUD_KMS_EXPORT UpdateAliasResult : public ServiceResult + { + public: + + + UpdateAliasResult(); + explicit UpdateAliasResult(const std::string &payload); + ~UpdateAliasResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEALIASRESULT_H_ \ No newline at end of file diff --git a/kms/src/KmsClient.cc b/kms/src/KmsClient.cc new file mode 100644 index 000000000..4b63ba750 --- /dev/null +++ b/kms/src/KmsClient.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::Kms; +using namespace AlibabaCloud::Kms::Model; + +namespace +{ + const std::string SERVICE_NAME = "Kms"; +} + +KmsClient::KmsClient(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, "kms"); +} + +KmsClient::KmsClient(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, "kms"); +} + +KmsClient::KmsClient(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, "kms"); +} + +KmsClient::~KmsClient() +{} + +KmsClient::ListAliasesOutcome KmsClient::listAliases(const ListAliasesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListAliasesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListAliasesOutcome(ListAliasesResult(outcome.result())); + else + return ListAliasesOutcome(outcome.error()); +} + +void KmsClient::listAliasesAsync(const ListAliasesRequest& request, const ListAliasesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listAliases(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ListAliasesOutcomeCallable KmsClient::listAliasesCallable(const ListAliasesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listAliases(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::GenerateDataKeyOutcome KmsClient::generateDataKey(const GenerateDataKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GenerateDataKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GenerateDataKeyOutcome(GenerateDataKeyResult(outcome.result())); + else + return GenerateDataKeyOutcome(outcome.error()); +} + +void KmsClient::generateDataKeyAsync(const GenerateDataKeyRequest& request, const GenerateDataKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, generateDataKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::GenerateDataKeyOutcomeCallable KmsClient::generateDataKeyCallable(const GenerateDataKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->generateDataKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::CancelKeyDeletionOutcome KmsClient::cancelKeyDeletion(const CancelKeyDeletionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CancelKeyDeletionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CancelKeyDeletionOutcome(CancelKeyDeletionResult(outcome.result())); + else + return CancelKeyDeletionOutcome(outcome.error()); +} + +void KmsClient::cancelKeyDeletionAsync(const CancelKeyDeletionRequest& request, const CancelKeyDeletionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, cancelKeyDeletion(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::CancelKeyDeletionOutcomeCallable KmsClient::cancelKeyDeletionCallable(const CancelKeyDeletionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->cancelKeyDeletion(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DisableKeyOutcome KmsClient::disableKey(const DisableKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DisableKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DisableKeyOutcome(DisableKeyResult(outcome.result())); + else + return DisableKeyOutcome(outcome.error()); +} + +void KmsClient::disableKeyAsync(const DisableKeyRequest& request, const DisableKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, disableKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::DisableKeyOutcomeCallable KmsClient::disableKeyCallable(const DisableKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->disableKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DeleteAliasOutcome KmsClient::deleteAlias(const DeleteAliasRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteAliasOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteAliasOutcome(DeleteAliasResult(outcome.result())); + else + return DeleteAliasOutcome(outcome.error()); +} + +void KmsClient::deleteAliasAsync(const DeleteAliasRequest& request, const DeleteAliasAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteAlias(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::DeleteAliasOutcomeCallable KmsClient::deleteAliasCallable(const DeleteAliasRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteAlias(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DecryptOutcome KmsClient::decrypt(const DecryptRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DecryptOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DecryptOutcome(DecryptResult(outcome.result())); + else + return DecryptOutcome(outcome.error()); +} + +void KmsClient::decryptAsync(const DecryptRequest& request, const DecryptAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, decrypt(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::DecryptOutcomeCallable KmsClient::decryptCallable(const DecryptRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->decrypt(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::TagResourceOutcome KmsClient::tagResource(const TagResourceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TagResourceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TagResourceOutcome(TagResourceResult(outcome.result())); + else + return TagResourceOutcome(outcome.error()); +} + +void KmsClient::tagResourceAsync(const TagResourceRequest& request, const TagResourceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, tagResource(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::TagResourceOutcomeCallable KmsClient::tagResourceCallable(const TagResourceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->tagResource(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DescribeKeyOutcome KmsClient::describeKey(const DescribeKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeKeyOutcome(DescribeKeyResult(outcome.result())); + else + return DescribeKeyOutcome(outcome.error()); +} + +void KmsClient::describeKeyAsync(const DescribeKeyRequest& request, const DescribeKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::DescribeKeyOutcomeCallable KmsClient::describeKeyCallable(const DescribeKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::CreateAliasOutcome KmsClient::createAlias(const CreateAliasRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateAliasOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateAliasOutcome(CreateAliasResult(outcome.result())); + else + return CreateAliasOutcome(outcome.error()); +} + +void KmsClient::createAliasAsync(const CreateAliasRequest& request, const CreateAliasAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createAlias(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::CreateAliasOutcomeCallable KmsClient::createAliasCallable(const CreateAliasRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createAlias(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DeleteKeyMaterialOutcome KmsClient::deleteKeyMaterial(const DeleteKeyMaterialRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteKeyMaterialOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteKeyMaterialOutcome(DeleteKeyMaterialResult(outcome.result())); + else + return DeleteKeyMaterialOutcome(outcome.error()); +} + +void KmsClient::deleteKeyMaterialAsync(const DeleteKeyMaterialRequest& request, const DeleteKeyMaterialAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteKeyMaterial(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::DeleteKeyMaterialOutcomeCallable KmsClient::deleteKeyMaterialCallable(const DeleteKeyMaterialRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteKeyMaterial(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::ListResourceTagsOutcome KmsClient::listResourceTags(const ListResourceTagsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourceTagsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourceTagsOutcome(ListResourceTagsResult(outcome.result())); + else + return ListResourceTagsOutcome(outcome.error()); +} + +void KmsClient::listResourceTagsAsync(const ListResourceTagsRequest& request, const ListResourceTagsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourceTags(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ListResourceTagsOutcomeCallable KmsClient::listResourceTagsCallable(const ListResourceTagsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourceTags(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::ImportKeyMaterialOutcome KmsClient::importKeyMaterial(const ImportKeyMaterialRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ImportKeyMaterialOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ImportKeyMaterialOutcome(ImportKeyMaterialResult(outcome.result())); + else + return ImportKeyMaterialOutcome(outcome.error()); +} + +void KmsClient::importKeyMaterialAsync(const ImportKeyMaterialRequest& request, const ImportKeyMaterialAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, importKeyMaterial(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ImportKeyMaterialOutcomeCallable KmsClient::importKeyMaterialCallable(const ImportKeyMaterialRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->importKeyMaterial(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::EncryptOutcome KmsClient::encrypt(const EncryptRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EncryptOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EncryptOutcome(EncryptResult(outcome.result())); + else + return EncryptOutcome(outcome.error()); +} + +void KmsClient::encryptAsync(const EncryptRequest& request, const EncryptAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, encrypt(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::EncryptOutcomeCallable KmsClient::encryptCallable(const EncryptRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->encrypt(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::UntagResourceOutcome KmsClient::untagResource(const UntagResourceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UntagResourceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UntagResourceOutcome(UntagResourceResult(outcome.result())); + else + return UntagResourceOutcome(outcome.error()); +} + +void KmsClient::untagResourceAsync(const UntagResourceRequest& request, const UntagResourceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, untagResource(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::UntagResourceOutcomeCallable KmsClient::untagResourceCallable(const UntagResourceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->untagResource(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::UpdateAliasOutcome KmsClient::updateAlias(const UpdateAliasRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateAliasOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateAliasOutcome(UpdateAliasResult(outcome.result())); + else + return UpdateAliasOutcome(outcome.error()); +} + +void KmsClient::updateAliasAsync(const UpdateAliasRequest& request, const UpdateAliasAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateAlias(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::UpdateAliasOutcomeCallable KmsClient::updateAliasCallable(const UpdateAliasRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateAlias(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::ListAliasesByKeyIdOutcome KmsClient::listAliasesByKeyId(const ListAliasesByKeyIdRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListAliasesByKeyIdOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListAliasesByKeyIdOutcome(ListAliasesByKeyIdResult(outcome.result())); + else + return ListAliasesByKeyIdOutcome(outcome.error()); +} + +void KmsClient::listAliasesByKeyIdAsync(const ListAliasesByKeyIdRequest& request, const ListAliasesByKeyIdAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listAliasesByKeyId(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ListAliasesByKeyIdOutcomeCallable KmsClient::listAliasesByKeyIdCallable(const ListAliasesByKeyIdRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listAliasesByKeyId(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::EnableKeyOutcome KmsClient::enableKey(const EnableKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EnableKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EnableKeyOutcome(EnableKeyResult(outcome.result())); + else + return EnableKeyOutcome(outcome.error()); +} + +void KmsClient::enableKeyAsync(const EnableKeyRequest& request, const EnableKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, enableKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::EnableKeyOutcomeCallable KmsClient::enableKeyCallable(const EnableKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->enableKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::ScheduleKeyDeletionOutcome KmsClient::scheduleKeyDeletion(const ScheduleKeyDeletionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ScheduleKeyDeletionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ScheduleKeyDeletionOutcome(ScheduleKeyDeletionResult(outcome.result())); + else + return ScheduleKeyDeletionOutcome(outcome.error()); +} + +void KmsClient::scheduleKeyDeletionAsync(const ScheduleKeyDeletionRequest& request, const ScheduleKeyDeletionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, scheduleKeyDeletion(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ScheduleKeyDeletionOutcomeCallable KmsClient::scheduleKeyDeletionCallable(const ScheduleKeyDeletionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->scheduleKeyDeletion(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::DescribeRegionsOutcome KmsClient::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 KmsClient::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)); +} + +KmsClient::DescribeRegionsOutcomeCallable KmsClient::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(); +} + +KmsClient::ListKeysOutcome KmsClient::listKeys(const ListKeysRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListKeysOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListKeysOutcome(ListKeysResult(outcome.result())); + else + return ListKeysOutcome(outcome.error()); +} + +void KmsClient::listKeysAsync(const ListKeysRequest& request, const ListKeysAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listKeys(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::ListKeysOutcomeCallable KmsClient::listKeysCallable(const ListKeysRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listKeys(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::GetParametersForImportOutcome KmsClient::getParametersForImport(const GetParametersForImportRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetParametersForImportOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetParametersForImportOutcome(GetParametersForImportResult(outcome.result())); + else + return GetParametersForImportOutcome(outcome.error()); +} + +void KmsClient::getParametersForImportAsync(const GetParametersForImportRequest& request, const GetParametersForImportAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getParametersForImport(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::GetParametersForImportOutcomeCallable KmsClient::getParametersForImportCallable(const GetParametersForImportRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getParametersForImport(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +KmsClient::CreateKeyOutcome KmsClient::createKey(const CreateKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateKeyOutcome(CreateKeyResult(outcome.result())); + else + return CreateKeyOutcome(outcome.error()); +} + +void KmsClient::createKeyAsync(const CreateKeyRequest& request, const CreateKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +KmsClient::CreateKeyOutcomeCallable KmsClient::createKeyCallable(const CreateKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/kms/src/model/CancelKeyDeletionRequest.cc b/kms/src/model/CancelKeyDeletionRequest.cc new file mode 100644 index 000000000..fa95ba710 --- /dev/null +++ b/kms/src/model/CancelKeyDeletionRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::CancelKeyDeletionRequest; + +CancelKeyDeletionRequest::CancelKeyDeletionRequest() : + RpcServiceRequest("kms", "2016-01-20", "CancelKeyDeletion") +{} + +CancelKeyDeletionRequest::~CancelKeyDeletionRequest() +{} + +std::string CancelKeyDeletionRequest::getKeyId()const +{ + return keyId_; +} + +void CancelKeyDeletionRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string CancelKeyDeletionRequest::getSTSToken()const +{ + return sTSToken_; +} + +void CancelKeyDeletionRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/CancelKeyDeletionResult.cc b/kms/src/model/CancelKeyDeletionResult.cc new file mode 100644 index 000000000..85ccbca43 --- /dev/null +++ b/kms/src/model/CancelKeyDeletionResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +CancelKeyDeletionResult::CancelKeyDeletionResult() : + ServiceResult() +{} + +CancelKeyDeletionResult::CancelKeyDeletionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CancelKeyDeletionResult::~CancelKeyDeletionResult() +{} + +void CancelKeyDeletionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/CreateAliasRequest.cc b/kms/src/model/CreateAliasRequest.cc new file mode 100644 index 000000000..734da77b4 --- /dev/null +++ b/kms/src/model/CreateAliasRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::CreateAliasRequest; + +CreateAliasRequest::CreateAliasRequest() : + RpcServiceRequest("kms", "2016-01-20", "CreateAlias") +{} + +CreateAliasRequest::~CreateAliasRequest() +{} + +std::string CreateAliasRequest::getAliasName()const +{ + return aliasName_; +} + +void CreateAliasRequest::setAliasName(const std::string& aliasName) +{ + aliasName_ = aliasName; + setParameter("AliasName", aliasName); +} + +std::string CreateAliasRequest::getKeyId()const +{ + return keyId_; +} + +void CreateAliasRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string CreateAliasRequest::getSTSToken()const +{ + return sTSToken_; +} + +void CreateAliasRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/CreateAliasResult.cc b/kms/src/model/CreateAliasResult.cc new file mode 100644 index 000000000..88ae577a6 --- /dev/null +++ b/kms/src/model/CreateAliasResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +CreateAliasResult::CreateAliasResult() : + ServiceResult() +{} + +CreateAliasResult::CreateAliasResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateAliasResult::~CreateAliasResult() +{} + +void CreateAliasResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/CreateKeyRequest.cc b/kms/src/model/CreateKeyRequest.cc new file mode 100644 index 000000000..d500ca611 --- /dev/null +++ b/kms/src/model/CreateKeyRequest.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::CreateKeyRequest; + +CreateKeyRequest::CreateKeyRequest() : + RpcServiceRequest("kms", "2016-01-20", "CreateKey") +{} + +CreateKeyRequest::~CreateKeyRequest() +{} + +std::string CreateKeyRequest::getKeyUsage()const +{ + return keyUsage_; +} + +void CreateKeyRequest::setKeyUsage(const std::string& keyUsage) +{ + keyUsage_ = keyUsage; + setParameter("KeyUsage", keyUsage); +} + +std::string CreateKeyRequest::getOrigin()const +{ + return origin_; +} + +void CreateKeyRequest::setOrigin(const std::string& origin) +{ + origin_ = origin; + setParameter("Origin", origin); +} + +std::string CreateKeyRequest::getDescription()const +{ + return description_; +} + +void CreateKeyRequest::setDescription(const std::string& description) +{ + description_ = description; + setParameter("Description", description); +} + +std::string CreateKeyRequest::getSTSToken()const +{ + return sTSToken_; +} + +void CreateKeyRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/CreateKeyResult.cc b/kms/src/model/CreateKeyResult.cc new file mode 100644 index 000000000..0ee5f7f87 --- /dev/null +++ b/kms/src/model/CreateKeyResult.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +CreateKeyResult::CreateKeyResult() : + ServiceResult() +{} + +CreateKeyResult::CreateKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateKeyResult::~CreateKeyResult() +{} + +void CreateKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto keyMetadataNode = value["KeyMetadata"]; + if(!keyMetadataNode["CreationDate"].isNull()) + keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString(); + if(!keyMetadataNode["Description"].isNull()) + keyMetadata_.description = keyMetadataNode["Description"].asString(); + if(!keyMetadataNode["KeyId"].isNull()) + keyMetadata_.keyId = keyMetadataNode["KeyId"].asString(); + if(!keyMetadataNode["KeyState"].isNull()) + keyMetadata_.keyState = keyMetadataNode["KeyState"].asString(); + if(!keyMetadataNode["KeyUsage"].isNull()) + keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString(); + if(!keyMetadataNode["DeleteDate"].isNull()) + keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString(); + if(!keyMetadataNode["Creator"].isNull()) + keyMetadata_.creator = keyMetadataNode["Creator"].asString(); + if(!keyMetadataNode["Arn"].isNull()) + keyMetadata_.arn = keyMetadataNode["Arn"].asString(); + if(!keyMetadataNode["Origin"].isNull()) + keyMetadata_.origin = keyMetadataNode["Origin"].asString(); + if(!keyMetadataNode["MaterialExpireTime"].isNull()) + keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString(); + +} + +CreateKeyResult::KeyMetadata CreateKeyResult::getKeyMetadata()const +{ + return keyMetadata_; +} + diff --git a/kms/src/model/DecryptRequest.cc b/kms/src/model/DecryptRequest.cc new file mode 100644 index 000000000..51a8347f4 --- /dev/null +++ b/kms/src/model/DecryptRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::DecryptRequest; + +DecryptRequest::DecryptRequest() : + RpcServiceRequest("kms", "2016-01-20", "Decrypt") +{} + +DecryptRequest::~DecryptRequest() +{} + +std::string DecryptRequest::getEncryptionContext()const +{ + return encryptionContext_; +} + +void DecryptRequest::setEncryptionContext(const std::string& encryptionContext) +{ + encryptionContext_ = encryptionContext; + setParameter("EncryptionContext", encryptionContext); +} + +std::string DecryptRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DecryptRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +std::string DecryptRequest::getCiphertextBlob()const +{ + return ciphertextBlob_; +} + +void DecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob) +{ + ciphertextBlob_ = ciphertextBlob; + setParameter("CiphertextBlob", ciphertextBlob); +} + diff --git a/kms/src/model/DecryptResult.cc b/kms/src/model/DecryptResult.cc new file mode 100644 index 000000000..f32ebd663 --- /dev/null +++ b/kms/src/model/DecryptResult.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +DecryptResult::DecryptResult() : + ServiceResult() +{} + +DecryptResult::DecryptResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DecryptResult::~DecryptResult() +{} + +void DecryptResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["Plaintext"].isNull()) + plaintext_ = value["Plaintext"].asString(); + if(!value["KeyId"].isNull()) + keyId_ = value["KeyId"].asString(); + +} + +std::string DecryptResult::getPlaintext()const +{ + return plaintext_; +} + +std::string DecryptResult::getKeyId()const +{ + return keyId_; +} + diff --git a/kms/src/model/DeleteAliasRequest.cc b/kms/src/model/DeleteAliasRequest.cc new file mode 100644 index 000000000..3e6c583ce --- /dev/null +++ b/kms/src/model/DeleteAliasRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::DeleteAliasRequest; + +DeleteAliasRequest::DeleteAliasRequest() : + RpcServiceRequest("kms", "2016-01-20", "DeleteAlias") +{} + +DeleteAliasRequest::~DeleteAliasRequest() +{} + +std::string DeleteAliasRequest::getAliasName()const +{ + return aliasName_; +} + +void DeleteAliasRequest::setAliasName(const std::string& aliasName) +{ + aliasName_ = aliasName; + setParameter("AliasName", aliasName); +} + +std::string DeleteAliasRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DeleteAliasRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/DeleteAliasResult.cc b/kms/src/model/DeleteAliasResult.cc new file mode 100644 index 000000000..94d7c7a0a --- /dev/null +++ b/kms/src/model/DeleteAliasResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +DeleteAliasResult::DeleteAliasResult() : + ServiceResult() +{} + +DeleteAliasResult::DeleteAliasResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteAliasResult::~DeleteAliasResult() +{} + +void DeleteAliasResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/DeleteKeyMaterialRequest.cc b/kms/src/model/DeleteKeyMaterialRequest.cc new file mode 100644 index 000000000..154568731 --- /dev/null +++ b/kms/src/model/DeleteKeyMaterialRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::DeleteKeyMaterialRequest; + +DeleteKeyMaterialRequest::DeleteKeyMaterialRequest() : + RpcServiceRequest("kms", "2016-01-20", "DeleteKeyMaterial") +{} + +DeleteKeyMaterialRequest::~DeleteKeyMaterialRequest() +{} + +std::string DeleteKeyMaterialRequest::getKeyId()const +{ + return keyId_; +} + +void DeleteKeyMaterialRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string DeleteKeyMaterialRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DeleteKeyMaterialRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/DeleteKeyMaterialResult.cc b/kms/src/model/DeleteKeyMaterialResult.cc new file mode 100644 index 000000000..86d5e8960 --- /dev/null +++ b/kms/src/model/DeleteKeyMaterialResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +DeleteKeyMaterialResult::DeleteKeyMaterialResult() : + ServiceResult() +{} + +DeleteKeyMaterialResult::DeleteKeyMaterialResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteKeyMaterialResult::~DeleteKeyMaterialResult() +{} + +void DeleteKeyMaterialResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/DescribeKeyRequest.cc b/kms/src/model/DescribeKeyRequest.cc new file mode 100644 index 000000000..6e66c00da --- /dev/null +++ b/kms/src/model/DescribeKeyRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::DescribeKeyRequest; + +DescribeKeyRequest::DescribeKeyRequest() : + RpcServiceRequest("kms", "2016-01-20", "DescribeKey") +{} + +DescribeKeyRequest::~DescribeKeyRequest() +{} + +std::string DescribeKeyRequest::getKeyId()const +{ + return keyId_; +} + +void DescribeKeyRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string DescribeKeyRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DescribeKeyRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/DescribeKeyResult.cc b/kms/src/model/DescribeKeyResult.cc new file mode 100644 index 000000000..9ca3fbb55 --- /dev/null +++ b/kms/src/model/DescribeKeyResult.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +DescribeKeyResult::DescribeKeyResult() : + ServiceResult() +{} + +DescribeKeyResult::DescribeKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeKeyResult::~DescribeKeyResult() +{} + +void DescribeKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto keyMetadataNode = value["KeyMetadata"]; + if(!keyMetadataNode["CreationDate"].isNull()) + keyMetadata_.creationDate = keyMetadataNode["CreationDate"].asString(); + if(!keyMetadataNode["Description"].isNull()) + keyMetadata_.description = keyMetadataNode["Description"].asString(); + if(!keyMetadataNode["KeyId"].isNull()) + keyMetadata_.keyId = keyMetadataNode["KeyId"].asString(); + if(!keyMetadataNode["KeyState"].isNull()) + keyMetadata_.keyState = keyMetadataNode["KeyState"].asString(); + if(!keyMetadataNode["KeyUsage"].isNull()) + keyMetadata_.keyUsage = keyMetadataNode["KeyUsage"].asString(); + if(!keyMetadataNode["DeleteDate"].isNull()) + keyMetadata_.deleteDate = keyMetadataNode["DeleteDate"].asString(); + if(!keyMetadataNode["Creator"].isNull()) + keyMetadata_.creator = keyMetadataNode["Creator"].asString(); + if(!keyMetadataNode["Arn"].isNull()) + keyMetadata_.arn = keyMetadataNode["Arn"].asString(); + if(!keyMetadataNode["Origin"].isNull()) + keyMetadata_.origin = keyMetadataNode["Origin"].asString(); + if(!keyMetadataNode["MaterialExpireTime"].isNull()) + keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString(); + +} + +DescribeKeyResult::KeyMetadata DescribeKeyResult::getKeyMetadata()const +{ + return keyMetadata_; +} + diff --git a/kms/src/model/DescribeRegionsRequest.cc b/kms/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..7b88b0f19 --- /dev/null +++ b/kms/src/model/DescribeRegionsRequest.cc @@ -0,0 +1,38 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::Kms::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() : + RpcServiceRequest("kms", "2016-01-20", "DescribeRegions") +{} + +DescribeRegionsRequest::~DescribeRegionsRequest() +{} + +std::string DescribeRegionsRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DescribeRegionsRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/DescribeRegionsResult.cc b/kms/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..fa22bfc65 --- /dev/null +++ b/kms/src/model/DescribeRegionsResult.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::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 allRegions = value["Regions"]["Region"]; + for (auto value : allRegions) + { + Region regionsObject; + if(!value["RegionId"].isNull()) + regionsObject.regionId = value["RegionId"].asString(); + regions_.push_back(regionsObject); + } + +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + diff --git a/kms/src/model/DisableKeyRequest.cc b/kms/src/model/DisableKeyRequest.cc new file mode 100644 index 000000000..f602cfdce --- /dev/null +++ b/kms/src/model/DisableKeyRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::DisableKeyRequest; + +DisableKeyRequest::DisableKeyRequest() : + RpcServiceRequest("kms", "2016-01-20", "DisableKey") +{} + +DisableKeyRequest::~DisableKeyRequest() +{} + +std::string DisableKeyRequest::getKeyId()const +{ + return keyId_; +} + +void DisableKeyRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string DisableKeyRequest::getSTSToken()const +{ + return sTSToken_; +} + +void DisableKeyRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/DisableKeyResult.cc b/kms/src/model/DisableKeyResult.cc new file mode 100644 index 000000000..cee47c9f5 --- /dev/null +++ b/kms/src/model/DisableKeyResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +DisableKeyResult::DisableKeyResult() : + ServiceResult() +{} + +DisableKeyResult::DisableKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DisableKeyResult::~DisableKeyResult() +{} + +void DisableKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/EnableKeyRequest.cc b/kms/src/model/EnableKeyRequest.cc new file mode 100644 index 000000000..60347cbdf --- /dev/null +++ b/kms/src/model/EnableKeyRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::EnableKeyRequest; + +EnableKeyRequest::EnableKeyRequest() : + RpcServiceRequest("kms", "2016-01-20", "EnableKey") +{} + +EnableKeyRequest::~EnableKeyRequest() +{} + +std::string EnableKeyRequest::getKeyId()const +{ + return keyId_; +} + +void EnableKeyRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string EnableKeyRequest::getSTSToken()const +{ + return sTSToken_; +} + +void EnableKeyRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/EnableKeyResult.cc b/kms/src/model/EnableKeyResult.cc new file mode 100644 index 000000000..45abd2c45 --- /dev/null +++ b/kms/src/model/EnableKeyResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +EnableKeyResult::EnableKeyResult() : + ServiceResult() +{} + +EnableKeyResult::EnableKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EnableKeyResult::~EnableKeyResult() +{} + +void EnableKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/EncryptRequest.cc b/kms/src/model/EncryptRequest.cc new file mode 100644 index 000000000..0526941bb --- /dev/null +++ b/kms/src/model/EncryptRequest.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::EncryptRequest; + +EncryptRequest::EncryptRequest() : + RpcServiceRequest("kms", "2016-01-20", "Encrypt") +{} + +EncryptRequest::~EncryptRequest() +{} + +std::string EncryptRequest::getEncryptionContext()const +{ + return encryptionContext_; +} + +void EncryptRequest::setEncryptionContext(const std::string& encryptionContext) +{ + encryptionContext_ = encryptionContext; + setParameter("EncryptionContext", encryptionContext); +} + +std::string EncryptRequest::getKeyId()const +{ + return keyId_; +} + +void EncryptRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string EncryptRequest::getSTSToken()const +{ + return sTSToken_; +} + +void EncryptRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +std::string EncryptRequest::getPlaintext()const +{ + return plaintext_; +} + +void EncryptRequest::setPlaintext(const std::string& plaintext) +{ + plaintext_ = plaintext; + setParameter("Plaintext", plaintext); +} + diff --git a/kms/src/model/EncryptResult.cc b/kms/src/model/EncryptResult.cc new file mode 100644 index 000000000..3106af7f8 --- /dev/null +++ b/kms/src/model/EncryptResult.cc @@ -0,0 +1,59 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +EncryptResult::EncryptResult() : + ServiceResult() +{} + +EncryptResult::EncryptResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EncryptResult::~EncryptResult() +{} + +void EncryptResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["CiphertextBlob"].isNull()) + ciphertextBlob_ = value["CiphertextBlob"].asString(); + if(!value["KeyId"].isNull()) + keyId_ = value["KeyId"].asString(); + +} + +std::string EncryptResult::getCiphertextBlob()const +{ + return ciphertextBlob_; +} + +std::string EncryptResult::getKeyId()const +{ + return keyId_; +} + diff --git a/kms/src/model/GenerateDataKeyRequest.cc b/kms/src/model/GenerateDataKeyRequest.cc new file mode 100644 index 000000000..ae780043a --- /dev/null +++ b/kms/src/model/GenerateDataKeyRequest.cc @@ -0,0 +1,82 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::GenerateDataKeyRequest; + +GenerateDataKeyRequest::GenerateDataKeyRequest() : + RpcServiceRequest("kms", "2016-01-20", "GenerateDataKey") +{} + +GenerateDataKeyRequest::~GenerateDataKeyRequest() +{} + +std::string GenerateDataKeyRequest::getEncryptionContext()const +{ + return encryptionContext_; +} + +void GenerateDataKeyRequest::setEncryptionContext(const std::string& encryptionContext) +{ + encryptionContext_ = encryptionContext; + setParameter("EncryptionContext", encryptionContext); +} + +std::string GenerateDataKeyRequest::getKeyId()const +{ + return keyId_; +} + +void GenerateDataKeyRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string GenerateDataKeyRequest::getKeySpec()const +{ + return keySpec_; +} + +void GenerateDataKeyRequest::setKeySpec(const std::string& keySpec) +{ + keySpec_ = keySpec; + setParameter("KeySpec", keySpec); +} + +std::string GenerateDataKeyRequest::getSTSToken()const +{ + return sTSToken_; +} + +void GenerateDataKeyRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +int GenerateDataKeyRequest::getNumberOfBytes()const +{ + return numberOfBytes_; +} + +void GenerateDataKeyRequest::setNumberOfBytes(int numberOfBytes) +{ + numberOfBytes_ = numberOfBytes; + setParameter("NumberOfBytes", std::to_string(numberOfBytes)); +} + diff --git a/kms/src/model/GenerateDataKeyResult.cc b/kms/src/model/GenerateDataKeyResult.cc new file mode 100644 index 000000000..4892e72ab --- /dev/null +++ b/kms/src/model/GenerateDataKeyResult.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::Kms; +using namespace AlibabaCloud::Kms::Model; + +GenerateDataKeyResult::GenerateDataKeyResult() : + ServiceResult() +{} + +GenerateDataKeyResult::GenerateDataKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GenerateDataKeyResult::~GenerateDataKeyResult() +{} + +void GenerateDataKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["CiphertextBlob"].isNull()) + ciphertextBlob_ = value["CiphertextBlob"].asString(); + if(!value["KeyId"].isNull()) + keyId_ = value["KeyId"].asString(); + if(!value["Plaintext"].isNull()) + plaintext_ = value["Plaintext"].asString(); + +} + +std::string GenerateDataKeyResult::getCiphertextBlob()const +{ + return ciphertextBlob_; +} + +std::string GenerateDataKeyResult::getPlaintext()const +{ + return plaintext_; +} + +std::string GenerateDataKeyResult::getKeyId()const +{ + return keyId_; +} + diff --git a/kms/src/model/GetParametersForImportRequest.cc b/kms/src/model/GetParametersForImportRequest.cc new file mode 100644 index 000000000..b98adc2a0 --- /dev/null +++ b/kms/src/model/GetParametersForImportRequest.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::GetParametersForImportRequest; + +GetParametersForImportRequest::GetParametersForImportRequest() : + RpcServiceRequest("kms", "2016-01-20", "GetParametersForImport") +{} + +GetParametersForImportRequest::~GetParametersForImportRequest() +{} + +std::string GetParametersForImportRequest::getKeyId()const +{ + return keyId_; +} + +void GetParametersForImportRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string GetParametersForImportRequest::getSTSToken()const +{ + return sTSToken_; +} + +void GetParametersForImportRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +std::string GetParametersForImportRequest::getWrappingAlgorithm()const +{ + return wrappingAlgorithm_; +} + +void GetParametersForImportRequest::setWrappingAlgorithm(const std::string& wrappingAlgorithm) +{ + wrappingAlgorithm_ = wrappingAlgorithm; + setParameter("WrappingAlgorithm", wrappingAlgorithm); +} + +std::string GetParametersForImportRequest::getWrappingKeySpec()const +{ + return wrappingKeySpec_; +} + +void GetParametersForImportRequest::setWrappingKeySpec(const std::string& wrappingKeySpec) +{ + wrappingKeySpec_ = wrappingKeySpec; + setParameter("WrappingKeySpec", wrappingKeySpec); +} + diff --git a/kms/src/model/GetParametersForImportResult.cc b/kms/src/model/GetParametersForImportResult.cc new file mode 100644 index 000000000..ed9163503 --- /dev/null +++ b/kms/src/model/GetParametersForImportResult.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +GetParametersForImportResult::GetParametersForImportResult() : + ServiceResult() +{} + +GetParametersForImportResult::GetParametersForImportResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetParametersForImportResult::~GetParametersForImportResult() +{} + +void GetParametersForImportResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["KeyId"].isNull()) + keyId_ = value["KeyId"].asString(); + if(!value["ImportToken"].isNull()) + importToken_ = value["ImportToken"].asString(); + if(!value["PublicKey"].isNull()) + publicKey_ = value["PublicKey"].asString(); + if(!value["TokenExpireTime"].isNull()) + tokenExpireTime_ = value["TokenExpireTime"].asString(); + +} + +std::string GetParametersForImportResult::getPublicKey()const +{ + return publicKey_; +} + +std::string GetParametersForImportResult::getKeyId()const +{ + return keyId_; +} + +std::string GetParametersForImportResult::getTokenExpireTime()const +{ + return tokenExpireTime_; +} + +std::string GetParametersForImportResult::getImportToken()const +{ + return importToken_; +} + diff --git a/kms/src/model/ImportKeyMaterialRequest.cc b/kms/src/model/ImportKeyMaterialRequest.cc new file mode 100644 index 000000000..b63f6caee --- /dev/null +++ b/kms/src/model/ImportKeyMaterialRequest.cc @@ -0,0 +1,82 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::ImportKeyMaterialRequest; + +ImportKeyMaterialRequest::ImportKeyMaterialRequest() : + RpcServiceRequest("kms", "2016-01-20", "ImportKeyMaterial") +{} + +ImportKeyMaterialRequest::~ImportKeyMaterialRequest() +{} + +std::string ImportKeyMaterialRequest::getImportToken()const +{ + return importToken_; +} + +void ImportKeyMaterialRequest::setImportToken(const std::string& importToken) +{ + importToken_ = importToken; + setParameter("ImportToken", importToken); +} + +std::string ImportKeyMaterialRequest::getEncryptedKeyMaterial()const +{ + return encryptedKeyMaterial_; +} + +void ImportKeyMaterialRequest::setEncryptedKeyMaterial(const std::string& encryptedKeyMaterial) +{ + encryptedKeyMaterial_ = encryptedKeyMaterial; + setParameter("EncryptedKeyMaterial", encryptedKeyMaterial); +} + +long ImportKeyMaterialRequest::getKeyMaterialExpireUnix()const +{ + return keyMaterialExpireUnix_; +} + +void ImportKeyMaterialRequest::setKeyMaterialExpireUnix(long keyMaterialExpireUnix) +{ + keyMaterialExpireUnix_ = keyMaterialExpireUnix; + setParameter("KeyMaterialExpireUnix", std::to_string(keyMaterialExpireUnix)); +} + +std::string ImportKeyMaterialRequest::getKeyId()const +{ + return keyId_; +} + +void ImportKeyMaterialRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string ImportKeyMaterialRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ImportKeyMaterialRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/ImportKeyMaterialResult.cc b/kms/src/model/ImportKeyMaterialResult.cc new file mode 100644 index 000000000..ba75b7af0 --- /dev/null +++ b/kms/src/model/ImportKeyMaterialResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +ImportKeyMaterialResult::ImportKeyMaterialResult() : + ServiceResult() +{} + +ImportKeyMaterialResult::ImportKeyMaterialResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ImportKeyMaterialResult::~ImportKeyMaterialResult() +{} + +void ImportKeyMaterialResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/ListAliasesByKeyIdRequest.cc b/kms/src/model/ListAliasesByKeyIdRequest.cc new file mode 100644 index 000000000..73aecf951 --- /dev/null +++ b/kms/src/model/ListAliasesByKeyIdRequest.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Kms::Model::ListAliasesByKeyIdRequest; + +ListAliasesByKeyIdRequest::ListAliasesByKeyIdRequest() : + RpcServiceRequest("kms", "2016-01-20", "ListAliasesByKeyId") +{} + +ListAliasesByKeyIdRequest::~ListAliasesByKeyIdRequest() +{} + +int ListAliasesByKeyIdRequest::getPageSize()const +{ + return pageSize_; +} + +void ListAliasesByKeyIdRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListAliasesByKeyIdRequest::getKeyId()const +{ + return keyId_; +} + +void ListAliasesByKeyIdRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string ListAliasesByKeyIdRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ListAliasesByKeyIdRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +int ListAliasesByKeyIdRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListAliasesByKeyIdRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + diff --git a/kms/src/model/ListAliasesByKeyIdResult.cc b/kms/src/model/ListAliasesByKeyIdResult.cc new file mode 100644 index 000000000..70e73b7ed --- /dev/null +++ b/kms/src/model/ListAliasesByKeyIdResult.cc @@ -0,0 +1,83 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::Kms; +using namespace AlibabaCloud::Kms::Model; + +ListAliasesByKeyIdResult::ListAliasesByKeyIdResult() : + ServiceResult() +{} + +ListAliasesByKeyIdResult::ListAliasesByKeyIdResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListAliasesByKeyIdResult::~ListAliasesByKeyIdResult() +{} + +void ListAliasesByKeyIdResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allAliases = value["Aliases"]["Alias"]; + for (auto value : allAliases) + { + Alias aliasesObject; + if(!value["KeyId"].isNull()) + aliasesObject.keyId = value["KeyId"].asString(); + if(!value["AliasName"].isNull()) + aliasesObject.aliasName = value["AliasName"].asString(); + if(!value["AliasArn"].isNull()) + aliasesObject.aliasArn = value["AliasArn"].asString(); + aliases_.push_back(aliasesObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + +} + +int ListAliasesByKeyIdResult::getTotalCount()const +{ + return totalCount_; +} + +int ListAliasesByKeyIdResult::getPageSize()const +{ + return pageSize_; +} + +int ListAliasesByKeyIdResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListAliasesByKeyIdResult::getAliases()const +{ + return aliases_; +} + diff --git a/kms/src/model/ListAliasesRequest.cc b/kms/src/model/ListAliasesRequest.cc new file mode 100644 index 000000000..e4c079b28 --- /dev/null +++ b/kms/src/model/ListAliasesRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::ListAliasesRequest; + +ListAliasesRequest::ListAliasesRequest() : + RpcServiceRequest("kms", "2016-01-20", "ListAliases") +{} + +ListAliasesRequest::~ListAliasesRequest() +{} + +int ListAliasesRequest::getPageSize()const +{ + return pageSize_; +} + +void ListAliasesRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListAliasesRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ListAliasesRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +int ListAliasesRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListAliasesRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + diff --git a/kms/src/model/ListAliasesResult.cc b/kms/src/model/ListAliasesResult.cc new file mode 100644 index 000000000..45f0f622a --- /dev/null +++ b/kms/src/model/ListAliasesResult.cc @@ -0,0 +1,83 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::Kms; +using namespace AlibabaCloud::Kms::Model; + +ListAliasesResult::ListAliasesResult() : + ServiceResult() +{} + +ListAliasesResult::ListAliasesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListAliasesResult::~ListAliasesResult() +{} + +void ListAliasesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allAliases = value["Aliases"]["Alias"]; + for (auto value : allAliases) + { + Alias aliasesObject; + if(!value["KeyId"].isNull()) + aliasesObject.keyId = value["KeyId"].asString(); + if(!value["AliasName"].isNull()) + aliasesObject.aliasName = value["AliasName"].asString(); + if(!value["AliasArn"].isNull()) + aliasesObject.aliasArn = value["AliasArn"].asString(); + aliases_.push_back(aliasesObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + +} + +int ListAliasesResult::getTotalCount()const +{ + return totalCount_; +} + +int ListAliasesResult::getPageSize()const +{ + return pageSize_; +} + +int ListAliasesResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListAliasesResult::getAliases()const +{ + return aliases_; +} + diff --git a/kms/src/model/ListKeysRequest.cc b/kms/src/model/ListKeysRequest.cc new file mode 100644 index 000000000..47ce0f811 --- /dev/null +++ b/kms/src/model/ListKeysRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::ListKeysRequest; + +ListKeysRequest::ListKeysRequest() : + RpcServiceRequest("kms", "2016-01-20", "ListKeys") +{} + +ListKeysRequest::~ListKeysRequest() +{} + +int ListKeysRequest::getPageSize()const +{ + return pageSize_; +} + +void ListKeysRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListKeysRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ListKeysRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +int ListKeysRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListKeysRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + diff --git a/kms/src/model/ListKeysResult.cc b/kms/src/model/ListKeysResult.cc new file mode 100644 index 000000000..601da9951 --- /dev/null +++ b/kms/src/model/ListKeysResult.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +ListKeysResult::ListKeysResult() : + ServiceResult() +{} + +ListKeysResult::ListKeysResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListKeysResult::~ListKeysResult() +{} + +void ListKeysResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allKeys = value["Keys"]["Key"]; + for (auto value : allKeys) + { + Key keysObject; + if(!value["KeyId"].isNull()) + keysObject.keyId = value["KeyId"].asString(); + if(!value["KeyArn"].isNull()) + keysObject.keyArn = value["KeyArn"].asString(); + keys_.push_back(keysObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + +} + +int ListKeysResult::getTotalCount()const +{ + return totalCount_; +} + +int ListKeysResult::getPageSize()const +{ + return pageSize_; +} + +int ListKeysResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListKeysResult::getKeys()const +{ + return keys_; +} + diff --git a/kms/src/model/ListResourceTagsRequest.cc b/kms/src/model/ListResourceTagsRequest.cc new file mode 100644 index 000000000..f33888075 --- /dev/null +++ b/kms/src/model/ListResourceTagsRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::ListResourceTagsRequest; + +ListResourceTagsRequest::ListResourceTagsRequest() : + RpcServiceRequest("kms", "2016-01-20", "ListResourceTags") +{} + +ListResourceTagsRequest::~ListResourceTagsRequest() +{} + +std::string ListResourceTagsRequest::getKeyId()const +{ + return keyId_; +} + +void ListResourceTagsRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string ListResourceTagsRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ListResourceTagsRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/ListResourceTagsResult.cc b/kms/src/model/ListResourceTagsResult.cc new file mode 100644 index 000000000..e11921946 --- /dev/null +++ b/kms/src/model/ListResourceTagsResult.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +ListResourceTagsResult::ListResourceTagsResult() : + ServiceResult() +{} + +ListResourceTagsResult::ListResourceTagsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourceTagsResult::~ListResourceTagsResult() +{} + +void ListResourceTagsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allTags = value["Tags"]["Tag"]; + for (auto value : allTags) + { + Tag tagsObject; + if(!value["KeyId"].isNull()) + tagsObject.keyId = value["KeyId"].asString(); + if(!value["TagKey"].isNull()) + tagsObject.tagKey = value["TagKey"].asString(); + if(!value["TagValue"].isNull()) + tagsObject.tagValue = value["TagValue"].asString(); + tags_.push_back(tagsObject); + } + +} + +std::vector ListResourceTagsResult::getTags()const +{ + return tags_; +} + diff --git a/kms/src/model/ScheduleKeyDeletionRequest.cc b/kms/src/model/ScheduleKeyDeletionRequest.cc new file mode 100644 index 000000000..5a9a31826 --- /dev/null +++ b/kms/src/model/ScheduleKeyDeletionRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::ScheduleKeyDeletionRequest; + +ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest() : + RpcServiceRequest("kms", "2016-01-20", "ScheduleKeyDeletion") +{} + +ScheduleKeyDeletionRequest::~ScheduleKeyDeletionRequest() +{} + +int ScheduleKeyDeletionRequest::getPendingWindowInDays()const +{ + return pendingWindowInDays_; +} + +void ScheduleKeyDeletionRequest::setPendingWindowInDays(int pendingWindowInDays) +{ + pendingWindowInDays_ = pendingWindowInDays; + setParameter("PendingWindowInDays", std::to_string(pendingWindowInDays)); +} + +std::string ScheduleKeyDeletionRequest::getKeyId()const +{ + return keyId_; +} + +void ScheduleKeyDeletionRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string ScheduleKeyDeletionRequest::getSTSToken()const +{ + return sTSToken_; +} + +void ScheduleKeyDeletionRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/ScheduleKeyDeletionResult.cc b/kms/src/model/ScheduleKeyDeletionResult.cc new file mode 100644 index 000000000..a319a5a40 --- /dev/null +++ b/kms/src/model/ScheduleKeyDeletionResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +ScheduleKeyDeletionResult::ScheduleKeyDeletionResult() : + ServiceResult() +{} + +ScheduleKeyDeletionResult::ScheduleKeyDeletionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ScheduleKeyDeletionResult::~ScheduleKeyDeletionResult() +{} + +void ScheduleKeyDeletionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/TagResourceRequest.cc b/kms/src/model/TagResourceRequest.cc new file mode 100644 index 000000000..5a81442b4 --- /dev/null +++ b/kms/src/model/TagResourceRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::TagResourceRequest; + +TagResourceRequest::TagResourceRequest() : + RpcServiceRequest("kms", "2016-01-20", "TagResource") +{} + +TagResourceRequest::~TagResourceRequest() +{} + +std::string TagResourceRequest::getKeyId()const +{ + return keyId_; +} + +void TagResourceRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string TagResourceRequest::getSTSToken()const +{ + return sTSToken_; +} + +void TagResourceRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + +std::string TagResourceRequest::getTags()const +{ + return tags_; +} + +void TagResourceRequest::setTags(const std::string& tags) +{ + tags_ = tags; + setParameter("Tags", tags); +} + diff --git a/kms/src/model/TagResourceResult.cc b/kms/src/model/TagResourceResult.cc new file mode 100644 index 000000000..b529d5204 --- /dev/null +++ b/kms/src/model/TagResourceResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +TagResourceResult::TagResourceResult() : + ServiceResult() +{} + +TagResourceResult::TagResourceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TagResourceResult::~TagResourceResult() +{} + +void TagResourceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/kms/src/model/UntagResourceRequest.cc b/kms/src/model/UntagResourceRequest.cc new file mode 100644 index 000000000..6609db6ef --- /dev/null +++ b/kms/src/model/UntagResourceRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::UntagResourceRequest; + +UntagResourceRequest::UntagResourceRequest() : + RpcServiceRequest("kms", "2016-01-20", "UntagResource") +{} + +UntagResourceRequest::~UntagResourceRequest() +{} + +std::string UntagResourceRequest::getTagKeys()const +{ + return tagKeys_; +} + +void UntagResourceRequest::setTagKeys(const std::string& tagKeys) +{ + tagKeys_ = tagKeys; + setParameter("TagKeys", tagKeys); +} + +std::string UntagResourceRequest::getKeyId()const +{ + return keyId_; +} + +void UntagResourceRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string UntagResourceRequest::getSTSToken()const +{ + return sTSToken_; +} + +void UntagResourceRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/UntagResourceResult.cc b/kms/src/model/UntagResourceResult.cc new file mode 100644 index 000000000..f239f799a --- /dev/null +++ b/kms/src/model/UntagResourceResult.cc @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::Kms; +using namespace AlibabaCloud::Kms::Model; + +UntagResourceResult::UntagResourceResult() : + ServiceResult() +{} + +UntagResourceResult::UntagResourceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UntagResourceResult::~UntagResourceResult() +{} + +void UntagResourceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["KeyId"].isNull()) + keyId_ = value["KeyId"].asString(); + +} + +std::string UntagResourceResult::getKeyId()const +{ + return keyId_; +} + diff --git a/kms/src/model/UpdateAliasRequest.cc b/kms/src/model/UpdateAliasRequest.cc new file mode 100644 index 000000000..86fd4290c --- /dev/null +++ b/kms/src/model/UpdateAliasRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Kms::Model::UpdateAliasRequest; + +UpdateAliasRequest::UpdateAliasRequest() : + RpcServiceRequest("kms", "2016-01-20", "UpdateAlias") +{} + +UpdateAliasRequest::~UpdateAliasRequest() +{} + +std::string UpdateAliasRequest::getAliasName()const +{ + return aliasName_; +} + +void UpdateAliasRequest::setAliasName(const std::string& aliasName) +{ + aliasName_ = aliasName; + setParameter("AliasName", aliasName); +} + +std::string UpdateAliasRequest::getKeyId()const +{ + return keyId_; +} + +void UpdateAliasRequest::setKeyId(const std::string& keyId) +{ + keyId_ = keyId; + setParameter("KeyId", keyId); +} + +std::string UpdateAliasRequest::getSTSToken()const +{ + return sTSToken_; +} + +void UpdateAliasRequest::setSTSToken(const std::string& sTSToken) +{ + sTSToken_ = sTSToken; + setParameter("STSToken", sTSToken); +} + diff --git a/kms/src/model/UpdateAliasResult.cc b/kms/src/model/UpdateAliasResult.cc new file mode 100644 index 000000000..2226ac6c3 --- /dev/null +++ b/kms/src/model/UpdateAliasResult.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 +#include + +using namespace AlibabaCloud::Kms; +using namespace AlibabaCloud::Kms::Model; + +UpdateAliasResult::UpdateAliasResult() : + ServiceResult() +{} + +UpdateAliasResult::UpdateAliasResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateAliasResult::~UpdateAliasResult() +{} + +void UpdateAliasResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} +