Skip to content

Commit

Permalink
Add checkLiveness field to Process Params
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 19, 2023
1 parent 68ff93c commit ff3ba1e
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 4 deletions.
30 changes: 29 additions & 1 deletion regula/documentreader/webclient/gen/models/image_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ImageQA(object):
and the value is json key in definition.
"""
openapi_types = {
'brightness_threshold': 'float',
'dpi_threshold': 'int',
'angle_threshold': 'int',
'focus_check': 'bool',
Expand All @@ -42,6 +43,7 @@ class ImageQA(object):
}

attribute_map = {
'brightness_threshold': 'brightnessThreshold',
'dpi_threshold': 'dpiThreshold',
'angle_threshold': 'angleThreshold',
'focus_check': 'focusCheck',
Expand All @@ -51,12 +53,13 @@ class ImageQA(object):
'document_position_indent': 'documentPositionIndent'
}

def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, glares_check=None, colorness_check=None, moire_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, moire_check=None, document_position_indent=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()
self.local_vars_configuration = local_vars_configuration

self._brightness_threshold = None
self._dpi_threshold = None
self._angle_threshold = None
self._focus_check = None
Expand All @@ -66,6 +69,8 @@ def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, g
self._document_position_indent = None
self.discriminator = None

if brightness_threshold is not None:
self.brightness_threshold = brightness_threshold
if dpi_threshold is not None:
self.dpi_threshold = dpi_threshold
if angle_threshold is not None:
Expand All @@ -81,6 +86,29 @@ def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, g
if document_position_indent is not None:
self.document_position_indent = document_position_indent

@property
def brightness_threshold(self):
"""Gets the brightness_threshold of this ImageQA. # noqa: E501
Set the threshold for an actual document brightness below which the check fails # noqa: E501
:return: The brightness_threshold of this ImageQA. # noqa: E501
:rtype: float
"""
return self._brightness_threshold

@brightness_threshold.setter
def brightness_threshold(self, brightness_threshold):
"""Sets the brightness_threshold of this ImageQA.
Set the threshold for an actual document brightness below which the check fails # noqa: E501
:param brightness_threshold: The brightness_threshold of this ImageQA. # noqa: E501
:type brightness_threshold: float
"""

self._brightness_threshold = brightness_threshold

@property
def dpi_threshold(self):
"""Gets the dpi_threshold of this ImageQA. # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class ImageQualityCheckType(object):

Portrait = int("7")

allowable_values = [ImageGlares, ImageFocus, ImageResolution, ImageColorness, Perspective, Bounds, ScreenCapture, Portrait] # noqa: E501
Brightness = int("8")

allowable_values = [ImageGlares, ImageFocus, ImageResolution, ImageColorness, Perspective, Bounds, ScreenCapture, Portrait, Brightness] # noqa: E501

