diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d01b11d..69522b4 100755 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,11 +3,13 @@ regula/documentreader/__init__.py regula/documentreader/webclient/gen/__init__.py regula/documentreader/webclient/gen/api/__init__.py regula/documentreader/webclient/gen/api/default_api.py +regula/documentreader/webclient/gen/api/process_api.py regula/documentreader/webclient/gen/api_client.py regula/documentreader/webclient/gen/configuration.py regula/documentreader/webclient/gen/exceptions.py regula/documentreader/webclient/gen/models/__init__.py regula/documentreader/webclient/gen/models/check_result.py +regula/documentreader/webclient/gen/models/chosen_document_type.py regula/documentreader/webclient/gen/models/chosen_document_type_result.py regula/documentreader/webclient/gen/models/chosen_document_type_result_all_of.py regula/documentreader/webclient/gen/models/cross_source_value_comparison.py @@ -17,10 +19,12 @@ regula/documentreader/webclient/gen/models/device_info.py regula/documentreader/webclient/gen/models/doc_visual_extended_field.py regula/documentreader/webclient/gen/models/doc_visual_extended_info.py regula/documentreader/webclient/gen/models/document_format.py +regula/documentreader/webclient/gen/models/document_image.py regula/documentreader/webclient/gen/models/document_image_result.py regula/documentreader/webclient/gen/models/document_image_result_all_of.py regula/documentreader/webclient/gen/models/document_type.py regula/documentreader/webclient/gen/models/document_type_recognition_result.py +regula/documentreader/webclient/gen/models/document_types_candidates.py regula/documentreader/webclient/gen/models/document_types_candidates_list.py regula/documentreader/webclient/gen/models/document_types_candidates_result.py regula/documentreader/webclient/gen/models/document_types_candidates_result_all_of.py @@ -31,6 +35,7 @@ regula/documentreader/webclient/gen/models/graphic_fields_list.py regula/documentreader/webclient/gen/models/graphics_result.py regula/documentreader/webclient/gen/models/graphics_result_all_of.py regula/documentreader/webclient/gen/models/image_data.py +regula/documentreader/webclient/gen/models/image_qa.py regula/documentreader/webclient/gen/models/images.py regula/documentreader/webclient/gen/models/images_available_source.py regula/documentreader/webclient/gen/models/images_field.py diff --git a/regula/documentreader/webclient/ext/api/document_reader_api.py b/regula/documentreader/webclient/ext/api/document_reader_api.py index 4b36c3d..caacefa 100755 --- a/regula/documentreader/webclient/ext/api/document_reader_api.py +++ b/regula/documentreader/webclient/ext/api/document_reader_api.py @@ -4,14 +4,14 @@ from regula.documentreader.webclient import ProcessResponse from regula.documentreader.webclient.gen import ApiClient from regula.documentreader.webclient.ext.models.recognition_response import RecognitionResponse -from regula.documentreader.webclient.gen.api import DefaultApi +from regula.documentreader.webclient.gen.api import DefaultApi, ProcessApi from regula.documentreader.webclient.gen.configuration import Configuration from regula.documentreader.webclient.gen.models import ProcessRequest Base64String = str -class DocumentReaderApi(DefaultApi): +class DocumentReaderApi(DefaultApi, ProcessApi): def __init__(self, host=None, debug=False, verify_ssl=False, api_client=None): if api_client: diff --git a/regula/documentreader/webclient/gen/__init__.py b/regula/documentreader/webclient/gen/__init__.py index e936f95..709d663 100755 --- a/regula/documentreader/webclient/gen/__init__.py +++ b/regula/documentreader/webclient/gen/__init__.py @@ -12,6 +12,7 @@ # import apis into sdk package from regula.documentreader.webclient.gen.api.default_api import DefaultApi +from regula.documentreader.webclient.gen.api.process_api import ProcessApi # import ApiClient from regula.documentreader.webclient.gen.api_client import ApiClient @@ -24,6 +25,7 @@ from regula.documentreader.webclient.gen.exceptions import ApiException # import models into sdk package from regula.documentreader.webclient.gen.models.check_result import CheckResult +from regula.documentreader.webclient.gen.models.chosen_document_type import ChosenDocumentType from regula.documentreader.webclient.gen.models.chosen_document_type_result import ChosenDocumentTypeResult from regula.documentreader.webclient.gen.models.chosen_document_type_result_all_of import ChosenDocumentTypeResultAllOf from regula.documentreader.webclient.gen.models.container_list import ContainerList @@ -34,10 +36,12 @@ from regula.documentreader.webclient.gen.models.doc_visual_extended_field import DocVisualExtendedField from regula.documentreader.webclient.gen.models.doc_visual_extended_info import DocVisualExtendedInfo from regula.documentreader.webclient.gen.models.document_format import DocumentFormat +from regula.documentreader.webclient.gen.models.document_image import DocumentImage from regula.documentreader.webclient.gen.models.document_image_result import DocumentImageResult from regula.documentreader.webclient.gen.models.document_image_result_all_of import DocumentImageResultAllOf from regula.documentreader.webclient.gen.models.document_type import DocumentType from regula.documentreader.webclient.gen.models.document_type_recognition_result import DocumentTypeRecognitionResult +from regula.documentreader.webclient.gen.models.document_types_candidates import DocumentTypesCandidates from regula.documentreader.webclient.gen.models.document_types_candidates_list import DocumentTypesCandidatesList from regula.documentreader.webclient.gen.models.document_types_candidates_result import DocumentTypesCandidatesResult from regula.documentreader.webclient.gen.models.document_types_candidates_result_all_of import DocumentTypesCandidatesResultAllOf @@ -48,6 +52,7 @@ from regula.documentreader.webclient.gen.models.graphics_result import GraphicsResult from regula.documentreader.webclient.gen.models.graphics_result_all_of import GraphicsResultAllOf from regula.documentreader.webclient.gen.models.image_data import ImageData +from regula.documentreader.webclient.gen.models.image_qa import ImageQA from regula.documentreader.webclient.gen.models.images import Images from regula.documentreader.webclient.gen.models.images_available_source import ImagesAvailableSource from regula.documentreader.webclient.gen.models.images_field import ImagesField diff --git a/regula/documentreader/webclient/gen/api/__init__.py b/regula/documentreader/webclient/gen/api/__init__.py index db53517..327821e 100755 --- a/regula/documentreader/webclient/gen/api/__init__.py +++ b/regula/documentreader/webclient/gen/api/__init__.py @@ -4,3 +4,4 @@ # import apis into api package from regula.documentreader.webclient.gen.api.default_api import DefaultApi +from regula.documentreader.webclient.gen.api.process_api import ProcessApi diff --git a/regula/documentreader/webclient/gen/api/default_api.py b/regula/documentreader/webclient/gen/api/default_api.py index 589511a..559575e 100755 --- a/regula/documentreader/webclient/gen/api/default_api.py +++ b/regula/documentreader/webclient/gen/api/default_api.py @@ -30,145 +30,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def api_process(self, process_request, **kwargs): # noqa: E501 - """Process list of documents images and return extracted data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_process(process_request, async_req=True) - >>> result = thread.get() - - :param process_request: (required) - :type process_request: ProcessRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ProcessResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_process_with_http_info(process_request, **kwargs) # noqa: E501 - - def api_process_with_http_info(self, process_request, **kwargs): # noqa: E501 - """Process list of documents images and return extracted data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_process_with_http_info(process_request, async_req=True) - >>> result = thread.get() - - :param process_request: (required) - :type process_request: ProcessRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'process_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_process" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'process_request' is set - if self.api_client.client_side_validation and ('process_request' not in local_var_params or # noqa: E501 - local_var_params['process_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `process_request` when calling `api_process`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'process_request' in local_var_params: - body_params = local_var_params['process_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "ProcessResponse", - 400: None, - 403: None, - } - - return self.api_client.call_api( - '/api/process', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - def ping(self, **kwargs): # noqa: E501 """Server health check # noqa: E501 diff --git a/regula/documentreader/webclient/gen/api/process_api.py b/regula/documentreader/webclient/gen/api/process_api.py new file mode 100644 index 0000000..0c89553 --- /dev/null +++ b/regula/documentreader/webclient/gen/api/process_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from regula.documentreader.webclient.gen.api_client import ApiClient +from regula.documentreader.webclient.gen.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ProcessApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def api_process(self, process_request, **kwargs): # noqa: E501 + """Process list of documents images and return extracted data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_process(process_request, async_req=True) + >>> result = thread.get() + + :param process_request: (required) + :type process_request: ProcessRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ProcessResponse + """ + kwargs['_return_http_data_only'] = True + return self.api_process_with_http_info(process_request, **kwargs) # noqa: E501 + + def api_process_with_http_info(self, process_request, **kwargs): # noqa: E501 + """Process list of documents images and return extracted data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_process_with_http_info(process_request, async_req=True) + >>> result = thread.get() + + :param process_request: (required) + :type process_request: ProcessRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'process_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api_process" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'process_request' is set + if self.api_client.client_side_validation and ('process_request' not in local_var_params or # noqa: E501 + local_var_params['process_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `process_request` when calling `api_process`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'process_request' in local_var_params: + body_params = local_var_params['process_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + response_types_map = { + 200: "ProcessResponse", + 400: None, + 403: None, + } + + return self.api_client.call_api( + '/api/process', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/regula/documentreader/webclient/gen/configuration.py b/regula/documentreader/webclient/gen/configuration.py index 4e23b36..f0117c7 100755 --- a/regula/documentreader/webclient/gen/configuration.py +++ b/regula/documentreader/webclient/gen/configuration.py @@ -374,7 +374,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 5.2.0\n"\ + "Version of the API: 5.4.0\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/regula/documentreader/webclient/gen/models/__init__.py b/regula/documentreader/webclient/gen/models/__init__.py index 4b5dc44..65557ea 100755 --- a/regula/documentreader/webclient/gen/models/__init__.py +++ b/regula/documentreader/webclient/gen/models/__init__.py @@ -9,6 +9,7 @@ # import models into model package from regula.documentreader.webclient.gen.models.check_result import CheckResult +from regula.documentreader.webclient.gen.models.chosen_document_type import ChosenDocumentType from regula.documentreader.webclient.gen.models.chosen_document_type_result import ChosenDocumentTypeResult from regula.documentreader.webclient.gen.models.chosen_document_type_result_all_of import ChosenDocumentTypeResultAllOf from regula.documentreader.webclient.gen.models.container_list import ContainerList @@ -19,10 +20,12 @@ from regula.documentreader.webclient.gen.models.doc_visual_extended_field import DocVisualExtendedField from regula.documentreader.webclient.gen.models.doc_visual_extended_info import DocVisualExtendedInfo from regula.documentreader.webclient.gen.models.document_format import DocumentFormat +from regula.documentreader.webclient.gen.models.document_image import DocumentImage from regula.documentreader.webclient.gen.models.document_image_result import DocumentImageResult from regula.documentreader.webclient.gen.models.document_image_result_all_of import DocumentImageResultAllOf from regula.documentreader.webclient.gen.models.document_type import DocumentType from regula.documentreader.webclient.gen.models.document_type_recognition_result import DocumentTypeRecognitionResult +from regula.documentreader.webclient.gen.models.document_types_candidates import DocumentTypesCandidates from regula.documentreader.webclient.gen.models.document_types_candidates_list import DocumentTypesCandidatesList from regula.documentreader.webclient.gen.models.document_types_candidates_result import DocumentTypesCandidatesResult from regula.documentreader.webclient.gen.models.document_types_candidates_result_all_of import DocumentTypesCandidatesResultAllOf @@ -33,6 +36,7 @@ from regula.documentreader.webclient.gen.models.graphics_result import GraphicsResult from regula.documentreader.webclient.gen.models.graphics_result_all_of import GraphicsResultAllOf from regula.documentreader.webclient.gen.models.image_data import ImageData +from regula.documentreader.webclient.gen.models.image_qa import ImageQA from regula.documentreader.webclient.gen.models.images import Images from regula.documentreader.webclient.gen.models.images_available_source import ImagesAvailableSource from regula.documentreader.webclient.gen.models.images_field import ImagesField diff --git a/regula/documentreader/webclient/gen/models/chosen_document_type.py b/regula/documentreader/webclient/gen/models/chosen_document_type.py new file mode 100644 index 0000000..5877f97 --- /dev/null +++ b/regula/documentreader/webclient/gen/models/chosen_document_type.py @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +import pprint +import re # noqa: F401 + +import six + +from regula.documentreader.webclient.gen.configuration import Configuration +# this line was added to enable pycharm type hinting +from regula.documentreader.webclient.gen.models import * + + +class ChosenDocumentType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'document_name': 'str', + 'id': 'int', + 'p': 'float', + 'rfid_presence': 'RfidLocation', + 'fdsid_list': 'FDSIDList', + 'necessary_lights': 'int', + 'check_authenticity': 'int', + 'uv_exp': 'int', + 'authenticity_necessary_lights': 'int' + } + + attribute_map = { + 'document_name': 'DocumentName', + 'id': 'ID', + 'p': 'P', + 'rfid_presence': 'RFID_Presence', + 'fdsid_list': 'FDSIDList', + 'necessary_lights': 'NecessaryLights', + 'check_authenticity': 'CheckAuthenticity', + 'uv_exp': 'UVExp', + 'authenticity_necessary_lights': 'AuthenticityNecessaryLights' + } + + def __init__(self, document_name=None, id=None, p=None, rfid_presence=None, fdsid_list=None, necessary_lights=None, check_authenticity=None, uv_exp=None, authenticity_necessary_lights=None, local_vars_configuration=None): # noqa: E501 + """ChosenDocumentType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._document_name = None + self._id = None + self._p = None + self._rfid_presence = None + self._fdsid_list = None + self._necessary_lights = None + self._check_authenticity = None + self._uv_exp = None + self._authenticity_necessary_lights = None + self.discriminator = None + + if document_name is not None: + self.document_name = document_name + if id is not None: + self.id = id + if p is not None: + self.p = p + if rfid_presence is not None: + self.rfid_presence = rfid_presence + if fdsid_list is not None: + self.fdsid_list = fdsid_list + if necessary_lights is not None: + self.necessary_lights = necessary_lights + if check_authenticity is not None: + self.check_authenticity = check_authenticity + if uv_exp is not None: + self.uv_exp = uv_exp + if authenticity_necessary_lights is not None: + self.authenticity_necessary_lights = authenticity_necessary_lights + + @property + def document_name(self): + """Gets the document_name of this ChosenDocumentType. # noqa: E501 + + Document name # noqa: E501 + + :return: The document_name of this ChosenDocumentType. # noqa: E501 + :rtype: str + """ + return self._document_name + + @document_name.setter + def document_name(self, document_name): + """Sets the document_name of this ChosenDocumentType. + + Document name # noqa: E501 + + :param document_name: The document_name of this ChosenDocumentType. # noqa: E501 + :type document_name: str + """ + + self._document_name = document_name + + @property + def id(self): + """Gets the id of this ChosenDocumentType. # noqa: E501 + + Unique document type template identifier (Regula's internal numeric code) # noqa: E501 + + :return: The id of this ChosenDocumentType. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ChosenDocumentType. + + Unique document type template identifier (Regula's internal numeric code) # noqa: E501 + + :param id: The id of this ChosenDocumentType. # noqa: E501 + :type id: int + """ + + self._id = id + + @property + def p(self): + """Gets the p of this ChosenDocumentType. # noqa: E501 + + A measure of the likelihood of correct recognition in the analysis of this type of document # noqa: E501 + + :return: The p of this ChosenDocumentType. # noqa: E501 + :rtype: float + """ + return self._p + + @p.setter + def p(self, p): + """Sets the p of this ChosenDocumentType. + + A measure of the likelihood of correct recognition in the analysis of this type of document # noqa: E501 + + :param p: The p of this ChosenDocumentType. # noqa: E501 + :type p: float + """ + if (self.local_vars_configuration.client_side_validation and + p is not None and p > 1): # noqa: E501 + raise ValueError("Invalid value for `p`, must be a value less than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + p is not None and p < 0): # noqa: E501 + raise ValueError("Invalid value for `p`, must be a value greater than or equal to `0`") # noqa: E501 + + self._p = p + + @property + def rfid_presence(self): + """Gets the rfid_presence of this ChosenDocumentType. # noqa: E501 + + + :return: The rfid_presence of this ChosenDocumentType. # noqa: E501 + :rtype: RfidLocation + """ + return self._rfid_presence + + @rfid_presence.setter + def rfid_presence(self, rfid_presence): + """Sets the rfid_presence of this ChosenDocumentType. + + + :param rfid_presence: The rfid_presence of this ChosenDocumentType. # noqa: E501 + :type rfid_presence: RfidLocation + """ + + self._rfid_presence = rfid_presence + + @property + def fdsid_list(self): + """Gets the fdsid_list of this ChosenDocumentType. # noqa: E501 + + + :return: The fdsid_list of this ChosenDocumentType. # noqa: E501 + :rtype: FDSIDList + """ + return self._fdsid_list + + @fdsid_list.setter + def fdsid_list(self, fdsid_list): + """Sets the fdsid_list of this ChosenDocumentType. + + + :param fdsid_list: The fdsid_list of this ChosenDocumentType. # noqa: E501 + :type fdsid_list: FDSIDList + """ + + self._fdsid_list = fdsid_list + + @property + def necessary_lights(self): + """Gets the necessary_lights of this ChosenDocumentType. # noqa: E501 + + Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document # noqa: E501 + + :return: The necessary_lights of this ChosenDocumentType. # noqa: E501 + :rtype: int + """ + return self._necessary_lights + + @necessary_lights.setter + def necessary_lights(self, necessary_lights): + """Sets the necessary_lights of this ChosenDocumentType. + + Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document # noqa: E501 + + :param necessary_lights: The necessary_lights of this ChosenDocumentType. # noqa: E501 + :type necessary_lights: int + """ + + self._necessary_lights = necessary_lights + + @property + def check_authenticity(self): + """Gets the check_authenticity of this ChosenDocumentType. # noqa: E501 + + Set of authentication options provided for this type of document (combination of Authenticity enum) # noqa: E501 + + :return: The check_authenticity of this ChosenDocumentType. # noqa: E501 + :rtype: int + """ + return self._check_authenticity + + @check_authenticity.setter + def check_authenticity(self, check_authenticity): + """Sets the check_authenticity of this ChosenDocumentType. + + Set of authentication options provided for this type of document (combination of Authenticity enum) # noqa: E501 + + :param check_authenticity: The check_authenticity of this ChosenDocumentType. # noqa: E501 + :type check_authenticity: int + """ + + self._check_authenticity = check_authenticity + + @property + def uv_exp(self): + """Gets the uv_exp of this ChosenDocumentType. # noqa: E501 + + The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme # noqa: E501 + + :return: The uv_exp of this ChosenDocumentType. # noqa: E501 + :rtype: int + """ + return self._uv_exp + + @uv_exp.setter + def uv_exp(self, uv_exp): + """Sets the uv_exp of this ChosenDocumentType. + + The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme # noqa: E501 + + :param uv_exp: The uv_exp of this ChosenDocumentType. # noqa: E501 + :type uv_exp: int + """ + + self._uv_exp = uv_exp + + @property + def authenticity_necessary_lights(self): + """Gets the authenticity_necessary_lights of this ChosenDocumentType. # noqa: E501 + + Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity # noqa: E501 + + :return: The authenticity_necessary_lights of this ChosenDocumentType. # noqa: E501 + :rtype: int + """ + return self._authenticity_necessary_lights + + @authenticity_necessary_lights.setter + def authenticity_necessary_lights(self, authenticity_necessary_lights): + """Sets the authenticity_necessary_lights of this ChosenDocumentType. + + Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity # noqa: E501 + + :param authenticity_necessary_lights: The authenticity_necessary_lights of this ChosenDocumentType. # noqa: E501 + :type authenticity_necessary_lights: int + """ + + self._authenticity_necessary_lights = authenticity_necessary_lights + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ChosenDocumentType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChosenDocumentType): + return True + + return self.to_dict() != other.to_dict() diff --git a/regula/documentreader/webclient/gen/models/chosen_document_type_result.py b/regula/documentreader/webclient/gen/models/chosen_document_type_result.py index fc9bf9d..2295360 100755 --- a/regula/documentreader/webclient/gen/models/chosen_document_type_result.py +++ b/regula/documentreader/webclient/gen/models/chosen_document_type_result.py @@ -29,37 +29,39 @@ class ChosenDocumentTypeResult(object): and the value is json key in definition. """ openapi_types = { + 'one_candidate': 'OneCandidate', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'one_candidate': 'OneCandidate' + 'result_type': 'int' } attribute_map = { + 'one_candidate': 'OneCandidate', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'one_candidate': 'OneCandidate' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, one_candidate=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, one_candidate=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """ChosenDocumentTypeResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._one_candidate = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._one_candidate = None self.discriminator = None + if one_candidate is not None: + self.one_candidate = one_candidate if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,8 +71,27 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - if one_candidate is not None: - self.one_candidate = one_candidate + + @property + def one_candidate(self): + """Gets the one_candidate of this ChosenDocumentTypeResult. # noqa: E501 + + + :return: The one_candidate of this ChosenDocumentTypeResult. # noqa: E501 + :rtype: OneCandidate + """ + return self._one_candidate + + @one_candidate.setter + def one_candidate(self, one_candidate): + """Sets the one_candidate of this ChosenDocumentTypeResult. + + + :param one_candidate: The one_candidate of this ChosenDocumentTypeResult. # noqa: E501 + :type one_candidate: OneCandidate + """ + + self._one_candidate = one_candidate @property def buf_length(self): @@ -181,27 +202,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def one_candidate(self): - """Gets the one_candidate of this ChosenDocumentTypeResult. # noqa: E501 - - - :return: The one_candidate of this ChosenDocumentTypeResult. # noqa: E501 - :rtype: OneCandidate - """ - return self._one_candidate - - @one_candidate.setter - def one_candidate(self, one_candidate): - """Sets the one_candidate of this ChosenDocumentTypeResult. - - - :param one_candidate: The one_candidate of this ChosenDocumentTypeResult. # noqa: E501 - :type one_candidate: OneCandidate - """ - - self._one_candidate = one_candidate - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/document_image.py b/regula/documentreader/webclient/gen/models/document_image.py new file mode 100644 index 0000000..4581458 --- /dev/null +++ b/regula/documentreader/webclient/gen/models/document_image.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +import pprint +import re # noqa: F401 + +import six + +from regula.documentreader.webclient.gen.configuration import Configuration +# this line was added to enable pycharm type hinting +from regula.documentreader.webclient.gen.models import * + + +class DocumentImage(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'image': 'str' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, local_vars_configuration=None): # noqa: E501 + """DocumentImage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._image = None + self.discriminator = None + + self.image = image + + @property + def image(self): + """Gets the image of this DocumentImage. # noqa: E501 + + Base64 encoded image # noqa: E501 + + :return: The image of this DocumentImage. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this DocumentImage. + + Base64 encoded image # noqa: E501 + + :param image: The image of this DocumentImage. # noqa: E501 + :type image: str + """ + if self.local_vars_configuration.client_side_validation and image is None: # noqa: E501 + raise ValueError("Invalid value for `image`, must not be `None`") # noqa: E501 + + self._image = image + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DocumentImage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DocumentImage): + return True + + return self.to_dict() != other.to_dict() diff --git a/regula/documentreader/webclient/gen/models/document_image_result.py b/regula/documentreader/webclient/gen/models/document_image_result.py index e7112eb..11ce353 100755 --- a/regula/documentreader/webclient/gen/models/document_image_result.py +++ b/regula/documentreader/webclient/gen/models/document_image_result.py @@ -29,37 +29,38 @@ class DocumentImageResult(object): and the value is json key in definition. """ openapi_types = { + 'raw_image_container': 'ImageData', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'raw_image_container': 'ImageData' + 'result_type': 'int' } attribute_map = { + 'raw_image_container': 'RawImageContainer', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'raw_image_container': 'RawImageContainer' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, raw_image_container=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, raw_image_container=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """DocumentImageResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._raw_image_container = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._raw_image_container = None self.discriminator = None + self.raw_image_container = raw_image_container if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,7 +70,29 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - self.raw_image_container = raw_image_container + + @property + def raw_image_container(self): + """Gets the raw_image_container of this DocumentImageResult. # noqa: E501 + + + :return: The raw_image_container of this DocumentImageResult. # noqa: E501 + :rtype: ImageData + """ + return self._raw_image_container + + @raw_image_container.setter + def raw_image_container(self, raw_image_container): + """Sets the raw_image_container of this DocumentImageResult. + + + :param raw_image_container: The raw_image_container of this DocumentImageResult. # noqa: E501 + :type raw_image_container: ImageData + """ + if self.local_vars_configuration.client_side_validation and raw_image_container is None: # noqa: E501 + raise ValueError("Invalid value for `raw_image_container`, must not be `None`") # noqa: E501 + + self._raw_image_container = raw_image_container @property def buf_length(self): @@ -180,29 +203,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def raw_image_container(self): - """Gets the raw_image_container of this DocumentImageResult. # noqa: E501 - - - :return: The raw_image_container of this DocumentImageResult. # noqa: E501 - :rtype: ImageData - """ - return self._raw_image_container - - @raw_image_container.setter - def raw_image_container(self, raw_image_container): - """Sets the raw_image_container of this DocumentImageResult. - - - :param raw_image_container: The raw_image_container of this DocumentImageResult. # noqa: E501 - :type raw_image_container: ImageData - """ - if self.local_vars_configuration.client_side_validation and raw_image_container is None: # noqa: E501 - raise ValueError("Invalid value for `raw_image_container`, must not be `None`") # noqa: E501 - - self._raw_image_container = raw_image_container - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/document_types_candidates.py b/regula/documentreader/webclient/gen/models/document_types_candidates.py new file mode 100644 index 0000000..3efe563 --- /dev/null +++ b/regula/documentreader/webclient/gen/models/document_types_candidates.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +import pprint +import re # noqa: F401 + +import six + +from regula.documentreader.webclient.gen.configuration import Configuration +# this line was added to enable pycharm type hinting +from regula.documentreader.webclient.gen.models import * + + +class DocumentTypesCandidates(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'rec_result': 'DocumentTypeRecognitionResult', + 'candidates': 'list[OneCandidate]' + } + + attribute_map = { + 'rec_result': 'RecResult', + 'candidates': 'Candidates' + } + + def __init__(self, rec_result=None, candidates=None, local_vars_configuration=None): # noqa: E501 + """DocumentTypesCandidates - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._rec_result = None + self._candidates = None + self.discriminator = None + + if rec_result is not None: + self.rec_result = rec_result + if candidates is not None: + self.candidates = candidates + + @property + def rec_result(self): + """Gets the rec_result of this DocumentTypesCandidates. # noqa: E501 + + + :return: The rec_result of this DocumentTypesCandidates. # noqa: E501 + :rtype: DocumentTypeRecognitionResult + """ + return self._rec_result + + @rec_result.setter + def rec_result(self, rec_result): + """Sets the rec_result of this DocumentTypesCandidates. + + + :param rec_result: The rec_result of this DocumentTypesCandidates. # noqa: E501 + :type rec_result: DocumentTypeRecognitionResult + """ + + self._rec_result = rec_result + + @property + def candidates(self): + """Gets the candidates of this DocumentTypesCandidates. # noqa: E501 + + + :return: The candidates of this DocumentTypesCandidates. # noqa: E501 + :rtype: list[OneCandidate] + """ + return self._candidates + + @candidates.setter + def candidates(self, candidates): + """Sets the candidates of this DocumentTypesCandidates. + + + :param candidates: The candidates of this DocumentTypesCandidates. # noqa: E501 + :type candidates: list[OneCandidate] + """ + + self._candidates = candidates + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DocumentTypesCandidates): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DocumentTypesCandidates): + return True + + return self.to_dict() != other.to_dict() diff --git a/regula/documentreader/webclient/gen/models/document_types_candidates_result.py b/regula/documentreader/webclient/gen/models/document_types_candidates_result.py index 6bbfb0d..2287efe 100755 --- a/regula/documentreader/webclient/gen/models/document_types_candidates_result.py +++ b/regula/documentreader/webclient/gen/models/document_types_candidates_result.py @@ -29,37 +29,39 @@ class DocumentTypesCandidatesResult(object): and the value is json key in definition. """ openapi_types = { + 'candidates_list': 'DocumentTypesCandidatesList', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'candidates_list': 'DocumentTypesCandidatesList' + 'result_type': 'int' } attribute_map = { + 'candidates_list': 'CandidatesList', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'candidates_list': 'CandidatesList' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, candidates_list=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, candidates_list=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """DocumentTypesCandidatesResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._candidates_list = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._candidates_list = None self.discriminator = None + if candidates_list is not None: + self.candidates_list = candidates_list if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,8 +71,27 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - if candidates_list is not None: - self.candidates_list = candidates_list + + @property + def candidates_list(self): + """Gets the candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 + + + :return: The candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 + :rtype: DocumentTypesCandidatesList + """ + return self._candidates_list + + @candidates_list.setter + def candidates_list(self, candidates_list): + """Sets the candidates_list of this DocumentTypesCandidatesResult. + + + :param candidates_list: The candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 + :type candidates_list: DocumentTypesCandidatesList + """ + + self._candidates_list = candidates_list @property def buf_length(self): @@ -181,27 +202,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def candidates_list(self): - """Gets the candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 - - - :return: The candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 - :rtype: DocumentTypesCandidatesList - """ - return self._candidates_list - - @candidates_list.setter - def candidates_list(self, candidates_list): - """Sets the candidates_list of this DocumentTypesCandidatesResult. - - - :param candidates_list: The candidates_list of this DocumentTypesCandidatesResult. # noqa: E501 - :type candidates_list: DocumentTypesCandidatesList - """ - - self._candidates_list = candidates_list - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/fdsid_list.py b/regula/documentreader/webclient/gen/models/fdsid_list.py index b1f4492..b956b71 100644 --- a/regula/documentreader/webclient/gen/models/fdsid_list.py +++ b/regula/documentreader/webclient/gen/models/fdsid_list.py @@ -29,7 +29,7 @@ class FDSIDList(object): and the value is json key in definition. """ openapi_types = { - 'icao': 'str', + 'icao_code': 'str', 'list': 'list[int]', 'd_type': 'DocumentType', 'd_format': 'DocumentFormat', @@ -42,7 +42,7 @@ class FDSIDList(object): } attribute_map = { - 'icao': 'ICAO', + 'icao_code': 'ICAOCode', 'list': 'List', 'd_type': 'dType', 'd_format': 'dFormat', @@ -54,13 +54,13 @@ class FDSIDList(object): 'd_state_name': 'dStateName' } - def __init__(self, icao=None, list=None, d_type=None, d_format=None, d_mrz=None, d_description=None, d_year=None, d_country_name=None, d_state_code=None, d_state_name=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, icao_code=None, list=None, d_type=None, d_format=None, d_mrz=None, d_description=None, d_year=None, d_country_name=None, d_state_code=None, d_state_name=None, local_vars_configuration=None): # noqa: E501 """FDSIDList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._icao = None + self._icao_code = None self._list = None self._d_type = None self._d_format = None @@ -72,8 +72,8 @@ def __init__(self, icao=None, list=None, d_type=None, d_format=None, d_mrz=None, self._d_state_name = None self.discriminator = None - if icao is not None: - self.icao = icao + if icao_code is not None: + self.icao_code = icao_code if list is not None: self.list = list if d_type is not None: @@ -94,33 +94,33 @@ def __init__(self, icao=None, list=None, d_type=None, d_format=None, d_mrz=None, self.d_state_name = d_state_name @property - def icao(self): - """Gets the icao of this FDSIDList. # noqa: E501 + def icao_code(self): + """Gets the icao_code of this FDSIDList. # noqa: E501 ICAO code of the issuing country # noqa: E501 - :return: The icao of this FDSIDList. # noqa: E501 + :return: The icao_code of this FDSIDList. # noqa: E501 :rtype: str """ - return self._icao + return self._icao_code - @icao.setter - def icao(self, icao): - """Sets the icao of this FDSIDList. + @icao_code.setter + def icao_code(self, icao_code): + """Sets the icao_code of this FDSIDList. ICAO code of the issuing country # noqa: E501 - :param icao: The icao of this FDSIDList. # noqa: E501 - :type icao: str + :param icao_code: The icao_code of this FDSIDList. # noqa: E501 + :type icao_code: str """ if (self.local_vars_configuration.client_side_validation and - icao is not None and len(icao) > 4): - raise ValueError("Invalid value for `icao`, length must be less than or equal to `4`") # noqa: E501 + icao_code is not None and len(icao_code) > 3): + raise ValueError("Invalid value for `icao_code`, length must be less than or equal to `3`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and - icao is not None and len(icao) < 4): - raise ValueError("Invalid value for `icao`, length must be greater than or equal to `4`") # noqa: E501 + icao_code is not None and len(icao_code) < 3): + raise ValueError("Invalid value for `icao_code`, length must be greater than or equal to `3`") # noqa: E501 - self._icao = icao + self._icao_code = icao_code @property def list(self): diff --git a/regula/documentreader/webclient/gen/models/graphics_result.py b/regula/documentreader/webclient/gen/models/graphics_result.py index 7b477e9..fa11fda 100755 --- a/regula/documentreader/webclient/gen/models/graphics_result.py +++ b/regula/documentreader/webclient/gen/models/graphics_result.py @@ -29,37 +29,38 @@ class GraphicsResult(object): and the value is json key in definition. """ openapi_types = { + 'doc_graphics_info': 'GraphicFieldsList', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'doc_graphics_info': 'GraphicFieldsList' + 'result_type': 'int' } attribute_map = { + 'doc_graphics_info': 'DocGraphicsInfo', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'doc_graphics_info': 'DocGraphicsInfo' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, doc_graphics_info=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, doc_graphics_info=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """GraphicsResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._doc_graphics_info = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._doc_graphics_info = None self.discriminator = None + self.doc_graphics_info = doc_graphics_info if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,7 +70,29 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - self.doc_graphics_info = doc_graphics_info + + @property + def doc_graphics_info(self): + """Gets the doc_graphics_info of this GraphicsResult. # noqa: E501 + + + :return: The doc_graphics_info of this GraphicsResult. # noqa: E501 + :rtype: GraphicFieldsList + """ + return self._doc_graphics_info + + @doc_graphics_info.setter + def doc_graphics_info(self, doc_graphics_info): + """Sets the doc_graphics_info of this GraphicsResult. + + + :param doc_graphics_info: The doc_graphics_info of this GraphicsResult. # noqa: E501 + :type doc_graphics_info: GraphicFieldsList + """ + if self.local_vars_configuration.client_side_validation and doc_graphics_info is None: # noqa: E501 + raise ValueError("Invalid value for `doc_graphics_info`, must not be `None`") # noqa: E501 + + self._doc_graphics_info = doc_graphics_info @property def buf_length(self): @@ -180,29 +203,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def doc_graphics_info(self): - """Gets the doc_graphics_info of this GraphicsResult. # noqa: E501 - - - :return: The doc_graphics_info of this GraphicsResult. # noqa: E501 - :rtype: GraphicFieldsList - """ - return self._doc_graphics_info - - @doc_graphics_info.setter - def doc_graphics_info(self, doc_graphics_info): - """Sets the doc_graphics_info of this GraphicsResult. - - - :param doc_graphics_info: The doc_graphics_info of this GraphicsResult. # noqa: E501 - :type doc_graphics_info: GraphicFieldsList - """ - if self.local_vars_configuration.client_side_validation and doc_graphics_info is None: # noqa: E501 - raise ValueError("Invalid value for `doc_graphics_info`, must not be `None`") # noqa: E501 - - self._doc_graphics_info = doc_graphics_info - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/image_qa.py b/regula/documentreader/webclient/gen/models/image_qa.py new file mode 100644 index 0000000..4550176 --- /dev/null +++ b/regula/documentreader/webclient/gen/models/image_qa.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +import pprint +import re # noqa: F401 + +import six + +from regula.documentreader.webclient.gen.configuration import Configuration +# this line was added to enable pycharm type hinting +from regula.documentreader.webclient.gen.models import * + + +class ImageQA(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'dpi_threshold': 'float', + 'angle_threshold': 'float' + } + + attribute_map = { + 'dpi_threshold': 'dpiThreshold', + 'angle_threshold': 'angleThreshold' + } + + def __init__(self, dpi_threshold=150, angle_threshold=5, local_vars_configuration=None): # noqa: E501 + """ImageQA - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._dpi_threshold = None + self._angle_threshold = None + self.discriminator = None + + if dpi_threshold is not None: + self.dpi_threshold = dpi_threshold + if angle_threshold is not None: + self.angle_threshold = angle_threshold + + @property + def dpi_threshold(self): + """Gets the dpi_threshold of this ImageQA. # noqa: E501 + + This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. # noqa: E501 + + :return: The dpi_threshold of this ImageQA. # noqa: E501 + :rtype: float + """ + return self._dpi_threshold + + @dpi_threshold.setter + def dpi_threshold(self, dpi_threshold): + """Sets the dpi_threshold of this ImageQA. + + This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. # noqa: E501 + + :param dpi_threshold: The dpi_threshold of this ImageQA. # noqa: E501 + :type dpi_threshold: float + """ + + self._dpi_threshold = dpi_threshold + + @property + def angle_threshold(self): + """Gets the angle_threshold of this ImageQA. # noqa: E501 + + This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. # noqa: E501 + + :return: The angle_threshold of this ImageQA. # noqa: E501 + :rtype: float + """ + return self._angle_threshold + + @angle_threshold.setter + def angle_threshold(self, angle_threshold): + """Sets the angle_threshold of this ImageQA. + + This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. # noqa: E501 + + :param angle_threshold: The angle_threshold of this ImageQA. # noqa: E501 + :type angle_threshold: float + """ + + self._angle_threshold = angle_threshold + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImageQA): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ImageQA): + return True + + return self.to_dict() != other.to_dict() diff --git a/regula/documentreader/webclient/gen/models/images_available_source.py b/regula/documentreader/webclient/gen/models/images_available_source.py index 57385b5..455b7db 100755 --- a/regula/documentreader/webclient/gen/models/images_available_source.py +++ b/regula/documentreader/webclient/gen/models/images_available_source.py @@ -38,7 +38,7 @@ class ImagesAvailableSource(object): 'source': 'source' } - def __init__(self, container_type=None, source=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, container_type=0, source=None, local_vars_configuration=None): # noqa: E501 """ImagesAvailableSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() diff --git a/regula/documentreader/webclient/gen/models/images_field_value.py b/regula/documentreader/webclient/gen/models/images_field_value.py index 7f6d123..f977537 100755 --- a/regula/documentreader/webclient/gen/models/images_field_value.py +++ b/regula/documentreader/webclient/gen/models/images_field_value.py @@ -50,7 +50,7 @@ class ImagesFieldValue(object): 'rfid_origin': 'rfidOrigin' } - def __init__(self, source=None, value=None, original_value=None, page_index=None, light_index=None, container_type=None, field_rect=None, rfid_origin=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, source=None, value=None, original_value=None, page_index=None, light_index=None, container_type=0, field_rect=None, rfid_origin=None, local_vars_configuration=None): # noqa: E501 """ImagesFieldValue - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() diff --git a/regula/documentreader/webclient/gen/models/images_result.py b/regula/documentreader/webclient/gen/models/images_result.py index f0bc7d1..e52f483 100755 --- a/regula/documentreader/webclient/gen/models/images_result.py +++ b/regula/documentreader/webclient/gen/models/images_result.py @@ -29,37 +29,38 @@ class ImagesResult(object): and the value is json key in definition. """ openapi_types = { + 'images': 'Images', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'images': 'Images' + 'result_type': 'int' } attribute_map = { + 'images': 'Images', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'images': 'Images' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, images=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, images=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """ImagesResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._images = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._images = None self.discriminator = None + self.images = images if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,7 +70,29 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - self.images = images + + @property + def images(self): + """Gets the images of this ImagesResult. # noqa: E501 + + + :return: The images of this ImagesResult. # noqa: E501 + :rtype: Images + """ + return self._images + + @images.setter + def images(self, images): + """Sets the images of this ImagesResult. + + + :param images: The images of this ImagesResult. # noqa: E501 + :type images: Images + """ + if self.local_vars_configuration.client_side_validation and images is None: # noqa: E501 + raise ValueError("Invalid value for `images`, must not be `None`") # noqa: E501 + + self._images = images @property def buf_length(self): @@ -180,29 +203,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def images(self): - """Gets the images of this ImagesResult. # noqa: E501 - - - :return: The images of this ImagesResult. # noqa: E501 - :rtype: Images - """ - return self._images - - @images.setter - def images(self, images): - """Sets the images of this ImagesResult. - - - :param images: The images of this ImagesResult. # noqa: E501 - :type images: Images - """ - if self.local_vars_configuration.client_side_validation and images is None: # noqa: E501 - raise ValueError("Invalid value for `images`, must not be `None`") # noqa: E501 - - self._images = images - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/lexical_analysis_result.py b/regula/documentreader/webclient/gen/models/lexical_analysis_result.py index 5db9dd9..ae53931 100755 --- a/regula/documentreader/webclient/gen/models/lexical_analysis_result.py +++ b/regula/documentreader/webclient/gen/models/lexical_analysis_result.py @@ -29,37 +29,39 @@ class LexicalAnalysisResult(object): and the value is json key in definition. """ openapi_types = { + 'list_verified_fields': 'ListVerifiedFields', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'list_verified_fields': 'ListVerifiedFields' + 'result_type': 'int' } attribute_map = { + 'list_verified_fields': 'ListVerifiedFields', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'list_verified_fields': 'ListVerifiedFields' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, list_verified_fields=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, list_verified_fields=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """LexicalAnalysisResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._list_verified_fields = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._list_verified_fields = None self.discriminator = None + if list_verified_fields is not None: + self.list_verified_fields = list_verified_fields if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,8 +71,27 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - if list_verified_fields is not None: - self.list_verified_fields = list_verified_fields + + @property + def list_verified_fields(self): + """Gets the list_verified_fields of this LexicalAnalysisResult. # noqa: E501 + + + :return: The list_verified_fields of this LexicalAnalysisResult. # noqa: E501 + :rtype: ListVerifiedFields + """ + return self._list_verified_fields + + @list_verified_fields.setter + def list_verified_fields(self, list_verified_fields): + """Sets the list_verified_fields of this LexicalAnalysisResult. + + + :param list_verified_fields: The list_verified_fields of this LexicalAnalysisResult. # noqa: E501 + :type list_verified_fields: ListVerifiedFields + """ + + self._list_verified_fields = list_verified_fields @property def buf_length(self): @@ -181,27 +202,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def list_verified_fields(self): - """Gets the list_verified_fields of this LexicalAnalysisResult. # noqa: E501 - - - :return: The list_verified_fields of this LexicalAnalysisResult. # noqa: E501 - :rtype: ListVerifiedFields - """ - return self._list_verified_fields - - @list_verified_fields.setter - def list_verified_fields(self, list_verified_fields): - """Sets the list_verified_fields of this LexicalAnalysisResult. - - - :param list_verified_fields: The list_verified_fields of this LexicalAnalysisResult. # noqa: E501 - :type list_verified_fields: ListVerifiedFields - """ - - self._list_verified_fields = list_verified_fields - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/process_params.py b/regula/documentreader/webclient/gen/models/process_params.py index e8dc669..39d6f20 100755 --- a/regula/documentreader/webclient/gen/models/process_params.py +++ b/regula/documentreader/webclient/gen/models/process_params.py @@ -38,7 +38,13 @@ class ProcessParams(object): 'already_cropped': 'bool', 'custom_params': 'dict(str, object)', 'log': 'bool', - 'force_doc_id': 'int' + 'force_doc_id': 'int', + 'match_text_field_mask': 'bool', + 'fast_doc_detect': 'bool', + 'update_ocr_validity_by_glare': 'bool', + 'generate_double_page_spread_image': 'bool', + 'check_required_text_fields': 'bool', + 'image_qa': 'ImageQA' } attribute_map = { @@ -51,10 +57,16 @@ class ProcessParams(object): 'already_cropped': 'alreadyCropped', 'custom_params': 'customParams', 'log': 'log', - 'force_doc_id': 'forceDocID' + 'force_doc_id': 'forceDocID', + 'match_text_field_mask': 'matchTextFieldMask', + 'fast_doc_detect': 'fastDocDetect', + 'update_ocr_validity_by_glare': 'updateOCRValidityByGlare', + 'generate_double_page_spread_image': 'generateDoublePageSpreadImage', + 'check_required_text_fields': 'checkRequiredTextFields', + 'image_qa': 'imageQA' } - def __init__(self, scenario=None, result_type_output=None, double_page_spread=None, field_types_filter=None, date_format=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, log=None, force_doc_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, scenario=None, result_type_output=None, double_page_spread=None, field_types_filter=None, date_format=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, log=None, force_doc_id=None, match_text_field_mask=True, fast_doc_detect=True, update_ocr_validity_by_glare=False, generate_double_page_spread_image=None, check_required_text_fields=False, image_qa=None, local_vars_configuration=None): # noqa: E501 """ProcessParams - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -70,6 +82,12 @@ def __init__(self, scenario=None, result_type_output=None, double_page_spread=No self._custom_params = None self._log = None self._force_doc_id = None + self._match_text_field_mask = None + self._fast_doc_detect = None + self._update_ocr_validity_by_glare = None + self._generate_double_page_spread_image = None + self._check_required_text_fields = None + self._image_qa = None self.discriminator = None self.scenario = scenario @@ -91,6 +109,18 @@ def __init__(self, scenario=None, result_type_output=None, double_page_spread=No self.log = log if force_doc_id is not None: self.force_doc_id = force_doc_id + if match_text_field_mask is not None: + self.match_text_field_mask = match_text_field_mask + if fast_doc_detect is not None: + self.fast_doc_detect = fast_doc_detect + if update_ocr_validity_by_glare is not None: + self.update_ocr_validity_by_glare = update_ocr_validity_by_glare + if generate_double_page_spread_image is not None: + self.generate_double_page_spread_image = generate_double_page_spread_image + if check_required_text_fields is not None: + self.check_required_text_fields = check_required_text_fields + if image_qa is not None: + self.image_qa = image_qa @property def scenario(self): @@ -322,6 +352,142 @@ def force_doc_id(self, force_doc_id): self._force_doc_id = force_doc_id + @property + def match_text_field_mask(self): + """Gets the match_text_field_mask of this ProcessParams. # noqa: E501 + + When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. # noqa: E501 + + :return: The match_text_field_mask of this ProcessParams. # noqa: E501 + :rtype: bool + """ + return self._match_text_field_mask + + @match_text_field_mask.setter + def match_text_field_mask(self, match_text_field_mask): + """Sets the match_text_field_mask of this ProcessParams. + + When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. # noqa: E501 + + :param match_text_field_mask: The match_text_field_mask of this ProcessParams. # noqa: E501 + :type match_text_field_mask: bool + """ + + self._match_text_field_mask = match_text_field_mask + + @property + def fast_doc_detect(self): + """Gets the fast_doc_detect of this ProcessParams. # noqa: E501 + + When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. # noqa: E501 + + :return: The fast_doc_detect of this ProcessParams. # noqa: E501 + :rtype: bool + """ + return self._fast_doc_detect + + @fast_doc_detect.setter + def fast_doc_detect(self, fast_doc_detect): + """Sets the fast_doc_detect of this ProcessParams. + + When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. # noqa: E501 + + :param fast_doc_detect: The fast_doc_detect of this ProcessParams. # noqa: E501 + :type fast_doc_detect: bool + """ + + self._fast_doc_detect = fast_doc_detect + + @property + def update_ocr_validity_by_glare(self): + """Gets the update_ocr_validity_by_glare of this ProcessParams. # noqa: E501 + + When enabled, fail OCR field validity, if there is a glare over the text field on the image. # noqa: E501 + + :return: The update_ocr_validity_by_glare of this ProcessParams. # noqa: E501 + :rtype: bool + """ + return self._update_ocr_validity_by_glare + + @update_ocr_validity_by_glare.setter + def update_ocr_validity_by_glare(self, update_ocr_validity_by_glare): + """Sets the update_ocr_validity_by_glare of this ProcessParams. + + When enabled, fail OCR field validity, if there is a glare over the text field on the image. # noqa: E501 + + :param update_ocr_validity_by_glare: The update_ocr_validity_by_glare of this ProcessParams. # noqa: E501 + :type update_ocr_validity_by_glare: bool + """ + + self._update_ocr_validity_by_glare = update_ocr_validity_by_glare + + @property + def generate_double_page_spread_image(self): + """Gets the generate_double_page_spread_image of this ProcessParams. # noqa: E501 + + When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. # noqa: E501 + + :return: The generate_double_page_spread_image of this ProcessParams. # noqa: E501 + :rtype: bool + """ + return self._generate_double_page_spread_image + + @generate_double_page_spread_image.setter + def generate_double_page_spread_image(self, generate_double_page_spread_image): + """Sets the generate_double_page_spread_image of this ProcessParams. + + When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. # noqa: E501 + + :param generate_double_page_spread_image: The generate_double_page_spread_image of this ProcessParams. # noqa: E501 + :type generate_double_page_spread_image: bool + """ + + self._generate_double_page_spread_image = generate_double_page_spread_image + + @property + def check_required_text_fields(self): + """Gets the check_required_text_fields of this ProcessParams. # noqa: E501 + + When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have \"error\" in validity status. # noqa: E501 + + :return: The check_required_text_fields of this ProcessParams. # noqa: E501 + :rtype: bool + """ + return self._check_required_text_fields + + @check_required_text_fields.setter + def check_required_text_fields(self, check_required_text_fields): + """Sets the check_required_text_fields of this ProcessParams. + + When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have \"error\" in validity status. # noqa: E501 + + :param check_required_text_fields: The check_required_text_fields of this ProcessParams. # noqa: E501 + :type check_required_text_fields: bool + """ + + self._check_required_text_fields = check_required_text_fields + + @property + def image_qa(self): + """Gets the image_qa of this ProcessParams. # noqa: E501 + + + :return: The image_qa of this ProcessParams. # noqa: E501 + :rtype: ImageQA + """ + return self._image_qa + + @image_qa.setter + def image_qa(self, image_qa): + """Sets the image_qa of this ProcessParams. + + + :param image_qa: The image_qa of this ProcessParams. # noqa: E501 + :type image_qa: ImageQA + """ + + self._image_qa = image_qa + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/result_item.py b/regula/documentreader/webclient/gen/models/result_item.py index 62c8c6a..6c37396 100755 --- a/regula/documentreader/webclient/gen/models/result_item.py +++ b/regula/documentreader/webclient/gen/models/result_item.py @@ -60,7 +60,7 @@ class ResultItem(object): 9 : 'ChosenDocumentTypeResult', } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """ResultItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() diff --git a/regula/documentreader/webclient/gen/models/status_result.py b/regula/documentreader/webclient/gen/models/status_result.py index 74db072..788dee3 100755 --- a/regula/documentreader/webclient/gen/models/status_result.py +++ b/regula/documentreader/webclient/gen/models/status_result.py @@ -29,37 +29,38 @@ class StatusResult(object): and the value is json key in definition. """ openapi_types = { + 'status': 'Status', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'status': 'Status' + 'result_type': 'int' } attribute_map = { + 'status': 'Status', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'status': 'Status' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, status=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, status=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """StatusResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._status = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._status = None self.discriminator = None + self.status = status if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,7 +70,29 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - self.status = status + + @property + def status(self): + """Gets the status of this StatusResult. # noqa: E501 + + + :return: The status of this StatusResult. # noqa: E501 + :rtype: Status + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this StatusResult. + + + :param status: The status of this StatusResult. # noqa: E501 + :type status: Status + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status @property def buf_length(self): @@ -180,29 +203,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def status(self): - """Gets the status of this StatusResult. # noqa: E501 - - - :return: The status of this StatusResult. # noqa: E501 - :rtype: Status - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this StatusResult. - - - :param status: The status of this StatusResult. # noqa: E501 - :type status: Status - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/text_available_source.py b/regula/documentreader/webclient/gen/models/text_available_source.py index dd54396..d1b63dd 100755 --- a/regula/documentreader/webclient/gen/models/text_available_source.py +++ b/regula/documentreader/webclient/gen/models/text_available_source.py @@ -40,7 +40,7 @@ class TextAvailableSource(object): 'container_type': 'containerType' } - def __init__(self, source=None, validity_status=None, container_type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, source=None, validity_status=None, container_type=0, local_vars_configuration=None): # noqa: E501 """TextAvailableSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() diff --git a/regula/documentreader/webclient/gen/models/text_data_result.py b/regula/documentreader/webclient/gen/models/text_data_result.py index 56d85f0..9c04961 100755 --- a/regula/documentreader/webclient/gen/models/text_data_result.py +++ b/regula/documentreader/webclient/gen/models/text_data_result.py @@ -29,37 +29,39 @@ class TextDataResult(object): and the value is json key in definition. """ openapi_types = { + 'doc_visual_extended_info': 'DocVisualExtendedInfo', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'doc_visual_extended_info': 'DocVisualExtendedInfo' + 'result_type': 'int' } attribute_map = { + 'doc_visual_extended_info': 'DocVisualExtendedInfo', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'doc_visual_extended_info': 'DocVisualExtendedInfo' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, doc_visual_extended_info=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, doc_visual_extended_info=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """TextDataResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._doc_visual_extended_info = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._doc_visual_extended_info = None self.discriminator = None + if doc_visual_extended_info is not None: + self.doc_visual_extended_info = doc_visual_extended_info if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,8 +71,27 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - if doc_visual_extended_info is not None: - self.doc_visual_extended_info = doc_visual_extended_info + + @property + def doc_visual_extended_info(self): + """Gets the doc_visual_extended_info of this TextDataResult. # noqa: E501 + + + :return: The doc_visual_extended_info of this TextDataResult. # noqa: E501 + :rtype: DocVisualExtendedInfo + """ + return self._doc_visual_extended_info + + @doc_visual_extended_info.setter + def doc_visual_extended_info(self, doc_visual_extended_info): + """Sets the doc_visual_extended_info of this TextDataResult. + + + :param doc_visual_extended_info: The doc_visual_extended_info of this TextDataResult. # noqa: E501 + :type doc_visual_extended_info: DocVisualExtendedInfo + """ + + self._doc_visual_extended_info = doc_visual_extended_info @property def buf_length(self): @@ -181,27 +202,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def doc_visual_extended_info(self): - """Gets the doc_visual_extended_info of this TextDataResult. # noqa: E501 - - - :return: The doc_visual_extended_info of this TextDataResult. # noqa: E501 - :rtype: DocVisualExtendedInfo - """ - return self._doc_visual_extended_info - - @doc_visual_extended_info.setter - def doc_visual_extended_info(self, doc_visual_extended_info): - """Sets the doc_visual_extended_info of this TextDataResult. - - - :param doc_visual_extended_info: The doc_visual_extended_info of this TextDataResult. # noqa: E501 - :type doc_visual_extended_info: DocVisualExtendedInfo - """ - - self._doc_visual_extended_info = doc_visual_extended_info - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/text_result.py b/regula/documentreader/webclient/gen/models/text_result.py index 287662d..f22c62c 100755 --- a/regula/documentreader/webclient/gen/models/text_result.py +++ b/regula/documentreader/webclient/gen/models/text_result.py @@ -29,37 +29,38 @@ class TextResult(object): and the value is json key in definition. """ openapi_types = { + 'text': 'Text', 'buf_length': 'int', 'light': 'int', 'list_idx': 'int', 'page_idx': 'int', - 'result_type': 'int', - 'text': 'Text' + 'result_type': 'int' } attribute_map = { + 'text': 'Text', 'buf_length': 'buf_length', 'light': 'light', 'list_idx': 'list_idx', 'page_idx': 'page_idx', - 'result_type': 'result_type', - 'text': 'Text' + 'result_type': 'result_type' } - def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=None, text=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, text=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501 """TextResult - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._text = None self._buf_length = None self._light = None self._list_idx = None self._page_idx = None self._result_type = None - self._text = None self.discriminator = None + self.text = text if buf_length is not None: self.buf_length = buf_length if light is not None: @@ -69,7 +70,29 @@ def __init__(self, buf_length=None, light=None, list_idx=None, page_idx=None, re if page_idx is not None: self.page_idx = page_idx self.result_type = result_type - self.text = text + + @property + def text(self): + """Gets the text of this TextResult. # noqa: E501 + + + :return: The text of this TextResult. # noqa: E501 + :rtype: Text + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this TextResult. + + + :param text: The text of this TextResult. # noqa: E501 + :type text: Text + """ + if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 + raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 + + self._text = text @property def buf_length(self): @@ -180,29 +203,6 @@ def result_type(self, result_type): self._result_type = result_type - @property - def text(self): - """Gets the text of this TextResult. # noqa: E501 - - - :return: The text of this TextResult. # noqa: E501 - :rtype: Text - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this TextResult. - - - :param text: The text of this TextResult. # noqa: E501 - :type text: Text - """ - if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 - raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 - - self._text = text - def to_dict(self): """Returns the model properties as a dict""" result = {}