Skip to content

Commit 2a285dd

Browse files
Merge pull request #100 from regulaforensics/9ff6dd4a
SP-11417: Missing results for DocBarCodeInfo
2 parents d208fdb + 943f71f commit 2a285dd

File tree

6 files changed

+186
-94
lines changed

6 files changed

+186
-94
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ regula/documentreader/webclient/gen/models/details_rfid.py
3030
regula/documentreader/webclient/gen/models/device_info.py
3131
regula/documentreader/webclient/gen/models/doc_bar_code_info.py
3232
regula/documentreader/webclient/gen/models/doc_bar_code_info_all_of.py
33+
regula/documentreader/webclient/gen/models/doc_bar_code_info_fields_list.py
3334
regula/documentreader/webclient/gen/models/doc_visual_extended_field.py
3435
regula/documentreader/webclient/gen/models/doc_visual_extended_info.py
3536
regula/documentreader/webclient/gen/models/document_format.py

regula/documentreader/webclient/gen/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from regula.documentreader.webclient.gen.models.device_info import DeviceInfo
4949
from regula.documentreader.webclient.gen.models.doc_bar_code_info import DocBarCodeInfo
5050
from regula.documentreader.webclient.gen.models.doc_bar_code_info_all_of import DocBarCodeInfoAllOf
51+
from regula.documentreader.webclient.gen.models.doc_bar_code_info_fields_list import DocBarCodeInfoFieldsList
5152
from regula.documentreader.webclient.gen.models.doc_visual_extended_field import DocVisualExtendedField
5253
from regula.documentreader.webclient.gen.models.doc_visual_extended_info import DocVisualExtendedInfo
5354
from regula.documentreader.webclient.gen.models.document_format import DocumentFormat

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from regula.documentreader.webclient.gen.models.device_info import DeviceInfo
3333
from regula.documentreader.webclient.gen.models.doc_bar_code_info import DocBarCodeInfo
3434
from regula.documentreader.webclient.gen.models.doc_bar_code_info_all_of import DocBarCodeInfoAllOf
35+
from regula.documentreader.webclient.gen.models.doc_bar_code_info_fields_list import DocBarCodeInfoFieldsList
3536
from regula.documentreader.webclient.gen.models.doc_visual_extended_field import DocVisualExtendedField
3637
from regula.documentreader.webclient.gen.models.doc_visual_extended_info import DocVisualExtendedInfo
3738
from regula.documentreader.webclient.gen.models.document_format import DocumentFormat

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

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class DocBarCodeInfo(object):
3232
and the value is json key in definition.
3333
"""
3434
openapi_types = {
35-
'n_fields': 'int',
36-
'p_array_fields': 'list[PArrayField]',
35+
'doc_bar_code_info': 'DocBarCodeInfoFieldsList',
3736
'buf_length': 'int',
3837
'light': 'int',
3938
'list_idx': 'int',
@@ -42,34 +41,30 @@ class DocBarCodeInfo(object):
4241
}
4342

4443
attribute_map = {
45-
'n_fields': 'nFields',
46-
'p_array_fields': 'pArrayFields',
44+
'doc_bar_code_info': 'DocBarCodeInfo',
4745
'buf_length': 'buf_length',
4846
'light': 'light',
4947
'list_idx': 'list_idx',
5048
'page_idx': 'page_idx',
5149
'result_type': 'result_type'
5250
}
5351

54-
def __init__(self, n_fields=None, p_array_fields=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501
52+
def __init__(self, doc_bar_code_info=None, buf_length=None, light=None, list_idx=None, page_idx=None, result_type=0, local_vars_configuration=None): # noqa: E501
5553
"""DocBarCodeInfo - a model defined in OpenAPI""" # noqa: E501
5654
if local_vars_configuration is None:
5755
local_vars_configuration = Configuration()
5856
self.local_vars_configuration = local_vars_configuration
5957

60-
self._n_fields = None
61-
self._p_array_fields = None
58+
self._doc_bar_code_info = None
6259
self._buf_length = None
6360
self._light = None
6461
self._list_idx = None
6562
self._page_idx = None
6663
self._result_type = None
6764
self.discriminator = None
6865

69-
if n_fields is not None:
70-
self.n_fields = n_fields
71-
if p_array_fields is not None:
72-
self.p_array_fields = p_array_fields
66+
if doc_bar_code_info is not None:
67+
self.doc_bar_code_info = doc_bar_code_info
7368
if buf_length is not None:
7469
self.buf_length = buf_length
7570
if light is not None:
@@ -81,50 +76,25 @@ def __init__(self, n_fields=None, p_array_fields=None, buf_length=None, light=No
8176
self.result_type = result_type
8277

8378
@property
84-
def n_fields(self):
85-
"""Gets the n_fields of this DocBarCodeInfo. # noqa: E501
79+
def doc_bar_code_info(self):
80+
"""Gets the doc_bar_code_info of this DocBarCodeInfo. # noqa: E501
8681
87-
Count of array fields # noqa: E501
8882
89-
:return: The n_fields of this DocBarCodeInfo. # noqa: E501
90-
:rtype: int
91-
"""
92-
return self._n_fields
93-
94-
@n_fields.setter
95-
def n_fields(self, n_fields):
96-
"""Sets the n_fields of this DocBarCodeInfo.
97-
98-
Count of array fields # noqa: E501
99-
100-
:param n_fields: The n_fields of this DocBarCodeInfo. # noqa: E501
101-
:type n_fields: int
102-
"""
103-
104-
self._n_fields = n_fields
105-
106-
@property
107-
def p_array_fields(self):
108-
"""Gets the p_array_fields of this DocBarCodeInfo. # noqa: E501
109-
110-
Data from barcode # noqa: E501
111-
112-
:return: The p_array_fields of this DocBarCodeInfo. # noqa: E501
113-
:rtype: list[PArrayField]
83+
:return: The doc_bar_code_info of this DocBarCodeInfo. # noqa: E501
84+
:rtype: DocBarCodeInfoFieldsList
11485
"""
115-
return self._p_array_fields
86+
return self._doc_bar_code_info
11687

