浏览代码

Support feedback.

sdk-team 5 年之前
父节点
当前提交
e5ea19cdfb

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-10-23 Version: patch
+- Support feedback.
+
 2020-10-22 Version: patch
 - Add Pipeline Member api.
 

+ 6 - 2
imm/CMakeLists.txt

@@ -176,7 +176,9 @@ set(imm_public_header_model
 	include/alibabacloud/imm/model/UpdateProjectRequest.h
 	include/alibabacloud/imm/model/UpdateProjectResult.h
 	include/alibabacloud/imm/model/UpdateSetRequest.h
-	include/alibabacloud/imm/model/UpdateSetResult.h )
+	include/alibabacloud/imm/model/UpdateSetResult.h
+	include/alibabacloud/imm/model/VideoAnalyseFeedbackRequest.h
+	include/alibabacloud/imm/model/VideoAnalyseFeedbackResult.h )
 
 set(imm_src 
 	src/ImmClient.cc
@@ -335,7 +337,9 @@ set(imm_src
 	src/model/UpdateProjectRequest.cc
 	src/model/UpdateProjectResult.cc
 	src/model/UpdateSetRequest.cc
-	src/model/UpdateSetResult.cc )
+	src/model/UpdateSetResult.cc
+	src/model/VideoAnalyseFeedbackRequest.cc
+	src/model/VideoAnalyseFeedbackResult.cc )
 
 add_library(imm ${LIB_TYPE}
 	${imm_public_header}

+ 8 - 0
imm/include/alibabacloud/imm/ImmClient.h

@@ -178,6 +178,8 @@
 #include "model/UpdateProjectResult.h"
 #include "model/UpdateSetRequest.h"
 #include "model/UpdateSetResult.h"
+#include "model/VideoAnalyseFeedbackRequest.h"
+#include "model/VideoAnalyseFeedbackResult.h"
 
 
 namespace AlibabaCloud
@@ -421,6 +423,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::UpdateSetResult> UpdateSetOutcome;
 			typedef std::future<UpdateSetOutcome> UpdateSetOutcomeCallable;
 			typedef std::function<void(const ImmClient*, const Model::UpdateSetRequest&, const UpdateSetOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSetAsyncHandler;
+			typedef Outcome<Error, Model::VideoAnalyseFeedbackResult> VideoAnalyseFeedbackOutcome;
+			typedef std::future<VideoAnalyseFeedbackOutcome> VideoAnalyseFeedbackOutcomeCallable;
+			typedef std::function<void(const ImmClient*, const Model::VideoAnalyseFeedbackRequest&, const VideoAnalyseFeedbackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VideoAnalyseFeedbackAsyncHandler;
 
 			ImmClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			ImmClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -660,6 +665,9 @@ namespace AlibabaCloud
 			UpdateSetOutcome updateSet(const Model::UpdateSetRequest &request)const;
 			void updateSetAsync(const Model::UpdateSetRequest& request, const UpdateSetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			UpdateSetOutcomeCallable updateSetCallable(const Model::UpdateSetRequest& request) const;
+			VideoAnalyseFeedbackOutcome videoAnalyseFeedback(const Model::VideoAnalyseFeedbackRequest &request)const;
+			void videoAnalyseFeedbackAsync(const Model::VideoAnalyseFeedbackRequest& request, const VideoAnalyseFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			VideoAnalyseFeedbackOutcomeCallable videoAnalyseFeedbackCallable(const Model::VideoAnalyseFeedbackRequest& request) const;
 	
 		private:
 			std::shared_ptr<EndpointProvider> endpointProvider_;

+ 69 - 0
imm/include/alibabacloud/imm/model/VideoAnalyseFeedbackRequest.h

@@ -0,0 +1,69 @@
+/*
+ * 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_IMM_MODEL_VIDEOANALYSEFEEDBACKREQUEST_H_
+#define ALIBABACLOUD_IMM_MODEL_VIDEOANALYSEFEEDBACKREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/imm/ImmExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Imm
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_IMM_EXPORT VideoAnalyseFeedbackRequest : public RpcServiceRequest
+			{
+
+			public:
+				VideoAnalyseFeedbackRequest();
+				~VideoAnalyseFeedbackRequest();
+
+				std::string getNote()const;
+				void setNote(const std::string& note);
+				std::string getProject()const;
+				void setProject(const std::string& project);
+				std::string getAccessKeyId()const;
+				void setAccessKeyId(const std::string& accessKeyId);
+				std::string getTaskId()const;
+				void setTaskId(const std::string& taskId);
+				std::string getFrames()const;
+				void setFrames(const std::string& frames);
+				std::string getSuggestion()const;
+				void setSuggestion(const std::string& suggestion);
+				std::string getUri()const;
+				void setUri(const std::string& uri);
+				std::string getScenes()const;
+				void setScenes(const std::string& scenes);
+
+            private:
+				std::string note_;
+				std::string project_;
+				std::string accessKeyId_;
+				std::string taskId_;
+				std::string frames_;
+				std::string suggestion_;
+				std::string uri_;
+				std::string scenes_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_IMM_MODEL_VIDEOANALYSEFEEDBACKREQUEST_H_

+ 49 - 0
imm/include/alibabacloud/imm/model/VideoAnalyseFeedbackResult.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_IMM_MODEL_VIDEOANALYSEFEEDBACKRESULT_H_
+#define ALIBABACLOUD_IMM_MODEL_VIDEOANALYSEFEEDBACKRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/imm/ImmExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Imm
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_IMM_EXPORT VideoAnalyseFeedbackResult : public ServiceResult
+			{
+			public:
+
+
+				VideoAnalyseFeedbackResult();
+				explicit VideoAnalyseFeedbackResult(const std::string &payload);
+				~VideoAnalyseFeedbackResult();
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_IMM_MODEL_VIDEOANALYSEFEEDBACKRESULT_H_

+ 36 - 0
imm/src/ImmClient.cc

@@ -2859,3 +2859,39 @@ ImmClient::UpdateSetOutcomeCallable ImmClient::updateSetCallable(const UpdateSet
 	return task->get_future();
 }
 
+ImmClient::VideoAnalyseFeedbackOutcome ImmClient::videoAnalyseFeedback(const VideoAnalyseFeedbackRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return VideoAnalyseFeedbackOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return VideoAnalyseFeedbackOutcome(VideoAnalyseFeedbackResult(outcome.result()));
+	else
+		return VideoAnalyseFeedbackOutcome(outcome.error());
+}
+
+void ImmClient::videoAnalyseFeedbackAsync(const VideoAnalyseFeedbackRequest& request, const VideoAnalyseFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, videoAnalyseFeedback(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+ImmClient::VideoAnalyseFeedbackOutcomeCallable ImmClient::videoAnalyseFeedbackCallable(const VideoAnalyseFeedbackRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<VideoAnalyseFeedbackOutcome()>>(
+			[this, request]()
+			{
+			return this->videoAnalyseFeedback(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+

+ 117 - 0
imm/src/model/VideoAnalyseFeedbackRequest.cc

@@ -0,0 +1,117 @@
+/*
+ * 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/imm/model/VideoAnalyseFeedbackRequest.h>
+
+using AlibabaCloud::Imm::Model::VideoAnalyseFeedbackRequest;
+
+VideoAnalyseFeedbackRequest::VideoAnalyseFeedbackRequest() :
+	RpcServiceRequest("imm", "2017-09-06", "VideoAnalyseFeedback")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+VideoAnalyseFeedbackRequest::~VideoAnalyseFeedbackRequest()
+{}
+
+std::string VideoAnalyseFeedbackRequest::getNote()const
+{
+	return note_;
+}
+
+void VideoAnalyseFeedbackRequest::setNote(const std::string& note)
+{
+	note_ = note;
+	setParameter("Note", note);
+}
+
+std::string VideoAnalyseFeedbackRequest::getProject()const
+{
+	return project_;
+}
+
+void VideoAnalyseFeedbackRequest::setProject(const std::string& project)
+{
+	project_ = project;
+	setParameter("Project", project);
+}
+
+std::string VideoAnalyseFeedbackRequest::getAccessKeyId()const
+{
+	return accessKeyId_;
+}
+
+void VideoAnalyseFeedbackRequest::setAccessKeyId(const std::string& accessKeyId)
+{
+	accessKeyId_ = accessKeyId;
+	setParameter("AccessKeyId", accessKeyId);
+}
+
+std::string VideoAnalyseFeedbackRequest::getTaskId()const
+{
+	return taskId_;
+}
+
+void VideoAnalyseFeedbackRequest::setTaskId(const std::string& taskId)
+{
+	taskId_ = taskId;
+	setParameter("TaskId", taskId);
+}
+
+std::string VideoAnalyseFeedbackRequest::getFrames()const
+{
+	return frames_;
+}
+
+void VideoAnalyseFeedbackRequest::setFrames(const std::string& frames)
+{
+	frames_ = frames;
+	setParameter("Frames", frames);
+}
+
+std::string VideoAnalyseFeedbackRequest::getSuggestion()const
+{
+	return suggestion_;
+}
+
+void VideoAnalyseFeedbackRequest::setSuggestion(const std::string& suggestion)
+{
+	suggestion_ = suggestion;
+	setParameter("Suggestion", suggestion);
+}
+
+std::string VideoAnalyseFeedbackRequest::getUri()const
+{
+	return uri_;
+}
+
+void VideoAnalyseFeedbackRequest::setUri(const std::string& uri)
+{
+	uri_ = uri;
+	setParameter("Uri", uri);
+}
+
+std::string VideoAnalyseFeedbackRequest::getScenes()const
+{
+	return scenes_;
+}
+
+void VideoAnalyseFeedbackRequest::setScenes(const std::string& scenes)
+{
+	scenes_ = scenes;
+	setParameter("Scenes", scenes);
+}
+

+ 44 - 0
imm/src/model/VideoAnalyseFeedbackResult.cc

@@ -0,0 +1,44 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/imm/model/VideoAnalyseFeedbackResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Imm;
+using namespace AlibabaCloud::Imm::Model;
+
+VideoAnalyseFeedbackResult::VideoAnalyseFeedbackResult() :
+	ServiceResult()
+{}
+
+VideoAnalyseFeedbackResult::VideoAnalyseFeedbackResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+VideoAnalyseFeedbackResult::~VideoAnalyseFeedbackResult()
+{}
+
+void VideoAnalyseFeedbackResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+
+}
+