regula-documentreader-webclient 8.1.355rc0__py3-none-any.whl → 8.1.357.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of regula-documentreader-webclient might be problematic. Click here for more details.
- regula/documentreader/webclient/ext/__init__.py +0 -1
- regula/documentreader/webclient/ext/api/document_reader_api.py +2 -2
- regula/documentreader/webclient/ext/models/__init__.py +0 -2
- regula/documentreader/webclient/ext/models/authenticity/authenticity_check_list.py +64 -19
- regula/documentreader/webclient/ext/models/authenticity/fiber.py +7 -7
- regula/documentreader/webclient/ext/models/authenticity/ident.py +10 -9
- regula/documentreader/webclient/ext/models/authenticity/image_ident.py +8 -7
- regula/documentreader/webclient/ext/models/authenticity/ocr_security_text.py +7 -7
- regula/documentreader/webclient/ext/models/authenticity/security_feature.py +10 -8
- regula/documentreader/webclient/ext/models/images.py +4 -4
- regula/documentreader/webclient/ext/models/recognition_request.py +23 -24
- regula/documentreader/webclient/ext/models/recognition_response.py +6 -8
- regula/documentreader/webclient/ext/models/text.py +7 -12
- regula/documentreader/webclient/gen/__init__.py +100 -26
- regula/documentreader/webclient/gen/api/__init__.py +1 -2
- regula/documentreader/webclient/gen/api/healthcheck_api.py +687 -298
- regula/documentreader/webclient/gen/api/process_api.py +270 -125
- regula/documentreader/webclient/gen/api/transaction_api.py +1472 -673
- regula/documentreader/webclient/gen/api_client.py +583 -462
- regula/documentreader/webclient/gen/api_response.py +21 -0
- regula/documentreader/webclient/gen/configuration.py +222 -99
- regula/documentreader/webclient/gen/exceptions.py +81 -30
- regula/documentreader/webclient/gen/models/__init__.py +98 -25
- regula/documentreader/webclient/gen/models/area_array.py +85 -131
- regula/documentreader/webclient/gen/models/area_container.py +85 -157
- regula/documentreader/webclient/gen/models/auth_params.py +100 -526
- regula/documentreader/webclient/gen/models/authenticity_check_list.py +75 -136
- regula/documentreader/webclient/gen/models/authenticity_check_list_item.py +83 -0
- regula/documentreader/webclient/gen/models/authenticity_check_result.py +81 -160
- regula/documentreader/webclient/gen/models/authenticity_check_result_item.py +154 -217
- regula/documentreader/webclient/gen/models/authenticity_check_result_list_inner.py +174 -0
- regula/documentreader/webclient/gen/models/authenticity_result.py +68 -231
- regula/documentreader/webclient/gen/models/authenticity_result_type.py +35 -123
- regula/documentreader/webclient/gen/models/bar_code_module_type.py +32 -0
- regula/documentreader/webclient/gen/models/barcode_type.py +47 -0
- regula/documentreader/webclient/gen/models/bc_pdf417_info.py +75 -235
- regula/documentreader/webclient/gen/models/bc_roidetect.py +71 -183
- regula/documentreader/webclient/gen/models/binary_data.py +218 -0
- regula/documentreader/webclient/gen/models/byte_array_item.py +79 -0
- regula/documentreader/webclient/gen/models/byte_array_result.py +64 -233
- regula/documentreader/webclient/gen/models/candidates_list_item.py +83 -0
- regula/documentreader/webclient/gen/models/certificate_data.py +81 -0
- regula/documentreader/webclient/gen/models/check_diagnose.py +138 -329
- regula/documentreader/webclient/gen/models/check_result.py +15 -84
- regula/documentreader/webclient/gen/models/chosen_document_type.py +94 -334
- regula/documentreader/webclient/gen/models/chosen_document_type_result.py +80 -264
- regula/documentreader/webclient/gen/models/container_list.py +75 -134
- regula/documentreader/webclient/gen/models/container_list_list_inner.py +426 -0
- regula/documentreader/webclient/gen/models/critical.py +14 -82
- regula/documentreader/webclient/gen/models/cross_source_value_comparison.py +67 -156
- regula/documentreader/webclient/gen/models/data_module.py +74 -209
- regula/documentreader/webclient/gen/models/details_optical.py +83 -298
- regula/documentreader/webclient/gen/models/details_rfid.py +78 -268
- regula/documentreader/webclient/gen/models/device_info.py +76 -235
- regula/documentreader/webclient/gen/models/doc_bar_code_info.py +68 -230
- regula/documentreader/webclient/gen/models/doc_bar_code_info_fields_list.py +75 -135
- regula/documentreader/webclient/gen/models/doc_bar_code_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/doc_graphics_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/doc_visual_extended_field.py +105 -301
- regula/documentreader/webclient/gen/models/doc_visual_extended_field_item.py +83 -0
- regula/documentreader/webclient/gen/models/doc_visual_extended_info.py +75 -106
- regula/documentreader/webclient/gen/models/doc_visual_extended_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/document_binary_info_result.py +90 -0
- regula/documentreader/webclient/gen/models/document_format.py +27 -105
- regula/documentreader/webclient/gen/models/document_image.py +63 -132
- regula/documentreader/webclient/gen/models/document_image_result.py +68 -231
- regula/documentreader/webclient/gen/models/document_position.py +111 -340
- regula/documentreader/webclient/gen/models/document_position_item.py +83 -0
- regula/documentreader/webclient/gen/models/document_position_result.py +68 -230
- regula/documentreader/webclient/gen/models/document_type.py +243 -539
- regula/documentreader/webclient/gen/models/document_type_recognition_result.py +15 -84
- regula/documentreader/webclient/gen/models/document_types_candidates.py +76 -131
- regula/documentreader/webclient/gen/models/document_types_candidates_list.py +76 -131
- regula/documentreader/webclient/gen/models/document_types_candidates_result.py +68 -230
- regula/documentreader/webclient/gen/models/documents_database.py +71 -191
- regula/documentreader/webclient/gen/models/encrypted_rcl_item.py +79 -0
- regula/documentreader/webclient/gen/models/encrypted_rcl_result.py +64 -233
- regula/documentreader/webclient/gen/models/error_coordinates.py +85 -0
- regula/documentreader/webclient/gen/models/face_api.py +88 -358
- regula/documentreader/webclient/gen/models/face_api_search.py +65 -159
- regula/documentreader/webclient/gen/models/face_detection.py +95 -0
- regula/documentreader/webclient/gen/models/face_detection_item.py +83 -0
- regula/documentreader/webclient/gen/models/face_detection_result.py +90 -0
- regula/documentreader/webclient/gen/models/face_item.py +109 -0
- regula/documentreader/webclient/gen/models/fdsid_list.py +91 -390
- regula/documentreader/webclient/gen/models/fiber_item.py +106 -0
- regula/documentreader/webclient/gen/models/fiber_result.py +103 -439
- regula/documentreader/webclient/gen/models/field_item.py +89 -0
- regula/documentreader/webclient/gen/models/file_image.py +81 -0
- regula/documentreader/webclient/gen/models/get_transactions_by_tag_response.py +66 -159
- regula/documentreader/webclient/gen/models/graph_data.py +95 -0
- regula/documentreader/webclient/gen/models/graphic_field.py +80 -271
- regula/documentreader/webclient/gen/models/graphic_field_type.py +40 -131
- regula/documentreader/webclient/gen/models/graphic_fields_list.py +75 -106
- regula/documentreader/webclient/gen/models/graphics_result.py +68 -231
- regula/documentreader/webclient/gen/models/healthcheck.py +117 -297
- regula/documentreader/webclient/gen/models/healthcheck_documents_database.py +91 -187
- regula/documentreader/webclient/gen/models/ident_item.py +110 -0
- regula/documentreader/webclient/gen/models/ident_result.py +107 -345
- regula/documentreader/webclient/gen/models/image_data.py +63 -132
- regula/documentreader/webclient/gen/models/image_qa.py +83 -304
- regula/documentreader/webclient/gen/models/image_quality_check.py +86 -263
- regula/documentreader/webclient/gen/models/image_quality_check_list.py +78 -133
- regula/documentreader/webclient/gen/models/image_quality_check_list_item.py +83 -0
- regula/documentreader/webclient/gen/models/image_quality_check_type.py +22 -97
- regula/documentreader/webclient/gen/models/image_quality_result.py +68 -231
- regula/documentreader/webclient/gen/models/image_transaction_data.py +61 -97
- regula/documentreader/webclient/gen/models/images.py +87 -133
- regula/documentreader/webclient/gen/models/images_available_source.py +64 -130
- regula/documentreader/webclient/gen/models/images_field.py +80 -162
- regula/documentreader/webclient/gen/models/images_field_value.py +94 -331
- regula/documentreader/webclient/gen/models/images_item.py +83 -0
- regula/documentreader/webclient/gen/models/images_result.py +68 -231
- regula/documentreader/webclient/gen/models/in_data.py +79 -131
- regula/documentreader/webclient/gen/models/in_data_transaction_images_field_value.py +72 -187
- regula/documentreader/webclient/gen/models/in_data_video.py +63 -131
- regula/documentreader/webclient/gen/models/input_barcode_type.py +33 -119
- regula/documentreader/webclient/gen/models/input_image_quality_checks.py +22 -97
- regula/documentreader/webclient/gen/models/lcid.py +179 -402
- regula/documentreader/webclient/gen/models/lexical_analysis_result.py +68 -234
- regula/documentreader/webclient/gen/models/license_item.py +79 -0
- regula/documentreader/webclient/gen/models/license_result.py +64 -233
- regula/documentreader/webclient/gen/models/light.py +61 -87
- regula/documentreader/webclient/gen/models/list_transactions_by_tag_response.py +75 -131
- regula/documentreader/webclient/gen/models/list_verified_fields.py +77 -105
- regula/documentreader/webclient/gen/models/list_verified_fields_item.py +83 -0
- regula/documentreader/webclient/gen/models/liveness_params.py +77 -247
- regula/documentreader/webclient/gen/models/log_level.py +17 -88
- regula/documentreader/webclient/gen/models/measure_system.py +14 -82
- regula/documentreader/webclient/gen/models/mrz_detect_mode_enum.py +15 -84
- regula/documentreader/webclient/gen/models/mrz_detector_result.py +90 -0
- regula/documentreader/webclient/gen/models/mrz_format.py +18 -90
- regula/documentreader/webclient/gen/models/mrz_position.py +124 -0
- regula/documentreader/webclient/gen/models/mrz_position_item.py +83 -0
- regula/documentreader/webclient/gen/models/mrz_position_result.py +90 -0
- regula/documentreader/webclient/gen/models/mrz_rows_item.py +91 -0
- regula/documentreader/webclient/gen/models/mrz_test_quality.py +105 -0
- regula/documentreader/webclient/gen/models/mrz_test_quality_item.py +83 -0
- regula/documentreader/webclient/gen/models/mrz_test_quality_result.py +90 -0
- regula/documentreader/webclient/gen/models/ocr_security_text_item.py +110 -0
- regula/documentreader/webclient/gen/models/ocr_security_text_result.py +107 -449
- regula/documentreader/webclient/gen/models/one_candidate.py +94 -334
- regula/documentreader/webclient/gen/models/one_candidate_item.py +87 -0
- regula/documentreader/webclient/gen/models/original_symbol.py +74 -167
- regula/documentreader/webclient/gen/models/out_data.py +75 -133
- regula/documentreader/webclient/gen/models/out_data_transaction_images_field_value.py +75 -213
- regula/documentreader/webclient/gen/models/p_array_field.py +103 -342
- regula/documentreader/webclient/gen/models/parsed_data.py +79 -0
- regula/documentreader/webclient/gen/models/parsing_error_codes.py +153 -0
- regula/documentreader/webclient/gen/models/parsing_notification_codes.py +237 -523
- regula/documentreader/webclient/gen/models/per_document_config.py +63 -131
- regula/documentreader/webclient/gen/models/photo_ident_item.py +110 -0
- regula/documentreader/webclient/gen/models/photo_ident_result.py +107 -423
- regula/documentreader/webclient/gen/models/point.py +63 -127
- regula/documentreader/webclient/gen/models/point_array.py +65 -97
- regula/documentreader/webclient/gen/models/points_container.py +75 -131
- regula/documentreader/webclient/gen/models/process_params.py +229 -1743
- regula/documentreader/webclient/gen/models/process_params_rfid.py +56 -97
- regula/documentreader/webclient/gen/models/process_request.py +113 -411
- regula/documentreader/webclient/gen/models/process_request_image.py +74 -159
- regula/documentreader/webclient/gen/models/process_response.py +96 -299
- regula/documentreader/webclient/gen/models/process_system_info.py +63 -131
- regula/documentreader/webclient/gen/models/processing_status.py +15 -84
- regula/documentreader/webclient/gen/models/raw_image_container_item.py +83 -0
- regula/documentreader/webclient/gen/models/raw_image_container_list.py +75 -131
- regula/documentreader/webclient/gen/models/rectangle_coordinates.py +71 -187
- regula/documentreader/webclient/gen/models/result.py +49 -133
- regula/documentreader/webclient/gen/models/result_item.py +195 -245
- regula/documentreader/webclient/gen/models/result_mrz_detector.py +93 -0
- regula/documentreader/webclient/gen/models/result_mrz_detector_item.py +83 -0
- regula/documentreader/webclient/gen/models/rfid_a_chip.py +33 -0
- regula/documentreader/webclient/gen/models/rfid_access_control_info.py +90 -0
- regula/documentreader/webclient/gen/models/rfid_access_control_procedure_type.py +35 -0
- regula/documentreader/webclient/gen/models/rfid_access_key.py +87 -0
- regula/documentreader/webclient/gen/models/rfid_application.py +101 -0
- regula/documentreader/webclient/gen/models/rfid_application_type.py +37 -0
- regula/documentreader/webclient/gen/models/rfid_attribute_data.py +81 -0
- regula/documentreader/webclient/gen/models/rfid_attribute_name.py +85 -0
- regula/documentreader/webclient/gen/models/rfid_authentication_procedure_type.py +31 -0
- regula/documentreader/webclient/gen/models/rfid_baud_rate.py +32 -0
- regula/documentreader/webclient/gen/models/rfid_card_properties_ext.py +123 -0
- regula/documentreader/webclient/gen/models/rfid_certificate_ex.py +130 -0
- regula/documentreader/webclient/gen/models/rfid_certificate_origin.py +36 -0
- regula/documentreader/webclient/gen/models/rfid_certificate_type.py +35 -0
- regula/documentreader/webclient/gen/models/rfid_data_file.py +118 -0
- regula/documentreader/webclient/gen/models/rfid_data_file_type.py +119 -0
- regula/documentreader/webclient/gen/models/rfid_data_group_type_tag.py +82 -0
- regula/documentreader/webclient/gen/models/rfid_dg1.py +111 -0
- regula/documentreader/webclient/gen/models/rfid_distinguished_name.py +95 -0
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_field.py +120 -0
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_field_item.py +85 -0
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_info.py +89 -0
- regula/documentreader/webclient/gen/models/rfid_doc_visual_extended_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/rfid_error_codes.py +141 -0
- regula/documentreader/webclient/gen/models/rfid_graphics_info_result.py +90 -0
- regula/documentreader/webclient/gen/models/rfid_location.py +15 -84
- regula/documentreader/webclient/gen/models/rfid_origin.py +71 -192
- regula/documentreader/webclient/gen/models/rfid_password_type.py +34 -0
- regula/documentreader/webclient/gen/models/rfid_pki_extension.py +81 -0
- regula/documentreader/webclient/gen/models/rfid_raw_data.py +81 -0
- regula/documentreader/webclient/gen/models/rfid_security_object.py +96 -0
- regula/documentreader/webclient/gen/models/rfid_session_data.py +150 -0
- regula/documentreader/webclient/gen/models/rfid_signer_info_ex.py +133 -0
- regula/documentreader/webclient/gen/models/rfid_terminal.py +84 -0
- regula/documentreader/webclient/gen/models/rfid_terminal_type.py +32 -0
- regula/documentreader/webclient/gen/models/rfid_text_data_result.py +90 -0
- regula/documentreader/webclient/gen/models/rfid_type.py +30 -0
- regula/documentreader/webclient/gen/models/rfid_validity.py +88 -0
- regula/documentreader/webclient/gen/models/rfidpkd_resource_type.py +35 -0
- regula/documentreader/webclient/gen/models/scenario.py +33 -117
- regula/documentreader/webclient/gen/models/security_feature_item.py +102 -0
- regula/documentreader/webclient/gen/models/security_feature_result.py +99 -345
- regula/documentreader/webclient/gen/models/security_feature_type.py +68 -185
- regula/documentreader/webclient/gen/models/security_object_certificates.py +83 -0
- regula/documentreader/webclient/gen/models/source.py +18 -88
- regula/documentreader/webclient/gen/models/source_validity.py +65 -129
- regula/documentreader/webclient/gen/models/status.py +86 -264
- regula/documentreader/webclient/gen/models/status_item.py +83 -0
- regula/documentreader/webclient/gen/models/status_result.py +68 -231
- regula/documentreader/webclient/gen/models/string_item.py +135 -0
- regula/documentreader/webclient/gen/models/string_recognition_result.py +81 -108
- regula/documentreader/webclient/gen/models/symbol.py +79 -0
- regula/documentreader/webclient/gen/models/symbol_candidate.py +72 -143
- regula/documentreader/webclient/gen/models/symbol_estimation_item.py +115 -0
- regula/documentreader/webclient/gen/models/symbol_recognition_result.py +87 -135
- regula/documentreader/webclient/gen/models/t_doc_binary_info.py +93 -0
- regula/documentreader/webclient/gen/models/t_doc_binary_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/t_original_rfid_graphics_info.py +87 -0
- regula/documentreader/webclient/gen/models/t_original_rfid_graphics_info_item.py +83 -0
- regula/documentreader/webclient/gen/models/text.py +92 -214
- regula/documentreader/webclient/gen/models/text_available_source.py +67 -157
- regula/documentreader/webclient/gen/models/text_data_result.py +68 -230
- regula/documentreader/webclient/gen/models/text_field.py +115 -357
- regula/documentreader/webclient/gen/models/text_field_type.py +661 -1368
- regula/documentreader/webclient/gen/models/text_field_value.py +105 -307
- regula/documentreader/webclient/gen/models/text_item.py +83 -0
- regula/documentreader/webclient/gen/models/text_post_processing.py +16 -86
- regula/documentreader/webclient/gen/models/text_result.py +68 -231
- regula/documentreader/webclient/gen/models/transaction_image.py +61 -97
- regula/documentreader/webclient/gen/models/transaction_info.py +84 -302
- regula/documentreader/webclient/gen/models/transaction_process_get_response.py +79 -183
- regula/documentreader/webclient/gen/models/transaction_process_request.py +108 -299
- regula/documentreader/webclient/gen/models/transaction_process_response.py +107 -0
- regula/documentreader/webclient/gen/models/transaction_process_response_item.py +79 -0
- regula/documentreader/webclient/gen/models/transaction_process_result.py +93 -0
- regula/documentreader/webclient/gen/models/trf_ft_bytes.py +90 -0
- regula/documentreader/webclient/gen/models/trf_ft_string.py +85 -0
- regula/documentreader/webclient/gen/models/verification_result.py +17 -88
- regula/documentreader/webclient/gen/models/verified_field_map.py +85 -273
- regula/documentreader/webclient/gen/models/visibility.py +17 -88
- regula/documentreader/webclient/gen/models/visual_extended_field_item.py +112 -0
- regula/documentreader/webclient/gen/py.typed +0 -0
- regula/documentreader/webclient/gen/rest.py +132 -174
- {regula_documentreader_webclient-8.1.355rc0.dist-info → regula_documentreader_webclient-8.1.357.dev0.dist-info}/METADATA +17 -6
- regula_documentreader_webclient-8.1.357.dev0.dist-info/RECORD +263 -0
- {regula_documentreader_webclient-8.1.355rc0.dist-info → regula_documentreader_webclient-8.1.357.dev0.dist-info}/WHEEL +1 -1
- regula/documentreader/webclient/ext/models/raw_authenticity_result_item.py +0 -27
- regula/documentreader/webclient/ext/models/raw_result_item.py +0 -26
- regula/documentreader/webclient/gen/api/default_api.py +0 -160
- regula/documentreader/webclient/gen/models/authenticity_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/byte_array_result_all_of.py +0 -122
- regula/documentreader/webclient/gen/models/chosen_document_type_result_all_of.py +0 -145
- regula/documentreader/webclient/gen/models/device_info2.py +0 -275
- regula/documentreader/webclient/gen/models/doc_bar_code_info_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/document_image_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/document_position_result_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/document_types_candidates_result_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/encrypted_rcl_result_all_of.py +0 -122
- regula/documentreader/webclient/gen/models/fiber_result_all_of.py +0 -343
- regula/documentreader/webclient/gen/models/graphics_result_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/ident_result_all_of.py +0 -249
- regula/documentreader/webclient/gen/models/image_quality_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/images_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/in_data_rfid_session.py +0 -121
- regula/documentreader/webclient/gen/models/inline_response200.py +0 -197
- regula/documentreader/webclient/gen/models/inline_response2001.py +0 -333
- regula/documentreader/webclient/gen/models/lexical_analysis_result_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/license_result_all_of.py +0 -122
- regula/documentreader/webclient/gen/models/ocr_security_text_result_all_of.py +0 -353
- regula/documentreader/webclient/gen/models/photo_ident_result_all_of.py +0 -327
- regula/documentreader/webclient/gen/models/security_feature_result_all_of.py +0 -249
- regula/documentreader/webclient/gen/models/status_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/text_data_result_all_of.py +0 -119
- regula/documentreader/webclient/gen/models/text_result_all_of.py +0 -120
- regula/documentreader/webclient/gen/models/tfdsid_list.py +0 -372
- regula/documentreader/webclient/gen/models/transaction_images_field_value.py +0 -227
- regula/documentreader/webclient/gen/models/transaction_scenario_request.py +0 -119
- regula_documentreader_webclient-8.1.355rc0.dist-info/RECORD +0 -192
- {regula_documentreader_webclient-8.1.355rc0.dist-info → regula_documentreader_webclient-8.1.357.dev0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import pprint
|
|
9
|
+
import re # noqa: F401
|
|
10
|
+
import json
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List
|
|
14
|
+
from typing import Optional, Set
|
|
15
|
+
from typing_extensions import Self
|
|
16
|
+
|
|
17
|
+
class Symbol(BaseModel):
|
|
18
|
+
"""
|
|
19
|
+
Symbol
|
|
20
|
+
""" # noqa: E501
|
|
21
|
+
bounding_rect: List[StrictInt] = Field(alias="boundingRect")
|
|
22
|
+
__properties: ClassVar[List[str]] = ["boundingRect"]
|
|
23
|
+
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
populate_by_name=True,
|
|
26
|
+
validate_assignment=True,
|
|
27
|
+
protected_namespaces=(),
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def to_str(self) -> str:
|
|
32
|
+
"""Returns the string representation of the model using alias"""
|
|
33
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
34
|
+
|
|
35
|
+
def to_json(self) -> str:
|
|
36
|
+
"""Returns the JSON representation of the model using alias"""
|
|
37
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
38
|
+
return json.dumps(self.to_dict())
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
42
|
+
"""Create an instance of Symbol from a JSON string"""
|
|
43
|
+
return cls.from_dict(json.loads(json_str))
|
|
44
|
+
|
|
45
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
46
|
+
"""Return the dictionary representation of the model using alias.
|
|
47
|
+
|
|
48
|
+
This has the following differences from calling pydantic's
|
|
49
|
+
`self.model_dump(by_alias=True)`:
|
|
50
|
+
|
|
51
|
+
* `None` is only added to the output dict for nullable fields that
|
|
52
|
+
were set at model initialization. Other fields with value `None`
|
|
53
|
+
are ignored.
|
|
54
|
+
"""
|
|
55
|
+
excluded_fields: Set[str] = set([
|
|
56
|
+
])
|
|
57
|
+
|
|
58
|
+
_dict = self.model_dump(
|
|
59
|
+
by_alias=True,
|
|
60
|
+
exclude=excluded_fields,
|
|
61
|
+
exclude_none=True,
|
|
62
|
+
)
|
|
63
|
+
return _dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
67
|
+
"""Create an instance of Symbol from a dict"""
|
|
68
|
+
if obj is None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if not isinstance(obj, dict):
|
|
72
|
+
return cls.model_validate(obj)
|
|
73
|
+
|
|
74
|
+
_obj = cls.model_validate({
|
|
75
|
+
"boundingRect": obj.get("boundingRect")
|
|
76
|
+
})
|
|
77
|
+
return _obj
|
|
78
|
+
|
|
79
|
+
|
|
@@ -4,154 +4,83 @@
|
|
|
4
4
|
Generated by: https://openapi-generator.tech
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
from __future__ import annotations
|
|
7
8
|
import pprint
|
|
8
9
|
import re # noqa: F401
|
|
10
|
+
import json
|
|
9
11
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
from
|
|
13
|
-
|
|
14
|
-
from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"""
|
|
18
|
-
Describes an individual character recognition candidate
|
|
19
|
-
"""
|
|
20
|
-
class SymbolCandidate(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
|
-
"""
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
|
+
from typing_extensions import Annotated
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
26
17
|
|
|
18
|
+
class SymbolCandidate(BaseModel):
|
|
27
19
|
"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
""
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
self.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
20
|
+
Describes an individual character recognition candidate
|
|
21
|
+
""" # noqa: E501
|
|
22
|
+
symbol_code: StrictInt = Field(description="Unicode symbol code", alias="SymbolCode")
|
|
23
|
+
symbol_probability: Annotated[int, Field(le=100, strict=True, ge=0)] = Field(description="character recognition probability (0–100,%)", alias="SymbolProbability")
|
|
24
|
+
var_class: Optional[StrictInt] = Field(default=None, alias="Class")
|
|
25
|
+
sub_class: Optional[StrictInt] = Field(default=None, alias="SubClass")
|
|
26
|
+
__properties: ClassVar[List[str]] = ["SymbolCode", "SymbolProbability", "Class", "SubClass"]
|
|
27
|
+
|
|
28
|
+
model_config = ConfigDict(
|
|
29
|
+
populate_by_name=True,
|
|
30
|
+
validate_assignment=True,
|
|
31
|
+
protected_namespaces=(),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def to_str(self) -> str:
|
|
36
|
+
"""Returns the string representation of the model using alias"""
|
|
37
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
38
|
+
|
|
39
|
+
def to_json(self) -> str:
|
|
40
|
+
"""Returns the JSON representation of the model using alias"""
|
|
41
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
42
|
+
return json.dumps(self.to_dict())
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
46
|
+
"""Create an instance of SymbolCandidate from a JSON string"""
|
|
47
|
+
return cls.from_dict(json.loads(json_str))
|
|
48
|
+
|
|
49
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
50
|
+
"""Return the dictionary representation of the model using alias.
|
|
51
|
+
|
|
52
|
+
This has the following differences from calling pydantic's
|
|
53
|
+
`self.model_dump(by_alias=True)`:
|
|
54
|
+
|
|
55
|
+
* `None` is only added to the output dict for nullable fields that
|
|
56
|
+
were set at model initialization. Other fields with value `None`
|
|
57
|
+
are ignored.
|
|
65
58
|
"""
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
59
|
+
excluded_fields: Set[str] = set([
|
|
60
|
+
])
|
|
61
|
+
|
|
62
|
+
_dict = self.model_dump(
|
|
63
|
+
by_alias=True,
|
|
64
|
+
exclude=excluded_fields,
|
|
65
|
+
exclude_none=True,
|
|
66
|
+
)
|
|
67
|
+
return _dict
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
71
|
+
"""Create an instance of SymbolCandidate from a dict"""
|
|
72
|
+
if obj is None:
|
|
73
|
+
return None
|
|
74
|
+
|
|
75
|
+
if not isinstance(obj, dict):
|
|
76
|
+
return cls.model_validate(obj)
|
|
77
|
+
|
|
78
|
+
_obj = cls.model_validate({
|
|
79
|
+
"SymbolCode": obj.get("SymbolCode"),
|
|
80
|
+
"SymbolProbability": obj.get("SymbolProbability"),
|
|
81
|
+
"Class": obj.get("Class"),
|
|
82
|
+
"SubClass": obj.get("SubClass")
|
|
83
|
+
})
|
|
84
|
+
return _obj
|
|
81
85
|
|
|
82
|
-
@property
|
|
83
|
-
def symbol_probability(self):
|
|
84
|
-
"""Gets the symbol_probability of this SymbolCandidate. # noqa: E501
|
|
85
86
|
|
|
86
|
-
character recognition probability (0–100,%) # noqa: E501
|
|
87
|
-
|
|
88
|
-
:return: The symbol_probability of this SymbolCandidate. # noqa: E501
|
|
89
|
-
:rtype: int
|
|
90
|
-
"""
|
|
91
|
-
return self._symbol_probability
|
|
92
|
-
|
|
93
|
-
@symbol_probability.setter
|
|
94
|
-
def symbol_probability(self, symbol_probability):
|
|
95
|
-
"""Sets the symbol_probability of this SymbolCandidate.
|
|
96
|
-
|
|
97
|
-
character recognition probability (0–100,%) # noqa: E501
|
|
98
|
-
|
|
99
|
-
:param symbol_probability: The symbol_probability of this SymbolCandidate. # noqa: E501
|
|
100
|
-
:type symbol_probability: int
|
|
101
|
-
"""
|
|
102
|
-
if self.local_vars_configuration.client_side_validation and symbol_probability is None: # noqa: E501
|
|
103
|
-
raise ValueError("Invalid value for `symbol_probability`, must not be `None`") # noqa: E501
|
|
104
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
105
|
-
symbol_probability is not None and symbol_probability > 100): # noqa: E501
|
|
106
|
-
raise ValueError("Invalid value for `symbol_probability`, must be a value less than or equal to `100`") # noqa: E501
|
|
107
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
108
|
-
symbol_probability is not None and symbol_probability < 0): # noqa: E501
|
|
109
|
-
raise ValueError("Invalid value for `symbol_probability`, must be a value greater than or equal to `0`") # noqa: E501
|
|
110
|
-
|
|
111
|
-
self._symbol_probability = symbol_probability
|
|
112
|
-
|
|
113
|
-
def to_dict(self):
|
|
114
|
-
"""Returns the model properties as a dict"""
|
|
115
|
-
result = {}
|
|
116
|
-
|
|
117
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
118
|
-
value = getattr(self, attr)
|
|
119
|
-
if isinstance(value, list):
|
|
120
|
-
result[attr] = list(map(
|
|
121
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
122
|
-
value
|
|
123
|
-
))
|
|
124
|
-
elif hasattr(value, "to_dict"):
|
|
125
|
-
result[attr] = value.to_dict()
|
|
126
|
-
elif isinstance(value, dict):
|
|
127
|
-
result[attr] = dict(map(
|
|
128
|
-
lambda item: (item[0], item[1].to_dict())
|
|
129
|
-
if hasattr(item[1], "to_dict") else item,
|
|
130
|
-
value.items()
|
|
131
|
-
))
|
|
132
|
-
else:
|
|
133
|
-
result[attr] = value
|
|
134
|
-
|
|
135
|
-
return result
|
|
136
|
-
|
|
137
|
-
def to_str(self):
|
|
138
|
-
"""Returns the string representation of the model"""
|
|
139
|
-
return pprint.pformat(self.to_dict())
|
|
140
|
-
|
|
141
|
-
def __repr__(self):
|
|
142
|
-
"""For `print` and `pprint`"""
|
|
143
|
-
return self.to_str()
|
|
144
|
-
|
|
145
|
-
def __eq__(self, other):
|
|
146
|
-
"""Returns true if both objects are equal"""
|
|
147
|
-
if not isinstance(other, SymbolCandidate):
|
|
148
|
-
return False
|
|
149
|
-
|
|
150
|
-
return self.to_dict() == other.to_dict()
|
|
151
|
-
|
|
152
|
-
def __ne__(self, other):
|
|
153
|
-
"""Returns true if both objects are not equal"""
|
|
154
|
-
if not isinstance(other, SymbolCandidate):
|
|
155
|
-
return True
|
|
156
|
-
|
|
157
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generated by: https://openapi-generator.tech
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import pprint
|
|
9
|
+
import re # noqa: F401
|
|
10
|
+
import json
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
14
|
+
from regula.documentreader.webclient.gen.models.rectangle_coordinates import RectangleCoordinates
|
|
15
|
+
from typing import Optional, Set
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
|
|
18
|
+
class SymbolEstimationItem(BaseModel):
|
|
19
|
+
"""
|
|
20
|
+
SymbolEstimationItem
|
|
21
|
+
""" # noqa: E501
|
|
22
|
+
alignment_nearest_symbols: StrictInt = Field(alias="ALIGNMENT_NEAREST_SYMBOLS")
|
|
23
|
+
contrast_print: StrictInt = Field(alias="CONTRAST_PRINT")
|
|
24
|
+
contrast_symbol: StrictInt = Field(alias="CONTRAST_SYMBOL")
|
|
25
|
+
char_symbol: StrictInt = Field(alias="CharSymbol")
|
|
26
|
+
edge: StrictInt = Field(alias="EDGE")
|
|
27
|
+
emptiness: StrictInt = Field(alias="EMPTINESS")
|
|
28
|
+
stain: StrictInt = Field(alias="STAIN")
|
|
29
|
+
symbols_interval: StrictInt = Field(alias="SYMBOLS_INTERVAL")
|
|
30
|
+
symbol_param: StrictInt = Field(alias="SYMBOL_PARAM")
|
|
31
|
+
symbol_size: StrictInt = Field(alias="SYMBOL_SIZE")
|
|
32
|
+
size_error_align_with_next: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorAlignWithNext")
|
|
33
|
+
size_error_align_with_prev: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorAlignWithPrev")
|
|
34
|
+
size_error_interv_with_next: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorIntervWithNext")
|
|
35
|
+
size_error_interv_with_prev: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorIntervWithPrev")
|
|
36
|
+
size_error_symbol_height: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorSymbolHeight")
|
|
37
|
+
size_error_symbol_width: Union[StrictFloat, StrictInt] = Field(alias="SizeErrorSymbolWidth")
|
|
38
|
+
symbol_bounds: RectangleCoordinates = Field(alias="SymbolBounds")
|
|
39
|
+
__properties: ClassVar[List[str]] = ["ALIGNMENT_NEAREST_SYMBOLS", "CONTRAST_PRINT", "CONTRAST_SYMBOL", "CharSymbol", "EDGE", "EMPTINESS", "STAIN", "SYMBOLS_INTERVAL", "SYMBOL_PARAM", "SYMBOL_SIZE", "SizeErrorAlignWithNext", "SizeErrorAlignWithPrev", "SizeErrorIntervWithNext", "SizeErrorIntervWithPrev", "SizeErrorSymbolHeight", "SizeErrorSymbolWidth", "SymbolBounds"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of SymbolEstimationItem from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of symbol_bounds
|
|
81
|
+
if self.symbol_bounds:
|
|
82
|
+
_dict['SymbolBounds'] = self.symbol_bounds.to_dict()
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of SymbolEstimationItem from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"ALIGNMENT_NEAREST_SYMBOLS": obj.get("ALIGNMENT_NEAREST_SYMBOLS"),
|
|
96
|
+
"CONTRAST_PRINT": obj.get("CONTRAST_PRINT"),
|
|
97
|
+
"CONTRAST_SYMBOL": obj.get("CONTRAST_SYMBOL"),
|
|
98
|
+
"CharSymbol": obj.get("CharSymbol"),
|
|
99
|
+
"EDGE": obj.get("EDGE"),
|
|
100
|
+
"EMPTINESS": obj.get("EMPTINESS"),
|
|
101
|
+
"STAIN": obj.get("STAIN"),
|
|
102
|
+
"SYMBOLS_INTERVAL": obj.get("SYMBOLS_INTERVAL"),
|
|
103
|
+
"SYMBOL_PARAM": obj.get("SYMBOL_PARAM"),
|
|
104
|
+
"SYMBOL_SIZE": obj.get("SYMBOL_SIZE"),
|
|
105
|
+
"SizeErrorAlignWithNext": obj.get("SizeErrorAlignWithNext"),
|
|
106
|
+
"SizeErrorAlignWithPrev": obj.get("SizeErrorAlignWithPrev"),
|
|
107
|
+
"SizeErrorIntervWithNext": obj.get("SizeErrorIntervWithNext"),
|
|
108
|
+
"SizeErrorIntervWithPrev": obj.get("SizeErrorIntervWithPrev"),
|
|
109
|
+
"SizeErrorSymbolHeight": obj.get("SizeErrorSymbolHeight"),
|
|
110
|
+
"SizeErrorSymbolWidth": obj.get("SizeErrorSymbolWidth"),
|
|
111
|
+
"SymbolBounds": RectangleCoordinates.from_dict(obj["SymbolBounds"]) if obj.get("SymbolBounds") is not None else None
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -4,146 +4,98 @@
|
|
|
4
4
|
Generated by: https://openapi-generator.tech
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
from __future__ import annotations
|
|
7
8
|
import pprint
|
|
8
9
|
import re # noqa: F401
|
|
10
|
+
import json
|
|
9
11
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
from regula.documentreader.webclient.gen.
|
|
13
|
-
|
|
14
|
-
from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"""
|
|
18
|
-
Describes a single character recognition results in the text field line
|
|
19
|
-
"""
|
|
20
|
-
class SymbolRecognitionResult(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
|
-
"""
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
14
|
+
from regula.documentreader.webclient.gen.models.rectangle_coordinates import RectangleCoordinates
|
|
15
|
+
from regula.documentreader.webclient.gen.models.symbol_candidate import SymbolCandidate
|
|
16
|
+
from typing import Optional, Set
|
|
17
|
+
from typing_extensions import Self
|
|
26
18
|
|
|
19
|
+
class SymbolRecognitionResult(BaseModel):
|
|
27
20
|
"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
""
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
self.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
21
|
+
Describes a single character recognition results in the text field line
|
|
22
|
+
""" # noqa: E501
|
|
23
|
+
symbol_rect: Optional[RectangleCoordinates] = Field(default=None, alias="SymbolRect")
|
|
24
|
+
candidates_count: Union[StrictFloat, StrictInt] = Field(description="Number of significant elements of ListOfCandidates array", alias="CandidatesCount")
|
|
25
|
+
list_of_candidates: List[SymbolCandidate] = Field(description="Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability)", alias="ListOfCandidates")
|
|
26
|
+
base_line_bottom: Optional[StrictInt] = Field(default=None, alias="BaseLineBottom")
|
|
27
|
+
base_line_top: Optional[StrictInt] = Field(default=None, alias="BaseLineTop")
|
|
28
|
+
reserved: Optional[StrictInt] = Field(default=None, alias="Reserved")
|
|
29
|
+
__properties: ClassVar[List[str]] = ["SymbolRect", "CandidatesCount", "ListOfCandidates", "BaseLineBottom", "BaseLineTop", "Reserved"]
|
|
30
|
+
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
populate_by_name=True,
|
|
33
|
+
validate_assignment=True,
|
|
34
|
+
protected_namespaces=(),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
49
|
+
"""Create an instance of SymbolRecognitionResult from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
53
|
+
"""Return the dictionary representation of the model using alias.
|
|
54
|
+
|
|
55
|
+
This has the following differences from calling pydantic's
|
|
56
|
+
`self.model_dump(by_alias=True)`:
|
|
57
|
+
|
|
58
|
+
* `None` is only added to the output dict for nullable fields that
|
|
59
|
+
were set at model initialization. Other fields with value `None`
|
|
60
|
+
are ignored.
|
|
64
61
|
"""
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
self.
|
|
62
|
+
excluded_fields: Set[str] = set([
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of symbol_rect
|
|
71
|
+
if self.symbol_rect:
|
|
72
|
+
_dict['SymbolRect'] = self.symbol_rect.to_dict()
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in list_of_candidates (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.list_of_candidates:
|
|
76
|
+
for _item_list_of_candidates in self.list_of_candidates:
|
|
77
|
+
if _item_list_of_candidates:
|
|
78
|
+
_items.append(_item_list_of_candidates.to_dict())
|
|
79
|
+
_dict['ListOfCandidates'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of SymbolRecognitionResult from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"SymbolRect": RectangleCoordinates.from_dict(obj["SymbolRect"]) if obj.get("SymbolRect") is not None else None,
|
|
93
|
+
"CandidatesCount": obj.get("CandidatesCount"),
|
|
94
|
+
"ListOfCandidates": [SymbolCandidate.from_dict(_item) for _item in obj["ListOfCandidates"]] if obj.get("ListOfCandidates") is not None else None,
|
|
95
|
+
"BaseLineBottom": obj.get("BaseLineBottom"),
|
|
96
|
+
"BaseLineTop": obj.get("BaseLineTop"),
|
|
97
|
+
"Reserved": obj.get("Reserved")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
79
100
|
|
|
80
|
-
@property
|
|
81
|
-
def list_of_candidates(self):
|
|
82
|
-
"""Gets the list_of_candidates of this SymbolRecognitionResult. # noqa: E501
|
|
83
101
|
|
|
84
|
-
Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) # noqa: E501
|
|
85
|
-
|
|
86
|
-
:return: The list_of_candidates of this SymbolRecognitionResult. # noqa: E501
|
|
87
|
-
:rtype: list[SymbolCandidate]
|
|
88
|
-
"""
|
|
89
|
-
return self._list_of_candidates
|
|
90
|
-
|
|
91
|
-
@list_of_candidates.setter
|
|
92
|
-
def list_of_candidates(self, list_of_candidates):
|
|
93
|
-
"""Sets the list_of_candidates of this SymbolRecognitionResult.
|
|
94
|
-
|
|
95
|
-
Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) # noqa: E501
|
|
96
|
-
|
|
97
|
-
:param list_of_candidates: The list_of_candidates of this SymbolRecognitionResult. # noqa: E501
|
|
98
|
-
:type list_of_candidates: list[SymbolCandidate]
|
|
99
|
-
"""
|
|
100
|
-
if self.local_vars_configuration.client_side_validation and list_of_candidates is None: # noqa: E501
|
|
101
|
-
raise ValueError("Invalid value for `list_of_candidates`, must not be `None`") # noqa: E501
|
|
102
|
-
|
|
103
|
-
self._list_of_candidates = list_of_candidates
|
|
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, SymbolRecognitionResult):
|
|
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, SymbolRecognitionResult):
|
|
147
|
-
return True
|
|
148
|
-
|
|
149
|
-
return self.to_dict() != other.to_dict()
|