Explorar o código

Add video compose api.

sdk-team %!s(int64=6) %!d(string=hai) anos
pai
achega
7959141d87

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-07-08 Version: 1.36.507
+- Add video compose api.
+
 2020-07-08 Version: 1.36.506
 - Add video summarization related API.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.506
+1.36.507

+ 9 - 9
vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h

@@ -39,27 +39,27 @@ namespace AlibabaCloud
 				void setCorpId(const std::string& corpId);
 				std::string getDomainName()const;
 				void setDomainName(const std::string& domainName);
-				std::string getPicUrlList()const;
-				void setPicUrlList(const std::string& picUrlList);
-				std::string getAudioUrl()const;
-				void setAudioUrl(const std::string& audioUrl);
+				int getVideoFrameRate()const;
+				void setVideoFrameRate(int videoFrameRate);
+				std::string getImageFileNames()const;
+				void setImageFileNames(const std::string& imageFileNames);
+				std::string getAudioFileName()const;
+				void setAudioFileName(const std::string& audioFileName);
 				std::string getBucketName()const;
 				void setBucketName(const std::string& bucketName);
 				std::string getImageParameters()const;
 				void setImageParameters(const std::string& imageParameters);
-				std::string getVideoRate()const;
-				void setVideoRate(const std::string& videoRate);
 				std::string getVideoFormat()const;
 				void setVideoFormat(const std::string& videoFormat);
 
             private:
 				std::string corpId_;
 				std::string domainName_;
-				std::string picUrlList_;
-				std::string audioUrl_;
+				int videoFrameRate_;
+				std::string imageFileNames_;
+				std::string audioFileName_;
 				std::string bucketName_;
 				std::string imageParameters_;
-				std::string videoRate_;
 				std::string videoFormat_;
 
 			};

+ 4 - 7
vcs/include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h

@@ -32,25 +32,22 @@ namespace AlibabaCloud
 			class ALIBABACLOUD_VCS_EXPORT CreateVideoComposeTaskResult : public ServiceResult
 			{
 			public:
-				struct Data
-				{
-					int bucketName;
-					int domainName;
-				};
 
 
 				CreateVideoComposeTaskResult();
 				explicit CreateVideoComposeTaskResult(const std::string &payload);
 				~CreateVideoComposeTaskResult();
+				std::string getBucketName()const;
 				std::string getMessage()const;
-				Data getData()const;
+				std::string getDomainName()const;
 				std::string getCode()const;
 
 			protected:
 				void parse(const std::string &payload);
 			private:
+				std::string bucketName_;
 				std::string message_;
-				Data data_;
+				std::string domainName_;
 				std::string code_;
 
 			};

+ 4 - 0
vcs/include/alibabacloud/vcs/model/GetVideoComposeResultResult.h

@@ -37,13 +37,17 @@ namespace AlibabaCloud
 				GetVideoComposeResultResult();
 				explicit GetVideoComposeResultResult(const std::string &payload);
 				~GetVideoComposeResultResult();
+				std::string getStatus()const;
 				std::string getMessage()const;
+				std::string getCode()const;
 				std::string getVideoUrl()const;
 
 			protected:
 				void parse(const std::string &payload);
 			private:
+				std::string status_;
 				std::string message_;
+				std::string code_;
 				std::string videoUrl_;
 
 			};

+ 3 - 3
vcs/src/VcsClient.cc

@@ -31,21 +31,21 @@ VcsClient::VcsClient(const Credentials &credentials, const ClientConfiguration &
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vcs");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VcsClient::VcsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vcs");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VcsClient::VcsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vcs");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VcsClient::~VcsClient()

+ 21 - 21
vcs/src/model/CreateVideoComposeTaskRequest.cc

@@ -49,26 +49,37 @@ void CreateVideoComposeTaskRequest::setDomainName(const std::string& domainName)
 	setBodyParameter("DomainName", domainName);
 }
 
-std::string CreateVideoComposeTaskRequest::getPicUrlList()const
+int CreateVideoComposeTaskRequest::getVideoFrameRate()const
 {
-	return picUrlList_;
+	return videoFrameRate_;
 }
 
