diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b8ef140..5c5442d 100755 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -89,6 +89,7 @@ regula/documentreader/webclient/gen/models/in_data_transaction_images_field_valu regula/documentreader/webclient/gen/models/in_data_video.py regula/documentreader/webclient/gen/models/inline_response200.py regula/documentreader/webclient/gen/models/inline_response2001.py +regula/documentreader/webclient/gen/models/input_image_quality_checks.py regula/documentreader/webclient/gen/models/lcid.py regula/documentreader/webclient/gen/models/lexical_analysis_result.py regula/documentreader/webclient/gen/models/lexical_analysis_result_all_of.py diff --git a/regula/documentreader/webclient/gen/__init__.py b/regula/documentreader/webclient/gen/__init__.py index 4c8dbfb..4fbf994 100755 --- a/regula/documentreader/webclient/gen/__init__.py +++ b/regula/documentreader/webclient/gen/__init__.py @@ -105,6 +105,7 @@ from regula.documentreader.webclient.gen.models.in_data_video import InDataVideo from regula.documentreader.webclient.gen.models.inline_response200 import InlineResponse200 from regula.documentreader.webclient.gen.models.inline_response2001 import InlineResponse2001 +from regula.documentreader.webclient.gen.models.input_image_quality_checks import InputImageQualityChecks from regula.documentreader.webclient.gen.models.lcid import LCID from regula.documentreader.webclient.gen.models.lexical_analysis_result import LexicalAnalysisResult from regula.documentreader.webclient.gen.models.lexical_analysis_result_all_of import LexicalAnalysisResultAllOf diff --git a/regula/documentreader/webclient/gen/models/__init__.py b/regula/documentreader/webclient/gen/models/__init__.py index 995da58..93ccdbf 100755 --- a/regula/documentreader/webclient/gen/models/__init__.py +++ b/regula/documentreader/webclient/gen/models/__init__.py @@ -88,6 +88,7 @@ from regula.documentreader.webclient.gen.models.in_data_video import InDataVideo from regula.documentreader.webclient.gen.models.inline_response200 import InlineResponse200 from regula.documentreader.webclient.gen.models.inline_response2001 import InlineResponse2001 +from regula.documentreader.webclient.gen.models.input_image_quality_checks import InputImageQualityChecks from regula.documentreader.webclient.gen.models.lcid import LCID from regula.documentreader.webclient.gen.models.lexical_analysis_result import LexicalAnalysisResult from regula.documentreader.webclient.gen.models.lexical_analysis_result_all_of import LexicalAnalysisResultAllOf diff --git a/regula/documentreader/webclient/gen/models/image_qa.py b/regula/documentreader/webclient/gen/models/image_qa.py index 52aca2e..6f0ed7f 100644 --- a/regula/documentreader/webclient/gen/models/image_qa.py +++ b/regula/documentreader/webclient/gen/models/image_qa.py @@ -38,7 +38,8 @@ class ImageQA(object): 'focus_check': 'bool', 'glares_check': 'bool', 'colorness_check': 'bool', - 'document_position_indent': 'int' + 'document_position_indent': 'int', + 'expected_pass': 'list[InputImageQualityChecks]' } attribute_map = { @@ -48,10 +49,11 @@ class ImageQA(object): 'focus_check': 'focusCheck', 'glares_check': 'glaresCheck', 'colorness_check': 'colornessCheck', - 'document_position_indent': 'documentPositionIndent' + 'document_position_indent': 'documentPositionIndent', + 'expected_pass': 'expectedPass' } - def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshold=None, focus_check=None, glares_check=None, colorness_check=None, document_position_indent=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshold=None, focus_check=None, glares_check=None, colorness_check=None, document_position_indent=None, expected_pass=None, local_vars_configuration=None): # noqa: E501 """ImageQA - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -64,6 +66,7 @@ def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshol self._glares_check = None self._colorness_check = None self._document_position_indent = None + self._expected_pass = None self.discriminator = None if brightness_threshold is not None: @@ -80,6 +83,8 @@ def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshol self.colorness_check = colorness_check if document_position_indent is not None: self.document_position_indent = document_position_indent + if expected_pass is not None: + self.expected_pass = expected_pass @property def brightness_threshold(self): @@ -242,6 +247,29 @@ def document_position_indent(self, document_position_indent): self._document_position_indent = document_position_indent + @property + def expected_pass(self): + """Gets the expected_pass of this ImageQA. # noqa: E501 + + This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. # noqa: E501 + + :return: The expected_pass of this ImageQA. # noqa: E501 + :rtype: list[InputImageQualityChecks] + """ + return self._expected_pass + + @expected_pass.setter + def expected_pass(self, expected_pass): + """Sets the expected_pass of this ImageQA. + + This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. # noqa: E501 + + :param expected_pass: The expected_pass of this ImageQA. # noqa: E501 + :type expected_pass: list[InputImageQualityChecks] + """ + + self._expected_pass = expected_pass + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/regula/documentreader/webclient/gen/models/input_image_quality_checks.py b/regula/documentreader/webclient/gen/models/input_image_quality_checks.py new file mode 100644 index 0000000..36c3602 --- /dev/null +++ b/regula/documentreader/webclient/gen/models/input_image_quality_checks.py @@ -0,0 +1,109 @@ +# 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 * + + +""" +Input image quality checks for the document processing +""" +class InputImageQualityChecks(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + Glares = "glaresCheck" + + Focus = "focusCheck" + + Resolution = "dpiThreshold" + + Colorness = "colornessCheck" + + Perspective = "perspectiveCheck" + + Bounds = "documentPosition" + + Portrait = "portraitCheck" + + Brightness = "brightnessCheck" + + allowable_values = [Glares, Focus, Resolution, Colorness, Perspective, Bounds, Portrait, Brightness] # noqa: E501 + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """InputImageQualityChecks - 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.discriminator = None + + 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, InputImageQualityChecks): + 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, InputImageQualityChecks): + return True + + return self.to_dict() != other.to_dict() diff --git a/regula/documentreader/webclient/gen/models/process_request_image.py b/regula/documentreader/webclient/gen/models/process_request_image.py index bf3a0cd..6cd2c40 100755 --- a/regula/documentreader/webclient/gen/models/process_request_image.py +++ b/regula/documentreader/webclient/gen/models/process_request_image.py @@ -54,7 +54,8 @@ def __init__(self, image_data=None, light=None, page_idx=None, local_vars_config self._page_idx = None self.discriminator = None - self.image_data = image_data + if image_data is not None: + self.image_data = image_data if light is not None: self.light = light if page_idx is not None: @@ -78,8 +79,6 @@ def image_data(self, image_data): :param image_data: The image_data of this ProcessRequestImage. # noqa: E501 :type image_data: ImageData """ - if self.local_vars_configuration.client_side_validation and image_data is None: # noqa: E501 - raise ValueError("Invalid value for `image_data`, must not be `None`") # noqa: E501 self._image_data = image_data