regula-facesdk-webclient 6.4.198.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.
Potentially problematic release.
This version of regula-facesdk-webclient might be problematic. Click here for more details.
- regula/__init__.py +0 -0
- regula/facesdk/__init__.py +0 -0
- regula/facesdk/webclient/__init__.py +15 -0
- regula/facesdk/webclient/ext/__init__.py +5 -0
- regula/facesdk/webclient/ext/api/__init__.py +3 -0
- regula/facesdk/webclient/ext/api/group_api.py +36 -0
- regula/facesdk/webclient/ext/api/match_api.py +46 -0
- regula/facesdk/webclient/ext/api/person_api.py +46 -0
- regula/facesdk/webclient/ext/api/sdk.py +28 -0
- regula/facesdk/webclient/ext/api/search_api.py +17 -0
- regula/facesdk/webclient/ext/common.py +7 -0
- regula/facesdk/webclient/ext/models/__init__.py +6 -0
- regula/facesdk/webclient/ext/models/detect_request.py +32 -0
- regula/facesdk/webclient/ext/models/match_image.py +19 -0
- regula/facesdk/webclient/ext/models/match_request.py +34 -0
- regula/facesdk/webclient/gen/__init__.py +27 -0
- regula/facesdk/webclient/gen/api/__init__.py +3 -0
- regula/facesdk/webclient/gen/api/diagnostics_api.py +162 -0
- regula/facesdk/webclient/gen/api/group_api.py +1040 -0
- regula/facesdk/webclient/gen/api/healthcheck_api.py +283 -0
- regula/facesdk/webclient/gen/api/liveness_2_0_api.py +168 -0
- regula/facesdk/webclient/gen/api/liveness_api.py +424 -0
- regula/facesdk/webclient/gen/api/match_api.py +463 -0
- regula/facesdk/webclient/gen/api/person_api.py +1345 -0
- regula/facesdk/webclient/gen/api/search_api.py +177 -0
- regula/facesdk/webclient/gen/api_client.py +695 -0
- regula/facesdk/webclient/gen/apis/__init__.py +22 -0
- regula/facesdk/webclient/gen/configuration.py +446 -0
- regula/facesdk/webclient/gen/exceptions.py +159 -0
- regula/facesdk/webclient/gen/model/__init__.py +5 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request.py +205 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +204 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_response.py +262 -0
- regula/facesdk/webclient/gen/model/attribute_config.py +120 -0
- regula/facesdk/webclient/gen/model/attribute_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/crop.py +208 -0
- regula/facesdk/webclient/gen/model/detect_request.py +204 -0
- regula/facesdk/webclient/gen/model/detect_request_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/detect_response.py +147 -0
- regula/facesdk/webclient/gen/model/detect_response_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/detect_result.py +231 -0
- regula/facesdk/webclient/gen/model/detection.py +258 -0
- regula/facesdk/webclient/gen/model/detection_attributes.py +148 -0
- regula/facesdk/webclient/gen/model/detection_face.py +260 -0
- regula/facesdk/webclient/gen/model/detection_quality.py +234 -0
- regula/facesdk/webclient/gen/model/device_info.py +231 -0
- regula/facesdk/webclient/gen/model/face_align_type_quality.py +109 -0
- regula/facesdk/webclient/gen/model/face_attribute.py +133 -0
- regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +109 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_quality_config_name.py +238 -0
- regula/facesdk/webclient/gen/model/face_quality_scenarios.py +121 -0
- regula/facesdk/webclient/gen/model/face_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_rectangular.py +92 -0
- regula/facesdk/webclient/gen/model/face_sdk_result.py +121 -0
- regula/facesdk/webclient/gen/model/face_sdk_result_code.py +217 -0
- regula/facesdk/webclient/gen/model/faces_response.py +286 -0
- regula/facesdk/webclient/gen/model/faces_response_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/filter_op.py +100 -0
- regula/facesdk/webclient/gen/model/filter_search_request.py +176 -0
- regula/facesdk/webclient/gen/model/group.py +206 -0
- regula/facesdk/webclient/gen/model/group_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/group_page.py +178 -0
- regula/facesdk/webclient/gen/model/group_page_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/group_response.py +150 -0
- regula/facesdk/webclient/gen/model/group_to_create.py +180 -0
- regula/facesdk/webclient/gen/model/image.py +290 -0
- regula/facesdk/webclient/gen/model/image_fields.py +258 -0
- regula/facesdk/webclient/gen/model/image_fields_image.py +204 -0
- regula/facesdk/webclient/gen/model/image_page.py +176 -0
- regula/facesdk/webclient/gen/model/image_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/image_source.py +115 -0
- regula/facesdk/webclient/gen/model/liveness_transaction.py +334 -0
- regula/facesdk/webclient/gen/model/liveness_type.py +100 -0
- regula/facesdk/webclient/gen/model/match_and_search_request.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +148 -0
- regula/facesdk/webclient/gen/model/match_and_search_response.py +233 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +176 -0
- regula/facesdk/webclient/gen/model/match_image.py +205 -0
- regula/facesdk/webclient/gen/model/match_image_detection.py +178 -0
- regula/facesdk/webclient/gen/model/match_image_result.py +316 -0
- regula/facesdk/webclient/gen/model/match_request.py +204 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params.py +148 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +212 -0
- regula/facesdk/webclient/gen/model/match_response.py +205 -0
- regula/facesdk/webclient/gen/model/match_response_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/operation_log.py +206 -0
- regula/facesdk/webclient/gen/model/output_image_params.py +146 -0
- regula/facesdk/webclient/gen/model/page.py +150 -0
- regula/facesdk/webclient/gen/model/person.py +318 -0
- regula/facesdk/webclient/gen/model/person_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/person_created_response.py +178 -0
- regula/facesdk/webclient/gen/model/person_fields.py +234 -0
- regula/facesdk/webclient/gen/model/person_to_update_fields.py +206 -0
- regula/facesdk/webclient/gen/model/person_with_images.py +346 -0
- regula/facesdk/webclient/gen/model/person_with_images_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/persons_page.py +176 -0
- regula/facesdk/webclient/gen/model/persons_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/process_param.py +226 -0
- regula/facesdk/webclient/gen/model/process_param_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/quality_config.py +154 -0
- regula/facesdk/webclient/gen/model/quality_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/quality_detail.py +234 -0
- regula/facesdk/webclient/gen/model/quality_details_groups.py +202 -0
- regula/facesdk/webclient/gen/model/quality_request.py +146 -0
- regula/facesdk/webclient/gen/model/recognize_image.py +346 -0
- regula/facesdk/webclient/gen/model/recognize_image_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/resize_options.py +178 -0
- regula/facesdk/webclient/gen/model/rgb.py +92 -0
- regula/facesdk/webclient/gen/model/search_bad_params.py +172 -0
- regula/facesdk/webclient/gen/model/search_detection.py +398 -0
- regula/facesdk/webclient/gen/model/search_parameters.py +174 -0
- regula/facesdk/webclient/gen/model/search_parameters_create_person.py +177 -0
- regula/facesdk/webclient/gen/model/search_person.py +372 -0
- regula/facesdk/webclient/gen/model/search_person_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/search_request.py +338 -0
- regula/facesdk/webclient/gen/model/search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/search_result.py +313 -0
- regula/facesdk/webclient/gen/model/search_result_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/transaction_config.py +92 -0
- regula/facesdk/webclient/gen/model/transaction_info.py +344 -0
- regula/facesdk/webclient/gen/model/update_group.py +150 -0
- regula/facesdk/webclient/gen/model_utils.py +2037 -0
- regula/facesdk/webclient/gen/models/__init__.py +96 -0
- regula/facesdk/webclient/gen/rest.py +346 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/METADATA +73 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/RECORD +133 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/WHEEL +5 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Regula Face SDK Web API
|
|
5
|
+
|
|
6
|
+
<a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 6.2.0
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import pprint
|
|
14
|
+
import re # noqa: F401
|
|
15
|
+
|
|
16
|
+
import six
|
|
17
|
+
|
|
18
|
+
from regula.facesdk.webclient.gen.configuration import Configuration
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class MatchImageDetection(object):
|
|
22
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
23
|
+
Ref: https://openapi-generator.tech
|
|
24
|
+
|
|
25
|
+
Do not edit the class manually.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
openapi_types (dict): The key is attribute name
|
|
31
|
+
and the value is attribute type.
|
|
32
|
+
attribute_map (dict): The key is attribute name
|
|
33
|
+
and the value is json key in definition.
|
|
34
|
+
"""
|
|
35
|
+
openapi_types = {
|
|
36
|
+
'faces': '[DetectionFace]',
|
|
37
|
+
'image_index': 'int',
|
|
38
|
+
'status': 'FaceSDKResultCode',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
attribute_map = {
|
|
42
|
+
'faces': 'faces',
|
|
43
|
+
'image_index': 'imageIndex',
|
|
44
|
+
'status': 'status',
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
def __init__(self, faces=None, image_index=None, status=None, local_vars_configuration=None): # noqa: E501
|
|
48
|
+
"""MatchImageDetection - a model defined in OpenAPI""" # noqa: E501
|
|
49
|
+
if local_vars_configuration is None:
|
|
50
|
+
local_vars_configuration = Configuration()
|
|
51
|
+
self.local_vars_configuration = local_vars_configuration
|
|
52
|
+
|
|
53
|
+
self._faces = None
|
|
54
|
+
self._image_index = None
|
|
55
|
+
self._status = None
|
|
56
|
+
self.discriminator = None
|
|
57
|
+
|
|
58
|
+
if faces is not None:
|
|
59
|
+
self.faces = faces
|
|
60
|
+
self.image_index = image_index
|
|
61
|
+
self.status = status
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def faces(self):
|
|
65
|
+
"""Gets the faces of this MatchImageDetection. # noqa: E501
|
|
66
|
+
|
|
67
|
+
Detected faces. # noqa: E501
|
|
68
|
+
|
|
69
|
+
:return: The faces of this MatchImageDetection. # noqa: E501
|
|
70
|
+
:rtype: [DetectionFace]
|
|
71
|
+
"""
|
|
72
|
+
return self._faces
|
|
73
|
+
|
|
74
|
+
@faces.setter
|
|
75
|
+
def faces(self, faces):
|
|
76
|
+
"""Sets the faces of this MatchImageDetection.
|
|
77
|
+
|
|
78
|
+
Detected faces. # noqa: E501
|
|
79
|
+
|
|
80
|
+
:param faces: The faces of this MatchImageDetection. # noqa: E501
|
|
81
|
+
:type faces: [DetectionFace]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
self._faces = faces
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def image_index(self):
|
|
88
|
+
"""Gets the image_index of this MatchImageDetection. # noqa: E501
|
|
89
|
+
|
|
90
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
91
|
+
|
|
92
|
+
:return: The image_index of this MatchImageDetection. # noqa: E501
|
|
93
|
+
:rtype: int
|
|
94
|
+
"""
|
|
95
|
+
return self._image_index
|
|
96
|
+
|
|
97
|
+
@image_index.setter
|
|
98
|
+
def image_index(self, image_index):
|
|
99
|
+
"""Sets the image_index of this MatchImageDetection.
|
|
100
|
+
|
|
101
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
102
|
+
|
|
103
|
+
:param image_index: The image_index of this MatchImageDetection. # noqa: E501
|
|
104
|
+
:type image_index: int
|
|
105
|
+
"""
|
|
106
|
+
if self.local_vars_configuration.client_side_validation and image_index is None: # noqa: E501
|
|
107
|
+
raise ValueError("Invalid value for `image_index`, must not be `None`") # noqa: E501
|
|
108
|
+
|
|
109
|
+
self._image_index = image_index
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def status(self):
|
|
113
|
+
"""Gets the status of this MatchImageDetection. # noqa: E501
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
:return: The status of this MatchImageDetection. # noqa: E501
|
|
117
|
+
:rtype: FaceSDKResultCode
|
|
118
|
+
"""
|
|
119
|
+
return self._status
|
|
120
|
+
|
|
121
|
+
@status.setter
|
|
122
|
+
def status(self, status):
|
|
123
|
+
"""Sets the status of this MatchImageDetection.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
:param status: The status of this MatchImageDetection. # noqa: E501
|
|
127
|
+
:type status: FaceSDKResultCode
|
|
128
|
+
"""
|
|
129
|
+
if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
|
|
130
|
+
raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
|
|
131
|
+
|
|
132
|
+
self._status = status
|
|
133
|
+
|
|
134
|
+
def to_dict(self):
|
|
135
|
+
"""Returns the model properties as a dict"""
|
|
136
|
+
result = {}
|
|
137
|
+
|
|
138
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
139
|
+
value = getattr(self, attr)
|
|
140
|
+
if isinstance(value, list):
|
|
141
|
+
result[attr] = list(map(
|
|
142
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
143
|
+
value
|
|
144
|
+
))
|
|
145
|
+
elif hasattr(value, "to_dict"):
|
|
146
|
+
result[attr] = value.to_dict()
|
|
147
|
+
elif isinstance(value, dict):
|
|
148
|
+
result[attr] = dict(map(
|
|
149
|
+
lambda item: (item[0], item[1].to_dict())
|
|
150
|
+
if hasattr(item[1], "to_dict") else item,
|
|
151
|
+
value.items()
|
|
152
|
+
))
|
|
153
|
+
else:
|
|
154
|
+
result[attr] = value
|
|
155
|
+
|
|
156
|
+
return result
|
|
157
|
+
|
|
158
|
+
def to_str(self):
|
|
159
|
+
"""Returns the string representation of the model"""
|
|
160
|
+
return pprint.pformat(self.to_dict())
|
|
161
|
+
|
|
162
|
+
def __repr__(self):
|
|
163
|
+
"""For `print` and `pprint`"""
|
|
164
|
+
return self.to_str()
|
|
165
|
+
|
|
166
|
+
def __eq__(self, other):
|
|
167
|
+
"""Returns true if both objects are equal"""
|
|
168
|
+
if not isinstance(other, MatchImageDetection):
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
return self.to_dict() == other.to_dict()
|
|
172
|
+
|
|
173
|
+
def __ne__(self, other):
|
|
174
|
+
"""Returns true if both objects are not equal"""
|
|
175
|
+
if not isinstance(other, MatchImageDetection):
|
|
176
|
+
return True
|
|
177
|
+
|
|
178
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Regula Face SDK Web API
|
|
5
|
+
|
|
6
|
+
<a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 6.2.0
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import pprint
|
|
14
|
+
import re # noqa: F401
|
|
15
|
+
|
|
16
|
+
import six
|
|
17
|
+
|
|
18
|
+
from regula.facesdk.webclient.gen.configuration import Configuration
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class MatchImageResult(object):
|
|
22
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
23
|
+
Ref: https://openapi-generator.tech
|
|
24
|
+
|
|
25
|
+
Do not edit the class manually.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
openapi_types (dict): The key is attribute name
|
|
31
|
+
and the value is attribute type.
|
|
32
|
+
attribute_map (dict): The key is attribute name
|
|
33
|
+
and the value is json key in definition.
|
|
34
|
+
"""
|
|
35
|
+
openapi_types = {
|
|
36
|
+
'first_index': 'int',
|
|
37
|
+
'first_face_index': 'float',
|
|
38
|
+
'first': 'ImageSource',
|
|
39
|
+
'second_index': 'int',
|
|
40
|
+
'second_face_index': 'float',
|
|
41
|
+
'second': 'ImageSource',
|
|
42
|
+
'score': 'float',
|
|
43
|
+
'similarity': 'float',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
'first_index': 'firstIndex',
|
|
48
|
+
'first_face_index': 'firstFaceIndex',
|
|
49
|
+
'first': 'first',
|
|
50
|
+
'second_index': 'secondIndex',
|
|
51
|
+
'second_face_index': 'secondFaceIndex',
|
|
52
|
+
'second': 'second',
|
|
53
|
+
'score': 'score',
|
|
54
|
+
'similarity': 'similarity',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self, first_index=None, first_face_index=None, first=None, second_index=None, second_face_index=None, second=None, score=None, similarity=None, local_vars_configuration=None): # noqa: E501
|
|
58
|
+
"""MatchImageResult - a model defined in OpenAPI""" # noqa: E501
|
|
59
|
+
if local_vars_configuration is None:
|
|
60
|
+
local_vars_configuration = Configuration()
|
|
61
|
+
self.local_vars_configuration = local_vars_configuration
|
|
62
|
+
|
|
63
|
+
self._first_index = None
|
|
64
|
+
self._first_face_index = None
|
|
65
|
+
self._first = None
|
|
66
|
+
self._second_index = None
|
|
67
|
+
self._second_face_index = None
|
|
68
|
+
self._second = None
|
|
69
|
+
self._score = None
|
|
70
|
+
self._similarity = None
|
|
71
|
+
self.discriminator = None
|
|
72
|
+
|
|
73
|
+
self.first_index = first_index
|
|
74
|
+
if first_face_index is not None:
|
|
75
|
+
self.first_face_index = first_face_index
|
|
76
|
+
if first is not None:
|
|
77
|
+
self.first = first
|
|
78
|
+
self.second_index = second_index
|
|
79
|
+
if second_face_index is not None:
|
|
80
|
+
self.second_face_index = second_face_index
|
|
81
|
+
if second is not None:
|
|
82
|
+
self.second = second
|
|
83
|
+
if score is not None:
|
|
84
|
+
self.score = score
|
|
85
|
+
if similarity is not None:
|
|
86
|
+
self.similarity = similarity
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def first_index(self):
|
|
90
|
+
"""Gets the first_index of this MatchImageResult. # noqa: E501
|
|
91
|
+
|
|
92
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
93
|
+
|
|
94
|
+
:return: The first_index of this MatchImageResult. # noqa: E501
|
|
95
|
+
:rtype: int
|
|
96
|
+
"""
|
|
97
|
+
return self._first_index
|
|
98
|
+
|
|
99
|
+
@first_index.setter
|
|
100
|
+
def first_index(self, first_index):
|
|
101
|
+
"""Sets the first_index of this MatchImageResult.
|
|
102
|
+
|
|
103
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
104
|
+
|
|
105
|
+
:param first_index: The first_index of this MatchImageResult. # noqa: E501
|
|
106
|
+
:type first_index: int
|
|
107
|
+
"""
|
|
108
|
+
if self.local_vars_configuration.client_side_validation and first_index is None: # noqa: E501
|
|
109
|
+
raise ValueError("Invalid value for `first_index`, must not be `None`") # noqa: E501
|
|
110
|
+
|
|
111
|
+
self._first_index = first_index
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def first_face_index(self):
|
|
115
|
+
"""Gets the first_face_index of this MatchImageResult. # noqa: E501
|
|
116
|
+
|
|
117
|
+
The detected face index number. # noqa: E501
|
|
118
|
+
|
|
119
|
+
:return: The first_face_index of this MatchImageResult. # noqa: E501
|
|
120
|
+
:rtype: float
|
|
121
|
+
"""
|
|
122
|
+
return self._first_face_index
|
|
123
|
+
|
|
124
|
+
@first_face_index.setter
|
|
125
|
+
def first_face_index(self, first_face_index):
|
|
126
|
+
"""Sets the first_face_index of this MatchImageResult.
|
|
127
|
+
|
|
128
|
+
The detected face index number. # noqa: E501
|
|
129
|
+
|
|
130
|
+
:param first_face_index: The first_face_index of this MatchImageResult. # noqa: E501
|
|
131
|
+
:type first_face_index: float
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
self._first_face_index = first_face_index
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def first(self):
|
|
138
|
+
"""Gets the first of this MatchImageResult. # noqa: E501
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
:return: The first of this MatchImageResult. # noqa: E501
|
|
142
|
+
:rtype: ImageSource
|
|
143
|
+
"""
|
|
144
|
+
return self._first
|
|
145
|
+
|
|
146
|
+
@first.setter
|
|
147
|
+
def first(self, first):
|
|
148
|
+
"""Sets the first of this MatchImageResult.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:param first: The first of this MatchImageResult. # noqa: E501
|
|
152
|
+
:type first: ImageSource
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
self._first = first
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def second_index(self):
|
|
159
|
+
"""Gets the second_index of this MatchImageResult. # noqa: E501
|
|
160
|
+
|
|
161
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
162
|
+
|
|
163
|
+
:return: The second_index of this MatchImageResult. # noqa: E501
|
|
164
|
+
:rtype: int
|
|
165
|
+
"""
|
|
166
|
+
return self._second_index
|
|
167
|
+
|
|
168
|
+
@second_index.setter
|
|
169
|
+
def second_index(self, second_index):
|
|
170
|
+
"""Sets the second_index of this MatchImageResult.
|
|
171
|
+
|
|
172
|
+
The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated. # noqa: E501
|
|
173
|
+
|
|
174
|
+
:param second_index: The second_index of this MatchImageResult. # noqa: E501
|
|
175
|
+
:type second_index: int
|
|
176
|
+
"""
|
|
177
|
+
if self.local_vars_configuration.client_side_validation and second_index is None: # noqa: E501
|
|
178
|
+
raise ValueError("Invalid value for `second_index`, must not be `None`") # noqa: E501
|
|
179
|
+
|
|
180
|
+
self._second_index = second_index
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def second_face_index(self):
|
|
184
|
+
"""Gets the second_face_index of this MatchImageResult. # noqa: E501
|
|
185
|
+
|
|
186
|
+
The detected face index number. # noqa: E501
|
|
187
|
+
|
|
188
|
+
:return: The second_face_index of this MatchImageResult. # noqa: E501
|
|
189
|
+
:rtype: float
|
|
190
|
+
"""
|
|
191
|
+
return self._second_face_index
|
|
192
|
+
|
|
193
|
+
@second_face_index.setter
|
|
194
|
+
def second_face_index(self, second_face_index):
|
|
195
|
+
"""Sets the second_face_index of this MatchImageResult.
|
|
196
|
+
|
|
197
|
+
The detected face index number. # noqa: E501
|
|
198
|
+
|
|
199
|
+
:param second_face_index: The second_face_index of this MatchImageResult. # noqa: E501
|
|
200
|
+
:type second_face_index: float
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
self._second_face_index = second_face_index
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def second(self):
|
|
207
|
+
"""Gets the second of this MatchImageResult. # noqa: E501
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
:return: The second of this MatchImageResult. # noqa: E501
|
|
211
|
+
:rtype: ImageSource
|
|
212
|
+
"""
|
|
213
|
+
return self._second
|
|
214
|
+
|
|
215
|
+
@second.setter
|
|
216
|
+
def second(self, second):
|
|
217
|
+
"""Sets the second of this MatchImageResult.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
:param second: The second of this MatchImageResult. # noqa: E501
|
|
221
|
+
:type second: ImageSource
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
self._second = second
|
|
225
|
+
|
|
226
|
+
@property
|
|
227
|
+
def score(self):
|
|
228
|
+
"""Gets the score of this MatchImageResult. # noqa: E501
|
|
229
|
+
|
|
230
|
+
A dimensionless number that shows how similar the compared faces are. 0—absolutely identical faces. # noqa: E501
|
|
231
|
+
|
|
232
|
+
:return: The score of this MatchImageResult. # noqa: E501
|
|
233
|
+
:rtype: float
|
|
234
|
+
"""
|
|
235
|
+
return self._score
|
|
236
|
+
|
|
237
|
+
@score.setter
|
|
238
|
+
def score(self, score):
|
|
239
|
+
"""Sets the score of this MatchImageResult.
|
|
240
|
+
|
|
241
|
+
A dimensionless number that shows how similar the compared faces are. 0—absolutely identical faces. # noqa: E501
|
|
242
|
+
|
|
243
|
+
:param score: The score of this MatchImageResult. # noqa: E501
|
|
244
|
+
:type score: float
|
|
245
|
+
"""
|
|
246
|
+
|
|
247
|
+
self._score = score
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def similarity(self):
|
|
251
|
+
"""Gets the similarity of this MatchImageResult. # noqa: E501
|
|
252
|
+
|
|
253
|
+
The detected faces similarity, %. 100%—absolutely identical faces, 0%—absolutely not identical. # noqa: E501
|
|
254
|
+
|
|
255
|
+
:return: The similarity of this MatchImageResult. # noqa: E501
|
|
256
|
+
:rtype: float
|
|
257
|
+
"""
|
|
258
|
+
return self._similarity
|
|
259
|
+
|
|
260
|
+
@similarity.setter
|
|
261
|
+
def similarity(self, similarity):
|
|
262
|
+
"""Sets the similarity of this MatchImageResult.
|
|
263
|
+
|
|
264
|
+
The detected faces similarity, %. 100%—absolutely identical faces, 0%—absolutely not identical. # noqa: E501
|
|
265
|
+
|
|
266
|
+
:param similarity: The similarity of this MatchImageResult. # noqa: E501
|
|
267
|
+
:type similarity: float
|
|
268
|
+
"""
|
|
269
|
+
|
|
270
|
+
self._similarity = similarity
|
|
271
|
+
|
|
272
|
+
def to_dict(self):
|
|
273
|
+
"""Returns the model properties as a dict"""
|
|
274
|
+
result = {}
|
|
275
|
+
|
|
276
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
277
|
+
value = getattr(self, attr)
|
|
278
|
+
if isinstance(value, list):
|
|
279
|
+
result[attr] = list(map(
|
|
280
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
281
|
+
value
|
|
282
|
+
))
|
|
283
|
+
elif hasattr(value, "to_dict"):
|
|
284
|
+
result[attr] = value.to_dict()
|
|
285
|
+
elif isinstance(value, dict):
|
|
286
|
+
result[attr] = dict(map(
|
|
287
|
+
lambda item: (item[0], item[1].to_dict())
|
|
288
|
+
if hasattr(item[1], "to_dict") else item,
|
|
289
|
+
value.items()
|
|
290
|
+
))
|
|
291
|
+
else:
|
|
292
|
+
result[attr] = value
|
|
293
|
+
|
|
294
|
+
return result
|
|
295
|
+
|
|
296
|
+
def to_str(self):
|
|
297
|
+
"""Returns the string representation of the model"""
|
|
298
|
+
return pprint.pformat(self.to_dict())
|
|
299
|
+
|
|
300
|
+
def __repr__(self):
|
|
301
|
+
"""For `print` and `pprint`"""
|
|
302
|
+
return self.to_str()
|
|
303
|
+
|
|
304
|
+
def __eq__(self, other):
|
|
305
|
+
"""Returns true if both objects are equal"""
|
|
306
|
+
if not isinstance(other, MatchImageResult):
|
|
307
|
+
return False
|
|
308
|
+
|
|
309
|
+
return self.to_dict() == other.to_dict()
|
|
310
|
+
|
|
311
|
+
def __ne__(self, other):
|
|
312
|
+
"""Returns true if both objects are not equal"""
|
|
313
|
+
if not isinstance(other, MatchImageResult):
|
|
314
|
+
return True
|
|
315
|
+
|
|
316
|
+
return self.to_dict() != other.to_dict()
|