This commit is contained in:
mkm 2024-02-28 17:33:11 +08:00
parent baeefd5c35
commit 4fdd1d1e7c
4371 changed files with 334265 additions and 162072 deletions

View File

@ -54,14 +54,14 @@
"swoole/ide-helper": "^4.8",
"alibabacloud/dysmsapi-20170525": "2.0.9",
"vlucas/phpdotenv": "^5.3",
"overtrue/pinyin": "4.1.0",
"jpush/jpush": "^3.6",
"guzzlehttp/guzzle": "^6.5",
"topthink/think-api": "1.0.27",
"intervention/image": "^2.7",
"fastknife/ajcaptcha": "^1.2",
"nelexa/zip": "^4.0",
"alibabacloud/ocr-20191230": "^3.0"
"alibabacloud/ocr-20191230": "^3.0",
"overtrue/pinyin": "^4.1"
},
"require-dev": {
"symfony/var-dumper": "^4.2",

6
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "58b44ebbb4f75dc8b47bcaa0ae8327f7",
"content-hash": "410f10b19a4e2c799d95f6050fd87e73",
"packages": [
{
"name": "adbario/php-dot-notation",
@ -2635,7 +2635,7 @@
"version": "4.1.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/overtrue/pinyin/4.1.0/overtrue-pinyin-4.1.0.zip",
"url": "https://mirrors.tencent.com/repository/composer/overtrue/pinyin/4.1.0/overtrue-pinyin-4.1.0.zip",
"reference": "4d0fb4f27f0c79e81c9489e0c0ae4a4f8837eae7",
"shasum": ""
},
@ -5305,5 +5305,5 @@
"ext-swoole": "^4.4.0"
},
"platform-dev": [],
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.3.0"
}

View File

@ -11,12 +11,12 @@
}
],
"require": {
"php": ">=5.5",
"php": "^5.5 || ^7.0 || ^8.0",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0|^6.0",
"squizlabs/php_codesniffer": "^3.0"
"phpunit/phpunit": "^4.8|^5.7|^6.6|^7.5|^8.5|^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
"files": [

View File

@ -29,14 +29,25 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
*/
protected $items = [];
/**
* The delimiter (alternative to a '.') to be used.
*
* @var string
*/
protected $delimiter = '.';
/**
* Create a new Dot instance
*
* @param mixed $items
* @param string $delimiter
*/
public function __construct($items = [])
public function __construct($items = [], $delimiter = '.')
{
$this->items = $this->getArrayItems($items);
$this->delimiter = strlen($delimiter) ? $delimiter : '.';
}
/**
@ -104,7 +115,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
}
$items = &$this->items;
$segments = explode('.', $key);
$segments = explode($this->delimiter, $key);
$lastSegment = array_pop($segments);
foreach ($segments as $segment) {
@ -148,6 +159,10 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
$items = $this->items;
}
if (!func_num_args()) {
$delimiter = $this->delimiter;
}
foreach ($items as $key => $value) {
if (is_array($value) && !empty($value)) {
$flatten = array_merge(
@ -179,13 +194,13 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
return $this->items[$key];
}
if (strpos($key, '.') === false) {
if (strpos($key, $this->delimiter) === false) {
return $default;
}
$items = $this->items;
foreach (explode('.', $key) as $segment) {
foreach (explode($this->delimiter, $key) as $segment) {
if (!is_array($items) || !$this->exists($items, $segment)) {
return $default;
}
@ -234,7 +249,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
continue;
}
foreach (explode('.', $key) as $segment) {
foreach (explode($this->delimiter, $key) as $segment) {
if (!is_array($items) || !$this->exists($items, $segment)) {
return false;
}
@ -446,7 +461,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
$items = &$this->items;
foreach (explode('.', $keys) as $key) {
foreach (explode($this->delimiter, $keys) as $key) {
if (!isset($items[$key]) || !is_array($items[$key])) {
$items[$key] = [];
}
@ -507,6 +522,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
* @param int|string $key
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->has($key);
@ -518,6 +534,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
* @param int|string $key
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->get($key);
@ -529,6 +546,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
* @param int|string|null $key
* @param mixed $value
*/
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
if (is_null($key)) {
@ -545,6 +563,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
*
* @param int|string $key
*/
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
$this->delete($key);
@ -562,6 +581,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
* @param int|string|null $key
* @return int
*/
#[\ReturnTypeWillChange]
public function count($key = null)
{
return count($this->get($key));
@ -578,6 +598,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
*
* @return \ArrayIterator
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new ArrayIterator($this->items);
@ -594,6 +615,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->items;

View File

@ -11,13 +11,14 @@ use Adbar\Dot;
if (! function_exists('dot')) {
/**
* Create a new Dot object with the given items
* Create a new Dot object with the given items and optional delimiter
*
* @param mixed $items
* @param mixed $items
* @param string $delimiter
* @return \Adbar\Dot
*/
function dot($items)
function dot($items, $delimiter = '.')
{
return new Dot($items);
return new Dot($items, $delimiter);
}
}

View File

@ -149,7 +149,7 @@ $rsaKeyPair->getPrivateKey();
use AlibabaCloud\Credentials\Credential;
$bearerToken = new Credential([
'type' => 'bearer_token',
'type' => 'bearer',
'bearer_token' => '<bearer_token>',
]);
$bearerToken->getBearerToken();

View File

@ -150,7 +150,7 @@ If credential is required by the Cloud Call Centre (CCC), please apply for Beare
use AlibabaCloud\Credentials\Credential;
$bearerToken = new Credential([
'type' => 'bearer_token',
'type' => 'bearer',
'bearer_token' => '<bearer_token>',
]);
$bearerToken->getBearerToken();

View File

@ -47,7 +47,7 @@
"ext-sockets": "*",
"drupal/coder": "^8.3",
"symfony/dotenv": "^3.4",
"phpunit/phpunit": "^4.8.35|^5.4.3",
"phpunit/phpunit": "^5.7|^6.6|^7.5",
"monolog/monolog": "^1.24",
"composer/composer": "^1.8",
"mikey179/vfsstream": "^1.6",
@ -68,7 +68,10 @@
},
"config": {
"preferred-install": "dist",
"optimize-autoloader": true
"optimize-autoloader": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,

View File

@ -18,13 +18,13 @@ class BearerTokenCredential implements CredentialsInterface
/**
* BearerTokenCredential constructor.
*
* @param $bearerToken
* @param $bearer_token
*/
public function __construct($bearerToken)
public function __construct($bearer_token)
{
Filter::bearerToken($bearerToken);
Filter::bearerToken($bearer_token);
$this->bearerToken = $bearerToken;
$this->bearerToken = $bearer_token;
}
/**

View File

@ -35,6 +35,7 @@ class Credential
'ecs_ram_role' => EcsRamRoleCredential::class,
'ram_role_arn' => RamRoleArnCredential::class,
'rsa_key_pair' => RsaKeyPairCredential::class,
'bearer' => BearerTokenCredential::class,
];
/**

View File

@ -35,11 +35,11 @@ class Filter
public static function bearerToken($bearerToken)
{
if (!is_string($bearerToken)) {
throw new InvalidArgumentException('Bearer Token must be a string');
throw new InvalidArgumentException('bearer_token must be a string');
}
if ($bearerToken === '') {
throw new InvalidArgumentException('Bearer Token cannot be empty');
throw new InvalidArgumentException('bearer_token cannot be empty');
}
return $bearerToken;

View File

@ -11,10 +11,11 @@
],
"require": {
"php": ">5.5",
"alibabacloud/tea-utils": "^0.2.0",
"alibabacloud/tea-utils": "^0.2.17",
"alibabacloud/credentials": "^1.1",
"alibabacloud/openapi-util": "^0.1.10",
"alibabacloud/gateway-spi": "^0.0.1"
"alibabacloud/openapi-util": "^0.1.10|^0.2.1",
"alibabacloud/gateway-spi": "^1",
"alibabacloud/tea-xml": "^0.2"
},
"autoload": {
"psr-4": {

View File

@ -1,14 +1,15 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace Darabonba\OpenApi\Models;
use AlibabaCloud\Credentials\Credential;
use AlibabaCloud\Tea\Model;
use AlibabaCloud\Credentials\Credential;
use Darabonba\OpenApi\Models\GlobalParameters;
/**
* Model for initing client.
* Model for initing client
*/
class Config extends Model
{
@ -37,12 +38,13 @@ class Config extends Model
'type' => '',
'signatureVersion' => '',
'signatureAlgorithm' => '',
'key' => '',
'cert' => '',
'ca' => '',
];
public function validate()
{
}
public function toMap()
{
$res = [];
@ -118,13 +120,22 @@ class Config extends Model
if (null !== $this->signatureAlgorithm) {
$res['signatureAlgorithm'] = $this->signatureAlgorithm;
}
if (null !== $this->globalParameters) {
$res['globalParameters'] = null !== $this->globalParameters ? $this->globalParameters->toMap() : null;
}
if (null !== $this->key) {
$res['key'] = $this->key;
}
if (null !== $this->cert) {
$res['cert'] = $this->cert;
}
if (null !== $this->ca) {
$res['ca'] = $this->ca;
}
return $res;
}
/**
* @param array $map
*
* @return Config
*/
public static function fromMap($map = [])
@ -202,219 +213,212 @@ class Config extends Model
if (isset($map['signatureAlgorithm'])) {
$model->signatureAlgorithm = $map['signatureAlgorithm'];
}
if (isset($map['globalParameters'])) {
$model->globalParameters = GlobalParameters::fromMap($map['globalParameters']);
}
if (isset($map['key'])) {
$model->key = $map['key'];
}
if (isset($map['cert'])) {
$model->cert = $map['cert'];
}
if (isset($map['ca'])) {
$model->ca = $map['ca'];
}
return $model;
}
/**
* @description accesskey id
*
* @var string
*/
public $accessKeyId;
/**
* @description accesskey secret
*
* @var string
*/
public $accessKeySecret;
/**
* @description security token
*
* @example a.txt
*
* @var string
*/
public $securityToken;
/**
* @description http protocol
*
* @example http
*
* @var string
*/
public $protocol;
/**
* @description http method
*
* @example GET
*
* @var string
*/
public $method;
/**
* @description region id
*
* @example cn-hangzhou
*
* @var string
*/
public $regionId;
/**
* @description read timeout
*
* @example 10
*
* @var int
*/
public $readTimeout;
/**
* @description connect timeout
*
* @example 10
*
* @var int
*/
public $connectTimeout;
/**
* @description http proxy
*
* @example http://localhost
*
* @var string
*/
public $httpProxy;
/**
* @description https proxy
*
* @example https://localhost
*
* @var string
*/
public $httpsProxy;
/**
* @description credential
*
* @example
*
* @example
* @var Credential
*/
public $credential;
/**
* @description endpoint
*
* @example cs.aliyuncs.com
*
* @var string
*/
public $endpoint;
/**
* @description proxy white list
*
* @example http://localhost
*
* @var string
*/
public $noProxy;
/**
* @description max idle conns
*
* @example 3
*
* @var int
*/
public $maxIdleConns;
/**
* @description network for endpoint
*
* @example public
*
* @var string
*/
public $network;
/**
* @description user agent
*
* @example Alibabacloud/1
*
* @var string
*/
public $userAgent;
/**
* @description suffix for endpoint
*
* @example aliyun
*
* @var string
*/
public $suffix;
/**
* @description socks5 proxy
*
* @var string
*/
public $socks5Proxy;
/**
* @description socks5 network
*
* @example TCP
*
* @var string
*/
public $socks5NetWork;
/**
* @description endpoint type
*
* @example internal
*
* @var string
*/
public $endpointType;
/**
* @description OpenPlatform endpoint
*
* @example openplatform.aliyuncs.com
*
* @var string
*/
public $openPlatformEndpoint;
/**
* @description credential type
*
* @example access_key
*
* @deprecated
*
* @var string
*/
public $type;
/**
* @description Signature Version
*
* @example v1
*
* @var string
*/
public $signatureVersion;
/**
* @description Signature Algorithm
*
* @example ACS3-HMAC-SHA256
*
* @var string
*/
public $signatureAlgorithm;
/**
* @description Global Parameters
* @var GlobalParameters
*/
public $globalParameters;
/**
* @description privite key for client certificate
* @example MIIEvQ
* @var string
*/
public $key;
/**
* @description client certificate
* @example -----BEGIN CERTIFICATE-----
xxx-----END CERTIFICATE-----
* @var string
*/
public $cert;
/**
* @description server certificate
* @example -----BEGIN CERTIFICATE-----
xxx-----END CERTIFICATE-----
* @var string
*/
public $ca;
}

View File

@ -0,0 +1,42 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace Darabonba\OpenApi\Models;
use AlibabaCloud\Tea\Model;
class GlobalParameters extends Model
{
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->queries) {
$res['queries'] = $this->queries;
}
return $res;
}
/**
* @param array $map
* @return GlobalParameters
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['queries'])) {
$model->queries = $map['queries'];
}
return $model;
}
public $headers;
public $queries;
}

View File

@ -1,7 +1,6 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace Darabonba\OpenApi\Models;
use AlibabaCloud\Tea\Model;
@ -11,7 +10,6 @@ class OpenApiRequest extends Model
public function validate()
{
}
public function toMap()
{
$res = [];
@ -30,13 +28,13 @@ class OpenApiRequest extends Model
if (null !== $this->hostMap) {
$res['hostMap'] = $this->hostMap;
}
if (null !== $this->endpointOverride) {
$res['endpointOverride'] = $this->endpointOverride;
}
return $res;
}
/**
* @param array $map
*
* @return OpenApiRequest
*/
public static function fromMap($map = [])
@ -57,10 +55,11 @@ class OpenApiRequest extends Model
if (isset($map['hostMap'])) {
$model->hostMap = $map['hostMap'];
}
if (isset($map['endpointOverride'])) {
$model->endpointOverride = $map['endpointOverride'];
}
return $model;
}
public $headers;
public $query;
@ -70,4 +69,6 @@ class OpenApiRequest extends Model
public $stream;
public $hostMap;
public $endpointOverride;
}

