diff --git a/CHANGELOG b/CHANGELOG index cde9c470a..9cc46c641 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-09-14 Version: patch +- Support corp name search. + 2020-09-11 Version: patch - Support execute database script via open api. diff --git a/vcs/CMakeLists.txt b/vcs/CMakeLists.txt index 068dca4c4..fbaff3879 100644 --- a/vcs/CMakeLists.txt +++ b/vcs/CMakeLists.txt @@ -149,6 +149,8 @@ set(vcs_public_header_model include/alibabacloud/vcs/model/SearchBodyResult.h include/alibabacloud/vcs/model/SearchFaceRequest.h include/alibabacloud/vcs/model/SearchFaceResult.h + include/alibabacloud/vcs/model/SearchObjectRequest.h + include/alibabacloud/vcs/model/SearchObjectResult.h include/alibabacloud/vcs/model/StopMonitorRequest.h include/alibabacloud/vcs/model/StopMonitorResult.h include/alibabacloud/vcs/model/SyncDeviceTimeRequest.h @@ -308,6 +310,8 @@ set(vcs_src src/model/SearchBodyResult.cc src/model/SearchFaceRequest.cc src/model/SearchFaceResult.cc + src/model/SearchObjectRequest.cc + src/model/SearchObjectResult.cc src/model/StopMonitorRequest.cc src/model/StopMonitorResult.cc src/model/SyncDeviceTimeRequest.cc diff --git a/vcs/include/alibabacloud/vcs/VcsClient.h b/vcs/include/alibabacloud/vcs/VcsClient.h index fca895a62..63a1c2420 100644 --- a/vcs/include/alibabacloud/vcs/VcsClient.h +++ b/vcs/include/alibabacloud/vcs/VcsClient.h @@ -150,6 +150,8 @@ #include "model/SearchBodyResult.h" #include "model/SearchFaceRequest.h" #include "model/SearchFaceResult.h" +#include "model/SearchObjectRequest.h" +#include "model/SearchObjectResult.h" #include "model/StopMonitorRequest.h" #include "model/StopMonitorResult.h" #include "model/SyncDeviceTimeRequest.h" @@ -379,6 +381,9 @@ namespace AlibabaCloud typedef Outcome SearchFaceOutcome; typedef std::future SearchFaceOutcomeCallable; typedef std::function&)> SearchFaceAsyncHandler; + typedef Outcome SearchObjectOutcome; + typedef std::future SearchObjectOutcomeCallable; + typedef std::function&)> SearchObjectAsyncHandler; typedef Outcome StopMonitorOutcome; typedef std::future StopMonitorOutcomeCallable; typedef std::function&)> StopMonitorAsyncHandler; @@ -618,6 +623,9 @@ namespace AlibabaCloud SearchFaceOutcome searchFace(const Model::SearchFaceRequest &request)const; void searchFaceAsync(const Model::SearchFaceRequest& request, const SearchFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SearchFaceOutcomeCallable searchFaceCallable(const Model::SearchFaceRequest& request) const; + SearchObjectOutcome searchObject(const Model::SearchObjectRequest &request)const; + void searchObjectAsync(const Model::SearchObjectRequest& request, const SearchObjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SearchObjectOutcomeCallable searchObjectCallable(const Model::SearchObjectRequest& request) const; StopMonitorOutcome stopMonitor(const Model::StopMonitorRequest &request)const; void stopMonitorAsync(const Model::StopMonitorRequest& request, const StopMonitorAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StopMonitorOutcomeCallable stopMonitorCallable(const Model::StopMonitorRequest& request) const; diff --git a/vcs/include/alibabacloud/vcs/model/GetFaceModelResultResult.h b/vcs/include/alibabacloud/vcs/model/GetFaceModelResultResult.h index eaf2614bc..02471c777 100644 --- a/vcs/include/alibabacloud/vcs/model/GetFaceModelResultResult.h +++ b/vcs/include/alibabacloud/vcs/model/GetFaceModelResultResult.h @@ -37,23 +37,37 @@ namespace AlibabaCloud struct RecordsItem { std::string mustacheStyle; - int genderCode; - int respiratorColor; - int ethicCode; float rightBottomX; - int ageLowerLimit; std::string faceStyle; float rightBottomY; std::vector featureData; - float leftTopY; + std::string capColorReliability; int capStyle; + std::string respiratorColorReliability; + int skinColor; + std::string ethicCodeReliability; + std::string genderCodeReliability; + int hairStyle; + std::string glassColorReliability; + int genderCode; + int respiratorColor; + std::string skinColorReliability; + int ethicCode; + std::string mustacheStyleReliability; + int ageLowerLimit; + std::string capStyleReliability; + std::string faceStyleReliability; + float leftTopY; float leftTopX; int hairColor; - int skinColor; + std::string glassStyleReliability; int ageUpLimit; int glassStyle; + std::string ageUpLimitReliability; + std::string hairStyleReliability; + std::string ageLowerLimitReliability; + std::string hairColorReliability; int glassColor; - int hairStyle; int capColor; }; std::vector records; diff --git a/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h b/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h index 8dfae7c2d..b3acce834 100644 --- a/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h +++ b/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h @@ -39,10 +39,13 @@ namespace AlibabaCloud void setPageNumber(int pageNumber); int getPageSize()const; void setPageSize(int pageSize); + std::string getCorpName()const; + void setCorpName(const std::string& corpName); private: int pageNumber_; int pageSize_; + std::string corpName_; }; } diff --git a/vcs/include/alibabacloud/vcs/model/SearchObjectRequest.h b/vcs/include/alibabacloud/vcs/model/SearchObjectRequest.h new file mode 100644 index 000000000..9aefa7a3d --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/SearchObjectRequest.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_SEARCHOBJECTREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT SearchObjectRequest : public RpcServiceRequest + { + + public: + SearchObjectRequest(); + ~SearchObjectRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + long getStartTime()const; + void setStartTime(long startTime); + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getPicContent()const; + void setPicContent(const std::string& picContent); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getObjectType()const; + void setObjectType(const std::string& objectType); + std::string getAlgorithmType()const; + void setAlgorithmType(const std::string& algorithmType); + long getEndTime()const; + void setEndTime(long endTime); + std::map getDeviceList()const; + void setDeviceList(const std::map& deviceList); + std::string getPicUrl()const; + void setPicUrl(const std::string& picUrl); + std::string getImagePath()const; + void setImagePath(const std::string& imagePath); + std::string getConditions()const; + void setConditions(const std::string& conditions); + + private: + std::string corpId_; + long startTime_; + int pageNumber_; + std::string picContent_; + int pageSize_; + std::string objectType_; + std::string algorithmType_; + long endTime_; + std::map deviceList_; + std::string picUrl_; + std::string imagePath_; + std::string conditions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTREQUEST_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 new file mode 100644 index 000000000..0f1e44aed --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/SearchObjectResult.h @@ -0,0 +1,82 @@ +/* + * 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_SEARCHOBJECTRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT SearchObjectResult : public ServiceResult + { + public: + struct DataItem + { + 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; + int rightBtmX; + long faceShotTime; + std::string targetImagePath; + std::string motorShotTime; + }; + int totalCount; + int pageSize; + int totalPage; + int pageNumber; + std::vector records; + }; + + + SearchObjectResult(); + explicit SearchObjectResult(const std::string &payload); + ~SearchObjectResult(); + 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_SEARCHOBJECTRESULT_H_ \ No newline at end of file diff --git a/vcs/src/VcsClient.cc b/vcs/src/VcsClient.cc index c0bb302f8..2eef419ce 100644 --- a/vcs/src/VcsClient.cc +++ b/vcs/src/VcsClient.cc @@ -2355,6 +2355,42 @@ VcsClient::SearchFaceOutcomeCallable VcsClient::searchFaceCallable(const SearchF return task->get_future(); } +VcsClient::SearchObjectOutcome VcsClient::searchObject(const SearchObjectRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SearchObjectOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SearchObjectOutcome(SearchObjectResult(outcome.result())); + else + return SearchObjectOutcome(outcome.error()); +} + +void VcsClient::searchObjectAsync(const SearchObjectRequest& request, const SearchObjectAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, searchObject(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::SearchObjectOutcomeCallable VcsClient::searchObjectCallable(const SearchObjectRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->searchObject(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VcsClient::StopMonitorOutcome VcsClient::stopMonitor(const StopMonitorRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/vcs/src/model/GetFaceModelResultResult.cc b/vcs/src/model/GetFaceModelResultResult.cc index 8f12695a0..86feae3d4 100644 --- a/vcs/src/model/GetFaceModelResultResult.cc +++ b/vcs/src/model/GetFaceModelResultResult.cc @@ -80,6 +80,34 @@ void GetFaceModelResultResult::parse(const std::string &payload) recordsItemObject.glassColor = std::stoi(dataNodeRecordsRecordsItem["GlassColor"].asString()); if(!dataNodeRecordsRecordsItem["CapColor"].isNull()) recordsItemObject.capColor = std::stoi(dataNodeRecordsRecordsItem["CapColor"].asString()); + if(!dataNodeRecordsRecordsItem["CapColorReliability"].isNull()) + recordsItemObject.capColorReliability = dataNodeRecordsRecordsItem["CapColorReliability"].asString(); + if(!dataNodeRecordsRecordsItem["RespiratorColorReliability"].isNull()) + recordsItemObject.respiratorColorReliability = dataNodeRecordsRecordsItem["RespiratorColorReliability"].asString(); + if(!dataNodeRecordsRecordsItem["EthicCodeReliability"].isNull()) + recordsItemObject.ethicCodeReliability = dataNodeRecordsRecordsItem["EthicCodeReliability"].asString(); + if(!dataNodeRecordsRecordsItem["GenderCodeReliability"].isNull()) + recordsItemObject.genderCodeReliability = dataNodeRecordsRecordsItem["GenderCodeReliability"].asString(); + if(!dataNodeRecordsRecordsItem["GlassColorReliability"].isNull()) + recordsItemObject.glassColorReliability = dataNodeRecordsRecordsItem["GlassColorReliability"].asString(); + if(!dataNodeRecordsRecordsItem["SkinColorReliability"].isNull()) + recordsItemObject.skinColorReliability = dataNodeRecordsRecordsItem["SkinColorReliability"].asString(); + if(!dataNodeRecordsRecordsItem["MustacheStyleReliability"].isNull()) + recordsItemObject.mustacheStyleReliability = dataNodeRecordsRecordsItem["MustacheStyleReliability"].asString(); + if(!dataNodeRecordsRecordsItem["CapStyleReliability"].isNull()) + recordsItemObject.capStyleReliability = dataNodeRecordsRecordsItem["CapStyleReliability"].asString(); + if(!dataNodeRecordsRecordsItem["FaceStyleReliability"].isNull()) + recordsItemObject.faceStyleReliability = dataNodeRecordsRecordsItem["FaceStyleReliability"].asString(); + if(!dataNodeRecordsRecordsItem["GlassStyleReliability"].isNull()) + recordsItemObject.glassStyleReliability = dataNodeRecordsRecordsItem["GlassStyleReliability"].asString(); + if(!dataNodeRecordsRecordsItem["AgeUpLimitReliability"].isNull()) + recordsItemObject.ageUpLimitReliability = dataNodeRecordsRecordsItem["AgeUpLimitReliability"].asString(); + if(!dataNodeRecordsRecordsItem["HairStyleReliability"].isNull()) + recordsItemObject.hairStyleReliability = dataNodeRecordsRecordsItem["HairStyleReliability"].asString(); + if(!dataNodeRecordsRecordsItem["AgeLowerLimitReliability"].isNull()) + recordsItemObject.ageLowerLimitReliability = dataNodeRecordsRecordsItem["AgeLowerLimitReliability"].asString(); + if(!dataNodeRecordsRecordsItem["HairColorReliability"].isNull()) + recordsItemObject.hairColorReliability = dataNodeRecordsRecordsItem["HairColorReliability"].asString(); auto allFeatureData = value["FeatureData"]["FeatureData"]; for (auto value : allFeatureData) recordsItemObject.featureData.push_back(value.asString()); diff --git a/vcs/src/model/ListCorpsRequest.cc b/vcs/src/model/ListCorpsRequest.cc index e76bfd132..c5db6ffac 100644 --- a/vcs/src/model/ListCorpsRequest.cc +++ b/vcs/src/model/ListCorpsRequest.cc @@ -49,3 +49,14 @@ void ListCorpsRequest::setPageSize(int pageSize) setBodyParameter("PageSize", std::to_string(pageSize)); } +std::string ListCorpsRequest::getCorpName()const +{ + return corpName_; +} + +void ListCorpsRequest::setCorpName(const std::string& corpName) +{ + corpName_ = corpName; + setBodyParameter("CorpName", corpName); +} + diff --git a/vcs/src/model/SearchObjectRequest.cc b/vcs/src/model/SearchObjectRequest.cc new file mode 100644 index 000000000..ccedc0ee5 --- /dev/null +++ b/vcs/src/model/SearchObjectRequest.cc @@ -0,0 +1,161 @@ +/* + * 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::SearchObjectRequest; + +SearchObjectRequest::SearchObjectRequest() : + RpcServiceRequest("vcs", "2020-05-15", "SearchObject") +{ + setMethod(HttpRequest::Method::Post); +} + +SearchObjectRequest::~SearchObjectRequest() +{} + +std::string SearchObjectRequest::getCorpId()const +{ + return corpId_; +} + +void SearchObjectRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +long SearchObjectRequest::getStartTime()const +{ + return startTime_; +} + +void SearchObjectRequest::setStartTime(long startTime) +{ + startTime_ = startTime; + setBodyParameter("StartTime", std::to_string(startTime)); +} + +int SearchObjectRequest::getPageNumber()const +{ + return pageNumber_; +} + +void SearchObjectRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setBodyParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string SearchObjectRequest::getPicContent()const +{ + return picContent_; +} + +void SearchObjectRequest::setPicContent(const std::string& picContent) +{ + picContent_ = picContent; + setBodyParameter("PicContent", picContent); +} + +int SearchObjectRequest::getPageSize()const +{ + return pageSize_; +} + +void SearchObjectRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + +std::string SearchObjectRequest::getObjectType()const +{ + return objectType_; +} + +void SearchObjectRequest::setObjectType(const std::string& objectType) +{ + objectType_ = objectType; + setBodyParameter("ObjectType", objectType); +} + +std::string SearchObjectRequest::getAlgorithmType()const +{ + return algorithmType_; +} + +void SearchObjectRequest::setAlgorithmType(const std::string& algorithmType) +{ + algorithmType_ = algorithmType; + setBodyParameter("AlgorithmType", algorithmType); +} + +long SearchObjectRequest::getEndTime()const +{ + return endTime_; +} + +void SearchObjectRequest::setEndTime(long endTime) +{ + endTime_ = endTime; + setBodyParameter("EndTime", std::to_string(endTime)); +} + +std::map SearchObjectRequest::getDeviceList()const +{ + return deviceList_; +} + +void SearchObjectRequest::setDeviceList(const std::map& deviceList) +{ + deviceList_ = deviceList; + setJsonParameters("DeviceList", deviceList); +} + +std::string SearchObjectRequest::getPicUrl()const +{ + return picUrl_; +} + +void SearchObjectRequest::setPicUrl(const std::string& picUrl) +{ + picUrl_ = picUrl; + setBodyParameter("PicUrl", picUrl); +} + +std::string SearchObjectRequest::getImagePath()const +{ + return imagePath_; +} + +void SearchObjectRequest::setImagePath(const std::string& imagePath) +{ + imagePath_ = imagePath; + setBodyParameter("ImagePath", imagePath); +} + +std::string SearchObjectRequest::getConditions()const +{ + return conditions_; +} + +void SearchObjectRequest::setConditions(const std::string& conditions) +{ + conditions_ = conditions; + setBodyParameter("Conditions", conditions); +} + diff --git a/vcs/src/model/SearchObjectResult.cc b/vcs/src/model/SearchObjectResult.cc new file mode 100644 index 000000000..c651ec699 --- /dev/null +++ b/vcs/src/model/SearchObjectResult.cc @@ -0,0 +1,115 @@ +/* + * 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; + +SearchObjectResult::SearchObjectResult() : + ServiceResult() +{} + +SearchObjectResult::SearchObjectResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SearchObjectResult::~SearchObjectResult() +{} + +void SearchObjectResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["DataItem"]; + for (auto valueDataDataItem : allDataNode) + { + 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); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string SearchObjectResult::getMessage()const +{ + return message_; +} + +std::vector SearchObjectResult::getData()const +{ + return data_; +} + +std::string SearchObjectResult::getCode()const +{ + return code_; +} +