117-
@p_array_fields.setter
118-
def p_array_fields(self, p_array_fields):
119-
"""Sets the p_array_fields of this DocBarCodeInfo.
88+
@doc_bar_code_info.setter
89+
def doc_bar_code_info(self, doc_bar_code_info):
90+
"""Sets the doc_bar_code_info of this DocBarCodeInfo.
12091
121-
Data from barcode # noqa: E501
12292
123-
:param p_array_fields: The p_array_fields of this DocBarCodeInfo. # noqa: E501
124-
:type p_array_fields: list[PArrayField]
93+
:param doc_bar_code_info: The doc_bar_code_info of this DocBarCodeInfo. # noqa: E501
94+
:type doc_bar_code_info: DocBarCodeInfoFieldsList
12595
"""
12696

127-
self._p_array_fields = p_array_fields
97+
self._doc_bar_code_info = doc_bar_code_info
12898

12999
@property
130100
def buf_length(self):

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

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,75 +32,45 @@ class DocBarCodeInfoAllOf(object):
3232
and the value is json key in definition.
3333
"""
3434
openapi_types = {
35-
'n_fields': 'int',
36-
'p_array_fields': 'list[PArrayField]'
35+
'doc_bar_code_info': 'DocBarCodeInfoFieldsList'
3736
}
3837

3938
attribute_map = {
40-
'n_fields': 'nFields',
41-
'p_array_fields': 'pArrayFields'
39+
'doc_bar_code_info': 'DocBarCodeInfo'
4240
}
4341

44-
def __init__(self, n_fields=None, p_array_fields=None, local_vars_configuration=None): # noqa: E501
42+
def __init__(self, doc_bar_code_info=None, local_vars_configuration=None): # noqa: E501
4543
"""DocBarCodeInfoAllOf - a model defined in OpenAPI""" # noqa: E501
4644
if local_vars_configuration is None:
4745
local_vars_configuration = Configuration()
4846
self.local_vars_configuration = local_vars_configuration
4947

50-
self._n_fields = None
51-
self._p_array_fields = None
48+
self._doc_bar_code_info = None
5249
self.discriminator = None
5350

54-
if n_fields is not None:
55-
self.n_fields = n_fields
56-
if p_array_fields is not None:
57-
self.p_array_fields = p_array_fields
51+
if doc_bar_code_info is not None:
52+
self.doc_bar_code_info = doc_bar_code_info
5853

5954
@property
60-
def n_fields(self):
61-
"""Gets the n_fields of this DocBarCodeInfoAllOf. # noqa: E501
55+
def doc_bar_code_info(self):
56+
"""Gets the doc_bar_code_info of this DocBarCodeInfoAllOf. # noqa: E501
6257
63-
Count of array fields # noqa: E501
6458
65-
:return: The n_fields of this DocBarCodeInfoAllOf. # noqa: E501
66-
:rtype: int
59+
:return: The doc_bar_code_info of this DocBarCodeInfoAllOf. # noqa: E501
60+
:rtype: DocBarCodeInfoFieldsList
6761
"""
68-
return self._n_fields
62+
return self._doc_bar_code_info
6963

70-
@n_fields.setter
71-
def n_fields(self, n_fields):
72-
"""Sets the n_fields of this DocBarCodeInfoAllOf.
64+
@doc_bar_code_info.setter
65+
def doc_bar_code_info(self, doc_bar_code_info):
66+
"""Sets the doc_bar_code_info of this DocBarCodeInfoAllOf.
7367
74-
Count of array fields # noqa: E501
7568
76-
:param n_fields: The n_fields of this DocBarCodeInfoAllOf. # noqa: E501
77-
:type n_fields: int
69+
:param doc_bar_code_info: The doc_bar_code_info of this DocBarCodeInfoAllOf. # noqa: E501
70+
:type doc_bar_code_info: DocBarCodeInfoFieldsList
7871
"""
7972

