From f4138c76d639dc57d4f8f3a5520c48e8608f96ed Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 20 Oct 2020 09:49:03 +0000 Subject: [PATCH] Update Configuration. --- CHANGELOG | 3 + vcs/CMakeLists.txt | 8 ++ vcs/include/alibabacloud/vcs/VcsClient.h | 16 +++ .../vcs/model/GetMonitorListRequest.h | 54 ++++++++ .../vcs/model/GetMonitorListResult.h | 81 ++++++++++++ .../vcs/model/GetMonitorResultResult.h | 6 + .../vcs/model/ListDeviceGroupsResult.h | 8 +- .../vcs/model/ListPersonTraceDetailsRequest.h | 69 +++++++++++ .../vcs/model/ListPersonTraceDetailsResult.h | 74 +++++++++++ .../vcs/model/SearchObjectResult.h | 13 +- vcs/src/VcsClient.cc | 78 +++++++++++- vcs/src/model/GetMonitorListRequest.cc | 62 ++++++++++ vcs/src/model/GetMonitorListResult.cc | 108 ++++++++++++++++ vcs/src/model/GetMonitorResultResult.cc | 5 + vcs/src/model/ListDeviceGroupsResult.cc | 8 ++ .../model/ListPersonTraceDetailsRequest.cc | 117 ++++++++++++++++++ vcs/src/model/ListPersonTraceDetailsResult.cc | 101 +++++++++++++++ vcs/src/model/SearchObjectResult.cc | 91 ++++++-------- 18 files changed, 838 insertions(+), 64 deletions(-) create mode 100644 vcs/include/alibabacloud/vcs/model/GetMonitorListRequest.h create mode 100644 vcs/include/alibabacloud/vcs/model/GetMonitorListResult.h create mode 100644 vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsRequest.h create mode 100644 vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsResult.h create mode 100644 vcs/src/model/GetMonitorListRequest.cc create mode 100644 vcs/src/model/GetMonitorListResult.cc create mode 100644 vcs/src/model/ListPersonTraceDetailsRequest.cc create mode 100644 vcs/src/model/ListPersonTraceDetailsResult.cc diff --git a/CHANGELOG b/CHANGELOG index 8e7703118..b8d8ca7dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-10-20 Version: patch +- Update Configuration. + 2020-10-20 Version: patch - Add isv interface. diff --git a/vcs/CMakeLists.txt b/vcs/CMakeLists.txt index c389c05b7..ea8911523 100644 --- a/vcs/CMakeLists.txt +++ b/vcs/CMakeLists.txt @@ -85,6 +85,8 @@ set(vcs_public_header_model include/alibabacloud/vcs/model/GetFaceOptionsResult.h include/alibabacloud/vcs/model/GetInventoryRequest.h include/alibabacloud/vcs/model/GetInventoryResult.h + include/alibabacloud/vcs/model/GetMonitorListRequest.h + include/alibabacloud/vcs/model/GetMonitorListResult.h include/alibabacloud/vcs/model/GetMonitorResultRequest.h include/alibabacloud/vcs/model/GetMonitorResultResult.h include/alibabacloud/vcs/model/GetPersonDetailRequest.h @@ -129,6 +131,8 @@ set(vcs_public_header_model include/alibabacloud/vcs/model/ListMotorAlgorithmResultsResult.h include/alibabacloud/vcs/model/ListPersonTraceRequest.h include/alibabacloud/vcs/model/ListPersonTraceResult.h + include/alibabacloud/vcs/model/ListPersonTraceDetailsRequest.h + include/alibabacloud/vcs/model/ListPersonTraceDetailsResult.h include/alibabacloud/vcs/model/ListPersonVisitCountRequest.h include/alibabacloud/vcs/model/ListPersonVisitCountResult.h include/alibabacloud/vcs/model/ListPersonsRequest.h @@ -248,6 +252,8 @@ set(vcs_src src/model/GetFaceOptionsResult.cc src/model/GetInventoryRequest.cc src/model/GetInventoryResult.cc + src/model/GetMonitorListRequest.cc + src/model/GetMonitorListResult.cc src/model/GetMonitorResultRequest.cc src/model/GetMonitorResultResult.cc src/model/GetPersonDetailRequest.cc @@ -292,6 +298,8 @@ set(vcs_src src/model/ListMotorAlgorithmResultsResult.cc src/model/ListPersonTraceRequest.cc src/model/ListPersonTraceResult.cc + src/model/ListPersonTraceDetailsRequest.cc + src/model/ListPersonTraceDetailsResult.cc src/model/ListPersonVisitCountRequest.cc src/model/ListPersonVisitCountResult.cc src/model/ListPersonsRequest.cc diff --git a/vcs/include/alibabacloud/vcs/VcsClient.h b/vcs/include/alibabacloud/vcs/VcsClient.h index c3615fe30..5573fb224 100644 --- a/vcs/include/alibabacloud/vcs/VcsClient.h +++ b/vcs/include/alibabacloud/vcs/VcsClient.h @@ -86,6 +86,8 @@ #include "model/GetFaceOptionsResult.h" #include "model/GetInventoryRequest.h" #include "model/GetInventoryResult.h" +#include "model/GetMonitorListRequest.h" +#include "model/GetMonitorListResult.h" #include "model/GetMonitorResultRequest.h" #include "model/GetMonitorResultResult.h" #include "model/GetPersonDetailRequest.h" @@ -130,6 +132,8 @@ #include "model/ListMotorAlgorithmResultsResult.h" #include "model/ListPersonTraceRequest.h" #include "model/ListPersonTraceResult.h" +#include "model/ListPersonTraceDetailsRequest.h" +#include "model/ListPersonTraceDetailsResult.h" #include "model/ListPersonVisitCountRequest.h" #include "model/ListPersonVisitCountResult.h" #include "model/ListPersonsRequest.h" @@ -287,6 +291,9 @@ namespace AlibabaCloud typedef Outcome GetInventoryOutcome; typedef std::future GetInventoryOutcomeCallable; typedef std::function&)> GetInventoryAsyncHandler; + typedef Outcome GetMonitorListOutcome; + typedef std::future GetMonitorListOutcomeCallable; + typedef std::function&)> GetMonitorListAsyncHandler; typedef Outcome GetMonitorResultOutcome; typedef std::future GetMonitorResultOutcomeCallable; typedef std::function&)> GetMonitorResultAsyncHandler; @@ -353,6 +360,9 @@ namespace AlibabaCloud typedef Outcome ListPersonTraceOutcome; typedef std::future ListPersonTraceOutcomeCallable; typedef std::function&)> ListPersonTraceAsyncHandler; + typedef Outcome ListPersonTraceDetailsOutcome; + typedef std::future ListPersonTraceDetailsOutcomeCallable; + typedef std::function&)> ListPersonTraceDetailsAsyncHandler; typedef Outcome ListPersonVisitCountOutcome; typedef std::future ListPersonVisitCountOutcomeCallable; typedef std::function&)> ListPersonVisitCountAsyncHandler; @@ -532,6 +542,9 @@ namespace AlibabaCloud GetInventoryOutcome getInventory(const Model::GetInventoryRequest &request)const; void getInventoryAsync(const Model::GetInventoryRequest& request, const GetInventoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetInventoryOutcomeCallable getInventoryCallable(const Model::GetInventoryRequest& request) const; + GetMonitorListOutcome getMonitorList(const Model::GetMonitorListRequest &request)const; + void getMonitorListAsync(const Model::GetMonitorListRequest& request, const GetMonitorListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMonitorListOutcomeCallable getMonitorListCallable(const Model::GetMonitorListRequest& request) const; GetMonitorResultOutcome getMonitorResult(const Model::GetMonitorResultRequest &request)const; void getMonitorResultAsync(const Model::GetMonitorResultRequest& request, const GetMonitorResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetMonitorResultOutcomeCallable getMonitorResultCallable(const Model::GetMonitorResultRequest& request) const; @@ -598,6 +611,9 @@ namespace AlibabaCloud ListPersonTraceOutcome listPersonTrace(const Model::ListPersonTraceRequest &request)const; void listPersonTraceAsync(const Model::ListPersonTraceRequest& request, const ListPersonTraceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListPersonTraceOutcomeCallable listPersonTraceCallable(const Model::ListPersonTraceRequest& request) const; + ListPersonTraceDetailsOutcome listPersonTraceDetails(const Model::ListPersonTraceDetailsRequest &request)const; + void listPersonTraceDetailsAsync(const Model::ListPersonTraceDetailsRequest& request, const ListPersonTraceDetailsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListPersonTraceDetailsOutcomeCallable listPersonTraceDetailsCallable(const Model::ListPersonTraceDetailsRequest& request) const; ListPersonVisitCountOutcome listPersonVisitCount(const Model::ListPersonVisitCountRequest &request)const; void listPersonVisitCountAsync(const Model::ListPersonVisitCountRequest& request, const ListPersonVisitCountAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListPersonVisitCountOutcomeCallable listPersonVisitCountCallable(const Model::ListPersonVisitCountRequest& request) const; diff --git a/vcs/include/alibabacloud/vcs/model/GetMonitorListRequest.h b/vcs/include/alibabacloud/vcs/model/GetMonitorListRequest.h new file mode 100644 index 000000000..ab26c8f50 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetMonitorListRequest.h @@ -0,0 +1,54 @@ +/* + * 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_GETMONITORLISTREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_GETMONITORLISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetMonitorListRequest : public RpcServiceRequest + { + + public: + GetMonitorListRequest(); + ~GetMonitorListRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + int getPageNo()const; + void setPageNo(int pageNo); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + std::string corpId_; + int pageNo_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETMONITORLISTREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetMonitorListResult.h b/vcs/include/alibabacloud/vcs/model/GetMonitorListResult.h new file mode 100644 index 000000000..6bf860c44 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetMonitorListResult.h @@ -0,0 +1,81 @@ +/* + * 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_GETMONITORLISTRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_GETMONITORLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetMonitorListResult : public ServiceResult + { + public: + struct Data + { + struct Record + { + std::string status; + std::string taskId; + std::string description; + std::string monitorType; + std::string imageMatch; + std::string attributes; + std::string deviceList; + std::string modifiedDate; + std::string createDate; + std::string notifierType; + std::string ruleExpression; + std::string algorithmVendor; + std::string expression; + std::string ruleName; + std::string notifierExtra; + }; + int totalCount; + int pageSize; + int totalPage; + int pageNo; + std::vector records; + }; + + + GetMonitorListResult(); + explicit GetMonitorListResult(const std::string &payload); + ~GetMonitorListResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETMONITORLISTRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h b/vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h index e3b591fb0..02d7789dd 100644 --- a/vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h +++ b/vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h @@ -36,9 +36,14 @@ namespace AlibabaCloud { struct RecordsItem { + struct ExtendInfo + { + std::string plateNo; + }; std::string leftUpX; std::string leftUpY; std::string score; + std::string taskId; std::string targetPicUrl; std::string rightBottomX; std::string rightBottomY; @@ -46,6 +51,7 @@ namespace AlibabaCloud std::string monitorPicUrl; std::string shotTime; std::string picUrl; + ExtendInfo extendInfo; }; std::string maxId; std::vector records; diff --git a/vcs/include/alibabacloud/vcs/model/ListDeviceGroupsResult.h b/vcs/include/alibabacloud/vcs/model/ListDeviceGroupsResult.h index 9e6dc7885..0ee06f12d 100644 --- a/vcs/include/alibabacloud/vcs/model/ListDeviceGroupsResult.h +++ b/vcs/include/alibabacloud/vcs/model/ListDeviceGroupsResult.h @@ -36,12 +36,16 @@ namespace AlibabaCloud { struct ListItem { - std::string codingFormat; std::string installAddress; + std::string deviceSn; + std::string deviceComputeStatus; + std::string deviceStreamStatus; + std::string deviceGroup; + std::string codingFormat; std::string regionName; std::string dataSourceType; - std::string deviceGroup; std::string deviceCode; + std::string deviceStatus; std::string regionId; std::string bitRate; std::string resolvingPower; diff --git a/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsRequest.h b/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsRequest.h new file mode 100644 index 000000000..0a28b0319 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsRequest.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_VCS_MODEL_LISTPERSONTRACEDETAILSREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTPERSONTRACEDETAILSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListPersonTraceDetailsRequest : public RpcServiceRequest + { + + public: + ListPersonTraceDetailsRequest(); + ~ListPersonTraceDetailsRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getEndTime()const; + void setEndTime(const std::string& endTime); + std::string getStartTime()const; + void setStartTime(const std::string& startTime); + long getPageNumber()const; + void setPageNumber(long pageNumber); + std::string getSubId()const; + void setSubId(const std::string& subId); + long getPageSize()const; + void setPageSize(long pageSize); + std::string getPersonId()const; + void setPersonId(const std::string& personId); + std::string getIsvId()const; + void setIsvId(const std::string& isvId); + + private: + std::string corpId_; + std::string endTime_; + std::string startTime_; + long pageNumber_; + std::string subId_; + long pageSize_; + std::string personId_; + std::string isvId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONTRACEDETAILSREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsResult.h b/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsResult.h new file mode 100644 index 000000000..f0134b5b4 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListPersonTraceDetailsResult.h @@ -0,0 +1,74 @@ +/* + * 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_LISTPERSONTRACEDETAILSRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTPERSONTRACEDETAILSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListPersonTraceDetailsResult : public ServiceResult + { + public: + struct Datas + { + std::string picUrlPath; + std::string corpId; + long pageSize; + std::string rightBottomX; + std::string targetPicUrlPath; + std::string rightBottomY; + std::string leftTopY; + std::string leftTopX; + long totalCount; + std::string subId; + long totalPage; + std::string personId; + long pageNumber; + std::string shotTime; + std::string isvId; + std::string dataSourceId; + }; + + + ListPersonTraceDetailsResult(); + explicit ListPersonTraceDetailsResult(const std::string &payload); + ~ListPersonTraceDetailsResult(); + std::string getMessage()const; + std::vector getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::vector data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONTRACEDETAILSRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/SearchObjectResult.h b/vcs/include/alibabacloud/vcs/model/SearchObjectResult.h index 0f1e44aed..1d6438731 100644 --- a/vcs/include/alibabacloud/vcs/model/SearchObjectResult.h +++ b/vcs/include/alibabacloud/vcs/model/SearchObjectResult.h @@ -32,32 +32,29 @@ namespace AlibabaCloud class ALIBABACLOUD_VCS_EXPORT SearchObjectResult : public ServiceResult { public: - struct DataItem + struct Data { struct RecordsItem { std::string targetImageUrl; std::string deviceID; std::string sourceID; - std::string passTime; std::string sourceImagePath; std::string sourceImageUrl; int leftTopY; std::string compareResult; int leftTopX; float score; - std::string bodyShotTime; int rightBtmY; + long shotTime; int rightBtmX; - long faceShotTime; std::string targetImagePath; - std::string motorShotTime; }; int totalCount; int pageSize; int totalPage; int pageNumber; - std::vector records; + std::vector records; }; @@ -65,14 +62,14 @@ namespace AlibabaCloud explicit SearchObjectResult(const std::string &payload); ~SearchObjectResult(); std::string getMessage()const; - std::vector getData()const; + Data getData()const; std::string getCode()const; protected: void parse(const std::string &payload); private: std::string message_; - std::vector data_; + Data data_; std::string code_; }; diff --git a/vcs/src/VcsClient.cc b/vcs/src/VcsClient.cc index 3264903bc..52400e1b6 100644 --- a/vcs/src/VcsClient.cc +++ b/vcs/src/VcsClient.cc @@ -31,21 +31,21 @@ VcsClient::VcsClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::VcsClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::VcsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VcsClient::~VcsClient() @@ -1203,6 +1203,42 @@ VcsClient::GetInventoryOutcomeCallable VcsClient::getInventoryCallable(const Get return task->get_future(); } +VcsClient::GetMonitorListOutcome VcsClient::getMonitorList(const GetMonitorListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMonitorListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMonitorListOutcome(GetMonitorListResult(outcome.result())); + else + return GetMonitorListOutcome(outcome.error()); +} + +void VcsClient::getMonitorListAsync(const GetMonitorListRequest& request, const GetMonitorListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMonitorList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::GetMonitorListOutcomeCallable VcsClient::getMonitorListCallable(const GetMonitorListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMonitorList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VcsClient::GetMonitorResultOutcome VcsClient::getMonitorResult(const GetMonitorResultRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1995,6 +2031,42 @@ VcsClient::ListPersonTraceOutcomeCallable VcsClient::listPersonTraceCallable(con return task->get_future(); } +VcsClient::ListPersonTraceDetailsOutcome VcsClient::listPersonTraceDetails(const ListPersonTraceDetailsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListPersonTraceDetailsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListPersonTraceDetailsOutcome(ListPersonTraceDetailsResult(outcome.result())); + else + return ListPersonTraceDetailsOutcome(outcome.error()); +} + +void VcsClient::listPersonTraceDetailsAsync(const ListPersonTraceDetailsRequest& request, const ListPersonTraceDetailsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listPersonTraceDetails(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::ListPersonTraceDetailsOutcomeCallable VcsClient::listPersonTraceDetailsCallable(const ListPersonTraceDetailsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listPersonTraceDetails(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VcsClient::ListPersonVisitCountOutcome VcsClient::listPersonVisitCount(const ListPersonVisitCountRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/vcs/src/model/GetMonitorListRequest.cc b/vcs/src/model/GetMonitorListRequest.cc new file mode 100644 index 000000000..6b02dae7a --- /dev/null +++ b/vcs/src/model/GetMonitorListRequest.cc @@ -0,0 +1,62 @@ +/* + * 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 + +using AlibabaCloud::Vcs::Model::GetMonitorListRequest; + +GetMonitorListRequest::GetMonitorListRequest() : + RpcServiceRequest("vcs", "2020-05-15", "GetMonitorList") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMonitorListRequest::~GetMonitorListRequest() +{} + +std::string GetMonitorListRequest::getCorpId()const +{ + return corpId_; +} + +void GetMonitorListRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +int GetMonitorListRequest::getPageNo()const +{ + return pageNo_; +} + +void GetMonitorListRequest::setPageNo(int pageNo) +{ + pageNo_ = pageNo; + setBodyParameter("PageNo", std::to_string(pageNo)); +} + +int GetMonitorListRequest::getPageSize()const +{ + return pageSize_; +} + +void GetMonitorListRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/vcs/src/model/GetMonitorListResult.cc b/vcs/src/model/GetMonitorListResult.cc new file mode 100644 index 000000000..a63893d42 --- /dev/null +++ b/vcs/src/model/GetMonitorListResult.cc @@ -0,0 +1,108 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +GetMonitorListResult::GetMonitorListResult() : + ServiceResult() +{} + +GetMonitorListResult::GetMonitorListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMonitorListResult::~GetMonitorListResult() +{} + +void GetMonitorListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["PageNo"].isNull()) + data_.pageNo = std::stoi(dataNode["PageNo"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["Record"]; + for (auto dataNodeRecordsRecord : allRecordsNode) + { + Data::Record recordObject; + if(!dataNodeRecordsRecord["TaskId"].isNull()) + recordObject.taskId = dataNodeRecordsRecord["TaskId"].asString(); + if(!dataNodeRecordsRecord["Status"].isNull()) + recordObject.status = dataNodeRecordsRecord["Status"].asString(); + if(!dataNodeRecordsRecord["MonitorType"].isNull()) + recordObject.monitorType = dataNodeRecordsRecord["MonitorType"].asString(); + if(!dataNodeRecordsRecord["RuleName"].isNull()) + recordObject.ruleName = dataNodeRecordsRecord["RuleName"].asString(); + if(!dataNodeRecordsRecord["AlgorithmVendor"].isNull()) + recordObject.algorithmVendor = dataNodeRecordsRecord["AlgorithmVendor"].asString(); + if(!dataNodeRecordsRecord["CreateDate"].isNull()) + recordObject.createDate = dataNodeRecordsRecord["CreateDate"].asString(); + if(!dataNodeRecordsRecord["ModifiedDate"].isNull()) + recordObject.modifiedDate = dataNodeRecordsRecord["ModifiedDate"].asString(); + if(!dataNodeRecordsRecord["DeviceList"].isNull()) + recordObject.deviceList = dataNodeRecordsRecord["DeviceList"].asString(); + if(!dataNodeRecordsRecord["Attributes"].isNull()) + recordObject.attributes = dataNodeRecordsRecord["Attributes"].asString(); + if(!dataNodeRecordsRecord["RuleExpression"].isNull()) + recordObject.ruleExpression = dataNodeRecordsRecord["RuleExpression"].asString(); + if(!dataNodeRecordsRecord["NotifierType"].isNull()) + recordObject.notifierType = dataNodeRecordsRecord["NotifierType"].asString(); + if(!dataNodeRecordsRecord["NotifierExtra"].isNull()) + recordObject.notifierExtra = dataNodeRecordsRecord["NotifierExtra"].asString(); + if(!dataNodeRecordsRecord["Description"].isNull()) + recordObject.description = dataNodeRecordsRecord["Description"].asString(); + if(!dataNodeRecordsRecord["Expression"].isNull()) + recordObject.expression = dataNodeRecordsRecord["Expression"].asString(); + if(!dataNodeRecordsRecord["ImageMatch"].isNull()) + recordObject.imageMatch = dataNodeRecordsRecord["ImageMatch"].asString(); + data_.records.push_back(recordObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetMonitorListResult::getMessage()const +{ + return message_; +} + +GetMonitorListResult::Data GetMonitorListResult::getData()const +{ + return data_; +} + +std::string GetMonitorListResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/GetMonitorResultResult.cc b/vcs/src/model/GetMonitorResultResult.cc index 6331a2bab..410262939 100644 --- a/vcs/src/model/GetMonitorResultResult.cc +++ b/vcs/src/model/GetMonitorResultResult.cc @@ -66,6 +66,11 @@ void GetMonitorResultResult::parse(const std::string &payload) recordsItemObject.monitorPicUrl = dataNodeRecordsRecordsItem["MonitorPicUrl"].asString(); if(!dataNodeRecordsRecordsItem["TargetPicUrl"].isNull()) recordsItemObject.targetPicUrl = dataNodeRecordsRecordsItem["TargetPicUrl"].asString(); + if(!dataNodeRecordsRecordsItem["TaskId"].isNull()) + recordsItemObject.taskId = dataNodeRecordsRecordsItem["TaskId"].asString(); + auto extendInfoNode = value["ExtendInfo"]; + if(!extendInfoNode["PlateNo"].isNull()) + recordsItemObject.extendInfo.plateNo = extendInfoNode["PlateNo"].asString(); data_.records.push_back(recordsItemObject); } if(!value["Code"].isNull()) diff --git a/vcs/src/model/ListDeviceGroupsResult.cc b/vcs/src/model/ListDeviceGroupsResult.cc index 02e9fc822..d00d902d4 100644 --- a/vcs/src/model/ListDeviceGroupsResult.cc +++ b/vcs/src/model/ListDeviceGroupsResult.cc @@ -69,6 +69,14 @@ void ListDeviceGroupsResult::parse(const std::string &payload) listObject.regionId = allDataNodeListListItem["RegionId"].asString(); if(!allDataNodeListListItem["InstallAddress"].isNull()) listObject.installAddress = allDataNodeListListItem["InstallAddress"].asString(); + if(!allDataNodeListListItem["DeviceSn"].isNull()) + listObject.deviceSn = allDataNodeListListItem["DeviceSn"].asString(); + if(!allDataNodeListListItem["DeviceStatus"].isNull()) + listObject.deviceStatus = allDataNodeListListItem["DeviceStatus"].asString(); + if(!allDataNodeListListItem["DeviceStreamStatus"].isNull()) + listObject.deviceStreamStatus = allDataNodeListListItem["DeviceStreamStatus"].asString(); + if(!allDataNodeListListItem["DeviceComputeStatus"].isNull()) + listObject.deviceComputeStatus = allDataNodeListListItem["DeviceComputeStatus"].asString(); dataObject.list.push_back(listObject); } data_.push_back(dataObject); diff --git a/vcs/src/model/ListPersonTraceDetailsRequest.cc b/vcs/src/model/ListPersonTraceDetailsRequest.cc new file mode 100644 index 000000000..8082478aa --- /dev/null +++ b/vcs/src/model/ListPersonTraceDetailsRequest.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 + +using AlibabaCloud::Vcs::Model::ListPersonTraceDetailsRequest; + +ListPersonTraceDetailsRequest::ListPersonTraceDetailsRequest() : + RpcServiceRequest("vcs", "2020-05-15", "ListPersonTraceDetails") +{ + setMethod(HttpRequest::Method::Post); +} + +ListPersonTraceDetailsRequest::~ListPersonTraceDetailsRequest() +{} + +std::string ListPersonTraceDetailsRequest::getCorpId()const +{ + return corpId_; +} + +void ListPersonTraceDetailsRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string ListPersonTraceDetailsRequest::getEndTime()const +{ + return endTime_; +} + +void ListPersonTraceDetailsRequest::setEndTime(const std::string& endTime) +{ + endTime_ = endTime; + setBodyParameter("EndTime", endTime); +} + +std::string ListPersonTraceDetailsRequest::getStartTime()const +{ + return startTime_; +} + +void ListPersonTraceDetailsRequest::setStartTime(const std::string& startTime) +{ + startTime_ = startTime; + setBodyParameter("StartTime", startTime); +} + +long ListPersonTraceDetailsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListPersonTraceDetailsRequest::setPageNumber(long pageNumber) +{ + pageNumber_ = pageNumber; + setBodyParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string ListPersonTraceDetailsRequest::getSubId()const +{ + return subId_; +} + +void ListPersonTraceDetailsRequest::setSubId(const std::string& subId) +{ + subId_ = subId; + setBodyParameter("SubId", subId); +} + +long ListPersonTraceDetailsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListPersonTraceDetailsRequest::setPageSize(long pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListPersonTraceDetailsRequest::getPersonId()const +{ + return personId_; +} + +void ListPersonTraceDetailsRequest::setPersonId(const std::string& personId) +{ + personId_ = personId; + setBodyParameter("PersonId", personId); +} + +std::string ListPersonTraceDetailsRequest::getIsvId()const +{ + return isvId_; +} + +void ListPersonTraceDetailsRequest::setIsvId(const std::string& isvId) +{ + isvId_ = isvId; + setBodyParameter("IsvId", isvId); +} + diff --git a/vcs/src/model/ListPersonTraceDetailsResult.cc b/vcs/src/model/ListPersonTraceDetailsResult.cc new file mode 100644 index 000000000..840a4ad72 --- /dev/null +++ b/vcs/src/model/ListPersonTraceDetailsResult.cc @@ -0,0 +1,101 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +ListPersonTraceDetailsResult::ListPersonTraceDetailsResult() : + ServiceResult() +{} + +ListPersonTraceDetailsResult::ListPersonTraceDetailsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListPersonTraceDetailsResult::~ListPersonTraceDetailsResult() +{} + +void ListPersonTraceDetailsResult::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["PageNumber"].isNull()) + dataObject.pageNumber = std::stol(valueDataDatas["PageNumber"].asString()); + if(!valueDataDatas["PageSize"].isNull()) + dataObject.pageSize = std::stol(valueDataDatas["PageSize"].asString()); + if(!valueDataDatas["TotalCount"].isNull()) + dataObject.totalCount = std::stol(valueDataDatas["TotalCount"].asString()); + if(!valueDataDatas["TotalPage"].isNull()) + dataObject.totalPage = std::stol(valueDataDatas["TotalPage"].asString()); + if(!valueDataDatas["TargetPicUrlPath"].isNull()) + dataObject.targetPicUrlPath = valueDataDatas["TargetPicUrlPath"].asString(); + if(!valueDataDatas["DataSourceId"].isNull()) + dataObject.dataSourceId = valueDataDatas["DataSourceId"].asString(); + if(!valueDataDatas["PersonId"].isNull()) + dataObject.personId = valueDataDatas["PersonId"].asString(); + if(!valueDataDatas["PicUrlPath"].isNull()) + dataObject.picUrlPath = valueDataDatas["PicUrlPath"].asString(); + if(!valueDataDatas["IsvId"].isNull()) + dataObject.isvId = valueDataDatas["IsvId"].asString(); + if(!valueDataDatas["RightBottomY"].isNull()) + dataObject.rightBottomY = valueDataDatas["RightBottomY"].asString(); + if(!valueDataDatas["RightBottomX"].isNull()) + dataObject.rightBottomX = valueDataDatas["RightBottomX"].asString(); + if(!valueDataDatas["ShotTime"].isNull()) + dataObject.shotTime = valueDataDatas["ShotTime"].asString(); + if(!valueDataDatas["CorpId"].isNull()) + dataObject.corpId = valueDataDatas["CorpId"].asString(); + if(!valueDataDatas["SubId"].isNull()) + dataObject.subId = valueDataDatas["SubId"].asString(); + if(!valueDataDatas["LeftTopY"].isNull()) + dataObject.leftTopY = valueDataDatas["LeftTopY"].asString(); + if(!valueDataDatas["LeftTopX"].isNull()) + dataObject.leftTopX = valueDataDatas["LeftTopX"].asString(); + data_.push_back(dataObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListPersonTraceDetailsResult::getMessage()const +{ + return message_; +} + +std::vector ListPersonTraceDetailsResult::getData()const +{ + return data_; +} + +std::string ListPersonTraceDetailsResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/SearchObjectResult.cc b/vcs/src/model/SearchObjectResult.cc index c651ec699..94376af49 100644 --- a/vcs/src/model/SearchObjectResult.cc +++ b/vcs/src/model/SearchObjectResult.cc @@ -39,57 +39,46 @@ void SearchObjectResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allDataNode = value["Data"]["DataItem"]; - for (auto valueDataDataItem : allDataNode) + auto dataNode = value["Data"]; + if(!dataNode["PageNumber"].isNull()) + data_.pageNumber = std::stoi(dataNode["PageNumber"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["RecordsItem"]; + for (auto dataNodeRecordsRecordsItem : allRecordsNode) { - DataItem dataObject; - if(!valueDataDataItem["PageNumber"].isNull()) - dataObject.pageNumber = std::stoi(valueDataDataItem["PageNumber"].asString()); - if(!valueDataDataItem["PageSize"].isNull()) - dataObject.pageSize = std::stoi(valueDataDataItem["PageSize"].asString()); - if(!valueDataDataItem["TotalCount"].isNull()) - dataObject.totalCount = std::stoi(valueDataDataItem["TotalCount"].asString()); - if(!valueDataDataItem["TotalPage"].isNull()) - dataObject.totalPage = std::stoi(valueDataDataItem["TotalPage"].asString()); - auto allRecordsNode = allDataNode["Records"]["RecordsItem"]; - for (auto allDataNodeRecordsRecordsItem : allRecordsNode) - { - DataItem::RecordsItem recordsObject; - if(!allDataNodeRecordsRecordsItem["BodyShotTime"].isNull()) - recordsObject.bodyShotTime = allDataNodeRecordsRecordsItem["BodyShotTime"].asString(); - if(!allDataNodeRecordsRecordsItem["CompareResult"].isNull()) - recordsObject.compareResult = allDataNodeRecordsRecordsItem["CompareResult"].asString(); - if(!allDataNodeRecordsRecordsItem["DeviceID"].isNull()) - recordsObject.deviceID = allDataNodeRecordsRecordsItem["DeviceID"].asString(); - if(!allDataNodeRecordsRecordsItem["FaceShotTime"].isNull()) - recordsObject.faceShotTime = std::stol(allDataNodeRecordsRecordsItem["FaceShotTime"].asString()); - if(!allDataNodeRecordsRecordsItem["LeftTopX"].isNull()) - recordsObject.leftTopX = std::stoi(allDataNodeRecordsRecordsItem["LeftTopX"].asString()); - if(!allDataNodeRecordsRecordsItem["LeftTopY"].isNull()) - recordsObject.leftTopY = std::stoi(allDataNodeRecordsRecordsItem["LeftTopY"].asString()); - if(!allDataNodeRecordsRecordsItem["MotorShotTime"].isNull()) - recordsObject.motorShotTime = allDataNodeRecordsRecordsItem["MotorShotTime"].asString(); - if(!allDataNodeRecordsRecordsItem["PassTime"].isNull()) - recordsObject.passTime = allDataNodeRecordsRecordsItem["PassTime"].asString(); - if(!allDataNodeRecordsRecordsItem["RightBtmX"].isNull()) - recordsObject.rightBtmX = std::stoi(allDataNodeRecordsRecordsItem["RightBtmX"].asString()); - if(!allDataNodeRecordsRecordsItem["RightBtmY"].isNull()) - recordsObject.rightBtmY = std::stoi(allDataNodeRecordsRecordsItem["RightBtmY"].asString()); - if(!allDataNodeRecordsRecordsItem["Score"].isNull()) - recordsObject.score = std::stof(allDataNodeRecordsRecordsItem["Score"].asString()); - if(!allDataNodeRecordsRecordsItem["SourceID"].isNull()) - recordsObject.sourceID = allDataNodeRecordsRecordsItem["SourceID"].asString(); - if(!allDataNodeRecordsRecordsItem["SourceImagePath"].isNull()) - recordsObject.sourceImagePath = allDataNodeRecordsRecordsItem["SourceImagePath"].asString(); - if(!allDataNodeRecordsRecordsItem["SourceImageUrl"].isNull()) - recordsObject.sourceImageUrl = allDataNodeRecordsRecordsItem["SourceImageUrl"].asString(); - if(!allDataNodeRecordsRecordsItem["TargetImagePath"].isNull()) - recordsObject.targetImagePath = allDataNodeRecordsRecordsItem["TargetImagePath"].asString(); - if(!allDataNodeRecordsRecordsItem["TargetImageUrl"].isNull()) - recordsObject.targetImageUrl = allDataNodeRecordsRecordsItem["TargetImageUrl"].asString(); - dataObject.records.push_back(recordsObject); - } - data_.push_back(dataObject); + Data::RecordsItem recordsItemObject; + if(!dataNodeRecordsRecordsItem["CompareResult"].isNull()) + recordsItemObject.compareResult = dataNodeRecordsRecordsItem["CompareResult"].asString(); + if(!dataNodeRecordsRecordsItem["DeviceID"].isNull()) + recordsItemObject.deviceID = dataNodeRecordsRecordsItem["DeviceID"].asString(); + if(!dataNodeRecordsRecordsItem["ShotTime"].isNull()) + recordsItemObject.shotTime = std::stol(dataNodeRecordsRecordsItem["ShotTime"].asString()); + if(!dataNodeRecordsRecordsItem["LeftTopX"].isNull()) + recordsItemObject.leftTopX = std::stoi(dataNodeRecordsRecordsItem["LeftTopX"].asString()); + if(!dataNodeRecordsRecordsItem["LeftTopY"].isNull()) + recordsItemObject.leftTopY = std::stoi(dataNodeRecordsRecordsItem["LeftTopY"].asString()); + if(!dataNodeRecordsRecordsItem["RightBtmX"].isNull()) + recordsItemObject.rightBtmX = std::stoi(dataNodeRecordsRecordsItem["RightBtmX"].asString()); + if(!dataNodeRecordsRecordsItem["RightBtmY"].isNull()) + recordsItemObject.rightBtmY = std::stoi(dataNodeRecordsRecordsItem["RightBtmY"].asString()); + if(!dataNodeRecordsRecordsItem["Score"].isNull()) + recordsItemObject.score = std::stof(dataNodeRecordsRecordsItem["Score"].asString()); + if(!dataNodeRecordsRecordsItem["SourceID"].isNull()) + recordsItemObject.sourceID = dataNodeRecordsRecordsItem["SourceID"].asString(); + if(!dataNodeRecordsRecordsItem["SourceImagePath"].isNull()) + recordsItemObject.sourceImagePath = dataNodeRecordsRecordsItem["SourceImagePath"].asString(); + if(!dataNodeRecordsRecordsItem["SourceImageUrl"].isNull()) + recordsItemObject.sourceImageUrl = dataNodeRecordsRecordsItem["SourceImageUrl"].asString(); + if(!dataNodeRecordsRecordsItem["TargetImagePath"].isNull()) + recordsItemObject.targetImagePath = dataNodeRecordsRecordsItem["TargetImagePath"].asString(); + if(!dataNodeRecordsRecordsItem["TargetImageUrl"].isNull()) + recordsItemObject.targetImageUrl = dataNodeRecordsRecordsItem["TargetImageUrl"].asString(); + data_.records.push_back(recordsItemObject); } if(!value["Code"].isNull()) code_ = value["Code"].asString(); @@ -103,7 +92,7 @@ std::string SearchObjectResult::getMessage()const return message_; } -std::vector SearchObjectResult::getData()const +SearchObjectResult::Data SearchObjectResult::getData()const { return data_; }