Skip to content

Commit 93b1186

Browse files
actions-userhleb-albau
authored andcommitted
convert case option
1 parent a252b21 commit 93b1186

File tree

5 files changed

+133
-3
lines changed

5 files changed

+133
-3
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ regula/documentreader/webclient/gen/models/text_data_result_all_of.py
112112
regula/documentreader/webclient/gen/models/text_field.py
113113
regula/documentreader/webclient/gen/models/text_field_type.py
114114
regula/documentreader/webclient/gen/models/text_field_value.py
115+
regula/documentreader/webclient/gen/models/text_post_processing.py
115116
regula/documentreader/webclient/gen/models/text_result.py
116117
regula/documentreader/webclient/gen/models/text_result_all_of.py
117118
regula/documentreader/webclient/gen/models/transaction_info.py

regula/documentreader/webclient/gen/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
from regula.documentreader.webclient.gen.models.text_field import TextField
131131
from regula.documentreader.webclient.gen.models.text_field_type import TextFieldType
132132
from regula.documentreader.webclient.gen.models.text_field_value import TextFieldValue
133+
from regula.documentreader.webclient.gen.models.text_post_processing import TextPostProcessing
133134
from regula.documentreader.webclient.gen.models.text_result import TextResult
134135
from regula.documentreader.webclient.gen.models.text_result_all_of import TextResultAllOf
135136
from regula.documentreader.webclient.gen.models.transaction_info import TransactionInfo

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
from regula.documentreader.webclient.gen.models.text_field import TextField
115115
from regula.documentreader.webclient.gen.models.text_field_type import TextFieldType
116116
from regula.documentreader.webclient.gen.models.text_field_value import TextFieldValue
117+
from regula.documentreader.webclient.gen.models.text_post_processing import TextPostProcessing
117118
from regula.documentreader.webclient.gen.models.text_result import TextResult
118119
from regula.documentreader.webclient.gen.models.text_result_all_of import TextResultAllOf
119120
from regula.documentreader.webclient.gen.models.transaction_info import TransactionInfo

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

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class ProcessParams(object):
6262
'return_uncropped_image': 'bool',
6363
'mrz_formats_filter': 'list[MRZFormat]',
6464
'force_read_mrz_before_locate': 'bool',
65-
'parse_barcodes': 'bool'
65+
'parse_barcodes': 'bool',
66+
'convert_case': 'TextPostProcessing'
6667
}
6768

6869
attribute_map = {
@@ -96,10 +97,11 @@ class ProcessParams(object):
9697
'return_uncropped_image': 'returnUncroppedImage',
9798
'mrz_formats_filter': 'mrzFormatsFilter',
9899
'force_read_mrz_before_locate': 'forceReadMrzBeforeLocate',
99-
'parse_barcodes': 'parseBarcodes'
100+
'parse_barcodes': 'parseBarcodes',
101+
'convert_case': 'convertCase'
100102
}
101103

