diff --git a/CHANGELOG b/CHANGELOG index 4b945b9e5..6c292d621 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-05-14 Version: 1.36.737 +- Release ExtractFingerPrint. + 2021-05-14 Version: 1.36.736 - EnableAdditionalBandwidth add AutoRenew,AutoRenewPeriod parameter. diff --git a/VERSION b/VERSION index bb8a62fcc..ab2d97366 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.736 \ No newline at end of file +1.36.737 \ No newline at end of file diff --git a/facebody/CMakeLists.txt b/facebody/CMakeLists.txt index b0ede27d7..170b65c12 100644 --- a/facebody/CMakeLists.txt +++ b/facebody/CMakeLists.txt @@ -77,6 +77,8 @@ set(facebody_public_header_model include/alibabacloud/facebody/model/DetectVideoLivingFaceResult.h include/alibabacloud/facebody/model/EnhanceFaceRequest.h include/alibabacloud/facebody/model/EnhanceFaceResult.h + include/alibabacloud/facebody/model/ExtractFingerPrintRequest.h + include/alibabacloud/facebody/model/ExtractFingerPrintResult.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrResult.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttributeRequest.h @@ -198,6 +200,8 @@ set(facebody_src src/model/DetectVideoLivingFaceResult.cc src/model/EnhanceFaceRequest.cc src/model/EnhanceFaceResult.cc + src/model/ExtractFingerPrintRequest.cc + src/model/ExtractFingerPrintResult.cc src/model/ExtractPedestrianFeatureAttrRequest.cc src/model/ExtractPedestrianFeatureAttrResult.cc src/model/ExtractPedestrianFeatureAttributeRequest.cc diff --git a/facebody/include/alibabacloud/facebody/FacebodyClient.h b/facebody/include/alibabacloud/facebody/FacebodyClient.h index a9ce4d5f8..0aeca304a 100644 --- a/facebody/include/alibabacloud/facebody/FacebodyClient.h +++ b/facebody/include/alibabacloud/facebody/FacebodyClient.h @@ -78,6 +78,8 @@ #include "model/DetectVideoLivingFaceResult.h" #include "model/EnhanceFaceRequest.h" #include "model/EnhanceFaceResult.h" +#include "model/ExtractFingerPrintRequest.h" +#include "model/ExtractFingerPrintResult.h" #include "model/ExtractPedestrianFeatureAttrRequest.h" #include "model/ExtractPedestrianFeatureAttrResult.h" #include "model/ExtractPedestrianFeatureAttributeRequest.h" @@ -233,6 +235,9 @@ namespace AlibabaCloud typedef Outcome EnhanceFaceOutcome; typedef std::future EnhanceFaceOutcomeCallable; typedef std::function&)> EnhanceFaceAsyncHandler; + typedef Outcome ExtractFingerPrintOutcome; + typedef std::future ExtractFingerPrintOutcomeCallable; + typedef std::function&)> ExtractFingerPrintAsyncHandler; typedef Outcome ExtractPedestrianFeatureAttrOutcome; typedef std::future ExtractPedestrianFeatureAttrOutcomeCallable; typedef std::function&)> ExtractPedestrianFeatureAttrAsyncHandler; @@ -415,6 +420,9 @@ namespace AlibabaCloud EnhanceFaceOutcome enhanceFace(const Model::EnhanceFaceRequest &request)const; void enhanceFaceAsync(const Model::EnhanceFaceRequest& request, const EnhanceFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; EnhanceFaceOutcomeCallable enhanceFaceCallable(const Model::EnhanceFaceRequest& request) const; + ExtractFingerPrintOutcome extractFingerPrint(const Model::ExtractFingerPrintRequest &request)const; + void extractFingerPrintAsync(const Model::ExtractFingerPrintRequest& request, const ExtractFingerPrintAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ExtractFingerPrintOutcomeCallable extractFingerPrintCallable(const Model::ExtractFingerPrintRequest& request) const; ExtractPedestrianFeatureAttrOutcome extractPedestrianFeatureAttr(const Model::ExtractPedestrianFeatureAttrRequest &request)const; void extractPedestrianFeatureAttrAsync(const Model::ExtractPedestrianFeatureAttrRequest& request, const ExtractPedestrianFeatureAttrAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ExtractPedestrianFeatureAttrOutcomeCallable extractPedestrianFeatureAttrCallable(const Model::ExtractPedestrianFeatureAttrRequest& request) const; diff --git a/facebody/include/alibabacloud/facebody/model/DetectPedestrianIntrusionResult.h b/facebody/include/alibabacloud/facebody/model/DetectPedestrianIntrusionResult.h index 346c76ec2..fef109076 100644 --- a/facebody/include/alibabacloud/facebody/model/DetectPedestrianIntrusionResult.h +++ b/facebody/include/alibabacloud/facebody/model/DetectPedestrianIntrusionResult.h @@ -44,8 +44,8 @@ namespace AlibabaCloud long bottom; }; long boxId; - std::string type; long score; + std::string type; bool isIntrude; Box box; }; diff --git a/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintRequest.h b/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintRequest.h new file mode 100644 index 000000000..8c0cbbae0 --- /dev/null +++ b/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintRequest.h @@ -0,0 +1,51 @@ +/* + * 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_FACEBODY_MODEL_EXTRACTFINGERPRINTREQUEST_H_ +#define ALIBABACLOUD_FACEBODY_MODEL_EXTRACTFINGERPRINTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Facebody + { + namespace Model + { + class ALIBABACLOUD_FACEBODY_EXPORT ExtractFingerPrintRequest : public RpcServiceRequest + { + + public: + ExtractFingerPrintRequest(); + ~ExtractFingerPrintRequest(); + + std::string getImageData()const; + void setImageData(const std::string& imageData); + std::string getImageURL()const; + void setImageURL(const std::string& imageURL); + + private: + std::string imageData_; + std::string imageURL_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXTRACTFINGERPRINTREQUEST_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintResult.h b/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintResult.h new file mode 100644 index 000000000..dad52550b --- /dev/null +++ b/facebody/include/alibabacloud/facebody/model/ExtractFingerPrintResult.h @@ -0,0 +1,59 @@ +/* + * 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_FACEBODY_MODEL_EXTRACTFINGERPRINTRESULT_H_ +#define ALIBABACLOUD_FACEBODY_MODEL_EXTRACTFINGERPRINTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Facebody + { + namespace Model + { + class ALIBABACLOUD_FACEBODY_EXPORT ExtractFingerPrintResult : public ServiceResult + { + public: + struct Data + { + std::string fingerPrint; + }; + + + ExtractFingerPrintResult(); + explicit ExtractFingerPrintResult(const std::string &payload); + ~ExtractFingerPrintResult(); + 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_FACEBODY_MODEL_EXTRACTFINGERPRINTRESULT_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h b/facebody/include/alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h index bb2280895..eec8b154a 100644 --- a/facebody/include/alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h +++ b/facebody/include/alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h @@ -35,10 +35,13 @@ namespace AlibabaCloud GenerateHumanSketchStyleRequest(); ~GenerateHumanSketchStyleRequest(); + std::string getReturnType()const; + void setReturnType(const std::string& returnType); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: + std::string returnType_; std::string imageURL_; }; diff --git a/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultRequest.h b/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultRequest.h index 08f7c965e..46fd8b028 100644 --- a/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultRequest.h +++ b/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultRequest.h @@ -35,14 +35,14 @@ namespace AlibabaCloud GetRealPersonVerificationResultRequest(); ~GetRealPersonVerificationResultRequest(); - std::string getVerificationToken()const; - void setVerificationToken(const std::string& verificationToken); std::string getMaterialHash()const; void setMaterialHash(const std::string& materialHash); + std::string getVerificationToken()const; + void setVerificationToken(const std::string& verificationToken); private: - std::string verificationToken_; std::string materialHash_; + std::string verificationToken_; }; } diff --git a/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultResult.h b/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultResult.h index b30b3d2b3..e96ab92d7 100644 --- a/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultResult.h +++ b/facebody/include/alibabacloud/facebody/model/GetRealPersonVerificationResultResult.h @@ -34,7 +34,7 @@ namespace AlibabaCloud public: struct Data { - bool pass; + bool passed; std::string materialMatch; std::string identityInfo; }; diff --git a/facebody/include/alibabacloud/facebody/model/MonitorExaminationResult.h b/facebody/include/alibabacloud/facebody/model/MonitorExaminationResult.h index 55452bddb..38a98c7d9 100644 --- a/facebody/include/alibabacloud/facebody/model/MonitorExaminationResult.h +++ b/facebody/include/alibabacloud/facebody/model/MonitorExaminationResult.h @@ -34,22 +34,6 @@ namespace AlibabaCloud public: struct Data { - struct PersonInfo - { - struct EarPhone - { - float score; - float threshold; - }; - struct CellPhone - { - float score; - float threshold; - }; - long personNumber; - EarPhone earPhone; - CellPhone cellPhone; - }; struct FaceInfo { struct Pose @@ -62,6 +46,22 @@ namespace AlibabaCloud Pose pose; long faceNumber; }; + struct PersonInfo + { + struct CellPhone + { + float score; + float threshold; + }; + struct EarPhone + { + float score; + float threshold; + }; + long personNumber; + EarPhone earPhone; + CellPhone cellPhone; + }; PersonInfo personInfo; float chatScore; FaceInfo faceInfo; diff --git a/facebody/include/alibabacloud/facebody/model/RecognizeHandGestureResult.h b/facebody/include/alibabacloud/facebody/model/RecognizeHandGestureResult.h index 92b731126..c2f9dea8d 100644 --- a/facebody/include/alibabacloud/facebody/model/RecognizeHandGestureResult.h +++ b/facebody/include/alibabacloud/facebody/model/RecognizeHandGestureResult.h @@ -34,8 +34,8 @@ namespace AlibabaCloud public: struct Data { - float score; std::string type; + float score; long x; long y; long height; diff --git a/facebody/src/FacebodyClient.cc b/facebody/src/FacebodyClient.cc index ebf22dfb4..2728b1100 100644 --- a/facebody/src/FacebodyClient.cc +++ b/facebody/src/FacebodyClient.cc @@ -1059,6 +1059,42 @@ FacebodyClient::EnhanceFaceOutcomeCallable FacebodyClient::enhanceFaceCallable(c return task->get_future(); } +FacebodyClient::ExtractFingerPrintOutcome FacebodyClient::extractFingerPrint(const ExtractFingerPrintRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ExtractFingerPrintOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ExtractFingerPrintOutcome(ExtractFingerPrintResult(outcome.result())); + else + return ExtractFingerPrintOutcome(outcome.error()); +} + +void FacebodyClient::extractFingerPrintAsync(const ExtractFingerPrintRequest& request, const ExtractFingerPrintAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, extractFingerPrint(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FacebodyClient::ExtractFingerPrintOutcomeCallable FacebodyClient::extractFingerPrintCallable(const ExtractFingerPrintRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->extractFingerPrint(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FacebodyClient::ExtractPedestrianFeatureAttrOutcome FacebodyClient::extractPedestrianFeatureAttr(const ExtractPedestrianFeatureAttrRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/facebody/src/model/AddFaceImageTemplateResult.cc b/facebody/src/model/AddFaceImageTemplateResult.cc index 511334c6c..6adc3e8f2 100644 --- a/facebody/src/model/AddFaceImageTemplateResult.cc +++ b/facebody/src/model/AddFaceImageTemplateResult.cc @@ -42,10 +42,10 @@ void AddFaceImageTemplateResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["TemplateId"].isNull()) data_.templateId = dataNode["TemplateId"].asString(); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/DeleteFaceImageTemplateResult.cc b/facebody/src/model/DeleteFaceImageTemplateResult.cc index d0a1de75c..2d4278411 100644 --- a/facebody/src/model/DeleteFaceImageTemplateResult.cc +++ b/facebody/src/model/DeleteFaceImageTemplateResult.cc @@ -39,10 +39,10 @@ void DeleteFaceImageTemplateResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/DetectPedestrianIntrusionResult.cc b/facebody/src/model/DetectPedestrianIntrusionResult.cc index 9ae929ff0..6a054d213 100644 --- a/facebody/src/model/DetectPedestrianIntrusionResult.cc +++ b/facebody/src/model/DetectPedestrianIntrusionResult.cc @@ -40,22 +40,22 @@ void DetectPedestrianIntrusionResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; - if(!dataNode["ImageHeight"].isNull()) - data_.imageHeight = std::stol(dataNode["ImageHeight"].asString()); if(!dataNode["ImageWidth"].isNull()) data_.imageWidth = std::stol(dataNode["ImageWidth"].asString()); + if(!dataNode["ImageHeight"].isNull()) + data_.imageHeight = std::stol(dataNode["ImageHeight"].asString()); auto allElementsNode = dataNode["Elements"]["ElementsItem"]; for (auto dataNodeElementsElementsItem : allElementsNode) { Data::ElementsItem elementsItemObject; - if(!dataNodeElementsElementsItem["BoxId"].isNull()) - elementsItemObject.boxId = std::stol(dataNodeElementsElementsItem["BoxId"].asString()); - if(!dataNodeElementsElementsItem["Type"].isNull()) - elementsItemObject.type = dataNodeElementsElementsItem["Type"].asString(); if(!dataNodeElementsElementsItem["Score"].isNull()) elementsItemObject.score = std::stol(dataNodeElementsElementsItem["Score"].asString()); + if(!dataNodeElementsElementsItem["Type"].isNull()) + elementsItemObject.type = dataNodeElementsElementsItem["Type"].asString(); if(!dataNodeElementsElementsItem["IsIntrude"].isNull()) elementsItemObject.isIntrude = dataNodeElementsElementsItem["IsIntrude"].asString() == "true"; + if(!dataNodeElementsElementsItem["BoxId"].isNull()) + elementsItemObject.boxId = std::stol(dataNodeElementsElementsItem["BoxId"].asString()); auto boxNode = value["Box"]; if(!boxNode["Left"].isNull()) elementsItemObject.box.left = std::stol(boxNode["Left"].asString()); @@ -67,10 +67,10 @@ void DetectPedestrianIntrusionResult::parse(const std::string &payload) elementsItemObject.box.bottom = std::stol(boxNode["Bottom"].asString()); data_.elements.push_back(elementsItemObject); } - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/ExtractFingerPrintRequest.cc b/facebody/src/model/ExtractFingerPrintRequest.cc new file mode 100644 index 000000000..d5591c2f8 --- /dev/null +++ b/facebody/src/model/ExtractFingerPrintRequest.cc @@ -0,0 +1,51 @@ +/* + * 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::Facebody::Model::ExtractFingerPrintRequest; + +ExtractFingerPrintRequest::ExtractFingerPrintRequest() : + RpcServiceRequest("facebody", "2019-12-30", "ExtractFingerPrint") +{ + setMethod(HttpRequest::Method::Post); +} + +ExtractFingerPrintRequest::~ExtractFingerPrintRequest() +{} + +std::string ExtractFingerPrintRequest::getImageData()const +{ + return imageData_; +} + +void ExtractFingerPrintRequest::setImageData(const std::string& imageData) +{ + imageData_ = imageData; + setBodyParameter("ImageData", imageData); +} + +std::string ExtractFingerPrintRequest::getImageURL()const +{ + return imageURL_; +} + +void ExtractFingerPrintRequest::setImageURL(const std::string& imageURL) +{ + imageURL_ = imageURL; + setBodyParameter("ImageURL", imageURL); +} + diff --git a/facebody/src/model/ExtractFingerPrintResult.cc b/facebody/src/model/ExtractFingerPrintResult.cc new file mode 100644 index 000000000..50af59313 --- /dev/null +++ b/facebody/src/model/ExtractFingerPrintResult.cc @@ -0,0 +1,66 @@ +/* + * 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::Facebody; +using namespace AlibabaCloud::Facebody::Model; + +ExtractFingerPrintResult::ExtractFingerPrintResult() : + ServiceResult() +{} + +ExtractFingerPrintResult::ExtractFingerPrintResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ExtractFingerPrintResult::~ExtractFingerPrintResult() +{} + +void ExtractFingerPrintResult::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["FingerPrint"].isNull()) + data_.fingerPrint = dataNode["FingerPrint"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ExtractFingerPrintResult::getMessage()const +{ + return message_; +} + +ExtractFingerPrintResult::Data ExtractFingerPrintResult::getData()const +{ + return data_; +} + +std::string ExtractFingerPrintResult::getCode()const +{ + return code_; +} + diff --git a/facebody/src/model/GenerateHumanSketchStyleRequest.cc b/facebody/src/model/GenerateHumanSketchStyleRequest.cc index 54caee016..978d4b0d9 100644 --- a/facebody/src/model/GenerateHumanSketchStyleRequest.cc +++ b/facebody/src/model/GenerateHumanSketchStyleRequest.cc @@ -27,6 +27,17 @@ GenerateHumanSketchStyleRequest::GenerateHumanSketchStyleRequest() : GenerateHumanSketchStyleRequest::~GenerateHumanSketchStyleRequest() {} +std::string GenerateHumanSketchStyleRequest::getReturnType()const +{ + return returnType_; +} + +void GenerateHumanSketchStyleRequest::setReturnType(const std::string& returnType) +{ + returnType_ = returnType; + setBodyParameter("ReturnType", returnType); +} + std::string GenerateHumanSketchStyleRequest::getImageURL()const { return imageURL_; diff --git a/facebody/src/model/GenerateHumanSketchStyleResult.cc b/facebody/src/model/GenerateHumanSketchStyleResult.cc index b770a1200..427a49023 100644 --- a/facebody/src/model/GenerateHumanSketchStyleResult.cc +++ b/facebody/src/model/GenerateHumanSketchStyleResult.cc @@ -42,10 +42,10 @@ void GenerateHumanSketchStyleResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["ImageURL"].isNull()) data_.imageURL = dataNode["ImageURL"].asString(); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/GetRealPersonVerificationResultRequest.cc b/facebody/src/model/GetRealPersonVerificationResultRequest.cc index 243db0f98..e1ab5d9c0 100644 --- a/facebody/src/model/GetRealPersonVerificationResultRequest.cc +++ b/facebody/src/model/GetRealPersonVerificationResultRequest.cc @@ -27,17 +27,6 @@ GetRealPersonVerificationResultRequest::GetRealPersonVerificationResultRequest() GetRealPersonVerificationResultRequest::~GetRealPersonVerificationResultRequest() {} -std::string GetRealPersonVerificationResultRequest::getVerificationToken()const -{ - return verificationToken_; -} - -void GetRealPersonVerificationResultRequest::setVerificationToken(const std::string& verificationToken) -{ - verificationToken_ = verificationToken; - setBodyParameter("VerificationToken", verificationToken); -} - std::string GetRealPersonVerificationResultRequest::getMaterialHash()const { return materialHash_; @@ -49,3 +38,14 @@ void GetRealPersonVerificationResultRequest::setMaterialHash(const std::string& setBodyParameter("MaterialHash", materialHash); } +std::string GetRealPersonVerificationResultRequest::getVerificationToken()const +{ + return verificationToken_; +} + +void GetRealPersonVerificationResultRequest::setVerificationToken(const std::string& verificationToken) +{ + verificationToken_ = verificationToken; + setBodyParameter("VerificationToken", verificationToken); +} + diff --git a/facebody/src/model/GetRealPersonVerificationResultResult.cc b/facebody/src/model/GetRealPersonVerificationResultResult.cc index 0dc03ae66..5148b4676 100644 --- a/facebody/src/model/GetRealPersonVerificationResultResult.cc +++ b/facebody/src/model/GetRealPersonVerificationResultResult.cc @@ -40,16 +40,16 @@ void GetRealPersonVerificationResultResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; - if(!dataNode["Pass"].isNull()) - data_.pass = dataNode["Pass"].asString() == "true"; - if(!dataNode["MaterialMatch"].isNull()) - data_.materialMatch = dataNode["MaterialMatch"].asString(); + if(!dataNode["Passed"].isNull()) + data_.passed = dataNode["Passed"].asString() == "true"; if(!dataNode["IdentityInfo"].isNull()) data_.identityInfo = dataNode["IdentityInfo"].asString(); - if(!value["Code"].isNull()) - code_ = value["Code"].asString(); + if(!dataNode["MaterialMatch"].isNull()) + data_.materialMatch = dataNode["MaterialMatch"].asString(); if(!value["ErrorMessage"].isNull()) errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; diff --git a/facebody/src/model/MergeImageFaceResult.cc b/facebody/src/model/MergeImageFaceResult.cc index 12ad680d6..f2f38d3fa 100644 --- a/facebody/src/model/MergeImageFaceResult.cc +++ b/facebody/src/model/MergeImageFaceResult.cc @@ -42,10 +42,10 @@ void MergeImageFaceResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["ImageURL"].isNull()) data_.imageURL = dataNode["ImageURL"].asString(); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/MonitorExaminationResult.cc b/facebody/src/model/MonitorExaminationResult.cc index 835de4470..3578e4495 100644 --- a/facebody/src/model/MonitorExaminationResult.cc +++ b/facebody/src/model/MonitorExaminationResult.cc @@ -44,19 +44,6 @@ void MonitorExaminationResult::parse(const std::string &payload) data_.chatScore = std::stof(dataNode["ChatScore"].asString()); if(!dataNode["Threshold"].isNull()) data_.threshold = std::stof(dataNode["Threshold"].asString()); - auto personInfoNode = dataNode["PersonInfo"]; - if(!personInfoNode["PersonNumber"].isNull()) - data_.personInfo.personNumber = std::stol(personInfoNode["PersonNumber"].asString()); - auto earPhoneNode = personInfoNode["EarPhone"]; - if(!earPhoneNode["Score"].isNull()) - data_.personInfo.earPhone.score = std::stof(earPhoneNode["Score"].asString()); - if(!earPhoneNode["Threshold"].isNull()) - data_.personInfo.earPhone.threshold = std::stof(earPhoneNode["Threshold"].asString()); - auto cellPhoneNode = personInfoNode["CellPhone"]; - if(!cellPhoneNode["Score"].isNull()) - data_.personInfo.cellPhone.score = std::stof(cellPhoneNode["Score"].asString()); - if(!cellPhoneNode["Threshold"].isNull()) - data_.personInfo.cellPhone.threshold = std::stof(cellPhoneNode["Threshold"].asString()); auto faceInfoNode = dataNode["FaceInfo"]; if(!faceInfoNode["Completeness"].isNull()) data_.faceInfo.completeness = std::stol(faceInfoNode["Completeness"].asString()); @@ -69,6 +56,19 @@ void MonitorExaminationResult::parse(const std::string &payload) data_.faceInfo.pose.roll = std::stof(poseNode["Roll"].asString()); if(!poseNode["Yaw"].isNull()) data_.faceInfo.pose.yaw = std::stof(poseNode["Yaw"].asString()); + auto personInfoNode = dataNode["PersonInfo"]; + if(!personInfoNode["PersonNumber"].isNull()) + data_.personInfo.personNumber = std::stol(personInfoNode["PersonNumber"].asString()); + auto cellPhoneNode = personInfoNode["CellPhone"]; + if(!cellPhoneNode["Score"].isNull()) + data_.personInfo.cellPhone.score = std::stof(cellPhoneNode["Score"].asString()); + if(!cellPhoneNode["Threshold"].isNull()) + data_.personInfo.cellPhone.threshold = std::stof(cellPhoneNode["Threshold"].asString()); + auto earPhoneNode = personInfoNode["EarPhone"]; + if(!earPhoneNode["Score"].isNull()) + data_.personInfo.earPhone.score = std::stof(earPhoneNode["Score"].asString()); + if(!earPhoneNode["Threshold"].isNull()) + data_.personInfo.earPhone.threshold = std::stof(earPhoneNode["Threshold"].asString()); if(!value["Message"].isNull()) message_ = value["Message"].asString(); if(!value["Code"].isNull()) diff --git a/facebody/src/model/QueryFaceImageTemplateResult.cc b/facebody/src/model/QueryFaceImageTemplateResult.cc index c83fe5261..72b19174b 100644 --- a/facebody/src/model/QueryFaceImageTemplateResult.cc +++ b/facebody/src/model/QueryFaceImageTemplateResult.cc @@ -44,22 +44,22 @@ void QueryFaceImageTemplateResult::parse(const std::string &payload) for (auto dataNodeElementsElementsItem : allElementsNode) { Data::ElementsItem elementsItemObject; - if(!dataNodeElementsElementsItem["TemplateURL"].isNull()) - elementsItemObject.templateURL = dataNodeElementsElementsItem["TemplateURL"].asString(); - if(!dataNodeElementsElementsItem["UserId"].isNull()) - elementsItemObject.userId = dataNodeElementsElementsItem["UserId"].asString(); if(!dataNodeElementsElementsItem["CreateTime"].isNull()) elementsItemObject.createTime = dataNodeElementsElementsItem["CreateTime"].asString(); if(!dataNodeElementsElementsItem["UpdateTime"].isNull()) elementsItemObject.updateTime = dataNodeElementsElementsItem["UpdateTime"].asString(); + if(!dataNodeElementsElementsItem["UserId"].isNull()) + elementsItemObject.userId = dataNodeElementsElementsItem["UserId"].asString(); if(!dataNodeElementsElementsItem["TemplateId"].isNull()) elementsItemObject.templateId = dataNodeElementsElementsItem["TemplateId"].asString(); + if(!dataNodeElementsElementsItem["TemplateURL"].isNull()) + elementsItemObject.templateURL = dataNodeElementsElementsItem["TemplateURL"].asString(); data_.elements.push_back(elementsItemObject); } - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } diff --git a/facebody/src/model/RecognizeHandGestureResult.cc b/facebody/src/model/RecognizeHandGestureResult.cc index 7e7da225a..6beeb5259 100644 --- a/facebody/src/model/RecognizeHandGestureResult.cc +++ b/facebody/src/model/RecognizeHandGestureResult.cc @@ -40,22 +40,22 @@ void RecognizeHandGestureResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; - if(!dataNode["Score"].isNull()) - data_.score = std::stof(dataNode["Score"].asString()); if(!dataNode["Type"].isNull()) data_.type = dataNode["Type"].asString(); if(!dataNode["X"].isNull()) data_.x = std::stol(dataNode["X"].asString()); if(!dataNode["Y"].isNull()) data_.y = std::stol(dataNode["Y"].asString()); - if(!dataNode["Height"].isNull()) - data_.height = std::stol(dataNode["Height"].asString()); if(!dataNode["Width"].isNull()) data_.width = std::stol(dataNode["Width"].asString()); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); + if(!dataNode["Height"].isNull()) + data_.height = std::stol(dataNode["Height"].asString()); + if(!dataNode["Score"].isNull()) + data_.score = std::stof(dataNode["Score"].asString()); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); }