onfido-python 2.10.0__py3-none-any.whl → 3.1.0__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.
- onfido/__init__.py +311 -2
- onfido/api/__init__.py +5 -0
- onfido/api/default_api.py +17207 -0
- onfido/api_client.py +770 -0
- onfido/api_response.py +21 -0
- onfido/configuration.py +460 -0
- onfido/exceptions.py +184 -77
- onfido/models/__init__.py +291 -0
- onfido/models/address.py +169 -0
- onfido/models/address_builder.py +169 -0
- onfido/models/address_shared.py +169 -0
- onfido/models/addresses_list.py +108 -0
- onfido/models/applicant.py +162 -0
- onfido/models/applicant_builder.py +152 -0
- onfido/models/applicant_create.py +117 -0
- onfido/models/applicant_request.py +116 -0
- onfido/models/applicant_response.py +146 -0
- onfido/models/applicant_shared.py +115 -0
- onfido/models/applicant_update.py +123 -0
- onfido/models/applicant_updater.py +158 -0
- onfido/models/applicants_list.py +108 -0
- onfido/models/check.py +147 -0
- onfido/models/check_builder.py +127 -0
- onfido/models/check_request.py +119 -0
- onfido/models/check_response.py +137 -0
- onfido/models/check_shared.py +108 -0
- onfido/models/checks_list.py +108 -0
- onfido/models/complete_task_builder.py +104 -0
- onfido/models/complete_task_data_builder.py +143 -0
- onfido/models/consent_item.py +109 -0
- onfido/models/consents_builder.py +98 -0
- onfido/models/country_codes.py +285 -0
- onfido/models/device_intelligence_breakdown.py +110 -0
- onfido/models/device_intelligence_breakdown_breakdown.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device_breakdown.py +114 -0
- onfido/models/device_intelligence_breakdown_properties.py +116 -0
- onfido/models/device_intelligence_breakdown_properties_device.py +189 -0
- onfido/models/device_intelligence_breakdown_properties_geolocation.py +105 -0
- onfido/models/device_intelligence_breakdown_properties_ip.py +106 -0
- onfido/models/device_intelligence_report.py +135 -0
- onfido/models/document.py +142 -0
- onfido/models/document_breakdown.py +152 -0
- onfido/models/document_breakdown_age_validation.py +106 -0
- onfido/models/document_breakdown_age_validation_breakdown.py +104 -0
- onfido/models/document_breakdown_compromised_document.py +106 -0
- onfido/models/document_breakdown_compromised_document_breakdown.py +109 -0
- onfido/models/document_breakdown_data_comparison.py +106 -0
- onfido/models/document_breakdown_data_comparison_breakdown.py +139 -0
- onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.py +102 -0
- onfido/models/document_breakdown_data_consistency.py +106 -0
- onfido/models/document_breakdown_data_consistency_breakdown.py +149 -0
- onfido/models/document_breakdown_data_validation.py +106 -0
- onfido/models/document_breakdown_data_validation_breakdown.py +136 -0
- onfido/models/document_breakdown_data_validation_breakdown_document_expiration.py +102 -0
- onfido/models/document_breakdown_data_validation_breakdown_expiry_date.py +102 -0
- onfido/models/document_breakdown_image_integrity.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown.py +122 -0
- onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.py +102 -0
- onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_image_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_supported_document.py +102 -0
- onfido/models/document_breakdown_issuing_authority.py +106 -0
- onfido/models/document_breakdown_issuing_authority_breakdown.py +110 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.py +102 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.py +102 -0
- onfido/models/document_breakdown_police_record.py +100 -0
- onfido/models/document_breakdown_visual_authenticity.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown.py +146 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_other.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_template.py +102 -0
- onfido/models/document_cdq_reasons.py +114 -0
- onfido/models/document_iq_reasons.py +118 -0
- onfido/models/document_odp_reasons.py +106 -0
- onfido/models/document_properties.py +191 -0
- onfido/models/document_properties_address_lines.py +110 -0
- onfido/models/document_properties_barcode_inner.py +135 -0
- onfido/models/document_properties_document_classification.py +104 -0
- onfido/models/document_properties_document_numbers_inner.py +102 -0
- onfido/models/document_properties_driving_licence_information.py +107 -0
- onfido/models/document_properties_extracted_data.py +141 -0
- onfido/models/document_properties_nfc.py +125 -0
- onfido/models/document_report.py +141 -0
- onfido/models/document_response.py +111 -0
- onfido/models/document_shared.py +129 -0
- onfido/models/document_types.py +60 -0
- onfido/models/document_video_report.py +141 -0
- onfido/models/document_video_with_address_information_report.py +141 -0
- onfido/models/document_with_address_information_report.py +141 -0
- onfido/models/document_with_driver_verification_report.py +141 -0
- onfido/models/document_with_driver_verification_report_all_of_properties.py +215 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.py +105 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.py +107 -0
- onfido/models/document_with_driving_licence_information_report.py +141 -0
- onfido/models/documents_list.py +108 -0
- onfido/models/error.py +104 -0
- onfido/models/error1.py +106 -0
- onfido/models/error_properties.py +104 -0
- onfido/models/error_properties1.py +102 -0
- onfido/models/extract_request.py +100 -0
- onfido/models/extraction.py +112 -0
- onfido/models/extraction_document_classification.py +120 -0
- onfido/models/extraction_extracted_data.py +176 -0
- onfido/models/facial_similarity_motion_breakdown.py +116 -0
- onfido/models/facial_similarity_motion_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_motion_properties.py +100 -0
- onfido/models/facial_similarity_motion_report.py +141 -0
- onfido/models/facial_similarity_photo_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_report.py +141 -0
- onfido/models/facial_similarity_photo_properties.py +100 -0
- onfido/models/facial_similarity_photo_report.py +141 -0
- onfido/models/facial_similarity_video_breakdown.py +116 -0
- onfido/models/facial_similarity_video_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_video_properties.py +100 -0
- onfido/models/facial_similarity_video_report.py +141 -0
- onfido/models/id_number.py +114 -0
- onfido/models/id_photo.py +113 -0
- onfido/models/id_photo_response.py +113 -0
- onfido/models/id_photos_list.py +108 -0
- onfido/models/identity_enhanced_breakdown.py +122 -0
- onfido/models/identity_enhanced_breakdown_address.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown.py +116 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.py +100 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.py +102 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth.py +106 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.py +110 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_mortality.py +100 -0
- onfido/models/identity_enhanced_breakdown_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown.py +104 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.py +100 -0
- onfido/models/identity_enhanced_properties.py +110 -0
- onfido/models/identity_enhanced_properties_matched_addresses_inner.py +102 -0
- onfido/models/identity_enhanced_report.py +141 -0
- onfido/models/india_pan_report.py +141 -0
- onfido/models/india_pan_report_all_of_breakdown.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown.py +109 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.py +100 -0
- onfido/models/india_pan_report_all_of_properties.py +104 -0
- onfido/models/india_pan_report_all_of_properties_device.py +102 -0
- onfido/models/known_faces_breakdown.py +110 -0
- onfido/models/known_faces_breakdown_image_integrity.py +100 -0
- onfido/models/known_faces_breakdown_previously_seen_faces.py +100 -0
- onfido/models/known_faces_properties.py +108 -0
- onfido/models/known_faces_properties_matches_inner.py +108 -0
- onfido/models/known_faces_report.py +141 -0
- onfido/models/live_photo.py +113 -0
- onfido/models/live_photo_response.py +113 -0
- onfido/models/live_photos_list.py +108 -0
- onfido/models/live_video.py +115 -0
- onfido/models/live_videos_list.py +108 -0
- onfido/models/location.py +103 -0
- onfido/models/location_builder.py +103 -0
- onfido/models/location_shared.py +103 -0
- onfido/models/motion_capture.py +113 -0
- onfido/models/motion_captures_list.py +108 -0
- onfido/models/photo_auto_reasons.py +108 -0
- onfido/models/photo_reasons.py +108 -0
- onfido/models/proof_of_address_breakdown.py +116 -0
- onfido/models/proof_of_address_breakdown_data_comparison.py +106 -0
- onfido/models/proof_of_address_breakdown_data_comparison_breakdown.py +114 -0
- onfido/models/proof_of_address_breakdown_document_classification.py +106 -0
- onfido/models/proof_of_address_breakdown_document_classification_breakdown.py +104 -0
- onfido/models/proof_of_address_breakdown_image_integrity.py +106 -0
- onfido/models/proof_of_address_breakdown_image_integrity_breakdown.py +104 -0
- onfido/models/proof_of_address_properties.py +125 -0
- onfido/models/proof_of_address_report.py +141 -0
- onfido/models/repeat_attempts_list.py +117 -0
- onfido/models/repeat_attempts_list_repeat_attempts_inner.py +143 -0
- onfido/models/report.py +621 -0
- onfido/models/report_document.py +100 -0
- onfido/models/report_name.py +56 -0
- onfido/models/report_result.py +38 -0
- onfido/models/report_shared.py +129 -0
- onfido/models/report_status.py +40 -0
- onfido/models/report_sub_result.py +39 -0
- onfido/models/reports_list.py +108 -0
- onfido/models/results_feedback.py +116 -0
- onfido/models/sdk_token.py +100 -0
- onfido/models/sdk_token_builder.py +106 -0
- onfido/models/sdk_token_request.py +106 -0
- onfido/models/sdk_token_response.py +100 -0
- onfido/models/task.py +146 -0
- onfido/models/task_item.py +128 -0
- onfido/models/timeline_file_reference.py +102 -0
- onfido/models/us_driving_licence_breakdown.py +116 -0
- onfido/models/us_driving_licence_breakdown_address.py +106 -0
- onfido/models/us_driving_licence_breakdown_address_breakdown.py +129 -0
- onfido/models/us_driving_licence_breakdown_document.py +106 -0
- onfido/models/us_driving_licence_breakdown_document_breakdown.py +119 -0
- onfido/models/us_driving_licence_breakdown_personal.py +106 -0
- onfido/models/us_driving_licence_breakdown_personal_breakdown.py +164 -0
- onfido/models/us_driving_licence_builder.py +185 -0
- onfido/models/us_driving_licence_report.py +141 -0
- onfido/models/us_driving_licence_shared.py +185 -0
- onfido/models/video_reasons.py +106 -0
- onfido/models/watchlist_aml_breakdown.py +122 -0
- onfido/models/watchlist_aml_breakdown_adverse_media.py +100 -0
- onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.py +100 -0
- onfido/models/watchlist_aml_breakdown_politically_exposed_person.py +100 -0
- onfido/models/watchlist_aml_breakdown_sanction.py +100 -0
- onfido/models/watchlist_aml_properties.py +100 -0
- onfido/models/watchlist_aml_report.py +141 -0
- onfido/models/watchlist_enhanced_breakdown.py +122 -0
- onfido/models/watchlist_enhanced_properties.py +100 -0
- onfido/models/watchlist_enhanced_report.py +141 -0
- onfido/models/watchlist_monitor.py +120 -0
- onfido/models/watchlist_monitor_builder.py +111 -0
- onfido/models/watchlist_monitor_match.py +102 -0
- onfido/models/watchlist_monitor_matches_list.py +108 -0
- onfido/models/watchlist_monitor_matches_updater.py +102 -0
- onfido/models/watchlist_monitor_response.py +107 -0
- onfido/models/watchlist_monitor_shared.py +111 -0
- onfido/models/watchlist_monitors_list.py +108 -0
- onfido/models/watchlist_peps_only_report.py +141 -0
- onfido/models/watchlist_sanctions_only_report.py +141 -0
- onfido/models/watchlist_standard_breakdown.py +116 -0
- onfido/models/watchlist_standard_properties.py +100 -0
- onfido/models/watchlist_standard_report.py +141 -0
- onfido/models/webhook.py +115 -0
- onfido/models/webhook_builder.py +109 -0
- onfido/models/webhook_create.py +100 -0
- onfido/models/webhook_event.py +104 -0
- onfido/models/webhook_event_payload.py +111 -0
- onfido/models/webhook_event_payload_object.py +107 -0
- onfido/models/webhook_event_type.py +52 -0
- onfido/models/webhook_resend.py +108 -0
- onfido/models/webhook_response.py +106 -0
- onfido/models/webhook_shared.py +107 -0
- onfido/models/webhook_update.py +100 -0
- onfido/models/webhook_updater.py +109 -0
- onfido/models/webhooks_list.py +108 -0
- onfido/models/webhooks_resend_item.py +103 -0
- onfido/models/workflow_run.py +149 -0
- onfido/models/workflow_run_builder.py +123 -0
- onfido/models/workflow_run_request.py +100 -0
- onfido/models/workflow_run_response.py +126 -0
- onfido/models/workflow_run_response_error.py +102 -0
- onfido/models/workflow_run_shared.py +121 -0
- onfido/models/workflow_run_shared_link.py +119 -0
- onfido/py.typed +0 -0
- onfido/rest.py +258 -0
- onfido/webhook_event_verifier.py +7 -3
- {onfido_python-2.10.0.dist-info → onfido_python-3.1.0.dist-info}/LICENSE +1 -1
- onfido_python-3.1.0.dist-info/METADATA +18 -0
- onfido_python-3.1.0.dist-info/RECORD +291 -0
- {onfido_python-2.10.0.dist-info → onfido_python-3.1.0.dist-info}/WHEEL +2 -1
- onfido_python-3.1.0.dist-info/top_level.txt +1 -0
- onfido/aio_resource.py +0 -132
- onfido/mimetype.py +0 -5
- onfido/onfido.py +0 -71
- onfido/onfido_download.py +0 -11
- onfido/regions.py +0 -11
- onfido/resource.py +0 -88
- onfido/resources/address_picker.py +0 -6
- onfido/resources/applicants.py +0 -23
- onfido/resources/checks.py +0 -19
- onfido/resources/documents.py +0 -16
- onfido/resources/extraction.py +0 -6
- onfido/resources/live_photos.py +0 -17
- onfido/resources/live_videos.py +0 -16
- onfido/resources/motion_captures.py +0 -16
- onfido/resources/reports.py +0 -16
- onfido/resources/sdk_tokens.py +0 -5
- onfido/resources/watchlist_monitors.py +0 -16
- onfido/resources/webhooks.py +0 -18
- onfido/resources/workflow_runs.py +0 -17
- onfido/resources_aio/address_picker.py +0 -6
- onfido/resources_aio/applicants.py +0 -23
- onfido/resources_aio/checks.py +0 -19
- onfido/resources_aio/documents.py +0 -16
- onfido/resources_aio/extraction.py +0 -6
- onfido/resources_aio/live_photos.py +0 -17
- onfido/resources_aio/live_videos.py +0 -16
- onfido/resources_aio/motion_captures.py +0 -16
- onfido/resources_aio/reports.py +0 -16
- onfido/resources_aio/sdk_tokens.py +0 -6
- onfido/resources_aio/watchlist_monitors.py +0 -16
- onfido/resources_aio/webhooks.py +0 -18
- onfido/resources_aio/workflow_runs.py +0 -17
- onfido/utils.py +0 -22
- onfido_python-2.10.0.dist-info/METADATA +0 -181
- onfido_python-2.10.0.dist-info/RECORD +0 -40
onfido/models/report.py
ADDED
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from onfido.models.device_intelligence_report import DeviceIntelligenceReport
|
|
21
|
+
from onfido.models.document_report import DocumentReport
|
|
22
|
+
from onfido.models.document_video_report import DocumentVideoReport
|
|
23
|
+
from onfido.models.document_video_with_address_information_report import DocumentVideoWithAddressInformationReport
|
|
24
|
+
from onfido.models.document_with_address_information_report import DocumentWithAddressInformationReport
|
|
25
|
+
from onfido.models.document_with_driver_verification_report import DocumentWithDriverVerificationReport
|
|
26
|
+
from onfido.models.document_with_driving_licence_information_report import DocumentWithDrivingLicenceInformationReport
|
|
27
|
+
from onfido.models.facial_similarity_motion_report import FacialSimilarityMotionReport
|
|
28
|
+
from onfido.models.facial_similarity_photo_fully_auto_report import FacialSimilarityPhotoFullyAutoReport
|
|
29
|
+
from onfido.models.facial_similarity_photo_report import FacialSimilarityPhotoReport
|
|
30
|
+
from onfido.models.facial_similarity_video_report import FacialSimilarityVideoReport
|
|
31
|
+
from onfido.models.identity_enhanced_report import IdentityEnhancedReport
|
|
32
|
+
from onfido.models.india_pan_report import IndiaPanReport
|
|
33
|
+
from onfido.models.known_faces_report import KnownFacesReport
|
|
34
|
+
from onfido.models.proof_of_address_report import ProofOfAddressReport
|
|
35
|
+
from onfido.models.us_driving_licence_report import UsDrivingLicenceReport
|
|
36
|
+
from onfido.models.watchlist_aml_report import WatchlistAmlReport
|
|
37
|
+
from onfido.models.watchlist_enhanced_report import WatchlistEnhancedReport
|
|
38
|
+
from onfido.models.watchlist_peps_only_report import WatchlistPepsOnlyReport
|
|
39
|
+
from onfido.models.watchlist_sanctions_only_report import WatchlistSanctionsOnlyReport
|
|
40
|
+
from onfido.models.watchlist_standard_report import WatchlistStandardReport
|
|
41
|
+
from pydantic import StrictStr, Field
|
|
42
|
+
from typing import Union, List, Set, Optional, Dict
|
|
43
|
+
from typing_extensions import Literal, Self
|
|
44
|
+
|
|
45
|
+
REPORT_ONE_OF_SCHEMAS = ["DeviceIntelligenceReport", "DocumentReport", "DocumentVideoReport", "DocumentVideoWithAddressInformationReport", "DocumentWithAddressInformationReport", "DocumentWithDriverVerificationReport", "DocumentWithDrivingLicenceInformationReport", "FacialSimilarityMotionReport", "FacialSimilarityPhotoFullyAutoReport", "FacialSimilarityPhotoReport", "FacialSimilarityVideoReport", "IdentityEnhancedReport", "IndiaPanReport", "KnownFacesReport", "ProofOfAddressReport", "UsDrivingLicenceReport", "WatchlistAmlReport", "WatchlistEnhancedReport", "WatchlistPepsOnlyReport", "WatchlistSanctionsOnlyReport", "WatchlistStandardReport"]
|
|
46
|
+
|
|
47
|
+
class Report(BaseModel):
|
|
48
|
+
"""
|
|
49
|
+
Report
|
|
50
|
+
"""
|
|
51
|
+
# data type: DocumentReport
|
|
52
|
+
oneof_schema_1_validator: Optional[DocumentReport] = None
|
|
53
|
+
# data type: DocumentVideoReport
|
|
54
|
+
oneof_schema_2_validator: Optional[DocumentVideoReport] = None
|
|
55
|
+
# data type: DocumentVideoWithAddressInformationReport
|
|
56
|
+
oneof_schema_3_validator: Optional[DocumentVideoWithAddressInformationReport] = None
|
|
57
|
+
# data type: DocumentWithAddressInformationReport
|
|
58
|
+
oneof_schema_4_validator: Optional[DocumentWithAddressInformationReport] = None
|
|
59
|
+
# data type: DocumentWithDrivingLicenceInformationReport
|
|
60
|
+
oneof_schema_5_validator: Optional[DocumentWithDrivingLicenceInformationReport] = None
|
|
61
|
+
# data type: DocumentWithDriverVerificationReport
|
|
62
|
+
oneof_schema_6_validator: Optional[DocumentWithDriverVerificationReport] = None
|
|
63
|
+
# data type: FacialSimilarityPhotoReport
|
|
64
|
+
oneof_schema_7_validator: Optional[FacialSimilarityPhotoReport] = None
|
|
65
|
+
# data type: FacialSimilarityPhotoFullyAutoReport
|
|
66
|
+
oneof_schema_8_validator: Optional[FacialSimilarityPhotoFullyAutoReport] = None
|
|
67
|
+
# data type: FacialSimilarityVideoReport
|
|
68
|
+
oneof_schema_9_validator: Optional[FacialSimilarityVideoReport] = None
|
|
69
|
+
# data type: FacialSimilarityMotionReport
|
|
70
|
+
oneof_schema_10_validator: Optional[FacialSimilarityMotionReport] = None
|
|
71
|
+
# data type: KnownFacesReport
|
|
72
|
+
oneof_schema_11_validator: Optional[KnownFacesReport] = None
|
|
73
|
+
# data type: IdentityEnhancedReport
|
|
74
|
+
oneof_schema_12_validator: Optional[IdentityEnhancedReport] = None
|
|
75
|
+
# data type: WatchlistAmlReport
|
|
76
|
+
oneof_schema_13_validator: Optional[WatchlistAmlReport] = None
|
|
77
|
+
# data type: WatchlistEnhancedReport
|
|
78
|
+
oneof_schema_14_validator: Optional[WatchlistEnhancedReport] = None
|
|
79
|
+
# data type: WatchlistStandardReport
|
|
80
|
+
oneof_schema_15_validator: Optional[WatchlistStandardReport] = None
|
|
81
|
+
# data type: WatchlistPepsOnlyReport
|
|
82
|
+
oneof_schema_16_validator: Optional[WatchlistPepsOnlyReport] = None
|
|
83
|
+
# data type: WatchlistSanctionsOnlyReport
|
|
84
|
+
oneof_schema_17_validator: Optional[WatchlistSanctionsOnlyReport] = None
|
|
85
|
+
# data type: ProofOfAddressReport
|
|
86
|
+
oneof_schema_18_validator: Optional[ProofOfAddressReport] = None
|
|
87
|
+
# data type: UsDrivingLicenceReport
|
|
88
|
+
oneof_schema_19_validator: Optional[UsDrivingLicenceReport] = None
|
|
89
|
+
# data type: DeviceIntelligenceReport
|
|
90
|
+
oneof_schema_20_validator: Optional[DeviceIntelligenceReport] = None
|
|
91
|
+
# data type: IndiaPanReport
|
|
92
|
+
oneof_schema_21_validator: Optional[IndiaPanReport] = None
|
|
93
|
+
actual_instance: Optional[Union[DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport]] = None
|
|
94
|
+
one_of_schemas: Set[str] = { "DeviceIntelligenceReport", "DocumentReport", "DocumentVideoReport", "DocumentVideoWithAddressInformationReport", "DocumentWithAddressInformationReport", "DocumentWithDriverVerificationReport", "DocumentWithDrivingLicenceInformationReport", "FacialSimilarityMotionReport", "FacialSimilarityPhotoFullyAutoReport", "FacialSimilarityPhotoReport", "FacialSimilarityVideoReport", "IdentityEnhancedReport", "IndiaPanReport", "KnownFacesReport", "ProofOfAddressReport", "UsDrivingLicenceReport", "WatchlistAmlReport", "WatchlistEnhancedReport", "WatchlistPepsOnlyReport", "WatchlistSanctionsOnlyReport", "WatchlistStandardReport" }
|
|
95
|
+
|
|
96
|
+
model_config = ConfigDict(
|
|
97
|
+
validate_assignment=True,
|
|
98
|
+
protected_namespaces=(),
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
106
|
+
if args:
|
|
107
|
+
if len(args) > 1:
|
|
108
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
109
|
+
if kwargs:
|
|
110
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
111
|
+
super().__init__(actual_instance=args[0])
|
|
112
|
+
else:
|
|
113
|
+
super().__init__(**kwargs)
|
|
114
|
+
|
|
115
|
+
@field_validator('actual_instance')
|
|
116
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
117
|
+
instance = Report.model_construct()
|
|
118
|
+
error_messages = []
|
|
119
|
+
match = 0
|
|
120
|
+
# validate data type: DocumentReport
|
|
121
|
+
if not isinstance(v, DocumentReport):
|
|
122
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentReport`")
|
|
123
|
+
else:
|
|
124
|
+
match += 1
|
|
125
|
+
# validate data type: DocumentVideoReport
|
|
126
|
+
if not isinstance(v, DocumentVideoReport):
|
|
127
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentVideoReport`")
|
|
128
|
+
else:
|
|
129
|
+
match += 1
|
|
130
|
+
# validate data type: DocumentVideoWithAddressInformationReport
|
|
131
|
+
if not isinstance(v, DocumentVideoWithAddressInformationReport):
|
|
132
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentVideoWithAddressInformationReport`")
|
|
133
|
+
else:
|
|
134
|
+
match += 1
|
|
135
|
+
# validate data type: DocumentWithAddressInformationReport
|
|
136
|
+
if not isinstance(v, DocumentWithAddressInformationReport):
|
|
137
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentWithAddressInformationReport`")
|
|
138
|
+
else:
|
|
139
|
+
match += 1
|
|
140
|
+
# validate data type: DocumentWithDrivingLicenceInformationReport
|
|
141
|
+
if not isinstance(v, DocumentWithDrivingLicenceInformationReport):
|
|
142
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentWithDrivingLicenceInformationReport`")
|
|
143
|
+
else:
|
|
144
|
+
match += 1
|
|
145
|
+
# validate data type: DocumentWithDriverVerificationReport
|
|
146
|
+
if not isinstance(v, DocumentWithDriverVerificationReport):
|
|
147
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DocumentWithDriverVerificationReport`")
|
|
148
|
+
else:
|
|
149
|
+
match += 1
|
|
150
|
+
# validate data type: FacialSimilarityPhotoReport
|
|
151
|
+
if not isinstance(v, FacialSimilarityPhotoReport):
|
|
152
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FacialSimilarityPhotoReport`")
|
|
153
|
+
else:
|
|
154
|
+
match += 1
|
|
155
|
+
# validate data type: FacialSimilarityPhotoFullyAutoReport
|
|
156
|
+
if not isinstance(v, FacialSimilarityPhotoFullyAutoReport):
|
|
157
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FacialSimilarityPhotoFullyAutoReport`")
|
|
158
|
+
else:
|
|
159
|
+
match += 1
|
|
160
|
+
# validate data type: FacialSimilarityVideoReport
|
|
161
|
+
if not isinstance(v, FacialSimilarityVideoReport):
|
|
162
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FacialSimilarityVideoReport`")
|
|
163
|
+
else:
|
|
164
|
+
match += 1
|
|
165
|
+
# validate data type: FacialSimilarityMotionReport
|
|
166
|
+
if not isinstance(v, FacialSimilarityMotionReport):
|
|
167
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FacialSimilarityMotionReport`")
|
|
168
|
+
else:
|
|
169
|
+
match += 1
|
|
170
|
+
# validate data type: KnownFacesReport
|
|
171
|
+
if not isinstance(v, KnownFacesReport):
|
|
172
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `KnownFacesReport`")
|
|
173
|
+
else:
|
|
174
|
+
match += 1
|
|
175
|
+
# validate data type: IdentityEnhancedReport
|
|
176
|
+
if not isinstance(v, IdentityEnhancedReport):
|
|
177
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `IdentityEnhancedReport`")
|
|
178
|
+
else:
|
|
179
|
+
match += 1
|
|
180
|
+
# validate data type: WatchlistAmlReport
|
|
181
|
+
if not isinstance(v, WatchlistAmlReport):
|
|
182
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WatchlistAmlReport`")
|
|
183
|
+
else:
|
|
184
|
+
match += 1
|
|
185
|
+
# validate data type: WatchlistEnhancedReport
|
|
186
|
+
if not isinstance(v, WatchlistEnhancedReport):
|
|
187
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WatchlistEnhancedReport`")
|
|
188
|
+
else:
|
|
189
|
+
match += 1
|
|
190
|
+
# validate data type: WatchlistStandardReport
|
|
191
|
+
if not isinstance(v, WatchlistStandardReport):
|
|
192
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WatchlistStandardReport`")
|
|
193
|
+
else:
|
|
194
|
+
match += 1
|
|
195
|
+
# validate data type: WatchlistPepsOnlyReport
|
|
196
|
+
if not isinstance(v, WatchlistPepsOnlyReport):
|
|
197
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WatchlistPepsOnlyReport`")
|
|
198
|
+
else:
|
|
199
|
+
match += 1
|
|
200
|
+
# validate data type: WatchlistSanctionsOnlyReport
|
|
201
|
+
if not isinstance(v, WatchlistSanctionsOnlyReport):
|
|
202
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WatchlistSanctionsOnlyReport`")
|
|
203
|
+
else:
|
|
204
|
+
match += 1
|
|
205
|
+
# validate data type: ProofOfAddressReport
|
|
206
|
+
if not isinstance(v, ProofOfAddressReport):
|
|
207
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ProofOfAddressReport`")
|
|
208
|
+
else:
|
|
209
|
+
match += 1
|
|
210
|
+
# validate data type: UsDrivingLicenceReport
|
|
211
|
+
if not isinstance(v, UsDrivingLicenceReport):
|
|
212
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UsDrivingLicenceReport`")
|
|
213
|
+
else:
|
|
214
|
+
match += 1
|
|
215
|
+
# validate data type: DeviceIntelligenceReport
|
|
216
|
+
if not isinstance(v, DeviceIntelligenceReport):
|
|
217
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DeviceIntelligenceReport`")
|
|
218
|
+
else:
|
|
219
|
+
match += 1
|
|
220
|
+
# validate data type: IndiaPanReport
|
|
221
|
+
if not isinstance(v, IndiaPanReport):
|
|
222
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `IndiaPanReport`")
|
|
223
|
+
else:
|
|
224
|
+
match += 1
|
|
225
|
+
if match > 1:
|
|
226
|
+
# more than 1 match
|
|
227
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in Report with oneOf schemas: DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport. Details: " + ", ".join(error_messages))
|
|
228
|
+
elif match == 0:
|
|
229
|
+
# no match
|
|
230
|
+
raise ValueError("No match found when setting `actual_instance` in Report with oneOf schemas: DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport. Details: " + ", ".join(error_messages))
|
|
231
|
+
else:
|
|
232
|
+
return v
|
|
233
|
+
|
|
234
|
+
@classmethod
|
|
235
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
236
|
+
return cls.from_json(json.dumps(obj))
|
|
237
|
+
|
|
238
|
+
@classmethod
|
|
239
|
+
def from_json(cls, json_str: str) -> Self:
|
|
240
|
+
"""Returns the object represented by the json string"""
|
|
241
|
+
instance = cls.model_construct()
|
|
242
|
+
error_messages = []
|
|
243
|
+
match = 0
|
|
244
|
+
|
|
245
|
+
# use oneOf discriminator to lookup the data type
|
|
246
|
+
_data_type = json.loads(json_str).get("name")
|
|
247
|
+
if not _data_type:
|
|
248
|
+
raise ValueError("Failed to lookup data type from the field `name` in the input.")
|
|
249
|
+
|
|
250
|
+
# check if data type is `DeviceIntelligenceReport`
|
|
251
|
+
if _data_type == "device_intelligence":
|
|
252
|
+
instance.actual_instance = DeviceIntelligenceReport.from_json(json_str)
|
|
253
|
+
return instance
|
|
254
|
+
|
|
255
|
+
# check if data type is `DocumentReport`
|
|
256
|
+
if _data_type == "document":
|
|
257
|
+
instance.actual_instance = DocumentReport.from_json(json_str)
|
|
258
|
+
return instance
|
|
259
|
+
|
|
260
|
+
# check if data type is `DocumentVideoReport`
|
|
261
|
+
if _data_type == "document_video":
|
|
262
|
+
instance.actual_instance = DocumentVideoReport.from_json(json_str)
|
|
263
|
+
return instance
|
|
264
|
+
|
|
265
|
+
# check if data type is `DocumentVideoWithAddressInformationReport`
|
|
266
|
+
if _data_type == "document_video_with_address_information":
|
|
267
|
+
instance.actual_instance = DocumentVideoWithAddressInformationReport.from_json(json_str)
|
|
268
|
+
return instance
|
|
269
|
+
|
|
270
|
+
# check if data type is `DocumentWithAddressInformationReport`
|
|
271
|
+
if _data_type == "document_with_address_information":
|
|
272
|
+
instance.actual_instance = DocumentWithAddressInformationReport.from_json(json_str)
|
|
273
|
+
return instance
|
|
274
|
+
|
|
275
|
+
# check if data type is `DocumentWithDriverVerificationReport`
|
|
276
|
+
if _data_type == "document_with_driver_verification":
|
|
277
|
+
instance.actual_instance = DocumentWithDriverVerificationReport.from_json(json_str)
|
|
278
|
+
return instance
|
|
279
|
+
|
|
280
|
+
# check if data type is `DocumentWithDrivingLicenceInformationReport`
|
|
281
|
+
if _data_type == "document_with_driving_licence_information":
|
|
282
|
+
instance.actual_instance = DocumentWithDrivingLicenceInformationReport.from_json(json_str)
|
|
283
|
+
return instance
|
|
284
|
+
|
|
285
|
+
# check if data type is `FacialSimilarityMotionReport`
|
|
286
|
+
if _data_type == "facial_similarity_motion":
|
|
287
|
+
instance.actual_instance = FacialSimilarityMotionReport.from_json(json_str)
|
|
288
|
+
return instance
|
|
289
|
+
|
|
290
|
+
# check if data type is `FacialSimilarityPhotoReport`
|
|
291
|
+
if _data_type == "facial_similarity_photo":
|
|
292
|
+
instance.actual_instance = FacialSimilarityPhotoReport.from_json(json_str)
|
|
293
|
+
return instance
|
|
294
|
+
|
|
295
|
+
# check if data type is `FacialSimilarityPhotoFullyAutoReport`
|
|
296
|
+
if _data_type == "facial_similarity_photo_fully_auto":
|
|
297
|
+
instance.actual_instance = FacialSimilarityPhotoFullyAutoReport.from_json(json_str)
|
|
298
|
+
return instance
|
|
299
|
+
|
|
300
|
+
# check if data type is `FacialSimilarityVideoReport`
|
|
301
|
+
if _data_type == "facial_similarity_video":
|
|
302
|
+
instance.actual_instance = FacialSimilarityVideoReport.from_json(json_str)
|
|
303
|
+
return instance
|
|
304
|
+
|
|
305
|
+
# check if data type is `IdentityEnhancedReport`
|
|
306
|
+
if _data_type == "identity_enhanced":
|
|
307
|
+
instance.actual_instance = IdentityEnhancedReport.from_json(json_str)
|
|
308
|
+
return instance
|
|
309
|
+
|
|
310
|
+
# check if data type is `IndiaPanReport`
|
|
311
|
+
if _data_type == "india_pan":
|
|
312
|
+
instance.actual_instance = IndiaPanReport.from_json(json_str)
|
|
313
|
+
return instance
|
|
314
|
+
|
|
315
|
+
# check if data type is `KnownFacesReport`
|
|
316
|
+
if _data_type == "known_faces":
|
|
317
|
+
instance.actual_instance = KnownFacesReport.from_json(json_str)
|
|
318
|
+
return instance
|
|
319
|
+
|
|
320
|
+
# check if data type is `ProofOfAddressReport`
|
|
321
|
+
if _data_type == "proof_of_address":
|
|
322
|
+
instance.actual_instance = ProofOfAddressReport.from_json(json_str)
|
|
323
|
+
return instance
|
|
324
|
+
|
|
325
|
+
# check if data type is `UsDrivingLicenceReport`
|
|
326
|
+
if _data_type == "us_driving_licence":
|
|
327
|
+
instance.actual_instance = UsDrivingLicenceReport.from_json(json_str)
|
|
328
|
+
return instance
|
|
329
|
+
|
|
330
|
+
# check if data type is `WatchlistAmlReport`
|
|
331
|
+
if _data_type == "watchlist_aml":
|
|
332
|
+
instance.actual_instance = WatchlistAmlReport.from_json(json_str)
|
|
333
|
+
return instance
|
|
334
|
+
|
|
335
|
+
# check if data type is `WatchlistEnhancedReport`
|
|
336
|
+
if _data_type == "watchlist_enhanced":
|
|
337
|
+
instance.actual_instance = WatchlistEnhancedReport.from_json(json_str)
|
|
338
|
+
return instance
|
|
339
|
+
|
|
340
|
+
# check if data type is `WatchlistPepsOnlyReport`
|
|
341
|
+
if _data_type == "watchlist_peps_only":
|
|
342
|
+
instance.actual_instance = WatchlistPepsOnlyReport.from_json(json_str)
|
|
343
|
+
return instance
|
|
344
|
+
|
|
345
|
+
# check if data type is `WatchlistSanctionsOnlyReport`
|
|
346
|
+
if _data_type == "watchlist_sanctions_only":
|
|
347
|
+
instance.actual_instance = WatchlistSanctionsOnlyReport.from_json(json_str)
|
|
348
|
+
return instance
|
|
349
|
+
|
|
350
|
+
# check if data type is `WatchlistStandardReport`
|
|
351
|
+
if _data_type == "watchlist_standard":
|
|
352
|
+
instance.actual_instance = WatchlistStandardReport.from_json(json_str)
|
|
353
|
+
return instance
|
|
354
|
+
|
|
355
|
+
# check if data type is `DeviceIntelligenceReport`
|
|
356
|
+
if _data_type == "device_intelligence_report":
|
|
357
|
+
instance.actual_instance = DeviceIntelligenceReport.from_json(json_str)
|
|
358
|
+
return instance
|
|
359
|
+
|
|
360
|
+
# check if data type is `DocumentReport`
|
|
361
|
+
if _data_type == "document_report":
|
|
362
|
+
instance.actual_instance = DocumentReport.from_json(json_str)
|
|
363
|
+
return instance
|
|
364
|
+
|
|
365
|
+
# check if data type is `DocumentVideoReport`
|
|
366
|
+
if _data_type == "document_video_report":
|
|
367
|
+
instance.actual_instance = DocumentVideoReport.from_json(json_str)
|
|
368
|
+
return instance
|
|
369
|
+
|
|
370
|
+
# check if data type is `DocumentVideoWithAddressInformationReport`
|
|
371
|
+
if _data_type == "document_video_with_address_information_report":
|
|
372
|
+
instance.actual_instance = DocumentVideoWithAddressInformationReport.from_json(json_str)
|
|
373
|
+
return instance
|
|
374
|
+
|
|
375
|
+
# check if data type is `DocumentWithAddressInformationReport`
|
|
376
|
+
if _data_type == "document_with_address_information_report":
|
|
377
|
+
instance.actual_instance = DocumentWithAddressInformationReport.from_json(json_str)
|
|
378
|
+
return instance
|
|
379
|
+
|
|
380
|
+
# check if data type is `DocumentWithDriverVerificationReport`
|
|
381
|
+
if _data_type == "document_with_driver_verification_report":
|
|
382
|
+
instance.actual_instance = DocumentWithDriverVerificationReport.from_json(json_str)
|
|
383
|
+
return instance
|
|
384
|
+
|
|
385
|
+
# check if data type is `DocumentWithDrivingLicenceInformationReport`
|
|
386
|
+
if _data_type == "document_with_driving_licence_information_report":
|
|
387
|
+
instance.actual_instance = DocumentWithDrivingLicenceInformationReport.from_json(json_str)
|
|
388
|
+
return instance
|
|
389
|
+
|
|
390
|
+
# check if data type is `FacialSimilarityMotionReport`
|
|
391
|
+
if _data_type == "facial_similarity_motion_report":
|
|
392
|
+
instance.actual_instance = FacialSimilarityMotionReport.from_json(json_str)
|
|
393
|
+
return instance
|
|
394
|
+
|
|
395
|
+
# check if data type is `FacialSimilarityPhotoFullyAutoReport`
|
|
396
|
+
if _data_type == "facial_similarity_photo_fully_auto_report":
|
|
397
|
+
instance.actual_instance = FacialSimilarityPhotoFullyAutoReport.from_json(json_str)
|
|
398
|
+
return instance
|
|
399
|
+
|
|
400
|
+
# check if data type is `FacialSimilarityPhotoReport`
|
|
401
|
+
if _data_type == "facial_similarity_photo_report":
|
|
402
|
+
instance.actual_instance = FacialSimilarityPhotoReport.from_json(json_str)
|
|
403
|
+
return instance
|
|
404
|
+
|
|
405
|
+
# check if data type is `FacialSimilarityVideoReport`
|
|
406
|
+
if _data_type == "facial_similarity_video_report":
|
|
407
|
+
instance.actual_instance = FacialSimilarityVideoReport.from_json(json_str)
|
|
408
|
+
return instance
|
|
409
|
+
|
|
410
|
+
# check if data type is `IdentityEnhancedReport`
|
|
411
|
+
if _data_type == "identity_enhanced_report":
|
|
412
|
+
instance.actual_instance = IdentityEnhancedReport.from_json(json_str)
|
|
413
|
+
return instance
|
|
414
|
+
|
|
415
|
+
# check if data type is `IndiaPanReport`
|
|
416
|
+
if _data_type == "india_pan_report":
|
|
417
|
+
instance.actual_instance = IndiaPanReport.from_json(json_str)
|
|
418
|
+
return instance
|
|
419
|
+
|
|
420
|
+
# check if data type is `KnownFacesReport`
|
|
421
|
+
if _data_type == "known_faces_report":
|
|
422
|
+
instance.actual_instance = KnownFacesReport.from_json(json_str)
|
|
423
|
+
return instance
|
|
424
|
+
|
|
425
|
+
# check if data type is `ProofOfAddressReport`
|
|
426
|
+
if _data_type == "proof_of_address_report":
|
|
427
|
+
instance.actual_instance = ProofOfAddressReport.from_json(json_str)
|
|
428
|
+
return instance
|
|
429
|
+
|
|
430
|
+
# check if data type is `UsDrivingLicenceReport`
|
|
431
|
+
if _data_type == "us_driving_licence_report":
|
|
432
|
+
instance.actual_instance = UsDrivingLicenceReport.from_json(json_str)
|
|
433
|
+
return instance
|
|
434
|
+
|
|
435
|
+
# check if data type is `WatchlistAmlReport`
|
|
436
|
+
if _data_type == "watchlist_aml_report":
|
|
437
|
+
instance.actual_instance = WatchlistAmlReport.from_json(json_str)
|
|
438
|
+
return instance
|
|
439
|
+
|
|
440
|
+
# check if data type is `WatchlistEnhancedReport`
|
|
441
|
+
if _data_type == "watchlist_enhanced_report":
|
|
442
|
+
instance.actual_instance = WatchlistEnhancedReport.from_json(json_str)
|
|
443
|
+
return instance
|
|
444
|
+
|
|
445
|
+
# check if data type is `WatchlistPepsOnlyReport`
|
|
446
|
+
if _data_type == "watchlist_peps_only_report":
|
|
447
|
+
instance.actual_instance = WatchlistPepsOnlyReport.from_json(json_str)
|
|
448
|
+
return instance
|
|
449
|
+
|
|
450
|
+
# check if data type is `WatchlistSanctionsOnlyReport`
|
|
451
|
+
if _data_type == "watchlist_sanctions_only_report":
|
|
452
|
+
instance.actual_instance = WatchlistSanctionsOnlyReport.from_json(json_str)
|
|
453
|
+
return instance
|
|
454
|
+
|
|
455
|
+
# check if data type is `WatchlistStandardReport`
|
|
456
|
+
if _data_type == "watchlist_standard_report":
|
|
457
|
+
instance.actual_instance = WatchlistStandardReport.from_json(json_str)
|
|
458
|
+
return instance
|
|
459
|
+
|
|
460
|
+
# deserialize data into DocumentReport
|
|
461
|
+
try:
|
|
462
|
+
instance.actual_instance = DocumentReport.from_json(json_str)
|
|
463
|
+
match += 1
|
|
464
|
+
except (ValidationError, ValueError) as e:
|
|
465
|
+
error_messages.append(str(e))
|
|
466
|
+
# deserialize data into DocumentVideoReport
|
|
467
|
+
try:
|
|
468
|
+
instance.actual_instance = DocumentVideoReport.from_json(json_str)
|
|
469
|
+
match += 1
|
|
470
|
+
except (ValidationError, ValueError) as e:
|
|
471
|
+
error_messages.append(str(e))
|
|
472
|
+
# deserialize data into DocumentVideoWithAddressInformationReport
|
|
473
|
+
try:
|
|
474
|
+
instance.actual_instance = DocumentVideoWithAddressInformationReport.from_json(json_str)
|
|
475
|
+
match += 1
|
|
476
|
+
except (ValidationError, ValueError) as e:
|
|
477
|
+
error_messages.append(str(e))
|
|
478
|
+
# deserialize data into DocumentWithAddressInformationReport
|
|
479
|
+
try:
|
|
480
|
+
instance.actual_instance = DocumentWithAddressInformationReport.from_json(json_str)
|
|
481
|
+
match += 1
|
|
482
|
+
except (ValidationError, ValueError) as e:
|
|
483
|
+
error_messages.append(str(e))
|
|
484
|
+
# deserialize data into DocumentWithDrivingLicenceInformationReport
|
|
485
|
+
try:
|
|
486
|
+
instance.actual_instance = DocumentWithDrivingLicenceInformationReport.from_json(json_str)
|
|
487
|
+
match += 1
|
|
488
|
+
except (ValidationError, ValueError) as e:
|
|
489
|
+
error_messages.append(str(e))
|
|
490
|
+
# deserialize data into DocumentWithDriverVerificationReport
|
|
491
|
+
try:
|
|
492
|
+
instance.actual_instance = DocumentWithDriverVerificationReport.from_json(json_str)
|
|
493
|
+
match += 1
|
|
494
|
+
except (ValidationError, ValueError) as e:
|
|
495
|
+
error_messages.append(str(e))
|
|
496
|
+
# deserialize data into FacialSimilarityPhotoReport
|
|
497
|
+
try:
|
|
498
|
+
instance.actual_instance = FacialSimilarityPhotoReport.from_json(json_str)
|
|
499
|
+
match += 1
|
|
500
|
+
except (ValidationError, ValueError) as e:
|
|
501
|
+
error_messages.append(str(e))
|
|
502
|
+
# deserialize data into FacialSimilarityPhotoFullyAutoReport
|
|
503
|
+
try:
|
|
504
|
+
instance.actual_instance = FacialSimilarityPhotoFullyAutoReport.from_json(json_str)
|
|
505
|
+
match += 1
|
|
506
|
+
except (ValidationError, ValueError) as e:
|
|
507
|
+
error_messages.append(str(e))
|
|
508
|
+
# deserialize data into FacialSimilarityVideoReport
|
|
509
|
+
try:
|
|
510
|
+
instance.actual_instance = FacialSimilarityVideoReport.from_json(json_str)
|
|
511
|
+
match += 1
|
|
512
|
+
except (ValidationError, ValueError) as e:
|
|
513
|
+
error_messages.append(str(e))
|
|
514
|
+
# deserialize data into FacialSimilarityMotionReport
|
|
515
|
+
try:
|
|
516
|
+
instance.actual_instance = FacialSimilarityMotionReport.from_json(json_str)
|
|
517
|
+
match += 1
|
|
518
|
+
except (ValidationError, ValueError) as e:
|
|
519
|
+
error_messages.append(str(e))
|
|
520
|
+
# deserialize data into KnownFacesReport
|
|
521
|
+
try:
|
|
522
|
+
instance.actual_instance = KnownFacesReport.from_json(json_str)
|
|
523
|
+
match += 1
|
|
524
|
+
except (ValidationError, ValueError) as e:
|
|
525
|
+
error_messages.append(str(e))
|
|
526
|
+
# deserialize data into IdentityEnhancedReport
|
|
527
|
+
try:
|
|
528
|
+
instance.actual_instance = IdentityEnhancedReport.from_json(json_str)
|
|
529
|
+
match += 1
|
|
530
|
+
except (ValidationError, ValueError) as e:
|
|
531
|
+
error_messages.append(str(e))
|
|
532
|
+
# deserialize data into WatchlistAmlReport
|
|
533
|
+
try:
|
|
534
|
+
instance.actual_instance = WatchlistAmlReport.from_json(json_str)
|
|
535
|
+
match += 1
|
|
536
|
+
except (ValidationError, ValueError) as e:
|
|
537
|
+
error_messages.append(str(e))
|
|
538
|
+
# deserialize data into WatchlistEnhancedReport
|
|
539
|
+
try:
|
|
540
|
+
instance.actual_instance = WatchlistEnhancedReport.from_json(json_str)
|
|
541
|
+
match += 1
|
|
542
|
+
except (ValidationError, ValueError) as e:
|
|
543
|
+
error_messages.append(str(e))
|
|
544
|
+
# deserialize data into WatchlistStandardReport
|
|
545
|
+
try:
|
|
546
|
+
instance.actual_instance = WatchlistStandardReport.from_json(json_str)
|
|
547
|
+
match += 1
|
|
548
|
+
except (ValidationError, ValueError) as e:
|
|
549
|
+
error_messages.append(str(e))
|
|
550
|
+
# deserialize data into WatchlistPepsOnlyReport
|
|
551
|
+
try:
|
|
552
|
+
instance.actual_instance = WatchlistPepsOnlyReport.from_json(json_str)
|
|
553
|
+
match += 1
|
|
554
|
+
except (ValidationError, ValueError) as e:
|
|
555
|
+
error_messages.append(str(e))
|
|
556
|
+
# deserialize data into WatchlistSanctionsOnlyReport
|
|
557
|
+
try:
|
|
558
|
+
instance.actual_instance = WatchlistSanctionsOnlyReport.from_json(json_str)
|
|
559
|
+
match += 1
|
|
560
|
+
except (ValidationError, ValueError) as e:
|
|
561
|
+
error_messages.append(str(e))
|
|
562
|
+
# deserialize data into ProofOfAddressReport
|
|
563
|
+
try:
|
|
564
|
+
instance.actual_instance = ProofOfAddressReport.from_json(json_str)
|
|
565
|
+
match += 1
|
|
566
|
+
except (ValidationError, ValueError) as e:
|
|
567
|
+
error_messages.append(str(e))
|
|
568
|
+
# deserialize data into UsDrivingLicenceReport
|
|
569
|
+
try:
|
|
570
|
+
instance.actual_instance = UsDrivingLicenceReport.from_json(json_str)
|
|
571
|
+
match += 1
|
|
572
|
+
except (ValidationError, ValueError) as e:
|
|
573
|
+
error_messages.append(str(e))
|
|
574
|
+
# deserialize data into DeviceIntelligenceReport
|
|
575
|
+
try:
|
|
576
|
+
instance.actual_instance = DeviceIntelligenceReport.from_json(json_str)
|
|
577
|
+
match += 1
|
|
578
|
+
except (ValidationError, ValueError) as e:
|
|
579
|
+
error_messages.append(str(e))
|
|
580
|
+
# deserialize data into IndiaPanReport
|
|
581
|
+
try:
|
|
582
|
+
instance.actual_instance = IndiaPanReport.from_json(json_str)
|
|
583
|
+
match += 1
|
|
584
|
+
except (ValidationError, ValueError) as e:
|
|
585
|
+
error_messages.append(str(e))
|
|
586
|
+
|
|
587
|
+
if match > 1:
|
|
588
|
+
# more than 1 match
|
|
589
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into Report with oneOf schemas: DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport. Details: " + ", ".join(error_messages))
|
|
590
|
+
elif match == 0:
|
|
591
|
+
# no match
|
|
592
|
+
raise ValueError("No match found when deserializing the JSON string into Report with oneOf schemas: DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport. Details: " + ", ".join(error_messages))
|
|
593
|
+
else:
|
|
594
|
+
return instance
|
|
595
|
+
|
|
596
|
+
def to_json(self) -> str:
|
|
597
|
+
"""Returns the JSON representation of the actual instance"""
|
|
598
|
+
if self.actual_instance is None:
|
|
599
|
+
return "null"
|
|
600
|
+
|
|
601
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
602
|
+
return self.actual_instance.to_json()
|
|
603
|
+
else:
|
|
604
|
+
return json.dumps(self.actual_instance)
|
|
605
|
+
|
|
606
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], DeviceIntelligenceReport, DocumentReport, DocumentVideoReport, DocumentVideoWithAddressInformationReport, DocumentWithAddressInformationReport, DocumentWithDriverVerificationReport, DocumentWithDrivingLicenceInformationReport, FacialSimilarityMotionReport, FacialSimilarityPhotoFullyAutoReport, FacialSimilarityPhotoReport, FacialSimilarityVideoReport, IdentityEnhancedReport, IndiaPanReport, KnownFacesReport, ProofOfAddressReport, UsDrivingLicenceReport, WatchlistAmlReport, WatchlistEnhancedReport, WatchlistPepsOnlyReport, WatchlistSanctionsOnlyReport, WatchlistStandardReport]]:
|
|
607
|
+
"""Returns the dict representation of the actual instance"""
|
|
608
|
+
if self.actual_instance is None:
|
|
609
|
+
return None
|
|
610
|
+
|
|
611
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
612
|
+
return self.actual_instance.to_dict()
|
|
613
|
+
else:
|
|
614
|
+
# primitive type
|
|
615
|
+
return self.actual_instance
|
|
616
|
+
|
|
617
|
+
def to_str(self) -> str:
|
|
618
|
+
"""Returns the string representation of the actual instance"""
|
|
619
|
+
return pprint.pformat(self.model_dump())
|
|
620
|
+
|
|
621
|
+
|