Skip to content

Commit

Permalink
Update to 5.4.0 model definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
hleb-albau committed Jan 8, 2021
1 parent eaa7665 commit be296f0
Show file tree
Hide file tree
Showing 27 changed files with 1,398 additions and 435 deletions.
5 changes: 5 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ regula/documentreader/__init__.py
regula/documentreader/webclient/gen/__init__.py
regula/documentreader/webclient/gen/api/__init__.py
regula/documentreader/webclient/gen/api/default_api.py
regula/documentreader/webclient/gen/api/process_api.py
regula/documentreader/webclient/gen/api_client.py
regula/documentreader/webclient/gen/configuration.py
regula/documentreader/webclient/gen/exceptions.py
regula/documentreader/webclient/gen/models/__init__.py
regula/documentreader/webclient/gen/models/check_result.py
regula/documentreader/webclient/gen/models/chosen_document_type.py
regula/documentreader/webclient/gen/models/chosen_document_type_result.py
regula/documentreader/webclient/gen/models/chosen_document_type_result_all_of.py
regula/documentreader/webclient/gen/models/cross_source_value_comparison.py
Expand All @@ -17,10 +19,12 @@ regula/documentreader/webclient/gen/models/device_info.py
regula/documentreader/webclient/gen/models/doc_visual_extended_field.py
regula/documentreader/webclient/gen/models/doc_visual_extended_info.py
regula/documentreader/webclient/gen/models/document_format.py
regula/documentreader/webclient/gen/models/document_image.py
regula/documentreader/webclient/gen/models/document_image_result.py
regula/documentreader/webclient/gen/models/document_image_result_all_of.py
regula/documentreader/webclient/gen/models/document_type.py
regula/documentreader/webclient/gen/models/document_type_recognition_result.py
regula/documentreader/webclient/gen/models/document_types_candidates.py
regula/documentreader/webclient/gen/models/document_types_candidates_list.py
regula/documentreader/webclient/gen/models/document_types_candidates_result.py
regula/documentreader/webclient/gen/models/document_types_candidates_result_all_of.py
Expand All @@ -31,6 +35,7 @@ regula/documentreader/webclient/gen/models/graphic_fields_list.py
regula/documentreader/webclient/gen/models/graphics_result.py
regula/documentreader/webclient/gen/models/graphics_result_all_of.py
regula/documentreader/webclient/gen/models/image_data.py
regula/documentreader/webclient/gen/models/image_qa.py
regula/documentreader/webclient/gen/models/images.py
regula/documentreader/webclient/gen/models/images_available_source.py
regula/documentreader/webclient/gen/models/images_field.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from regula.documentreader.webclient import ProcessResponse
from regula.documentreader.webclient.gen import ApiClient
from regula.documentreader.webclient.ext.models.recognition_response import RecognitionResponse
from regula.documentreader.webclient.gen.api import DefaultApi
from regula.documentreader.webclient.gen.api import DefaultApi, ProcessApi
from regula.documentreader.webclient.gen.configuration import Configuration
from regula.documentreader.webclient.gen.models import ProcessRequest

Base64String = str


class DocumentReaderApi(DefaultApi):
class DocumentReaderApi(DefaultApi, ProcessApi):

def __init__(self, host=None, debug=False, verify_ssl=False, api_client=None):
if api_client:
Expand Down
5 changes: 5 additions & 0 deletions regula/documentreader/webclient/gen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# import apis into sdk package
from regula.documentreader.webclient.gen.api.default_api import DefaultApi
from regula.documentreader.webclient.gen.api.process_api import ProcessApi

# import ApiClient
from regula.documentreader.webclient.gen.api_client import ApiClient
Expand All @@ -24,6 +25,7 @@
from regula.documentreader.webclient.gen.exceptions import ApiException
# import models into sdk package
from regula.documentreader.webclient.gen.models.check_result import CheckResult
from regula.documentreader.webclient.gen.models.chosen_document_type import ChosenDocumentType
from regula.documentreader.webclient.gen.models.chosen_document_type_result import ChosenDocumentTypeResult
from regula.documentreader.webclient.gen.models.chosen_document_type_result_all_of import ChosenDocumentTypeResultAllOf
from regula.documentreader.webclient.gen.models.container_list import ContainerList
Expand All @@ -34,10 +36,12 @@
from regula.documentreader.webclient.gen.models.doc_visual_extended_field import DocVisualExtendedField
from regula.documentreader.webclient.gen.models.doc_visual_extended_info import DocVisualExtendedInfo
from regula.documentreader.webclient.gen.models.document_format import DocumentFormat
from regula.documentreader.webclient.gen.models.document_image import DocumentImage
from regula.documentreader.webclient.gen.models.document_image_result import DocumentImageResult
from regula.documentreader.webclient.gen.models.document_image_result_all_of import DocumentImageResultAllOf
from regula.documentreader.webclient.gen.models.document_type import DocumentType
from regula.documentreader.webclient.gen.models.document_type_recognition_result import DocumentTypeRecognitionResult
from regula.documentreader.webclient.gen.models.document_types_candidates import DocumentTypesCandidates
from regula.documentreader.webclient.gen.models.document_types_candidates_list import DocumentTypesCandidatesList
from regula.documentreader.webclient.gen.models.document_types_candidates_result import DocumentTypesCandidatesResult
from regula.documentreader.webclient.gen.models.document_types_candidates_result_all_of import DocumentTypesCandidatesResultAllOf
Expand All @@ -48,6 +52,7 @@
from regula.documentreader.webclient.gen.models.graphics_result import GraphicsResult
from regula.documentreader.webclient.gen.models.graphics_result_all_of import GraphicsResultAllOf
from regula.documentreader.webclient.gen.models.image_data import ImageData
from regula.documentreader.webclient.gen.models.image_qa import ImageQA
from regula.documentreader.webclient.gen.models.images import Images
from regula.documentreader.webclient.gen.models.images_available_source import ImagesAvailableSource
from regula.documentreader.webclient.gen.models.images_field import ImagesField
Expand Down
1 change: 1 addition & 0 deletions regula/documentreader/webclient/gen/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

# import apis into api package
from regula.documentreader.webclient.gen.api.default_api import DefaultApi
from regula.documentreader.webclient.gen.api.process_api import ProcessApi
139 changes: 0 additions & 139 deletions regula/documentreader/webclient/gen/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,145 +30,6 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client

def api_process(self, process_request, **kwargs): # noqa: E501
"""Process list of documents images and return extracted data # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.api_process(process_request, async_req=True)
>>> result = thread.get()
:param process_request: (required)
:type process_request: ProcessRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: ProcessResponse
"""
kwargs['_return_http_data_only'] = True
return self.api_process_with_http_info(process_request, **kwargs) # noqa: E501

def api_process_with_http_info(self, process_request, **kwargs): # noqa: E501
"""Process list of documents images and return extracted data # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.api_process_with_http_info(process_request, async_req=True)
>>> result = thread.get()
:param process_request: (required)
:type process_request: ProcessRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict))
"""

local_var_params = locals()

all_params = [
'process_request'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)

for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method api_process" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'process_request' is set
if self.api_client.client_side_validation and ('process_request' not in local_var_params or # noqa: E501
local_var_params['process_request'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `process_request` when calling `api_process`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'process_request' in local_var_params:
body_params = local_var_params['process_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = [] # noqa: E501

response_types_map = {
200: "ProcessResponse",
400: None,
403: None,
}

return self.api_client.call_api(
'/api/process', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def ping(self, **kwargs): # noqa: E501
"""Server health check # noqa: E501
Expand Down
Loading

0 comments on commit be296f0

Please sign in to comment.