regula-documentreader-webclient 9.1.2.dev0__py3-none-any.whl → 9.2.650.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- regula/documentreader/webclient/gen/__init__.py +51 -0
- regula/documentreader/webclient/gen/models/__init__.py +34 -0
- regula/documentreader/webclient/gen/models/area_array.py +2 -2
- regula/documentreader/webclient/gen/models/area_container.py +2 -2
- regula/documentreader/webclient/gen/models/auth_params.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_check_list.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_check_list_item.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_check_result.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_result.py +1 -1
- regula/documentreader/webclient/gen/models/barcode_position_item.py +1 -1
- regula/documentreader/webclient/gen/models/barcode_position_result.py +1 -1
- regula/documentreader/webclient/gen/models/binary_data.py +3 -3
- regula/documentreader/webclient/gen/models/candidates_list_item.py +1 -1
- regula/documentreader/webclient/gen/models/chosen_document_type.py +1 -1
- regula/documentreader/webclient/gen/models/chosen_document_type_result.py +1 -1
- regula/documentreader/webclient/gen/models/container_list.py +1 -1
- regula/documentreader/webclient/gen/models/container_list_list_inner.py +50 -8
- regula/documentreader/webclient/gen/models/database_document_list.py +1 -1
- regula/documentreader/webclient/gen/models/details_age.py +93 -0
- regula/documentreader/webclient/gen/models/device_info.py +1 -1
- regula/documentreader/webclient/gen/models/doc_bar_code_info.py +1 -1
- regula/documentreader/webclient/gen/models/doc_bar_code_info_fields_list.py +1 -1
- regula/documentreader/webclient/gen/models/doc_bar_code_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/doc_feature.py +88 -0
- regula/documentreader/webclient/gen/models/doc_graphics_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/doc_visual_extended_field.py +2 -2
- regula/documentreader/webclient/gen/models/doc_visual_extended_field_item.py +1 -1
- regula/documentreader/webclient/gen/models/doc_visual_extended_info.py +1 -1
- regula/documentreader/webclient/gen/models/doc_visual_extended_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/document_binary_info_result.py +1 -1
- regula/documentreader/webclient/gen/models/document_image_result.py +1 -1
- regula/documentreader/webclient/gen/models/document_position.py +5 -5
- regula/documentreader/webclient/gen/models/document_position_item.py +1 -1
- regula/documentreader/webclient/gen/models/document_position_result.py +1 -1
- regula/documentreader/webclient/gen/models/document_types_candidates.py +1 -1
- regula/documentreader/webclient/gen/models/document_types_candidates_list.py +1 -1
- regula/documentreader/webclient/gen/models/document_types_candidates_result.py +1 -1
- regula/documentreader/webclient/gen/models/face_api.py +1 -1
- regula/documentreader/webclient/gen/models/face_detection.py +1 -1
- regula/documentreader/webclient/gen/models/face_detection_item.py +1 -1
- regula/documentreader/webclient/gen/models/face_detection_result.py +1 -1
- regula/documentreader/webclient/gen/models/face_item.py +3 -3
- regula/documentreader/webclient/gen/models/fiber_item.py +1 -1
- regula/documentreader/webclient/gen/models/fiber_result.py +1 -1
- regula/documentreader/webclient/gen/models/graph_data.py +1 -1
- regula/documentreader/webclient/gen/models/graphic_field.py +2 -2
- regula/documentreader/webclient/gen/models/graphic_fields_list.py +1 -1
- regula/documentreader/webclient/gen/models/graphics_result.py +1 -1
- regula/documentreader/webclient/gen/models/healthcheck.py +1 -1
- regula/documentreader/webclient/gen/models/ident_item.py +4 -4
- regula/documentreader/webclient/gen/models/ident_result.py +4 -4
- regula/documentreader/webclient/gen/models/image_qa.py +1 -1
- regula/documentreader/webclient/gen/models/image_quality_check.py +1 -1
- regula/documentreader/webclient/gen/models/image_quality_check_list.py +1 -1
- regula/documentreader/webclient/gen/models/image_quality_check_list_item.py +1 -1
- regula/documentreader/webclient/gen/models/image_quality_result.py +1 -1
- regula/documentreader/webclient/gen/models/image_transaction_data.py +1 -1
- regula/documentreader/webclient/gen/models/images.py +2 -2
- regula/documentreader/webclient/gen/models/images_field.py +1 -1
- regula/documentreader/webclient/gen/models/images_field_value.py +2 -2
- regula/documentreader/webclient/gen/models/images_item.py +1 -1
- regula/documentreader/webclient/gen/models/images_result.py +1 -1
- regula/documentreader/webclient/gen/models/in_data.py +2 -2
- regula/documentreader/webclient/gen/models/lexical_analysis_result.py +1 -1
- regula/documentreader/webclient/gen/models/list_transactions_by_tag_response.py +1 -1
- regula/documentreader/webclient/gen/models/list_verified_fields.py +1 -1
- regula/documentreader/webclient/gen/models/list_verified_fields_item.py +1 -1
- regula/documentreader/webclient/gen/models/mdl_device_engagement.py +29 -0
- regula/documentreader/webclient/gen/models/mdl_device_retrieval.py +30 -0
- regula/documentreader/webclient/gen/models/mdl_item.py +82 -0
- regula/documentreader/webclient/gen/models/mdl_result.py +89 -0
- regula/documentreader/webclient/gen/models/mdl_server_retrieval.py +29 -0
- regula/documentreader/webclient/gen/models/message.py +98 -0
- regula/documentreader/webclient/gen/models/mrz_detector_result.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_position_item.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_position_result.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_rows_item.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_test_quality.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_test_quality_item.py +1 -1
- regula/documentreader/webclient/gen/models/mrz_test_quality_result.py +1 -1
- regula/documentreader/webclient/gen/models/ocr_security_text_item.py +2 -2
- regula/documentreader/webclient/gen/models/ocr_security_text_result.py +2 -2
- regula/documentreader/webclient/gen/models/one_candidate.py +1 -1
- regula/documentreader/webclient/gen/models/one_candidate_item.py +1 -1
- regula/documentreader/webclient/gen/models/original_symbol.py +1 -1
- regula/documentreader/webclient/gen/models/out_data.py +1 -1
- regula/documentreader/webclient/gen/models/p_array_field.py +3 -3
- regula/documentreader/webclient/gen/models/photo_ident_item.py +3 -3
- regula/documentreader/webclient/gen/models/photo_ident_result.py +3 -3
- regula/documentreader/webclient/gen/models/pid.py +88 -0
- regula/documentreader/webclient/gen/models/point_array.py +1 -1
- regula/documentreader/webclient/gen/models/points_container.py +1 -1
- regula/documentreader/webclient/gen/models/process_params.py +5 -5
- regula/documentreader/webclient/gen/models/process_request.py +4 -4
- regula/documentreader/webclient/gen/models/process_request_image.py +1 -1
- regula/documentreader/webclient/gen/models/process_response.py +2 -2
- regula/documentreader/webclient/gen/models/raw_image_container_item.py +1 -1
- regula/documentreader/webclient/gen/models/raw_image_container_list.py +1 -1
- regula/documentreader/webclient/gen/models/result.py +3 -0
- regula/documentreader/webclient/gen/models/result_item.py +12 -3
- regula/documentreader/webclient/gen/models/result_mrz_detector.py +1 -1
- regula/documentreader/webclient/gen/models/result_mrz_detector_item.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_application.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_attribute_name.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_certificate_ex.py +5 -5
- regula/documentreader/webclient/gen/models/rfid_data_file.py +3 -3
- regula/documentreader/webclient/gen/models/rfid_distinguished_name.py +2 -2
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_field.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_info.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_graphics_info_result.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_security_object.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_session_data.py +6 -6
- regula/documentreader/webclient/gen/models/rfid_signer_info_ex.py +6 -6
- regula/documentreader/webclient/gen/models/rfid_text_data_result.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_validity.py +2 -2
- regula/documentreader/webclient/gen/models/security_feature_item.py +2 -2
- regula/documentreader/webclient/gen/models/security_feature_result.py +2 -2
- regula/documentreader/webclient/gen/models/security_object_certificates.py +1 -1
- regula/documentreader/webclient/gen/models/status.py +14 -4
- regula/documentreader/webclient/gen/models/status_item.py +1 -1
- regula/documentreader/webclient/gen/models/status_result.py +1 -1
- regula/documentreader/webclient/gen/models/string_item.py +4 -4
- regula/documentreader/webclient/gen/models/string_recognition_result.py +1 -1
- regula/documentreader/webclient/gen/models/symbol_estimation_item.py +1 -1
- regula/documentreader/webclient/gen/models/symbol_recognition_result.py +2 -2
- regula/documentreader/webclient/gen/models/t_doc_binary_info.py +2 -2
- regula/documentreader/webclient/gen/models/t_doc_binary_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/t_original_rfid_graphics_info.py +1 -1
- regula/documentreader/webclient/gen/models/t_original_rfid_graphics_info_item.py +1 -1
- regula/documentreader/webclient/gen/models/text.py +2 -2
- regula/documentreader/webclient/gen/models/text_data_result.py +1 -1
- regula/documentreader/webclient/gen/models/text_field.py +3 -3
- regula/documentreader/webclient/gen/models/text_field_type.py +3 -0
- regula/documentreader/webclient/gen/models/text_field_value.py +3 -3
- regula/documentreader/webclient/gen/models/text_item.py +1 -1
- regula/documentreader/webclient/gen/models/text_result.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_image.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_info.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_process_get_response.py +2 -2
- regula/documentreader/webclient/gen/models/transaction_process_request.py +4 -4
- regula/documentreader/webclient/gen/models/transaction_process_result.py +2 -2
- regula/documentreader/webclient/gen/models/trf_ft_string.py +1 -1
- regula/documentreader/webclient/gen/models/vd_item.py +90 -0
- regula/documentreader/webclient/gen/models/vds_data.py +126 -0
- regula/documentreader/webclient/gen/models/vds_data_item.py +86 -0
- regula/documentreader/webclient/gen/models/vds_data_result.py +93 -0
- regula/documentreader/webclient/gen/models/vdsnc_data.py +117 -0
- regula/documentreader/webclient/gen/models/vdsnc_data_item.py +86 -0
- regula/documentreader/webclient/gen/models/vdsnc_data_result.py +93 -0
- regula/documentreader/webclient/gen/models/ve_item.py +96 -0
- regula/documentreader/webclient/gen/models/visual_extended_field_item.py +1 -1
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.2.650.dev0.dist-info}/METADATA +1 -1
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.2.650.dev0.dist-info}/RECORD +156 -139
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.2.650.dev0.dist-info}/WHEEL +0 -0
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.2.650.dev0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import pprint
|
|
9
|
+
import re # noqa: F401
|
|
10
|
+
import json
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List
|
|
14
|
+
from regula.documentreader.webclient.gen.models.check_result import CheckResult
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
from pydantic import SkipValidation, Field
|
|
18
|
+
|
|
19
|
+
class DetailsAge(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
DetailsAge
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
threshold: SkipValidation[int] = Field(alias="threshold")
|
|
24
|
+
over_threshold: SkipValidation[CheckResult] = Field(alias="overThreshold")
|
|
25
|
+
over18: SkipValidation[CheckResult] = Field(alias="over18")
|
|
26
|
+
over21: SkipValidation[CheckResult] = Field(alias="over21")
|
|
27
|
+
over25: SkipValidation[CheckResult] = Field(alias="over25")
|
|
28
|
+
over65: SkipValidation[CheckResult] = Field(alias="over65")
|
|
29
|
+
__properties: ClassVar[List[str]] = ["threshold", "overThreshold", "over18", "over21", "over25", "over65"]
|
|
30
|
+
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
populate_by_name=True,
|
|
33
|
+
validate_assignment=True,
|
|
34
|
+
protected_namespaces=(),
|
|
35
|
+
arbitrary_types_allowed=True,
|
|
36
|
+
use_enum_values=True
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of DetailsAge from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of DetailsAge from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"threshold": obj.get("threshold"),
|
|
85
|
+
"overThreshold": obj.get("overThreshold"),
|
|
86
|
+
"over18": obj.get("over18"),
|
|
87
|
+
"over21": obj.get("over21"),
|
|
88
|
+
"over25": obj.get("over25"),
|
|
89
|
+
"over65": obj.get("over65")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -75,7 +75,7 @@ class DeviceInfo(BaseModel):
|
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
77
|
# override the default output from pydantic by calling `to_dict()` of documents_database
|
|
78
|
-
if self.documents_database:
|
|
78
|
+
if self.documents_database and isinstance(self.documents_database, DeviceInfoDocumentsDatabase):
|
|
79
79
|
_dict['documents-database'] = self.documents_database.to_dict()
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
@@ -67,7 +67,7 @@ class DocBarCodeInfo(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of doc_bar_code_info
|
|
70
|
-
if self.doc_bar_code_info:
|
|
70
|
+
if self.doc_bar_code_info and isinstance(self.doc_bar_code_info, DocBarCodeInfoFieldsList):
|
|
71
71
|
_dict['DocBarCodeInfo'] = self.doc_bar_code_info.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -69,7 +69,7 @@ class DocBarCodeInfoFieldsList(BaseModel):
|
|
|
69
69
|
_items = []
|
|
70
70
|
if self.p_array_fields:
|
|
71
71
|
for _item_p_array_fields in self.p_array_fields:
|
|
72
|
-
if _item_p_array_fields:
|
|
72
|
+
if _item_p_array_fields and hasattr(_item_p_array_fields, "to_dict"):
|
|
73
73
|
_items.append(_item_p_array_fields.to_dict())
|
|
74
74
|
_dict['pArrayFields'] = _items
|
|
75
75
|
return _dict
|
|
@@ -65,7 +65,7 @@ class DocBarCodeInfoItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of doc_bar_code_info
|
|
68
|
-
if self.doc_bar_code_info:
|
|
68
|
+
if self.doc_bar_code_info and isinstance(self.doc_bar_code_info, DocBarCodeInfoFieldsList):
|
|
69
69
|
_dict['DocBarCodeInfo'] = self.doc_bar_code_info.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import pprint
|
|
9
|
+
import re # noqa: F401
|
|
10
|
+
import json
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
14
|
+
from regula.documentreader.webclient.gen.models.trf_ft_bytes import TrfFtBytes
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
from pydantic import SkipValidation, Field
|
|
18
|
+
|
|
19
|
+
class DocFeature(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
DocFeature
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
type: SkipValidation[float] = Field(alias="Type")
|
|
24
|
+
data: SkipValidation[TrfFtBytes] = Field(alias="Data")
|
|
25
|
+
__properties: ClassVar[List[str]] = ["Type", "Data"]
|
|
26
|
+
|
|
27
|
+
model_config = ConfigDict(
|
|
28
|
+
populate_by_name=True,
|
|
29
|
+
validate_assignment=True,
|
|
30
|
+
protected_namespaces=(),
|
|
31
|
+
arbitrary_types_allowed=True,
|
|
32
|
+
use_enum_values=True
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def to_str(self) -> str:
|
|
37
|
+
"""Returns the string representation of the model using alias"""
|
|
38
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
39
|
+
|
|
40
|
+
def to_json(self) -> str:
|
|
41
|
+
"""Returns the JSON representation of the model using alias"""
|
|
42
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
43
|
+
return json.dumps(self.to_dict())
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
47
|
+
"""Create an instance of DocFeature from a JSON string"""
|
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
|
49
|
+
|
|
50
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
51
|
+
"""Return the dictionary representation of the model using alias.
|
|
52
|
+
|
|
53
|
+
This has the following differences from calling pydantic's
|
|
54
|
+
`self.model_dump(by_alias=True)`:
|
|
55
|
+
|
|
56
|
+
* `None` is only added to the output dict for nullable fields that
|
|
57
|
+
were set at model initialization. Other fields with value `None`
|
|
58
|
+
are ignored.
|
|
59
|
+
"""
|
|
60
|
+
excluded_fields: Set[str] = set([
|
|
61
|
+
])
|
|
62
|
+
|
|
63
|
+
_dict = self.model_dump(
|
|
64
|
+
by_alias=True,
|
|
65
|
+
exclude=excluded_fields,
|
|
66
|
+
exclude_none=True,
|
|
67
|
+
)
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
69
|
+
if self.data and isinstance(self.data, TrfFtBytes):
|
|
70
|
+
_dict['Data'] = self.data.to_dict()
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of DocFeature from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"Type": obj.get("Type"),
|
|
84
|
+
"Data": TrfFtBytes.from_dict(obj["Data"]) if obj.get("Data") is not None else None
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
87
|
+
|
|
88
|
+
|
|
@@ -65,7 +65,7 @@ class DocGraphicsInfoItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of doc_graphics_info
|
|
68
|
-
if self.doc_graphics_info:
|
|
68
|
+
if self.doc_graphics_info and isinstance(self.doc_graphics_info, GraphicFieldsList):
|
|
69
69
|
_dict['DocGraphicsInfo'] = self.doc_graphics_info.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -83,11 +83,11 @@ class DocVisualExtendedField(BaseModel):
|
|
|
83
83
|
_items = []
|
|
84
84
|
if self.strings_result:
|
|
85
85
|
for _item_strings_result in self.strings_result:
|
|
86
|
-
if _item_strings_result:
|
|
86
|
+
if _item_strings_result and hasattr(_item_strings_result, "to_dict"):
|
|
87
87
|
_items.append(_item_strings_result.to_dict())
|
|
88
88
|
_dict['StringsResult'] = _items
|
|
89
89
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
90
|
-
if self.field_rect:
|
|
90
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
91
91
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
92
92
|
return _dict
|
|
93
93
|
|
|
@@ -65,7 +65,7 @@ class DocVisualExtendedFieldItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
68
|
-
if self.field_rect:
|
|
68
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
69
69
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -69,7 +69,7 @@ class DocVisualExtendedInfo(BaseModel):
|
|
|
69
69
|
_items = []
|
|
70
70
|
if self.p_array_fields:
|
|
71
71
|
for _item_p_array_fields in self.p_array_fields:
|
|
72
|
-
if _item_p_array_fields:
|
|
72
|
+
if _item_p_array_fields and hasattr(_item_p_array_fields, "to_dict"):
|
|
73
73
|
_items.append(_item_p_array_fields.to_dict())
|
|
74
74
|
_dict['pArrayFields'] = _items
|
|
75
75
|
return _dict
|
|
@@ -65,7 +65,7 @@ class DocVisualExtendedInfoItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of doc_visual_extended_info
|
|
68
|
-
if self.doc_visual_extended_info:
|
|
68
|
+
if self.doc_visual_extended_info and isinstance(self.doc_visual_extended_info, DocVisualExtendedInfo):
|
|
69
69
|
_dict['DocVisualExtendedInfo'] = self.doc_visual_extended_info.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class DocumentBinaryInfoResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of t_doc_binary_info
|
|
70
|
-
if self.t_doc_binary_info:
|
|
70
|
+
if self.t_doc_binary_info and isinstance(self.t_doc_binary_info, TDocBinaryInfo):
|
|
71
71
|
_dict['TDocBinaryInfo'] = self.t_doc_binary_info.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -67,7 +67,7 @@ class DocumentImageResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of raw_image_container
|
|
70
|
-
if self.raw_image_container:
|
|
70
|
+
if self.raw_image_container and isinstance(self.raw_image_container, ImageData):
|
|
71
71
|
_dict['RawImageContainer'] = self.raw_image_container.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -80,19 +80,19 @@ class DocumentPosition(BaseModel):
|
|
|
80
80
|
exclude_none=True,
|
|
81
81
|
)
|
|
82
82
|
# override the default output from pydantic by calling `to_dict()` of center
|
|
83
|
-
if self.center:
|
|
83
|
+
if self.center and isinstance(self.center, Point):
|
|
84
84
|
_dict['Center'] = self.center.to_dict()
|
|
85
85
|
# override the default output from pydantic by calling `to_dict()` of left_bottom
|
|
86
|
-
if self.left_bottom:
|
|
86
|
+
if self.left_bottom and isinstance(self.left_bottom, Point):
|
|
87
87
|
_dict['LeftBottom'] = self.left_bottom.to_dict()
|
|
88
88
|
# override the default output from pydantic by calling `to_dict()` of left_top
|
|
89
|
-
if self.left_top:
|
|
89
|
+
if self.left_top and isinstance(self.left_top, Point):
|
|
90
90
|
_dict['LeftTop'] = self.left_top.to_dict()
|
|
91
91
|
# override the default output from pydantic by calling `to_dict()` of right_bottom
|
|
92
|
-
if self.right_bottom:
|
|
92
|
+
if self.right_bottom and isinstance(self.right_bottom, Point):
|
|
93
93
|
_dict['RightBottom'] = self.right_bottom.to_dict()
|
|
94
94
|
# override the default output from pydantic by calling `to_dict()` of right_top
|
|
95
|
-
if self.right_top:
|
|
95
|
+
if self.right_top and isinstance(self.right_top, Point):
|
|
96
96
|
_dict['RightTop'] = self.right_top.to_dict()
|
|
97
97
|
return _dict
|
|
98
98
|
|
|
@@ -65,7 +65,7 @@ class DocumentPositionItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of document_position
|
|
68
|
-
if self.document_position:
|
|
68
|
+
if self.document_position and isinstance(self.document_position, DocumentPosition):
|
|
69
69
|
_dict['DocumentPosition'] = self.document_position.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class DocumentPositionResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of document_position
|
|
70
|
-
if self.document_position:
|
|
70
|
+
if self.document_position and isinstance(self.document_position, DocumentPosition):
|
|
71
71
|
_dict['DocumentPosition'] = self.document_position.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -70,7 +70,7 @@ class DocumentTypesCandidates(BaseModel):
|
|
|
70
70
|
_items = []
|
|
71
71
|
if self.candidates:
|
|
72
72
|
for _item_candidates in self.candidates:
|
|
73
|
-
if _item_candidates:
|
|
73
|
+
if _item_candidates and hasattr(_item_candidates, "to_dict"):
|
|
74
74
|
_items.append(_item_candidates.to_dict())
|
|
75
75
|
_dict['Candidates'] = _items
|
|
76
76
|
return _dict
|
|
@@ -70,7 +70,7 @@ class DocumentTypesCandidatesList(BaseModel):
|
|
|
70
70
|
_items = []
|
|
71
71
|
if self.candidates:
|
|
72
72
|
for _item_candidates in self.candidates:
|
|
73
|
-
if _item_candidates:
|
|
73
|
+
if _item_candidates and hasattr(_item_candidates, "to_dict"):
|
|
74
74
|
_items.append(_item_candidates.to_dict())
|
|
75
75
|
_dict['Candidates'] = _items
|
|
76
76
|
return _dict
|
|
@@ -67,7 +67,7 @@ class DocumentTypesCandidatesResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of candidates_list
|
|
70
|
-
if self.candidates_list:
|
|
70
|
+
if self.candidates_list and isinstance(self.candidates_list, DocumentTypesCandidatesList):
|
|
71
71
|
_dict['CandidatesList'] = self.candidates_list.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -74,7 +74,7 @@ class FaceApi(BaseModel):
|
|
|
74
74
|
exclude_none=True,
|
|
75
75
|
)
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of search
|
|
77
|
-
if self.search:
|
|
77
|
+
if self.search and isinstance(self.search, FaceApiSearch):
|
|
78
78
|
_dict['search'] = self.search.to_dict()
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -65,7 +65,7 @@ class FaceDetectionItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of face_detection
|
|
68
|
-
if self.face_detection:
|
|
68
|
+
if self.face_detection and isinstance(self.face_detection, FaceDetection):
|
|
69
69
|
_dict['FaceDetection'] = self.face_detection.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class FaceDetectionResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of face_detection
|
|
70
|
-
if self.face_detection:
|
|
70
|
+
if self.face_detection and isinstance(self.face_detection, FaceDetection):
|
|
71
71
|
_dict['FaceDetection'] = self.face_detection.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -74,16 +74,16 @@ class FaceItem(BaseModel):
|
|
|
74
74
|
exclude_none=True,
|
|
75
75
|
)
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of face_rect
|
|
77
|
-
if self.face_rect:
|
|
77
|
+
if self.face_rect and isinstance(self.face_rect, RectangleCoordinates):
|
|
78
78
|
_dict['FaceRect'] = self.face_rect.to_dict()
|
|
79
79
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
80
|
-
if self.field_rect:
|
|
80
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
81
81
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
82
82
|
# override the default output from pydantic by calling `to_dict()` of each item in landmarks (list)
|
|
83
83
|
_items = []
|
|
84
84
|
if self.landmarks:
|
|
85
85
|
for _item_landmarks in self.landmarks:
|
|
86
|
-
if _item_landmarks:
|
|
86
|
+
if _item_landmarks and hasattr(_item_landmarks, "to_dict"):
|
|
87
87
|
_items.append(_item_landmarks.to_dict())
|
|
88
88
|
_dict['Landmarks'] = _items
|
|
89
89
|
return _dict
|
|
@@ -77,7 +77,7 @@ class FiberItem(BaseModel):
|
|
|
77
77
|
_items = []
|
|
78
78
|
if self.rect_array:
|
|
79
79
|
for _item_rect_array in self.rect_array:
|
|
80
|
-
if _item_rect_array:
|
|
80
|
+
if _item_rect_array and hasattr(_item_rect_array, "to_dict"):
|
|
81
81
|
_items.append(_item_rect_array.to_dict())
|
|
82
82
|
_dict['RectArray'] = _items
|
|
83
83
|
return _dict
|
|
@@ -81,7 +81,7 @@ class FiberResult(AuthenticityCheckResultItem):
|
|
|
81
81
|
_items = []
|
|
82
82
|
if self.rect_array:
|
|
83
83
|
for _item_rect_array in self.rect_array:
|
|
84
|
-
if _item_rect_array:
|
|
84
|
+
if _item_rect_array and hasattr(_item_rect_array, "to_dict"):
|
|
85
85
|
_items.append(_item_rect_array.to_dict())
|
|
86
86
|
_dict['RectArray'] = _items
|
|
87
87
|
return _dict
|
|
@@ -71,7 +71,7 @@ class GraphData(BaseModel):
|
|
|
71
71
|
exclude_none=True,
|
|
72
72
|
)
|
|
73
73
|
# override the default output from pydantic by calling `to_dict()` of file_image
|
|
74
|
-
if self.file_image:
|
|
74
|
+
if self.file_image and isinstance(self.file_image, FileImage):
|
|
75
75
|
_dict['File_Image'] = self.file_image.to_dict()
|
|
76
76
|
return _dict
|
|
77
77
|
|
|
@@ -70,10 +70,10 @@ class GraphicField(BaseModel):
|
|
|
70
70
|
exclude_none=True,
|
|
71
71
|
)
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
73
|
-
if self.field_rect:
|
|
73
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
74
74
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of image
|
|
76
|
-
if self.image:
|
|
76
|
+
if self.image and isinstance(self.image, ImageData):
|
|
77
77
|
_dict['image'] = self.image.to_dict()
|
|
78
78
|
return _dict
|
|
79
79
|
|
|
@@ -69,7 +69,7 @@ class GraphicFieldsList(BaseModel):
|
|
|
69
69
|
_items = []
|
|
70
70
|
if self.p_array_fields:
|
|
71
71
|
for _item_p_array_fields in self.p_array_fields:
|
|
72
|
-
if _item_p_array_fields:
|
|
72
|
+
if _item_p_array_fields and hasattr(_item_p_array_fields, "to_dict"):
|
|
73
73
|
_items.append(_item_p_array_fields.to_dict())
|
|
74
74
|
_dict['pArrayFields'] = _items
|
|
75
75
|
return _dict
|
|
@@ -67,7 +67,7 @@ class GraphicsResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of doc_graphics_info
|
|
70
|
-
if self.doc_graphics_info:
|
|
70
|
+
if self.doc_graphics_info and isinstance(self.doc_graphics_info, GraphicFieldsList):
|
|
71
71
|
_dict['DocGraphicsInfo'] = self.doc_graphics_info.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -74,7 +74,7 @@ class Healthcheck(BaseModel):
|
|
|
74
74
|
exclude_none=True,
|
|
75
75
|
)
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of documents_database
|
|
77
|
-
if self.documents_database:
|
|
77
|
+
if self.documents_database and isinstance(self.documents_database, HealthcheckDocumentsDatabase):
|
|
78
78
|
_dict['documentsDatabase'] = self.documents_database.to_dict()
|
|
79
79
|
# set to None if license_id (nullable) is None
|
|
80
80
|
# and model_fields_set contains the field
|
|
@@ -75,16 +75,16 @@ class IdentItem(BaseModel):
|
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
77
|
# override the default output from pydantic by calling `to_dict()` of area
|
|
78
|
-
if self.area:
|
|
78
|
+
if self.area and isinstance(self.area, RectangleCoordinates):
|
|
79
79
|
_dict['Area'] = self.area.to_dict()
|
|
80
80
|
# override the default output from pydantic by calling `to_dict()` of image
|
|
81
|
-
if self.image:
|
|
81
|
+
if self.image and isinstance(self.image, ImageData):
|
|
82
82
|
_dict['Image'] = self.image.to_dict()
|
|
83
83
|
# override the default output from pydantic by calling `to_dict()` of etalon_image
|
|
84
|
-
if self.etalon_image:
|
|
84
|
+
if self.etalon_image and isinstance(self.etalon_image, ImageData):
|
|
85
85
|
_dict['EtalonImage'] = self.etalon_image.to_dict()
|
|
86
86
|
# override the default output from pydantic by calling `to_dict()` of area_list
|
|
87
|
-
if self.area_list:
|
|
87
|
+
if self.area_list and isinstance(self.area_list, AreaContainer):
|
|
88
88
|
_dict['AreaList'] = self.area_list.to_dict()
|
|
89
89
|
return _dict
|
|
90
90
|
|
|
@@ -79,16 +79,16 @@ class IdentResult(AuthenticityCheckResultItem):
|
|
|
79
79
|
exclude_none=True,
|
|
80
80
|
)
|
|
81
81
|
# override the default output from pydantic by calling `to_dict()` of area
|
|
82
|
-
if self.area:
|
|
82
|
+
if self.area and isinstance(self.area, RectangleCoordinates):
|
|
83
83
|
_dict['Area'] = self.area.to_dict()
|
|
84
84
|
# override the default output from pydantic by calling `to_dict()` of image
|
|
85
|
-
if self.image:
|
|
85
|
+
if self.image and isinstance(self.image, ImageData):
|
|
86
86
|
_dict['Image'] = self.image.to_dict()
|
|
87
87
|
# override the default output from pydantic by calling `to_dict()` of etalon_image
|
|
88
|
-
if self.etalon_image:
|
|
88
|
+
if self.etalon_image and isinstance(self.etalon_image, ImageData):
|
|
89
89
|
_dict['EtalonImage'] = self.etalon_image.to_dict()
|
|
90
90
|
# override the default output from pydantic by calling `to_dict()` of area_list
|
|
91
|
-
if self.area_list:
|
|
91
|
+
if self.area_list and isinstance(self.area_list, AreaContainer):
|
|
92
92
|
_dict['AreaList'] = self.area_list.to_dict()
|
|
93
93
|
return _dict
|
|
94
94
|
|
|
@@ -75,7 +75,7 @@ class ImageQA(BaseModel):
|
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
77
|
# override the default output from pydantic by calling `to_dict()` of glares_check_params
|
|
78
|
-
if self.glares_check_params:
|
|
78
|
+
if self.glares_check_params and isinstance(self.glares_check_params, GlaresCheckParams):
|
|
79
79
|
_dict['glaresCheckParams'] = self.glares_check_params.to_dict()
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
@@ -74,7 +74,7 @@ class ImageQualityCheck(BaseModel):
|
|
|
74
74
|
exclude_none=True,
|
|
75
75
|
)
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of areas
|
|
77
|
-
if self.areas:
|
|
77
|
+
if self.areas and isinstance(self.areas, AreaArray):
|
|
78
78
|
_dict['areas'] = self.areas.to_dict()
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -65,7 +65,7 @@ class ImageQualityCheckListItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of image_quality_check_list
|
|
68
|
-
if self.image_quality_check_list:
|
|
68
|
+
if self.image_quality_check_list and isinstance(self.image_quality_check_list, ImageQualityCheckList):
|
|
69
69
|
_dict['ImageQualityCheckList'] = self.image_quality_check_list.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class ImageQualityResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of image_quality_check_list
|
|
70
|
-
if self.image_quality_check_list:
|
|
70
|
+
if self.image_quality_check_list and isinstance(self.image_quality_check_list, ImageQualityCheckList):
|
|
71
71
|
_dict['ImageQualityCheckList'] = self.image_quality_check_list.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -65,7 +65,7 @@ class ImageTransactionData(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of image
|
|
68
|
-
if self.image:
|
|
68
|
+
if self.image and isinstance(self.image, ImagesFieldValue):
|
|
69
69
|
_dict['image'] = self.image.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -72,14 +72,14 @@ class Images(BaseModel):
|
|
|
72
72
|
_items = []
|
|
73
73
|
if self.available_source_list:
|
|
74
74
|
for _item_available_source_list in self.available_source_list:
|
|
75
|
-
if _item_available_source_list:
|
|
75
|
+
if _item_available_source_list and hasattr(_item_available_source_list, "to_dict"):
|
|
76
76
|
_items.append(_item_available_source_list.to_dict())
|
|
77
77
|
_dict['availableSourceList'] = _items
|
|
78
78
|
# override the default output from pydantic by calling `to_dict()` of each item in field_list (list)
|
|
79
79
|
_items = []
|
|
80
80
|
if self.field_list:
|
|
81
81
|
for _item_field_list in self.field_list:
|
|
82
|
-
if _item_field_list:
|
|
82
|
+
if _item_field_list and hasattr(_item_field_list, "to_dict"):
|
|
83
83
|
_items.append(_item_field_list.to_dict())
|
|
84
84
|
_dict['fieldList'] = _items
|
|
85
85
|
return _dict
|