Skip to content

Commit e58a15f

Browse files
committed
Support API DeepfakeDetectIntl.
1 parent 1ee3ec8 commit e58a15f

File tree

6 files changed

+478
-0
lines changed

6 files changed

+478
-0
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-04-16 Version: 3.4.0
2+
- Support API DeepfakeDetectIntl.
3+
4+
15
2025-04-15 Version: 3.3.0
26
- Support API CheckVerifyLog.
37
- Update API FaceGuardRisk: add response parameters Body.Result.GuardRiskScore.

src/Cloudauthintl.php

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\CheckResultResponse;
1212
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\CheckVerifyLogRequest;
1313
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\CheckVerifyLogResponse;
14+
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\DeepfakeDetectIntlRequest;
15+
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\DeepfakeDetectIntlResponse;
1416
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\DeleteVerifyResultRequest;
1517
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\DeleteVerifyResultResponse;
1618
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\DocOcrRequest;
@@ -303,6 +305,85 @@ public function checkVerifyLog($request)
303305
return $this->checkVerifyLogWithOptions($request, $runtime);
304306
}
305307

308+
/**
309+
* 人脸凭证核验.
310+
*
311+
* @param request - DeepfakeDetectIntlRequest
312+
* @param runtime - runtime options for this request RuntimeOptions
313+
*
314+
* @returns DeepfakeDetectIntlResponse
315+
*
316+
* @param DeepfakeDetectIntlRequest $request
317+
* @param RuntimeOptions $runtime
318+
*
319+
* @return DeepfakeDetectIntlResponse
320+
*/
321+
public function deepfakeDetectIntlWithOptions($request, $runtime)
322+
{
323+
$request->validate();
324+
$query = [];
325+
if (null !== $request->faceInputType) {
326+
@$query['FaceInputType'] = $request->faceInputType;
327+
}
328+
329+
if (null !== $request->faceUrl) {
330+
@$query['FaceUrl'] = $request->faceUrl;
331+
}
332+
333+
if (null !== $request->merchantBizId) {
334+
@$query['MerchantBizId'] = $request->merchantBizId;
335+
}
336+
337+
if (null !== $request->productCode) {
338+
@$query['ProductCode'] = $request->productCode;
339+
}
340+
341+
if (null !== $request->sceneCode) {
342+
@$query['SceneCode'] = $request->sceneCode;
343+
}
344+
345+
$body = [];
346+
if (null !== $request->faceBase64) {
347+
@$body['FaceBase64'] = $request->faceBase64;
348+
}
349+
350+
$req = new OpenApiRequest([
351+
'query' => Utils::query($query),
352+
'body' => Utils::parseToMap($body),
353+
]);
354+
$params = new Params([
355+
'action' => 'DeepfakeDetectIntl',
356+
'version' => '2022-08-09',
357+
'protocol' => 'HTTPS',
358+
'pathname' => '/',
359+
'method' => 'POST',
360+
'authType' => 'AK',
361+
'style' => 'RPC',
362+
'reqBodyType' => 'formData',
363+
'bodyType' => 'json',
364+
]);
365+
366+
return DeepfakeDetectIntlResponse::fromMap($this->callApi($params, $req, $runtime));
367+
}
368+
369+
/**
370+
* 人脸凭证核验.
371+
*
372+
* @param request - DeepfakeDetectIntlRequest
373+
*
374+
* @returns DeepfakeDetectIntlResponse
375+
*
376+
* @param DeepfakeDetectIntlRequest $request
377+
*
378+
* @return DeepfakeDetectIntlResponse
379+
*/
380+
public function deepfakeDetectIntl($request)
381+
{
382+
$runtime = new RuntimeOptions([]);
383+
384+
return $this->deepfakeDetectIntlWithOptions($request, $runtime);
385+
}
386+
306387
/**
307388
* 删除用户认证记录结果.
308389
*
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?php
2+
3+
// This file is auto-generated, don't edit it. Thanks.
4+
5+
namespace AlibabaCloud\SDK\Cloudauthintl\V20220809\Models;
6+
7+
use AlibabaCloud\Dara\Model;
8+
9+
class DeepfakeDetectIntlRequest extends Model
10+
{
11+
/**
12+
* @var string
13+
*/
14+
public $faceBase64;
15+
16+
/**
17+
* @var string
18+
*/
19+
public $faceInputType;
20+
21+
/**
22+
* @var string
23+
*/
24+
public $faceUrl;
25+
26+
/**
27+
* @var string
28+
*/
29+
public $merchantBizId;
30+
31+
/**
32+
* @var string
33+
*/
34+
public $productCode;
35+
36+
/**
37+
* @var string
38+
*/
39+
public $sceneCode;
40+
protected $_name = [
41+
'faceBase64' => 'FaceBase64',
42+
'faceInputType' => 'FaceInputType',
43+
'faceUrl' => 'FaceUrl',
44+
'merchantBizId' => 'MerchantBizId',
45+
'productCode' => 'ProductCode',
46+
'sceneCode' => 'SceneCode',
47+
];
48+
49+
public function validate()
50+
{
51+
parent::validate();
52+
}
53+
54+
public function toArray($noStream = false)
55+
{
56+
$res = [];
57+
if (null !== $this->faceBase64) {
58+
$res['FaceBase64'] = $this->faceBase64;
59+
}
60+
61+
if (null !== $this->faceInputType) {
62+
$res['FaceInputType'] = $this->faceInputType;
63+
}
64+
65+
if (null !== $this->faceUrl) {
66+
$res['FaceUrl'] = $this->faceUrl;
67+
}
68+
69+
if (null !== $this->merchantBizId) {
70+
$res['MerchantBizId'] = $this->merchantBizId;
71+
}
72+
73+
if (null !== $this->productCode) {
74+
$res['ProductCode'] = $this->productCode;
75+
}
76+
77+
if (null !== $this->sceneCode) {
78+
$res['SceneCode'] = $this->sceneCode;
79+
}
80+
81+
return $res;
82+
}
83+
84+
public function toMap($noStream = false)
85+
{
86+
return $this->toArray($noStream);
87+
}
88+
89+
public static function fromMap($map = [])
90+
{
91+
$model = new self();
92+
if (isset($map['FaceBase64'])) {
93+
$model->faceBase64 = $map['FaceBase64'];
94+
}
95+
96+
if (isset($map['FaceInputType'])) {
97+
$model->faceInputType = $map['FaceInputType'];
98+
}
99+
100+
if (isset($map['FaceUrl'])) {
101+
$model->faceUrl = $map['FaceUrl'];
102+
}
103+
104+
if (isset($map['MerchantBizId'])) {
105+
$model->merchantBizId = $map['MerchantBizId'];
106+
}
107+
108+
if (isset($map['ProductCode'])) {
109+
$model->productCode = $map['ProductCode'];
110+
}
111+
112+
if (isset($map['SceneCode'])) {
113+
$model->sceneCode = $map['SceneCode'];
114+
}
115+
116+
return $model;
117+
}
118+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php
2+
3+
// This file is auto-generated, don't edit it. Thanks.
4+
5+
namespace AlibabaCloud\SDK\Cloudauthintl\V20220809\Models;
6+
7+
use AlibabaCloud\Dara\Model;
8+
9+
class DeepfakeDetectIntlResponse extends Model
10+
{
11+
/**
12+
* @var string[]
13+
*/
14+
public $headers;
15+
16+
/**
17+
* @var int
18+
*/
19+
public $statusCode;
20+
21+
/**
22+
* @var DeepfakeDetectIntlResponseBody
23+
*/
24+
public $body;
25+
protected $_name = [
26+
'headers' => 'headers',
27+
'statusCode' => 'statusCode',
28+
'body' => 'body',
29+
];
30+
31+
public function validate()
32+
{
33+
if (\is_array($this->headers)) {
34+
Model::validateArray($this->headers);
35+
}
36+
if (null !== $this->body) {
37+
$this->body->validate();
38+
}
39+
parent::validate();
40+
}
41+
42+
public function toArray($noStream = false)
43+
{
44+
$res = [];
45+
if (null !== $this->headers) {
46+
if (\is_array($this->headers)) {
47+
$res['headers'] = [];
48+
foreach ($this->headers as $key1 => $value1) {
49+
$res['headers'][$key1] = $value1;
50+
}
51+
}
52+
}
53+
54+
if (null !== $this->statusCode) {
55+
$res['statusCode'] = $this->statusCode;
56+
}
57+
58+
if (null !== $this->body) {
59+
$res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body;
60+
}
61+
62+
return $res;
63+
}
64+
65+
public function toMap($noStream = false)
66+
{
67+
return $this->toArray($noStream);
68+
}
69+
70+
public static function fromMap($map = [])
71+
{
72+
$model = new self();
73+
if (isset($map['headers'])) {
74+
if (!empty($map['headers'])) {
75+
$model->headers = [];
76+
foreach ($map['headers'] as $key1 => $value1) {
77+
$model->headers[$key1] = $value1;
78+
}
79+
}
80+
}
81+
82+
if (isset($map['statusCode'])) {
83+
$model->statusCode = $map['statusCode'];
84+
}
85+
86+
if (isset($map['body'])) {
87+
$model->body = DeepfakeDetectIntlResponseBody::fromMap($map['body']);
88+
}
89+
90+
return $model;
91+
}
92+
}

0 commit comments

Comments
 (0)