regula.documentreader.webclient 8.1.439__py3-none-any.whl → 8.2.401.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/models/area_array.py +2 -2
- regula/documentreader/webclient/gen/models/area_container.py +2 -2
- regula/documentreader/webclient/gen/models/authenticity_check_list.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_check_result.py +1 -1
- regula/documentreader/webclient/gen/models/authenticity_check_result_item.py +3 -1
- regula/documentreader/webclient/gen/models/container_list.py +1 -1
- regula/documentreader/webclient/gen/models/doc_bar_code_info_fields_list.py +1 -1
- regula/documentreader/webclient/gen/models/doc_visual_extended_field.py +1 -1
- regula/documentreader/webclient/gen/models/doc_visual_extended_info.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/face_detection.py +1 -1
- regula/documentreader/webclient/gen/models/face_item.py +1 -1
- regula/documentreader/webclient/gen/models/fdsid_list.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/graphic_fields_list.py +1 -1
- regula/documentreader/webclient/gen/models/image_quality_check_list.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/in_data.py +1 -1
- regula/documentreader/webclient/gen/models/lcid.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/mrz_position.py +124 -0
- 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/out_data.py +1 -1
- regula/documentreader/webclient/gen/models/p_array_field.py +1 -1
- regula/documentreader/webclient/gen/models/parsed_data.py +2 -3
- 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 +3 -5
- regula/documentreader/webclient/gen/models/process_request.py +1 -1
- regula/documentreader/webclient/gen/models/raw_image_container_list.py +1 -1
- regula/documentreader/webclient/gen/models/result_item.py +3 -1
- regula/documentreader/webclient/gen/models/result_mrz_detector.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_access_control_info.py +2 -1
- regula/documentreader/webclient/gen/models/rfid_application.py +1 -1
- regula/documentreader/webclient/gen/models/rfid_certificate_ex.py +3 -2
- regula/documentreader/webclient/gen/models/rfid_data_file.py +2 -1
- regula/documentreader/webclient/gen/models/rfid_distinguished_name.py +1 -1
- 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_security_object.py +3 -2
- regula/documentreader/webclient/gen/models/rfid_session_data.py +5 -5
- regula/documentreader/webclient/gen/models/rfid_signer_info_ex.py +4 -3
- regula/documentreader/webclient/gen/models/rfidpkd_resource_type.py +0 -2
- regula/documentreader/webclient/gen/models/string_item.py +2 -2
- regula/documentreader/webclient/gen/models/string_recognition_result.py +1 -1
- regula/documentreader/webclient/gen/models/symbol_recognition_result.py +1 -1
- regula/documentreader/webclient/gen/models/t_doc_binary_info.py +1 -1
- regula/documentreader/webclient/gen/models/t_original_rfid_graphics_info.py +1 -1
- regula/documentreader/webclient/gen/models/text.py +2 -2
- regula/documentreader/webclient/gen/models/text_field.py +3 -3
- regula/documentreader/webclient/gen/models/text_field_type.py +0 -2
- regula/documentreader/webclient/gen/models/text_field_value.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_process_request.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_process_result.py +7 -7
- regula/documentreader/webclient/gen/models/visual_extended_field_item.py +1 -1
- {regula_documentreader_webclient-8.1.439.dist-info → regula_documentreader_webclient-8.2.401.dev0.dist-info}/METADATA +1 -1
- {regula_documentreader_webclient-8.1.439.dist-info → regula_documentreader_webclient-8.2.401.dev0.dist-info}/RECORD +64 -63
- {regula_documentreader_webclient-8.1.439.dist-info → regula_documentreader_webclient-8.2.401.dev0.dist-info}/WHEEL +0 -0
- {regula_documentreader_webclient-8.1.439.dist-info → regula_documentreader_webclient-8.2.401.dev0.dist-info}/top_level.txt +0 -0
|
@@ -91,8 +91,8 @@ class AreaArray(BaseModel):
|
|
|
91
91
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
93
|
"Count": obj.get("Count"),
|
|
94
|
-
"List": [RectangleCoordinates.from_dict(_item) for _item in obj
|
|
95
|
-
"Points": [PointArray.from_dict(_item) for _item in obj
|
|
94
|
+
"List": [RectangleCoordinates.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None,
|
|
95
|
+
"Points": [PointArray.from_dict(_item) for _item in obj["Points"]] if obj.get("Points") is not None else None
|
|
96
96
|
})
|
|
97
97
|
return _obj
|
|
98
98
|
|
|
@@ -91,8 +91,8 @@ class AreaContainer(BaseModel):
|
|
|
91
91
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
93
|
"Count": obj.get("Count"),
|
|
94
|
-
"List": [RectangleCoordinates.from_dict(_item) for _item in obj
|
|
95
|
-
"Points": [PointsContainer.from_dict(_item) for _item in obj
|
|
94
|
+
"List": [RectangleCoordinates.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None,
|
|
95
|
+
"Points": [PointsContainer.from_dict(_item) for _item in obj["Points"]] if obj.get("Points") is not None else None
|
|
96
96
|
})
|
|
97
97
|
return _obj
|
|
98
98
|
|
|
@@ -82,7 +82,7 @@ class AuthenticityCheckList(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"Count": obj.get("Count"),
|
|
85
|
-
"List": [AuthenticityCheckResult.from_dict(_item) for _item in obj
|
|
85
|
+
"List": [AuthenticityCheckResult.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -88,7 +88,7 @@ class AuthenticityCheckResult(BaseModel):
|
|
|
88
88
|
"Type": obj.get("Type"),
|
|
89
89
|
"Result": obj.get("Result"),
|
|
90
90
|
"Count": obj.get("Count"),
|
|
91
|
-
"List": [AuthenticityCheckResultItem.from_dict(_item) for _item in obj
|
|
91
|
+
"List": [AuthenticityCheckResultItem.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None
|
|
92
92
|
})
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
@@ -161,6 +161,8 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
161
161
|
if object_type == 'SecurityFeatureResult':
|
|
162
162
|
return import_module("regula.documentreader.webclient.gen.models.security_feature_result").SecurityFeatureResult.from_dict(obj)
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
raise ValueError("AuthenticityCheckResultItem failed to lookup discriminator value from " +
|
|
165
|
+
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
|
|
166
|
+
", mapping: " + json.dumps(cls.__discriminator_value_class_map))
|
|
165
167
|
|
|
166
168
|
|
|
@@ -82,7 +82,7 @@ class ContainerList(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"Count": obj.get("Count"),
|
|
85
|
-
"List": [ResultItem.from_dict(_item) for _item in obj
|
|
85
|
+
"List": [ResultItem.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -82,7 +82,7 @@ class DocBarCodeInfoFieldsList(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"nFields": obj.get("nFields"),
|
|
85
|
-
"pArrayFields": [PArrayField.from_dict(_item) for _item in obj
|
|
85
|
+
"pArrayFields": [PArrayField.from_dict(_item) for _item in obj["pArrayFields"]] if obj.get("pArrayFields") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -101,7 +101,7 @@ class DocVisualExtendedField(BaseModel):
|
|
|
101
101
|
"wFieldType": obj.get("wFieldType"),
|
|
102
102
|
"FieldName": obj.get("FieldName"),
|
|
103
103
|
"StringsCount": obj.get("StringsCount"),
|
|
104
|
-
"StringsResult": [StringRecognitionResult.from_dict(_item) for _item in obj
|
|
104
|
+
"StringsResult": [StringRecognitionResult.from_dict(_item) for _item in obj["StringsResult"]] if obj.get("StringsResult") is not None else None,
|
|
105
105
|
"Buf_Length": obj.get("Buf_Length"),
|
|
106
106
|
"Buf_Text": obj.get("Buf_Text"),
|
|
107
107
|
"FieldMask": obj.get("FieldMask"),
|
|
@@ -82,7 +82,7 @@ class DocVisualExtendedInfo(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"nFields": obj.get("nFields"),
|
|
85
|
-
"pArrayFields": [DocVisualExtendedField.from_dict(_item) for _item in obj
|
|
85
|
+
"pArrayFields": [DocVisualExtendedField.from_dict(_item) for _item in obj["pArrayFields"]] if obj.get("pArrayFields") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -83,7 +83,7 @@ class DocumentTypesCandidates(BaseModel):
|
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"RecResult": obj.get("RecResult"),
|
|
86
|
-
"Candidates": [OneCandidate.from_dict(_item) for _item in obj
|
|
86
|
+
"Candidates": [OneCandidate.from_dict(_item) for _item in obj["Candidates"]] if obj.get("Candidates") is not None else None
|
|
87
87
|
})
|
|
88
88
|
return _obj
|
|
89
89
|
|
|
@@ -83,7 +83,7 @@ class DocumentTypesCandidatesList(BaseModel):
|
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"RecResult": obj.get("RecResult"),
|
|
86
|
-
"Candidates": [OneCandidate.from_dict(_item) for _item in obj
|
|
86
|
+
"Candidates": [OneCandidate.from_dict(_item) for _item in obj["Candidates"]] if obj.get("Candidates") is not None else None
|
|
87
87
|
})
|
|
88
88
|
return _obj
|
|
89
89
|
|
|
@@ -86,7 +86,7 @@ class FaceDetection(BaseModel):
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"Count": obj.get("Count"),
|
|
88
88
|
"CountFalseDetection": obj.get("CountFalseDetection"),
|
|
89
|
-
"Res": [FaceItem.from_dict(_item) for _item in obj
|
|
89
|
+
"Res": [FaceItem.from_dict(_item) for _item in obj["Res"]] if obj.get("Res") is not None else None,
|
|
90
90
|
"Reserved1": obj.get("Reserved1"),
|
|
91
91
|
"Reserved2": obj.get("Reserved2")
|
|
92
92
|
})
|
|
@@ -99,7 +99,7 @@ class FaceItem(BaseModel):
|
|
|
99
99
|
"FaceRect": RectangleCoordinates.from_dict(obj["FaceRect"]) if obj.get("FaceRect") is not None else None,
|
|
100
100
|
"FieldRect": RectangleCoordinates.from_dict(obj["FieldRect"]) if obj.get("FieldRect") is not None else None,
|
|
101
101
|
"GraphFieldNumber": obj.get("GraphFieldNumber"),
|
|
102
|
-
"Landmarks": [Point.from_dict(_item) for _item in obj
|
|
102
|
+
"Landmarks": [Point.from_dict(_item) for _item in obj["Landmarks"]] if obj.get("Landmarks") is not None else None,
|
|
103
103
|
"LightType": obj.get("LightType"),
|
|
104
104
|
"Orientation": obj.get("Orientation"),
|
|
105
105
|
"Probability": obj.get("Probability")
|
|
@@ -22,13 +22,13 @@ class FDSIDList(BaseModel):
|
|
|
22
22
|
Extended document type info and Regula's 'Information Reference Systems' links
|
|
23
23
|
""" # noqa: E501
|
|
24
24
|
icao_code: Annotated[str, Field(min_length=3, strict=True, max_length=3)] = Field(description="ICAO code of the issuing country", alias="ICAOCode")
|
|
25
|
-
count:
|
|
26
|
-
list:
|
|
25
|
+
count: Union[StrictFloat, StrictInt] = Field(description="Number of elements in the List", alias="Count")
|
|
26
|
+
list: List[StrictInt] = Field(description="Document identifiers in 'Information Reference Systems'", alias="List")
|
|
27
27
|
d_type: DocumentType = Field(alias="dType")
|
|
28
28
|
d_format: DocumentFormat = Field(alias="dFormat")
|
|
29
29
|
d_mrz: StrictBool = Field(description="Flag indicating the presence of MRZ on the document", alias="dMRZ")
|
|
30
30
|
d_description: Optional[StrictStr] = Field(default=None, description="Document description", alias="dDescription")
|
|
31
|
-
d_year:
|
|
31
|
+
d_year: StrictStr = Field(description="Year of publication of the document", alias="dYear")
|
|
32
32
|
d_country_name: StrictStr = Field(description="Issuing country name", alias="dCountryName")
|
|
33
33
|
d_state_code: Optional[StrictStr] = Field(default=None, description="Issuing state code", alias="dStateCode")
|
|
34
34
|
d_state_name: Optional[StrictStr] = Field(default=None, description="Issuing state name", alias="dStateName")
|
|
@@ -93,7 +93,7 @@ class FiberItem(BaseModel):
|
|
|
93
93
|
"ExpectedCount": obj.get("ExpectedCount"),
|
|
94
94
|
"LightValue": obj.get("LightValue"),
|
|
95
95
|
"LightDisp": obj.get("LightDisp"),
|
|
96
|
-
"RectArray": [RectangleCoordinates.from_dict(_item) for _item in obj
|
|
96
|
+
"RectArray": [RectangleCoordinates.from_dict(_item) for _item in obj["RectArray"]] if obj.get("RectArray") is not None else None,
|
|
97
97
|
"Width": obj.get("Width"),
|
|
98
98
|
"Length": obj.get("Length"),
|
|
99
99
|
"Area": obj.get("Area"),
|
|
@@ -101,7 +101,7 @@ class FiberResult(AuthenticityCheckResultItem):
|
|
|
101
101
|
"ExpectedCount": obj.get("ExpectedCount"),
|
|
102
102
|
"LightValue": obj.get("LightValue"),
|
|
103
103
|
"LightDisp": obj.get("LightDisp"),
|
|
104
|
-
"RectArray": [RectangleCoordinates.from_dict(_item) for _item in obj
|
|
104
|
+
"RectArray": [RectangleCoordinates.from_dict(_item) for _item in obj["RectArray"]] if obj.get("RectArray") is not None else None,
|
|
105
105
|
"Width": obj.get("Width"),
|
|
106
106
|
"Length": obj.get("Length"),
|
|
107
107
|
"Area": obj.get("Area"),
|
|
@@ -81,7 +81,7 @@ class GraphicFieldsList(BaseModel):
|
|
|
81
81
|
return cls.model_validate(obj)
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
|
-
"pArrayFields": [GraphicField.from_dict(_item) for _item in obj
|
|
84
|
+
"pArrayFields": [GraphicField.from_dict(_item) for _item in obj["pArrayFields"]] if obj.get("pArrayFields") is not None else None,
|
|
85
85
|
"nFields": obj.get("nFields")
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
@@ -84,7 +84,7 @@ class ImageQualityCheckList(BaseModel):
|
|
|
84
84
|
|
|
85
85
|
_obj = cls.model_validate({
|
|
86
86
|
"result": obj.get("result"),
|
|
87
|
-
"List": [ImageQualityCheck.from_dict(_item) for _item in obj
|
|
87
|
+
"List": [ImageQualityCheck.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None,
|
|
88
88
|
"Count": obj.get("Count")
|
|
89
89
|
})
|
|
90
90
|
return _obj
|
|
@@ -93,8 +93,8 @@ class Images(BaseModel):
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
94
|
"fieldCount": obj.get("fieldCount"),
|
|
95
95
|
"availableSourceCount": obj.get("availableSourceCount"),
|
|
96
|
-
"availableSourceList": [ImagesAvailableSource.from_dict(_item) for _item in obj
|
|
97
|
-
"fieldList": [ImagesField.from_dict(_item) for _item in obj
|
|
96
|
+
"availableSourceList": [ImagesAvailableSource.from_dict(_item) for _item in obj["availableSourceList"]] if obj.get("availableSourceList") is not None else None,
|
|
97
|
+
"fieldList": [ImagesField.from_dict(_item) for _item in obj["fieldList"]] if obj.get("fieldList") is not None else None
|
|
98
98
|
})
|
|
99
99
|
return _obj
|
|
100
100
|
|
|
@@ -86,7 +86,7 @@ class ImagesField(BaseModel):
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"fieldName": obj.get("fieldName"),
|
|
88
88
|
"fieldType": obj.get("fieldType"),
|
|
89
|
-
"valueList": [ImagesFieldValue.from_dict(_item) for _item in obj
|
|
89
|
+
"valueList": [ImagesFieldValue.from_dict(_item) for _item in obj["valueList"]] if obj.get("valueList") is not None else None,
|
|
90
90
|
"valueCount": obj.get("valueCount")
|
|
91
91
|
})
|
|
92
92
|
return _obj
|
|
@@ -86,7 +86,7 @@ class InData(BaseModel):
|
|
|
86
86
|
|
|
87
87
|
_obj = cls.model_validate({
|
|
88
88
|
"video": InDataVideo.from_dict(obj["video"]) if obj.get("video") is not None else None,
|
|
89
|
-
"images": [InDataTransactionImagesFieldValue.from_dict(_item) for _item in obj
|
|
89
|
+
"images": [InDataTransactionImagesFieldValue.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None
|
|
90
90
|
})
|
|
91
91
|
return _obj
|
|
92
92
|
|
|
@@ -81,7 +81,7 @@ class ListTransactionsByTagResponse(BaseModel):
|
|
|
81
81
|
return cls.model_validate(obj)
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
|
-
"items": [GetTransactionsByTagResponse.from_dict(_item) for _item in obj
|
|
84
|
+
"items": [GetTransactionsByTagResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
85
85
|
"metadata": obj.get("metadata")
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
@@ -83,7 +83,7 @@ class ListVerifiedFields(BaseModel):
|
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"Count": obj.get("Count"),
|
|
86
|
-
"pFieldMaps": [VerifiedFieldMap.from_dict(_item) for _item in obj
|
|
86
|
+
"pFieldMaps": [VerifiedFieldMap.from_dict(_item) for _item in obj["pFieldMaps"]] if obj.get("pFieldMaps") is not None else None,
|
|
87
87
|
"pDateFormat": obj.get("pDateFormat")
|
|
88
88
|
})
|
|
89
89
|
return _obj
|
|
@@ -0,0 +1,124 @@
|
|
|
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, Optional, Union
|
|
14
|
+
from regula.documentreader.webclient.gen.models.document_format import DocumentFormat
|
|
15
|
+
from regula.documentreader.webclient.gen.models.point import Point
|
|
16
|
+
from typing import Optional, Set
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
|
|
19
|
+
class MrzPosition(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
MrzPosition
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
doc_format: DocumentFormat = Field(alias="docFormat")
|
|
24
|
+
angle: Union[StrictFloat, StrictInt] = Field(description="Document rotation angle", alias="Angle")
|
|
25
|
+
width: StrictInt = Field(description="Document width", alias="Width")
|
|
26
|
+
height: StrictInt = Field(description="Document height", alias="Height")
|
|
27
|
+
center: Point = Field(alias="Center")
|
|
28
|
+
left_bottom: Point = Field(alias="LeftBottom")
|
|
29
|
+
left_top: Point = Field(alias="LeftTop")
|
|
30
|
+
right_bottom: Point = Field(alias="RightBottom")
|
|
31
|
+
right_top: Point = Field(alias="RightTop")
|
|
32
|
+
dpi: StrictInt = Field(alias="Dpi")
|
|
33
|
+
inverse: Optional[StrictInt] = Field(default=None, alias="Inverse")
|
|
34
|
+
obj_area: Optional[StrictInt] = Field(default=None, alias="ObjArea")
|
|
35
|
+
obj_int_angle_dev: Optional[StrictInt] = Field(default=None, alias="ObjIntAngleDev")
|
|
36
|
+
perspective_tr: Optional[StrictInt] = Field(default=None, alias="PerspectiveTr")
|
|
37
|
+
result_status: Optional[StrictInt] = Field(default=None, alias="ResultStatus")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["docFormat", "Angle", "Width", "Height", "Center", "LeftBottom", "LeftTop", "RightBottom", "RightTop", "Dpi", "Inverse", "ObjArea", "ObjIntAngleDev", "PerspectiveTr", "ResultStatus"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of MrzPosition from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of center
|
|
80
|
+
if self.center:
|
|
81
|
+
_dict['Center'] = self.center.to_dict()
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of left_bottom
|
|
83
|
+
if self.left_bottom:
|
|
84
|
+
_dict['LeftBottom'] = self.left_bottom.to_dict()
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of left_top
|
|
86
|
+
if self.left_top:
|
|
87
|
+
_dict['LeftTop'] = self.left_top.to_dict()
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of right_bottom
|
|
89
|
+
if self.right_bottom:
|
|
90
|
+
_dict['RightBottom'] = self.right_bottom.to_dict()
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of right_top
|
|
92
|
+
if self.right_top:
|
|
93
|
+
_dict['RightTop'] = self.right_top.to_dict()
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of MrzPosition from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate({
|
|
106
|
+
"docFormat": obj.get("docFormat"),
|
|
107
|
+
"Angle": obj.get("Angle"),
|
|
108
|
+
"Width": obj.get("Width"),
|
|
109
|
+
"Height": obj.get("Height"),
|
|
110
|
+
"Center": Point.from_dict(obj["Center"]) if obj.get("Center") is not None else None,
|
|
111
|
+
"LeftBottom": Point.from_dict(obj["LeftBottom"]) if obj.get("LeftBottom") is not None else None,
|
|
112
|
+
"LeftTop": Point.from_dict(obj["LeftTop"]) if obj.get("LeftTop") is not None else None,
|
|
113
|
+
"RightBottom": Point.from_dict(obj["RightBottom"]) if obj.get("RightBottom") is not None else None,
|
|
114
|
+
"RightTop": Point.from_dict(obj["RightTop"]) if obj.get("RightTop") is not None else None,
|
|
115
|
+
"Dpi": obj.get("Dpi"),
|
|
116
|
+
"Inverse": obj.get("Inverse"),
|
|
117
|
+
"ObjArea": obj.get("ObjArea"),
|
|
118
|
+
"ObjIntAngleDev": obj.get("ObjIntAngleDev"),
|
|
119
|
+
"PerspectiveTr": obj.get("PerspectiveTr"),
|
|
120
|
+
"ResultStatus": obj.get("ResultStatus")
|
|
121
|
+
})
|
|
122
|
+
return _obj
|
|
123
|
+
|
|
124
|
+
|
|
@@ -84,7 +84,7 @@ class MRZRowsItem(BaseModel):
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"length": obj.get("length"),
|
|
86
86
|
"maxLength": obj.get("maxLength"),
|
|
87
|
-
"symbols": [Symbol.from_dict(_item) for _item in obj
|
|
87
|
+
"symbols": [Symbol.from_dict(_item) for _item in obj["symbols"]] if obj.get("symbols") is not None else None
|
|
88
88
|
})
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
@@ -98,7 +98,7 @@ class MRZTestQuality(BaseModel):
|
|
|
98
98
|
"STAIN_MRZ": obj.get("STAIN_MRZ"),
|
|
99
99
|
"SYMBOLS_PARAM": obj.get("SYMBOLS_PARAM"),
|
|
100
100
|
"StrCount": obj.get("StrCount"),
|
|
101
|
-
"Strings": [StringItem.from_dict(_item) for _item in obj
|
|
101
|
+
"Strings": [StringItem.from_dict(_item) for _item in obj["Strings"]] if obj.get("Strings") is not None else None,
|
|
102
102
|
"TEXTUAL_FILLING": obj.get("TEXTUAL_FILLING")
|
|
103
103
|
})
|
|
104
104
|
return _obj
|
|
@@ -82,7 +82,7 @@ class OutData(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"url": obj.get("url"),
|
|
85
|
-
"images": [OutDataTransactionImagesFieldValue.from_dict(_item) for _item in obj
|
|
85
|
+
"images": [OutDataTransactionImagesFieldValue.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -102,7 +102,7 @@ class PArrayField(BaseModel):
|
|
|
102
102
|
"bcAngle_DETECT": obj.get("bcAngle_DETECT"),
|
|
103
103
|
"bcCodeResult": obj.get("bcCodeResult"),
|
|
104
104
|
"bcCountModule": obj.get("bcCountModule"),
|
|
105
|
-
"bcDataModule": [DataModule.from_dict(_item) for _item in obj
|
|
105
|
+
"bcDataModule": [DataModule.from_dict(_item) for _item in obj["bcDataModule"]] if obj.get("bcDataModule") is not None else None,
|
|
106
106
|
"bcPDF417INFO": BcPDF417INFO.from_dict(obj["bcPDF417INFO"]) if obj.get("bcPDF417INFO") is not None else None,
|
|
107
107
|
"bcROI_DETECT": BcROIDETECT.from_dict(obj["bcROI_DETECT"]) if obj.get("bcROI_DETECT") is not None else None,
|
|
108
108
|
"bcTextDecoderTypes": obj.get("bcTextDecoderTypes"),
|
|
@@ -9,9 +9,8 @@ import pprint
|
|
|
9
9
|
import re # noqa: F401
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
13
13
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
-
from regula.documentreader.webclient.gen.models.parsing_notification_codes import ParsingNotificationCodes
|
|
15
14
|
from typing import Optional, Set
|
|
16
15
|
from typing_extensions import Self
|
|
17
16
|
|
|
@@ -19,7 +18,7 @@ class ParsedData(BaseModel):
|
|
|
19
18
|
"""
|
|
20
19
|
ParsedData
|
|
21
20
|
""" # noqa: E501
|
|
22
|
-
parsing_notifications: Optional[List[
|
|
21
|
+
parsing_notifications: Optional[List[StrictInt]] = Field(default=None, alias="ParsingNotifications")
|
|
23
22
|
__properties: ClassVar[List[str]] = ["ParsingNotifications"]
|
|
24
23
|
|
|
25
24
|
model_config = ConfigDict(
|
|
@@ -80,7 +80,7 @@ class PointArray(BaseModel):
|
|
|
80
80
|
return cls.model_validate(obj)
|
|
81
81
|
|
|
82
82
|
_obj = cls.model_validate({
|
|
83
|
-
"PointsList": [Point.from_dict(_item) for _item in obj
|
|
83
|
+
"PointsList": [Point.from_dict(_item) for _item in obj["PointsList"]] if obj.get("PointsList") is not None else None
|
|
84
84
|
})
|
|
85
85
|
return _obj
|
|
86
86
|
|
|
@@ -82,7 +82,7 @@ class PointsContainer(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"PointCount": obj.get("PointCount"),
|
|
85
|
-
"PointsList": [Point.from_dict(_item) for _item in obj
|
|
85
|
+
"PointsList": [Point.from_dict(_item) for _item in obj["PointsList"]] if obj.get("PointsList") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -98,8 +98,7 @@ class ProcessParams(BaseModel):
|
|
|
98
98
|
strict_dl_category_expiry: Optional[StrictBool] = Field(default=None, description="Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases.", alias="strictDLCategoryExpiry")
|
|
99
99
|
generate_alpha2_codes: Optional[StrictBool] = Field(default=None, description="Set to generate Alpha-2 codes for nationality and issuing state fields.", alias="generateAlpha2Codes")
|
|
100
100
|
pdf_pages_limit: Optional[StrictInt] = Field(default=None, description="Limits the number of pages to be processed from a PDF file.", alias="pdfPagesLimit")
|
|
101
|
-
|
|
102
|
-
__properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes", "pdfPagesLimit", "disableAuthResolutionFilter"]
|
|
101
|
+
__properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes", "pdfPagesLimit"]
|
|
103
102
|
|
|
104
103
|
model_config = ConfigDict(
|
|
105
104
|
populate_by_name=True,
|
|
@@ -191,7 +190,7 @@ class ProcessParams(BaseModel):
|
|
|
191
190
|
"imageDpiOutMax": obj.get("imageDpiOutMax"),
|
|
192
191
|
"alreadyCropped": obj.get("alreadyCropped"),
|
|
193
192
|
"customParams": obj.get("customParams"),
|
|
194
|
-
"config": [PerDocumentConfig.from_dict(_item) for _item in obj
|
|
193
|
+
"config": [PerDocumentConfig.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None,
|
|
195
194
|
"log": obj.get("log"),
|
|
196
195
|
"logLevel": obj.get("logLevel"),
|
|
197
196
|
"forceDocID": obj.get("forceDocID"),
|
|
@@ -233,8 +232,7 @@ class ProcessParams(BaseModel):
|
|
|
233
232
|
"doBarcodes": obj.get("doBarcodes"),
|
|
234
233
|
"strictDLCategoryExpiry": obj.get("strictDLCategoryExpiry"),
|
|
235
234
|
"generateAlpha2Codes": obj.get("generateAlpha2Codes"),
|
|
236
|
-
"pdfPagesLimit": obj.get("pdfPagesLimit")
|
|
237
|
-
"disableAuthResolutionFilter": obj.get("disableAuthResolutionFilter")
|
|
235
|
+
"pdfPagesLimit": obj.get("pdfPagesLimit")
|
|
238
236
|
})
|
|
239
237
|
return _obj
|
|
240
238
|
|
|
@@ -104,7 +104,7 @@ class ProcessRequest(BaseModel):
|
|
|
104
104
|
|
|
105
105
|
_obj = cls.model_validate({
|
|
106
106
|
"processParam": ProcessParams.from_dict(obj["processParam"]) if obj.get("processParam") is not None else None,
|
|
107
|
-
"List": [ProcessRequestImage.from_dict(_item) for _item in obj
|
|
107
|
+
"List": [ProcessRequestImage.from_dict(_item) for _item in obj["List"]] if obj.get("List") is not None else None,
|
|
108
108
|
"tag": obj.get("tag"),
|
|
109
109
|
"tenant": obj.get("tenant"),
|
|
110
110
|
"env": obj.get("env"),
|
|
@@ -82,7 +82,7 @@ class RawImageContainerList(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"Count": obj.get("Count"),
|
|
85
|
-
"Images": [ImageData.from_dict(_item) for _item in obj
|
|
85
|
+
"Images": [ImageData.from_dict(_item) for _item in obj["Images"]] if obj.get("Images") is not None else None
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -202,6 +202,8 @@ class ResultItem(BaseModel):
|
|
|
202
202
|
if object_type == 'FaceDetectionResult':
|
|
203
203
|
return import_module("regula.documentreader.webclient.gen.models.face_detection_result").FaceDetectionResult.from_dict(obj)
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
raise ValueError("ResultItem failed to lookup discriminator value from " +
|
|
206
|
+
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
|
|
207
|
+
", mapping: " + json.dumps(cls.__discriminator_value_class_map))
|
|
206
208
|
|
|
207
209
|
|
|
@@ -84,7 +84,7 @@ class ResultMRZDetector(BaseModel):
|
|
|
84
84
|
|
|
85
85
|
_obj = cls.model_validate({
|
|
86
86
|
"MRZFormat": obj.get("MRZFormat"),
|
|
87
|
-
"MRZRows": [MRZRowsItem.from_dict(_item) for _item in obj
|
|
87
|
+
"MRZRows": [MRZRowsItem.from_dict(_item) for _item in obj["MRZRows"]] if obj.get("MRZRows") is not None else None,
|
|
88
88
|
"MRZRowsNum": obj.get("MRZRowsNum"),
|
|
89
89
|
"boundingQuadrangle": obj.get("boundingQuadrangle")
|
|
90
90
|
})
|
|
@@ -11,6 +11,7 @@ import json
|
|
|
11
11
|
|
|
12
12
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
13
13
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
14
|
+
from regula.documentreader.webclient.gen.models.parsing_notification_codes import ParsingNotificationCodes
|
|
14
15
|
from regula.documentreader.webclient.gen.models.rfid_access_control_procedure_type import RfidAccessControlProcedureType
|
|
15
16
|
from regula.documentreader.webclient.gen.models.rfid_error_codes import RFIDErrorCodes
|
|
16
17
|
from typing import Optional, Set
|
|
@@ -23,7 +24,7 @@ class RfidAccessControlInfo(BaseModel):
|
|
|
23
24
|
type: RfidAccessControlProcedureType = Field(alias="Type")
|
|
24
25
|
status: RFIDErrorCodes = Field(alias="Status")
|
|
25
26
|
active_option_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Index of the active variant of the procedure", alias="ActiveOptionIdx")
|
|
26
|
-
notifications: List[
|
|
27
|
+
notifications: List[ParsingNotificationCodes] = Field(description="List of remarks arisen during the procedure.", alias="Notifications")
|
|
27
28
|
access_control_options: Optional[List[Any]] = Field(default=None, description="List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document", alias="AccessControlOptions")
|
|
28
29
|
__properties: ClassVar[List[str]] = ["Type", "Status", "ActiveOptionIdx", "Notifications", "AccessControlOptions"]
|
|
29
30
|
|
|
@@ -94,7 +94,7 @@ class RfidApplication(BaseModel):
|
|
|
94
94
|
"Version": obj.get("Version"),
|
|
95
95
|
"UnicodeVersion": obj.get("UnicodeVersion"),
|
|
96
96
|
"DataHashAlgorithm": obj.get("DataHashAlgorithm"),
|
|
97
|
-
"Files": [RfidDataFile.from_dict(_item) for _item in obj
|
|
97
|
+
"Files": [RfidDataFile.from_dict(_item) for _item in obj["Files"]] if obj.get("Files") is not None else None
|
|
98
98
|
})
|
|
99
99
|
return _obj
|
|
100
100
|
|