-void CreateVideoComposeTaskRequest::setPicUrlList(const std::string& picUrlList)
+void CreateVideoComposeTaskRequest::setVideoFrameRate(int videoFrameRate)
 {
-	picUrlList_ = picUrlList;
-	setBodyParameter("PicUrlList", picUrlList);
+	videoFrameRate_ = videoFrameRate;
+	setBodyParameter("VideoFrameRate", std::to_string(videoFrameRate));
 }
 
-std::string CreateVideoComposeTaskRequest::getAudioUrl()const
+std::string CreateVideoComposeTaskRequest::getImageFileNames()const
 {
-	return audioUrl_;
+	return imageFileNames_;
 }
 
-void CreateVideoComposeTaskRequest::setAudioUrl(const std::string& audioUrl)
+void CreateVideoComposeTaskRequest::setImageFileNames(const std::string& imageFileNames)
 {
-	audioUrl_ = audioUrl;
-	setBodyParameter("AudioUrl", audioUrl);
+	imageFileNames_ = imageFileNames;
+	setBodyParameter("ImageFileNames", imageFileNames);
+}
+
+std::string CreateVideoComposeTaskRequest::getAudioFileName()const
+{
+	return audioFileName_;
+}
+
+void CreateVideoComposeTaskRequest::setAudioFileName(const std::string& audioFileName)
+{
+	audioFileName_ = audioFileName;
+	setBodyParameter("AudioFileName", audioFileName);
 }
 
 std::string CreateVideoComposeTaskRequest::getBucketName()const
@@ -93,17 +104,6 @@ void CreateVideoComposeTaskRequest::setImageParameters(const std::string& imageP
 	setBodyParameter("ImageParameters", imageParameters);
 }
 
-std::string CreateVideoComposeTaskRequest::getVideoRate()const
-{
-	return videoRate_;
-}
-
-void CreateVideoComposeTaskRequest::setVideoRate(const std::string& videoRate)
-{
-	videoRate_ = videoRate;
-	setBodyParameter("VideoRate", videoRate);
-}
-
 std::string CreateVideoComposeTaskRequest::getVideoFormat()const
 {
 	return videoFormat_;

+ 11 - 7
vcs/src/model/CreateVideoComposeTaskResult.cc

@@ -39,26 +39,30 @@ void CreateVideoComposeTaskResult::parse(const std::string &payload)
 	Json::Value value;
 	reader.parse(payload, value);
 	setRequestId(value["RequestId"].asString());
-	auto dataNode = value["Data"];
-	if(!dataNode["DomainName"].isNull())
-		data_.domainName = std::stoi(dataNode["DomainName"].asString());
-	if(!dataNode["BucketName"].isNull())
-		data_.bucketName = std::stoi(dataNode["BucketName"].asString());
 	if(!value["Code"].isNull())
 		code_ = value["Code"].asString();
 	if(!value["Message"].isNull())
 		message_ = value["Message"].asString();
+	if(!value["DomainName"].isNull())
+		domainName_ = value["DomainName"].asString();
+	if(!value["BucketName"].isNull())
+		bucketName_ = value["BucketName"].asString();
 
 }
 
+std::string CreateVideoComposeTaskResult::getBucketName()const
+{
+	return bucketName_;
+}
+
 std::string CreateVideoComposeTaskResult::getMessage()const
 {
 	return message_;
 }
 
-CreateVideoComposeTaskResult::Data CreateVideoComposeTaskResult::getData()const
+std::string CreateVideoComposeTaskResult::getDomainName()const
 {
-	return data_;
+	return domainName_;
 }
 
 std::string CreateVideoComposeTaskResult::getCode()const

+ 14 - 0
vcs/src/model/GetVideoComposeResultResult.cc

@@ -43,14 +43,28 @@ void GetVideoComposeResultResult::parse(const std::string &payload)
 		message_ = value["Message"].asString();
 	if(!value["VideoUrl"].isNull())
 		videoUrl_ = value["VideoUrl"].asString();
+	if(!value["Code"].isNull())
+		code_ = value["Code"].asString();
+	if(!value["Status"].isNull())
+		status_ = value["Status"].asString();
 
 }
 
+std::string GetVideoComposeResultResult::getStatus()const
+{
+	return status_;
+}
+
 std::string GetVideoComposeResultResult::getMessage()const
 {
 	return message_;
 }
 
+std::string GetVideoComposeResultResult::getCode()const
+{
+	return code_;
+}
+
 std::string GetVideoComposeResultResult::getVideoUrl()const
 {
 	return videoUrl_;