regula-documentreader-webclient 9.1.2.dev0__py3-none-any.whl → 9.1.645.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.1.645.dev0.dist-info}/METADATA +1 -1
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.1.645.dev0.dist-info}/RECORD +156 -139
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.1.645.dev0.dist-info}/WHEEL +0 -0
- {regula_documentreader_webclient-9.1.2.dev0.dist-info → regula_documentreader_webclient-9.1.645.dev0.dist-info}/top_level.txt +0 -0
|
@@ -72,7 +72,7 @@ class ImagesField(BaseModel):
|
|
|
72
72
|
_items = []
|
|
73
73
|
if self.value_list:
|
|
74
74
|
for _item_value_list in self.value_list:
|
|
75
|
-
if _item_value_list:
|
|
75
|
+
if _item_value_list and hasattr(_item_value_list, "to_dict"):
|
|
76
76
|
_items.append(_item_value_list.to_dict())
|
|
77
77
|
_dict['valueList'] = _items
|
|
78
78
|
return _dict
|
|
@@ -76,10 +76,10 @@ class ImagesFieldValue(BaseModel):
|
|
|
76
76
|
exclude_none=True,
|
|
77
77
|
)
|
|
78
78
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
79
|
-
if self.field_rect:
|
|
79
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
80
80
|
_dict['fieldRect'] = self.field_rect.to_dict()
|
|
81
81
|
# override the default output from pydantic by calling `to_dict()` of rfid_origin
|
|
82
|
-
if self.rfid_origin:
|
|
82
|
+
if self.rfid_origin and isinstance(self.rfid_origin, RfidOrigin):
|
|
83
83
|
_dict['rfidOrigin'] = self.rfid_origin.to_dict()
|
|
84
84
|
return _dict
|
|
85
85
|
|
|
@@ -65,7 +65,7 @@ class ImagesItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of images
|
|
68
|
-
if self.images:
|
|
68
|
+
if self.images and isinstance(self.images, Images):
|
|
69
69
|
_dict['Images'] = self.images.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class ImagesResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of images
|
|
70
|
-
if self.images:
|
|
70
|
+
if self.images and isinstance(self.images, Images):
|
|
71
71
|
_dict['Images'] = self.images.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -67,13 +67,13 @@ class InData(BaseModel):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of video
|
|
70
|
-
if self.video:
|
|
70
|
+
if self.video and isinstance(self.video, InDataVideo):
|
|
71
71
|
_dict['video'] = self.video.to_dict()
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in images (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.images:
|
|
75
75
|
for _item_images in self.images:
|
|
76
|
-
if _item_images:
|
|
76
|
+
if _item_images and hasattr(_item_images, "to_dict"):
|
|
77
77
|
_items.append(_item_images.to_dict())
|
|
78
78
|
_dict['images'] = _items
|
|
79
79
|
return _dict
|
|
@@ -67,7 +67,7 @@ class LexicalAnalysisResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of list_verified_fields
|
|
70
|
-
if self.list_verified_fields:
|
|
70
|
+
if self.list_verified_fields and isinstance(self.list_verified_fields, ListVerifiedFields):
|
|
71
71
|
_dict['ListVerifiedFields'] = self.list_verified_fields.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -69,7 +69,7 @@ class ListTransactionsByTagResponse(BaseModel):
|
|
|
69
69
|
_items = []
|
|
70
70
|
if self.items:
|
|
71
71
|
for _item_items in self.items:
|
|
72
|
-
if _item_items:
|
|
72
|
+
if _item_items and hasattr(_item_items, "to_dict"):
|
|
73
73
|
_items.append(_item_items.to_dict())
|
|
74
74
|
_dict['items'] = _items
|
|
75
75
|
return _dict
|
|
@@ -70,7 +70,7 @@ class ListVerifiedFields(BaseModel):
|
|
|
70
70
|
_items = []
|
|
71
71
|
if self.p_field_maps:
|
|
72
72
|
for _item_p_field_maps in self.p_field_maps:
|
|
73
|
-
if _item_p_field_maps:
|
|
73
|
+
if _item_p_field_maps and hasattr(_item_p_field_maps, "to_dict"):
|
|
74
74
|
_items.append(_item_p_field_maps.to_dict())
|
|
75
75
|
_dict['pFieldMaps'] = _items
|
|
76
76
|
return _dict
|
|
@@ -65,7 +65,7 @@ class ListVerifiedFieldsItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of list_verified_fields
|
|
68
|
-
if self.list_verified_fields:
|
|
68
|
+
if self.list_verified_fields and isinstance(self.list_verified_fields, ListVerifiedFields):
|
|
69
69
|
_dict['ListVerifiedFields'] = self.list_verified_fields.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import json
|
|
9
|
+
from enum import Enum
|
|
10
|
+
from typing_extensions import Self
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MDLDeviceEngagement(int, Enum):
|
|
14
|
+
"""
|
|
15
|
+
MDLDeviceEngagement
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
allowed enum values
|
|
20
|
+
"""
|
|
21
|
+
QR = 0
|
|
22
|
+
NFC = 1
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def from_json(cls, json_str: str) -> Self:
|
|
26
|
+
"""Create an instance of MDLDeviceEngagement from a JSON string"""
|
|
27
|
+
return cls(json.loads(json_str))
|
|
28
|
+
|
|
29
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import json
|
|
9
|
+
from enum import Enum
|
|
10
|
+
from typing_extensions import Self
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MDLDeviceRetrieval(int, Enum):
|
|
14
|
+
"""
|
|
15
|
+
MDLDeviceRetrieval
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
allowed enum values
|
|
20
|
+
"""
|
|
21
|
+
NFC = 1
|
|
22
|
+
BLE = 2
|
|
23
|
+
WIFI_AWARE = 3
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_json(cls, json_str: str) -> Self:
|
|
27
|
+
"""Create an instance of MDLDeviceRetrieval from a JSON string"""
|
|
28
|
+
return cls(json.loads(json_str))
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
|
13
|
+
from typing import Any, ClassVar, Dict, List
|
|
14
|
+
from typing import Optional, Set
|
|
15
|
+
from typing_extensions import Self
|
|
16
|
+
from pydantic import SkipValidation, Field
|
|
17
|
+
|
|
18
|
+
class MDLItem(BaseModel):
|
|
19
|
+
"""
|
|
20
|
+
MDLItem
|
|
21
|
+
""" # noqa: E501
|
|
22
|
+
mdl_parsed_response: SkipValidation[Dict[str, object]] = Field(alias="MDLParsedResponse")
|
|
23
|
+
__properties: ClassVar[List[str]] = ["MDLParsedResponse"]
|
|
24
|
+
|
|
25
|
+
model_config = ConfigDict(
|
|
26
|
+
populate_by_name=True,
|
|
27
|
+
validate_assignment=True,
|
|
28
|
+
protected_namespaces=(),
|
|
29
|
+
arbitrary_types_allowed=True,
|
|
30
|
+
use_enum_values=True
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def to_str(self) -> str:
|
|
35
|
+
"""Returns the string representation of the model using alias"""
|
|
36
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
37
|
+
|
|
38
|
+
def to_json(self) -> str:
|
|
39
|
+
"""Returns the JSON representation of the model using alias"""
|
|
40
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
41
|
+
return json.dumps(self.to_dict())
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
45
|
+
"""Create an instance of MDLItem from a JSON string"""
|
|
46
|
+
return cls.from_dict(json.loads(json_str))
|
|
47
|
+
|
|
48
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
49
|
+
"""Return the dictionary representation of the model using alias.
|
|
50
|
+
|
|
51
|
+
This has the following differences from calling pydantic's
|
|
52
|
+
`self.model_dump(by_alias=True)`:
|
|
53
|
+
|
|
54
|
+
* `None` is only added to the output dict for nullable fields that
|
|
55
|
+
were set at model initialization. Other fields with value `None`
|
|
56
|
+
are ignored.
|
|
57
|
+
"""
|
|
58
|
+
excluded_fields: Set[str] = set([
|
|
59
|
+
])
|
|
60
|
+
|
|
61
|
+
_dict = self.model_dump(
|
|
62
|
+
by_alias=True,
|
|
63
|
+
exclude=excluded_fields,
|
|
64
|
+
exclude_none=True,
|
|
65
|
+
)
|
|
66
|
+
return _dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
70
|
+
"""Create an instance of MDLItem from a dict"""
|
|
71
|
+
if obj is None:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
if not isinstance(obj, dict):
|
|
75
|
+
return cls.model_validate(obj)
|
|
76
|
+
|
|
77
|
+
_obj = cls.model_validate({
|
|
78
|
+
"MDLParsedResponse": obj.get("MDLParsedResponse")
|
|
79
|
+
})
|
|
80
|
+
return _obj
|
|
81
|
+
|
|
82
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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 ConfigDict, Field
|
|
13
|
+
from typing import Any, ClassVar, Dict, List
|
|
14
|
+
from regula.documentreader.webclient.gen.models.result import Result
|
|
15
|
+
from regula.documentreader.webclient.gen.models.result_item import ResultItem
|
|
16
|
+
from typing import Optional, Set
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
from pydantic import SkipValidation, Field
|
|
19
|
+
|
|
20
|
+
class MDLResult(ResultItem):
|
|
21
|
+
"""
|
|
22
|
+
MDLResult
|
|
23
|
+
""" # noqa: E501
|
|
24
|
+
mdl_parsed_response: SkipValidation[Dict[str, object]] = Field(alias="MDLParsedResponse")
|
|
25
|
+
__properties: ClassVar[List[str]] = ["buf_length", "light", "list_idx", "page_idx", "result_type", "MDLParsedResponse"]
|
|
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 MDLResult 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
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
72
|
+
"""Create an instance of MDLResult from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return cls.model_validate(obj)
|
|
78
|
+
|
|
79
|
+
_obj = cls.model_validate({
|
|
80
|
+
"buf_length": obj.get("buf_length"),
|
|
81
|
+
"light": obj.get("light"),
|
|
82
|
+
"list_idx": obj.get("list_idx"),
|
|
83
|
+
"page_idx": obj.get("page_idx"),
|
|
84
|
+
"result_type": obj.get("result_type"),
|
|
85
|
+
"MDLParsedResponse": obj.get("MDLParsedResponse")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import json
|
|
9
|
+
from enum import Enum
|
|
10
|
+
from typing_extensions import Self
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MDLServerRetrieval(int, Enum):
|
|
14
|
+
"""
|
|
15
|
+
MDLServerRetrieval
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
allowed enum values
|
|
20
|
+
"""
|
|
21
|
+
WEB_API = 0
|
|
22
|
+
OIDC = 1
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def from_json(cls, json_str: str) -> Self:
|
|
26
|
+
"""Create an instance of MDLServerRetrieval from a JSON string"""
|
|
27
|
+
return cls(json.loads(json_str))
|
|
28
|
+
|
|
29
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
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, StrictStr
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
+
from regula.documentreader.webclient.gen.models.pid import PID
|
|
15
|
+
from regula.documentreader.webclient.gen.models.ve_item import VEItem
|
|
16
|
+
from typing import Optional, Set
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
from pydantic import SkipValidation, Field
|
|
19
|
+
|
|
20
|
+
class Message(BaseModel):
|
|
21
|
+
"""
|
|
22
|
+
Message
|
|
23
|
+
""" # noqa: E501
|
|
24
|
+
pid: SkipValidation[Optional[PID]] = Field(alias="pid", default=None)
|
|
25
|
+
uvci: SkipValidation[Optional[str]] = Field(alias="uvci", default=None)
|
|
26
|
+
ve: SkipValidation[Optional[List[VEItem]]] = Field(alias="ve", default=None)
|
|
27
|
+
__properties: ClassVar[List[str]] = ["pid", "uvci", "ve"]
|
|
28
|
+
|
|
29
|
+
model_config = ConfigDict(
|
|
30
|
+
populate_by_name=True,
|
|
31
|
+
validate_assignment=True,
|
|
32
|
+
protected_namespaces=(),
|
|
33
|
+
arbitrary_types_allowed=True,
|
|
34
|
+
use_enum_values=True
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
49
|
+
"""Create an instance of Message from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
53
|
+
"""Return the dictionary representation of the model using alias.
|
|
54
|
+
|
|
55
|
+
This has the following differences from calling pydantic's
|
|
56
|
+
`self.model_dump(by_alias=True)`:
|
|
57
|
+
|
|
58
|
+
* `None` is only added to the output dict for nullable fields that
|
|
59
|
+
were set at model initialization. Other fields with value `None`
|
|
60
|
+
are ignored.
|
|
61
|
+
"""
|
|
62
|
+
excluded_fields: Set[str] = set([
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of pid
|
|
71
|
+
if self.pid and isinstance(self.pid, PID):
|
|
72
|
+
_dict['pid'] = self.pid.to_dict()
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in ve (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.ve:
|
|
76
|
+
for _item_ve in self.ve:
|
|
77
|
+
if _item_ve and hasattr(_item_ve, "to_dict"):
|
|
78
|
+
_items.append(_item_ve.to_dict())
|
|
79
|
+
_dict['ve'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of Message from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"pid": PID.from_dict(obj["pid"]) if obj.get("pid") is not None else None,
|
|
93
|
+
"uvci": obj.get("uvci"),
|
|
94
|
+
"ve": [VEItem.from_dict(_item) for _item in obj.get("ve", []) if VEItem.from_dict(_item) is not None]
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -67,7 +67,7 @@ class MRZDetectorResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of result_mrz_detector
|
|
70
|
-
if self.result_mrz_detector:
|
|
70
|
+
if self.result_mrz_detector and isinstance(self.result_mrz_detector, ResultMRZDetector):
|
|
71
71
|
_dict['ResultMRZDetector'] = self.result_mrz_detector.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -65,7 +65,7 @@ class MrzPositionItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of mrz_position
|
|
68
|
-
if self.mrz_position:
|
|
68
|
+
if self.mrz_position and isinstance(self.mrz_position, DocumentPosition):
|
|
69
69
|
_dict['MrzPosition'] = self.mrz_position.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class MRZPositionResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of mrz_position
|
|
70
|
-
if self.mrz_position:
|
|
70
|
+
if self.mrz_position and isinstance(self.mrz_position, DocumentPosition):
|
|
71
71
|
_dict['MrzPosition'] = self.mrz_position.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -70,7 +70,7 @@ class MRZRowsItem(BaseModel):
|
|
|
70
70
|
_items = []
|
|
71
71
|
if self.symbols:
|
|
72
72
|
for _item_symbols in self.symbols:
|
|
73
|
-
if _item_symbols:
|
|
73
|
+
if _item_symbols and hasattr(_item_symbols, "to_dict"):
|
|
74
74
|
_items.append(_item_symbols.to_dict())
|
|
75
75
|
_dict['symbols'] = _items
|
|
76
76
|
return _dict
|
|
@@ -78,7 +78,7 @@ class MRZTestQuality(BaseModel):
|
|
|
78
78
|
_items = []
|
|
79
79
|
if self.strings:
|
|
80
80
|
for _item_strings in self.strings:
|
|
81
|
-
if _item_strings:
|
|
81
|
+
if _item_strings and hasattr(_item_strings, "to_dict"):
|
|
82
82
|
_items.append(_item_strings.to_dict())
|
|
83
83
|
_dict['Strings'] = _items
|
|
84
84
|
return _dict
|
|
@@ -65,7 +65,7 @@ class MRZTestQualityItem(BaseModel):
|
|
|
65
65
|
exclude_none=True,
|
|
66
66
|
)
|
|
67
67
|
# override the default output from pydantic by calling `to_dict()` of mrz_test_quality
|
|
68
|
-
if self.mrz_test_quality:
|
|
68
|
+
if self.mrz_test_quality and isinstance(self.mrz_test_quality, MRZTestQuality):
|
|
69
69
|
_dict['MRZTestQuality'] = self.mrz_test_quality.to_dict()
|
|
70
70
|
return _dict
|
|
71
71
|
|
|
@@ -67,7 +67,7 @@ class MRZTestQualityResult(ResultItem):
|
|
|
67
67
|
exclude_none=True,
|
|
68
68
|
)
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of mrz_test_quality
|
|
70
|
-
if self.mrz_test_quality:
|
|
70
|
+
if self.mrz_test_quality and isinstance(self.mrz_test_quality, MRZTestQuality):
|
|
71
71
|
_dict['MRZTestQuality'] = self.mrz_test_quality.to_dict()
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
@@ -78,10 +78,10 @@ class OCRSecurityTextItem(BaseModel):
|
|
|
78
78
|
exclude_none=True,
|
|
79
79
|
)
|
|
80
80
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
81
|
-
if self.field_rect:
|
|
81
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
82
82
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
83
83
|
# override the default output from pydantic by calling `to_dict()` of etalon_field_rect
|
|
84
|
-
if self.etalon_field_rect:
|
|
84
|
+
if self.etalon_field_rect and isinstance(self.etalon_field_rect, RectangleCoordinates):
|
|
85
85
|
_dict['EtalonFieldRect'] = self.etalon_field_rect.to_dict()
|
|
86
86
|
return _dict
|
|
87
87
|
|
|
@@ -82,10 +82,10 @@ class OCRSecurityTextResult(AuthenticityCheckResultItem):
|
|
|
82
82
|
exclude_none=True,
|
|
83
83
|
)
|
|
84
84
|
# override the default output from pydantic by calling `to_dict()` of field_rect
|
|
85
|
-
if self.field_rect:
|
|
85
|
+
if self.field_rect and isinstance(self.field_rect, RectangleCoordinates):
|
|
86
86
|
_dict['FieldRect'] = self.field_rect.to_dict()
|
|
87
87
|
# override the default output from pydantic by calling `to_dict()` of etalon_field_rect
|
|
88
|
-
if self.etalon_field_rect:
|
|
88
|
+
if self.etalon_field_rect and isinstance(self.etalon_field_rect, RectangleCoordinates):
|
|
89
89
|
_dict['EtalonFieldRect'] = self.etalon_field_rect.to_dict()
|
|
90
90
|
return _dict
|
|
91
91
|
|
|
@@ -78,7 +78,7 @@ class OneCandidate(BaseModel):
|
|
|
78
78
|
exclude_none=True,
|
|
79
79
|
)
|
|
80
80
|
# override the default output from pydantic by calling `to_dict()` of fdsid_list
|
|
81
|
-
if self.fdsid_list:
|
|
81
|
+
if self.fdsid_list and isinstance(self.fdsid_list, FDSIDList):
|
|
82
82
|
_dict['FDSIDList'] = self.fdsid_list.to_dict()
|
|
83
83
|
return _dict
|
|
84
84
|
|
|
@@ -68,7 +68,7 @@ class OneCandidateItem(BaseModel):
|
|
|
68
68
|
exclude_none=True,
|
|
69
69
|
)
|
|
70
70
|
# override the default output from pydantic by calling `to_dict()` of one_candidate
|
|
71
|
-
if self.one_candidate:
|
|
71
|
+
if self.one_candidate and isinstance(self.one_candidate, OneCandidate):
|
|
72
72
|
_dict['OneCandidate'] = self.one_candidate.to_dict()
|
|
73
73
|
return _dict
|
|
74
74
|
|
|
@@ -68,7 +68,7 @@ class OriginalSymbol(BaseModel):
|
|
|
68
68
|
exclude_none=True,
|
|
69
69
|
)
|
|
70
70
|
# override the default output from pydantic by calling `to_dict()` of rect
|
|
71
|
-
if self.rect:
|
|
71
|
+
if self.rect and isinstance(self.rect, RectangleCoordinates):
|
|
72
72
|
_dict['rect'] = self.rect.to_dict()
|
|
73
73
|
return _dict
|
|
74
74
|
|
|
@@ -81,14 +81,14 @@ class PArrayField(BaseModel):
|
|
|
81
81
|
_items = []
|
|
82
82
|
if self.bc_data_module:
|
|
83
83
|
for _item_bc_data_module in self.bc_data_module:
|
|
84
|
-
if _item_bc_data_module:
|
|
84
|
+
if _item_bc_data_module and hasattr(_item_bc_data_module, "to_dict"):
|
|
85
85
|
_items.append(_item_bc_data_module.to_dict())
|
|
86
86
|
_dict['bcDataModule'] = _items
|
|
87
87
|
# override the default output from pydantic by calling `to_dict()` of bc_pdf417_info
|
|
88
|
-
if self.bc_pdf417_info:
|
|
88
|
+
if self.bc_pdf417_info and isinstance(self.bc_pdf417_info, BcPDF417INFO):
|
|
89
89
|
_dict['bcPDF417INFO'] = self.bc_pdf417_info.to_dict()
|
|
90
90
|
# override the default output from pydantic by calling `to_dict()` of bc_roi_detect
|
|
91
|
-
if self.bc_roi_detect:
|
|
91
|
+
if self.bc_roi_detect and isinstance(self.bc_roi_detect, BcROIDETECT):
|
|
92
92
|
_dict['bcROI_DETECT'] = self.bc_roi_detect.to_dict()
|
|
93
93
|
return _dict
|
|
94
94
|
|
|
@@ -76,13 +76,13 @@ class PhotoIdentItem(BaseModel):
|
|
|
76
76
|
exclude_none=True,
|
|
77
77
|
)
|
|
78
78
|
# override the default output from pydantic by calling `to_dict()` of area
|
|
79
|
-
if self.area:
|
|
79
|
+
if self.area and isinstance(self.area, RectangleCoordinates):
|
|
80
80
|
_dict['Area'] = self.area.to_dict()
|
|
81
81
|
# override the default output from pydantic by calling `to_dict()` of source_image
|
|
82
|
-
if self.source_image:
|
|
82
|
+
if self.source_image and isinstance(self.source_image, ImageData):
|
|
83
83
|
_dict['SourceImage'] = self.source_image.to_dict()
|
|
84
84
|
# override the default output from pydantic by calling `to_dict()` of result_images
|
|
85
|
-
if self.result_images:
|
|
85
|
+
if self.result_images and isinstance(self.result_images, RawImageContainerList):
|
|
86
86
|
_dict['ResultImages'] = self.result_images.to_dict()
|
|
87
87
|
return _dict
|
|
88
88
|
|
|
@@ -80,13 +80,13 @@ class PhotoIdentResult(AuthenticityCheckResultItem):
|
|
|
80
80
|
exclude_none=True,
|
|
81
81
|
)
|
|
82
82
|
# override the default output from pydantic by calling `to_dict()` of area
|
|
83
|
-
if self.area:
|
|
83
|
+
if self.area and isinstance(self.area, RectangleCoordinates):
|
|
84
84
|
_dict['Area'] = self.area.to_dict()
|
|
85
85
|
# override the default output from pydantic by calling `to_dict()` of source_image
|
|
86
|
-
if self.source_image:
|
|
86
|
+
if self.source_image and isinstance(self.source_image, ImageData):
|
|
87
87
|
_dict['SourceImage'] = self.source_image.to_dict()
|
|
88
88
|
# override the default output from pydantic by calling `to_dict()` of result_images
|
|
89
|
-
if self.result_images:
|
|
89
|
+
if self.result_images and isinstance(self.result_images, RawImageContainerList):
|
|
90
90
|
_dict['ResultImages'] = self.result_images.to_dict()
|
|
91
91
|
return _dict
|
|
92
92
|
|