Skip to content

Commit f349d5b

Browse files
committed
TEST
1 parent d63ed31 commit f349d5b

File tree

6 files changed

+145
-6
lines changed

6 files changed

+145
-6
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ regula/documentreader/webclient/gen/models/in_data_transaction_images_field_valu
8989
regula/documentreader/webclient/gen/models/in_data_video.py
9090
regula/documentreader/webclient/gen/models/inline_response200.py
9191
regula/documentreader/webclient/gen/models/inline_response2001.py
92+
regula/documentreader/webclient/gen/models/input_image_quality_checks.py
9293
regula/documentreader/webclient/gen/models/lcid.py
9394
regula/documentreader/webclient/gen/models/lexical_analysis_result.py
9495
regula/documentreader/webclient/gen/models/lexical_analysis_result_all_of.py

regula/documentreader/webclient/gen/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
from regula.documentreader.webclient.gen.models.in_data_video import InDataVideo
106106
from regula.documentreader.webclient.gen.models.inline_response200 import InlineResponse200
107107
from regula.documentreader.webclient.gen.models.inline_response2001 import InlineResponse2001
108+
from regula.documentreader.webclient.gen.models.input_image_quality_checks import InputImageQualityChecks
108109
from regula.documentreader.webclient.gen.models.lcid import LCID
109110
from regula.documentreader.webclient.gen.models.lexical_analysis_result import LexicalAnalysisResult
110111
from regula.documentreader.webclient.gen.models.lexical_analysis_result_all_of import LexicalAnalysisResultAllOf

regula/documentreader/webclient/gen/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
from regula.documentreader.webclient.gen.models.in_data_video import InDataVideo
8989
from regula.documentreader.webclient.gen.models.inline_response200 import InlineResponse200
9090
from regula.documentreader.webclient.gen.models.inline_response2001 import InlineResponse2001
91+
from regula.documentreader.webclient.gen.models.input_image_quality_checks import InputImageQualityChecks
9192
from regula.documentreader.webclient.gen.models.lcid import LCID
9293
from regula.documentreader.webclient.gen.models.lexical_analysis_result import LexicalAnalysisResult
9394
from regula.documentreader.webclient.gen.models.lexical_analysis_result_all_of import LexicalAnalysisResultAllOf

regula/documentreader/webclient/gen/models/image_qa.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class ImageQA(object):
3838
'focus_check': 'bool',
3939
'glares_check': 'bool',
4040
'colorness_check': 'bool',
41-
'document_position_indent': 'int'
41+
'document_position_indent': 'int',
42+
'expected_pass': 'list[InputImageQualityChecks]'
4243
}
4344

4445
attribute_map = {
@@ -48,10 +49,11 @@ class ImageQA(object):
4849
'focus_check': 'focusCheck',
4950
'glares_check': 'glaresCheck',
5051
'colorness_check': 'colornessCheck',
51-
'document_position_indent': 'documentPositionIndent'
52+
'document_position_indent': 'documentPositionIndent',
53+
'expected_pass': 'expectedPass'
5254
}
5355

54-
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
56+
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
5557
"""ImageQA - a model defined in OpenAPI""" # noqa: E501
5658
if local_vars_configuration is None:
5759
local_vars_configuration = Configuration()
@@ -64,6 +66,7 @@ def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshol
6466
self._glares_check = None
6567
self._colorness_check = None
6668
self._document_position_indent = None
69+
self._expected_pass = None
6770
self.discriminator = None
6871

6972
if brightness_threshold is not None:
@@ -80,6 +83,8 @@ def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshol
8083
self.colorness_check = colorness_check
8184
if document_position_indent is not None:
8285
self.document_position_indent = document_position_indent
86+
if expected_pass is not None:
87+
self.expected_pass = expected_pass
8388

8489
@property
8590
def brightness_threshold(self):
@@ -242,6 +247,29 @@ def document_position_indent(self, document_position_indent):
242247

243248
self._document_position_indent = document_position_indent
244249

