Bladeren bron

Supported Search stream predict task list use modelId for IVISION.

sdk-team 6 jaren geleden
bovenliggende
commit
679b7805c4

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2019-12-20 Version 1.36.220
+- Supported Search stream predict task list use modelId for IVISION.
+
 2019-12-20 Version 1.36.219
 2019-12-20 Version 1.36.219
 - Add result value for OnsConsumerStatus.
 - Add result value for OnsConsumerStatus.
 
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.219
+1.36.220

+ 2 - 6
ivision/CMakeLists.txt

@@ -46,9 +46,7 @@ set(ivision_public_header_model
 	include/alibabacloud/ivision/model/StopStreamPredictRequest.h
 	include/alibabacloud/ivision/model/StopStreamPredictRequest.h
 	include/alibabacloud/ivision/model/StopStreamPredictResult.h
 	include/alibabacloud/ivision/model/StopStreamPredictResult.h
 	include/alibabacloud/ivision/model/UnregisterFaceRequest.h
 	include/alibabacloud/ivision/model/UnregisterFaceRequest.h
-	include/alibabacloud/ivision/model/UnregisterFaceResult.h
-	include/alibabacloud/ivision/model/VideoPredictRequest.h
-	include/alibabacloud/ivision/model/VideoPredictResult.h )
+	include/alibabacloud/ivision/model/UnregisterFaceResult.h )
 
 
 set(ivision_src 
 set(ivision_src 
 	src/IvisionClient.cc
 	src/IvisionClient.cc
@@ -77,9 +75,7 @@ set(ivision_src
 	src/model/StopStreamPredictRequest.cc
 	src/model/StopStreamPredictRequest.cc
 	src/model/StopStreamPredictResult.cc
 	src/model/StopStreamPredictResult.cc
 	src/model/UnregisterFaceRequest.cc
 	src/model/UnregisterFaceRequest.cc
-	src/model/UnregisterFaceResult.cc
-	src/model/VideoPredictRequest.cc
-	src/model/VideoPredictResult.cc )
+	src/model/UnregisterFaceResult.cc )
 
 
 add_library(ivision ${LIB_TYPE}
 add_library(ivision ${LIB_TYPE}
 	${ivision_public_header}
 	${ivision_public_header}

+ 0 - 8
ivision/include/alibabacloud/ivision/IvisionClient.h

@@ -48,8 +48,6 @@
 #include "model/StopStreamPredictResult.h"
 #include "model/StopStreamPredictResult.h"
 #include "model/UnregisterFaceRequest.h"
 #include "model/UnregisterFaceRequest.h"
 #include "model/UnregisterFaceResult.h"
 #include "model/UnregisterFaceResult.h"
-#include "model/VideoPredictRequest.h"
-#include "model/VideoPredictResult.h"
 
 
 
 
 namespace AlibabaCloud
 namespace AlibabaCloud
@@ -98,9 +96,6 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::UnregisterFaceResult> UnregisterFaceOutcome;
 			typedef Outcome<Error, Model::UnregisterFaceResult> UnregisterFaceOutcome;
 			typedef std::future<UnregisterFaceOutcome> UnregisterFaceOutcomeCallable;
 			typedef std::future<UnregisterFaceOutcome> UnregisterFaceOutcomeCallable;
 			typedef std::function<void(const IvisionClient*, const Model::UnregisterFaceRequest&, const UnregisterFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnregisterFaceAsyncHandler;
 			typedef std::function<void(const IvisionClient*, const Model::UnregisterFaceRequest&, const UnregisterFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnregisterFaceAsyncHandler;
-			typedef Outcome<Error, Model::VideoPredictResult> VideoPredictOutcome;
-			typedef std::future<VideoPredictOutcome> VideoPredictOutcomeCallable;
-			typedef std::function<void(const IvisionClient*, const Model::VideoPredictRequest&, const VideoPredictOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VideoPredictAsyncHandler;
 
 
 			IvisionClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			IvisionClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			IvisionClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
 			IvisionClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -145,9 +140,6 @@ namespace AlibabaCloud
 			UnregisterFaceOutcome unregisterFace(const Model::UnregisterFaceRequest &request)const;
 			UnregisterFaceOutcome unregisterFace(const Model::UnregisterFaceRequest &request)const;
 			void unregisterFaceAsync(const Model::UnregisterFaceRequest& request, const UnregisterFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			void unregisterFaceAsync(const Model::UnregisterFaceRequest& request, const UnregisterFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			UnregisterFaceOutcomeCallable unregisterFaceCallable(const Model::UnregisterFaceRequest& request) const;
 			UnregisterFaceOutcomeCallable unregisterFaceCallable(const Model::UnregisterFaceRequest& request) const;
-			VideoPredictOutcome videoPredict(const Model::VideoPredictRequest &request)const;
-			void videoPredictAsync(const Model::VideoPredictRequest& request, const VideoPredictAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
-			VideoPredictOutcomeCallable videoPredictCallable(const Model::VideoPredictRequest& request) const;
 	
 	
 		private:
 		private:
 			std::shared_ptr<EndpointProvider> endpointProvider_;
 			std::shared_ptr<EndpointProvider> endpointProvider_;

+ 3 - 0
ivision/include/alibabacloud/ivision/model/DescribeStreamPredictsRequest.h

@@ -43,6 +43,8 @@ namespace AlibabaCloud
 				void setPageSize(long pageSize);
 				void setPageSize(long pageSize);
 				std::string getShowLog()const;
 				std::string getShowLog()const;
 				void setShowLog(const std::string& showLog);
 				void setShowLog(const std::string& showLog);
+				std::string getModelId()const;
+				void setModelId(const std::string& modelId);
 				long getCurrentPage()const;
 				long getCurrentPage()const;
 				void setCurrentPage(long currentPage);
 				void setCurrentPage(long currentPage);
 				long getOwnerId()const;
 				long getOwnerId()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
 				std::string predictIds_;
 				std::string predictIds_;
 				long pageSize_;
 				long pageSize_;
 				std::string showLog_;
 				std::string showLog_;
+				std::string modelId_;
 				long currentPage_;
 				long currentPage_;
 				long ownerId_;
 				long ownerId_;
 
 

+ 0 - 66
ivision/include/alibabacloud/ivision/model/VideoPredictRequest.h

@@ -1,66 +0,0 @@
-/*
- * 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_IVISION_MODEL_VIDEOPREDICTREQUEST_H_
-#define ALIBABACLOUD_IVISION_MODEL_VIDEOPREDICTREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/ivision/IvisionExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Ivision
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_IVISION_EXPORT VideoPredictRequest : public RpcServiceRequest
-			{
-
-			public:
-				VideoPredictRequest();
-				~VideoPredictRequest();
-
-				std::string getDataUrl()const;
-				void setDataUrl(const std::string& dataUrl);
-				std::string getClientToken()const;
-				void setClientToken(const std::string& clientToken);
-				std::string getNotify()const;
-				void setNotify(const std::string& notify);
-				std::string getOutput()const;
-				void setOutput(const std::string& output);
-				std::string getShowLog()const;
-				void setShowLog(const std::string& showLog);
-				std::string getModels()const;
-				void setModels(const std::string& models);
-				long getOwnerId()const;
-				void setOwnerId(long ownerId);
-
-            private:
-				std::string dataUrl_;
-				std::string clientToken_;
-				std::string notify_;
-				std::string output_;
-				std::string showLog_;
-				std::string models_;
-				long ownerId_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_IVISION_MODEL_VIDEOPREDICTREQUEST_H_

+ 0 - 51
ivision/include/alibabacloud/ivision/model/VideoPredictResult.h

@@ -1,51 +0,0 @@
-/*
- * 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_IVISION_MODEL_VIDEOPREDICTRESULT_H_
-#define ALIBABACLOUD_IVISION_MODEL_VIDEOPREDICTRESULT_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-#include <alibabacloud/core/ServiceResult.h>
-#include <alibabacloud/ivision/IvisionExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Ivision
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_IVISION_EXPORT VideoPredictResult : public ServiceResult
-			{
-			public:
-
-
-				VideoPredictResult();
-				explicit VideoPredictResult(const std::string &payload);
-				~VideoPredictResult();
-				std::string getPredictId()const;
-
-			protected:
-				void parse(const std::string &payload);
-			private:
-				std::string predictId_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_IVISION_MODEL_VIDEOPREDICTRESULT_H_

+ 0 - 36
ivision/src/IvisionClient.cc

@@ -519,39 +519,3 @@ IvisionClient::UnregisterFaceOutcomeCallable IvisionClient::unregisterFaceCallab
 	return task->get_future();
 	return task->get_future();
 }
 }
 
 
-IvisionClient::VideoPredictOutcome IvisionClient::videoPredict(const VideoPredictRequest &request) const
-{
-	auto endpointOutcome = endpointProvider_->getEndpoint();
-	if (!endpointOutcome.isSuccess())
-		return VideoPredictOutcome(endpointOutcome.error());
-
-	auto outcome = makeRequest(endpointOutcome.result(), request);
-
-	if (outcome.isSuccess())
-		return VideoPredictOutcome(VideoPredictResult(outcome.result()));
-	else
-		return VideoPredictOutcome(outcome.error());
-}
-
-void IvisionClient::videoPredictAsync(const VideoPredictRequest& request, const VideoPredictAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
-{
-	auto fn = [this, request, handler, context]()
-	{
-		handler(this, request, videoPredict(request), context);
-	};
-
-	asyncExecute(new Runnable(fn));
-}
-
-IvisionClient::VideoPredictOutcomeCallable IvisionClient::videoPredictCallable(const VideoPredictRequest &request) const
-{
-	auto task = std::make_shared<std::packaged_task<VideoPredictOutcome()>>(
-			[this, request]()
-			{
-			return this->videoPredict(request);
-			});
-
-	asyncExecute(new Runnable([task]() { (*task)(); }));
-	return task->get_future();
-}
-

+ 11 - 0
ivision/src/model/DescribeStreamPredictsRequest.cc

@@ -71,6 +71,17 @@ void DescribeStreamPredictsRequest::setShowLog(const std::string& showLog)
 	setCoreParameter("ShowLog", showLog);
 	setCoreParameter("ShowLog", showLog);
 }
 }
 
 
+std::string DescribeStreamPredictsRequest::getModelId()const
+{
+	return modelId_;
+}
+
+void DescribeStreamPredictsRequest::setModelId(const std::string& modelId)
+{
+	modelId_ = modelId;
+	setCoreParameter("ModelId", modelId);
+}
+
 long DescribeStreamPredictsRequest::getCurrentPage()const
 long DescribeStreamPredictsRequest::getCurrentPage()const
 {
 {
 	return currentPage_;
 	return currentPage_;

+ 0 - 106
ivision/src/model/VideoPredictRequest.cc

@@ -1,106 +0,0 @@
-/*
- * 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/ivision/model/VideoPredictRequest.h>
-
-using AlibabaCloud::Ivision::Model::VideoPredictRequest;
-
-VideoPredictRequest::VideoPredictRequest() :
-	RpcServiceRequest("ivision", "2019-03-08", "VideoPredict")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-VideoPredictRequest::~VideoPredictRequest()
-{}
-
-std::string VideoPredictRequest::getDataUrl()const
-{
-	return dataUrl_;
-}
-
-void VideoPredictRequest::setDataUrl(const std::string& dataUrl)
-{
-	dataUrl_ = dataUrl;
-	setCoreParameter("DataUrl", dataUrl);
-}
-
-std::string VideoPredictRequest::getClientToken()const
-{
-	return clientToken_;
-}
-
-void VideoPredictRequest::setClientToken(const std::string& clientToken)
-{
-	clientToken_ = clientToken;
-	setCoreParameter("ClientToken", clientToken);
-}
-
-std::string VideoPredictRequest::getNotify()const
-{
-	return notify_;
-}
-
-void VideoPredictRequest::setNotify(const std::string& notify)
-{
-	notify_ = notify;
-	setCoreParameter("Notify", notify);
-}
-
-std::string VideoPredictRequest::getOutput()const
-{
-	return output_;
-}
-
-void VideoPredictRequest::setOutput(const std::string& output)
-{
-	output_ = output;
-	setCoreParameter("Output", output);
-}
-
-std::string VideoPredictRequest::getShowLog()const
-{
-	return showLog_;
-}
-
-void VideoPredictRequest::setShowLog(const std::string& showLog)
-{
-	showLog_ = showLog;
-	setCoreParameter("ShowLog", showLog);
-}
-
-std::string VideoPredictRequest::getModels()const
-{
-	return models_;
-}
-
-void VideoPredictRequest::setModels(const std::string& models)
-{
-	models_ = models;
-	setCoreParameter("Models", models);
-}
-
-long VideoPredictRequest::getOwnerId()const
-{
-	return ownerId_;
-}
-
-void VideoPredictRequest::setOwnerId(long ownerId)
-{
-	ownerId_ = ownerId;
-	setCoreParameter("OwnerId", std::to_string(ownerId));
-}
-

+ 0 - 51
ivision/src/model/VideoPredictResult.cc

@@ -1,51 +0,0 @@
-/*
- * 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/ivision/model/VideoPredictResult.h>
-#include <json/json.h>
-
-using namespace AlibabaCloud::Ivision;
-using namespace AlibabaCloud::Ivision::Model;
-
-VideoPredictResult::VideoPredictResult() :
-	ServiceResult()
-{}
-
-VideoPredictResult::VideoPredictResult(const std::string &payload) :
-	ServiceResult()
-{
-	parse(payload);
-}
-
-VideoPredictResult::~VideoPredictResult()
-{}
-
-void VideoPredictResult::parse(const std::string &payload)
-{
-	Json::Reader reader;
-	Json::Value value;
-	reader.parse(payload, value);
-	setRequestId(value["RequestId"].asString());
-	if(!value["PredictId"].isNull())
-		predictId_ = value["PredictId"].asString();
-
-}
-
-std::string VideoPredictResult::getPredictId()const
-{
-	return predictId_;
-}
-