102-
def __init__(self, scenario=None, result_type_output=None, double_page_spread=None, generate_double_page_spread_image=None, field_types_filter=None, date_format=None, measure_system=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, config=None, log=None, log_level=None, force_doc_id=None, match_text_field_mask=None, fast_doc_detect=None, update_ocr_validity_by_glare=None, check_required_text_fields=None, return_cropped_barcode=None, image_qa=None, force_doc_format=None, no_graphics=None, document_area_min=None, depersonalize_log=None, multi_doc_on_image=None, shift_expiry_date=None, minimal_holder_age=None, return_uncropped_image=None, mrz_formats_filter=None, force_read_mrz_before_locate=None, parse_barcodes=None, local_vars_configuration=None): # noqa: E501
104+
def __init__(self, scenario=None, result_type_output=None, double_page_spread=None, generate_double_page_spread_image=None, field_types_filter=None, date_format=None, measure_system=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, config=None, log=None, log_level=None, force_doc_id=None, match_text_field_mask=None, fast_doc_detect=None, update_ocr_validity_by_glare=None, check_required_text_fields=None, return_cropped_barcode=None, image_qa=None, force_doc_format=None, no_graphics=None, document_area_min=None, depersonalize_log=None, multi_doc_on_image=None, shift_expiry_date=None, minimal_holder_age=None, return_uncropped_image=None, mrz_formats_filter=None, force_read_mrz_before_locate=None, parse_barcodes=None, convert_case=None, local_vars_configuration=None): # noqa: E501
103105
"""ProcessParams - a model defined in OpenAPI""" # noqa: E501
104106
if local_vars_configuration is None:
105107
local_vars_configuration = Configuration()
@@ -136,6 +138,7 @@ def __init__(self, scenario=None, result_type_output=None, double_page_spread=No
136138
self._mrz_formats_filter = None
137139
self._force_read_mrz_before_locate = None
138140
self._parse_barcodes = None
141+
self._convert_case = None
139142
self.discriminator = None
140143

141144
self.scenario = scenario
@@ -199,6 +202,8 @@ def __init__(self, scenario=None, result_type_output=None, double_page_spread=No
199202
self.force_read_mrz_before_locate = force_read_mrz_before_locate
200203
if parse_barcodes is not None:
201204
self.parse_barcodes = parse_barcodes
205+
if convert_case is not None:
206+
self.convert_case = convert_case
202207

203208
@property
204209
def scenario(self):
@@ -905,6 +910,27 @@ def parse_barcodes(self, parse_barcodes):
905910

906911
self._parse_barcodes = parse_barcodes
907912

913+
@property
914+
def convert_case(self):
915+
"""Gets the convert_case of this ProcessParams. # noqa: E501
916+
917+
918+
:return: The convert_case of this ProcessParams. # noqa: E501
919+
:rtype: TextPostProcessing
920+
"""
921+
return self._convert_case
922+
923+
@convert_case.setter
924+
def convert_case(self, convert_case):
925+
"""Sets the convert_case of this ProcessParams.
926+
927+
928+
:param convert_case: The convert_case of this ProcessParams. # noqa: E501
929+
:type convert_case: TextPostProcessing
930+
"""
931+
932+
self._convert_case = convert_case
933+
908934
def to_dict(self):
909935
"""Returns the model properties as a dict"""
910936
result = {}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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+
19+
"""
20+
class TextPostProcessing(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+
NO_CHANGE = int("0")
28+
29+
UPPERCASE = int("1")
30+
31+
LOWERCASE = int("2")
32+
33+
CAPITAL = int("3")
34+
35+
allowable_values = [NO_CHANGE, UPPERCASE, LOWERCASE, CAPITAL] # noqa: E501
36+
37+
"""
38+
Attributes:
39+
openapi_types (dict): The key is attribute name
40+
and the value is attribute type.
41+
attribute_map (dict): The key is attribute name
42+
and the value is json key in definition.
43+
"""
44+
openapi_types = {
45+
}
46+
47+
attribute_map = {
48+
}
49+
50+
def __init__(self, local_vars_configuration=None): # noqa: E501
51+
"""TextPostProcessing - a model defined in OpenAPI""" # noqa: E501
52+
if local_vars_configuration is None:
53+
local_vars_configuration = Configuration()
54+
self.local_vars_configuration = local_vars_configuration
55+
self.discriminator = None
56+
57+
def to_dict(self):
58+
"""Returns the model properties as a dict"""
59+
result = {}
60+
61+
for attr, _ in six.iteritems(self.openapi_types):
62+
value = getattr(self, attr)
63+
if isinstance(value, list):
64+
result[attr] = list(map(
65+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
66+
value
67+
))
68+
elif hasattr(value, "to_dict"):
69+
result[attr] = value.to_dict()
70+
elif isinstance(value, dict):
71+
result[attr] = dict(map(
72+
lambda item: (item[0], item[1].to_dict())
73+
if hasattr(item[1], "to_dict") else item,
74+
value.items()
75+
))
76+
else:
77+
result[attr] = value
78+
79+
return result
80+
81+
def to_str(self):
82+
"""Returns the string representation of the model"""
83+
return pprint.pformat(self.to_dict())
84+
85+
def __repr__(self):
86+
"""For `print` and `pprint`"""
87+
return self.to_str()
88+
89+
def __eq__(self, other):
90+
"""Returns true if both objects are equal"""
91+
if not isinstance(other, TextPostProcessing):
92+
return False
93+
94+
return self.to_dict() == other.to_dict()
95+
96+
def __ne__(self, other):
97+
"""Returns true if both objects are not equal"""
98+
if not isinstance(other, TextPostProcessing):
99+
return True
100+
101+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)