|
@@ -5,6 +5,7 @@
|
|
|
namespace AlibabaCloud\SDK\Cloudauth\V20190307;
|
|
|
|
|
|
use AlibabaCloud\Endpoint\Endpoint;
|
|
|
+use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CompareFacesRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CompareFacesResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CompareFaceVerifyRequest;
|
|
@@ -14,72 +15,27 @@ use AlibabaCloud\SDK\Cloudauth\V20190307\Models\ContrastFaceVerifyRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\ContrastFaceVerifyResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateAuthKeyRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateAuthKeyResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateFaceConfigRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateFaceConfigResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateRPSDKRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateRPSDKResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateVerifySDKRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateVerifySDKResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateVerifySettingRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateVerifySettingResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateWhitelistRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\CreateWhitelistResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DeleteWhitelistRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DeleteWhitelistResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeAppInfoRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeAppInfoResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeDeviceInfoRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeDeviceInfoResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceConfigRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceConfigResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceUsageRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceUsageResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceVerifyRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeFaceVerifyResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeOssUploadTokenRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeOssUploadTokenResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeRPSDKRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeRPSDKResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeSdkUrlRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeSdkUrlResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUpdatePackageResultRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUpdatePackageResultResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUploadInfoRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUploadInfoResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUserStatusRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeUserStatusResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyRecordsRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyRecordsResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyResultRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyResultResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifySDKRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifySDKResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifySettingRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifySettingResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyTokenRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyTokenResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyUsageRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeVerifyUsageResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeWhitelistRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DescribeWhitelistResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DetectFaceAttributesRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\DetectFaceAttributesResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\InitDeviceRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\InitDeviceResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\InitFaceVerifyRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\InitFaceVerifyResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\LivenessFaceVerifyRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\LivenessFaceVerifyResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\ModifyDeviceInfoRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\ModifyDeviceInfoResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateAppPackageRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateAppPackageResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateFaceConfigRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateFaceConfigResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateVerifySettingRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\UpdateVerifySettingResponse;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\VerifyDeviceRequest;
|
|
|
-use AlibabaCloud\SDK\Cloudauth\V20190307\Models\VerifyDeviceResponse;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\VerifyMaterialRequest;
|
|
|
use AlibabaCloud\SDK\Cloudauth\V20190307\Models\VerifyMaterialResponse;
|
|
|
use AlibabaCloud\SDK\OpenPlatform\V20191219\Models\AuthorizeFileUploadRequest;
|
|
@@ -89,14 +45,14 @@ use AlibabaCloud\SDK\OSS\OSS;
|
|
|
use AlibabaCloud\SDK\OSS\OSS\PostObjectRequest;
|
|
|
use AlibabaCloud\SDK\OSS\OSS\PostObjectRequest\header;
|
|
|
use AlibabaCloud\Tea\FileForm\FileForm\FileField;
|
|
|
-use AlibabaCloud\Tea\Rpc\Rpc;
|
|
|
use AlibabaCloud\Tea\Rpc\Rpc\Config;
|
|
|
-use AlibabaCloud\Tea\RpcUtils\RpcUtils;
|
|
|
-use AlibabaCloud\Tea\Tea;
|
|
|
use AlibabaCloud\Tea\Utils\Utils;
|
|
|
use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
|
|
|
+use Darabonba\OpenApi\Models\OpenApiRequest;
|
|
|
+use Darabonba\OpenApi\Models\Params;
|
|
|
+use Darabonba\OpenApi\OpenApiClient;
|
|
|
|
|
|
-class Cloudauth extends Rpc
|
|
|
+class Cloudauth extends OpenApiClient
|
|
|
{
|
|
|
public function __construct($config)
|
|
|
{
|
|
@@ -107,178 +63,26 @@ class Cloudauth extends Rpc
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeWhitelistRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeWhitelistResponse
|
|
|
- */
|
|
|
- public function describeWhitelist($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeWhitelistResponse::fromMap($this->doRequest('DescribeWhitelist', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeWhitelistRequest $request
|
|
|
- *
|
|
|
- * @return DescribeWhitelistResponse
|
|
|
- */
|
|
|
- public function describeWhitelistSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeWhitelist($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DeleteWhitelistRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DeleteWhitelistResponse
|
|
|
- */
|
|
|
- public function deleteWhitelist($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DeleteWhitelistResponse::fromMap($this->doRequest('DeleteWhitelist', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DeleteWhitelistRequest $request
|
|
|
- *
|
|
|
- * @return DeleteWhitelistResponse
|
|
|
- */
|
|
|
- public function deleteWhitelistSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->deleteWhitelist($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateWhitelistRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return CreateWhitelistResponse
|
|
|
- */
|
|
|
- public function createWhitelist($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return CreateWhitelistResponse::fromMap($this->doRequest('CreateWhitelist', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateWhitelistRequest $request
|
|
|
- *
|
|
|
- * @return CreateWhitelistResponse
|
|
|
- */
|
|
|
- public function createWhitelistSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->createWhitelist($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceConfigRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeFaceConfigResponse
|
|
|
- */
|
|
|
- public function describeFaceConfig($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeFaceConfigResponse::fromMap($this->doRequest('DescribeFaceConfig', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceConfigRequest $request
|
|
|
- *
|
|
|
- * @return DescribeFaceConfigResponse
|
|
|
- */
|
|
|
- public function describeFaceConfigSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeFaceConfig($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param UpdateFaceConfigRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return UpdateFaceConfigResponse
|
|
|
- */
|
|
|
- public function updateFaceConfig($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return UpdateFaceConfigResponse::fromMap($this->doRequest('UpdateFaceConfig', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param UpdateFaceConfigRequest $request
|
|
|
- *
|
|
|
- * @return UpdateFaceConfigResponse
|
|
|
- */
|
|
|
- public function updateFaceConfigSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->updateFaceConfig($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateFaceConfigRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return CreateFaceConfigResponse
|
|
|
- */
|
|
|
- public function createFaceConfig($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return CreateFaceConfigResponse::fromMap($this->doRequest('CreateFaceConfig', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateFaceConfigRequest $request
|
|
|
- *
|
|
|
- * @return CreateFaceConfigResponse
|
|
|
- */
|
|
|
- public function createFaceConfigSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->createFaceConfig($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param LivenessFaceVerifyRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return LivenessFaceVerifyResponse
|
|
|
- */
|
|
|
- public function livenessFaceVerify($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return LivenessFaceVerifyResponse::fromMap($this->doRequest('LivenessFaceVerify', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param LivenessFaceVerifyRequest $request
|
|
|
+ * @param string $productId
|
|
|
+ * @param string $regionId
|
|
|
+ * @param string $endpointRule
|
|
|
+ * @param string $network
|
|
|
+ * @param string $suffix
|
|
|
+ * @param string[] $endpointMap
|
|
|
+ * @param string $endpoint
|
|
|
*
|
|
|
- * @return LivenessFaceVerifyResponse
|
|
|
+ * @return string
|
|
|
*/
|
|
|
- public function livenessFaceVerifySimply($request)
|
|
|
+ public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint)
|
|
|
{
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
+ if (!Utils::empty_($endpoint)) {
|
|
|
+ return $endpoint;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) {
|
|
|
+ return @$endpointMap[$regionId];
|
|
|
+ }
|
|
|
|
|
|
- return $this->livenessFaceVerify($request, $runtime);
|
|
|
+ return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -287,11 +91,68 @@ class Cloudauth extends Rpc
|
|
|
*
|
|
|
* @return CompareFaceVerifyResponse
|
|
|
*/
|
|
|
- public function compareFaceVerify($request, $runtime)
|
|
|
+ public function compareFaceVerifyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->crop)) {
|
|
|
+ $body['Crop'] = $request->crop;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->outerOrderNo)) {
|
|
|
+ $body['OuterOrderNo'] = $request->outerOrderNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->productCode)) {
|
|
|
+ $body['ProductCode'] = $request->productCode;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sceneId)) {
|
|
|
+ $body['SceneId'] = $request->sceneId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceCertifyId)) {
|
|
|
+ $body['SourceCertifyId'] = $request->sourceCertifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceFaceContrastPicture)) {
|
|
|
+ $body['SourceFaceContrastPicture'] = $request->sourceFaceContrastPicture;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceFaceContrastPictureUrl)) {
|
|
|
+ $body['SourceFaceContrastPictureUrl'] = $request->sourceFaceContrastPictureUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceOssBucketName)) {
|
|
|
+ $body['SourceOssBucketName'] = $request->sourceOssBucketName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceOssObjectName)) {
|
|
|
+ $body['SourceOssObjectName'] = $request->sourceOssObjectName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetCertifyId)) {
|
|
|
+ $body['TargetCertifyId'] = $request->targetCertifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetFaceContrastPicture)) {
|
|
|
+ $body['TargetFaceContrastPicture'] = $request->targetFaceContrastPicture;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetFaceContrastPictureUrl)) {
|
|
|
+ $body['TargetFaceContrastPictureUrl'] = $request->targetFaceContrastPictureUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetOssBucketName)) {
|
|
|
+ $body['TargetOssBucketName'] = $request->targetOssBucketName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetOssObjectName)) {
|
|
|
+ $body['TargetOssObjectName'] = $request->targetOssObjectName;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'CompareFaceVerify',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return CompareFaceVerifyResponse::fromMap($this->doRequest('CompareFaceVerify', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return CompareFaceVerifyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -299,111 +160,63 @@ class Cloudauth extends Rpc
|
|
|
*
|
|
|
* @return CompareFaceVerifyResponse
|
|
|
*/
|
|
|
- public function compareFaceVerifySimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->compareFaceVerify($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeSdkUrlRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeSdkUrlResponse
|
|
|
- */
|
|
|
- public function describeSdkUrl($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeSdkUrlResponse::fromMap($this->doRequest('DescribeSdkUrl', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeSdkUrlRequest $request
|
|
|
- *
|
|
|
- * @return DescribeSdkUrlResponse
|
|
|
- */
|
|
|
- public function describeSdkUrlSimply($request)
|
|
|
+ public function compareFaceVerify($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeSdkUrl($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeUpdatePackageResultRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeUpdatePackageResultResponse
|
|
|
- */
|
|
|
- public function describeUpdatePackageResult($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeUpdatePackageResultResponse::fromMap($this->doRequest('DescribeUpdatePackageResult', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return $this->compareFaceVerifyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeUpdatePackageResultRequest $request
|
|
|
- *
|
|
|
- * @return DescribeUpdatePackageResultResponse
|
|
|
- */
|
|
|
- public function describeUpdatePackageResultSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeUpdatePackageResult($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param UpdateAppPackageRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return UpdateAppPackageResponse
|
|
|
- */
|
|
|
- public function updateAppPackage($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return UpdateAppPackageResponse::fromMap($this->doRequest('UpdateAppPackage', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param UpdateAppPackageRequest $request
|
|
|
- *
|
|
|
- * @return UpdateAppPackageResponse
|
|
|
- */
|
|
|
- public function updateAppPackageSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->updateAppPackage($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeAppInfoRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param CompareFacesRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeAppInfoResponse
|
|
|
+ * @return CompareFacesResponse
|
|
|
*/
|
|
|
- public function describeAppInfo($request, $runtime)
|
|
|
+ public function compareFacesWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->sourceImageType)) {
|
|
|
+ $body['SourceImageType'] = $request->sourceImageType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sourceImageValue)) {
|
|
|
+ $body['SourceImageValue'] = $request->sourceImageValue;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetImageType)) {
|
|
|
+ $body['TargetImageType'] = $request->targetImageType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->targetImageValue)) {
|
|
|
+ $body['TargetImageValue'] = $request->targetImageValue;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'CompareFaces',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeAppInfoResponse::fromMap($this->doRequest('DescribeAppInfo', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return CompareFacesResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeAppInfoRequest $request
|
|
|
+ * @param CompareFacesRequest $request
|
|
|
*
|
|
|
- * @return DescribeAppInfoResponse
|
|
|
+ * @return CompareFacesResponse
|
|
|
*/
|
|
|
- public function describeAppInfoSimply($request)
|
|
|
+ public function compareFaces($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeAppInfo($request, $runtime);
|
|
|
+ return $this->compareFacesWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -412,11 +225,85 @@ class Cloudauth extends Rpc
|
|
|
*
|
|
|
* @return ContrastFaceVerifyResponse
|
|
|
*/
|
|
|
- public function contrastFaceVerify($request, $runtime)
|
|
|
+ public function contrastFaceVerifyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->model)) {
|
|
|
+ $query['Model'] = $request->model;
|
|
|
+ }
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->certName)) {
|
|
|
+ $body['CertName'] = $request->certName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certNo)) {
|
|
|
+ $body['CertNo'] = $request->certNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certType)) {
|
|
|
+ $body['CertType'] = $request->certType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certifyId)) {
|
|
|
+ $body['CertifyId'] = $request->certifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->crop)) {
|
|
|
+ $body['Crop'] = $request->crop;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->deviceToken)) {
|
|
|
+ $body['DeviceToken'] = $request->deviceToken;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->encryptType)) {
|
|
|
+ $body['EncryptType'] = $request->encryptType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastFile)) {
|
|
|
+ $body['FaceContrastFile'] = $request->faceContrastFile;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPicture)) {
|
|
|
+ $body['FaceContrastPicture'] = $request->faceContrastPicture;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPictureUrl)) {
|
|
|
+ $body['FaceContrastPictureUrl'] = $request->faceContrastPictureUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ip)) {
|
|
|
+ $body['Ip'] = $request->ip;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->mobile)) {
|
|
|
+ $body['Mobile'] = $request->mobile;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossBucketName)) {
|
|
|
+ $body['OssBucketName'] = $request->ossBucketName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossObjectName)) {
|
|
|
+ $body['OssObjectName'] = $request->ossObjectName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->outerOrderNo)) {
|
|
|
+ $body['OuterOrderNo'] = $request->outerOrderNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->productCode)) {
|
|
|
+ $body['ProductCode'] = $request->productCode;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sceneId)) {
|
|
|
+ $body['SceneId'] = $request->sceneId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userId)) {
|
|
|
+ $body['UserId'] = $request->userId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'ContrastFaceVerify',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return ContrastFaceVerifyResponse::fromMap($this->doRequest('ContrastFaceVerify', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return ContrastFaceVerifyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -424,11 +311,11 @@ class Cloudauth extends Rpc
|
|
|
*
|
|
|
* @return ContrastFaceVerifyResponse
|
|
|
*/
|
|
|
- public function contrastFaceVerifySimply($request)
|
|
|
+ public function contrastFaceVerify($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->contrastFaceVerify($request, $runtime);
|
|
|
+ return $this->contrastFaceVerifyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -442,710 +329,857 @@ class Cloudauth extends Rpc
|
|
|
// Step 0: init client
|
|
|
$accessKeyId = $this->_credential->getAccessKeyId();
|
|
|
$accessKeySecret = $this->_credential->getAccessKeySecret();
|
|
|
+ $securityToken = $this->_credential->getSecurityToken();
|
|
|
+ $credentialType = $this->_credential->getType();
|
|
|
$openPlatformEndpoint = $this->_openPlatformEndpoint;
|
|
|
- if (Utils::isUnset($openPlatformEndpoint)) {
|
|
|
- $openPlatformEndpoint = 'openplatform.aliyuncs.com';
|
|
|
- }
|
|
|
- $authConfig = new Config([
|
|
|
- 'accessKeyId' => $accessKeyId,
|
|
|
- 'accessKeySecret' => $accessKeySecret,
|
|
|
- 'type' => 'access_key',
|
|
|
- 'endpoint' => $openPlatformEndpoint,
|
|
|
- 'protocol' => $this->_protocol,
|
|
|
- 'regionId' => $this->_regionId,
|
|
|
- ]);
|
|
|
- $authClient = new OpenPlatform($authConfig);
|
|
|
- $authRequest = new AuthorizeFileUploadRequest([
|
|
|
- 'product' => 'Cloudauth',
|
|
|
- 'regionId' => $this->_regionId,
|
|
|
- ]);
|
|
|
- $authResponse = new AuthorizeFileUploadResponse([]);
|
|
|
- $ossConfig = new \AlibabaCloud\SDK\OSS\OSS\Config([
|
|
|
- 'accessKeySecret' => $accessKeySecret,
|
|
|
- 'type' => 'access_key',
|
|
|
- 'protocol' => $this->_protocol,
|
|
|
- 'regionId' => $this->_regionId,
|
|
|
- ]);
|
|
|
- $ossClient = null;
|
|
|
- $fileObj = new FileField([]);
|
|
|
- $ossHeader = new header([]);
|
|
|
- $uploadRequest = new PostObjectRequest([]);
|
|
|
- $ossRuntime = new \AlibabaCloud\Tea\OSSUtils\OSSUtils\RuntimeOptions([]);
|
|
|
- RpcUtils::convert($runtime, $ossRuntime);
|
|
|
- $contrastFaceVerifyReq = new ContrastFaceVerifyRequest([]);
|
|
|
- RpcUtils::convert($request, $contrastFaceVerifyReq);
|
|
|
- $authResponse = $authClient->authorizeFileUploadWithOptions($authRequest, $runtime);
|
|
|
- $ossConfig->accessKeyId = $authResponse->accessKeyId;
|
|
|
- $ossConfig->endpoint = RpcUtils::getEndpoint($authResponse->endpoint, $authResponse->useAccelerate, $this->_endpointType);
|
|
|
- $ossClient = new OSS($ossConfig);
|
|
|
- $fileObj = new FileField([
|
|
|
- 'filename' => $authResponse->objectKey,
|
|
|
- 'content' => $request->faceContrastFileObject,
|
|
|
- 'contentType' => '',
|
|
|
- ]);
|
|
|
- $ossHeader = new header([
|
|
|
- 'accessKeyId' => $authResponse->accessKeyId,
|
|
|
- 'policy' => $authResponse->encodedPolicy,
|
|
|
- 'signature' => $authResponse->signature,
|
|
|
- 'key' => $authResponse->objectKey,
|
|
|
- 'file' => $fileObj,
|
|
|
- 'successActionStatus' => '201',
|
|
|
- ]);
|
|
|
- $uploadRequest = new PostObjectRequest([
|
|
|
- 'bucketName' => $authResponse->bucket,
|
|
|
- 'header' => $ossHeader,
|
|
|
- ]);
|
|
|
- $ossClient->postObject($uploadRequest, $ossRuntime);
|
|
|
- $contrastFaceVerifyReq->faceContrastFile = 'http://' . $authResponse->bucket . '.' . $authResponse->endpoint . '/' . $authResponse->objectKey . '';
|
|
|
-
|
|
|
- return $this->contrastFaceVerify($contrastFaceVerifyReq, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param InitDeviceRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return InitDeviceResponse
|
|
|
- */
|
|
|
- public function initDevice($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return InitDeviceResponse::fromMap($this->doRequest('InitDevice', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param InitDeviceRequest $request
|
|
|
- *
|
|
|
- * @return InitDeviceResponse
|
|
|
- */
|
|
|
- public function initDeviceSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->initDevice($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param InitFaceVerifyRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return InitFaceVerifyResponse
|
|
|
- */
|
|
|
- public function initFaceVerify($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return InitFaceVerifyResponse::fromMap($this->doRequest('InitFaceVerify', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param InitFaceVerifyRequest $request
|
|
|
- *
|
|
|
- * @return InitFaceVerifyResponse
|
|
|
- */
|
|
|
- public function initFaceVerifySimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->initFaceVerify($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceVerifyRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeFaceVerifyResponse
|
|
|
- */
|
|
|
- public function describeFaceVerify($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeFaceVerifyResponse::fromMap($this->doRequest('DescribeFaceVerify', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceVerifyRequest $request
|
|
|
- *
|
|
|
- * @return DescribeFaceVerifyResponse
|
|
|
- */
|
|
|
- public function describeFaceVerifySimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeFaceVerify($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param VerifyDeviceRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return VerifyDeviceResponse
|
|
|
- */
|
|
|
- public function verifyDevice($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return VerifyDeviceResponse::fromMap($this->doRequest('VerifyDevice', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param VerifyDeviceRequest $request
|
|
|
- *
|
|
|
- * @return VerifyDeviceResponse
|
|
|
- */
|
|
|
- public function verifyDeviceSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->verifyDevice($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param ModifyDeviceInfoRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return ModifyDeviceInfoResponse
|
|
|
- */
|
|
|
- public function modifyDeviceInfo($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return ModifyDeviceInfoResponse::fromMap($this->doRequest('ModifyDeviceInfo', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param ModifyDeviceInfoRequest $request
|
|
|
- *
|
|
|
- * @return ModifyDeviceInfoResponse
|
|
|
- */
|
|
|
- public function modifyDeviceInfoSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->modifyDeviceInfo($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeVerifySDKRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeVerifySDKResponse
|
|
|
- */
|
|
|
- public function describeVerifySDK($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeVerifySDKResponse::fromMap($this->doRequest('DescribeVerifySDK', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeVerifySDKRequest $request
|
|
|
- *
|
|
|
- * @return DescribeVerifySDKResponse
|
|
|
- */
|
|
|
- public function describeVerifySDKSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeVerifySDK($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeDeviceInfoRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeDeviceInfoResponse
|
|
|
- */
|
|
|
- public function describeDeviceInfo($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeDeviceInfoResponse::fromMap($this->doRequest('DescribeDeviceInfo', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeDeviceInfoRequest $request
|
|
|
- *
|
|
|
- * @return DescribeDeviceInfoResponse
|
|
|
- */
|
|
|
- public function describeDeviceInfoSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->describeDeviceInfo($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateVerifySDKRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return CreateVerifySDKResponse
|
|
|
- */
|
|
|
- public function createVerifySDK($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return CreateVerifySDKResponse::fromMap($this->doRequest('CreateVerifySDK', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateVerifySDKRequest $request
|
|
|
- *
|
|
|
- * @return CreateVerifySDKResponse
|
|
|
- */
|
|
|
- public function createVerifySDKSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->createVerifySDK($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateAuthKeyRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return CreateAuthKeyResponse
|
|
|
- */
|
|
|
- public function createAuthKey($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return CreateAuthKeyResponse::fromMap($this->doRequest('CreateAuthKey', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CreateAuthKeyRequest $request
|
|
|
- *
|
|
|
- * @return CreateAuthKeyResponse
|
|
|
- */
|
|
|
- public function createAuthKeySimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->createAuthKey($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DetectFaceAttributesRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DetectFaceAttributesResponse
|
|
|
- */
|
|
|
- public function detectFaceAttributes($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DetectFaceAttributesResponse::fromMap($this->doRequest('DetectFaceAttributes', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DetectFaceAttributesRequest $request
|
|
|
- *
|
|
|
- * @return DetectFaceAttributesResponse
|
|
|
- */
|
|
|
- public function detectFaceAttributesSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->detectFaceAttributes($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CompareFacesRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return CompareFacesResponse
|
|
|
- */
|
|
|
- public function compareFaces($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return CompareFacesResponse::fromMap($this->doRequest('CompareFaces', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param CompareFacesRequest $request
|
|
|
- *
|
|
|
- * @return CompareFacesResponse
|
|
|
- */
|
|
|
- public function compareFacesSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
-
|
|
|
- return $this->compareFaces($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceUsageRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
- *
|
|
|
- * @return DescribeFaceUsageResponse
|
|
|
- */
|
|
|
- public function describeFaceUsage($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
-
|
|
|
- return DescribeFaceUsageResponse::fromMap($this->doRequest('DescribeFaceUsage', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param DescribeFaceUsageRequest $request
|
|
|
- *
|
|
|
- * @return DescribeFaceUsageResponse
|
|
|
- */
|
|
|
- public function describeFaceUsageSimply($request)
|
|
|
- {
|
|
|
- $runtime = new RuntimeOptions([]);
|
|
|
+ if (Utils::isUnset($openPlatformEndpoint)) {
|
|
|
+ $openPlatformEndpoint = 'openplatform.aliyuncs.com';
|
|
|
+ }
|
|
|
+ if (Utils::isUnset($credentialType)) {
|
|
|
+ $credentialType = 'access_key';
|
|
|
+ }
|
|
|
+ $authConfig = new Config([
|
|
|
+ 'accessKeyId' => $accessKeyId,
|
|
|
+ 'accessKeySecret' => $accessKeySecret,
|
|
|
+ 'securityToken' => $securityToken,
|
|
|
+ 'type' => $credentialType,
|
|
|
+ 'endpoint' => $openPlatformEndpoint,
|
|
|
+ 'protocol' => $this->_protocol,
|
|
|
+ 'regionId' => $this->_regionId,
|
|
|
+ ]);
|
|
|
+ $authClient = new OpenPlatform($authConfig);
|
|
|
+ $authRequest = new AuthorizeFileUploadRequest([
|
|
|
+ 'product' => 'Cloudauth',
|
|
|
+ 'regionId' => $this->_regionId,
|
|
|
+ ]);
|
|
|
+ $authResponse = new AuthorizeFileUploadResponse([]);
|
|
|
+ $ossConfig = new \AlibabaCloud\SDK\OSS\OSS\Config([
|
|
|
+ 'accessKeySecret' => $accessKeySecret,
|
|
|
+ 'type' => 'access_key',
|
|
|
+ 'protocol' => $this->_protocol,
|
|
|
+ 'regionId' => $this->_regionId,
|
|
|
+ ]);
|
|
|
+ $ossClient = null;
|
|
|
+ $fileObj = new FileField([]);
|
|
|
+ $ossHeader = new header([]);
|
|
|
+ $uploadRequest = new PostObjectRequest([]);
|
|
|
+ $ossRuntime = new \AlibabaCloud\Tea\OSSUtils\OSSUtils\RuntimeOptions([]);
|
|
|
+ OpenApiUtilClient::convert($runtime, $ossRuntime);
|
|
|
+ $contrastFaceVerifyReq = new ContrastFaceVerifyRequest([]);
|
|
|
+ OpenApiUtilClient::convert($request, $contrastFaceVerifyReq);
|
|
|
+ if (!Utils::isUnset($request->faceContrastFileObject)) {
|
|
|
+ $authResponse = $authClient->authorizeFileUploadWithOptions($authRequest, $runtime);
|
|
|
+ $ossConfig->accessKeyId = $authResponse->accessKeyId;
|
|
|
+ $ossConfig->endpoint = OpenApiUtilClient::getEndpoint($authResponse->endpoint, $authResponse->useAccelerate, $this->_endpointType);
|
|
|
+ $ossClient = new OSS($ossConfig);
|
|
|
+ $fileObj = new FileField([
|
|
|
+ 'filename' => $authResponse->objectKey,
|
|
|
+ 'content' => $request->faceContrastFileObject,
|
|
|
+ 'contentType' => '',
|
|
|
+ ]);
|
|
|
+ $ossHeader = new header([
|
|
|
+ 'accessKeyId' => $authResponse->accessKeyId,
|
|
|
+ 'policy' => $authResponse->encodedPolicy,
|
|
|
+ 'signature' => $authResponse->signature,
|
|
|
+ 'key' => $authResponse->objectKey,
|
|
|
+ 'file' => $fileObj,
|
|
|
+ 'successActionStatus' => '201',
|
|
|
+ ]);
|
|
|
+ $uploadRequest = new PostObjectRequest([
|
|
|
+ 'bucketName' => $authResponse->bucket,
|
|
|
+ 'header' => $ossHeader,
|
|
|
+ ]);
|
|
|
+ $ossClient->postObject($uploadRequest, $ossRuntime);
|
|
|
+ $contrastFaceVerifyReq->faceContrastFile = 'http://' . $authResponse->bucket . '.' . $authResponse->endpoint . '/' . $authResponse->objectKey . '';
|
|
|
+ }
|
|
|
|
|
|
- return $this->describeFaceUsage($request, $runtime);
|
|
|
+ return $this->contrastFaceVerifyWithOptions($contrastFaceVerifyReq, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyRecordsRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param CreateAuthKeyRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeVerifyRecordsResponse
|
|
|
+ * @return CreateAuthKeyResponse
|
|
|
*/
|
|
|
- public function describeVerifyRecords($request, $runtime)
|
|
|
+ public function createAuthKeyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->authYears)) {
|
|
|
+ $query['AuthYears'] = $request->authYears;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->test)) {
|
|
|
+ $query['Test'] = $request->test;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userDeviceId)) {
|
|
|
+ $query['UserDeviceId'] = $request->userDeviceId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'CreateAuthKey',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeVerifyRecordsResponse::fromMap($this->doRequest('DescribeVerifyRecords', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return CreateAuthKeyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyRecordsRequest $request
|
|
|
+ * @param CreateAuthKeyRequest $request
|
|
|
*
|
|
|
- * @return DescribeVerifyRecordsResponse
|
|
|
+ * @return CreateAuthKeyResponse
|
|
|
*/
|
|
|
- public function describeVerifyRecordsSimply($request)
|
|
|
+ public function createAuthKey($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeVerifyRecords($request, $runtime);
|
|
|
+ return $this->createAuthKeyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param UpdateVerifySettingRequest $request
|
|
|
+ * @param CreateVerifySettingRequest $request
|
|
|
* @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return UpdateVerifySettingResponse
|
|
|
+ * @return CreateVerifySettingResponse
|
|
|
*/
|
|
|
- public function updateVerifySetting($request, $runtime)
|
|
|
+ public function createVerifySettingWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizName)) {
|
|
|
+ $query['BizName'] = $request->bizName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->guideStep)) {
|
|
|
+ $query['GuideStep'] = $request->guideStep;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->privacyStep)) {
|
|
|
+ $query['PrivacyStep'] = $request->privacyStep;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->resultStep)) {
|
|
|
+ $query['ResultStep'] = $request->resultStep;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->solution)) {
|
|
|
+ $query['Solution'] = $request->solution;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'CreateVerifySetting',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return UpdateVerifySettingResponse::fromMap($this->doRequest('UpdateVerifySetting', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return CreateVerifySettingResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param UpdateVerifySettingRequest $request
|
|
|
+ * @param CreateVerifySettingRequest $request
|
|
|
*
|
|
|
- * @return UpdateVerifySettingResponse
|
|
|
+ * @return CreateVerifySettingResponse
|
|
|
*/
|
|
|
- public function updateVerifySettingSimply($request)
|
|
|
+ public function createVerifySetting($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->updateVerifySetting($request, $runtime);
|
|
|
+ return $this->createVerifySettingWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param CreateVerifySettingRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DescribeDeviceInfoRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return CreateVerifySettingResponse
|
|
|
+ * @return DescribeDeviceInfoResponse
|
|
|
*/
|
|
|
- public function createVerifySetting($request, $runtime)
|
|
|
+ public function describeDeviceInfoWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->currentPage)) {
|
|
|
+ $query['CurrentPage'] = $request->currentPage;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->deviceId)) {
|
|
|
+ $query['DeviceId'] = $request->deviceId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->expiredEndDay)) {
|
|
|
+ $query['ExpiredEndDay'] = $request->expiredEndDay;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->expiredStartDay)) {
|
|
|
+ $query['ExpiredStartDay'] = $request->expiredStartDay;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->pageSize)) {
|
|
|
+ $query['PageSize'] = $request->pageSize;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userDeviceId)) {
|
|
|
+ $query['UserDeviceId'] = $request->userDeviceId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeDeviceInfo',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return CreateVerifySettingResponse::fromMap($this->doRequest('CreateVerifySetting', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeDeviceInfoResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param CreateVerifySettingRequest $request
|
|
|
+ * @param DescribeDeviceInfoRequest $request
|
|
|
*
|
|
|
- * @return CreateVerifySettingResponse
|
|
|
+ * @return DescribeDeviceInfoResponse
|
|
|
*/
|
|
|
- public function createVerifySettingSimply($request)
|
|
|
+ public function describeDeviceInfo($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->createVerifySetting($request, $runtime);
|
|
|
+ return $this->describeDeviceInfoWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifySettingRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DescribeFaceVerifyRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeVerifySettingResponse
|
|
|
+ * @return DescribeFaceVerifyResponse
|
|
|
*/
|
|
|
- public function describeVerifySetting($request, $runtime)
|
|
|
+ public function describeFaceVerifyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->certifyId)) {
|
|
|
+ $query['CertifyId'] = $request->certifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->pictureReturnType)) {
|
|
|
+ $query['PictureReturnType'] = $request->pictureReturnType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sceneId)) {
|
|
|
+ $query['SceneId'] = $request->sceneId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeFaceVerify',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeVerifySettingResponse::fromMap($this->doRequest('DescribeVerifySetting', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeFaceVerifyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifySettingRequest $request
|
|
|
+ * @param DescribeFaceVerifyRequest $request
|
|
|
*
|
|
|
- * @return DescribeVerifySettingResponse
|
|
|
+ * @return DescribeFaceVerifyResponse
|
|
|
*/
|
|
|
- public function describeVerifySettingSimply($request)
|
|
|
+ public function describeFaceVerify($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeVerifySetting($request, $runtime);
|
|
|
+ return $this->describeFaceVerifyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyUsageRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeVerifyUsageResponse
|
|
|
+ * @return DescribeOssUploadTokenResponse
|
|
|
*/
|
|
|
- public function describeVerifyUsage($request, $runtime)
|
|
|
- {
|
|
|
- Utils::validateModel($request);
|
|
|
+ public function describeOssUploadTokenWithOptions($runtime)
|
|
|
+ {
|
|
|
+ $req = new OpenApiRequest([]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeOssUploadToken',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeVerifyUsageResponse::fromMap($this->doRequest('DescribeVerifyUsage', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeOssUploadTokenResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyUsageRequest $request
|
|
|
- *
|
|
|
- * @return DescribeVerifyUsageResponse
|
|
|
+ * @return DescribeOssUploadTokenResponse
|
|
|
*/
|
|
|
- public function describeVerifyUsageSimply($request)
|
|
|
+ public function describeOssUploadToken()
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeVerifyUsage($request, $runtime);
|
|
|
+ return $this->describeOssUploadTokenWithOptions($runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeUserStatusRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DescribeVerifyResultRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeUserStatusResponse
|
|
|
+ * @return DescribeVerifyResultResponse
|
|
|
*/
|
|
|
- public function describeUserStatus($request, $runtime)
|
|
|
+ public function describeVerifyResultWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizId)) {
|
|
|
+ $query['BizId'] = $request->bizId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeVerifyResult',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeUserStatusResponse::fromMap($this->doRequest('DescribeUserStatus', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeVerifyResultResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeUserStatusRequest $request
|
|
|
+ * @param DescribeVerifyResultRequest $request
|
|
|
*
|
|
|
- * @return DescribeUserStatusResponse
|
|
|
+ * @return DescribeVerifyResultResponse
|
|
|
*/
|
|
|
- public function describeUserStatusSimply($request)
|
|
|
+ public function describeVerifyResult($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeUserStatus($request, $runtime);
|
|
|
+ return $this->describeVerifyResultWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeUploadInfoRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DescribeVerifySDKRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeUploadInfoResponse
|
|
|
+ * @return DescribeVerifySDKResponse
|
|
|
*/
|
|
|
- public function describeUploadInfo($request, $runtime)
|
|
|
+ public function describeVerifySDKWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->taskId)) {
|
|
|
+ $query['TaskId'] = $request->taskId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeVerifySDK',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeUploadInfoResponse::fromMap($this->doRequest('DescribeUploadInfo', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeVerifySDKResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeUploadInfoRequest $request
|
|
|
+ * @param DescribeVerifySDKRequest $request
|
|
|
*
|
|
|
- * @return DescribeUploadInfoResponse
|
|
|
+ * @return DescribeVerifySDKResponse
|
|
|
*/
|
|
|
- public function describeUploadInfoSimply($request)
|
|
|
+ public function describeVerifySDK($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeUploadInfo($request, $runtime);
|
|
|
+ return $this->describeVerifySDKWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeRPSDKRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DescribeVerifyTokenRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeRPSDKResponse
|
|
|
+ * @return DescribeVerifyTokenResponse
|
|
|
*/
|
|
|
- public function describeRPSDK($request, $runtime)
|
|
|
+ public function describeVerifyTokenWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizId)) {
|
|
|
+ $query['BizId'] = $request->bizId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->callbackSeed)) {
|
|
|
+ $query['CallbackSeed'] = $request->callbackSeed;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->callbackUrl)) {
|
|
|
+ $query['CallbackUrl'] = $request->callbackUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceRetainedImageUrl)) {
|
|
|
+ $query['FaceRetainedImageUrl'] = $request->faceRetainedImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->failedRedirectUrl)) {
|
|
|
+ $query['FailedRedirectUrl'] = $request->failedRedirectUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardBackImageUrl)) {
|
|
|
+ $query['IdCardBackImageUrl'] = $request->idCardBackImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardFrontImageUrl)) {
|
|
|
+ $query['IdCardFrontImageUrl'] = $request->idCardFrontImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardNumber)) {
|
|
|
+ $query['IdCardNumber'] = $request->idCardNumber;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->name)) {
|
|
|
+ $query['Name'] = $request->name;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->passedRedirectUrl)) {
|
|
|
+ $query['PassedRedirectUrl'] = $request->passedRedirectUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userId)) {
|
|
|
+ $query['UserId'] = $request->userId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userIp)) {
|
|
|
+ $query['UserIp'] = $request->userIp;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userPhoneNumber)) {
|
|
|
+ $query['UserPhoneNumber'] = $request->userPhoneNumber;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userRegistTime)) {
|
|
|
+ $query['UserRegistTime'] = $request->userRegistTime;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DescribeVerifyToken',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeRPSDKResponse::fromMap($this->doRequest('DescribeRPSDK', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DescribeVerifyTokenResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeRPSDKRequest $request
|
|
|
+ * @param DescribeVerifyTokenRequest $request
|
|
|
*
|
|
|
- * @return DescribeRPSDKResponse
|
|
|
+ * @return DescribeVerifyTokenResponse
|
|
|
*/
|
|
|
- public function describeRPSDKSimply($request)
|
|
|
+ public function describeVerifyToken($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeRPSDK($request, $runtime);
|
|
|
+ return $this->describeVerifyTokenWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param CreateRPSDKRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param DetectFaceAttributesRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return CreateRPSDKResponse
|
|
|
+ * @return DetectFaceAttributesResponse
|
|
|
*/
|
|
|
- public function createRPSDK($request, $runtime)
|
|
|
+ public function detectFaceAttributesWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $body['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->materialValue)) {
|
|
|
+ $body['MaterialValue'] = $request->materialValue;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'DetectFaceAttributes',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return CreateRPSDKResponse::fromMap($this->doRequest('CreateRPSDK', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return DetectFaceAttributesResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param CreateRPSDKRequest $request
|
|
|
+ * @param DetectFaceAttributesRequest $request
|
|
|
*
|
|
|
- * @return CreateRPSDKResponse
|
|
|
+ * @return DetectFaceAttributesResponse
|
|
|
*/
|
|
|
- public function createRPSDKSimply($request)
|
|
|
+ public function detectFaceAttributes($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->createRPSDK($request, $runtime);
|
|
|
+ return $this->detectFaceAttributesWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param VerifyMaterialRequest $request
|
|
|
+ * @param InitFaceVerifyRequest $request
|
|
|
* @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return VerifyMaterialResponse
|
|
|
+ * @return InitFaceVerifyResponse
|
|
|
*/
|
|
|
- public function verifyMaterial($request, $runtime)
|
|
|
+ public function initFaceVerifyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->callbackToken)) {
|
|
|
+ $query['CallbackToken'] = $request->callbackToken;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->callbackUrl)) {
|
|
|
+ $query['CallbackUrl'] = $request->callbackUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certName)) {
|
|
|
+ $query['CertName'] = $request->certName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certNo)) {
|
|
|
+ $query['CertNo'] = $request->certNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certType)) {
|
|
|
+ $query['CertType'] = $request->certType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certifyId)) {
|
|
|
+ $query['CertifyId'] = $request->certifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->certifyUrlType)) {
|
|
|
+ $query['CertifyUrlType'] = $request->certifyUrlType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->encryptType)) {
|
|
|
+ $query['EncryptType'] = $request->encryptType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPictureUrl)) {
|
|
|
+ $query['FaceContrastPictureUrl'] = $request->faceContrastPictureUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ip)) {
|
|
|
+ $query['Ip'] = $request->ip;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->metaInfo)) {
|
|
|
+ $query['MetaInfo'] = $request->metaInfo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->mobile)) {
|
|
|
+ $query['Mobile'] = $request->mobile;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossBucketName)) {
|
|
|
+ $query['OssBucketName'] = $request->ossBucketName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossObjectName)) {
|
|
|
+ $query['OssObjectName'] = $request->ossObjectName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->outerOrderNo)) {
|
|
|
+ $query['OuterOrderNo'] = $request->outerOrderNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->productCode)) {
|
|
|
+ $query['ProductCode'] = $request->productCode;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->returnUrl)) {
|
|
|
+ $query['ReturnUrl'] = $request->returnUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sceneId)) {
|
|
|
+ $query['SceneId'] = $request->sceneId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userId)) {
|
|
|
+ $query['UserId'] = $request->userId;
|
|
|
+ }
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->authId)) {
|
|
|
+ $body['AuthId'] = $request->authId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->crop)) {
|
|
|
+ $body['Crop'] = $request->crop;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPicture)) {
|
|
|
+ $body['FaceContrastPicture'] = $request->faceContrastPicture;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->model)) {
|
|
|
+ $body['Model'] = $request->model;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'InitFaceVerify',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return VerifyMaterialResponse::fromMap($this->doRequest('VerifyMaterial', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return InitFaceVerifyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param VerifyMaterialRequest $request
|
|
|
+ * @param InitFaceVerifyRequest $request
|
|
|
*
|
|
|
- * @return VerifyMaterialResponse
|
|
|
+ * @return InitFaceVerifyResponse
|
|
|
*/
|
|
|
- public function verifyMaterialSimply($request)
|
|
|
+ public function initFaceVerify($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->verifyMaterial($request, $runtime);
|
|
|
+ return $this->initFaceVerifyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyResultRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param LivenessFaceVerifyRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeVerifyResultResponse
|
|
|
+ * @return LivenessFaceVerifyResponse
|
|
|
*/
|
|
|
- public function describeVerifyResult($request, $runtime)
|
|
|
+ public function livenessFaceVerifyWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->model)) {
|
|
|
+ $query['Model'] = $request->model;
|
|
|
+ }
|
|
|
+ $body = [];
|
|
|
+ if (!Utils::isUnset($request->certifyId)) {
|
|
|
+ $body['CertifyId'] = $request->certifyId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->crop)) {
|
|
|
+ $body['Crop'] = $request->crop;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->deviceToken)) {
|
|
|
+ $body['DeviceToken'] = $request->deviceToken;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPicture)) {
|
|
|
+ $body['FaceContrastPicture'] = $request->faceContrastPicture;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceContrastPictureUrl)) {
|
|
|
+ $body['FaceContrastPictureUrl'] = $request->faceContrastPictureUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ip)) {
|
|
|
+ $body['Ip'] = $request->ip;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->mobile)) {
|
|
|
+ $body['Mobile'] = $request->mobile;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossBucketName)) {
|
|
|
+ $body['OssBucketName'] = $request->ossBucketName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->ossObjectName)) {
|
|
|
+ $body['OssObjectName'] = $request->ossObjectName;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->outerOrderNo)) {
|
|
|
+ $body['OuterOrderNo'] = $request->outerOrderNo;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->productCode)) {
|
|
|
+ $body['ProductCode'] = $request->productCode;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->sceneId)) {
|
|
|
+ $body['SceneId'] = $request->sceneId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userId)) {
|
|
|
+ $body['UserId'] = $request->userId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ 'body' => OpenApiUtilClient::parseToMap($body),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'LivenessFaceVerify',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeVerifyResultResponse::fromMap($this->doRequest('DescribeVerifyResult', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return LivenessFaceVerifyResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyResultRequest $request
|
|
|
+ * @param LivenessFaceVerifyRequest $request
|
|
|
*
|
|
|
- * @return DescribeVerifyResultResponse
|
|
|
+ * @return LivenessFaceVerifyResponse
|
|
|
*/
|
|
|
- public function describeVerifyResultSimply($request)
|
|
|
+ public function livenessFaceVerify($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeVerifyResult($request, $runtime);
|
|
|
+ return $this->livenessFaceVerifyWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeOssUploadTokenRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param ModifyDeviceInfoRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeOssUploadTokenResponse
|
|
|
+ * @return ModifyDeviceInfoResponse
|
|
|
*/
|
|
|
- public function describeOssUploadToken($request, $runtime)
|
|
|
+ public function modifyDeviceInfoWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->deviceId)) {
|
|
|
+ $query['DeviceId'] = $request->deviceId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->duration)) {
|
|
|
+ $query['Duration'] = $request->duration;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->expiredDay)) {
|
|
|
+ $query['ExpiredDay'] = $request->expiredDay;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userDeviceId)) {
|
|
|
+ $query['UserDeviceId'] = $request->userDeviceId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'ModifyDeviceInfo',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeOssUploadTokenResponse::fromMap($this->doRequest('DescribeOssUploadToken', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return ModifyDeviceInfoResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeOssUploadTokenRequest $request
|
|
|
+ * @param ModifyDeviceInfoRequest $request
|
|
|
*
|
|
|
- * @return DescribeOssUploadTokenResponse
|
|
|
+ * @return ModifyDeviceInfoResponse
|
|
|
*/
|
|
|
- public function describeOssUploadTokenSimply($request)
|
|
|
+ public function modifyDeviceInfo($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeOssUploadToken($request, $runtime);
|
|
|
+ return $this->modifyDeviceInfoWithOptions($request, $runtime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyTokenRequest $request
|
|
|
- * @param RuntimeOptions $runtime
|
|
|
+ * @param VerifyMaterialRequest $request
|
|
|
+ * @param RuntimeOptions $runtime
|
|
|
*
|
|
|
- * @return DescribeVerifyTokenResponse
|
|
|
+ * @return VerifyMaterialResponse
|
|
|
*/
|
|
|
- public function describeVerifyToken($request, $runtime)
|
|
|
+ public function verifyMaterialWithOptions($request, $runtime)
|
|
|
{
|
|
|
Utils::validateModel($request);
|
|
|
+ $query = [];
|
|
|
+ if (!Utils::isUnset($request->bizId)) {
|
|
|
+ $query['BizId'] = $request->bizId;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->bizType)) {
|
|
|
+ $query['BizType'] = $request->bizType;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->faceImageUrl)) {
|
|
|
+ $query['FaceImageUrl'] = $request->faceImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardBackImageUrl)) {
|
|
|
+ $query['IdCardBackImageUrl'] = $request->idCardBackImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardFrontImageUrl)) {
|
|
|
+ $query['IdCardFrontImageUrl'] = $request->idCardFrontImageUrl;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->idCardNumber)) {
|
|
|
+ $query['IdCardNumber'] = $request->idCardNumber;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->name)) {
|
|
|
+ $query['Name'] = $request->name;
|
|
|
+ }
|
|
|
+ if (!Utils::isUnset($request->userId)) {
|
|
|
+ $query['UserId'] = $request->userId;
|
|
|
+ }
|
|
|
+ $req = new OpenApiRequest([
|
|
|
+ 'query' => OpenApiUtilClient::query($query),
|
|
|
+ ]);
|
|
|
+ $params = new Params([
|
|
|
+ 'action' => 'VerifyMaterial',
|
|
|
+ 'version' => '2019-03-07',
|
|
|
+ 'protocol' => 'HTTPS',
|
|
|
+ 'pathname' => '/',
|
|
|
+ 'method' => 'POST',
|
|
|
+ 'authType' => 'AK',
|
|
|
+ 'style' => 'RPC',
|
|
|
+ 'reqBodyType' => 'formData',
|
|
|
+ 'bodyType' => 'json',
|
|
|
+ ]);
|
|
|
|
|
|
- return DescribeVerifyTokenResponse::fromMap($this->doRequest('DescribeVerifyToken', 'HTTPS', 'POST', '2019-03-07', 'AK', null, Tea::merge($request), $runtime));
|
|
|
+ return VerifyMaterialResponse::fromMap($this->callApi($params, $req, $runtime));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param DescribeVerifyTokenRequest $request
|
|
|
+ * @param VerifyMaterialRequest $request
|
|
|
*
|
|
|
- * @return DescribeVerifyTokenResponse
|
|
|
+ * @return VerifyMaterialResponse
|
|
|
*/
|
|
|
- public function describeVerifyTokenSimply($request)
|
|
|
+ public function verifyMaterial($request)
|
|
|
{
|
|
|
$runtime = new RuntimeOptions([]);
|
|
|
|
|
|
- return $this->describeVerifyToken($request, $runtime);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param string $productId
|
|
|
- * @param string $regionId
|
|
|
- * @param string $endpointRule
|
|
|
- * @param string $network
|
|
|
- * @param string $suffix
|
|
|
- * @param string[] $endpointMap
|
|
|
- * @param string $endpoint
|
|
|
- *
|
|
|
- * @return string
|
|
|
- */
|
|
|
- public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint)
|
|
|
- {
|
|
|
- if (!Utils::empty_($endpoint)) {
|
|
|
- return $endpoint;
|
|
|
- }
|
|
|
- if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) {
|
|
|
- return @$endpointMap[$regionId];
|
|
|
- }
|
|
|
-
|
|
|
- return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix);
|
|
|
+ return $this->verifyMaterialWithOptions($request, $runtime);
|
|
|
}
|
|
|
}
|