Skip to content

Commit

Permalink
6f22fdd17fc00c3fbf0481de47121ecc0e201f1b
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 18, 2024
1 parent d63ed31 commit 36b0592
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 6 deletions.
1 change: 1 addition & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions regula/documentreader/webclient/gen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions regula/documentreader/webclient/gen/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 31 additions & 3 deletions regula/documentreader/webclient/gen/models/image_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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()
Expand All @@ -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:
Expand All @@ -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):
Expand Down Expand Up @@ -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 = {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 36b0592

Please sign in to comment.