perceptic-core-client 0.6.0__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of perceptic-core-client might be problematic. Click here for more details.
- perceptic_core_client/__init__.py +0 -0
- perceptic_core_client/perceptic_core_client/__init__.py +101 -0
- perceptic_core_client/perceptic_core_client/api/__init__.py +12 -0
- perceptic_core_client/perceptic_core_client/api/connection_resource_api.py +569 -0
- perceptic_core_client/perceptic_core_client/api/file_system_contents_resource_api.py +2361 -0
- perceptic_core_client/perceptic_core_client/api/file_system_resource_api.py +1086 -0
- perceptic_core_client/perceptic_core_client/api/indexer_resource_api.py +537 -0
- perceptic_core_client/perceptic_core_client/api/indexing_task_resource_api.py +1173 -0
- perceptic_core_client/perceptic_core_client/api/uri_resource_api.py +1630 -0
- perceptic_core_client/perceptic_core_client/api/user_resource_api.py +278 -0
- perceptic_core_client/perceptic_core_client/api/worker_resource_api.py +1746 -0
- perceptic_core_client/perceptic_core_client/api_client.py +797 -0
- perceptic_core_client/perceptic_core_client/api_response.py +21 -0
- perceptic_core_client/perceptic_core_client/configuration.py +573 -0
- perceptic_core_client/perceptic_core_client/docs/ActionType.md +14 -0
- perceptic_core_client/perceptic_core_client/docs/AzureBlobConnectionSettingsApiDto.md +33 -0
- perceptic_core_client/perceptic_core_client/docs/AzureBlobFileSystemRootMetadataApiDto.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/ConnectionApiDto.md +33 -0
- perceptic_core_client/perceptic_core_client/docs/ConnectionResourceApi.md +144 -0
- perceptic_core_client/perceptic_core_client/docs/ConnectionSettingsApiDto.md +36 -0
- perceptic_core_client/perceptic_core_client/docs/CreateConnectionRequest.md +31 -0
- perceptic_core_client/perceptic_core_client/docs/CreateConnectionResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/CreateFileSystemResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/CreateFolderRequest.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/CreateFolderResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/CreateIndexingTaskRequest.md +33 -0
- perceptic_core_client/perceptic_core_client/docs/CreateIndexingTaskResponse.md +31 -0
- perceptic_core_client/perceptic_core_client/docs/CreateManagedFileSystemRequest.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/CreateRemoteFileSystemRequest.md +32 -0
- perceptic_core_client/perceptic_core_client/docs/FileSystemApiDto.md +34 -0
- perceptic_core_client/perceptic_core_client/docs/FileSystemContentsResourceApi.md +573 -0
- perceptic_core_client/perceptic_core_client/docs/FileSystemResourceApi.md +276 -0
- perceptic_core_client/perceptic_core_client/docs/FileSystemRootMetadataApiDto.md +31 -0
- perceptic_core_client/perceptic_core_client/docs/GetConnectionResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetIndexerResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetIndexingTaskResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetMetadataResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetParentResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetParentUriResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetSignedUrlResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetWorkerEventsResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetWorkerMetadataResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetWorkerStatusResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/GetWorkersResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/IndexerDto.md +32 -0
- perceptic_core_client/perceptic_core_client/docs/IndexerResourceApi.md +138 -0
- perceptic_core_client/perceptic_core_client/docs/IndexingActionDto.md +35 -0
- perceptic_core_client/perceptic_core_client/docs/IndexingActionStatus.md +16 -0
- perceptic_core_client/perceptic_core_client/docs/IndexingTaskDto.md +36 -0
- perceptic_core_client/perceptic_core_client/docs/IndexingTaskResourceApi.md +289 -0
- perceptic_core_client/perceptic_core_client/docs/IndexingTaskStatus.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/InfoEvent.md +31 -0
- perceptic_core_client/perceptic_core_client/docs/JsonNode.md +50 -0
- perceptic_core_client/perceptic_core_client/docs/JsonNodeType.md +26 -0
- perceptic_core_client/perceptic_core_client/docs/ListAllFileSystemsResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/ListFileSystemResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/ListIndexersResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/ListIndexingActionsResponse.md +37 -0
- perceptic_core_client/perceptic_core_client/docs/ManagedFileSystemApiDto.md +32 -0
- perceptic_core_client/perceptic_core_client/docs/MeResponse.md +33 -0
- perceptic_core_client/perceptic_core_client/docs/ModelSchema.md +38 -0
- perceptic_core_client/perceptic_core_client/docs/PagedListFileSystemResponse.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/PostWorkerRunRequest.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/PostWorkerRunResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/ProgressEvent.md +31 -0
- perceptic_core_client/perceptic_core_client/docs/RemoteFileSystemApiDto.md +34 -0
- perceptic_core_client/perceptic_core_client/docs/RequestForInputEvent.md +32 -0
- perceptic_core_client/perceptic_core_client/docs/ResourceEntryDto.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/ResourceId.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/ResourceIdentifier.md +36 -0
- perceptic_core_client/perceptic_core_client/docs/ResourceMetadataDto.md +38 -0
- perceptic_core_client/perceptic_core_client/docs/ResourceTypeDto.md +12 -0
- perceptic_core_client/perceptic_core_client/docs/RunStatusDto.md +26 -0
- perceptic_core_client/perceptic_core_client/docs/S3ConnectionSettingsApiDto.md +33 -0
- perceptic_core_client/perceptic_core_client/docs/S3FileSystemRootMetadataApiDto.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/SchemaLocation.md +30 -0
- perceptic_core_client/perceptic_core_client/docs/StartExecutionResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/UploadFileToManagedFileSystemResponse.md +29 -0
- perceptic_core_client/perceptic_core_client/docs/UriResourceApi.md +413 -0
- perceptic_core_client/perceptic_core_client/docs/UserResourceApi.md +71 -0
- perceptic_core_client/perceptic_core_client/docs/WorkerEvent.md +34 -0
- perceptic_core_client/perceptic_core_client/docs/WorkerMetadataDto.md +32 -0
- perceptic_core_client/perceptic_core_client/docs/WorkerResourceApi.md +427 -0
- perceptic_core_client/perceptic_core_client/exceptions.py +216 -0
- perceptic_core_client/perceptic_core_client/models/__init__.py +77 -0
- perceptic_core_client/perceptic_core_client/models/action_type.py +38 -0
- perceptic_core_client/perceptic_core_client/models/azure_blob_connection_settings_api_dto.py +124 -0
- perceptic_core_client/perceptic_core_client/models/azure_blob_file_system_root_metadata_api_dto.py +89 -0
- perceptic_core_client/perceptic_core_client/models/connection_api_dto.py +99 -0
- perceptic_core_client/perceptic_core_client/models/connection_settings_api_dto.py +165 -0
- perceptic_core_client/perceptic_core_client/models/create_connection_request.py +95 -0
- perceptic_core_client/perceptic_core_client/models/create_connection_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/create_file_system_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/create_folder_request.py +87 -0
- perceptic_core_client/perceptic_core_client/models/create_folder_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/create_indexing_task_request.py +95 -0
- perceptic_core_client/perceptic_core_client/models/create_indexing_task_response.py +95 -0
- perceptic_core_client/perceptic_core_client/models/create_managed_file_system_request.py +89 -0
- perceptic_core_client/perceptic_core_client/models/create_remote_file_system_request.py +97 -0
- perceptic_core_client/perceptic_core_client/models/file_system_api_dto.py +165 -0
- perceptic_core_client/perceptic_core_client/models/file_system_root_metadata_api_dto.py +165 -0
- perceptic_core_client/perceptic_core_client/models/get_connection_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/get_indexer_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/get_indexing_task_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/get_metadata_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/get_parent_response.py +96 -0
- perceptic_core_client/perceptic_core_client/models/get_parent_uri_response.py +92 -0
- perceptic_core_client/perceptic_core_client/models/get_signed_url_response.py +92 -0
- perceptic_core_client/perceptic_core_client/models/get_worker_events_response.py +95 -0
- perceptic_core_client/perceptic_core_client/models/get_worker_metadata_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/get_worker_status_response.py +88 -0
- perceptic_core_client/perceptic_core_client/models/get_workers_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/indexer_dto.py +91 -0
- perceptic_core_client/perceptic_core_client/models/indexing_action_dto.py +107 -0
- perceptic_core_client/perceptic_core_client/models/indexing_action_status.py +39 -0
- perceptic_core_client/perceptic_core_client/models/indexing_task_dto.py +106 -0
- perceptic_core_client/perceptic_core_client/models/indexing_task_status.py +87 -0
- perceptic_core_client/perceptic_core_client/models/info_event.py +91 -0
- perceptic_core_client/perceptic_core_client/models/json_node.py +130 -0
- perceptic_core_client/perceptic_core_client/models/json_node_type.py +44 -0
- perceptic_core_client/perceptic_core_client/models/list_all_file_systems_response.py +100 -0
- perceptic_core_client/perceptic_core_client/models/list_file_system_response.py +100 -0
- perceptic_core_client/perceptic_core_client/models/list_indexers_response.py +100 -0
- perceptic_core_client/perceptic_core_client/models/list_indexing_actions_response.py +116 -0
- perceptic_core_client/perceptic_core_client/models/managed_file_system_api_dto.py +93 -0
- perceptic_core_client/perceptic_core_client/models/me_response.py +95 -0
- perceptic_core_client/perceptic_core_client/models/model_schema.py +114 -0
- perceptic_core_client/perceptic_core_client/models/paged_list_file_system_response.py +102 -0
- perceptic_core_client/perceptic_core_client/models/post_worker_run_request.py +87 -0
- perceptic_core_client/perceptic_core_client/models/post_worker_run_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/progress_event.py +91 -0
- perceptic_core_client/perceptic_core_client/models/remote_file_system_api_dto.py +101 -0
- perceptic_core_client/perceptic_core_client/models/request_for_input_event.py +98 -0
- perceptic_core_client/perceptic_core_client/models/resource_entry_dto.py +93 -0
- perceptic_core_client/perceptic_core_client/models/resource_id.py +87 -0
- perceptic_core_client/perceptic_core_client/models/resource_identifier.py +101 -0
- perceptic_core_client/perceptic_core_client/models/resource_metadata_dto.py +122 -0
- perceptic_core_client/perceptic_core_client/models/resource_type_dto.py +37 -0
- perceptic_core_client/perceptic_core_client/models/run_status_dto.py +44 -0
- perceptic_core_client/perceptic_core_client/models/s3_connection_settings_api_dto.py +124 -0
- perceptic_core_client/perceptic_core_client/models/s3_file_system_root_metadata_api_dto.py +89 -0
- perceptic_core_client/perceptic_core_client/models/schema_location.py +89 -0
- perceptic_core_client/perceptic_core_client/models/start_execution_response.py +91 -0
- perceptic_core_client/perceptic_core_client/models/upload_file_to_managed_file_system_response.py +87 -0
- perceptic_core_client/perceptic_core_client/models/worker_event.py +189 -0
- perceptic_core_client/perceptic_core_client/models/worker_metadata_dto.py +93 -0
- perceptic_core_client/perceptic_core_client/rest.py +258 -0
- perceptic_core_client/perceptic_core_client/test/__init__.py +0 -0
- perceptic_core_client/perceptic_core_client/test/test_action_type.py +33 -0
- perceptic_core_client/perceptic_core_client/test/test_azure_blob_connection_settings_api_dto.py +59 -0
- perceptic_core_client/perceptic_core_client/test/test_azure_blob_file_system_root_metadata_api_dto.py +52 -0
- perceptic_core_client/perceptic_core_client/test/test_connection_api_dto.py +55 -0
- perceptic_core_client/perceptic_core_client/test/test_connection_resource_api.py +45 -0
- perceptic_core_client/perceptic_core_client/test/test_connection_settings_api_dto.py +65 -0
- perceptic_core_client/perceptic_core_client/test/test_create_connection_request.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_create_connection_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_create_file_system_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_create_folder_request.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_create_folder_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_create_indexing_task_request.py +57 -0
- perceptic_core_client/perceptic_core_client/test/test_create_indexing_task_response.py +64 -0
- perceptic_core_client/perceptic_core_client/test/test_create_managed_file_system_request.py +52 -0
- perceptic_core_client/perceptic_core_client/test/test_create_remote_file_system_request.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_file_system_api_dto.py +56 -0
- perceptic_core_client/perceptic_core_client/test/test_file_system_contents_resource_api.py +87 -0
- perceptic_core_client/perceptic_core_client/test/test_file_system_resource_api.py +59 -0
- perceptic_core_client/perceptic_core_client/test/test_file_system_root_metadata_api_dto.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_get_connection_response.py +56 -0
- perceptic_core_client/perceptic_core_client/test/test_get_indexer_response.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_get_indexing_task_response.py +62 -0
- perceptic_core_client/perceptic_core_client/test/test_get_metadata_response.py +61 -0
- perceptic_core_client/perceptic_core_client/test/test_get_parent_response.py +52 -0
- perceptic_core_client/perceptic_core_client/test/test_get_parent_uri_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_get_signed_url_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_get_worker_events_response.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_get_worker_metadata_response.py +55 -0
- perceptic_core_client/perceptic_core_client/test/test_get_worker_status_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_get_workers_response.py +55 -0
- perceptic_core_client/perceptic_core_client/test/test_indexer_dto.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_indexer_resource_api.py +45 -0
- perceptic_core_client/perceptic_core_client/test/test_indexing_action_dto.py +57 -0
- perceptic_core_client/perceptic_core_client/test/test_indexing_action_status.py +33 -0
- perceptic_core_client/perceptic_core_client/test/test_indexing_task_dto.py +61 -0
- perceptic_core_client/perceptic_core_client/test/test_indexing_task_resource_api.py +59 -0
- perceptic_core_client/perceptic_core_client/test/test_indexing_task_status.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_info_event.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_json_node.py +72 -0
- perceptic_core_client/perceptic_core_client/test/test_json_node_type.py +33 -0
- perceptic_core_client/perceptic_core_client/test/test_list_all_file_systems_response.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_list_file_system_response.py +63 -0
- perceptic_core_client/perceptic_core_client/test/test_list_indexers_response.py +56 -0
- perceptic_core_client/perceptic_core_client/test/test_list_indexing_actions_response.py +68 -0
- perceptic_core_client/perceptic_core_client/test/test_managed_file_system_api_dto.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_me_response.py +55 -0
- perceptic_core_client/perceptic_core_client/test/test_model_schema.py +66 -0
- perceptic_core_client/perceptic_core_client/test/test_paged_list_file_system_response.py +65 -0
- perceptic_core_client/perceptic_core_client/test/test_post_worker_run_request.py +52 -0
- perceptic_core_client/perceptic_core_client/test/test_post_worker_run_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_progress_event.py +53 -0
- perceptic_core_client/perceptic_core_client/test/test_remote_file_system_api_dto.py +56 -0
- perceptic_core_client/perceptic_core_client/test/test_request_for_input_event.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_resource_entry_dto.py +62 -0
- perceptic_core_client/perceptic_core_client/test/test_resource_id.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_resource_identifier.py +58 -0
- perceptic_core_client/perceptic_core_client/test/test_resource_metadata_dto.py +60 -0
- perceptic_core_client/perceptic_core_client/test/test_resource_type_dto.py +33 -0
- perceptic_core_client/perceptic_core_client/test/test_run_status_dto.py +33 -0
- perceptic_core_client/perceptic_core_client/test/test_s3_connection_settings_api_dto.py +59 -0
- perceptic_core_client/perceptic_core_client/test/test_s3_file_system_root_metadata_api_dto.py +52 -0
- perceptic_core_client/perceptic_core_client/test/test_schema_location.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_start_execution_response.py +62 -0
- perceptic_core_client/perceptic_core_client/test/test_upload_file_to_managed_file_system_response.py +51 -0
- perceptic_core_client/perceptic_core_client/test/test_uri_resource_api.py +73 -0
- perceptic_core_client/perceptic_core_client/test/test_user_resource_api.py +38 -0
- perceptic_core_client/perceptic_core_client/test/test_worker_event.py +56 -0
- perceptic_core_client/perceptic_core_client/test/test_worker_metadata_dto.py +54 -0
- perceptic_core_client/perceptic_core_client/test/test_worker_resource_api.py +73 -0
- perceptic_core_client/perceptic_core_client_README.md +181 -0
- {perceptic_core_client-0.6.0.dist-info → perceptic_core_client-0.6.1.dist-info}/METADATA +1 -1
- perceptic_core_client-0.6.1.dist-info/RECORD +222 -0
- perceptic_core_client-0.6.1.dist-info/top_level.txt +1 -0
- perceptic_core_client-0.6.0.dist-info/RECORD +0 -4
- perceptic_core_client-0.6.0.dist-info/top_level.txt +0 -1
- {perceptic_core_client-0.6.0.dist-info → perceptic_core_client-0.6.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
perceptic-core-server API
|
|
6
|
+
|
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# import models into model package
|
|
17
|
+
from perceptic_core_client.models.action_type import ActionType
|
|
18
|
+
from perceptic_core_client.models.azure_blob_connection_settings_api_dto import AzureBlobConnectionSettingsApiDto
|
|
19
|
+
from perceptic_core_client.models.azure_blob_file_system_root_metadata_api_dto import AzureBlobFileSystemRootMetadataApiDto
|
|
20
|
+
from perceptic_core_client.models.connection_api_dto import ConnectionApiDto
|
|
21
|
+
from perceptic_core_client.models.connection_settings_api_dto import ConnectionSettingsApiDto
|
|
22
|
+
from perceptic_core_client.models.create_connection_request import CreateConnectionRequest
|
|
23
|
+
from perceptic_core_client.models.create_connection_response import CreateConnectionResponse
|
|
24
|
+
from perceptic_core_client.models.create_file_system_response import CreateFileSystemResponse
|
|
25
|
+
from perceptic_core_client.models.create_folder_request import CreateFolderRequest
|
|
26
|
+
from perceptic_core_client.models.create_folder_response import CreateFolderResponse
|
|
27
|
+
from perceptic_core_client.models.create_indexing_task_request import CreateIndexingTaskRequest
|
|
28
|
+
from perceptic_core_client.models.create_indexing_task_response import CreateIndexingTaskResponse
|
|
29
|
+
from perceptic_core_client.models.create_managed_file_system_request import CreateManagedFileSystemRequest
|
|
30
|
+
from perceptic_core_client.models.create_remote_file_system_request import CreateRemoteFileSystemRequest
|
|
31
|
+
from perceptic_core_client.models.file_system_api_dto import FileSystemApiDto
|
|
32
|
+
from perceptic_core_client.models.file_system_root_metadata_api_dto import FileSystemRootMetadataApiDto
|
|
33
|
+
from perceptic_core_client.models.get_connection_response import GetConnectionResponse
|
|
34
|
+
from perceptic_core_client.models.get_indexer_response import GetIndexerResponse
|
|
35
|
+
from perceptic_core_client.models.get_indexing_task_response import GetIndexingTaskResponse
|
|
36
|
+
from perceptic_core_client.models.get_metadata_response import GetMetadataResponse
|
|
37
|
+
from perceptic_core_client.models.get_parent_response import GetParentResponse
|
|
38
|
+
from perceptic_core_client.models.get_parent_uri_response import GetParentUriResponse
|
|
39
|
+
from perceptic_core_client.models.get_signed_url_response import GetSignedUrlResponse
|
|
40
|
+
from perceptic_core_client.models.get_worker_events_response import GetWorkerEventsResponse
|
|
41
|
+
from perceptic_core_client.models.get_worker_metadata_response import GetWorkerMetadataResponse
|
|
42
|
+
from perceptic_core_client.models.get_worker_status_response import GetWorkerStatusResponse
|
|
43
|
+
from perceptic_core_client.models.get_workers_response import GetWorkersResponse
|
|
44
|
+
from perceptic_core_client.models.indexer_dto import IndexerDto
|
|
45
|
+
from perceptic_core_client.models.indexing_action_dto import IndexingActionDto
|
|
46
|
+
from perceptic_core_client.models.indexing_action_status import IndexingActionStatus
|
|
47
|
+
from perceptic_core_client.models.indexing_task_dto import IndexingTaskDto
|
|
48
|
+
from perceptic_core_client.models.indexing_task_status import IndexingTaskStatus
|
|
49
|
+
from perceptic_core_client.models.info_event import InfoEvent
|
|
50
|
+
from perceptic_core_client.models.json_node import JsonNode
|
|
51
|
+
from perceptic_core_client.models.json_node_type import JsonNodeType
|
|
52
|
+
from perceptic_core_client.models.list_all_file_systems_response import ListAllFileSystemsResponse
|
|
53
|
+
from perceptic_core_client.models.list_file_system_response import ListFileSystemResponse
|
|
54
|
+
from perceptic_core_client.models.list_indexers_response import ListIndexersResponse
|
|
55
|
+
from perceptic_core_client.models.list_indexing_actions_response import ListIndexingActionsResponse
|
|
56
|
+
from perceptic_core_client.models.managed_file_system_api_dto import ManagedFileSystemApiDto
|
|
57
|
+
from perceptic_core_client.models.me_response import MeResponse
|
|
58
|
+
from perceptic_core_client.models.model_schema import ModelSchema
|
|
59
|
+
from perceptic_core_client.models.paged_list_file_system_response import PagedListFileSystemResponse
|
|
60
|
+
from perceptic_core_client.models.post_worker_run_request import PostWorkerRunRequest
|
|
61
|
+
from perceptic_core_client.models.post_worker_run_response import PostWorkerRunResponse
|
|
62
|
+
from perceptic_core_client.models.progress_event import ProgressEvent
|
|
63
|
+
from perceptic_core_client.models.remote_file_system_api_dto import RemoteFileSystemApiDto
|
|
64
|
+
from perceptic_core_client.models.request_for_input_event import RequestForInputEvent
|
|
65
|
+
from perceptic_core_client.models.resource_entry_dto import ResourceEntryDto
|
|
66
|
+
from perceptic_core_client.models.resource_id import ResourceId
|
|
67
|
+
from perceptic_core_client.models.resource_identifier import ResourceIdentifier
|
|
68
|
+
from perceptic_core_client.models.resource_metadata_dto import ResourceMetadataDto
|
|
69
|
+
from perceptic_core_client.models.resource_type_dto import ResourceTypeDto
|
|
70
|
+
from perceptic_core_client.models.run_status_dto import RunStatusDto
|
|
71
|
+
from perceptic_core_client.models.s3_connection_settings_api_dto import S3ConnectionSettingsApiDto
|
|
72
|
+
from perceptic_core_client.models.s3_file_system_root_metadata_api_dto import S3FileSystemRootMetadataApiDto
|
|
73
|
+
from perceptic_core_client.models.schema_location import SchemaLocation
|
|
74
|
+
from perceptic_core_client.models.start_execution_response import StartExecutionResponse
|
|
75
|
+
from perceptic_core_client.models.upload_file_to_managed_file_system_response import UploadFileToManagedFileSystemResponse
|
|
76
|
+
from perceptic_core_client.models.worker_event import WorkerEvent
|
|
77
|
+
from perceptic_core_client.models.worker_metadata_dto import WorkerMetadataDto
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ActionType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
ActionType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
INDEX = 'INDEX'
|
|
30
|
+
DELETE = 'DELETE'
|
|
31
|
+
NOOP = 'NOOP'
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of ActionType from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AzureBlobConnectionSettingsApiDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
AzureBlobConnectionSettingsApiDto
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
container: Annotated[str, Field(strict=True)]
|
|
31
|
+
credential_name: Annotated[str, Field(strict=True)] = Field(alias="credentialName")
|
|
32
|
+
credential_key: Annotated[str, Field(strict=True)] = Field(alias="credentialKey")
|
|
33
|
+
url: Annotated[str, Field(strict=True)]
|
|
34
|
+
type: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["container", "credentialName", "credentialKey", "url", "type"]
|
|
36
|
+
|
|
37
|
+
@field_validator('container')
|
|
38
|
+
def container_validate_regular_expression(cls, value):
|
|
39
|
+
"""Validates the regular expression"""
|
|
40
|
+
if not re.match(r"\S", value):
|
|
41
|
+
raise ValueError(r"must validate the regular expression /\S/")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@field_validator('credential_name')
|
|
45
|
+
def credential_name_validate_regular_expression(cls, value):
|
|
46
|
+
"""Validates the regular expression"""
|
|
47
|
+
if not re.match(r"\S", value):
|
|
48
|
+
raise ValueError(r"must validate the regular expression /\S/")
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
@field_validator('credential_key')
|
|
52
|
+
def credential_key_validate_regular_expression(cls, value):
|
|
53
|
+
"""Validates the regular expression"""
|
|
54
|
+
if not re.match(r"\S", value):
|
|
55
|
+
raise ValueError(r"must validate the regular expression /\S/")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
@field_validator('url')
|
|
59
|
+
def url_validate_regular_expression(cls, value):
|
|
60
|
+
"""Validates the regular expression"""
|
|
61
|
+
if not re.match(r"\S", value):
|
|
62
|
+
raise ValueError(r"must validate the regular expression /\S/")
|
|
63
|
+
return value
|
|
64
|
+
|
|
65
|
+
model_config = ConfigDict(
|
|
66
|
+
populate_by_name=True,
|
|
67
|
+
validate_assignment=True,
|
|
68
|
+
protected_namespaces=(),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of AzureBlobConnectionSettingsApiDto from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
"""
|
|
96
|
+
excluded_fields: Set[str] = set([
|
|
97
|
+
])
|
|
98
|
+
|
|
99
|
+
_dict = self.model_dump(
|
|
100
|
+
by_alias=True,
|
|
101
|
+
exclude=excluded_fields,
|
|
102
|
+
exclude_none=True,
|
|
103
|
+
)
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
+
"""Create an instance of AzureBlobConnectionSettingsApiDto from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"container": obj.get("container"),
|
|
117
|
+
"credentialName": obj.get("credentialName"),
|
|
118
|
+
"credentialKey": obj.get("credentialKey"),
|
|
119
|
+
"url": obj.get("url"),
|
|
120
|
+
"type": obj.get("type")
|
|
121
|
+
})
|
|
122
|
+
return _obj
|
|
123
|
+
|
|
124
|
+
|
perceptic_core_client/perceptic_core_client/models/azure_blob_file_system_root_metadata_api_dto.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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 AzureBlobFileSystemRootMetadataApiDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AzureBlobFileSystemRootMetadataApiDto
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
container_name: Optional[StrictStr] = Field(default=None, alias="containerName")
|
|
30
|
+
type: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["containerName", "type"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AzureBlobFileSystemRootMetadataApiDto from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AzureBlobFileSystemRootMetadataApiDto from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"containerName": obj.get("containerName"),
|
|
85
|
+
"type": obj.get("type")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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 perceptic_core_client.models.connection_settings_api_dto import ConnectionSettingsApiDto
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ConnectionApiDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ConnectionApiDto
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
rid: Optional[StrictStr] = None
|
|
31
|
+
name: Optional[StrictStr] = None
|
|
32
|
+
description: Optional[StrictStr] = None
|
|
33
|
+
user_id: Optional[StrictStr] = Field(default=None, alias="userId")
|
|
34
|
+
settings: Optional[ConnectionSettingsApiDto] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["rid", "name", "description", "userId", "settings"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ConnectionApiDto from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of settings
|
|
77
|
+
if self.settings:
|
|
78
|
+
_dict['settings'] = self.settings.to_dict()
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ConnectionApiDto from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"rid": obj.get("rid"),
|
|
92
|
+
"name": obj.get("name"),
|
|
93
|
+
"description": obj.get("description"),
|
|
94
|
+
"userId": obj.get("userId"),
|
|
95
|
+
"settings": ConnectionSettingsApiDto.from_dict(obj["settings"]) if obj.get("settings") is not None else None
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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 perceptic_core_client.models.azure_blob_connection_settings_api_dto import AzureBlobConnectionSettingsApiDto
|
|
21
|
+
from perceptic_core_client.models.s3_connection_settings_api_dto import S3ConnectionSettingsApiDto
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
from typing import Union, List, Set, Optional, Dict
|
|
24
|
+
from typing_extensions import Literal, Self
|
|
25
|
+
|
|
26
|
+
CONNECTIONSETTINGSAPIDTO_ONE_OF_SCHEMAS = ["AzureBlobConnectionSettingsApiDto", "S3ConnectionSettingsApiDto"]
|
|
27
|
+
|
|
28
|
+
class ConnectionSettingsApiDto(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
ConnectionSettingsApiDto
|
|
31
|
+
"""
|
|
32
|
+
# data type: S3ConnectionSettingsApiDto
|
|
33
|
+
oneof_schema_1_validator: Optional[S3ConnectionSettingsApiDto] = None
|
|
34
|
+
# data type: AzureBlobConnectionSettingsApiDto
|
|
35
|
+
oneof_schema_2_validator: Optional[AzureBlobConnectionSettingsApiDto] = None
|
|
36
|
+
actual_instance: Optional[Union[AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto]] = None
|
|
37
|
+
one_of_schemas: Set[str] = { "AzureBlobConnectionSettingsApiDto", "S3ConnectionSettingsApiDto" }
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
49
|
+
if args:
|
|
50
|
+
if len(args) > 1:
|
|
51
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
52
|
+
if kwargs:
|
|
53
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
54
|
+
super().__init__(actual_instance=args[0])
|
|
55
|
+
else:
|
|
56
|
+
super().__init__(**kwargs)
|
|
57
|
+
|
|
58
|
+
@field_validator('actual_instance')
|
|
59
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
60
|
+
instance = ConnectionSettingsApiDto.model_construct()
|
|
61
|
+
error_messages = []
|
|
62
|
+
match = 0
|
|
63
|
+
# validate data type: S3ConnectionSettingsApiDto
|
|
64
|
+
if not isinstance(v, S3ConnectionSettingsApiDto):
|
|
65
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `S3ConnectionSettingsApiDto`")
|
|
66
|
+
else:
|
|
67
|
+
match += 1
|
|
68
|
+
# validate data type: AzureBlobConnectionSettingsApiDto
|
|
69
|
+
if not isinstance(v, AzureBlobConnectionSettingsApiDto):
|
|
70
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AzureBlobConnectionSettingsApiDto`")
|
|
71
|
+
else:
|
|
72
|
+
match += 1
|
|
73
|
+
if match > 1:
|
|
74
|
+
# more than 1 match
|
|
75
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ConnectionSettingsApiDto with oneOf schemas: AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto. Details: " + ", ".join(error_messages))
|
|
76
|
+
elif match == 0:
|
|
77
|
+
# no match
|
|
78
|
+
raise ValueError("No match found when setting `actual_instance` in ConnectionSettingsApiDto with oneOf schemas: AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto. Details: " + ", ".join(error_messages))
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
84
|
+
return cls.from_json(json.dumps(obj))
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> Self:
|
|
88
|
+
"""Returns the object represented by the json string"""
|
|
89
|
+
instance = cls.model_construct()
|
|
90
|
+
error_messages = []
|
|
91
|
+
match = 0
|
|
92
|
+
|
|
93
|
+
# use oneOf discriminator to lookup the data type
|
|
94
|
+
_data_type = json.loads(json_str).get("type")
|
|
95
|
+
if not _data_type:
|
|
96
|
+
raise ValueError("Failed to lookup data type from the field `type` in the input.")
|
|
97
|
+
|
|
98
|
+
# check if data type is `AzureBlobConnectionSettingsApiDto`
|
|
99
|
+
if _data_type == "v1/blob":
|
|
100
|
+
instance.actual_instance = AzureBlobConnectionSettingsApiDto.from_json(json_str)
|
|
101
|
+
return instance
|
|
102
|
+
|
|
103
|
+
# check if data type is `S3ConnectionSettingsApiDto`
|
|
104
|
+
if _data_type == "v1/s3":
|
|
105
|
+
instance.actual_instance = S3ConnectionSettingsApiDto.from_json(json_str)
|
|
106
|
+
return instance
|
|
107
|
+
|
|
108
|
+
# check if data type is `AzureBlobConnectionSettingsApiDto`
|
|
109
|
+
if _data_type == "AzureBlobConnectionSettingsApiDto":
|
|
110
|
+
instance.actual_instance = AzureBlobConnectionSettingsApiDto.from_json(json_str)
|
|
111
|
+
return instance
|
|
112
|
+
|
|
113
|
+
# check if data type is `S3ConnectionSettingsApiDto`
|
|
114
|
+
if _data_type == "S3ConnectionSettingsApiDto":
|
|
115
|
+
instance.actual_instance = S3ConnectionSettingsApiDto.from_json(json_str)
|
|
116
|
+
return instance
|
|
117
|
+
|
|
118
|
+
# deserialize data into S3ConnectionSettingsApiDto
|
|
119
|
+
try:
|
|
120
|
+
instance.actual_instance = S3ConnectionSettingsApiDto.from_json(json_str)
|
|
121
|
+
match += 1
|
|
122
|
+
except (ValidationError, ValueError) as e:
|
|
123
|
+
error_messages.append(str(e))
|
|
124
|
+
# deserialize data into AzureBlobConnectionSettingsApiDto
|
|
125
|
+
try:
|
|
126
|
+
instance.actual_instance = AzureBlobConnectionSettingsApiDto.from_json(json_str)
|
|
127
|
+
match += 1
|
|
128
|
+
except (ValidationError, ValueError) as e:
|
|
129
|
+
error_messages.append(str(e))
|
|
130
|
+
|
|
131
|
+
if match > 1:
|
|
132
|
+
# more than 1 match
|
|
133
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ConnectionSettingsApiDto with oneOf schemas: AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto. Details: " + ", ".join(error_messages))
|
|
134
|
+
elif match == 0:
|
|
135
|
+
# no match
|
|
136
|
+
raise ValueError("No match found when deserializing the JSON string into ConnectionSettingsApiDto with oneOf schemas: AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto. Details: " + ", ".join(error_messages))
|
|
137
|
+
else:
|
|
138
|
+
return instance
|
|
139
|
+
|
|
140
|
+
def to_json(self) -> str:
|
|
141
|
+
"""Returns the JSON representation of the actual instance"""
|
|
142
|
+
if self.actual_instance is None:
|
|
143
|
+
return "null"
|
|
144
|
+
|
|
145
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
146
|
+
return self.actual_instance.to_json()
|
|
147
|
+
else:
|
|
148
|
+
return json.dumps(self.actual_instance)
|
|
149
|
+
|
|
150
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], AzureBlobConnectionSettingsApiDto, S3ConnectionSettingsApiDto]]:
|
|
151
|
+
"""Returns the dict representation of the actual instance"""
|
|
152
|
+
if self.actual_instance is None:
|
|
153
|
+
return None
|
|
154
|
+
|
|
155
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
156
|
+
return self.actual_instance.to_dict()
|
|
157
|
+
else:
|
|
158
|
+
# primitive type
|
|
159
|
+
return self.actual_instance
|
|
160
|
+
|
|
161
|
+
def to_str(self) -> str:
|
|
162
|
+
"""Returns the string representation of the actual instance"""
|
|
163
|
+
return pprint.pformat(self.model_dump())
|
|
164
|
+
|
|
165
|
+
|