View File

@ -1,7 +1,6 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace Darabonba\OpenApi\Models;
use AlibabaCloud\Tea\Model;
@ -19,7 +18,6 @@ class Params extends Model
Model::validateRequired('bodyType', $this->bodyType, true);
Model::validateRequired('reqBodyType', $this->reqBodyType, true);
}
public function toMap()
{
$res = [];
@ -50,13 +48,10 @@ class Params extends Model
if (null !== $this->style) {
$res['style'] = $this->style;
}
return $res;
}
/**
* @param array $map
*
* @return Params
*/
public static function fromMap($map = [])
@ -89,10 +84,8 @@ class Params extends Model
if (isset($map['style'])) {
$model->style = $map['style'];
}
return $model;
}
/**
* @var string
*/

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,8 @@ use Darabonba\GatewaySpi\Models\InterceptorContext;
use Darabonba\GatewaySpi\Models\AttributeMap;
abstract class Client {
public function __construct(){
}
/**
* @param InterceptorContext $context

View File

@ -0,0 +1,15 @@
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
composer.lock
.vscode/
.idea
.DS_Store
cache/
*.cache
runtime/
.php_cs.cache

View File

@ -0,0 +1,65 @@
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator
* you can change this configuration by importing this file.
*/
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setIndent(' ')
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'@Symfony:risky' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'combine_consecutive_unsets' => true,
'method_separation' => true,
'single_quote' => true,
'declare_equal_normalize' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'include' => true,
'lowercase_cast' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_leading_import_slash' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'no_extra_consecutive_blank_lines' => [
'curly_brace_block',
'extra',
'parenthesis_brace_block',
'square_brace_block',
'throw',
'use',
],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,
],
'braces' => [
'allow_single_line_closure' => true,
],
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('tests')
->in(__DIR__)
);

View File

@ -0,0 +1,70 @@
2023-07-04 Version: 3.0.0
- Update TrimDocument.
- Update RecognizeTakeoutOrder.
- Update RecognizePassportMRZ.
- Update RecognizeChinapassport.
- Update DetectCardScreenshot.
- Update RecognizeVerificationcode.
- Update RecognizePoiName.
- Update RecognizeAccountPage.
2023-02-16 Version: 2.0.17
- Update RecognizeVideoCharacter.
2023-01-13 Version: 2.0.16
- Update sdk.
2023-01-11 Version: 2.0.15
- Update sdk.
2023-01-05 Version: 2.0.14
- Release RecognizeVATInvoice.
2022-11-10 Version: 2.0.13
- Release RecognizeVATInvoice.
2022-10-17 Version: 2.0.12
- Release RecognizeVATInvoice.
2022-10-14 Version: 2.0.11
- Release RecognizeVATInvoice.
2022-06-21 Version: 2.0.10
- Release RecognizeTurkeyIdentityCard RecognizeMalaysiaIdentityCard RecognizeRussiaIdentityCard RecognizeIndonesiaIdentityCard RecognizeUkraineIdentityCard RecognizeVietnamIdentityCard.
2022-05-25 Version: 2.0.9
- Release RecognizeTurkeyIdentityCard RecognizeMalaysiaIdentityCard RecognizeRussiaIdentityCard RecognizeIndonesiaIdentityCard RecognizeIndonesiaIdentityCard.
2022-05-05 Version: 2.0.8
- Release RecognizeUkraineIdentityCard.
2022-03-09 Version: 2.0.7
- Release RecognizeVideoCastCrewList.
2022-03-03 Version: 2.0.6
- RecognizeVideoCharacter add output field inputFile.
2021-12-15 Version: 2.0.5
- RecognizeVideoCharacter add output field inputFile.
2021-11-23 Version: 1.0.5
- Update RecognizeCharacter.
2021-07-02 Version: 1.0.4
- Release RecognizeQuotaInvoice RecognizeTicketInvoice RecognizePdf.
2021-05-10 Version: 1.0.3
- Update RecognizeDriverLicense RecognizeLicensePlate.
2021-03-25 Version: 1.0.2
- Generated php 2019-12-30 for ocr.
2021-03-04 Version: 1.0.1
- Update Ocr.
2021-01-29 Version: 1.0.0
- Generated php 2019-12-30 for ocr.
2020-11-13 Version: 0.1.16
- Release DetectCardScreenshot RecognizePoiName.

