From 9fd09665ffbe73f6aeaf5668ecbd5e643404b1d9 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 8 Feb 2021 02:28:57 +0000 Subject: [PATCH] Update PedestrianDetectAttribute. --- CHANGELOG | 3 + facebody/CMakeLists.txt | 8 -- .../alibabacloud/facebody/FacebodyClient.h | 20 +---- .../DetectIPCPedestrianOptimizedRequest.h | 54 ------------ .../DetectIPCPedestrianOptimizedResult.h | 64 -------------- .../ExecuteServerSideVerificationRequest.h | 60 ------------- .../ExecuteServerSideVerificationResult.h | 61 ------------- .../model/PedestrianDetectAttributeResult.h | 2 + facebody/src/FacebodyClient.cc | 78 +---------------- .../DetectIPCPedestrianOptimizedRequest.cc | 63 -------------- .../DetectIPCPedestrianOptimizedResult.cc | 67 --------------- .../ExecuteServerSideVerificationRequest.cc | 85 ------------------- .../ExecuteServerSideVerificationResult.cc | 70 --------------- .../model/PedestrianDetectAttributeResult.cc | 4 + 14 files changed, 14 insertions(+), 625 deletions(-) delete mode 100644 facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h delete mode 100644 facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h delete mode 100644 facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h delete mode 100644 facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h delete mode 100644 facebody/src/model/DetectIPCPedestrianOptimizedRequest.cc delete mode 100644 facebody/src/model/DetectIPCPedestrianOptimizedResult.cc delete mode 100644 facebody/src/model/ExecuteServerSideVerificationRequest.cc delete mode 100644 facebody/src/model/ExecuteServerSideVerificationResult.cc diff --git a/CHANGELOG b/CHANGELOG index ea4f0b23a..172e5a88f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-02-08 Version: patch +- Update PedestrianDetectAttribute. + 2021-02-07 Version: patch - Add IoT Studio BatchBindDevicesIntoProject API. - Add IoT Studio BatchBindProductsIntoProject API. diff --git a/facebody/CMakeLists.txt b/facebody/CMakeLists.txt index 1c25c6dcd..d0a4e75c5 100644 --- a/facebody/CMakeLists.txt +++ b/facebody/CMakeLists.txt @@ -65,8 +65,6 @@ set(facebody_public_header_model include/alibabacloud/facebody/model/DetectFaceResult.h include/alibabacloud/facebody/model/DetectIPCPedestrianRequest.h include/alibabacloud/facebody/model/DetectIPCPedestrianResult.h - include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h - include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h include/alibabacloud/facebody/model/DetectLivingFaceRequest.h include/alibabacloud/facebody/model/DetectLivingFaceResult.h include/alibabacloud/facebody/model/DetectMaskRequest.h @@ -79,8 +77,6 @@ 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/ExecuteServerSideVerificationRequest.h - include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrResult.h include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttributeRequest.h @@ -186,8 +182,6 @@ set(facebody_src src/model/DetectFaceResult.cc src/model/DetectIPCPedestrianRequest.cc src/model/DetectIPCPedestrianResult.cc - src/model/DetectIPCPedestrianOptimizedRequest.cc - src/model/DetectIPCPedestrianOptimizedResult.cc src/model/DetectLivingFaceRequest.cc src/model/DetectLivingFaceResult.cc src/model/DetectMaskRequest.cc @@ -200,8 +194,6 @@ set(facebody_src src/model/DetectVideoLivingFaceResult.cc src/model/EnhanceFaceRequest.cc src/model/EnhanceFaceResult.cc - src/model/ExecuteServerSideVerificationRequest.cc - src/model/ExecuteServerSideVerificationResult.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 d6a7d2f40..529c5cdd8 100644 --- a/facebody/include/alibabacloud/facebody/FacebodyClient.h +++ b/facebody/include/alibabacloud/facebody/FacebodyClient.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "FacebodyExport.h" #include "model/AddBodyTraceRequest.h" #include "model/AddBodyTraceResult.h" @@ -66,8 +66,6 @@ #include "model/DetectFaceResult.h" #include "model/DetectIPCPedestrianRequest.h" #include "model/DetectIPCPedestrianResult.h" -#include "model/DetectIPCPedestrianOptimizedRequest.h" -#include "model/DetectIPCPedestrianOptimizedResult.h" #include "model/DetectLivingFaceRequest.h" #include "model/DetectLivingFaceResult.h" #include "model/DetectMaskRequest.h" @@ -80,8 +78,6 @@ #include "model/DetectVideoLivingFaceResult.h" #include "model/EnhanceFaceRequest.h" #include "model/EnhanceFaceResult.h" -#include "model/ExecuteServerSideVerificationRequest.h" -#include "model/ExecuteServerSideVerificationResult.h" #include "model/ExtractPedestrianFeatureAttrRequest.h" #include "model/ExtractPedestrianFeatureAttrResult.h" #include "model/ExtractPedestrianFeatureAttributeRequest.h" @@ -146,7 +142,7 @@ namespace AlibabaCloud { namespace Facebody { - class ALIBABACLOUD_FACEBODY_EXPORT FacebodyClient : public RoaServiceClient + class ALIBABACLOUD_FACEBODY_EXPORT FacebodyClient : public RpcServiceClient { public: typedef Outcome AddBodyTraceOutcome; @@ -215,9 +211,6 @@ namespace AlibabaCloud typedef Outcome DetectIPCPedestrianOutcome; typedef std::future DetectIPCPedestrianOutcomeCallable; typedef std::function&)> DetectIPCPedestrianAsyncHandler; - typedef Outcome DetectIPCPedestrianOptimizedOutcome; - typedef std::future DetectIPCPedestrianOptimizedOutcomeCallable; - typedef std::function&)> DetectIPCPedestrianOptimizedAsyncHandler; typedef Outcome DetectLivingFaceOutcome; typedef std::future DetectLivingFaceOutcomeCallable; typedef std::function&)> DetectLivingFaceAsyncHandler; @@ -236,9 +229,6 @@ namespace AlibabaCloud typedef Outcome EnhanceFaceOutcome; typedef std::future EnhanceFaceOutcomeCallable; typedef std::function&)> EnhanceFaceAsyncHandler; - typedef Outcome ExecuteServerSideVerificationOutcome; - typedef std::future ExecuteServerSideVerificationOutcomeCallable; - typedef std::function&)> ExecuteServerSideVerificationAsyncHandler; typedef Outcome ExtractPedestrianFeatureAttrOutcome; typedef std::future ExtractPedestrianFeatureAttrOutcomeCallable; typedef std::function&)> ExtractPedestrianFeatureAttrAsyncHandler; @@ -397,9 +387,6 @@ namespace AlibabaCloud DetectIPCPedestrianOutcome detectIPCPedestrian(const Model::DetectIPCPedestrianRequest &request)const; void detectIPCPedestrianAsync(const Model::DetectIPCPedestrianRequest& request, const DetectIPCPedestrianAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectIPCPedestrianOutcomeCallable detectIPCPedestrianCallable(const Model::DetectIPCPedestrianRequest& request) const; - DetectIPCPedestrianOptimizedOutcome detectIPCPedestrianOptimized(const Model::DetectIPCPedestrianOptimizedRequest &request)const; - void detectIPCPedestrianOptimizedAsync(const Model::DetectIPCPedestrianOptimizedRequest& request, const DetectIPCPedestrianOptimizedAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - DetectIPCPedestrianOptimizedOutcomeCallable detectIPCPedestrianOptimizedCallable(const Model::DetectIPCPedestrianOptimizedRequest& request) const; DetectLivingFaceOutcome detectLivingFace(const Model::DetectLivingFaceRequest &request)const; void detectLivingFaceAsync(const Model::DetectLivingFaceRequest& request, const DetectLivingFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectLivingFaceOutcomeCallable detectLivingFaceCallable(const Model::DetectLivingFaceRequest& request) const; @@ -418,9 +405,6 @@ 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; - ExecuteServerSideVerificationOutcome executeServerSideVerification(const Model::ExecuteServerSideVerificationRequest &request)const; - void executeServerSideVerificationAsync(const Model::ExecuteServerSideVerificationRequest& request, const ExecuteServerSideVerificationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - ExecuteServerSideVerificationOutcomeCallable executeServerSideVerificationCallable(const Model::ExecuteServerSideVerificationRequest& 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/DetectIPCPedestrianOptimizedRequest.h b/facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h deleted file mode 100644 index f99dfc465..000000000 --- a/facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_ -#define ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Facebody - { - namespace Model - { - class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedRequest : public RoaServiceRequest - { - - public: - DetectIPCPedestrianOptimizedRequest(); - ~DetectIPCPedestrianOptimizedRequest(); - - std::string getImageData()const; - void setImageData(const std::string& imageData); - long getWidth()const; - void setWidth(long width); - long getHeight()const; - void setHeight(long height); - - private: - std::string imageData_; - long width_; - long height_; - - }; - } - } -} -#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h b/facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h deleted file mode 100644 index 087d98ec7..000000000 --- a/facebody/include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_ -#define ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Facebody - { - namespace Model - { - class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedResult : public ServiceResult - { - public: - struct Data - { - struct ImageInfoListItem - { - struct Element - { - float score; - std::vector boxes; - }; - std::vector elements; - }; - std::vector imageInfoList; - }; - - - DetectIPCPedestrianOptimizedResult(); - explicit DetectIPCPedestrianOptimizedResult(const std::string &payload); - ~DetectIPCPedestrianOptimizedResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h b/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h deleted file mode 100644 index d40b1ab24..000000000 --- a/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_ -#define ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Facebody - { - namespace Model - { - class ALIBABACLOUD_FACEBODY_EXPORT ExecuteServerSideVerificationRequest : public RoaServiceRequest - { - - public: - ExecuteServerSideVerificationRequest(); - ~ExecuteServerSideVerificationRequest(); - - std::string getFacialPictureData()const; - void setFacialPictureData(const std::string& facialPictureData); - std::string getSceneType()const; - void setSceneType(const std::string& sceneType); - std::string getCertificateNumber()const; - void setCertificateNumber(const std::string& certificateNumber); - std::string getCertificateName()const; - void setCertificateName(const std::string& certificateName); - std::string getFacialPictureUrl()const; - void setFacialPictureUrl(const std::string& facialPictureUrl); - - private: - std::string facialPictureData_; - std::string sceneType_; - std::string certificateNumber_; - std::string certificateName_; - std::string facialPictureUrl_; - - }; - } - } -} -#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h b/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h deleted file mode 100644 index b930a1097..000000000 --- a/facebody/include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONRESULT_H_ -#define ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Facebody - { - namespace Model - { - class ALIBABACLOUD_FACEBODY_EXPORT ExecuteServerSideVerificationResult : public ServiceResult - { - public: - struct Data - { - std::string verificationToken; - bool pass; - std::string reason; - }; - - - ExecuteServerSideVerificationResult(); - explicit ExecuteServerSideVerificationResult(const std::string &payload); - ~ExecuteServerSideVerificationResult(); - 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_EXECUTESERVERSIDEVERIFICATIONRESULT_H_ \ No newline at end of file diff --git a/facebody/include/alibabacloud/facebody/model/PedestrianDetectAttributeResult.h b/facebody/include/alibabacloud/facebody/model/PedestrianDetectAttributeResult.h index bc23923b7..b195459cc 100644 --- a/facebody/include/alibabacloud/facebody/model/PedestrianDetectAttributeResult.h +++ b/facebody/include/alibabacloud/facebody/model/PedestrianDetectAttributeResult.h @@ -119,6 +119,8 @@ namespace AlibabaCloud }; int personNumber; std::vector attributes; + long height; + long width; std::vector boxes; }; diff --git a/facebody/src/FacebodyClient.cc b/facebody/src/FacebodyClient.cc index 7e1d421f7..d5472d215 100644 --- a/facebody/src/FacebodyClient.cc +++ b/facebody/src/FacebodyClient.cc @@ -28,21 +28,21 @@ namespace } FacebodyClient::FacebodyClient(const Credentials &credentials, const ClientConfiguration &configuration) : - RoaServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "facebody"); } FacebodyClient::FacebodyClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : - RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration) + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "facebody"); } FacebodyClient::FacebodyClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : - RoaServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), 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, "facebody"); @@ -843,42 +843,6 @@ FacebodyClient::DetectIPCPedestrianOutcomeCallable FacebodyClient::detectIPCPede return task->get_future(); } -FacebodyClient::DetectIPCPedestrianOptimizedOutcome FacebodyClient::detectIPCPedestrianOptimized(const DetectIPCPedestrianOptimizedRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return DetectIPCPedestrianOptimizedOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return DetectIPCPedestrianOptimizedOutcome(DetectIPCPedestrianOptimizedResult(outcome.result())); - else - return DetectIPCPedestrianOptimizedOutcome(outcome.error()); -} - -void FacebodyClient::detectIPCPedestrianOptimizedAsync(const DetectIPCPedestrianOptimizedRequest& request, const DetectIPCPedestrianOptimizedAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, detectIPCPedestrianOptimized(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -FacebodyClient::DetectIPCPedestrianOptimizedOutcomeCallable FacebodyClient::detectIPCPedestrianOptimizedCallable(const DetectIPCPedestrianOptimizedRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->detectIPCPedestrianOptimized(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - FacebodyClient::DetectLivingFaceOutcome FacebodyClient::detectLivingFace(const DetectLivingFaceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1095,42 +1059,6 @@ FacebodyClient::EnhanceFaceOutcomeCallable FacebodyClient::enhanceFaceCallable(c return task->get_future(); } -FacebodyClient::ExecuteServerSideVerificationOutcome FacebodyClient::executeServerSideVerification(const ExecuteServerSideVerificationRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return ExecuteServerSideVerificationOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return ExecuteServerSideVerificationOutcome(ExecuteServerSideVerificationResult(outcome.result())); - else - return ExecuteServerSideVerificationOutcome(outcome.error()); -} - -void FacebodyClient::executeServerSideVerificationAsync(const ExecuteServerSideVerificationRequest& request, const ExecuteServerSideVerificationAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, executeServerSideVerification(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -FacebodyClient::ExecuteServerSideVerificationOutcomeCallable FacebodyClient::executeServerSideVerificationCallable(const ExecuteServerSideVerificationRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->executeServerSideVerification(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/DetectIPCPedestrianOptimizedRequest.cc b/facebody/src/model/DetectIPCPedestrianOptimizedRequest.cc deleted file mode 100644 index ac131f274..000000000 --- a/facebody/src/model/DetectIPCPedestrianOptimizedRequest.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Facebody::Model::DetectIPCPedestrianOptimizedRequest; - -DetectIPCPedestrianOptimizedRequest::DetectIPCPedestrianOptimizedRequest() : - RoaServiceRequest("facebody", "2020-09-10") -{ - setResourcePath("/viapi/k8s/facebody/detect-ipc-pedestrian-optimized"); - setMethod(HttpRequest::Method::Post); -} - -DetectIPCPedestrianOptimizedRequest::~DetectIPCPedestrianOptimizedRequest() -{} - -std::string DetectIPCPedestrianOptimizedRequest::getImageData()const -{ - return imageData_; -} - -void DetectIPCPedestrianOptimizedRequest::setImageData(const std::string& imageData) -{ - imageData_ = imageData; - setBodyParameter("ImageData", imageData); -} - -long DetectIPCPedestrianOptimizedRequest::getWidth()const -{ - return width_; -} - -void DetectIPCPedestrianOptimizedRequest::setWidth(long width) -{ - width_ = width; - setBodyParameter("Width", std::to_string(width)); -} - -long DetectIPCPedestrianOptimizedRequest::getHeight()const -{ - return height_; -} - -void DetectIPCPedestrianOptimizedRequest::setHeight(long height) -{ - height_ = height; - setBodyParameter("Height", std::to_string(height)); -} - diff --git a/facebody/src/model/DetectIPCPedestrianOptimizedResult.cc b/facebody/src/model/DetectIPCPedestrianOptimizedResult.cc deleted file mode 100644 index 97be55517..000000000 --- a/facebody/src/model/DetectIPCPedestrianOptimizedResult.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Facebody; -using namespace AlibabaCloud::Facebody::Model; - -DetectIPCPedestrianOptimizedResult::DetectIPCPedestrianOptimizedResult() : - ServiceResult() -{} - -DetectIPCPedestrianOptimizedResult::DetectIPCPedestrianOptimizedResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -DetectIPCPedestrianOptimizedResult::~DetectIPCPedestrianOptimizedResult() -{} - -void DetectIPCPedestrianOptimizedResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - auto allImageInfoListNode = dataNode["ImageInfoList"]["imageInfoListItem"]; - for (auto dataNodeImageInfoListimageInfoListItem : allImageInfoListNode) - { - Data::ImageInfoListItem imageInfoListItemObject; - auto allElementsNode = dataNodeImageInfoListimageInfoListItem["Elements"]["Element"]; - for (auto dataNodeImageInfoListimageInfoListItemElementsElement : allElementsNode) - { - Data::ImageInfoListItem::Element elementsObject; - if(!dataNodeImageInfoListimageInfoListItemElementsElement["Score"].isNull()) - elementsObject.score = std::stof(dataNodeImageInfoListimageInfoListItemElementsElement["Score"].asString()); - auto allBoxes = value["Boxes"]["Box"]; - for (auto value : allBoxes) - elementsObject.boxes.push_back(value.asString()); - imageInfoListItemObject.elements.push_back(elementsObject); - } - data_.imageInfoList.push_back(imageInfoListItemObject); - } - -} - -DetectIPCPedestrianOptimizedResult::Data DetectIPCPedestrianOptimizedResult::getData()const -{ - return data_; -} - diff --git a/facebody/src/model/ExecuteServerSideVerificationRequest.cc b/facebody/src/model/ExecuteServerSideVerificationRequest.cc deleted file mode 100644 index ef46740c1..000000000 --- a/facebody/src/model/ExecuteServerSideVerificationRequest.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Facebody::Model::ExecuteServerSideVerificationRequest; - -ExecuteServerSideVerificationRequest::ExecuteServerSideVerificationRequest() : - RoaServiceRequest("facebody", "2020-09-10") -{ - setResourcePath("/viapi/thirdparty/realperson/execServerSideVerification"); - setMethod(HttpRequest::Method::Post); -} - -ExecuteServerSideVerificationRequest::~ExecuteServerSideVerificationRequest() -{} - -std::string ExecuteServerSideVerificationRequest::getFacialPictureData()const -{ - return facialPictureData_; -} - -void ExecuteServerSideVerificationRequest::setFacialPictureData(const std::string& facialPictureData) -{ - facialPictureData_ = facialPictureData; - setBodyParameter("FacialPictureData", facialPictureData); -} - -std::string ExecuteServerSideVerificationRequest::getSceneType()const -{ - return sceneType_; -} - -void ExecuteServerSideVerificationRequest::setSceneType(const std::string& sceneType) -{ - sceneType_ = sceneType; - setBodyParameter("SceneType", sceneType); -} - -std::string ExecuteServerSideVerificationRequest::getCertificateNumber()const -{ - return certificateNumber_; -} - -void ExecuteServerSideVerificationRequest::setCertificateNumber(const std::string& certificateNumber) -{ - certificateNumber_ = certificateNumber; - setBodyParameter("CertificateNumber", certificateNumber); -} - -std::string ExecuteServerSideVerificationRequest::getCertificateName()const -{ - return certificateName_; -} - -void ExecuteServerSideVerificationRequest::setCertificateName(const std::string& certificateName) -{ - certificateName_ = certificateName; - setBodyParameter("CertificateName", certificateName); -} - -std::string ExecuteServerSideVerificationRequest::getFacialPictureUrl()const -{ - return facialPictureUrl_; -} - -void ExecuteServerSideVerificationRequest::setFacialPictureUrl(const std::string& facialPictureUrl) -{ - facialPictureUrl_ = facialPictureUrl; - setBodyParameter("FacialPictureUrl", facialPictureUrl); -} - diff --git a/facebody/src/model/ExecuteServerSideVerificationResult.cc b/facebody/src/model/ExecuteServerSideVerificationResult.cc deleted file mode 100644 index 1175a06d4..000000000 --- a/facebody/src/model/ExecuteServerSideVerificationResult.cc +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Facebody; -using namespace AlibabaCloud::Facebody::Model; - -ExecuteServerSideVerificationResult::ExecuteServerSideVerificationResult() : - ServiceResult() -{} - -ExecuteServerSideVerificationResult::ExecuteServerSideVerificationResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -ExecuteServerSideVerificationResult::~ExecuteServerSideVerificationResult() -{} - -void ExecuteServerSideVerificationResult::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["VerificationToken"].isNull()) - data_.verificationToken = dataNode["VerificationToken"].asString(); - if(!dataNode["Pass"].isNull()) - data_.pass = dataNode["Pass"].asString() == "true"; - if(!dataNode["Reason"].isNull()) - data_.reason = dataNode["Reason"].asString(); - if(!value["Message"].isNull()) - message_ = value["Message"].asString(); - if(!value["Code"].isNull()) - code_ = value["Code"].asString(); - -} - -std::string ExecuteServerSideVerificationResult::getMessage()const -{ - return message_; -} - -ExecuteServerSideVerificationResult::Data ExecuteServerSideVerificationResult::getData()const -{ - return data_; -} - -std::string ExecuteServerSideVerificationResult::getCode()const -{ - return code_; -} - diff --git a/facebody/src/model/PedestrianDetectAttributeResult.cc b/facebody/src/model/PedestrianDetectAttributeResult.cc index 0e13d1705..56b689abe 100644 --- a/facebody/src/model/PedestrianDetectAttributeResult.cc +++ b/facebody/src/model/PedestrianDetectAttributeResult.cc @@ -42,6 +42,10 @@ void PedestrianDetectAttributeResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["PersonNumber"].isNull()) data_.personNumber = std::stoi(dataNode["PersonNumber"].asString()); + if(!dataNode["Height"].isNull()) + data_.height = std::stol(dataNode["Height"].asString()); + if(!dataNode["Width"].isNull()) + data_.width = std::stol(dataNode["Width"].asString()); auto allAttributesNode = dataNode["Attributes"]["AttributesItem"]; for (auto dataNodeAttributesAttributesItem : allAttributesNode) {