80-
self._n_fields = n_fields
81-
82-
@property
83-
def p_array_fields(self):
84-
"""Gets the p_array_fields of this DocBarCodeInfoAllOf. # noqa: E501
85-
86-
Data from barcode # noqa: E501
87-
88-
:return: The p_array_fields of this DocBarCodeInfoAllOf. # noqa: E501
89-
:rtype: list[PArrayField]
90-
"""
91-
return self._p_array_fields
92-
93-
@p_array_fields.setter
94-
def p_array_fields(self, p_array_fields):
95-
"""Sets the p_array_fields of this DocBarCodeInfoAllOf.
96-
97-
Data from barcode # noqa: E501
98-
99-
:param p_array_fields: The p_array_fields of this DocBarCodeInfoAllOf. # noqa: E501
100-
:type p_array_fields: list[PArrayField]
101-
"""
102-
103-
self._p_array_fields = p_array_fields
73+
self._doc_bar_code_info = doc_bar_code_info
10474

10575
def to_dict(self):
10676
"""Returns the model properties as a dict"""
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
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 DocBarCodeInfoFieldsList(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+
"""
28+
Attributes:
29+
openapi_types (dict): The key is attribute name
30+
and the value is attribute type.
31+
attribute_map (dict): The key is attribute name
32+
and the value is json key in definition.
33+
"""
34+
openapi_types = {
35+
'n_fields': 'int',
36+
'p_array_fields': 'list[PArrayField]'
37+
}
38+
39+
attribute_map = {
40+
'n_fields': 'nFields',
41+
'p_array_fields': 'pArrayFields'
42+
}
43+
44+
def __init__(self, n_fields=None, p_array_fields=None, local_vars_configuration=None): # noqa: E501
45+
"""DocBarCodeInfoFieldsList - a model defined in OpenAPI""" # noqa: E501
46+
if local_vars_configuration is None:
47+
local_vars_configuration = Configuration()
48+
self.local_vars_configuration = local_vars_configuration
49+
50+
self._n_fields = None
51+
self._p_array_fields = None
52+
self.discriminator = None
53+
54+
if n_fields is not None:
55+
self.n_fields = n_fields
56+
if p_array_fields is not None:
57+
self.p_array_fields = p_array_fields
58+
59+
@property
60+
def n_fields(self):
61+
"""Gets the n_fields of this DocBarCodeInfoFieldsList. # noqa: E501
62+
63+
Count of array fields # noqa: E501
64+
65+
:return: The n_fields of this DocBarCodeInfoFieldsList. # noqa: E501
66+
:rtype: int
67+
"""
68+
return self._n_fields
69+
70+
@n_fields.setter
71+
def n_fields(self, n_fields):
72+
"""Sets the n_fields of this DocBarCodeInfoFieldsList.
73+
74+
Count of array fields # noqa: E501
75+
76+
:param n_fields: The n_fields of this DocBarCodeInfoFieldsList. # noqa: E501
77+
:type n_fields: int
78+
"""
79+
80+
self._n_fields = n_fields
81+
82+
@property
83+
def p_array_fields(self):
84+
"""Gets the p_array_fields of this DocBarCodeInfoFieldsList. # noqa: E501
85+
86+
Data from barcode # noqa: E501
87+
88+
:return: The p_array_fields of this DocBarCodeInfoFieldsList. # noqa: E501
89+
:rtype: list[PArrayField]
90+
"""
91+
return self._p_array_fields
92+
93+
@p_array_fields.setter
94+
def p_array_fields(self, p_array_fields):
95+
"""Sets the p_array_fields of this DocBarCodeInfoFieldsList.
96+
97+
Data from barcode # noqa: E501
98+
99+
:param p_array_fields: The p_array_fields of this DocBarCodeInfoFieldsList. # noqa: E501
100+
:type p_array_fields: list[PArrayField]
101+
"""
102+
103+
self._p_array_fields = p_array_fields
104+
105+
def to_dict(self):
106+
"""Returns the model properties as a dict"""
107+
result = {}
108+
109+
for attr, _ in six.iteritems(self.openapi_types):
110+
value = getattr(self, attr)
111+
if isinstance(value, list):
112+
result[attr] = list(map(
113+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
114+
value
115+
))
116+
elif hasattr(value, "to_dict"):
117+
result[attr] = value.to_dict()
118+
elif isinstance(value, dict):
119+
result[attr] = dict(map(
120+
lambda item: (item[0], item[1].to_dict())
121+
if hasattr(item[1], "to_dict") else item,
122+
value.items()
123+
))
124+
else:
125+
result[attr] = value
126+
127+
return result
128+
129+
def to_str(self):
130+
"""Returns the string representation of the model"""
131+
return pprint.pformat(self.to_dict())
132+
133+
def __repr__(self):
134+
"""For `print` and `pprint`"""
135+
return self.to_str()
136+
137+
def __eq__(self, other):
138+
"""Returns true if both objects are equal"""
139+
if not isinstance(other, DocBarCodeInfoFieldsList):
140+
return False
141+
142+
return self.to_dict() == other.to_dict()
143+
144+
def __ne__(self, other):
145+
"""Returns true if both objects are not equal"""
146+
if not isinstance(other, DocBarCodeInfoFieldsList):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)