Pārlūkot izejas kodu

Add list event algorithm details.

sdk-team 6 gadi atpakaļ
vecāks
revīzija
7163e3a7d5

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-08-17 Version: 1.36.590
+- Add list event algorithm details.
+
 2020-08-17 Version: 1.36.589
 - Fix create project task.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.589
+1.36.590

+ 4 - 0
vcs/CMakeLists.txt

@@ -81,6 +81,8 @@ set(vcs_public_header_model
 	include/alibabacloud/vcs/model/ListCorpsResult.h
 	include/alibabacloud/vcs/model/ListDevicesRequest.h
 	include/alibabacloud/vcs/model/ListDevicesResult.h
+	include/alibabacloud/vcs/model/ListEventAlgorithmDetailsRequest.h
+	include/alibabacloud/vcs/model/ListEventAlgorithmDetailsResult.h
 	include/alibabacloud/vcs/model/ListEventAlgorithmResultsRequest.h
 	include/alibabacloud/vcs/model/ListEventAlgorithmResultsResult.h
 	include/alibabacloud/vcs/model/ListFaceAlgorithmResultsRequest.h
@@ -182,6 +184,8 @@ set(vcs_src
 	src/model/ListCorpsResult.cc
 	src/model/ListDevicesRequest.cc
 	src/model/ListDevicesResult.cc
+	src/model/ListEventAlgorithmDetailsRequest.cc
+	src/model/ListEventAlgorithmDetailsResult.cc
 	src/model/ListEventAlgorithmResultsRequest.cc
 	src/model/ListEventAlgorithmResultsResult.cc
 	src/model/ListFaceAlgorithmResultsRequest.cc

+ 8 - 0
vcs/include/alibabacloud/vcs/VcsClient.h

@@ -82,6 +82,8 @@
 #include "model/ListCorpsResult.h"
 #include "model/ListDevicesRequest.h"
 #include "model/ListDevicesResult.h"
+#include "model/ListEventAlgorithmDetailsRequest.h"
+#include "model/ListEventAlgorithmDetailsResult.h"
 #include "model/ListEventAlgorithmResultsRequest.h"
 #include "model/ListEventAlgorithmResultsResult.h"
 #include "model/ListFaceAlgorithmResultsRequest.h"
@@ -219,6 +221,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::ListDevicesResult> ListDevicesOutcome;
 			typedef std::future<ListDevicesOutcome> ListDevicesOutcomeCallable;
 			typedef std::function<void(const VcsClient*, const Model::ListDevicesRequest&, const ListDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesAsyncHandler;
+			typedef Outcome<Error, Model::ListEventAlgorithmDetailsResult> ListEventAlgorithmDetailsOutcome;
+			typedef std::future<ListEventAlgorithmDetailsOutcome> ListEventAlgorithmDetailsOutcomeCallable;
+			typedef std::function<void(const VcsClient*, const Model::ListEventAlgorithmDetailsRequest&, const ListEventAlgorithmDetailsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListEventAlgorithmDetailsAsyncHandler;
 			typedef Outcome<Error, Model::ListEventAlgorithmResultsResult> ListEventAlgorithmResultsOutcome;
 			typedef std::future<ListEventAlgorithmResultsOutcome> ListEventAlgorithmResultsOutcomeCallable;
 			typedef std::function<void(const VcsClient*, const Model::ListEventAlgorithmResultsRequest&, const ListEventAlgorithmResultsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListEventAlgorithmResultsAsyncHandler;
@@ -371,6 +376,9 @@ namespace AlibabaCloud
 			ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const;
 			void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const;
+			ListEventAlgorithmDetailsOutcome listEventAlgorithmDetails(const Model::ListEventAlgorithmDetailsRequest &request)const;
+			void listEventAlgorithmDetailsAsync(const Model::ListEventAlgorithmDetailsRequest& request, const ListEventAlgorithmDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ListEventAlgorithmDetailsOutcomeCallable listEventAlgorithmDetailsCallable(const Model::ListEventAlgorithmDetailsRequest& request) const;
 			ListEventAlgorithmResultsOutcome listEventAlgorithmResults(const Model::ListEventAlgorithmResultsRequest &request)const;
 			void listEventAlgorithmResultsAsync(const Model::ListEventAlgorithmResultsRequest& request, const ListEventAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ListEventAlgorithmResultsOutcomeCallable listEventAlgorithmResultsCallable(const Model::ListEventAlgorithmResultsRequest& request) const;

+ 78 - 0
vcs/include/alibabacloud/vcs/model/ListEventAlgorithmDetailsRequest.h

@@ -0,0 +1,78 @@
+/*
+ * 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_VCS_MODEL_LISTEVENTALGORITHMDETAILSREQUEST_H_
+#define ALIBABACLOUD_VCS_MODEL_LISTEVENTALGORITHMDETAILSREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/vcs/VcsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Vcs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_VCS_EXPORT ListEventAlgorithmDetailsRequest : public RpcServiceRequest
+			{
+
+			public:
+				ListEventAlgorithmDetailsRequest();
+				~ListEventAlgorithmDetailsRequest();
+
+				std::string getSourceId()const;
+				void setSourceId(const std::string& sourceId);
+				std::string getCorpId()const;
+				void setCorpId(const std::string& corpId);
+				std::string getExtendValue()const;
+				void setExtendValue(const std::string& extendValue);
+				std::string getEndTime()const;
+				void setEndTime(const std::string& endTime);
+				std::string getStartTime()const;
+				void setStartTime(const std::string& startTime);
+				int getPageNumber()const;
+				void setPageNumber(int pageNumber);
+				std::string getRecordId()const;
+				void setRecordId(const std::string& recordId);
+				std::string getEventValue()const;
+				void setEventValue(const std::string& eventValue);
+				std::string getDataSourceId()const;
+				void setDataSourceId(const std::string& dataSourceId);
+				int getPageSize()const;
+				void setPageSize(int pageSize);
+				std::string getEventType()const;
+				void setEventType(const std::string& eventType);
+
+            private:
+				std::string sourceId_;
+				std::string corpId_;
+				std::string extendValue_;
+				std::string endTime_;
+				std::string startTime_;
+				int pageNumber_;
+				std::string recordId_;
+				std::string eventValue_;
+				std::string dataSourceId_;
+				int pageSize_;
+				std::string eventType_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_VCS_MODEL_LISTEVENTALGORITHMDETAILSREQUEST_H_

+ 84 - 0
vcs/include/alibabacloud/vcs/model/ListEventAlgorithmDetailsResult.h

@@ -0,0 +1,84 @@
+/*
+ * 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_VCS_MODEL_LISTEVENTALGORITHMDETAILSRESULT_H_
+#define ALIBABACLOUD_VCS_MODEL_LISTEVENTALGORITHMDETAILSRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/vcs/VcsExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Vcs
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_VCS_EXPORT ListEventAlgorithmDetailsResult : public ServiceResult
+			{
+			public:
+				struct Datas
+				{
+					std::string eventValue;
+					std::string picUrlPath;
+					std::string corpId;
+					std::string eventType;
+					std::string rightBottomX;
+					std::string rightBottomY;
+					std::string targetPicUrlPath;
+					std::string sourceId;
+					std::string leftTopY;
+					std::string leftTopX;
+					std::string extendValue;
+					std::string pointY;
+					std::string pointX;
+					std::string shotTime;
+					std::string recordId;
+					std::string faceCount;
+					std::string dataSourceId;
+					std::string extraExtendValue;
+				};
+
+
+				ListEventAlgorithmDetailsResult();
+				explicit ListEventAlgorithmDetailsResult(const std::string &payload);
+				~ListEventAlgorithmDetailsResult();
+				int getTotalCount()const;
+				std::string getMessage()const;
+				int getPageSize()const;
+				int getPageNumber()const;
+				std::vector<Datas> getData()const;
+				std::string getCode()const;
+				std::string getSuccess()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				int totalCount_;
+				std::string message_;
+				int pageSize_;
+				int pageNumber_;
+				std::vector<Datas> data_;
+				std::string code_;
+				std::string success_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_VCS_MODEL_LISTEVENTALGORITHMDETAILSRESULT_H_

+ 36 - 0
vcs/src/VcsClient.cc

@@ -1131,6 +1131,42 @@ VcsClient::ListDevicesOutcomeCallable VcsClient::listDevicesCallable(const ListD
 	return task->get_future();
 }
 
+VcsClient::ListEventAlgorithmDetailsOutcome VcsClient::listEventAlgorithmDetails(const ListEventAlgorithmDetailsRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ListEventAlgorithmDetailsOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ListEventAlgorithmDetailsOutcome(ListEventAlgorithmDetailsResult(outcome.result()));
+	else
+		return ListEventAlgorithmDetailsOutcome(outcome.error());
+}
+
+void VcsClient::listEventAlgorithmDetailsAsync(const ListEventAlgorithmDetailsRequest& request, const ListEventAlgorithmDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, listEventAlgorithmDetails(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+VcsClient::ListEventAlgorithmDetailsOutcomeCallable VcsClient::listEventAlgorithmDetailsCallable(const ListEventAlgorithmDetailsRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ListEventAlgorithmDetailsOutcome()>>(
+			[this, request]()
+			{
+			return this->listEventAlgorithmDetails(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 VcsClient::ListEventAlgorithmResultsOutcome VcsClient::listEventAlgorithmResults(const ListEventAlgorithmResultsRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 150 - 0
vcs/src/model/ListEventAlgorithmDetailsRequest.cc

@@ -0,0 +1,150 @@
+/*
+ * 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/vcs/model/ListEventAlgorithmDetailsRequest.h>
+
+using AlibabaCloud::Vcs::Model::ListEventAlgorithmDetailsRequest;
+
+ListEventAlgorithmDetailsRequest::ListEventAlgorithmDetailsRequest() :
+	RpcServiceRequest("vcs", "2020-05-15", "ListEventAlgorithmDetails")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+ListEventAlgorithmDetailsRequest::~ListEventAlgorithmDetailsRequest()
+{}
+
+std::string ListEventAlgorithmDetailsRequest::getSourceId()const
+{
+	return sourceId_;
+}
+
+void ListEventAlgorithmDetailsRequest::setSourceId(const std::string& sourceId)
+{
+	sourceId_ = sourceId;
+	setBodyParameter("SourceId", sourceId);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getCorpId()const
+{
+	return corpId_;
+}
+
+void ListEventAlgorithmDetailsRequest::setCorpId(const std::string& corpId)
+{
+	corpId_ = corpId;
+	setBodyParameter("CorpId", corpId);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getExtendValue()const
+{
+	return extendValue_;
+}
+
+void ListEventAlgorithmDetailsRequest::setExtendValue(const std::string& extendValue)
+{
+	extendValue_ = extendValue;
+	setBodyParameter("ExtendValue", extendValue);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getEndTime()const
+{
+	return endTime_;
+}
+
+void ListEventAlgorithmDetailsRequest::setEndTime(const std::string& endTime)
+{
+	endTime_ = endTime;
+	setBodyParameter("EndTime", endTime);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getStartTime()const
+{
+	return startTime_;
+}
+
+void ListEventAlgorithmDetailsRequest::setStartTime(const std::string& startTime)
+{
+	startTime_ = startTime;
+	setBodyParameter("StartTime", startTime);
+}
+
+int ListEventAlgorithmDetailsRequest::getPageNumber()const
+{
+	return pageNumber_;
+}
+
+void ListEventAlgorithmDetailsRequest::setPageNumber(int pageNumber)
+{
+	pageNumber_ = pageNumber;
+	setBodyParameter("PageNumber", std::to_string(pageNumber));
+}
+
+std::string ListEventAlgorithmDetailsRequest::getRecordId()const
+{
+	return recordId_;
+}
+
+void ListEventAlgorithmDetailsRequest::setRecordId(const std::string& recordId)
+{
+	recordId_ = recordId;
+	setBodyParameter("RecordId", recordId);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getEventValue()const
+{
+	return eventValue_;
+}
+
+void ListEventAlgorithmDetailsRequest::setEventValue(const std::string& eventValue)
+{
+	eventValue_ = eventValue;
+	setBodyParameter("EventValue", eventValue);
+}
+
+std::string ListEventAlgorithmDetailsRequest::getDataSourceId()const
+{
+	return dataSourceId_;
+}
+
+void ListEventAlgorithmDetailsRequest::setDataSourceId(const std::string& dataSourceId)
+{
+	dataSourceId_ = dataSourceId;
+	setBodyParameter("DataSourceId", dataSourceId);
+}
+
+int ListEventAlgorithmDetailsRequest::getPageSize()const
+{
+	return pageSize_;
+}
+
+void ListEventAlgorithmDetailsRequest::setPageSize(int pageSize)
+{
+	pageSize_ = pageSize;
+	setBodyParameter("PageSize", std::to_string(pageSize));
+}
+
+std::string ListEventAlgorithmDetailsRequest::getEventType()const
+{
+	return eventType_;
+}
+
+void ListEventAlgorithmDetailsRequest::setEventType(const std::string& eventType)
+{
+	eventType_ = eventType;
+	setBodyParameter("EventType", eventType);
+}
+

+ 133 - 0
vcs/src/model/ListEventAlgorithmDetailsResult.cc

@@ -0,0 +1,133 @@
+/*
+ * 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/vcs/model/ListEventAlgorithmDetailsResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Vcs;
+using namespace AlibabaCloud::Vcs::Model;
+
+ListEventAlgorithmDetailsResult::ListEventAlgorithmDetailsResult() :
+	ServiceResult()
+{}
+
+ListEventAlgorithmDetailsResult::ListEventAlgorithmDetailsResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+ListEventAlgorithmDetailsResult::~ListEventAlgorithmDetailsResult()
+{}
+
+void ListEventAlgorithmDetailsResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	auto allDataNode = value["Data"]["Datas"];
+	for (auto valueDataDatas : allDataNode)
+	{
+		Datas dataObject;
+		if(!valueDataDatas["CorpId"].isNull())
+			dataObject.corpId = valueDataDatas["CorpId"].asString();
+		if(!valueDataDatas["DataSourceId"].isNull())
+			dataObject.dataSourceId = valueDataDatas["DataSourceId"].asString();
+		if(!valueDataDatas["EventType"].isNull())
+			dataObject.eventType = valueDataDatas["EventType"].asString();
+		if(!valueDataDatas["EventValue"].isNull())
+			dataObject.eventValue = valueDataDatas["EventValue"].asString();
+		if(!valueDataDatas["ExtendValue"].isNull())
+			dataObject.extendValue = valueDataDatas["ExtendValue"].asString();
+		if(!valueDataDatas["ExtraExtendValue"].isNull())
+			dataObject.extraExtendValue = valueDataDatas["ExtraExtendValue"].asString();
+		if(!valueDataDatas["FaceCount"].isNull())
+			dataObject.faceCount = valueDataDatas["FaceCount"].asString();
+		if(!valueDataDatas["LeftTopX"].isNull())
+			dataObject.leftTopX = valueDataDatas["LeftTopX"].asString();
+		if(!valueDataDatas["LeftTopY"].isNull())
+			dataObject.leftTopY = valueDataDatas["LeftTopY"].asString();
+		if(!valueDataDatas["PicUrlPath"].isNull())
+			dataObject.picUrlPath = valueDataDatas["PicUrlPath"].asString();
+		if(!valueDataDatas["PointX"].isNull())
+			dataObject.pointX = valueDataDatas["PointX"].asString();
+		if(!valueDataDatas["PointY"].isNull())
+			dataObject.pointY = valueDataDatas["PointY"].asString();
+		if(!valueDataDatas["RecordId"].isNull())
+			dataObject.recordId = valueDataDatas["RecordId"].asString();
+		if(!valueDataDatas["RightBottomX"].isNull())
+			dataObject.rightBottomX = valueDataDatas["RightBottomX"].asString();
+		if(!valueDataDatas["RightBottomY"].isNull())
+			dataObject.rightBottomY = valueDataDatas["RightBottomY"].asString();
+		if(!valueDataDatas["ShotTime"].isNull())
+			dataObject.shotTime = valueDataDatas["ShotTime"].asString();
+		if(!valueDataDatas["SourceId"].isNull())
+			dataObject.sourceId = valueDataDatas["SourceId"].asString();
+		if(!valueDataDatas["TargetPicUrlPath"].isNull())
+			dataObject.targetPicUrlPath = valueDataDatas["TargetPicUrlPath"].asString();
+		data_.push_back(dataObject);
+	}
+	if(!value["Code"].isNull())
+		code_ = value["Code"].asString();
+	if(!value["Message"].isNull())
+		message_ = value["Message"].asString();
+	if(!value["PageNumber"].isNull())
+		pageNumber_ = std::stoi(value["PageNumber"].asString());
+	if(!value["PageSize"].isNull())
+		pageSize_ = std::stoi(value["PageSize"].asString());
+	if(!value["Success"].isNull())
+		success_ = value["Success"].asString();
+	if(!value["TotalCount"].isNull())
+		totalCount_ = std::stoi(value["TotalCount"].asString());
+
+}
+
+int ListEventAlgorithmDetailsResult::getTotalCount()const
+{
+	return totalCount_;
+}
+
+std::string ListEventAlgorithmDetailsResult::getMessage()const
+{
+	return message_;
+}
+
+int ListEventAlgorithmDetailsResult::getPageSize()const
+{
+	return pageSize_;
+}
+
+int ListEventAlgorithmDetailsResult::getPageNumber()const
+{
+	return pageNumber_;
+}
+
+std::vector<ListEventAlgorithmDetailsResult::Datas> ListEventAlgorithmDetailsResult::getData()const
+{
+	return data_;
+}
+
+std::string ListEventAlgorithmDetailsResult::getCode()const
+{
+	return code_;
+}
+
+std::string ListEventAlgorithmDetailsResult::getSuccess()const
+{
+	return success_;
+}
+