201
vendor/alibabacloud/ocr-20191230/LICENSE vendored Normal file
View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (c) 2009-present, 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.

View File

@ -0,0 +1,35 @@
[English](README.md) | 简体中文
![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
# Alibaba Cloud ocr SDK for PHP
## 安装
### Composer
```bash
composer require alibabacloud/ocr-20191230
```
## 问题
[提交 Issue](https://github.com/aliyun/alibabacloud-php-sdk/issues/new),不符合指南的问题可能会立即关闭。
## 使用说明
[快速使用](https://github.com/aliyun/alibabacloud-php-sdk/blob/master/docs/0-Examples-CN.md#%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8)
## 发行说明
每个版本的详细更改记录在[发行说明](./ChangeLog.txt)中。
## 相关
* [最新源码](https://github.com/aliyun/alibabacloud-php-sdk/)
## 许可证
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

View File

@ -0,0 +1,35 @@
English | [简体中文](README-CN.md)
![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
# Alibaba Cloud ocr SDK for PHP
## Installation
### Composer
```bash
composer require alibabacloud/ocr-20191230
```
## Issues
[Opening an Issue](https://github.com/aliyun/alibabacloud-php-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately.
## Usage
[Quick Examples](https://github.com/aliyun/alibabacloud-php-sdk/blob/master/docs/0-Examples-EN.md#quick-examples)
## Changelog
Detailed changes for each release are documented in the [release notes](./ChangeLog.txt).
## References
* [Latest Release](https://github.com/aliyun/alibabacloud-php-sdk/)
## License
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

View File

@ -0,0 +1,17 @@
<?php
if (file_exists(__DIR__ . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php')) {
require_once __DIR__ . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php';
}
spl_autoload_register(function ($class) {
$name = str_replace('AlibabaCloud\\SDK\\Ocr\\V20191230\\', '', $class);
$file = __DIR__ . \DIRECTORY_SEPARATOR . 'src' . \DIRECTORY_SEPARATOR . str_replace('\\', \DIRECTORY_SEPARATOR, $name) . '.php';
if (file_exists($file)) {
require_once $file;
return true;
}
return false;
});

View File

@ -0,0 +1,37 @@
{
"name": "alibabacloud/ocr-20191230",
"description": "Alibaba Cloud OCR (20191230) SDK Library for PHP",
"type": "library",
"license": "Apache-2.0",
"authors": [
{
"name": "Alibaba Cloud SDK",
"email": "sdk-team@alibabacloud.com"
}
],
"require": {
"php": ">5.5",
"alibabacloud/tea-utils": "^0.2.19",
"alibabacloud/tea-oss-sdk": "^0.3.0",
"alibabacloud/openplatform-20191219": "^2.0.1",
"alibabacloud/tea-oss-utils": "^0.3.1",
"alibabacloud/tea-fileform": "^0.3.0",
"alibabacloud/darabonba-openapi": "^0.2.8",
"alibabacloud/openapi-util": "^0.1.10|^0.2.1",
"alibabacloud/endpoint-util": "^0.1.0"
},
"autoload": {
"psr-4": {
"AlibabaCloud\\SDK\\Ocr\\V20191230\\": "src"
}
},
"scripts": {
"fixer": "php-cs-fixer fix ./"
},
"config": {
"sort-packages": true,
"preferred-install": "dist",
"optimize-autoloader": true
},
"prefer-stable": true
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class GetAsyncJobResultRequest extends Model
{
/**
* @example E75FE679-0303-4DD1-8252-1143B4FA8A27
*
* @var string
*/
public $jobId;
protected $_name = [
'jobId' => 'JobId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->jobId) {
$res['JobId'] = $this->jobId;
}
return $res;
}
/**
* @param array $map
*
* @return GetAsyncJobResultRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['JobId'])) {
$model->jobId = $map['JobId'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class GetAsyncJobResultResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var GetAsyncJobResultResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return GetAsyncJobResultResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = GetAsyncJobResultResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\GetAsyncJobResultResponseBody\data;
use AlibabaCloud\Tea\Model;
class GetAsyncJobResultResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example A1F44EC4-118D-4A03-B213-F908F36F7DAA
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return GetAsyncJobResultResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,103 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\GetAsyncJobResultResponseBody;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @example InvalidParameter
*
* @var string
*/
public $errorCode;
/**
* @example paramsIllegal
*
* @var string
*/
public $errorMessage;
/**
* @example 49E2CC28-ED1D-4CC5-854D-7D0AE2B20976
*
* @var string
*/
public $jobId;
/**
* @var string
*/
public $result;
/**
* @example PROCESS_SUCCESS
*
* @var string
*/
public $status;
protected $_name = [
'errorCode' => 'ErrorCode',
'errorMessage' => 'ErrorMessage',
'jobId' => 'JobId',
'result' => 'Result',
'status' => 'Status',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->errorCode) {
$res['ErrorCode'] = $this->errorCode;
}
if (null !== $this->errorMessage) {
$res['ErrorMessage'] = $this->errorMessage;
}
if (null !== $this->jobId) {
$res['JobId'] = $this->jobId;
}
if (null !== $this->result) {
$res['Result'] = $this->result;
}
if (null !== $this->status) {
$res['Status'] = $this->status;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ErrorCode'])) {
$model->errorCode = $map['ErrorCode'];
}
if (isset($map['ErrorMessage'])) {
$model->errorMessage = $map['ErrorMessage'];
}
if (isset($map['JobId'])) {
$model->jobId = $map['JobId'];
}
if (isset($map['Result'])) {
$model->result = $map['Result'];
}
if (isset($map['Status'])) {
$model->status = $map['Status'];
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeBankCardAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBankCard/yhk3.jpg
*
* @var Stream
*/
public $imageURLObject;
protected $_name = [
'imageURLObject' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBankCardAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBankCardRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBankCard/yhk3.jpg
*
* @var string
*/
public $imageURL;
protected $_name = [
'imageURL' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBankCardRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBankCardResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeBankCardResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBankCardResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeBankCardResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBankCardResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeBankCardResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example D9C7521-0367-42EE-9646-FD066CCADB26
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBankCardResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,75 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBankCardResponseBody;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var string
*/
public $bankName;
/**
* @example 6212262315007683105
*
* @var string
*/
public $cardNumber;
/**
* @example 07/26
*
* @var string
*/
public $validDate;
protected $_name = [
'bankName' => 'BankName',
'cardNumber' => 'CardNumber',
'validDate' => 'ValidDate',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->bankName) {
$res['BankName'] = $this->bankName;
}
if (null !== $this->cardNumber) {
$res['CardNumber'] = $this->cardNumber;
}
if (null !== $this->validDate) {
$res['ValidDate'] = $this->validDate;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['BankName'])) {
$model->bankName = $map['BankName'];
}
if (isset($map['CardNumber'])) {
$model->cardNumber = $map['CardNumber'];
}
if (isset($map['ValidDate'])) {
$model->validDate = $map['ValidDate'];
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeBusinessCardAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessCard/RecognizeBusinessCard1.jpg
*
* @var Stream
*/
public $imageURLObject;
protected $_name = [
'imageURLObject' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessCardAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessCardRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessCard/RecognizeBusinessCard1.jpg
*
* @var string
*/
public $imageURL;
protected $_name = [
'imageURL' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessCardRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessCardResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeBusinessCardResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessCardResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeBusinessCardResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessCardResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessCardResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example 0068957A-C493-481F-BA14-C3F89BF75BD4
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessCardResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,145 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessCardResponseBody;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var string[]
*/
public $addresses;
/**
* @var string[]
*/
public $cellPhoneNumbers;
/**
* @var string[]
*/
public $companies;
/**
* @var string[]
*/
public $departments;
/**
* @var string[]
*/
public $emails;
/**
* @var string
*/
public $name;
/**
* @var string[]
*/
public $officePhoneNumbers;
/**
* @var string[]
*/
public $titles;
protected $_name = [
'addresses' => 'Addresses',
'cellPhoneNumbers' => 'CellPhoneNumbers',
'companies' => 'Companies',
'departments' => 'Departments',
'emails' => 'Emails',
'name' => 'Name',
'officePhoneNumbers' => 'OfficePhoneNumbers',
'titles' => 'Titles',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->addresses) {
$res['Addresses'] = $this->addresses;
}
if (null !== $this->cellPhoneNumbers) {
$res['CellPhoneNumbers'] = $this->cellPhoneNumbers;
}
if (null !== $this->companies) {
$res['Companies'] = $this->companies;
}
if (null !== $this->departments) {
$res['Departments'] = $this->departments;
}
if (null !== $this->emails) {
$res['Emails'] = $this->emails;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->officePhoneNumbers) {
$res['OfficePhoneNumbers'] = $this->officePhoneNumbers;
}
if (null !== $this->titles) {
$res['Titles'] = $this->titles;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Addresses'])) {
if (!empty($map['Addresses'])) {
$model->addresses = $map['Addresses'];
}
}
if (isset($map['CellPhoneNumbers'])) {
if (!empty($map['CellPhoneNumbers'])) {
$model->cellPhoneNumbers = $map['CellPhoneNumbers'];
}
}
if (isset($map['Companies'])) {
if (!empty($map['Companies'])) {
$model->companies = $map['Companies'];
}
}
if (isset($map['Departments'])) {
if (!empty($map['Departments'])) {
$model->departments = $map['Departments'];
}
}
if (isset($map['Emails'])) {
if (!empty($map['Emails'])) {
$model->emails = $map['Emails'];
}
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['OfficePhoneNumbers'])) {
if (!empty($map['OfficePhoneNumbers'])) {
$model->officePhoneNumbers = $map['OfficePhoneNumbers'];
}
}
if (isset($map['Titles'])) {
if (!empty($map['Titles'])) {
$model->titles = $map['Titles'];
}
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeBusinessLicenseAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessLicense/RecognizeBusinessLicense1.jpg
*
* @var Stream
*/
public $imageURLObject;
protected $_name = [
'imageURLObject' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessLicenseAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessLicenseRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessLicense/RecognizeBusinessLicense1.jpg
*
* @var string
*/
public $imageURL;
protected $_name = [
'imageURL' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessLicenseRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessLicenseResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeBusinessLicenseResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessLicenseResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeBusinessLicenseResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeBusinessLicenseResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example F34D031B-02BD-4A59-BA35-EE068DD6F6E6
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeBusinessLicenseResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,215 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data\emblem;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data\QRCode;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data\stamp;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data\title;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var string
*/
public $address;
/**
* @example 0
*
* @var float
*/
public $angle;
/**
* @var string
*/
public $business;
/**
* @var string
*/
public $capital;
/**
* @var emblem
*/
public $emblem;
/**
* @example 20150504
*
* @var string
*/
public $establishDate;
/**
* @var string
*/
public $legalPerson;
/**
* @var string
*/
public $name;
/**
* @var QRCode
*/
public $QRCode;
/**
* @example 91500108320423****
*
* @var string
*/
public $registerNumber;
/**
* @var stamp
*/
public $stamp;
/**
* @var title
*/
public $title;
/**
* @var string
*/
public $type;
/**
* @example 29991231
*
* @var string
*/
public $validPeriod;
protected $_name = [
'address' => 'Address',
'angle' => 'Angle',
'business' => 'Business',
'capital' => 'Capital',
'emblem' => 'Emblem',
'establishDate' => 'EstablishDate',
'legalPerson' => 'LegalPerson',
'name' => 'Name',
'QRCode' => 'QRCode',
'registerNumber' => 'RegisterNumber',
'stamp' => 'Stamp',
'title' => 'Title',
'type' => 'Type',
'validPeriod' => 'ValidPeriod',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->address) {
$res['Address'] = $this->address;
}
if (null !== $this->angle) {
$res['Angle'] = $this->angle;
}
if (null !== $this->business) {
$res['Business'] = $this->business;
}
if (null !== $this->capital) {
$res['Capital'] = $this->capital;
}
if (null !== $this->emblem) {
$res['Emblem'] = null !== $this->emblem ? $this->emblem->toMap() : null;
}
if (null !== $this->establishDate) {
$res['EstablishDate'] = $this->establishDate;
}
if (null !== $this->legalPerson) {
$res['LegalPerson'] = $this->legalPerson;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->QRCode) {
$res['QRCode'] = null !== $this->QRCode ? $this->QRCode->toMap() : null;
}
if (null !== $this->registerNumber) {
$res['RegisterNumber'] = $this->registerNumber;
}
if (null !== $this->stamp) {
$res['Stamp'] = null !== $this->stamp ? $this->stamp->toMap() : null;
}
if (null !== $this->title) {
$res['Title'] = null !== $this->title ? $this->title->toMap() : null;
}
if (null !== $this->type) {
$res['Type'] = $this->type;
}
if (null !== $this->validPeriod) {
$res['ValidPeriod'] = $this->validPeriod;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Address'])) {
$model->address = $map['Address'];
}
if (isset($map['Angle'])) {
$model->angle = $map['Angle'];
}
if (isset($map['Business'])) {
$model->business = $map['Business'];
}
if (isset($map['Capital'])) {
$model->capital = $map['Capital'];
}
if (isset($map['Emblem'])) {
$model->emblem = emblem::fromMap($map['Emblem']);
}
if (isset($map['EstablishDate'])) {
$model->establishDate = $map['EstablishDate'];
}
if (isset($map['LegalPerson'])) {
$model->legalPerson = $map['LegalPerson'];
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['QRCode'])) {
$model->QRCode = QRCode::fromMap($map['QRCode']);
}
if (isset($map['RegisterNumber'])) {
$model->registerNumber = $map['RegisterNumber'];
}
if (isset($map['Stamp'])) {
$model->stamp = stamp::fromMap($map['Stamp']);
}
if (isset($map['Title'])) {
$model->title = title::fromMap($map['Title']);
}
if (isset($map['Type'])) {
$model->type = $map['Type'];
}
if (isset($map['ValidPeriod'])) {
$model->validPeriod = $map['ValidPeriod'];
}
return $model;
}
}

View File

@ -0,0 +1,91 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class QRCode extends Model
{
/**
* @example 132
*
* @var int
*/
public $height;
/**
* @example 156
*
* @var int
*/
public $left;
/**
* @example 914
*
* @var int
*/
public $top;
/**
* @example 126
*
* @var int
*/
public $width;
protected $_name = [
'height' => 'Height',
'left' => 'Left',
'top' => 'Top',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->left) {
$res['Left'] = $this->left;
}
if (null !== $this->top) {
$res['Top'] = $this->top;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return QRCode
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Left'])) {
$model->left = $map['Left'];
}
if (isset($map['Top'])) {
$model->top = $map['Top'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,91 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class emblem extends Model
{
/**
* @example 163
*
* @var int
*/
public $height;
/**
* @example 366
*
* @var int
*/
public $left;
/**
* @example 8
*
* @var int
*/
public $top;
/**
* @example 162
*
* @var int
*/
public $width;
protected $_name = [
'height' => 'Height',
'left' => 'Left',
'top' => 'Top',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->left) {
$res['Left'] = $this->left;
}
if (null !== $this->top) {
$res['Top'] = $this->top;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return emblem
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Left'])) {
$model->left = $map['Left'];
}
if (isset($map['Top'])) {
$model->top = $map['Top'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,91 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class stamp extends Model
{
/**
* @example 154
*
* @var int
*/
public $height;
/**
* @example 650
*
* @var int
*/
public $left;
/**
* @example 1030
*
* @var int
*/
public $top;
/**
* @example 154
*
* @var int
*/
public $width;
protected $_name = [
'height' => 'Height',
'left' => 'Left',
'top' => 'Top',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->left) {
$res['Left'] = $this->left;
}
if (null !== $this->top) {
$res['Top'] = $this->top;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return stamp
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Left'])) {
$model->left = $map['Left'];
}
if (isset($map['Top'])) {
$model->top = $map['Top'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,91 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeBusinessLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class title extends Model
{
/**
* @example 10
*
* @var int
*/
public $height;
/**
* @example 10
*
* @var int
*/
public $left;
/**
* @example 10
*
* @var int
*/
public $top;
/**
* @example 10
*
* @var int
*/
public $width;
protected $_name = [
'height' => 'Height',
'left' => 'Left',
'top' => 'Top',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->left) {
$res['Left'] = $this->left;
}
if (null !== $this->top) {
$res['Top'] = $this->top;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return title
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Left'])) {
$model->left = $map['Left'];
}
if (isset($map['Top'])) {
$model->top = $map['Top'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,78 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeCharacterAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeCharacter/RecognizeCharacter5.jpg
*
* @var Stream
*/
public $imageURLObject;
/**
* @example 10
*
* @var int
*/
public $minHeight;
/**
* @example true
*
* @var bool
*/
public $outputProbability;
protected $_name = [
'imageURLObject' => 'ImageURL',
'minHeight' => 'MinHeight',
'outputProbability' => 'OutputProbability',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
if (null !== $this->minHeight) {
$res['MinHeight'] = $this->minHeight;
}
if (null !== $this->outputProbability) {
$res['OutputProbability'] = $this->outputProbability;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeCharacterAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
if (isset($map['MinHeight'])) {
$model->minHeight = $map['MinHeight'];
}
if (isset($map['OutputProbability'])) {
$model->outputProbability = $map['OutputProbability'];
}
return $model;
}
}

View File

@ -0,0 +1,77 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeCharacterRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeCharacter/RecognizeCharacter5.jpg
*
* @var string
*/
public $imageURL;
/**
* @example 10
*
* @var int
*/
public $minHeight;
/**
* @example true
*
* @var bool
*/
public $outputProbability;
protected $_name = [
'imageURL' => 'ImageURL',
'minHeight' => 'MinHeight',
'outputProbability' => 'OutputProbability',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
if (null !== $this->minHeight) {
$res['MinHeight'] = $this->minHeight;
}
if (null !== $this->outputProbability) {
$res['OutputProbability'] = $this->outputProbability;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeCharacterRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
if (isset($map['MinHeight'])) {
$model->minHeight = $map['MinHeight'];
}
if (isset($map['OutputProbability'])) {
$model->outputProbability = $map['OutputProbability'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeCharacterResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeCharacterResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeCharacterResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeCharacterResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeCharacterResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example 7A9BC7FE-2D42-57AF-93BC-09A229DD2F1D
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeCharacterResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,60 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody\data\results;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var results[]
*/
public $results;
protected $_name = [
'results' => 'Results',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->results) {
$res['Results'] = [];
if (null !== $this->results && \is_array($this->results)) {
$n = 0;
foreach ($this->results as $item) {
$res['Results'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Results'])) {
if (!empty($map['Results'])) {
$model->results = [];
$n = 0;
foreach ($map['Results'] as $item) {
$model->results[$n++] = null !== $item ? results::fromMap($item) : $item;
}
}
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody\data;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody\data\results\textRectangles;
use AlibabaCloud\Tea\Model;
class results extends Model
{
/**
* @example 0.99
*
* @var float
*/
public $probability;
/**
* @var string
*/
public $text;
/**
* @var textRectangles
*/
public $textRectangles;
protected $_name = [
'probability' => 'Probability',
'text' => 'Text',
'textRectangles' => 'TextRectangles',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->probability) {
$res['Probability'] = $this->probability;
}
if (null !== $this->text) {
$res['Text'] = $this->text;
}
if (null !== $this->textRectangles) {
$res['TextRectangles'] = null !== $this->textRectangles ? $this->textRectangles->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return results
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Probability'])) {
$model->probability = $map['Probability'];
}
if (isset($map['Text'])) {
$model->text = $map['Text'];
}
if (isset($map['TextRectangles'])) {
$model->textRectangles = textRectangles::fromMap($map['TextRectangles']);
}
return $model;
}
}

View File

@ -0,0 +1,105 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeCharacterResponseBody\data\results;
use AlibabaCloud\Tea\Model;
class textRectangles extends Model
{
/**
* @example -65
*
* @var int
*/
public $angle;
/**
* @example 409
*
* @var int
*/
public $height;
/**
* @example 511
*
* @var int
*/
public $left;
/**
* @example 150
*
* @var int
*/
public $top;
/**
* @example 77
*
* @var int
*/
public $width;
protected $_name = [
'angle' => 'Angle',
'height' => 'Height',
'left' => 'Left',
'top' => 'Top',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->angle) {
$res['Angle'] = $this->angle;
}
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->left) {
$res['Left'] = $this->left;
}
if (null !== $this->top) {
$res['Top'] = $this->top;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return textRectangles
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Angle'])) {
$model->angle = $map['Angle'];
}
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Left'])) {
$model->left = $map['Left'];
}
if (isset($map['Top'])) {
$model->top = $map['Top'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,64 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeDriverLicenseAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDriverLicense/jsz2.jpg
*
* @var Stream
*/
public $imageURLObject;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURLObject' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDriverLicenseAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeDriverLicenseRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDriverLicense/jsz2.jpg
*
* @var string
*/
public $imageURL;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURL' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDriverLicenseRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeDriverLicenseResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeDriverLicenseResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDriverLicenseResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeDriverLicenseResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeDriverLicenseResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example 374D8C7E-9ECC-4750-A87F-50571702F175
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDriverLicenseResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,61 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody\data\backResult;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody\data\faceResult;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var backResult
*/
public $backResult;
/**
* @var faceResult
*/
public $faceResult;
protected $_name = [
'backResult' => 'BackResult',
'faceResult' => 'FaceResult',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->backResult) {
$res['BackResult'] = null !== $this->backResult ? $this->backResult->toMap() : null;
}
if (null !== $this->faceResult) {
$res['FaceResult'] = null !== $this->faceResult ? $this->faceResult->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['BackResult'])) {
$model->backResult = backResult::fromMap($map['BackResult']);
}
if (isset($map['FaceResult'])) {
$model->faceResult = faceResult::fromMap($map['FaceResult']);
}
return $model;
}
}

View File

@ -0,0 +1,87 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class backResult extends Model
{
/**
* @example 130601473955
*
* @var string
*/
public $archiveNumber;
/**
* @example 210288898898898888
*
* @var string
*/
public $cardNumber;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $record;
protected $_name = [
'archiveNumber' => 'ArchiveNumber',
'cardNumber' => 'CardNumber',
'name' => 'Name',
'record' => 'Record',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->archiveNumber) {
$res['ArchiveNumber'] = $this->archiveNumber;
}
if (null !== $this->cardNumber) {
$res['CardNumber'] = $this->cardNumber;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->record) {
$res['Record'] = $this->record;
}
return $res;
}
/**
* @param array $map
*
* @return backResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ArchiveNumber'])) {
$model->archiveNumber = $map['ArchiveNumber'];
}
if (isset($map['CardNumber'])) {
$model->cardNumber = $map['CardNumber'];
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['Record'])) {
$model->record = $map['Record'];
}
return $model;
}
}

View File

@ -0,0 +1,153 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDriverLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class faceResult extends Model
{
/**
* @var string
*/
public $address;
/**
* @example 20190201
*
* @var string
*/
public $endDate;
/**
* @var string
*/
public $gender;
/**
* @example 20130208
*
* @var string
*/
public $issueDate;
/**
* @var string
*/
public $issueUnit;
/**
* @example 210288898898898888
*
* @var string
*/
public $licenseNumber;
/**
* @var string
*/
public $name;
/**
* @example 20130208
*
* @var string
*/
public $startDate;
/**
* @example C1
*
* @var string
*/
public $vehicleType;
protected $_name = [
'address' => 'Address',
'endDate' => 'EndDate',
'gender' => 'Gender',
'issueDate' => 'IssueDate',
'issueUnit' => 'IssueUnit',
'licenseNumber' => 'LicenseNumber',
'name' => 'Name',
'startDate' => 'StartDate',
'vehicleType' => 'VehicleType',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->address) {
$res['Address'] = $this->address;
}
if (null !== $this->endDate) {
$res['EndDate'] = $this->endDate;
}
if (null !== $this->gender) {
$res['Gender'] = $this->gender;
}
if (null !== $this->issueDate) {
$res['IssueDate'] = $this->issueDate;
}
if (null !== $this->issueUnit) {
$res['IssueUnit'] = $this->issueUnit;
}
if (null !== $this->licenseNumber) {
$res['LicenseNumber'] = $this->licenseNumber;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->startDate) {
$res['StartDate'] = $this->startDate;
}
if (null !== $this->vehicleType) {
$res['VehicleType'] = $this->vehicleType;
}
return $res;
}
/**
* @param array $map
*
* @return faceResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Address'])) {
$model->address = $map['Address'];
}
if (isset($map['EndDate'])) {
$model->endDate = $map['EndDate'];
}
if (isset($map['Gender'])) {
$model->gender = $map['Gender'];
}
if (isset($map['IssueDate'])) {
$model->issueDate = $map['IssueDate'];
}
if (isset($map['IssueUnit'])) {
$model->issueUnit = $map['IssueUnit'];
}
if (isset($map['LicenseNumber'])) {
$model->licenseNumber = $map['LicenseNumber'];
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['StartDate'])) {
$model->startDate = $map['StartDate'];
}
if (isset($map['VehicleType'])) {
$model->vehicleType = $map['VehicleType'];
}
return $model;
}
}

View File

@ -0,0 +1,64 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeDrivingLicenseAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDrivingLicense/xsz2.jpg
*
* @var Stream
*/
public $imageURLObject;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURLObject' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDrivingLicenseAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeDrivingLicenseRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDrivingLicense/xsz2.jpg
*
* @var string
*/
public $imageURL;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURL' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDrivingLicenseRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeDrivingLicenseResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeDrivingLicenseResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDrivingLicenseResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeDrivingLicenseResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeDrivingLicenseResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example 1DD989C1-4E08-4E04-9D5D-314901E91226
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeDrivingLicenseResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,61 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody\data\backResult;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody\data\faceResult;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var backResult
*/
public $backResult;
/**
* @var faceResult
*/
public $faceResult;
protected $_name = [
'backResult' => 'BackResult',
'faceResult' => 'FaceResult',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->backResult) {
$res['BackResult'] = null !== $this->backResult ? $this->backResult->toMap() : null;
}
if (null !== $this->faceResult) {
$res['FaceResult'] = null !== $this->faceResult ? $this->faceResult->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['BackResult'])) {
$model->backResult = backResult::fromMap($map['BackResult']);
}
if (isset($map['FaceResult'])) {
$model->faceResult = faceResult::fromMap($map['FaceResult']);
}
return $model;
}
}

View File

@ -0,0 +1,169 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class backResult extends Model
{
/**
* @example 300
*
* @var string
*/
public $approvedLoad;
/**
* @example 5
*
* @var string
*/
public $approvedPassengerCapacity;
/**
* @example -
*
* @var string
*/
public $energyType;
/**
* @var string
*/
public $fileNumber;
/**
* @example 2205
*
* @var string
*/
public $grossMass;
/**
* @var string
*/
public $inspectionRecord;
/**
* @example 4945x1845x1480
*
* @var string
*/
public $overallDimension;
/**
* @var string
*/
public $plateNumber;
/**
* @example 100
*
* @var string
*/
public $tractionMass;
/**
* @example 2000
*
* @var string
*/
public $unladenMass;
protected $_name = [
'approvedLoad' => 'ApprovedLoad',
'approvedPassengerCapacity' => 'ApprovedPassengerCapacity',
'energyType' => 'EnergyType',
'fileNumber' => 'FileNumber',
'grossMass' => 'GrossMass',
'inspectionRecord' => 'InspectionRecord',
'overallDimension' => 'OverallDimension',
'plateNumber' => 'PlateNumber',
'tractionMass' => 'TractionMass',
'unladenMass' => 'UnladenMass',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->approvedLoad) {
$res['ApprovedLoad'] = $this->approvedLoad;
}
if (null !== $this->approvedPassengerCapacity) {
$res['ApprovedPassengerCapacity'] = $this->approvedPassengerCapacity;
}
if (null !== $this->energyType) {
$res['EnergyType'] = $this->energyType;
}
if (null !== $this->fileNumber) {
$res['FileNumber'] = $this->fileNumber;
}
if (null !== $this->grossMass) {
$res['GrossMass'] = $this->grossMass;
}
if (null !== $this->inspectionRecord) {
$res['InspectionRecord'] = $this->inspectionRecord;
}
if (null !== $this->overallDimension) {
$res['OverallDimension'] = $this->overallDimension;
}
if (null !== $this->plateNumber) {
$res['PlateNumber'] = $this->plateNumber;
}
if (null !== $this->tractionMass) {
$res['TractionMass'] = $this->tractionMass;
}
if (null !== $this->unladenMass) {
$res['UnladenMass'] = $this->unladenMass;
}
return $res;
}
/**
* @param array $map
*
* @return backResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ApprovedLoad'])) {
$model->approvedLoad = $map['ApprovedLoad'];
}
if (isset($map['ApprovedPassengerCapacity'])) {
$model->approvedPassengerCapacity = $map['ApprovedPassengerCapacity'];
}
if (isset($map['EnergyType'])) {
$model->energyType = $map['EnergyType'];
}
if (isset($map['FileNumber'])) {
$model->fileNumber = $map['FileNumber'];
}
if (isset($map['GrossMass'])) {
$model->grossMass = $map['GrossMass'];
}
if (isset($map['InspectionRecord'])) {
$model->inspectionRecord = $map['InspectionRecord'];
}
if (isset($map['OverallDimension'])) {
$model->overallDimension = $map['OverallDimension'];
}
if (isset($map['PlateNumber'])) {
$model->plateNumber = $map['PlateNumber'];
}
if (isset($map['TractionMass'])) {
$model->tractionMass = $map['TractionMass'];
}
if (isset($map['UnladenMass'])) {
$model->unladenMass = $map['UnladenMass'];
}
return $model;
}
}

View File

@ -0,0 +1,163 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeDrivingLicenseResponseBody\data;
use AlibabaCloud\Tea\Model;
class faceResult extends Model
{
/**
* @var string
*/
public $address;
/**
* @example 111111
*
* @var string
*/
public $engineNumber;
/**
* @example 20180313
*
* @var string
*/
public $issueDate;
/**
* @var string
*/
public $model;
/**
* @var string
*/
public $owner;
/**
* @var string
*/
public $plateNumber;
/**
* @example 20180312
*
* @var string
*/
public $registerDate;
/**
* @var string
*/
public $useCharacter;
/**
* @var string
*/
public $vehicleType;
/**
* @example SSVUDDTT2J2022555
*
* @var string
*/
public $vin;
protected $_name = [
'address' => 'Address',
'engineNumber' => 'EngineNumber',
'issueDate' => 'IssueDate',
'model' => 'Model',
'owner' => 'Owner',
'plateNumber' => 'PlateNumber',
'registerDate' => 'RegisterDate',
'useCharacter' => 'UseCharacter',
'vehicleType' => 'VehicleType',
'vin' => 'Vin',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->address) {
$res['Address'] = $this->address;
}
if (null !== $this->engineNumber) {
$res['EngineNumber'] = $this->engineNumber;
}
if (null !== $this->issueDate) {
$res['IssueDate'] = $this->issueDate;
}
if (null !== $this->model) {
$res['Model'] = $this->model;
}
if (null !== $this->owner) {
$res['Owner'] = $this->owner;
}
if (null !== $this->plateNumber) {
$res['PlateNumber'] = $this->plateNumber;
}
if (null !== $this->registerDate) {
$res['RegisterDate'] = $this->registerDate;
}
if (null !== $this->useCharacter) {
$res['UseCharacter'] = $this->useCharacter;
}
if (null !== $this->vehicleType) {
$res['VehicleType'] = $this->vehicleType;
}
if (null !== $this->vin) {
$res['Vin'] = $this->vin;
}
return $res;
}
/**
* @param array $map
*
* @return faceResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Address'])) {
$model->address = $map['Address'];
}
if (isset($map['EngineNumber'])) {
$model->engineNumber = $map['EngineNumber'];
}
if (isset($map['IssueDate'])) {
$model->issueDate = $map['IssueDate'];
}
if (isset($map['Model'])) {
$model->model = $map['Model'];
}
if (isset($map['Owner'])) {
$model->owner = $map['Owner'];
}
if (isset($map['PlateNumber'])) {
$model->plateNumber = $map['PlateNumber'];
}
if (isset($map['RegisterDate'])) {
$model->registerDate = $map['RegisterDate'];
}
if (isset($map['UseCharacter'])) {
$model->useCharacter = $map['UseCharacter'];
}
if (isset($map['VehicleType'])) {
$model->vehicleType = $map['VehicleType'];
}
if (isset($map['Vin'])) {
$model->vin = $map['Vin'];
}
return $model;
}
}

View File

@ -0,0 +1,64 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeIdentityCardAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfz1.jpg
*
* @var Stream
*/
public $imageURLObject;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURLObject' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeIdentityCardAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeIdentityCardRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfz1.jpg
*
* @var string
*/
public $imageURL;
/**
* @example face
*
* @var string
*/
public $side;
protected $_name = [
'imageURL' => 'ImageURL',
'side' => 'Side',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
if (null !== $this->side) {
$res['Side'] = $this->side;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeIdentityCardRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
if (isset($map['Side'])) {
$model->side = $map['Side'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeIdentityCardResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeIdentityCardResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeIdentityCardResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeIdentityCardResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeIdentityCardResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example D3F5BA69-79C4-46A4-B02B-58C4EEBC4C33
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeIdentityCardResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,61 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\backResult;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var backResult
*/
public $backResult;
/**
* @var frontResult
*/
public $frontResult;
protected $_name = [
'backResult' => 'BackResult',
'frontResult' => 'FrontResult',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->backResult) {
$res['BackResult'] = null !== $this->backResult ? $this->backResult->toMap() : null;
}
if (null !== $this->frontResult) {
$res['FrontResult'] = null !== $this->frontResult ? $this->frontResult->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['BackResult'])) {
$model->backResult = backResult::fromMap($map['BackResult']);
}
if (isset($map['FrontResult'])) {
$model->frontResult = frontResult::fromMap($map['FrontResult']);
}
return $model;
}
}

View File

@ -0,0 +1,75 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data;
use AlibabaCloud\Tea\Model;
class backResult extends Model
{
/**
* @example 19800101
*
* @var string
*/
public $endDate;
/**
* @var string
*/
public $issue;
/**
* @example 19970101
*
* @var string
*/
public $startDate;
protected $_name = [
'endDate' => 'EndDate',
'issue' => 'Issue',
'startDate' => 'StartDate',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->endDate) {
$res['EndDate'] = $this->endDate;
}
if (null !== $this->issue) {
$res['Issue'] = $this->issue;
}
if (null !== $this->startDate) {
$res['StartDate'] = $this->startDate;
}
return $res;
}
/**
* @param array $map
*
* @return backResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['EndDate'])) {
$model->endDate = $map['EndDate'];
}
if (isset($map['Issue'])) {
$model->issue = $map['Issue'];
}
if (isset($map['StartDate'])) {
$model->startDate = $map['StartDate'];
}
return $model;
}
}

View File

@ -0,0 +1,174 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\cardAreas;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectangle;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectVertices;
use AlibabaCloud\Tea\Model;
class frontResult extends Model
{
/**
* @var string
*/
public $address;
/**
* @example 19960111
*
* @var string
*/
public $birthDate;
/**
* @var cardAreas[]
*/
public $cardAreas;
/**
* @var faceRectVertices[]
*/
public $faceRectVertices;
/**
* @var faceRectangle
*/
public $faceRectangle;
/**
* @var string
*/
public $gender;
/**
* @example 310228199601115411
*
* @var string
*/
public $IDNumber;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $nationality;
protected $_name = [
'address' => 'Address',
'birthDate' => 'BirthDate',
'cardAreas' => 'CardAreas',
'faceRectVertices' => 'FaceRectVertices',
'faceRectangle' => 'FaceRectangle',
'gender' => 'Gender',
'IDNumber' => 'IDNumber',
'name' => 'Name',
'nationality' => 'Nationality',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->address) {
$res['Address'] = $this->address;
}
if (null !== $this->birthDate) {
$res['BirthDate'] = $this->birthDate;
}
if (null !== $this->cardAreas) {
$res['CardAreas'] = [];
if (null !== $this->cardAreas && \is_array($this->cardAreas)) {
$n = 0;
foreach ($this->cardAreas as $item) {
$res['CardAreas'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->faceRectVertices) {
$res['FaceRectVertices'] = [];
if (null !== $this->faceRectVertices && \is_array($this->faceRectVertices)) {
$n = 0;
foreach ($this->faceRectVertices as $item) {
$res['FaceRectVertices'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->faceRectangle) {
$res['FaceRectangle'] = null !== $this->faceRectangle ? $this->faceRectangle->toMap() : null;
}
if (null !== $this->gender) {
$res['Gender'] = $this->gender;
}
if (null !== $this->IDNumber) {
$res['IDNumber'] = $this->IDNumber;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->nationality) {
$res['Nationality'] = $this->nationality;
}
return $res;
}
/**
* @param array $map
*
* @return frontResult
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Address'])) {
$model->address = $map['Address'];
}
if (isset($map['BirthDate'])) {
$model->birthDate = $map['BirthDate'];
}
if (isset($map['CardAreas'])) {
if (!empty($map['CardAreas'])) {
$model->cardAreas = [];
$n = 0;
foreach ($map['CardAreas'] as $item) {
$model->cardAreas[$n++] = null !== $item ? cardAreas::fromMap($item) : $item;
}
}
}
if (isset($map['FaceRectVertices'])) {
if (!empty($map['FaceRectVertices'])) {
$model->faceRectVertices = [];
$n = 0;
foreach ($map['FaceRectVertices'] as $item) {
$model->faceRectVertices[$n++] = null !== $item ? faceRectVertices::fromMap($item) : $item;
}
}
}
if (isset($map['FaceRectangle'])) {
$model->faceRectangle = faceRectangle::fromMap($map['FaceRectangle']);
}
if (isset($map['Gender'])) {
$model->gender = $map['Gender'];
}
if (isset($map['IDNumber'])) {
$model->IDNumber = $map['IDNumber'];
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['Nationality'])) {
$model->nationality = $map['Nationality'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult;
use AlibabaCloud\Tea\Model;
class cardAreas extends Model
{
/**
* @example 40
*
* @var float
*/
public $x;
/**
* @example 81
*
* @var float
*/
public $y;
protected $_name = [
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return cardAreas
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult;
use AlibabaCloud\Tea\Model;
class faceRectVertices extends Model
{
/**
* @example 429.46124267578125
*
* @var float
*/
public $x;
/**
* @example 164.23321533203125
*
* @var float
*/
public $y;
protected $_name = [
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return faceRectVertices
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,75 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectangle\center;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectangle\size;
use AlibabaCloud\Tea\Model;
class faceRectangle extends Model
{
/**
* @example -87.710586547851562
*
* @var float
*/
public $angle;
/**
* @var center
*/
public $center;
/**
* @var size
*/
public $size;
protected $_name = [
'angle' => 'Angle',
'center' => 'Center',
'size' => 'Size',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->angle) {
$res['Angle'] = $this->angle;
}
if (null !== $this->center) {
$res['Center'] = null !== $this->center ? $this->center->toMap() : null;
}
if (null !== $this->size) {
$res['Size'] = null !== $this->size ? $this->size->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return faceRectangle
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Angle'])) {
$model->angle = $map['Angle'];
}
if (isset($map['Center'])) {
$model->center = center::fromMap($map['Center']);
}
if (isset($map['Size'])) {
$model->size = size::fromMap($map['Size']);
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectangle;
use AlibabaCloud\Tea\Model;
class center extends Model
{
/**
* @example 475.59390258789062
*
* @var float
*/
public $x;
/**
* @example 225.20643615722656
*
* @var float
*/
public $y;
protected $_name = [
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return center
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeIdentityCardResponseBody\data\frontResult\faceRectangle;
use AlibabaCloud\Tea\Model;
class size extends Model
{
/**
* @example 97.063156127929688
*
* @var float
*/
public $height;
/**
* @example 118.16333770751953
*
* @var float
*/
public $width;
protected $_name = [
'height' => 'Height',
'width' => 'Width',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
return $res;
}
/**
* @param array $map
*
* @return size
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizeLicensePlateAdvanceRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeLicensePlate/cpsb1.jpg
*
* @var Stream
*/
public $imageURLObject;
protected $_name = [
'imageURLObject' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeLicensePlateAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeLicensePlateRequest extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeLicensePlate/cpsb1.jpg
*
* @var string
*/
public $imageURL;
protected $_name = [
'imageURL' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURL) {
$res['ImageURL'] = $this->imageURL;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeLicensePlateRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURL = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizeLicensePlateResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizeLicensePlateResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeLicensePlateResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizeLicensePlateResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizeLicensePlateResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example 3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeLicensePlateResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,60 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data\plates;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @var plates[]
*/
public $plates;
protected $_name = [
'plates' => 'Plates',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->plates) {
$res['Plates'] = [];
if (null !== $this->plates && \is_array($this->plates)) {
$n = 0;
foreach ($this->plates as $item) {
$res['Plates'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Plates'])) {
if (!empty($map['Plates'])) {
$model->plates = [];
$n = 0;
foreach ($map['Plates'] as $item) {
$model->plates[$n++] = null !== $item ? plates::fromMap($item) : $item;
}
}
}
return $model;
}
}

View File

@ -0,0 +1,125 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data\plates\positions;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data\plates\roi;
use AlibabaCloud\Tea\Model;
class plates extends Model
{
/**
* @example 0.99745339155197144
*
* @var float
*/
public $confidence;
/**
* @var string
*/
public $plateNumber;
/**
* @var string
*/
public $plateType;
/**
* @example 1
*
* @var float
*/
public $plateTypeConfidence;
/**
* @var positions[]
*/
public $positions;
/**
* @var roi
*/
public $roi;
protected $_name = [
'confidence' => 'Confidence',
'plateNumber' => 'PlateNumber',
'plateType' => 'PlateType',
'plateTypeConfidence' => 'PlateTypeConfidence',
'positions' => 'Positions',
'roi' => 'Roi',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->confidence) {
$res['Confidence'] = $this->confidence;
}
if (null !== $this->plateNumber) {
$res['PlateNumber'] = $this->plateNumber;
}
if (null !== $this->plateType) {
$res['PlateType'] = $this->plateType;
}
if (null !== $this->plateTypeConfidence) {
$res['PlateTypeConfidence'] = $this->plateTypeConfidence;
}
if (null !== $this->positions) {
$res['Positions'] = [];
if (null !== $this->positions && \is_array($this->positions)) {
$n = 0;
foreach ($this->positions as $item) {
$res['Positions'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->roi) {
$res['Roi'] = null !== $this->roi ? $this->roi->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return plates
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Confidence'])) {
$model->confidence = $map['Confidence'];
}
if (isset($map['PlateNumber'])) {
$model->plateNumber = $map['PlateNumber'];
}
if (isset($map['PlateType'])) {
$model->plateType = $map['PlateType'];
}
if (isset($map['PlateTypeConfidence'])) {
$model->plateTypeConfidence = $map['PlateTypeConfidence'];
}
if (isset($map['Positions'])) {
if (!empty($map['Positions'])) {
$model->positions = [];
$n = 0;
foreach ($map['Positions'] as $item) {
$model->positions[$n++] = null !== $item ? positions::fromMap($item) : $item;
}
}
}
if (isset($map['Roi'])) {
$model->roi = roi::fromMap($map['Roi']);
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data\plates;
use AlibabaCloud\Tea\Model;
class positions extends Model
{
/**
* @example 466
*
* @var int
*/
public $x;
/**
* @example 293
*
* @var int
*/
public $y;
protected $_name = [
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return positions
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,91 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeLicensePlateResponseBody\data\plates;
use AlibabaCloud\Tea\Model;
class roi extends Model
{
/**
* @example 53
*
* @var int
*/
public $h;
/**
* @example 141
*
* @var int
*/
public $w;
/**
* @example 294
*
* @var int
*/
public $x;
/**
* @example 256
*
* @var int
*/
public $y;
protected $_name = [
'h' => 'H',
'w' => 'W',
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->h) {
$res['H'] = $this->h;
}
if (null !== $this->w) {
$res['W'] = $this->w;
}
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return roi
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['H'])) {
$model->h = $map['H'];
}
if (isset($map['W'])) {
$model->w = $map['W'];
}
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class RecognizePdfAdvanceRequest extends Model
{
/**
* @example https://viapi-test.oss-cn-shanghai.aliyuncs.com/ocr/xxxx.pdf
*
* @var Stream
*/
public $fileURLObject;
protected $_name = [
'fileURLObject' => 'FileURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->fileURLObject) {
$res['FileURL'] = $this->fileURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizePdfAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['FileURL'])) {
$model->fileURLObject = $map['FileURL'];
}
return $model;
}
}

View File

@ -0,0 +1,49 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizePdfRequest extends Model
{
/**
* @example https://viapi-test.oss-cn-shanghai.aliyuncs.com/ocr/xxxx.pdf
*
* @var string
*/
public $fileURL;
protected $_name = [
'fileURL' => 'FileURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->fileURL) {
$res['FileURL'] = $this->fileURL;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizePdfRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['FileURL'])) {
$model->fileURL = $map['FileURL'];
}
return $model;
}
}

View File

@ -0,0 +1,74 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\Tea\Model;
class RecognizePdfResponse extends Model
{
/**
* @var string[]
*/
public $headers;
/**
* @var int
*/
public $statusCode;
/**
* @var RecognizePdfResponseBody
*/
public $body;
protected $_name = [
'headers' => 'headers',
'statusCode' => 'statusCode',
'body' => 'body',
];
public function validate()
{
Model::validateRequired('headers', $this->headers, true);
Model::validateRequired('statusCode', $this->statusCode, true);
Model::validateRequired('body', $this->body, true);
}
public function toMap()
{
$res = [];
if (null !== $this->headers) {
$res['headers'] = $this->headers;
}
if (null !== $this->statusCode) {
$res['statusCode'] = $this->statusCode;
}
if (null !== $this->body) {
$res['body'] = null !== $this->body ? $this->body->toMap() : null;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizePdfResponse
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['headers'])) {
$model->headers = $map['headers'];
}
if (isset($map['statusCode'])) {
$model->statusCode = $map['statusCode'];
}
if (isset($map['body'])) {
$model->body = RecognizePdfResponseBody::fromMap($map['body']);
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody\data;
use AlibabaCloud\Tea\Model;
class RecognizePdfResponseBody extends Model
{
/**
* @var data
*/
public $data;
/**
* @example CD9A9659-ABEE-4A7D-837F-9FDF40879A97
*
* @var string
*/
public $requestId;
protected $_name = [
'data' => 'Data',
'requestId' => 'RequestId',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->data) {
$res['Data'] = null !== $this->data ? $this->data->toMap() : null;
}
if (null !== $this->requestId) {
$res['RequestId'] = $this->requestId;
}
return $res;
}
/**
* @param array $map
*
* @return RecognizePdfResponseBody
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Data'])) {
$model->data = data::fromMap($map['Data']);
}
if (isset($map['RequestId'])) {
$model->requestId = $map['RequestId'];
}
return $model;
}
}

View File

@ -0,0 +1,144 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody\data\wordsInfo;
use AlibabaCloud\Tea\Model;
class data extends Model
{
/**
* @example 0
*
* @var int
*/
public $angle;
/**
* @example 788
*
* @var int
*/
public $height;
/**
* @example 610
*
* @var int
*/
public $orgHeight;
/**
* @example 394
*
* @var int
*/
public $orgWidth;
/**
* @example 1
*
* @var int
*/
public $pageIndex;
/**
* @example 1220
*
* @var int
*/
public $width;
/**
* @var wordsInfo[]
*/
public $wordsInfo;
protected $_name = [
'angle' => 'Angle',
'height' => 'Height',
'orgHeight' => 'OrgHeight',
'orgWidth' => 'OrgWidth',
'pageIndex' => 'PageIndex',
'width' => 'Width',
'wordsInfo' => 'WordsInfo',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->angle) {
$res['Angle'] = $this->angle;
}
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->orgHeight) {
$res['OrgHeight'] = $this->orgHeight;
}
if (null !== $this->orgWidth) {
$res['OrgWidth'] = $this->orgWidth;
}
if (null !== $this->pageIndex) {
$res['PageIndex'] = $this->pageIndex;
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
if (null !== $this->wordsInfo) {
$res['WordsInfo'] = [];
if (null !== $this->wordsInfo && \is_array($this->wordsInfo)) {
$n = 0;
foreach ($this->wordsInfo as $item) {
$res['WordsInfo'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}
/**
* @param array $map
*
* @return data
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Angle'])) {
$model->angle = $map['Angle'];
}
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['OrgHeight'])) {
$model->orgHeight = $map['OrgHeight'];
}
if (isset($map['OrgWidth'])) {
$model->orgWidth = $map['OrgWidth'];
}
if (isset($map['PageIndex'])) {
$model->pageIndex = $map['PageIndex'];
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
if (isset($map['WordsInfo'])) {
if (!empty($map['WordsInfo'])) {
$model->wordsInfo = [];
$n = 0;
foreach ($map['WordsInfo'] as $item) {
$model->wordsInfo[$n++] = null !== $item ? wordsInfo::fromMap($item) : $item;
}
}
}
return $model;
}
}

View File

@ -0,0 +1,142 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody\data;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody\data\wordsInfo\positions;
use AlibabaCloud\Tea\Model;
class wordsInfo extends Model
{
/**
* @example 0
*
* @var int
*/
public $angle;
/**
* @example 16
*
* @var int
*/
public $height;
/**
* @var positions[]
*/
public $positions;
/**
* @example 205
*
* @var int
*/
public $width;
/**
* @var string
*/
public $word;
/**
* @example 863
*
* @var int
*/
public $x;
/**
* @example 46
*
* @var int
*/
public $y;
protected $_name = [
'angle' => 'Angle',
'height' => 'Height',
'positions' => 'Positions',
'width' => 'Width',
'word' => 'Word',
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->angle) {
$res['Angle'] = $this->angle;
}
if (null !== $this->height) {
$res['Height'] = $this->height;
}
if (null !== $this->positions) {
$res['Positions'] = [];
if (null !== $this->positions && \is_array($this->positions)) {
$n = 0;
foreach ($this->positions as $item) {
$res['Positions'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->width) {
$res['Width'] = $this->width;
}
if (null !== $this->word) {
$res['Word'] = $this->word;
}
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return wordsInfo
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Angle'])) {
$model->angle = $map['Angle'];
}
if (isset($map['Height'])) {
$model->height = $map['Height'];
}
if (isset($map['Positions'])) {
if (!empty($map['Positions'])) {
$model->positions = [];
$n = 0;
foreach ($map['Positions'] as $item) {
$model->positions[$n++] = null !== $item ? positions::fromMap($item) : $item;
}
}
}
if (isset($map['Width'])) {
$model->width = $map['Width'];
}
if (isset($map['Word'])) {
$model->word = $map['Word'];
}
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,63 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizePdfResponseBody\data\wordsInfo;
use AlibabaCloud\Tea\Model;
class positions extends Model
{
/**
* @example 863
*
* @var int
*/
public $x;
/**
* @example 43
*
* @var int
*/
public $y;
protected $_name = [
'x' => 'X',
'y' => 'Y',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->x) {
$res['X'] = $this->x;
}
if (null !== $this->y) {
$res['Y'] = $this->y;
}
return $res;
}
/**
* @param array $map
*
* @return positions
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['X'])) {
$model->x = $map['X'];
}
if (isset($map['Y'])) {
$model->y = $map['Y'];
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeQrCodeAdvanceRequest\tasks;
use AlibabaCloud\Tea\Model;
class RecognizeQrCodeAdvanceRequest extends Model
{
/**
* @description 1
*
* @var tasks[]
*/
public $tasks;
protected $_name = [
'tasks' => 'Tasks',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->tasks) {
$res['Tasks'] = [];
if (null !== $this->tasks && \is_array($this->tasks)) {
$n = 0;
foreach ($this->tasks as $item) {
$res['Tasks'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeQrCodeAdvanceRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Tasks'])) {
if (!empty($map['Tasks'])) {
$model->tasks = [];
$n = 0;
foreach ($map['Tasks'] as $item) {
$model->tasks[$n++] = null !== $item ? tasks::fromMap($item) : $item;
}
}
}
return $model;
}
}

View File

@ -0,0 +1,50 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeQrCodeAdvanceRequest;
use AlibabaCloud\Tea\Model;
use GuzzleHttp\Psr7\Stream;
class tasks extends Model
{
/**
* @example http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg
*
* @var Stream
*/
public $imageURLObject;
protected $_name = [
'imageURLObject' => 'ImageURL',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->imageURLObject) {
$res['ImageURL'] = $this->imageURLObject;
}
return $res;
}
/**
* @param array $map
*
* @return tasks
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['ImageURL'])) {
$model->imageURLObject = $map['ImageURL'];
}
return $model;
}
}

View File

@ -0,0 +1,62 @@
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Ocr\V20191230\Models;
use AlibabaCloud\SDK\Ocr\V20191230\Models\RecognizeQrCodeRequest\tasks;
use AlibabaCloud\Tea\Model;
class RecognizeQrCodeRequest extends Model
{
/**
* @description 1
*
* @var tasks[]
*/
public $tasks;
protected $_name = [
'tasks' => 'Tasks',
];
public function validate()
{
}
public function toMap()
{
$res = [];
if (null !== $this->tasks) {
$res['Tasks'] = [];
if (null !== $this->tasks && \is_array($this->tasks)) {
$n = 0;
foreach ($this->tasks as $item) {
$res['Tasks'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}
/**
* @param array $map
*
* @return RecognizeQrCodeRequest
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['Tasks'])) {
if (!empty($map['Tasks'])) {
$model->tasks = [];
$n = 0;
foreach ($map['Tasks'] as $item) {
$model->tasks[$n++] = null !== $item ? tasks::fromMap($item) : $item;
}
}
}
return $model;
}
}

Some files were not shown because too many files have changed in this diff Show More