Add API ContrastFaceVerify.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-04-02 Version: 1.36.337
|
||||
- Add API ContrastFaceVerify.
|
||||
|
||||
2020-04-02 Version: 1.36.336
|
||||
- Support for WaitTimeSeconds for DescribeExecution.
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ set(cloudauth_public_header
|
||||
set(cloudauth_public_header_model
|
||||
include/alibabacloud/cloudauth/model/CompareFacesRequest.h
|
||||
include/alibabacloud/cloudauth/model/CompareFacesResult.h
|
||||
include/alibabacloud/cloudauth/model/ContrastFaceVerifyRequest.h
|
||||
include/alibabacloud/cloudauth/model/ContrastFaceVerifyResult.h
|
||||
include/alibabacloud/cloudauth/model/CreateAuthKeyRequest.h
|
||||
include/alibabacloud/cloudauth/model/CreateAuthKeyResult.h
|
||||
include/alibabacloud/cloudauth/model/CreateRPSDKRequest.h
|
||||
@@ -76,6 +78,8 @@ set(cloudauth_src
|
||||
src/CloudauthClient.cc
|
||||
src/model/CompareFacesRequest.cc
|
||||
src/model/CompareFacesResult.cc
|
||||
src/model/ContrastFaceVerifyRequest.cc
|
||||
src/model/ContrastFaceVerifyResult.cc
|
||||
src/model/CreateAuthKeyRequest.cc
|
||||
src/model/CreateAuthKeyResult.cc
|
||||
src/model/CreateRPSDKRequest.cc
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "CloudauthExport.h"
|
||||
#include "model/CompareFacesRequest.h"
|
||||
#include "model/CompareFacesResult.h"
|
||||
#include "model/ContrastFaceVerifyRequest.h"
|
||||
#include "model/ContrastFaceVerifyResult.h"
|
||||
#include "model/CreateAuthKeyRequest.h"
|
||||
#include "model/CreateAuthKeyResult.h"
|
||||
#include "model/CreateRPSDKRequest.h"
|
||||
@@ -84,6 +86,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CompareFacesResult> CompareFacesOutcome;
|
||||
typedef std::future<CompareFacesOutcome> CompareFacesOutcomeCallable;
|
||||
typedef std::function<void(const CloudauthClient*, const Model::CompareFacesRequest&, const CompareFacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFacesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ContrastFaceVerifyResult> ContrastFaceVerifyOutcome;
|
||||
typedef std::future<ContrastFaceVerifyOutcome> ContrastFaceVerifyOutcomeCallable;
|
||||
typedef std::function<void(const CloudauthClient*, const Model::ContrastFaceVerifyRequest&, const ContrastFaceVerifyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ContrastFaceVerifyAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateAuthKeyResult> CreateAuthKeyOutcome;
|
||||
typedef std::future<CreateAuthKeyOutcome> CreateAuthKeyOutcomeCallable;
|
||||
typedef std::function<void(const CloudauthClient*, const Model::CreateAuthKeyRequest&, const CreateAuthKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAuthKeyAsyncHandler;
|
||||
@@ -164,6 +169,9 @@ namespace AlibabaCloud
|
||||
CompareFacesOutcome compareFaces(const Model::CompareFacesRequest &request)const;
|
||||
void compareFacesAsync(const Model::CompareFacesRequest& request, const CompareFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CompareFacesOutcomeCallable compareFacesCallable(const Model::CompareFacesRequest& request) const;
|
||||
ContrastFaceVerifyOutcome contrastFaceVerify(const Model::ContrastFaceVerifyRequest &request)const;
|
||||
void contrastFaceVerifyAsync(const Model::ContrastFaceVerifyRequest& request, const ContrastFaceVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ContrastFaceVerifyOutcomeCallable contrastFaceVerifyCallable(const Model::ContrastFaceVerifyRequest& request) const;
|
||||
CreateAuthKeyOutcome createAuthKey(const Model::CreateAuthKeyRequest &request)const;
|
||||
void createAuthKeyAsync(const Model::CreateAuthKeyRequest& request, const CreateAuthKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAuthKeyOutcomeCallable createAuthKeyCallable(const Model::CreateAuthKeyRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudauth/CloudauthExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_EXPORT ContrastFaceVerifyRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ContrastFaceVerifyRequest();
|
||||
~ContrastFaceVerifyRequest();
|
||||
|
||||
std::string getProductCode()const;
|
||||
void setProductCode(const std::string& productCode);
|
||||
std::string getOssObjectName()const;
|
||||
void setOssObjectName(const std::string& ossObjectName);
|
||||
std::string getFaceContrastPicture()const;
|
||||
void setFaceContrastPicture(const std::string& faceContrastPicture);
|
||||
std::string getCertName()const;
|
||||
void setCertName(const std::string& certName);
|
||||
std::string getIp()const;
|
||||
void setIp(const std::string& ip);
|
||||
std::string getMobile()const;
|
||||
void setMobile(const std::string& mobile);
|
||||
std::string getDeviceToken()const;
|
||||
void setDeviceToken(const std::string& deviceToken);
|
||||
std::string getUserId()const;
|
||||
void setUserId(const std::string& userId);
|
||||
std::string getCertifyId()const;
|
||||
void setCertifyId(const std::string& certifyId);
|
||||
std::string getCertNo()const;
|
||||
void setCertNo(const std::string& certNo);
|
||||
std::string getOuterOrderNo()const;
|
||||
void setOuterOrderNo(const std::string& outerOrderNo);
|
||||
std::string getCertType()const;
|
||||
void setCertType(const std::string& certType);
|
||||
std::string getFaceContrastPictureUrl()const;
|
||||
void setFaceContrastPictureUrl(const std::string& faceContrastPictureUrl);
|
||||
long getSceneId()const;
|
||||
void setSceneId(long sceneId);
|
||||
std::string getOssBucketName()const;
|
||||
void setOssBucketName(const std::string& ossBucketName);
|
||||
|
||||
private:
|
||||
std::string productCode_;
|
||||
std::string ossObjectName_;
|
||||
std::string faceContrastPicture_;
|
||||
std::string certName_;
|
||||
std::string ip_;
|
||||
std::string mobile_;
|
||||
std::string deviceToken_;
|
||||
std::string userId_;
|
||||
std::string certifyId_;
|
||||
std::string certNo_;
|
||||
std::string outerOrderNo_;
|
||||
std::string certType_;
|
||||
std::string faceContrastPictureUrl_;
|
||||
long sceneId_;
|
||||
std::string ossBucketName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYRESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudauth/CloudauthExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_EXPORT ContrastFaceVerifyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ResultObject
|
||||
{
|
||||
std::string passed;
|
||||
std::string identityInfo;
|
||||
std::string materialInfo;
|
||||
};
|
||||
|
||||
|
||||
ContrastFaceVerifyResult();
|
||||
explicit ContrastFaceVerifyResult(const std::string &payload);
|
||||
~ContrastFaceVerifyResult();
|
||||
ResultObject getResultObject()const;
|
||||
std::string getMessage()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
ResultObject resultObject_;
|
||||
std::string message_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CONTRASTFACEVERIFYRESULT_H_
|
||||
@@ -39,31 +39,52 @@ namespace AlibabaCloud
|
||||
void setProductCode(const std::string& productCode);
|
||||
std::string getFaceContrastPicture()const;
|
||||
void setFaceContrastPicture(const std::string& faceContrastPicture);
|
||||
std::string getCertName()const;
|
||||
void setCertName(const std::string& certName);
|
||||
std::string getUserId()const;
|
||||
void setUserId(const std::string& userId);
|
||||
std::string getCertifyId()const;
|
||||
void setCertifyId(const std::string& certifyId);
|
||||
std::string getCertNo()const;
|
||||
void setCertNo(const std::string& certNo);
|
||||
std::string getOuterOrderNo()const;
|
||||
void setOuterOrderNo(const std::string& outerOrderNo);
|
||||
std::string getCertType()const;
|
||||
void setCertType(const std::string& certType);
|
||||
long getSceneId()const;
|
||||
void setSceneId(long sceneId);
|
||||
std::string getReturnUrl()const;
|
||||
void setReturnUrl(const std::string& returnUrl);
|
||||
std::string getFaceContrastPictureUrl()const;
|
||||
void setFaceContrastPictureUrl(const std::string& faceContrastPictureUrl);
|
||||
std::string getMetaInfo()const;
|
||||
void setMetaInfo(const std::string& metaInfo);
|
||||
std::string getOssObjectName()const;
|
||||
void setOssObjectName(const std::string& ossObjectName);
|
||||
std::string getCertName()const;
|
||||
void setCertName(const std::string& certName);
|
||||
std::string getIp()const;
|
||||
void setIp(const std::string& ip);
|
||||
std::string getMobile()const;
|
||||
void setMobile(const std::string& mobile);
|
||||
long getSceneId()const;
|
||||
void setSceneId(long sceneId);
|
||||
std::string getOssBucketName()const;
|
||||
void setOssBucketName(const std::string& ossBucketName);
|
||||
std::string getReturnUrl()const;
|
||||
void setReturnUrl(const std::string& returnUrl);
|
||||
|
||||
private:
|
||||
std::string productCode_;
|
||||
std::string faceContrastPicture_;
|
||||
std::string certName_;
|
||||
std::string userId_;
|
||||
std::string certifyId_;
|
||||
std::string certNo_;
|
||||
std::string outerOrderNo_;
|
||||
std::string certType_;
|
||||
long sceneId_;
|
||||
std::string returnUrl_;
|
||||
std::string faceContrastPictureUrl_;
|
||||
std::string metaInfo_;
|
||||
std::string ossObjectName_;
|
||||
std::string certName_;
|
||||
std::string ip_;
|
||||
std::string mobile_;
|
||||
long sceneId_;
|
||||
std::string ossBucketName_;
|
||||
std::string returnUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,6 +87,42 @@ CloudauthClient::CompareFacesOutcomeCallable CloudauthClient::compareFacesCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CloudauthClient::ContrastFaceVerifyOutcome CloudauthClient::contrastFaceVerify(const ContrastFaceVerifyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ContrastFaceVerifyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ContrastFaceVerifyOutcome(ContrastFaceVerifyResult(outcome.result()));
|
||||
else
|
||||
return ContrastFaceVerifyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CloudauthClient::contrastFaceVerifyAsync(const ContrastFaceVerifyRequest& request, const ContrastFaceVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, contrastFaceVerify(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CloudauthClient::ContrastFaceVerifyOutcomeCallable CloudauthClient::contrastFaceVerifyCallable(const ContrastFaceVerifyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ContrastFaceVerifyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->contrastFaceVerify(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CloudauthClient::CreateAuthKeyOutcome CloudauthClient::createAuthKey(const CreateAuthKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
194
cloudauth/src/model/ContrastFaceVerifyRequest.cc
Normal file
194
cloudauth/src/model/ContrastFaceVerifyRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/cloudauth/model/ContrastFaceVerifyRequest.h>
|
||||
|
||||
using AlibabaCloud::Cloudauth::Model::ContrastFaceVerifyRequest;
|
||||
|
||||
ContrastFaceVerifyRequest::ContrastFaceVerifyRequest() :
|
||||
RpcServiceRequest("cloudauth", "2019-03-07", "ContrastFaceVerify")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ContrastFaceVerifyRequest::~ContrastFaceVerifyRequest()
|
||||
{}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getOssObjectName()const
|
||||
{
|
||||
return ossObjectName_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setOssObjectName(const std::string& ossObjectName)
|
||||
{
|
||||
ossObjectName_ = ossObjectName;
|
||||
setParameter("OssObjectName", ossObjectName);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getFaceContrastPicture()const
|
||||
{
|
||||
return faceContrastPicture_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setFaceContrastPicture(const std::string& faceContrastPicture)
|
||||
{
|
||||
faceContrastPicture_ = faceContrastPicture;
|
||||
setParameter("FaceContrastPicture", faceContrastPicture);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getCertName()const
|
||||
{
|
||||
return certName_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setCertName(const std::string& certName)
|
||||
{
|
||||
certName_ = certName;
|
||||
setParameter("CertName", certName);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getMobile()const
|
||||
{
|
||||
return mobile_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setMobile(const std::string& mobile)
|
||||
{
|
||||
mobile_ = mobile;
|
||||
setParameter("Mobile", mobile);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getDeviceToken()const
|
||||
{
|
||||
return deviceToken_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setDeviceToken(const std::string& deviceToken)
|
||||
{
|
||||
deviceToken_ = deviceToken;
|
||||
setParameter("DeviceToken", deviceToken);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getCertifyId()const
|
||||
{
|
||||
return certifyId_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setCertifyId(const std::string& certifyId)
|
||||
{
|
||||
certifyId_ = certifyId;
|
||||
setParameter("CertifyId", certifyId);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getCertNo()const
|
||||
{
|
||||
return certNo_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setCertNo(const std::string& certNo)
|
||||
{
|
||||
certNo_ = certNo;
|
||||
setParameter("CertNo", certNo);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getOuterOrderNo()const
|
||||
{
|
||||
return outerOrderNo_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setOuterOrderNo(const std::string& outerOrderNo)
|
||||
{
|
||||
outerOrderNo_ = outerOrderNo;
|
||||
setParameter("OuterOrderNo", outerOrderNo);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getCertType()const
|
||||
{
|
||||
return certType_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setCertType(const std::string& certType)
|
||||
{
|
||||
certType_ = certType;
|
||||
setParameter("CertType", certType);
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getFaceContrastPictureUrl()const
|
||||
{
|
||||
return faceContrastPictureUrl_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setFaceContrastPictureUrl(const std::string& faceContrastPictureUrl)
|
||||
{
|
||||
faceContrastPictureUrl_ = faceContrastPictureUrl;
|
||||
setParameter("FaceContrastPictureUrl", faceContrastPictureUrl);
|
||||
}
|
||||
|
||||
long ContrastFaceVerifyRequest::getSceneId()const
|
||||
{
|
||||
return sceneId_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setSceneId(long sceneId)
|
||||
{
|
||||
sceneId_ = sceneId;
|
||||
setParameter("SceneId", std::to_string(sceneId));
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyRequest::getOssBucketName()const
|
||||
{
|
||||
return ossBucketName_;
|
||||
}
|
||||
|
||||
void ContrastFaceVerifyRequest::setOssBucketName(const std::string& ossBucketName)
|
||||
{
|
||||
ossBucketName_ = ossBucketName;
|
||||
setParameter("OssBucketName", ossBucketName);
|
||||
}
|
||||
|
||||
70
cloudauth/src/model/ContrastFaceVerifyResult.cc
Normal file
70
cloudauth/src/model/ContrastFaceVerifyResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/cloudauth/model/ContrastFaceVerifyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cloudauth;
|
||||
using namespace AlibabaCloud::Cloudauth::Model;
|
||||
|
||||
ContrastFaceVerifyResult::ContrastFaceVerifyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ContrastFaceVerifyResult::ContrastFaceVerifyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ContrastFaceVerifyResult::~ContrastFaceVerifyResult()
|
||||
{}
|
||||
|
||||
void ContrastFaceVerifyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultObjectNode = value["ResultObject"];
|
||||
if(!resultObjectNode["Passed"].isNull())
|
||||
resultObject_.passed = resultObjectNode["Passed"].asString();
|
||||
if(!resultObjectNode["IdentityInfo"].isNull())
|
||||
resultObject_.identityInfo = resultObjectNode["IdentityInfo"].asString();
|
||||
if(!resultObjectNode["MaterialInfo"].isNull())
|
||||
resultObject_.materialInfo = resultObjectNode["MaterialInfo"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
ContrastFaceVerifyResult::ResultObject ContrastFaceVerifyResult::getResultObject()const
|
||||
{
|
||||
return resultObject_;
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string ContrastFaceVerifyResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -49,15 +49,26 @@ void InitFaceVerifyRequest::setFaceContrastPicture(const std::string& faceContra
|
||||
setParameter("FaceContrastPicture", faceContrastPicture);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getCertName()const
|
||||
std::string InitFaceVerifyRequest::getUserId()const
|
||||
{
|
||||
return certName_;
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setCertName(const std::string& certName)
|
||||
void InitFaceVerifyRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
certName_ = certName;
|
||||
setParameter("CertName", certName);
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getCertifyId()const
|
||||
{
|
||||
return certifyId_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setCertifyId(const std::string& certifyId)
|
||||
{
|
||||
certifyId_ = certifyId;
|
||||
setParameter("CertifyId", certifyId);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getCertNo()const
|
||||
@@ -93,26 +104,15 @@ void InitFaceVerifyRequest::setCertType(const std::string& certType)
|
||||
setParameter("CertType", certType);
|
||||
}
|
||||
|
||||
long InitFaceVerifyRequest::getSceneId()const
|
||||
std::string InitFaceVerifyRequest::getFaceContrastPictureUrl()const
|
||||
{
|
||||
return sceneId_;
|
||||
return faceContrastPictureUrl_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setSceneId(long sceneId)
|
||||
void InitFaceVerifyRequest::setFaceContrastPictureUrl(const std::string& faceContrastPictureUrl)
|
||||
{
|
||||
sceneId_ = sceneId;
|
||||
setParameter("SceneId", std::to_string(sceneId));
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getReturnUrl()const
|
||||
{
|
||||
return returnUrl_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setReturnUrl(const std::string& returnUrl)
|
||||
{
|
||||
returnUrl_ = returnUrl;
|
||||
setParameter("ReturnUrl", returnUrl);
|
||||
faceContrastPictureUrl_ = faceContrastPictureUrl;
|
||||
setParameter("FaceContrastPictureUrl", faceContrastPictureUrl);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getMetaInfo()const
|
||||
@@ -126,3 +126,80 @@ void InitFaceVerifyRequest::setMetaInfo(const std::string& metaInfo)
|
||||
setParameter("MetaInfo", metaInfo);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getOssObjectName()const
|
||||
{
|
||||
return ossObjectName_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setOssObjectName(const std::string& ossObjectName)
|
||||
{
|
||||
ossObjectName_ = ossObjectName;
|
||||
setParameter("OssObjectName", ossObjectName);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getCertName()const
|
||||
{
|
||||
return certName_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setCertName(const std::string& certName)
|
||||
{
|
||||
certName_ = certName;
|
||||
setParameter("CertName", certName);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getMobile()const
|
||||
{
|
||||
return mobile_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setMobile(const std::string& mobile)
|
||||
{
|
||||
mobile_ = mobile;
|
||||
setParameter("Mobile", mobile);
|
||||
}
|
||||
|
||||
long InitFaceVerifyRequest::getSceneId()const
|
||||
{
|
||||
return sceneId_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setSceneId(long sceneId)
|
||||
{
|
||||
sceneId_ = sceneId;
|
||||
setParameter("SceneId", std::to_string(sceneId));
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getOssBucketName()const
|
||||
{
|
||||
return ossBucketName_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setOssBucketName(const std::string& ossBucketName)
|
||||
{
|
||||
ossBucketName_ = ossBucketName;
|
||||
setParameter("OssBucketName", ossBucketName);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getReturnUrl()const
|
||||
{
|
||||
return returnUrl_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setReturnUrl(const std::string& returnUrl)
|
||||
{
|
||||
returnUrl_ = returnUrl;
|
||||
setParameter("ReturnUrl", returnUrl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user