regula-facesdk-webclient 7.2.388.dev0__py3-none-any.whl → 8.1.433.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/facesdk/webclient/__init__.py +5 -5
- regula/facesdk/webclient/ext/api/group_api.py +2 -27
- regula/facesdk/webclient/ext/api/match_api.py +3 -29
- regula/facesdk/webclient/ext/api/person_api.py +8 -34
- regula/facesdk/webclient/ext/api/sdk.py +5 -3
- regula/facesdk/webclient/ext/api/search_api.py +2 -6
- regula/facesdk/webclient/ext/models/detect_request.py +6 -5
- regula/facesdk/webclient/ext/models/match_image.py +3 -3
- regula/facesdk/webclient/ext/models/match_request.py +7 -5
- regula/facesdk/webclient/gen/__init__.py +349 -18
- regula/facesdk/webclient/gen/api/__init__.py +30 -3
- regula/facesdk/webclient/gen/api/group_api.py +1854 -799
- regula/facesdk/webclient/gen/api/healthcheck_api.py +475 -215
- regula/facesdk/webclient/gen/api/liveness20_api.py +565 -0
- regula/facesdk/webclient/gen/api/match_api.py +801 -355
- regula/facesdk/webclient/gen/api/person_api.py +2399 -1039
- regula/facesdk/webclient/gen/api/search_api.py +286 -130
- regula/facesdk/webclient/gen/api_client.py +577 -476
- regula/facesdk/webclient/gen/api_response.py +21 -0
- regula/facesdk/webclient/gen/configuration.py +231 -105
- regula/facesdk/webclient/gen/exceptions.py +82 -33
- regula/facesdk/webclient/gen/models/__init__.py +202 -95
- regula/facesdk/webclient/gen/models/add_image_to_person_request.py +96 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_request_data.py +92 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_request_image.py +92 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_response.py +92 -0
- regula/facesdk/webclient/gen/models/attribute_config.py +83 -0
- regula/facesdk/webclient/gen/models/attributes_data.py +82 -0
- regula/facesdk/webclient/gen/models/crop.py +88 -0
- regula/facesdk/webclient/gen/models/detail_item.py +136 -0
- regula/facesdk/webclient/gen/models/detect_attributes_details.py +84 -0
- regula/facesdk/webclient/gen/models/detect_details_meta.py +86 -0
- regula/facesdk/webclient/gen/models/detect_meta_data.py +84 -0
- regula/facesdk/webclient/gen/models/detect_request.py +94 -0
- regula/facesdk/webclient/gen/models/detect_request_data.py +90 -0
- regula/facesdk/webclient/gen/models/detect_response.py +89 -0
- regula/facesdk/webclient/gen/models/detect_response_results.py +86 -0
- regula/facesdk/webclient/gen/models/detect_result.py +98 -0
- regula/facesdk/webclient/gen/models/detection.py +98 -0
- regula/facesdk/webclient/gen/models/detection_attributes.py +92 -0
- regula/facesdk/webclient/gen/models/detection_attributes_details_inner.py +132 -0
- regula/facesdk/webclient/gen/models/detection_face.py +90 -0
- regula/facesdk/webclient/gen/models/detection_quality.py +107 -0
- regula/facesdk/webclient/gen/models/device_info.py +111 -0
- regula/facesdk/webclient/gen/models/face_attribute.py +40 -0
- regula/facesdk/webclient/gen/models/face_image_quality_align_type.py +32 -0
- regula/facesdk/webclient/gen/models/face_image_quality_groups.py +35 -0
- regula/facesdk/webclient/gen/models/face_image_quality_groups_strings.py +35 -0
- regula/facesdk/webclient/gen/models/face_image_quality_status.py +30 -0
- regula/facesdk/webclient/gen/models/face_quality_config_name.py +75 -0
- regula/facesdk/webclient/gen/models/face_quality_scenarios.py +37 -0
- regula/facesdk/webclient/gen/models/face_sdk_result.py +83 -0
- regula/facesdk/webclient/gen/models/face_sdk_result_code.py +68 -0
- regula/facesdk/webclient/gen/models/faces_response.py +100 -0
- regula/facesdk/webclient/gen/models/faces_response_data.py +90 -0
- regula/facesdk/webclient/gen/models/filter_op.py +29 -0
- regula/facesdk/webclient/gen/models/filter_search_request.py +87 -0
- regula/facesdk/webclient/gen/models/group.py +89 -0
- regula/facesdk/webclient/gen/models/group_data.py +85 -0
- regula/facesdk/webclient/gen/models/group_page.py +94 -0
- regula/facesdk/webclient/gen/models/group_page_items.py +90 -0
- regula/facesdk/webclient/gen/models/group_response.py +84 -0
- regula/facesdk/webclient/gen/models/group_to_create.py +86 -0
- regula/facesdk/webclient/gen/models/image.py +96 -0
- regula/facesdk/webclient/gen/models/image_fields.py +100 -0
- regula/facesdk/webclient/gen/models/image_fields_image.py +92 -0
- regula/facesdk/webclient/gen/models/image_page.py +94 -0
- regula/facesdk/webclient/gen/models/image_page_items.py +90 -0
- regula/facesdk/webclient/gen/models/image_source.py +34 -0
- regula/facesdk/webclient/gen/models/liveness_type.py +29 -0
- regula/facesdk/webclient/gen/models/match_and_search_request.py +103 -0
- regula/facesdk/webclient/gen/models/match_and_search_request_images_item.py +87 -0
- regula/facesdk/webclient/gen/models/match_and_search_response.py +107 -0
- regula/facesdk/webclient/gen/models/match_and_search_response_data.py +104 -0
- regula/facesdk/webclient/gen/models/match_and_search_response_data_detections_item.py +95 -0
- regula/facesdk/webclient/gen/models/match_image.py +89 -0
- regula/facesdk/webclient/gen/models/match_image_detection.py +95 -0
- regula/facesdk/webclient/gen/models/match_image_result.py +97 -0
- regula/facesdk/webclient/gen/models/match_request.py +102 -0
- regula/facesdk/webclient/gen/models/match_request_data.py +98 -0
- regula/facesdk/webclient/gen/models/match_response.py +105 -0
- regula/facesdk/webclient/gen/models/match_response_data.py +102 -0
- regula/facesdk/webclient/gen/models/operation_log.py +88 -0
- regula/facesdk/webclient/gen/models/output_image_params.py +89 -0
- regula/facesdk/webclient/gen/models/page.py +84 -0
- regula/facesdk/webclient/gen/models/person.py +97 -0
- regula/facesdk/webclient/gen/models/person_data.py +87 -0
- regula/facesdk/webclient/gen/models/person_fields.py +91 -0
- regula/facesdk/webclient/gen/models/person_items.py +90 -0
- regula/facesdk/webclient/gen/models/person_to_update_fields.py +89 -0
- regula/facesdk/webclient/gen/models/person_with_images.py +107 -0
- regula/facesdk/webclient/gen/models/person_with_images_data.py +90 -0
- regula/facesdk/webclient/gen/models/persons_page.py +94 -0
- regula/facesdk/webclient/gen/models/process_param.py +103 -0
- regula/facesdk/webclient/gen/models/process_param_attributes.py +90 -0
- regula/facesdk/webclient/gen/models/quality_config.py +86 -0
- regula/facesdk/webclient/gen/models/quality_detail.py +94 -0
- regula/facesdk/webclient/gen/models/quality_details_groups.py +90 -0
- regula/facesdk/webclient/gen/models/quality_request.py +93 -0
- regula/facesdk/webclient/gen/models/recognize_image.py +100 -0
- regula/facesdk/webclient/gen/models/recognize_image_data.py +84 -0
- regula/facesdk/webclient/gen/models/resize_options.py +86 -0
- regula/facesdk/webclient/gen/models/search_bad_params.py +86 -0
- regula/facesdk/webclient/gen/models/search_detection.py +102 -0
- regula/facesdk/webclient/gen/models/search_parameters.py +95 -0
- regula/facesdk/webclient/gen/models/search_parameters_create_person.py +86 -0
- regula/facesdk/webclient/gen/models/search_person.py +113 -0
- regula/facesdk/webclient/gen/models/search_person_data.py +96 -0
- regula/facesdk/webclient/gen/models/search_request.py +119 -0
- regula/facesdk/webclient/gen/models/search_result.py +92 -0
- regula/facesdk/webclient/gen/models/transaction_info.py +99 -0
- regula/facesdk/webclient/gen/models/transaction_labels.py +84 -0
- regula/facesdk/webclient/gen/models/update_group.py +85 -0
- regula/facesdk/webclient/gen/py.typed +0 -0
- regula/facesdk/webclient/gen/rest.py +136 -232
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/METADATA +7 -4
- regula_facesdk_webclient-8.1.433.dev0.dist-info/RECORD +125 -0
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/WHEEL +1 -1
- regula/facesdk/webclient/gen/api/diagnostics_api.py +0 -162
- regula/facesdk/webclient/gen/api/liveness_2_0_api.py +0 -306
- regula/facesdk/webclient/gen/api/liveness_api.py +0 -424
- regula/facesdk/webclient/gen/apis/__init__.py +0 -22
- regula/facesdk/webclient/gen/model/__init__.py +0 -5
- regula/facesdk/webclient/gen/model/add_image_to_person_request.py +0 -261
- regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +0 -204
- regula/facesdk/webclient/gen/model/add_image_to_person_response.py +0 -262
- regula/facesdk/webclient/gen/model/attribute_config.py +0 -120
- regula/facesdk/webclient/gen/model/attribute_config_list.py +0 -92
- regula/facesdk/webclient/gen/model/crop.py +0 -180
- regula/facesdk/webclient/gen/model/detect_attributes_details.py +0 -150
- regula/facesdk/webclient/gen/model/detect_details_meta.py +0 -178
- regula/facesdk/webclient/gen/model/detect_request.py +0 -232
- regula/facesdk/webclient/gen/model/detect_request_attributes.py +0 -120
- regula/facesdk/webclient/gen/model/detect_response.py +0 -147
- regula/facesdk/webclient/gen/model/detect_response_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/detect_result.py +0 -235
- regula/facesdk/webclient/gen/model/detection.py +0 -230
- regula/facesdk/webclient/gen/model/detection_attributes.py +0 -150
- regula/facesdk/webclient/gen/model/detection_face.py +0 -232
- regula/facesdk/webclient/gen/model/detection_quality.py +0 -234
- regula/facesdk/webclient/gen/model/device_info.py +0 -231
- regula/facesdk/webclient/gen/model/face_align_type_quality.py +0 -109
- regula/facesdk/webclient/gen/model/face_attribute.py +0 -133
- regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +0 -109
- regula/facesdk/webclient/gen/model/face_image_quality_groups.py +0 -118
- regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +0 -118
- regula/facesdk/webclient/gen/model/face_image_quality_status.py +0 -103
- regula/facesdk/webclient/gen/model/face_quality_config_name.py +0 -238
- regula/facesdk/webclient/gen/model/face_quality_scenarios.py +0 -124
- regula/facesdk/webclient/gen/model/face_quality_status.py +0 -103
- regula/facesdk/webclient/gen/model/face_rectangular.py +0 -92
- regula/facesdk/webclient/gen/model/face_sdk_result.py +0 -121
- regula/facesdk/webclient/gen/model/face_sdk_result_code.py +0 -217
- regula/facesdk/webclient/gen/model/faces_response.py +0 -258
- regula/facesdk/webclient/gen/model/faces_response_all_of.py +0 -148
- regula/facesdk/webclient/gen/model/filter_op.py +0 -100
- regula/facesdk/webclient/gen/model/filter_search_request.py +0 -176
- regula/facesdk/webclient/gen/model/group.py +0 -206
- regula/facesdk/webclient/gen/model/group_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/group_page.py +0 -178
- regula/facesdk/webclient/gen/model/group_page_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/group_response.py +0 -150
- regula/facesdk/webclient/gen/model/group_to_create.py +0 -180
- regula/facesdk/webclient/gen/model/image.py +0 -318
- regula/facesdk/webclient/gen/model/image_fields.py +0 -258
- regula/facesdk/webclient/gen/model/image_fields_image.py +0 -204
- regula/facesdk/webclient/gen/model/image_page.py +0 -176
- regula/facesdk/webclient/gen/model/image_page_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/image_source.py +0 -115
- regula/facesdk/webclient/gen/model/liveness_transaction.py +0 -334
- regula/facesdk/webclient/gen/model/liveness_type.py +0 -100
- regula/facesdk/webclient/gen/model/match_and_search_request.py +0 -290
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +0 -234
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +0 -148
- regula/facesdk/webclient/gen/model/match_and_search_request_images.py +0 -176
- regula/facesdk/webclient/gen/model/match_and_search_response.py +0 -233
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +0 -206
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +0 -176
- regula/facesdk/webclient/gen/model/match_image.py +0 -205
- regula/facesdk/webclient/gen/model/match_image_detection.py +0 -178
- regula/facesdk/webclient/gen/model/match_image_result.py +0 -316
- regula/facesdk/webclient/gen/model/match_request.py +0 -233
- regula/facesdk/webclient/gen/model/match_request_output_image_params.py +0 -148
- regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +0 -212
- regula/facesdk/webclient/gen/model/match_response.py +0 -205
- regula/facesdk/webclient/gen/model/match_response_all_of.py +0 -178
- regula/facesdk/webclient/gen/model/operation_log.py +0 -206
- regula/facesdk/webclient/gen/model/output_image_params.py +0 -146
- regula/facesdk/webclient/gen/model/page.py +0 -150
- regula/facesdk/webclient/gen/model/person.py +0 -319
- regula/facesdk/webclient/gen/model/person_all_of.py +0 -206
- regula/facesdk/webclient/gen/model/person_created_response.py +0 -178
- regula/facesdk/webclient/gen/model/person_fields.py +0 -235
- regula/facesdk/webclient/gen/model/person_to_update_fields.py +0 -206
- regula/facesdk/webclient/gen/model/person_with_images.py +0 -347
- regula/facesdk/webclient/gen/model/person_with_images_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/persons_page.py +0 -176
- regula/facesdk/webclient/gen/model/persons_page_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/persons_request.py +0 -291
- regula/facesdk/webclient/gen/model/persons_request_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/process_param.py +0 -226
- regula/facesdk/webclient/gen/model/process_param_attributes.py +0 -120
- regula/facesdk/webclient/gen/model/quality_config.py +0 -154
- regula/facesdk/webclient/gen/model/quality_config_list.py +0 -92
- regula/facesdk/webclient/gen/model/quality_detail.py +0 -234
- regula/facesdk/webclient/gen/model/quality_details_groups.py +0 -202
- regula/facesdk/webclient/gen/model/quality_request.py +0 -146
- regula/facesdk/webclient/gen/model/recognize_image.py +0 -374
- regula/facesdk/webclient/gen/model/recognize_image_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/resize_options.py +0 -178
- regula/facesdk/webclient/gen/model/rgb.py +0 -92
- regula/facesdk/webclient/gen/model/search_bad_params.py +0 -172
- regula/facesdk/webclient/gen/model/search_detection.py +0 -398
- regula/facesdk/webclient/gen/model/search_parameters.py +0 -174
- regula/facesdk/webclient/gen/model/search_parameters_create_person.py +0 -177
- regula/facesdk/webclient/gen/model/search_person.py +0 -373
- regula/facesdk/webclient/gen/model/search_person_all_of.py +0 -148
- regula/facesdk/webclient/gen/model/search_request.py +0 -394
- regula/facesdk/webclient/gen/model/search_request_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/search_result.py +0 -150
- regula/facesdk/webclient/gen/model/search_result_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/transaction_config.py +0 -92
- regula/facesdk/webclient/gen/model/transaction_info.py +0 -344
- regula/facesdk/webclient/gen/model/update_group.py +0 -150
- regula/facesdk/webclient/gen/model_utils.py +0 -2037
- regula_facesdk_webclient-7.2.388.dev0.dist-info/RECORD +0 -138
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
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, StrictStr
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
+
from typing import Optional, Set
|
|
15
|
+
from typing_extensions import Self
|
|
16
|
+
from pydantic import SkipValidation, Field
|
|
17
|
+
|
|
18
|
+
class SearchParametersCreatePerson(BaseModel):
|
|
19
|
+
"""
|
|
20
|
+
If a person is not found, a new person entry is created using the descriptor calculated while searching.
|
|
21
|
+
""" # noqa: E501
|
|
22
|
+
name: SkipValidation[Optional[str]] = Field(alias="name", default=None, description="Person's name.")
|
|
23
|
+
metadata: SkipValidation[Optional[Dict[str, object]]] = Field(alias="metadata", default=None, description="A free-form object containing person's extended attributes.")
|
|
24
|
+
ttl: SkipValidation[Optional[int]] = Field(alias="ttl", default=None, description="The lifespan of the Person's records, seconds. Optional.")
|
|
25
|
+
__properties: ClassVar[List[str]] = ["name", "metadata", "ttl"]
|
|
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 SearchParametersCreatePerson 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 SearchParametersCreatePerson 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
|
+
"name": obj.get("name"),
|
|
81
|
+
"metadata": obj.get("metadata"),
|
|
82
|
+
"ttl": obj.get("ttl")
|
|
83
|
+
})
|
|
84
|
+
return _obj
|
|
85
|
+
|
|
86
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
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, StrictStr
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
+
from uuid import UUID
|
|
15
|
+
from regula.facesdk.webclient.gen.models.recognize_image import RecognizeImage
|
|
16
|
+
from regula.facesdk.webclient.gen.models.search_detection import SearchDetection
|
|
17
|
+
from typing import Optional, Set
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
from pydantic import SkipValidation, Field
|
|
20
|
+
|
|
21
|
+
class SearchPerson(BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
SearchPerson
|
|
24
|
+
""" # noqa: E501
|
|
25
|
+
name: SkipValidation[str] = Field(alias="name", description="Person's name.")
|
|
26
|
+
external_id: SkipValidation[Optional[str]] = Field(alias="externalId", default=None, description="Person's ID, used for linking search results to an ID in an external system. Can be set when creating a Person, stored in the database, and included in the search to return only Persons with the specified ID. Optional.")
|
|
27
|
+
metadata: SkipValidation[Optional[Dict[str, object]]] = Field(alias="metadata", default=None, description="A free-form object containing person's extended attributes.")
|
|
28
|
+
groups: SkipValidation[Optional[List[str]]] = Field(alias="groups", default=None, description="Groups a person should be placed to. If no group is specified in request, a Default group is created and the person is placed to it.")
|
|
29
|
+
expire_at: SkipValidation[Optional[str]] = Field(alias="expireAt", default=None, description="Person expiration date.")
|
|
30
|
+
id: SkipValidation[Optional[str]] = Field(alias="id", default=None, description="Person ID. The list of persons is sorted by decreasing ID value.")
|
|
31
|
+
created_at: SkipValidation[Optional[str]] = Field(alias="createdAt", default=None, description="Person creation date.")
|
|
32
|
+
updated_at: SkipValidation[Optional[str]] = Field(alias="updatedAt", default=None, description="Person update date.")
|
|
33
|
+
detection: SkipValidation[Optional[SearchDetection]] = Field(alias="detection", default=None)
|
|
34
|
+
images: SkipValidation[Optional[List[RecognizeImage]]] = Field(alias="images", default=None, description="Array of Person images.")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "externalId", "metadata", "groups", "expireAt", "id", "createdAt", "updatedAt", "detection", "images"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
arbitrary_types_allowed=True,
|
|
42
|
+
use_enum_values=True
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of SearchPerson from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of detection
|
|
79
|
+
if self.detection:
|
|
80
|
+
_dict['detection'] = self.detection.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in images (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.images:
|
|
84
|
+
for _item_images in self.images:
|
|
85
|
+
if _item_images:
|
|
86
|
+
_items.append(_item_images.to_dict())
|
|
87
|
+
_dict['images'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of SearchPerson from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"name": obj.get("name"),
|
|
101
|
+
"externalId": obj.get("externalId"),
|
|
102
|
+
"metadata": obj.get("metadata"),
|
|
103
|
+
"groups": obj.get("groups"),
|
|
104
|
+
"expireAt": obj.get("expireAt"),
|
|
105
|
+
"id": obj.get("id"),
|
|
106
|
+
"createdAt": obj.get("createdAt"),
|
|
107
|
+
"updatedAt": obj.get("updatedAt"),
|
|
108
|
+
"detection": SearchDetection.from_dict(obj["detection"]) if obj.get("detection") is not None else None,
|
|
109
|
+
"images": [RecognizeImage.from_dict(_item) for _item in obj.get("images", []) if RecognizeImage.from_dict(_item) is not None]
|
|
110
|
+
})
|
|
111
|
+
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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, Optional
|
|
14
|
+
from regula.facesdk.webclient.gen.models.recognize_image import RecognizeImage
|
|
15
|
+
from regula.facesdk.webclient.gen.models.search_detection import SearchDetection
|
|
16
|
+
from typing import Optional, Set
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
from pydantic import SkipValidation, Field
|
|
19
|
+
|
|
20
|
+
class SearchPersonData(BaseModel):
|
|
21
|
+
"""
|
|
22
|
+
SearchPersonData
|
|
23
|
+
""" # noqa: E501
|
|
24
|
+
detection: SkipValidation[Optional[SearchDetection]] = Field(alias="detection", default=None)
|
|
25
|
+
images: SkipValidation[Optional[List[RecognizeImage]]] = Field(alias="images", default=None, description="Array of Person images.")
|
|
26
|
+
__properties: ClassVar[List[str]] = ["detection", "images"]
|
|
27
|
+
|
|
28
|
+
model_config = ConfigDict(
|
|
29
|
+
populate_by_name=True,
|
|
30
|
+
validate_assignment=True,
|
|
31
|
+
protected_namespaces=(),
|
|
32
|
+
arbitrary_types_allowed=True,
|
|
33
|
+
use_enum_values=True
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def to_str(self) -> str:
|
|
38
|
+
"""Returns the string representation of the model using alias"""
|
|
39
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
40
|
+
|
|
41
|
+
def to_json(self) -> str:
|
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
|
43
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
48
|
+
"""Create an instance of SearchPersonData from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
52
|
+
"""Return the dictionary representation of the model using alias.
|
|
53
|
+
|
|
54
|
+
This has the following differences from calling pydantic's
|
|
55
|
+
`self.model_dump(by_alias=True)`:
|
|
56
|
+
|
|
57
|
+
* `None` is only added to the output dict for nullable fields that
|
|
58
|
+
were set at model initialization. Other fields with value `None`
|
|
59
|
+
are ignored.
|
|
60
|
+
"""
|
|
61
|
+
excluded_fields: Set[str] = set([
|
|
62
|
+
])
|
|
63
|
+
|
|
64
|
+
_dict = self.model_dump(
|
|
65
|
+
by_alias=True,
|
|
66
|
+
exclude=excluded_fields,
|
|
67
|
+
exclude_none=True,
|
|
68
|
+
)
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of detection
|
|
70
|
+
if self.detection:
|
|
71
|
+
_dict['detection'] = self.detection.to_dict()
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in images (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.images:
|
|
75
|
+
for _item_images in self.images:
|
|
76
|
+
if _item_images:
|
|
77
|
+
_items.append(_item_images.to_dict())
|
|
78
|
+
_dict['images'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of SearchPersonData from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"detection": SearchDetection.from_dict(obj["detection"]) if obj.get("detection") is not None else None,
|
|
92
|
+
"images": [RecognizeImage.from_dict(_item) for _item in obj.get("images", []) if RecognizeImage.from_dict(_item) is not None]
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,119 @@
|
|
|
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, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
14
|
+
from uuid import UUID
|
|
15
|
+
from regula.facesdk.webclient.gen.models.filter_search_request import FilterSearchRequest
|
|
16
|
+
from regula.facesdk.webclient.gen.models.image_fields_image import ImageFieldsImage
|
|
17
|
+
from regula.facesdk.webclient.gen.models.output_image_params import OutputImageParams
|
|
18
|
+
from regula.facesdk.webclient.gen.models.search_parameters_create_person import SearchParametersCreatePerson
|
|
19
|
+
from typing import Optional, Set
|
|
20
|
+
from typing_extensions import Self
|
|
21
|
+
from pydantic import SkipValidation, Field
|
|
22
|
+
|
|
23
|
+
class SearchRequest(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
SearchRequest
|
|
26
|
+
""" # noqa: E501
|
|
27
|
+
tenant: SkipValidation[Optional[str]] = Field(alias="tenant", default=None, description="A label used to group transactions by customers, applications, or other criteria.")
|
|
28
|
+
env: SkipValidation[Optional[str]] = Field(alias="env", default=None, description="A label used to differentiate transactions by development stages.")
|
|
29
|
+
create_person: SkipValidation[Optional[SearchParametersCreatePerson]] = Field(alias="createPerson", default=None)
|
|
30
|
+
group_ids: SkipValidation[Optional[List[str]]] = Field(alias="groupIds", default=None, description="IDs of the groups in which the search is performed.")
|
|
31
|
+
filter: SkipValidation[Optional[FilterSearchRequest]] = Field(alias="filter", default=None)
|
|
32
|
+
tag: SkipValidation[Optional[str]] = Field(alias="tag", default=None, description="Session identificator, should be unique for each session.")
|
|
33
|
+
image: SkipValidation[Optional[ImageFieldsImage]] = Field(alias="image", default=None)
|
|
34
|
+
output_image_params: SkipValidation[Optional[OutputImageParams]] = Field(alias="outputImageParams", default=None)
|
|
35
|
+
detect_all: SkipValidation[Optional[bool]] = Field(alias="detectAll", default=None, description="Whether to detect all faces in the image. If set to `false`, only the most central face is detected.")
|
|
36
|
+
threshold: SkipValidation[Optional[float]] = Field(alias="threshold", default=None, description="The similarity threshold.")
|
|
37
|
+
limit: SkipValidation[Optional[int]] = Field(alias="limit", default=None, description="The maximum number of results to be returned.")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["tenant", "env", "createPerson", "groupIds", "filter", "tag", "image", "outputImageParams", "detectAll", "threshold", "limit"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
arbitrary_types_allowed=True,
|
|
45
|
+
use_enum_values=True
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SearchRequest from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of create_person
|
|
82
|
+
if self.create_person:
|
|
83
|
+
_dict['createPerson'] = self.create_person.to_dict()
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of filter
|
|
85
|
+
if self.filter:
|
|
86
|
+
_dict['filter'] = self.filter.to_dict()
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of image
|
|
88
|
+
if self.image:
|
|
89
|
+
_dict['image'] = self.image.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of output_image_params
|
|
91
|
+
if self.output_image_params:
|
|
92
|
+
_dict['outputImageParams'] = self.output_image_params.to_dict()
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
+
"""Create an instance of SearchRequest from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return cls.model_validate(obj)
|
|
103
|
+
|
|
104
|
+
_obj = cls.model_validate({
|
|
105
|
+
"tenant": obj.get("tenant"),
|
|
106
|
+
"env": obj.get("env"),
|
|
107
|
+
"createPerson": SearchParametersCreatePerson.from_dict(obj["createPerson"]) if obj.get("createPerson") is not None else None,
|
|
108
|
+
"groupIds": obj.get("groupIds"),
|
|
109
|
+
"filter": FilterSearchRequest.from_dict(obj["filter"]) if obj.get("filter") is not None else None,
|
|
110
|
+
"tag": obj.get("tag"),
|
|
111
|
+
"image": ImageFieldsImage.from_dict(obj["image"]) if obj.get("image") is not None else None,
|
|
112
|
+
"outputImageParams": OutputImageParams.from_dict(obj["outputImageParams"]) if obj.get("outputImageParams") is not None else None,
|
|
113
|
+
"detectAll": obj.get("detectAll") if obj.get("detectAll") is not None else False,
|
|
114
|
+
"threshold": obj.get("threshold"),
|
|
115
|
+
"limit": obj.get("limit")
|
|
116
|
+
})
|
|
117
|
+
return _obj
|
|
118
|
+
|
|
119
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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, Optional
|
|
14
|
+
from regula.facesdk.webclient.gen.models.search_person import SearchPerson
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
from pydantic import SkipValidation, Field
|
|
18
|
+
|
|
19
|
+
class SearchResult(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
SearchResult
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
code: SkipValidation[Optional[int]] = Field(alias="code", default=None, description="Result code. It is returned only with response 200.")
|
|
24
|
+
persons: SkipValidation[Optional[List[SearchPerson]]] = Field(alias="persons", default=None, description="Array of Person images. It is returned only with response 200.")
|
|
25
|
+
__properties: ClassVar[List[str]] = ["code", "persons"]
|
|
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 SearchResult 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 each item in persons (list)
|
|
69
|
+
_items = []
|
|
70
|
+
if self.persons:
|
|
71
|
+
for _item_persons in self.persons:
|
|
72
|
+
if _item_persons:
|
|
73
|
+
_items.append(_item_persons.to_dict())
|
|
74
|
+
_dict['persons'] = _items
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of SearchResult from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"code": obj.get("code"),
|
|
88
|
+
"persons": [SearchPerson.from_dict(_item) for _item in obj.get("persons", []) if SearchPerson.from_dict(_item) is not None]
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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, StrictStr
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
+
from regula.facesdk.webclient.gen.models.liveness_type import LivenessType
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
from pydantic import SkipValidation, Field
|
|
18
|
+
|
|
19
|
+
class TransactionInfo(BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
TransactionInfo
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
code: SkipValidation[Optional[int]] = Field(alias="code", default=None, description="Result code, see the [FaceSDKResultCode enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/).")
|
|
24
|
+
status: SkipValidation[Optional[int]] = Field(alias="status", default=None, description="Whether the liveness detection is confirmed `0` or not `1`.")
|
|
25
|
+
tag: SkipValidation[Optional[str]] = Field(alias="tag", default=None, description="Session identificator, should be unique for each session.")
|
|
26
|
+
transaction_id: SkipValidation[Optional[str]] = Field(alias="transactionId", default=None, description="Transaction ID, there can be several transactions within one session.")
|
|
27
|
+
video: SkipValidation[Optional[str]] = Field(alias="video", default=None, description="Link to the session video, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/)")
|
|
28
|
+
age: SkipValidation[Optional[List[Dict[str, object]]]] = Field(alias="age", default=None, description="Approximate age with an accuracy of +/-3 years.")
|
|
29
|
+
portrait: SkipValidation[Optional[str]] = Field(alias="portrait", default=None, description="Link to the portrait, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/)")
|
|
30
|
+
metadata: SkipValidation[Optional[Dict[str, object]]] = Field(alias="metadata", default=None, description="A free-form object containing person's extended attributes.")
|
|
31
|
+
type: SkipValidation[Optional[LivenessType]] = Field(alias="type", default=None)
|
|
32
|
+
__properties: ClassVar[List[str]] = ["code", "status", "tag", "transactionId", "video", "age", "portrait", "metadata", "type"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
arbitrary_types_allowed=True,
|
|
39
|
+
use_enum_values=True
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of TransactionInfo from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of TransactionInfo from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"code": obj.get("code"),
|
|
88
|
+
"status": obj.get("status"),
|
|
89
|
+
"tag": obj.get("tag"),
|
|
90
|
+
"transactionId": obj.get("transactionId"),
|
|
91
|
+
"video": obj.get("video"),
|
|
92
|
+
"age": obj.get("age"),
|
|
93
|
+
"portrait": obj.get("portrait"),
|
|
94
|
+
"metadata": obj.get("metadata"),
|
|
95
|
+
"type": obj.get("type") if obj.get("type") is not None else LivenessType.NUMBER_ACTIVE
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|