250+
@property
251+
def expected_pass(self):
252+
"""Gets the expected_pass of this ImageQA. # noqa: E501
253+
254+
This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. # noqa: E501
255+
256+
:return: The expected_pass of this ImageQA. # noqa: E501
257+
:rtype: list[InputImageQualityChecks]
258+
"""
259+
return self._expected_pass
260+
261+
@expected_pass.setter
262+
def expected_pass(self, expected_pass):
263+
"""Sets the expected_pass of this ImageQA.
264+
265+
This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. # noqa: E501
266+
267+
:param expected_pass: The expected_pass of this ImageQA. # noqa: E501
268+
:type expected_pass: list[InputImageQualityChecks]
269+
"""
270+
271+
self._expected_pass = expected_pass
272+
245273
def to_dict(self):
246274
"""Returns the model properties as a dict"""
247275
result = {}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# coding: utf-8
2+
3+
"""
4+
Generated by: https://openapi-generator.tech
5+
"""
6+
7+
import pprint
8+
import re # noqa: F401
9+
10+
import six
11+
12+
from regula.documentreader.webclient.gen.configuration import Configuration
13+
# this line was added to enable pycharm type hinting
14+
from regula.documentreader.webclient.gen.models import *
15+
16+
17+
"""
18+
Input image quality checks for the document processing
19+
"""
20+
class InputImageQualityChecks(object):
21+
"""NOTE: This class is auto generated by OpenAPI Generator.
22+
Ref: https://openapi-generator.tech
23+
24+
Do not edit the class manually.
25+
"""
26+
27+
Glares = "glaresCheck"
28+
29+
Focus = "focusCheck"
30+
31+
Resolution = "dpiThreshold"
32+
33+
Colorness = "colornessCheck"
34+
35+
Perspective = "perspectiveCheck"
36+
37+
Bounds = "documentPosition"
38+
39+
Portrait = "portraitCheck"
40+
41+
Brightness = "brightnessCheck"
42+
43+
allowable_values = [Glares, Focus, Resolution, Colorness, Perspective, Bounds, Portrait, Brightness] # noqa: E501
44+
45+
"""
46+
Attributes:
47+
openapi_types (dict): The key is attribute name
48+
and the value is attribute type.
49+
attribute_map (dict): The key is attribute name
50+
and the value is json key in definition.
51+
"""
52+
openapi_types = {
53+
}
54+
55+
attribute_map = {
56+
}
57+
58+
def __init__(self, local_vars_configuration=None): # noqa: E501
59+
"""InputImageQualityChecks - a model defined in OpenAPI""" # noqa: E501
60+
if local_vars_configuration is None:
61+
local_vars_configuration = Configuration()
62+
self.local_vars_configuration = local_vars_configuration
63+
self.discriminator = None
64+
65+
def to_dict(self):
66+
"""Returns the model properties as a dict"""
67+
result = {}
68+
69+
for attr, _ in six.iteritems(self.openapi_types):
70+
value = getattr(self, attr)
71+
if isinstance(value, list):
72+
result[attr] = list(map(
73+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
74+
value
75+
))
76+
elif hasattr(value, "to_dict"):
77+
result[attr] = value.to_dict()
78+
elif isinstance(value, dict):
79+
result[attr] = dict(map(
80+
lambda item: (item[0], item[1].to_dict())
81+
if hasattr(item[1], "to_dict") else item,
82+
value.items()
83+
))
84+
else:
85+
result[attr] = value
86+
87+
return result
88+
89+
def to_str(self):
90+
"""Returns the string representation of the model"""
91+
return pprint.pformat(self.to_dict())
92+
93+
def __repr__(self):
94+
"""For `print` and `pprint`"""
95+
return self.to_str()
96+
97+
def __eq__(self, other):
98+
"""Returns true if both objects are equal"""
99+
if not isinstance(other, InputImageQualityChecks):
100+
return False
101+
102+
return self.to_dict() == other.to_dict()
103+
104+
def __ne__(self, other):
105+
"""Returns true if both objects are not equal"""
106+
if not isinstance(other, InputImageQualityChecks):
107+
return True
108+
109+
return self.to_dict() != other.to_dict()

regula/documentreader/webclient/gen/models/process_request_image.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def __init__(self, image_data=None, light=None, page_idx=None, local_vars_config
5454
self._page_idx = None
5555
self.discriminator = None
5656

57-
self.image_data = image_data
57+
if image_data is not None:
58+
self.image_data = image_data
5859
if light is not None:
5960
self.light = light
6061
if page_idx is not None:
@@ -78,8 +79,6 @@ def image_data(self, image_data):
7879
:param image_data: The image_data of this ProcessRequestImage. # noqa: E501
7980
:type image_data: ImageData
8081
"""
81-
if self.local_vars_configuration.client_side_validation and image_data is None: # noqa: E501
82-
raise ValueError("Invalid value for `image_data`, must not be `None`") # noqa: E501
8382

8483
self._image_data = image_data
8584

0 commit comments

Comments
 (0)