Publish Swift.
This commit is contained in:
@@ -59,8 +59,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/DetectPedestrianRequest.h
|
||||
@@ -71,8 +69,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/ExtractFingerPrintRequest.h
|
||||
include/alibabacloud/facebody/model/ExtractFingerPrintResult.h
|
||||
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h
|
||||
@@ -174,8 +170,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/DetectPedestrianRequest.cc
|
||||
@@ -186,8 +180,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/ExtractFingerPrintRequest.cc
|
||||
src/model/ExtractFingerPrintResult.cc
|
||||
src/model/ExtractPedestrianFeatureAttrRequest.cc
|
||||
|
||||
@@ -60,8 +60,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/DetectPedestrianRequest.h"
|
||||
@@ -72,8 +70,6 @@
|
||||
#include "model/DetectVideoLivingFaceResult.h"
|
||||
#include "model/EnhanceFaceRequest.h"
|
||||
#include "model/EnhanceFaceResult.h"
|
||||
#include "model/ExecuteServerSideVerificationRequest.h"
|
||||
#include "model/ExecuteServerSideVerificationResult.h"
|
||||
#include "model/ExtractFingerPrintRequest.h"
|
||||
#include "model/ExtractFingerPrintResult.h"
|
||||
#include "model/ExtractPedestrianFeatureAttrRequest.h"
|
||||
@@ -200,9 +196,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DetectIPCPedestrianResult> DetectIPCPedestrianOutcome;
|
||||
typedef std::future<DetectIPCPedestrianOutcome> DetectIPCPedestrianOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectIPCPedestrianRequest&, const DetectIPCPedestrianOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCPedestrianAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetectIPCPedestrianOptimizedResult> DetectIPCPedestrianOptimizedOutcome;
|
||||
typedef std::future<DetectIPCPedestrianOptimizedOutcome> DetectIPCPedestrianOptimizedOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectIPCPedestrianOptimizedRequest&, const DetectIPCPedestrianOptimizedOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCPedestrianOptimizedAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetectLivingFaceResult> DetectLivingFaceOutcome;
|
||||
typedef std::future<DetectLivingFaceOutcome> DetectLivingFaceOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::DetectLivingFaceRequest&, const DetectLivingFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectLivingFaceAsyncHandler;
|
||||
@@ -218,9 +211,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::EnhanceFaceResult> EnhanceFaceOutcome;
|
||||
typedef std::future<EnhanceFaceOutcome> EnhanceFaceOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::EnhanceFaceRequest&, const EnhanceFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceFaceAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExecuteServerSideVerificationResult> ExecuteServerSideVerificationOutcome;
|
||||
typedef std::future<ExecuteServerSideVerificationOutcome> ExecuteServerSideVerificationOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::ExecuteServerSideVerificationRequest&, const ExecuteServerSideVerificationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteServerSideVerificationAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExtractFingerPrintResult> ExtractFingerPrintOutcome;
|
||||
typedef std::future<ExtractFingerPrintOutcome> ExtractFingerPrintOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::ExtractFingerPrintRequest&, const ExtractFingerPrintOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtractFingerPrintAsyncHandler;
|
||||
@@ -373,9 +363,6 @@ namespace AlibabaCloud
|
||||
DetectIPCPedestrianOutcome detectIPCPedestrian(const Model::DetectIPCPedestrianRequest &request)const;
|
||||
void detectIPCPedestrianAsync(const Model::DetectIPCPedestrianRequest& request, const DetectIPCPedestrianAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectLivingFaceOutcomeCallable detectLivingFaceCallable(const Model::DetectLivingFaceRequest& request) const;
|
||||
@@ -391,9 +378,6 @@ namespace AlibabaCloud
|
||||
EnhanceFaceOutcome enhanceFace(const Model::EnhanceFaceRequest &request)const;
|
||||
void enhanceFaceAsync(const Model::EnhanceFaceRequest& request, const EnhanceFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExecuteServerSideVerificationOutcomeCallable executeServerSideVerificationCallable(const Model::ExecuteServerSideVerificationRequest& request) const;
|
||||
ExtractFingerPrintOutcome extractFingerPrint(const Model::ExtractFingerPrintRequest &request)const;
|
||||
void extractFingerPrintAsync(const Model::ExtractFingerPrintRequest& request, const ExtractFingerPrintAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExtractFingerPrintOutcomeCallable extractFingerPrintCallable(const Model::ExtractFingerPrintRequest& request) const;
|
||||
|
||||
@@ -37,8 +37,12 @@ namespace AlibabaCloud
|
||||
float qualityScoreA;
|
||||
std::string messageTips;
|
||||
float qualityScoreB;
|
||||
long isMaskB;
|
||||
long isMaskA;
|
||||
std::vector<std::string> thresholds;
|
||||
float confidence;
|
||||
std::vector<std::string> landmarksAList;
|
||||
std::vector<std::string> landmarksBList;
|
||||
std::vector<std::string> rectAList;
|
||||
std::vector<std::string> rectBList;
|
||||
};
|
||||
|
||||
@@ -1,48 +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 <alibabacloud/facebody/FacebodyExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Facebody {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedRequest : public RoaServiceRequest {
|
||||
public:
|
||||
DetectIPCPedestrianOptimizedRequest();
|
||||
~DetectIPCPedestrianOptimizedRequest();
|
||||
long getHeight() const;
|
||||
void setHeight(long height);
|
||||
std::string getImageData() const;
|
||||
void setImageData(const std::string &imageData);
|
||||
long getWidth() const;
|
||||
void setWidth(long width);
|
||||
|
||||
private:
|
||||
long height_;
|
||||
std::string imageData_;
|
||||
long width_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Facebody
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ImageInfoListItem
|
||||
{
|
||||
struct Element
|
||||
{
|
||||
float score;
|
||||
std::vector<std::string> boxes;
|
||||
};
|
||||
std::vector<ImageInfoListItem::Element> elements;
|
||||
};
|
||||
std::vector<ImageInfoListItem> 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_
|
||||
@@ -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_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_
|
||||
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
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_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Facebody
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT ExecuteServerSideVerificationResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
bool pass;
|
||||
std::string verificationToken;
|
||||
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_
|
||||
@@ -735,42 +735,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<const AsyncCallerContext>& 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<std::packaged_task<DetectIPCPedestrianOptimizedOutcome()>>(
|
||||
[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();
|
||||
@@ -951,42 +915,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<const AsyncCallerContext>& 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<std::packaged_task<ExecuteServerSideVerificationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->executeServerSideVerification(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::ExtractFingerPrintOutcome FacebodyClient::extractFingerPrint(const ExtractFingerPrintRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -48,6 +48,10 @@ void CompareFaceResult::parse(const std::string &payload)
|
||||
data_.qualityScoreB = std::stof(dataNode["QualityScoreB"].asString());
|
||||
if(!dataNode["MessageTips"].isNull())
|
||||
data_.messageTips = dataNode["MessageTips"].asString();
|
||||
if(!dataNode["IsMaskA"].isNull())
|
||||
data_.isMaskA = std::stol(dataNode["IsMaskA"].asString());
|
||||
if(!dataNode["IsMaskB"].isNull())
|
||||
data_.isMaskB = std::stol(dataNode["IsMaskB"].asString());
|
||||
auto allThresholds = dataNode["Thresholds"]["Threshold"];
|
||||
for (auto value : allThresholds)
|
||||
data_.thresholds.push_back(value.asString());
|
||||
@@ -57,6 +61,12 @@ void CompareFaceResult::parse(const std::string &payload)
|
||||
auto allRectAList = dataNode["RectAList"]["RectA"];
|
||||
for (auto value : allRectAList)
|
||||
data_.rectAList.push_back(value.asString());
|
||||
auto allLandmarksAList = dataNode["LandmarksAList"]["landmarksAList"];
|
||||
for (auto value : allLandmarksAList)
|
||||
data_.landmarksAList.push_back(value.asString());
|
||||
auto allLandmarksBList = dataNode["LandmarksBList"]["landmarksBList"];
|
||||
for (auto value : allLandmarksBList)
|
||||
data_.landmarksBList.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
|
||||
@@ -1,55 +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 <alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h>
|
||||
|
||||
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() {}
|
||||
|
||||
long DetectIPCPedestrianOptimizedRequest::getHeight() const {
|
||||
return height_;
|
||||
}
|
||||
|
||||
void DetectIPCPedestrianOptimizedRequest::setHeight(long height) {
|
||||
height_ = height;
|
||||
setBodyParameter(std::string("height"), std::to_string(height));
|
||||
}
|
||||
|
||||
std::string DetectIPCPedestrianOptimizedRequest::getImageData() const {
|
||||
return imageData_;
|
||||
}
|
||||
|
||||
void DetectIPCPedestrianOptimizedRequest::setImageData(const std::string &imageData) {
|
||||
imageData_ = imageData;
|
||||
setBodyParameter(std::string("imageData"), imageData);
|
||||
}
|
||||
|
||||
long DetectIPCPedestrianOptimizedRequest::getWidth() const {
|
||||
return width_;
|
||||
}
|
||||
|
||||
void DetectIPCPedestrianOptimizedRequest::setWidth(long width) {
|
||||
width_ = width;
|
||||
setBodyParameter(std::string("width"), std::to_string(width));
|
||||
}
|
||||
|
||||
@@ -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 <alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
@@ -1,73 +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 <alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h>
|
||||
|
||||
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(std::string("facialPictureData"), facialPictureData);
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationRequest::getSceneType() const {
|
||||
return sceneType_;
|
||||
}
|
||||
|
||||
void ExecuteServerSideVerificationRequest::setSceneType(const std::string &sceneType) {
|
||||
sceneType_ = sceneType;
|
||||
setBodyParameter(std::string("sceneType"), sceneType);
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationRequest::getCertificateNumber() const {
|
||||
return certificateNumber_;
|
||||
}
|
||||
|
||||
void ExecuteServerSideVerificationRequest::setCertificateNumber(const std::string &certificateNumber) {
|
||||
certificateNumber_ = certificateNumber;
|
||||
setBodyParameter(std::string("certificateNumber"), certificateNumber);
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationRequest::getCertificateName() const {
|
||||
return certificateName_;
|
||||
}
|
||||
|
||||
void ExecuteServerSideVerificationRequest::setCertificateName(const std::string &certificateName) {
|
||||
certificateName_ = certificateName;
|
||||
setBodyParameter(std::string("certificateName"), certificateName);
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationRequest::getFacialPictureUrl() const {
|
||||
return facialPictureUrl_;
|
||||
}
|
||||
|
||||
void ExecuteServerSideVerificationRequest::setFacialPictureUrl(const std::string &facialPictureUrl) {
|
||||
facialPictureUrl_ = facialPictureUrl;
|
||||
setBodyParameter(std::string("facialPictureUrl"), facialPictureUrl);
|
||||
}
|
||||
|
||||
@@ -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 <alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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["Pass"].isNull())
|
||||
data_.pass = dataNode["Pass"].asString() == "true";
|
||||
if(!dataNode["VerificationToken"].isNull())
|
||||
data_.verificationToken = dataNode["VerificationToken"].asString();
|
||||
if(!dataNode["Reason"].isNull())
|
||||
data_.reason = dataNode["Reason"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ExecuteServerSideVerificationResult::Data ExecuteServerSideVerificationResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ExecuteServerSideVerificationResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user