"""
Attributes:
Expand Down
8 changes: 7 additions & 1 deletion regula/documentreader/webclient/gen/models/lcid.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class LCID(object):

BULGARIAN = int("1026")

BURMESE = int("1109")

CATALAN = int("1027")

CHINESE_HONGKONG_SAR = int("3076")
Expand Down Expand Up @@ -187,6 +189,8 @@ class LCID(object):

KAZAKH = int("1087")

KHMER = int("1107")

KONKANI = int("1111")

KOREAN = int("1042")
Expand All @@ -201,6 +205,8 @@ class LCID(object):

MALAY_BRUNEI_DARUSSALAM = int("2110")

MALTESE = int("1082")

MARATHI = int("1102")

MONGOLIAN_CYRILIC = int("1104")
Expand Down Expand Up @@ -309,7 +315,7 @@ class LCID(object):

CTC_TRADITIONAL = int("50002")

allowable_values = [LATIN, AFRIKAANS, ALBANIAN, ARABIC_ALGERIA, ARABIC_BAHRAIN, ARABIC_EGYPT, ARABIC_IRAQ, ARABIC_JORDAN, ARABIC_KUWAIT, ARABIC_LEBANON, ARABIC_LIBYA, ARABIC_MOROCCO, ARABIC_OMAN, ARABIC_QATAR, ARABIC_SAUDI_ARABIA, ARABIC_SYRIA, ARABIC_TUNISIA, ARABIC_UAE, ARABIC_YEMEN, ARABIC_ARMENIAN, AZERI_CYRILIC, AZERI_LATIN, BASQUE, BELARUSIAN, BULGARIAN, CATALAN, CHINESE_HONGKONG_SAR, CHINESE_MACAO_SAR, CHINESE, CHINESE_SINGAPORE, CHINESE_TAIWAN, CROATIAN, CZECH, DANISH, DIVEHI, DUTCH_BELGIUM, DUTCH_NETHERLANDS, ENGLISH_AUSTRALIA, ENGLISH_BELIZE, ENGLISH_CANADA, ENGLISH_CARRIBEAN, ENGLISH_IRELAND, ENGLISH_JAMAICA, ENGLISH_NEW_ZEALAND, ENGLISH_PHILIPPINES, ENGLISH_SOUTH_AFRICA, ENGLISH_TRINIDAD, ENGLISH_UK, ENGLISH_US, ENGLISH_ZIMBABWE, ESTONIAN, FAEROESE, FARSI, FINNISH, FRENCH_BELGIUM, FRENCH_CANADA, FRENCH_FRANCE, FRENCH_LUXEMBOURG, FRENCH_MONACO, FRENCH_SWITZERLAND, FYRO_MACEDONIAN, GALICIAN, GEORGIAN, GERMAN_AUSTRIA, GERMAN_GERMANY, GERMAN_LIECHTENSTEIN, GERMAN_LUXEMBOURG, GERMAN_SWITZERLAND, GREEK, GUJARATI, HEBREW, HINDI_INDIA, HUNGARIAN, ICELANDIC, INDONESIAN, ITALIAN_ITALY, ITALIAN_SWITZERLAND, JAPANESE, KANNADA, KAZAKH, KONKANI, KOREAN, KYRGYZ_CYRILICK, LATVIAN, LITHUANIAN, MALAY_MALAYSIA, MALAY_BRUNEI_DARUSSALAM, MARATHI, MONGOLIAN_CYRILIC, NORWEGIAN_BOKMAL, NORWEGIAN_NYORSK, POLISH, PORTUGUESE_BRAZIL, PORTUGUESE_PORTUGAL, PUNJABI, RHAETO_ROMANIC, ROMANIAN, RUSSIAN, SANSKRIT, SERBIAN_CYRILIC, SERBIAN_LATIN, SLOVAK, SLOVENIAN, SPANISH_ARGENTINA, SPANISH_BOLIVIA, SPANISH_CHILE, SPANICH_COLOMBIA, SPANISH_COSTA_RICA, SPANISH_DOMINICAN_REPUBLIC, SPANISH_ECUADOR, SPANISH_EL_SALVADOR, SPANISH_GUATEMALA, SPANISH_HONDURAS, SPANISH_MEXICO, SPANISH_NICARAGUA, SPANISH_PANAMA, SPANISH_PARAGUAY, SPANISH_PERU, SPANISH_PUERTO_RICO, SPANISH_TRADITIONAL_SORT, SPANISH_INTERNATIONAL_SORT, SPANISH_URUGUAY, SPANISH_VENEZUELA, SWAHILI, SWEDISH, SWEDISH_FINLAND, SYRIAC, TAMIL, TATAR, TELUGU, THAI_THAILAND, TURKISH, TAJIK_CYRILLIC, TURKMEN, UKRAINIAN, URDU, UZBEK_CYRILIC, UZBEK_LATIN, VIETNAMESE, CTC_SIMPLIFIED, CTC_TRADITIONAL] # noqa: E501
allowable_values = [LATIN, AFRIKAANS, ALBANIAN, ARABIC_ALGERIA, ARABIC_BAHRAIN, ARABIC_EGYPT, ARABIC_IRAQ, ARABIC_JORDAN, ARABIC_KUWAIT, ARABIC_LEBANON, ARABIC_LIBYA, ARABIC_MOROCCO, ARABIC_OMAN, ARABIC_QATAR, ARABIC_SAUDI_ARABIA, ARABIC_SYRIA, ARABIC_TUNISIA, ARABIC_UAE, ARABIC_YEMEN, ARABIC_ARMENIAN, AZERI_CYRILIC, AZERI_LATIN, BASQUE, BELARUSIAN, BULGARIAN, BURMESE, CATALAN, CHINESE_HONGKONG_SAR, CHINESE_MACAO_SAR, CHINESE, CHINESE_SINGAPORE, CHINESE_TAIWAN, CROATIAN, CZECH, DANISH, DIVEHI, DUTCH_BELGIUM, DUTCH_NETHERLANDS, ENGLISH_AUSTRALIA, ENGLISH_BELIZE, ENGLISH_CANADA, ENGLISH_CARRIBEAN, ENGLISH_IRELAND, ENGLISH_JAMAICA, ENGLISH_NEW_ZEALAND, ENGLISH_PHILIPPINES, ENGLISH_SOUTH_AFRICA, ENGLISH_TRINIDAD, ENGLISH_UK, ENGLISH_US, ENGLISH_ZIMBABWE, ESTONIAN, FAEROESE, FARSI, FINNISH, FRENCH_BELGIUM, FRENCH_CANADA, FRENCH_FRANCE, FRENCH_LUXEMBOURG, FRENCH_MONACO, FRENCH_SWITZERLAND, FYRO_MACEDONIAN, GALICIAN, GEORGIAN, GERMAN_AUSTRIA, GERMAN_GERMANY, GERMAN_LIECHTENSTEIN, GERMAN_LUXEMBOURG, GERMAN_SWITZERLAND, GREEK, GUJARATI, HEBREW, HINDI_INDIA, HUNGARIAN, ICELANDIC, INDONESIAN, ITALIAN_ITALY, ITALIAN_SWITZERLAND, JAPANESE, KANNADA, KAZAKH, KHMER, KONKANI, KOREAN, KYRGYZ_CYRILICK, LATVIAN, LITHUANIAN, MALAY_MALAYSIA, MALAY_BRUNEI_DARUSSALAM, MALTESE, MARATHI, MONGOLIAN_CYRILIC, NORWEGIAN_BOKMAL, NORWEGIAN_NYORSK, POLISH, PORTUGUESE_BRAZIL, PORTUGUESE_PORTUGAL, PUNJABI, RHAETO_ROMANIC, ROMANIAN, RUSSIAN, SANSKRIT, SERBIAN_CYRILIC, SERBIAN_LATIN, SLOVAK, SLOVENIAN, SPANISH_ARGENTINA, SPANISH_BOLIVIA, SPANISH_CHILE, SPANICH_COLOMBIA, SPANISH_COSTA_RICA, SPANISH_DOMINICAN_REPUBLIC, SPANISH_ECUADOR, SPANISH_EL_SALVADOR, SPANISH_GUATEMALA, SPANISH_HONDURAS, SPANISH_MEXICO, SPANISH_NICARAGUA, SPANISH_PANAMA, SPANISH_PARAGUAY, SPANISH_PERU, SPANISH_PUERTO_RICO, SPANISH_TRADITIONAL_SORT, SPANISH_INTERNATIONAL_SORT, SPANISH_URUGUAY, SPANISH_VENEZUELA, SWAHILI, SWEDISH, SWEDISH_FINLAND, SYRIAC, TAMIL, TATAR, TELUGU, THAI_THAILAND, TURKISH, TAJIK_CYRILLIC, TURKMEN, UKRAINIAN, URDU, UZBEK_CYRILIC, UZBEK_LATIN, VIETNAMESE, CTC_SIMPLIFIED, CTC_TRADITIONAL] # noqa: E501

"""
Attributes:
Expand Down
58 changes: 57 additions & 1 deletion regula/documentreader/webclient/gen/models/process_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class ProcessParams(object):
and the value is json key in definition.
"""
openapi_types = {
'check_liveness': 'bool',
'lcid_ignore_filter': 'list[int]',
'one_shot_identification': 'bool',
'use_face_api': 'bool',
'face_api': 'FaceApi',
Expand Down Expand Up @@ -84,6 +86,8 @@ class ProcessParams(object):
}

attribute_map = {
'check_liveness': 'checkLiveness',
'lcid_ignore_filter': 'lcidIgnoreFilter',
'one_shot_identification': 'oneShotIdentification',
'use_face_api': 'useFaceApi',
'face_api': 'faceApi',
Expand Down Expand Up @@ -135,12 +139,14 @@ class ProcessParams(object):
'rfid': 'rfid'
}

def __init__(self, one_shot_identification=None, use_face_api=None, face_api=None, do_detect_can=None, image_output_max_height=None, image_output_max_width=None, 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, respect_image_quality=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, split_names=None, disable_perforation_ocr=None, document_group_filter=None, process_auth=None, device_id=None, device_type=None, device_type_hex=None, ignore_device_id_from_image=None, document_id_list=None, rfid=None, local_vars_configuration=None): # noqa: E501
def __init__(self, check_liveness=False, lcid_ignore_filter=[], one_shot_identification=None, use_face_api=None, face_api=None, do_detect_can=None, image_output_max_height=None, image_output_max_width=None, 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, respect_image_quality=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, split_names=None, disable_perforation_ocr=None, document_group_filter=None, process_auth=None, device_id=None, device_type=None, device_type_hex=None, ignore_device_id_from_image=None, document_id_list=None, rfid=None, local_vars_configuration=None): # noqa: E501
"""ProcessParams - 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._check_liveness = None
self._lcid_ignore_filter = None
self._one_shot_identification = None
self._use_face_api = None
self._face_api = None
Expand Down Expand Up @@ -192,6 +198,10 @@ def __init__(self, one_shot_identification=None, use_face_api=None, face_api=Non
self._rfid = None
self.discriminator = None

if check_liveness is not None:
self.check_liveness = check_liveness
if lcid_ignore_filter is not None:
self.lcid_ignore_filter = lcid_ignore_filter
if one_shot_identification is not None:
self.one_shot_identification = one_shot_identification
if use_face_api is not None:
Expand Down Expand Up @@ -290,6 +300,52 @@ def __init__(self, one_shot_identification=None, use_face_api=None, face_api=Non
if rfid is not None:
self.rfid = rfid

@property
def check_liveness(self):
"""Gets the check_liveness of this ProcessParams. # noqa: E501
This parameter is used to enable document liveness check. # noqa: E501
:return: The check_liveness of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._check_liveness

@check_liveness.setter
def check_liveness(self, check_liveness):
"""Sets the check_liveness of this ProcessParams.
This parameter is used to enable document liveness check. # noqa: E501
:param check_liveness: The check_liveness of this ProcessParams. # noqa: E501
:type check_liveness: bool
"""

self._check_liveness = check_liveness

@property
def lcid_ignore_filter(self):
"""Gets the lcid_ignore_filter of this ProcessParams. # noqa: E501
The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. # noqa: E501
:return: The lcid_ignore_filter of this ProcessParams. # noqa: E501
:rtype: list[int]
"""
return self._lcid_ignore_filter

@lcid_ignore_filter.setter
def lcid_ignore_filter(self, lcid_ignore_filter):
"""Sets the lcid_ignore_filter of this ProcessParams.
The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. # noqa: E501
:param lcid_ignore_filter: The lcid_ignore_filter of this ProcessParams. # noqa: E501
:type lcid_ignore_filter: list[int]
"""

self._lcid_ignore_filter = lcid_ignore_filter

@property
def one_shot_identification(self):
"""Gets the one_shot_identification of this ProcessParams. # noqa: E501
Expand Down

0 comments on commit ff3ba1e

Please sign in to comment.