onfido-python 2.10.1__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.1.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.1.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 -131
- 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.1.dist-info/METADATA +0 -181
- onfido_python-2.10.1.dist-info/RECORD +0 -40
|
@@ -0,0 +1,114 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.document_breakdown_data_comparison_breakdown_issuing_country import DocumentBreakdownDataComparisonBreakdownIssuingCountry
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DeviceIntelligenceBreakdownBreakdownDeviceBreakdown(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
application_authenticity: Optional[DocumentBreakdownDataComparisonBreakdownIssuingCountry] = None
|
|
31
|
+
device_integrity: Optional[DocumentBreakdownDataComparisonBreakdownIssuingCountry] = None
|
|
32
|
+
device_reputation: Optional[DocumentBreakdownDataComparisonBreakdownIssuingCountry] = None
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["application_authenticity", "device_integrity", "device_reputation"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DeviceIntelligenceBreakdownBreakdownDeviceBreakdown from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
"additional_properties",
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of application_authenticity
|
|
78
|
+
if self.application_authenticity:
|
|
79
|
+
_dict['application_authenticity'] = self.application_authenticity.to_dict()
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of device_integrity
|
|
81
|
+
if self.device_integrity:
|
|
82
|
+
_dict['device_integrity'] = self.device_integrity.to_dict()
|
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of device_reputation
|
|
84
|
+
if self.device_reputation:
|
|
85
|
+
_dict['device_reputation'] = self.device_reputation.to_dict()
|
|
86
|
+
# puts key-value pairs in additional_properties in the top level
|
|
87
|
+
if self.additional_properties is not None:
|
|
88
|
+
for _key, _value in self.additional_properties.items():
|
|
89
|
+
_dict[_key] = _value
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of DeviceIntelligenceBreakdownBreakdownDeviceBreakdown from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"application_authenticity": DocumentBreakdownDataComparisonBreakdownIssuingCountry.from_dict(obj["application_authenticity"]) if obj.get("application_authenticity") is not None else None,
|
|
104
|
+
"device_integrity": DocumentBreakdownDataComparisonBreakdownIssuingCountry.from_dict(obj["device_integrity"]) if obj.get("device_integrity") is not None else None,
|
|
105
|
+
"device_reputation": DocumentBreakdownDataComparisonBreakdownIssuingCountry.from_dict(obj["device_reputation"]) if obj.get("device_reputation") is not None else None
|
|
106
|
+
})
|
|
107
|
+
# store additional fields in additional_properties
|
|
108
|
+
for _key in obj.keys():
|
|
109
|
+
if _key not in cls.__properties:
|
|
110
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
111
|
+
|
|
112
|
+
return _obj
|
|
113
|
+
|
|
114
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.device_intelligence_breakdown_properties_device import DeviceIntelligenceBreakdownPropertiesDevice
|
|
23
|
+
from onfido.models.device_intelligence_breakdown_properties_geolocation import DeviceIntelligenceBreakdownPropertiesGeolocation
|
|
24
|
+
from onfido.models.device_intelligence_breakdown_properties_ip import DeviceIntelligenceBreakdownPropertiesIp
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class DeviceIntelligenceBreakdownProperties(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
DeviceIntelligenceBreakdownProperties
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
device: Optional[DeviceIntelligenceBreakdownPropertiesDevice] = None
|
|
33
|
+
ip: Optional[DeviceIntelligenceBreakdownPropertiesIp] = None
|
|
34
|
+
geolocation: Optional[DeviceIntelligenceBreakdownPropertiesGeolocation] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["device", "ip", "geolocation"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of DeviceIntelligenceBreakdownProperties from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of device
|
|
80
|
+
if self.device:
|
|
81
|
+
_dict['device'] = self.device.to_dict()
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of ip
|
|
83
|
+
if self.ip:
|
|
84
|
+
_dict['ip'] = self.ip.to_dict()
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of geolocation
|
|
86
|
+
if self.geolocation:
|
|
87
|
+
_dict['geolocation'] = self.geolocation.to_dict()
|
|
88
|
+
# puts key-value pairs in additional_properties in the top level
|
|
89
|
+
if self.additional_properties is not None:
|
|
90
|
+
for _key, _value in self.additional_properties.items():
|
|
91
|
+
_dict[_key] = _value
|
|
92
|
+
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
+
"""Create an instance of DeviceIntelligenceBreakdownProperties from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return cls.model_validate(obj)
|
|
103
|
+
|
|
104
|
+
_obj = cls.model_validate({
|
|
105
|
+
"device": DeviceIntelligenceBreakdownPropertiesDevice.from_dict(obj["device"]) if obj.get("device") is not None else None,
|
|
106
|
+
"ip": DeviceIntelligenceBreakdownPropertiesIp.from_dict(obj["ip"]) if obj.get("ip") is not None else None,
|
|
107
|
+
"geolocation": DeviceIntelligenceBreakdownPropertiesGeolocation.from_dict(obj["geolocation"]) if obj.get("geolocation") is not None else None
|
|
108
|
+
})
|
|
109
|
+
# store additional fields in additional_properties
|
|
110
|
+
for _key in obj.keys():
|
|
111
|
+
if _key not in cls.__properties:
|
|
112
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
113
|
+
|
|
114
|
+
return _obj
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,189 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class DeviceIntelligenceBreakdownPropertiesDevice(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DeviceIntelligenceBreakdownPropertiesDevice
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
sdk_version: Optional[StrictStr] = Field(default=None, description="The SDK version that was used.")
|
|
30
|
+
sdk_source: Optional[StrictStr] = Field(default=None, description="The SDK used to upload the media.")
|
|
31
|
+
authentication_type: Optional[StrictStr] = Field(default=None, description="The token used to authenticate the request.")
|
|
32
|
+
raw_model: Optional[StrictStr] = Field(default=None, description="The model as set by the phone manufacturer (for Android and iOS) or the browser manufacturer (for Web). The model can be presented in name or number form depending on each manufacturer implementation.")
|
|
33
|
+
os: Optional[StrictStr] = Field(default=None, description="The operating system of the device. The value came from manufacturer implementation (for Android and iOS) or browser's user agent (for Web).")
|
|
34
|
+
browser: Optional[StrictStr] = Field(default=None, description="The browser name reported by the browser's user agent.")
|
|
35
|
+
emulator: Optional[StrictBool] = Field(default=None, description="Whether the device is an emulator.")
|
|
36
|
+
randomized_device: Optional[StrictBool] = Field(default=None, description="Whether the device is providing false randomized device and network information.")
|
|
37
|
+
fake_network_request: Optional[StrictBool] = Field(default=None, description="Whether device is using stolen security tokens to send the network information.")
|
|
38
|
+
true_os: Optional[StrictStr] = Field(default=None, description="The true operating system of the device.")
|
|
39
|
+
os_anomaly: Optional[StrictStr] = Field(default=None, description="The likelihood of an operating system anomaly between the true OS and the OS sent by the device.")
|
|
40
|
+
rooted: Optional[StrictBool] = Field(default=None, description="Whether the device is rooted.")
|
|
41
|
+
remote_software: Optional[StrictBool] = Field(default=None, description="Whether the device is controlled via remote software.")
|
|
42
|
+
ip_reputation: Optional[StrictStr] = Field(default=None, description="Whether there is highly suspicious traffic related to the IP address. The risk depends on the overall ratio of clear checks on a given IP.")
|
|
43
|
+
device_fingerprint_reuse: Optional[StrictInt] = Field(default=None, description="The number of times the device was used to create a report for a new applicant. A value greater than 1 indicates potential device reuse.")
|
|
44
|
+
single_device_used: Optional[StrictBool] = Field(default=None, description="Whether the document or biometric media were uploaded from a single device.")
|
|
45
|
+
document_capture: Optional[StrictStr] = Field(default=None, description="Whether the document media were live captured from the device camera.")
|
|
46
|
+
biometric_capture: Optional[StrictStr] = Field(default=None, description="Whether the biometric media were live captured from the device camera.")
|
|
47
|
+
additional_properties: Dict[str, Any] = {}
|
|
48
|
+
__properties: ClassVar[List[str]] = ["sdk_version", "sdk_source", "authentication_type", "raw_model", "os", "browser", "emulator", "randomized_device", "fake_network_request", "true_os", "os_anomaly", "rooted", "remote_software", "ip_reputation", "device_fingerprint_reuse", "single_device_used", "document_capture", "biometric_capture"]
|
|
49
|
+
|
|
50
|
+
@field_validator('sdk_source')
|
|
51
|
+
def sdk_source_validate_enum(cls, value):
|
|
52
|
+
"""Validates the enum"""
|
|
53
|
+
if value is None:
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
if value not in set(['onfido-android-sdk', 'onfido-ios-sdk', 'onfido-web-sdk']):
|
|
57
|
+
raise ValueError("must be one of enum values ('onfido-android-sdk', 'onfido-ios-sdk', 'onfido-web-sdk')")
|
|
58
|
+
return value
|
|
59
|
+
|
|
60
|
+
@field_validator('authentication_type')
|
|
61
|
+
def authentication_type_validate_enum(cls, value):
|
|
62
|
+
"""Validates the enum"""
|
|
63
|
+
if value is None:
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
if value not in set(['sdk_token', 'mobile_token', 'api_token']):
|
|
67
|
+
raise ValueError("must be one of enum values ('sdk_token', 'mobile_token', 'api_token')")
|
|
68
|
+
return value
|
|
69
|
+
|
|
70
|
+
@field_validator('ip_reputation')
|
|
71
|
+
def ip_reputation_validate_enum(cls, value):
|
|
72
|
+
"""Validates the enum"""
|
|
73
|
+
if value is None:
|
|
74
|
+
return value
|
|
75
|
+
|
|
76
|
+
if value not in set(['NOT_ENOUGH_DATA', 'HIGH_RISK', 'LOW_RISK']):
|
|
77
|
+
raise ValueError("must be one of enum values ('NOT_ENOUGH_DATA', 'HIGH_RISK', 'LOW_RISK')")
|
|
78
|
+
return value
|
|
79
|
+
|
|
80
|
+
@field_validator('document_capture')
|
|
81
|
+
def document_capture_validate_enum(cls, value):
|
|
82
|
+
"""Validates the enum"""
|
|
83
|
+
if value is None:
|
|
84
|
+
return value
|
|
85
|
+
|
|
86
|
+
if value not in set(['live', 'unknown_method']):
|
|
87
|
+
raise ValueError("must be one of enum values ('live', 'unknown_method')")
|
|
88
|
+
return value
|
|
89
|
+
|
|
90
|
+
@field_validator('biometric_capture')
|
|
91
|
+
def biometric_capture_validate_enum(cls, value):
|
|
92
|
+
"""Validates the enum"""
|
|
93
|
+
if value is None:
|
|
94
|
+
return value
|
|
95
|
+
|
|
96
|
+
if value not in set(['live', 'unknown_method']):
|
|
97
|
+
raise ValueError("must be one of enum values ('live', 'unknown_method')")
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
model_config = ConfigDict(
|
|
101
|
+
populate_by_name=True,
|
|
102
|
+
validate_assignment=True,
|
|
103
|
+
protected_namespaces=(),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def to_str(self) -> str:
|
|
108
|
+
"""Returns the string representation of the model using alias"""
|
|
109
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
110
|
+
|
|
111
|
+
def to_json(self) -> str:
|
|
112
|
+
"""Returns the JSON representation of the model using alias"""
|
|
113
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
114
|
+
return json.dumps(self.to_dict())
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
118
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesDevice from a JSON string"""
|
|
119
|
+
return cls.from_dict(json.loads(json_str))
|
|
120
|
+
|
|
121
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
122
|
+
"""Return the dictionary representation of the model using alias.
|
|
123
|
+
|
|
124
|
+
This has the following differences from calling pydantic's
|
|
125
|
+
`self.model_dump(by_alias=True)`:
|
|
126
|
+
|
|
127
|
+
* `None` is only added to the output dict for nullable fields that
|
|
128
|
+
were set at model initialization. Other fields with value `None`
|
|
129
|
+
are ignored.
|
|
130
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
131
|
+
"""
|
|
132
|
+
excluded_fields: Set[str] = set([
|
|
133
|
+
"additional_properties",
|
|
134
|
+
])
|
|
135
|
+
|
|
136
|
+
_dict = self.model_dump(
|
|
137
|
+
by_alias=True,
|
|
138
|
+
exclude=excluded_fields,
|
|
139
|
+
exclude_none=True,
|
|
140
|
+
)
|
|
141
|
+
# puts key-value pairs in additional_properties in the top level
|
|
142
|
+
if self.additional_properties is not None:
|
|
143
|
+
for _key, _value in self.additional_properties.items():
|
|
144
|
+
_dict[_key] = _value
|
|
145
|
+
|
|
146
|
+
# set to None if single_device_used (nullable) is None
|
|
147
|
+
# and model_fields_set contains the field
|
|
148
|
+
if self.single_device_used is None and "single_device_used" in self.model_fields_set:
|
|
149
|
+
_dict['single_device_used'] = None
|
|
150
|
+
|
|
151
|
+
return _dict
|
|
152
|
+
|
|
153
|
+
@classmethod
|
|
154
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
155
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesDevice from a dict"""
|
|
156
|
+
if obj is None:
|
|
157
|
+
return None
|
|
158
|
+
|
|
159
|
+
if not isinstance(obj, dict):
|
|
160
|
+
return cls.model_validate(obj)
|
|
161
|
+
|
|
162
|
+
_obj = cls.model_validate({
|
|
163
|
+
"sdk_version": obj.get("sdk_version"),
|
|
164
|
+
"sdk_source": obj.get("sdk_source"),
|
|
165
|
+
"authentication_type": obj.get("authentication_type"),
|
|
166
|
+
"raw_model": obj.get("raw_model"),
|
|
167
|
+
"os": obj.get("os"),
|
|
168
|
+
"browser": obj.get("browser"),
|
|
169
|
+
"emulator": obj.get("emulator"),
|
|
170
|
+
"randomized_device": obj.get("randomized_device"),
|
|
171
|
+
"fake_network_request": obj.get("fake_network_request"),
|
|
172
|
+
"true_os": obj.get("true_os"),
|
|
173
|
+
"os_anomaly": obj.get("os_anomaly"),
|
|
174
|
+
"rooted": obj.get("rooted"),
|
|
175
|
+
"remote_software": obj.get("remote_software"),
|
|
176
|
+
"ip_reputation": obj.get("ip_reputation"),
|
|
177
|
+
"device_fingerprint_reuse": obj.get("device_fingerprint_reuse"),
|
|
178
|
+
"single_device_used": obj.get("single_device_used"),
|
|
179
|
+
"document_capture": obj.get("document_capture"),
|
|
180
|
+
"biometric_capture": obj.get("biometric_capture")
|
|
181
|
+
})
|
|
182
|
+
# store additional fields in additional_properties
|
|
183
|
+
for _key in obj.keys():
|
|
184
|
+
if _key not in cls.__properties:
|
|
185
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
186
|
+
|
|
187
|
+
return _obj
|
|
188
|
+
|
|
189
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.country_codes import CountryCodes
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DeviceIntelligenceBreakdownPropertiesGeolocation(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DeviceIntelligenceBreakdownPropertiesGeolocation
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
city: Optional[StrictStr] = Field(default=None, description="City location of the IP address.")
|
|
31
|
+
region: Optional[StrictStr] = Field(default=None, description="Region location of the IP address.")
|
|
32
|
+
country: Optional[CountryCodes] = Field(default=None, description="Country location of the IP address in a three letter format.")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["city", "region", "country"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesGeolocation from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
"additional_properties",
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
|
78
|
+
if self.additional_properties is not None:
|
|
79
|
+
for _key, _value in self.additional_properties.items():
|
|
80
|
+
_dict[_key] = _value
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesGeolocation from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"city": obj.get("city"),
|
|
95
|
+
"region": obj.get("region"),
|
|
96
|
+
"country": obj.get("country")
|
|
97
|
+
})
|
|
98
|
+
# store additional fields in additional_properties
|
|
99
|
+
for _key in obj.keys():
|
|
100
|
+
if _key not in cls.__properties:
|
|
101
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
102
|
+
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class DeviceIntelligenceBreakdownPropertiesIp(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DeviceIntelligenceBreakdownPropertiesIp
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
address: Optional[StrictStr] = Field(default=None, description="The IP address that uploaded the media.")
|
|
30
|
+
vpn_detection: Optional[StrictStr] = Field(default=None, description="The likelihood of the network connection being a VPN.")
|
|
31
|
+
proxy_detection: Optional[StrictStr] = Field(default=None, description="The likelihood of the network connection being a Proxy.")
|
|
32
|
+
type: Optional[StrictStr] = Field(default=None, description="The type of organization that owns this IP address.")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["address", "vpn_detection", "proxy_detection", "type"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesIp from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
"additional_properties",
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
|
78
|
+
if self.additional_properties is not None:
|
|
79
|
+
for _key, _value in self.additional_properties.items():
|
|
80
|
+
_dict[_key] = _value
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of DeviceIntelligenceBreakdownPropertiesIp from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"address": obj.get("address"),
|
|
95
|
+
"vpn_detection": obj.get("vpn_detection"),
|
|
96
|
+
"proxy_detection": obj.get("proxy_detection"),
|
|
97
|
+
"type": obj.get("type")
|
|
98
|
+
})
|
|
99
|
+
# store additional fields in additional_properties
|
|
100
|
+
for _key in obj.keys():
|
|
101
|
+
if _key not in cls.__properties:
|
|
102
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
103
|
+
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|