Jelajahi Sumber

Add kms apis.

sdk-team 4 tahun lalu
induk
melakukan
63d1456017

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2022-07-21 Version: 1.36.1194
+- Add kms apis.
+
 2022-07-21 Version: 1.36.1193
 - Ram action config.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1193
+1.36.1194

+ 8 - 0
vod/CMakeLists.txt

@@ -55,6 +55,8 @@ set(vod_public_header_model
 	include/alibabacloud/vod/model/CreateUploadImageResult.h
 	include/alibabacloud/vod/model/CreateUploadVideoRequest.h
 	include/alibabacloud/vod/model/CreateUploadVideoResult.h
+	include/alibabacloud/vod/model/DecryptKMSDataKeyRequest.h
+	include/alibabacloud/vod/model/DecryptKMSDataKeyResult.h
 	include/alibabacloud/vod/model/DeleteAIImageInfosRequest.h
 	include/alibabacloud/vod/model/DeleteAIImageInfosResult.h
 	include/alibabacloud/vod/model/DeleteAITemplateRequest.h
@@ -131,6 +133,8 @@ set(vod_public_header_model
 	include/alibabacloud/vod/model/DescribeVodVerifyContentResult.h
 	include/alibabacloud/vod/model/DetachAppPolicyFromIdentityRequest.h
 	include/alibabacloud/vod/model/DetachAppPolicyFromIdentityResult.h
+	include/alibabacloud/vod/model/GenerateKMSDataKeyRequest.h
+	include/alibabacloud/vod/model/GenerateKMSDataKeyResult.h
 	include/alibabacloud/vod/model/GetAIImageJobsRequest.h
 	include/alibabacloud/vod/model/GetAIImageJobsResult.h
 	include/alibabacloud/vod/model/GetAIMediaAuditJobRequest.h
@@ -342,6 +346,8 @@ set(vod_src
 	src/model/CreateUploadImageResult.cc
 	src/model/CreateUploadVideoRequest.cc
 	src/model/CreateUploadVideoResult.cc
+	src/model/DecryptKMSDataKeyRequest.cc
+	src/model/DecryptKMSDataKeyResult.cc
 	src/model/DeleteAIImageInfosRequest.cc
 	src/model/DeleteAIImageInfosResult.cc
 	src/model/DeleteAITemplateRequest.cc
@@ -418,6 +424,8 @@ set(vod_src
 	src/model/DescribeVodVerifyContentResult.cc
 	src/model/DetachAppPolicyFromIdentityRequest.cc
 	src/model/DetachAppPolicyFromIdentityResult.cc
+	src/model/GenerateKMSDataKeyRequest.cc
+	src/model/GenerateKMSDataKeyResult.cc
 	src/model/GetAIImageJobsRequest.cc
 	src/model/GetAIImageJobsResult.cc
 	src/model/GetAIMediaAuditJobRequest.cc

+ 16 - 0
vod/include/alibabacloud/vod/VodClient.h

@@ -56,6 +56,8 @@
 #include "model/CreateUploadImageResult.h"
 #include "model/CreateUploadVideoRequest.h"
 #include "model/CreateUploadVideoResult.h"
+#include "model/DecryptKMSDataKeyRequest.h"
+#include "model/DecryptKMSDataKeyResult.h"
 #include "model/DeleteAIImageInfosRequest.h"
 #include "model/DeleteAIImageInfosResult.h"
 #include "model/DeleteAITemplateRequest.h"
@@ -132,6 +134,8 @@
 #include "model/DescribeVodVerifyContentResult.h"
 #include "model/DetachAppPolicyFromIdentityRequest.h"
 #include "model/DetachAppPolicyFromIdentityResult.h"
+#include "model/GenerateKMSDataKeyRequest.h"
+#include "model/GenerateKMSDataKeyResult.h"
 #include "model/GetAIImageJobsRequest.h"
 #include "model/GetAIImageJobsResult.h"
 #include "model/GetAIMediaAuditJobRequest.h"
@@ -366,6 +370,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::CreateUploadVideoResult> CreateUploadVideoOutcome;
 			typedef std::future<CreateUploadVideoOutcome> CreateUploadVideoOutcomeCallable;
 			typedef std::function<void(const VodClient*, const Model::CreateUploadVideoRequest&, const CreateUploadVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateUploadVideoAsyncHandler;
+			typedef Outcome<Error, Model::DecryptKMSDataKeyResult> DecryptKMSDataKeyOutcome;
+			typedef std::future<DecryptKMSDataKeyOutcome> DecryptKMSDataKeyOutcomeCallable;
+			typedef std::function<void(const VodClient*, const Model::DecryptKMSDataKeyRequest&, const DecryptKMSDataKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DecryptKMSDataKeyAsyncHandler;
 			typedef Outcome<Error, Model::DeleteAIImageInfosResult> DeleteAIImageInfosOutcome;
 			typedef std::future<DeleteAIImageInfosOutcome> DeleteAIImageInfosOutcomeCallable;
 			typedef std::function<void(const VodClient*, const Model::DeleteAIImageInfosRequest&, const DeleteAIImageInfosOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteAIImageInfosAsyncHandler;
@@ -480,6 +487,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::DetachAppPolicyFromIdentityResult> DetachAppPolicyFromIdentityOutcome;
 			typedef std::future<DetachAppPolicyFromIdentityOutcome> DetachAppPolicyFromIdentityOutcomeCallable;
 			typedef std::function<void(const VodClient*, const Model::DetachAppPolicyFromIdentityRequest&, const DetachAppPolicyFromIdentityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetachAppPolicyFromIdentityAsyncHandler;
+			typedef Outcome<Error, Model::GenerateKMSDataKeyResult> GenerateKMSDataKeyOutcome;
+			typedef std::future<GenerateKMSDataKeyOutcome> GenerateKMSDataKeyOutcomeCallable;
+			typedef std::function<void(const VodClient*, const Model::GenerateKMSDataKeyRequest&, const GenerateKMSDataKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateKMSDataKeyAsyncHandler;
 			typedef Outcome<Error, Model::GetAIImageJobsResult> GetAIImageJobsOutcome;
 			typedef std::future<GetAIImageJobsOutcome> GetAIImageJobsOutcomeCallable;
 			typedef std::function<void(const VodClient*, const Model::GetAIImageJobsRequest&, const GetAIImageJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAIImageJobsAsyncHandler;
@@ -797,6 +807,9 @@ namespace AlibabaCloud
 			CreateUploadVideoOutcome createUploadVideo(const Model::CreateUploadVideoRequest &request)const;
 			void createUploadVideoAsync(const Model::CreateUploadVideoRequest& request, const CreateUploadVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CreateUploadVideoOutcomeCallable createUploadVideoCallable(const Model::CreateUploadVideoRequest& request) const;
+			DecryptKMSDataKeyOutcome decryptKMSDataKey(const Model::DecryptKMSDataKeyRequest &request)const;
+			void decryptKMSDataKeyAsync(const Model::DecryptKMSDataKeyRequest& request, const DecryptKMSDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			DecryptKMSDataKeyOutcomeCallable decryptKMSDataKeyCallable(const Model::DecryptKMSDataKeyRequest& request) const;
 			DeleteAIImageInfosOutcome deleteAIImageInfos(const Model::DeleteAIImageInfosRequest &request)const;
 			void deleteAIImageInfosAsync(const Model::DeleteAIImageInfosRequest& request, const DeleteAIImageInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DeleteAIImageInfosOutcomeCallable deleteAIImageInfosCallable(const Model::DeleteAIImageInfosRequest& request) const;
@@ -911,6 +924,9 @@ namespace AlibabaCloud
 			DetachAppPolicyFromIdentityOutcome detachAppPolicyFromIdentity(const Model::DetachAppPolicyFromIdentityRequest &request)const;
 			void detachAppPolicyFromIdentityAsync(const Model::DetachAppPolicyFromIdentityRequest& request, const DetachAppPolicyFromIdentityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DetachAppPolicyFromIdentityOutcomeCallable detachAppPolicyFromIdentityCallable(const Model::DetachAppPolicyFromIdentityRequest& request) const;
+			GenerateKMSDataKeyOutcome generateKMSDataKey(const Model::GenerateKMSDataKeyRequest &request)const;
+			void generateKMSDataKeyAsync(const Model::GenerateKMSDataKeyRequest& request, const GenerateKMSDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			GenerateKMSDataKeyOutcomeCallable generateKMSDataKeyCallable(const Model::GenerateKMSDataKeyRequest& request) const;
 			GetAIImageJobsOutcome getAIImageJobs(const Model::GetAIImageJobsRequest &request)const;
 			void getAIImageJobsAsync(const Model::GetAIImageJobsRequest& request, const GetAIImageJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			GetAIImageJobsOutcomeCallable getAIImageJobsCallable(const Model::GetAIImageJobsRequest& request) const;

+ 63 - 0
vod/include/alibabacloud/vod/model/DecryptKMSDataKeyRequest.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_VOD_MODEL_DECRYPTKMSDATAKEYREQUEST_H_
+#define ALIBABACLOUD_VOD_MODEL_DECRYPTKMSDATAKEYREQUEST_H_
+
+#include <alibabacloud/vod/VodExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Vod {
+namespace Model {
+class ALIBABACLOUD_VOD_EXPORT DecryptKMSDataKeyRequest : public RpcServiceRequest {
+public:
+	DecryptKMSDataKeyRequest();
+	~DecryptKMSDataKeyRequest();
+	std::string getResourceOwnerId() const;
+	void setResourceOwnerId(const std::string &resourceOwnerId);
+	long getResourceRealOwnerId() const;
+	void setResourceRealOwnerId(long resourceRealOwnerId);
+	std::string getAccessKeyId() const;
+	void setAccessKeyId(const std::string &accessKeyId);
+	std::string getKmsRegionId() const;
+	void setKmsRegionId(const std::string &kmsRegionId);
+	std::string getCipherText() const;
+	void setCipherText(const std::string &cipherText);
+	std::string getResourceOwnerAccount() const;
+	void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
+	std::string getOwnerAccount() const;
+	void setOwnerAccount(const std::string &ownerAccount);
+	std::string getOwnerId() const;
+	void setOwnerId(const std::string &ownerId);
+
+private:
+	std::string resourceOwnerId_;
+	long resourceRealOwnerId_;
+	std::string accessKeyId_;
+	std::string kmsRegionId_;
+	std::string cipherText_;
+	std::string resourceOwnerAccount_;
+	std::string ownerAccount_;
+	std::string ownerId_;
+};
+} // namespace Model
+} // namespace Vod
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_VOD_MODEL_DECRYPTKMSDATAKEYREQUEST_H_

+ 53 - 0
vod/include/alibabacloud/vod/model/DecryptKMSDataKeyResult.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_VOD_MODEL_DECRYPTKMSDATAKEYRESULT_H_
+#define ALIBABACLOUD_VOD_MODEL_DECRYPTKMSDATAKEYRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/vod/VodExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Vod
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_VOD_EXPORT DecryptKMSDataKeyResult : public ServiceResult
+			{
+			public:
+
+
+				DecryptKMSDataKeyResult();
+				explicit DecryptKMSDataKeyResult(const std::string &payload);
+				~DecryptKMSDataKeyResult();
+				std::string getPlaintext()const;
+				std::string getKeyId()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string plaintext_;
+				std::string keyId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_VOD_MODEL_DECRYPTKMSDATAKEYRESULT_H_

+ 60 - 0
vod/include/alibabacloud/vod/model/GenerateKMSDataKeyRequest.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_VOD_MODEL_GENERATEKMSDATAKEYREQUEST_H_
+#define ALIBABACLOUD_VOD_MODEL_GENERATEKMSDATAKEYREQUEST_H_
+
+#include <alibabacloud/vod/VodExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Vod {
+namespace Model {
+class ALIBABACLOUD_VOD_EXPORT GenerateKMSDataKeyRequest : public RpcServiceRequest {
+public:
+	GenerateKMSDataKeyRequest();
+	~GenerateKMSDataKeyRequest();
+	std::string getResourceOwnerId() const;
+	void setResourceOwnerId(const std::string &resourceOwnerId);
+	long getResourceRealOwnerId() const;
+	void setResourceRealOwnerId(long resourceRealOwnerId);
+	std::string getAccessKeyId() const;
+	void setAccessKeyId(const std::string &accessKeyId);
+	std::string getKmsRegionId() const;
+	void setKmsRegionId(const std::string &kmsRegionId);
+	std::string getResourceOwnerAccount() const;
+	void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
+	std::string getOwnerAccount() const;
+	void setOwnerAccount(const std::string &ownerAccount);
+	std::string getOwnerId() const;
+	void setOwnerId(const std::string &ownerId);
+
+private:
+	std::string resourceOwnerId_;
+	long resourceRealOwnerId_;
+	std::string accessKeyId_;
+	std::string kmsRegionId_;
+	std::string resourceOwnerAccount_;
+	std::string ownerAccount_;
+	std::string ownerId_;
+};
+} // namespace Model
+} // namespace Vod
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_VOD_MODEL_GENERATEKMSDATAKEYREQUEST_H_

+ 55 - 0
vod/include/alibabacloud/vod/model/GenerateKMSDataKeyResult.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_VOD_MODEL_GENERATEKMSDATAKEYRESULT_H_
+#define ALIBABACLOUD_VOD_MODEL_GENERATEKMSDATAKEYRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/vod/VodExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Vod
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_VOD_EXPORT GenerateKMSDataKeyResult : public ServiceResult
+			{
+			public:
+
+
+				GenerateKMSDataKeyResult();
+				explicit GenerateKMSDataKeyResult(const std::string &payload);
+				~GenerateKMSDataKeyResult();
+				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_VOD_MODEL_GENERATEKMSDATAKEYRESULT_H_

+ 72 - 0
vod/src/VodClient.cc

@@ -663,6 +663,42 @@ VodClient::CreateUploadVideoOutcomeCallable VodClient::createUploadVideoCallable
 	return task->get_future();
 }
 
+VodClient::DecryptKMSDataKeyOutcome VodClient::decryptKMSDataKey(const DecryptKMSDataKeyRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return DecryptKMSDataKeyOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return DecryptKMSDataKeyOutcome(DecryptKMSDataKeyResult(outcome.result()));
+	else
+		return DecryptKMSDataKeyOutcome(outcome.error());
+}
+
+void VodClient::decryptKMSDataKeyAsync(const DecryptKMSDataKeyRequest& request, const DecryptKMSDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, decryptKMSDataKey(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+VodClient::DecryptKMSDataKeyOutcomeCallable VodClient::decryptKMSDataKeyCallable(const DecryptKMSDataKeyRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<DecryptKMSDataKeyOutcome()>>(
+			[this, request]()
+			{
+			return this->decryptKMSDataKey(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 VodClient::DeleteAIImageInfosOutcome VodClient::deleteAIImageInfos(const DeleteAIImageInfosRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2031,6 +2067,42 @@ VodClient::DetachAppPolicyFromIdentityOutcomeCallable VodClient::detachAppPolicy
 	return task->get_future();
 }
 
+VodClient::GenerateKMSDataKeyOutcome VodClient::generateKMSDataKey(const GenerateKMSDataKeyRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return GenerateKMSDataKeyOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return GenerateKMSDataKeyOutcome(GenerateKMSDataKeyResult(outcome.result()));
+	else
+		return GenerateKMSDataKeyOutcome(outcome.error());
+}
+
+void VodClient::generateKMSDataKeyAsync(const GenerateKMSDataKeyRequest& request, const GenerateKMSDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, generateKMSDataKey(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+VodClient::GenerateKMSDataKeyOutcomeCallable VodClient::generateKMSDataKeyCallable(const GenerateKMSDataKeyRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<GenerateKMSDataKeyOutcome()>>(
+			[this, request]()
+			{
+			return this->generateKMSDataKey(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 VodClient::GetAIImageJobsOutcome VodClient::getAIImageJobs(const GetAIImageJobsRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 99 - 0
vod/src/model/DecryptKMSDataKeyRequest.cc

@@ -0,0 +1,99 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <alibabacloud/vod/model/DecryptKMSDataKeyRequest.h>
+
+using AlibabaCloud::Vod::Model::DecryptKMSDataKeyRequest;
+
+DecryptKMSDataKeyRequest::DecryptKMSDataKeyRequest()
+    : RpcServiceRequest("vod", "2017-03-21", "DecryptKMSDataKey") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+DecryptKMSDataKeyRequest::~DecryptKMSDataKeyRequest() {}
+
+std::string DecryptKMSDataKeyRequest::getResourceOwnerId() const {
+  return resourceOwnerId_;
+}
+
+void DecryptKMSDataKeyRequest::setResourceOwnerId(const std::string &resourceOwnerId) {
+  resourceOwnerId_ = resourceOwnerId;
+  setParameter(std::string("ResourceOwnerId"), resourceOwnerId);
+}
+
+long DecryptKMSDataKeyRequest::getResourceRealOwnerId() const {
+  return resourceRealOwnerId_;
+}
+
+void DecryptKMSDataKeyRequest::setResourceRealOwnerId(long resourceRealOwnerId) {
+  resourceRealOwnerId_ = resourceRealOwnerId;
+  setParameter(std::string("ResourceRealOwnerId"), std::to_string(resourceRealOwnerId));
+}
+
+std::string DecryptKMSDataKeyRequest::getAccessKeyId() const {
+  return accessKeyId_;
+}
+
+void DecryptKMSDataKeyRequest::setAccessKeyId(const std::string &accessKeyId) {
+  accessKeyId_ = accessKeyId;
+  setParameter(std::string("AccessKeyId"), accessKeyId);
+}
+
+std::string DecryptKMSDataKeyRequest::getKmsRegionId() const {
+  return kmsRegionId_;
+}
+
+void DecryptKMSDataKeyRequest::setKmsRegionId(const std::string &kmsRegionId) {
+  kmsRegionId_ = kmsRegionId;
+  setParameter(std::string("KmsRegionId"), kmsRegionId);
+}
+
+std::string DecryptKMSDataKeyRequest::getCipherText() const {
+  return cipherText_;
+}
+
+void DecryptKMSDataKeyRequest::setCipherText(const std::string &cipherText) {
+  cipherText_ = cipherText;
+  setParameter(std::string("CipherText"), cipherText);
+}
+
+std::string DecryptKMSDataKeyRequest::getResourceOwnerAccount() const {
+  return resourceOwnerAccount_;
+}
+
+void DecryptKMSDataKeyRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
+  resourceOwnerAccount_ = resourceOwnerAccount;
+  setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
+}
+
+std::string DecryptKMSDataKeyRequest::getOwnerAccount() const {
+  return ownerAccount_;
+}
+
+void DecryptKMSDataKeyRequest::setOwnerAccount(const std::string &ownerAccount) {
+  ownerAccount_ = ownerAccount;
+  setParameter(std::string("OwnerAccount"), ownerAccount);
+}
+
+std::string DecryptKMSDataKeyRequest::getOwnerId() const {
+  return ownerId_;
+}
+
+void DecryptKMSDataKeyRequest::setOwnerId(const std::string &ownerId) {
+  ownerId_ = ownerId;
+  setParameter(std::string("OwnerId"), ownerId);
+}
+

+ 58 - 0
vod/src/model/DecryptKMSDataKeyResult.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 <alibabacloud/vod/model/DecryptKMSDataKeyResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Vod;
+using namespace AlibabaCloud::Vod::Model;
+
+DecryptKMSDataKeyResult::DecryptKMSDataKeyResult() :
+	ServiceResult()
+{}
+
+DecryptKMSDataKeyResult::DecryptKMSDataKeyResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+DecryptKMSDataKeyResult::~DecryptKMSDataKeyResult()
+{}
+
+void DecryptKMSDataKeyResult::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["Plaintext"].isNull())
+		plaintext_ = value["Plaintext"].asString();
+
+}
+
+std::string DecryptKMSDataKeyResult::getPlaintext()const
+{
+	return plaintext_;
+}
+
+std::string DecryptKMSDataKeyResult::getKeyId()const
+{
+	return keyId_;
+}
+

+ 90 - 0
vod/src/model/GenerateKMSDataKeyRequest.cc

@@ -0,0 +1,90 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <alibabacloud/vod/model/GenerateKMSDataKeyRequest.h>
+
+using AlibabaCloud::Vod::Model::GenerateKMSDataKeyRequest;
+
+GenerateKMSDataKeyRequest::GenerateKMSDataKeyRequest()
+    : RpcServiceRequest("vod", "2017-03-21", "GenerateKMSDataKey") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+GenerateKMSDataKeyRequest::~GenerateKMSDataKeyRequest() {}
+
+std::string GenerateKMSDataKeyRequest::getResourceOwnerId() const {
+  return resourceOwnerId_;
+}
+
+void GenerateKMSDataKeyRequest::setResourceOwnerId(const std::string &resourceOwnerId) {
+  resourceOwnerId_ = resourceOwnerId;
+  setParameter(std::string("ResourceOwnerId"), resourceOwnerId);
+}
+
+long GenerateKMSDataKeyRequest::getResourceRealOwnerId() const {
+  return resourceRealOwnerId_;
+}
+
+void GenerateKMSDataKeyRequest::setResourceRealOwnerId(long resourceRealOwnerId) {
+  resourceRealOwnerId_ = resourceRealOwnerId;
+  setParameter(std::string("ResourceRealOwnerId"), std::to_string(resourceRealOwnerId));
+}
+
+std::string GenerateKMSDataKeyRequest::getAccessKeyId() const {
+  return accessKeyId_;
+}
+
+void GenerateKMSDataKeyRequest::setAccessKeyId(const std::string &accessKeyId) {
+  accessKeyId_ = accessKeyId;
+  setParameter(std::string("AccessKeyId"), accessKeyId);
+}
+
+std::string GenerateKMSDataKeyRequest::getKmsRegionId() const {
+  return kmsRegionId_;
+}
+
+void GenerateKMSDataKeyRequest::setKmsRegionId(const std::string &kmsRegionId) {
+  kmsRegionId_ = kmsRegionId;
+  setParameter(std::string("KmsRegionId"), kmsRegionId);
+}
+
+std::string GenerateKMSDataKeyRequest::getResourceOwnerAccount() const {
+  return resourceOwnerAccount_;
+}
+
+void GenerateKMSDataKeyRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
+  resourceOwnerAccount_ = resourceOwnerAccount;
+  setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
+}
+
+std::string GenerateKMSDataKeyRequest::getOwnerAccount() const {
+  return ownerAccount_;
+}
+
+void GenerateKMSDataKeyRequest::setOwnerAccount(const std::string &ownerAccount) {
+  ownerAccount_ = ownerAccount;
+  setParameter(std::string("OwnerAccount"), ownerAccount);
+}
+
+std::string GenerateKMSDataKeyRequest::getOwnerId() const {
+  return ownerId_;
+}
+
+void GenerateKMSDataKeyRequest::setOwnerId(const std::string &ownerId) {
+  ownerId_ = ownerId;
+  setParameter(std::string("OwnerId"), ownerId);
+}
+

+ 65 - 0
vod/src/model/GenerateKMSDataKeyResult.cc

@@ -0,0 +1,65 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/vod/model/GenerateKMSDataKeyResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Vod;
+using namespace AlibabaCloud::Vod::Model;
+
+GenerateKMSDataKeyResult::GenerateKMSDataKeyResult() :
+	ServiceResult()
+{}
+
+GenerateKMSDataKeyResult::GenerateKMSDataKeyResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+GenerateKMSDataKeyResult::~GenerateKMSDataKeyResult()
+{}
+
+void GenerateKMSDataKeyResult::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["CiphertextBlob"].isNull())
+		ciphertextBlob_ = value["CiphertextBlob"].asString();
+	if(!value["Plaintext"].isNull())
+		plaintext_ = value["Plaintext"].asString();
+
+}
+
+std::string GenerateKMSDataKeyResult::getCiphertextBlob()const
+{
+	return ciphertextBlob_;
+}
+
+std::string GenerateKMSDataKeyResult::getPlaintext()const
+{
+	return plaintext_;
+}
+
+std::string GenerateKMSDataKeyResult::getKeyId()const
+{
+	return keyId_;
+}
+