perceptic-core-client 0.39.0__py3-none-any.whl → 0.50.3__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.
- perceptic_core_client/__init__.py +51 -0
- perceptic_core_client/api/__init__.py +1 -0
- perceptic_core_client/api/tag_resource_api.py +100 -836
- perceptic_core_client/api/uri_resource_api.py +818 -207
- perceptic_core_client/api/user_resource_api.py +308 -1
- perceptic_core_client/api/worker_resource_api.py +1100 -211
- perceptic_core_client/api/worker_resource_v3_api.py +1477 -0
- perceptic_core_client/api_client.py +8 -5
- perceptic_core_client/configuration.py +6 -2
- perceptic_core_client/models/__init__.py +25 -1
- perceptic_core_client/models/citation_metadata_api_dto.py +0 -15
- perceptic_core_client/models/connection_settings_api_dto.py +0 -10
- perceptic_core_client/models/create_folder_response_v2.py +89 -0
- perceptic_core_client/models/file_system_api_dto.py +0 -10
- perceptic_core_client/models/file_system_root_metadata_api_dto.py +0 -10
- perceptic_core_client/models/get_run_event_rating_response.py +91 -0
- perceptic_core_client/models/get_worker_events_v2_response.py +101 -0
- perceptic_core_client/models/get_worker_events_v3_response.py +89 -0
- perceptic_core_client/models/info_event1.py +94 -0
- perceptic_core_client/models/ingest_event_request.py +94 -0
- perceptic_core_client/models/ingest_event_response.py +89 -0
- perceptic_core_client/models/ingest_stream_event_request.py +89 -0
- perceptic_core_client/models/list_users_response.py +104 -0
- perceptic_core_client/models/persistence_mode.py +38 -0
- perceptic_core_client/models/post_rating_request.py +89 -0
- perceptic_core_client/models/post_run_event_rating_response.py +91 -0
- perceptic_core_client/models/post_worker_run_request1.py +87 -0
- perceptic_core_client/models/post_worker_run_response1.py +87 -0
- perceptic_core_client/models/progress_event1.py +94 -0
- perceptic_core_client/models/rating_dto_worker_run_event_rating_secondary_id.py +108 -0
- perceptic_core_client/models/run_status_dto.py +1 -0
- perceptic_core_client/models/schedule_trigger.py +0 -15
- perceptic_core_client/models/upload_resource_response_v2.py +91 -0
- perceptic_core_client/models/user_input_event.py +101 -0
- perceptic_core_client/models/user_request_for_input_event.py +108 -0
- perceptic_core_client/models/worker_event.py +0 -15
- perceptic_core_client/models/worker_event_v2.py +193 -0
- perceptic_core_client/models/worker_run_event_rating_secondary_id.py +89 -0
- perceptic_core_client/models/worker_stream_event_v2.py +90 -0
- perceptic_core_client/models/worker_v2_next_page_token.py +89 -0
- perceptic_core_client/models/workflow_status_response.py +89 -0
- perceptic_core_client/test/test_create_folder_response_v2.py +52 -0
- perceptic_core_client/test/test_get_run_event_rating_response.py +57 -0
- perceptic_core_client/test/test_get_worker_events_v2_response.py +56 -0
- perceptic_core_client/test/test_get_worker_events_v3_response.py +54 -0
- perceptic_core_client/test/test_info_event1.py +54 -0
- perceptic_core_client/test/test_ingest_event_request.py +56 -0
- perceptic_core_client/test/test_ingest_event_response.py +52 -0
- perceptic_core_client/test/test_ingest_stream_event_request.py +52 -0
- perceptic_core_client/test/test_list_users_response.py +60 -0
- perceptic_core_client/test/test_persistence_mode.py +33 -0
- perceptic_core_client/test/test_post_rating_request.py +52 -0
- perceptic_core_client/test/test_post_run_event_rating_response.py +57 -0
- perceptic_core_client/test/test_post_worker_run_request1.py +51 -0
- perceptic_core_client/test/test_post_worker_run_response1.py +51 -0
- perceptic_core_client/test/test_progress_event.py +1 -1
- perceptic_core_client/test/test_progress_event1.py +54 -0
- perceptic_core_client/test/test_rating_dto_worker_run_event_rating_secondary_id.py +56 -0
- perceptic_core_client/test/test_request_for_input_event.py +1 -1
- perceptic_core_client/test/test_tag_resource_api.py +0 -21
- perceptic_core_client/test/test_upload_resource_response_v2.py +53 -0
- perceptic_core_client/test/test_uri_resource_api.py +14 -0
- perceptic_core_client/test/test_user_input_event.py +55 -0
- perceptic_core_client/test/test_user_request_for_input_event.py +56 -0
- perceptic_core_client/test/test_user_resource_api.py +7 -0
- perceptic_core_client/test/test_worker_event.py +2 -2
- perceptic_core_client/test/test_worker_event_v2.py +59 -0
- perceptic_core_client/test/test_worker_resource_api.py +21 -0
- perceptic_core_client/test/test_worker_resource_v3_api.py +66 -0
- perceptic_core_client/test/test_worker_run_event_rating_secondary_id.py +53 -0
- perceptic_core_client/test/test_worker_stream_event_v2.py +52 -0
- perceptic_core_client/test/test_worker_v2_next_page_token.py +52 -0
- perceptic_core_client/test/test_workflow_status_response.py +52 -0
- {perceptic_core_client-0.39.0.dist-info → perceptic_core_client-0.50.3.dist-info}/METADATA +1 -1
- {perceptic_core_client-0.39.0.dist-info → perceptic_core_client-0.50.3.dist-info}/RECORD +77 -27
- {perceptic_core_client-0.39.0.dist-info → perceptic_core_client-0.50.3.dist-info}/WHEEL +0 -0
- {perceptic_core_client-0.39.0.dist-info → perceptic_core_client-0.50.3.dist-info}/top_level.txt +0 -0
|
@@ -21,6 +21,7 @@ import mimetypes
|
|
|
21
21
|
import os
|
|
22
22
|
import re
|
|
23
23
|
import tempfile
|
|
24
|
+
import uuid
|
|
24
25
|
|
|
25
26
|
from urllib.parse import quote
|
|
26
27
|
from typing import Tuple, Optional, List, Dict, Union
|
|
@@ -356,6 +357,8 @@ class ApiClient:
|
|
|
356
357
|
return obj.get_secret_value()
|
|
357
358
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
|
358
359
|
return obj
|
|
360
|
+
elif isinstance(obj, uuid.UUID):
|
|
361
|
+
return str(obj)
|
|
359
362
|
elif isinstance(obj, list):
|
|
360
363
|
return [
|
|
361
364
|
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
|
|
@@ -408,7 +411,7 @@ class ApiClient:
|
|
|
408
411
|
data = json.loads(response_text)
|
|
409
412
|
except ValueError:
|
|
410
413
|
data = response_text
|
|
411
|
-
elif re.match(r'^application/(json|[\w
|
|
414
|
+
elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
|
412
415
|
if response_text == "":
|
|
413
416
|
data = ""
|
|
414
417
|
else:
|
|
@@ -457,13 +460,13 @@ class ApiClient:
|
|
|
457
460
|
|
|
458
461
|
if klass in self.PRIMITIVE_TYPES:
|
|
459
462
|
return self.__deserialize_primitive(data, klass)
|
|
460
|
-
elif klass
|
|
463
|
+
elif klass is object:
|
|
461
464
|
return self.__deserialize_object(data)
|
|
462
|
-
elif klass
|
|
465
|
+
elif klass is datetime.date:
|
|
463
466
|
return self.__deserialize_date(data)
|
|
464
|
-
elif klass
|
|
467
|
+
elif klass is datetime.datetime:
|
|
465
468
|
return self.__deserialize_datetime(data)
|
|
466
|
-
elif klass
|
|
469
|
+
elif klass is decimal.Decimal:
|
|
467
470
|
return decimal.Decimal(data)
|
|
468
471
|
elif issubclass(klass, Enum):
|
|
469
472
|
return self.__deserialize_enum(data, klass)
|
|
@@ -162,6 +162,8 @@ class Configuration:
|
|
|
162
162
|
:param retries: Number of retries for API requests.
|
|
163
163
|
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
|
164
164
|
in PEM (str) or DER (bytes) format.
|
|
165
|
+
:param cert_file: the path to a client certificate file, for mTLS.
|
|
166
|
+
:param key_file: the path to a client key file, for mTLS.
|
|
165
167
|
|
|
166
168
|
:Example:
|
|
167
169
|
"""
|
|
@@ -184,6 +186,8 @@ class Configuration:
|
|
|
184
186
|
ssl_ca_cert: Optional[str]=None,
|
|
185
187
|
retries: Optional[int] = None,
|
|
186
188
|
ca_cert_data: Optional[Union[str, bytes]] = None,
|
|
189
|
+
cert_file: Optional[str]=None,
|
|
190
|
+
key_file: Optional[str]=None,
|
|
187
191
|
*,
|
|
188
192
|
debug: Optional[bool] = None,
|
|
189
193
|
) -> None:
|
|
@@ -265,10 +269,10 @@ class Configuration:
|
|
|
265
269
|
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
|
266
270
|
certificate data.
|
|
267
271
|
"""
|
|
268
|
-
self.cert_file =
|
|
272
|
+
self.cert_file = cert_file
|
|
269
273
|
"""client certificate file
|
|
270
274
|
"""
|
|
271
|
-
self.key_file =
|
|
275
|
+
self.key_file = key_file
|
|
272
276
|
"""client key file
|
|
273
277
|
"""
|
|
274
278
|
self.assert_hostname = None
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
# import models into model package
|
|
17
16
|
from perceptic_core_client.models.action_type import ActionType
|
|
18
17
|
from perceptic_core_client.models.add_tag_to_file_request import AddTagToFileRequest
|
|
@@ -31,6 +30,7 @@ from perceptic_core_client.models.create_connection_response import CreateConnec
|
|
|
31
30
|
from perceptic_core_client.models.create_file_system_response import CreateFileSystemResponse
|
|
32
31
|
from perceptic_core_client.models.create_folder_request import CreateFolderRequest
|
|
33
32
|
from perceptic_core_client.models.create_folder_response import CreateFolderResponse
|
|
33
|
+
from perceptic_core_client.models.create_folder_response_v2 import CreateFolderResponseV2
|
|
34
34
|
from perceptic_core_client.models.create_indexing_schedule_request import CreateIndexingScheduleRequest
|
|
35
35
|
from perceptic_core_client.models.create_indexing_schedule_response import CreateIndexingScheduleResponse
|
|
36
36
|
from perceptic_core_client.models.create_indexing_task_request import CreateIndexingTaskRequest
|
|
@@ -51,8 +51,11 @@ from perceptic_core_client.models.get_indexing_task_response import GetIndexingT
|
|
|
51
51
|
from perceptic_core_client.models.get_metadata_response import GetMetadataResponse
|
|
52
52
|
from perceptic_core_client.models.get_parent_response import GetParentResponse
|
|
53
53
|
from perceptic_core_client.models.get_parent_uri_response import GetParentUriResponse
|
|
54
|
+
from perceptic_core_client.models.get_run_event_rating_response import GetRunEventRatingResponse
|
|
54
55
|
from perceptic_core_client.models.get_signed_url_response import GetSignedUrlResponse
|
|
55
56
|
from perceptic_core_client.models.get_worker_events_response import GetWorkerEventsResponse
|
|
57
|
+
from perceptic_core_client.models.get_worker_events_v2_response import GetWorkerEventsV2Response
|
|
58
|
+
from perceptic_core_client.models.get_worker_events_v3_response import GetWorkerEventsV3Response
|
|
56
59
|
from perceptic_core_client.models.get_worker_metadata_response import GetWorkerMetadataResponse
|
|
57
60
|
from perceptic_core_client.models.get_worker_run_response import GetWorkerRunResponse
|
|
58
61
|
from perceptic_core_client.models.get_worker_status_response import GetWorkerStatusResponse
|
|
@@ -66,6 +69,10 @@ from perceptic_core_client.models.indexing_schedule_dto import IndexingScheduleD
|
|
|
66
69
|
from perceptic_core_client.models.indexing_task_dto import IndexingTaskDto
|
|
67
70
|
from perceptic_core_client.models.indexing_task_status import IndexingTaskStatus
|
|
68
71
|
from perceptic_core_client.models.info_event import InfoEvent
|
|
72
|
+
from perceptic_core_client.models.info_event1 import InfoEvent1
|
|
73
|
+
from perceptic_core_client.models.ingest_event_request import IngestEventRequest
|
|
74
|
+
from perceptic_core_client.models.ingest_event_response import IngestEventResponse
|
|
75
|
+
from perceptic_core_client.models.ingest_stream_event_request import IngestStreamEventRequest
|
|
69
76
|
from perceptic_core_client.models.interval_trigger import IntervalTrigger
|
|
70
77
|
from perceptic_core_client.models.json_node import JsonNode
|
|
71
78
|
from perceptic_core_client.models.json_node_type import JsonNodeType
|
|
@@ -76,14 +83,22 @@ from perceptic_core_client.models.list_indexing_actions_response import ListInde
|
|
|
76
83
|
from perceptic_core_client.models.list_indexing_schedules_response import ListIndexingSchedulesResponse
|
|
77
84
|
from perceptic_core_client.models.list_schedule_executions_response import ListScheduleExecutionsResponse
|
|
78
85
|
from perceptic_core_client.models.list_tags_response import ListTagsResponse
|
|
86
|
+
from perceptic_core_client.models.list_users_response import ListUsersResponse
|
|
79
87
|
from perceptic_core_client.models.managed_file_system_api_dto import ManagedFileSystemApiDto
|
|
80
88
|
from perceptic_core_client.models.me_response import MeResponse
|
|
81
89
|
from perceptic_core_client.models.model_schema import ModelSchema
|
|
82
90
|
from perceptic_core_client.models.on_upload_trigger import OnUploadTrigger
|
|
83
91
|
from perceptic_core_client.models.paged_list_file_system_response import PagedListFileSystemResponse
|
|
92
|
+
from perceptic_core_client.models.persistence_mode import PersistenceMode
|
|
93
|
+
from perceptic_core_client.models.post_rating_request import PostRatingRequest
|
|
94
|
+
from perceptic_core_client.models.post_run_event_rating_response import PostRunEventRatingResponse
|
|
84
95
|
from perceptic_core_client.models.post_worker_run_request import PostWorkerRunRequest
|
|
96
|
+
from perceptic_core_client.models.post_worker_run_request1 import PostWorkerRunRequest1
|
|
85
97
|
from perceptic_core_client.models.post_worker_run_response import PostWorkerRunResponse
|
|
98
|
+
from perceptic_core_client.models.post_worker_run_response1 import PostWorkerRunResponse1
|
|
86
99
|
from perceptic_core_client.models.progress_event import ProgressEvent
|
|
100
|
+
from perceptic_core_client.models.progress_event1 import ProgressEvent1
|
|
101
|
+
from perceptic_core_client.models.rating_dto_worker_run_event_rating_secondary_id import RatingDtoWorkerRunEventRatingSecondaryId
|
|
87
102
|
from perceptic_core_client.models.remote_file_system_api_dto import RemoteFileSystemApiDto
|
|
88
103
|
from perceptic_core_client.models.remove_tag_from_file_request import RemoveTagFromFileRequest
|
|
89
104
|
from perceptic_core_client.models.request_for_input_event import RequestForInputEvent
|
|
@@ -104,7 +119,16 @@ from perceptic_core_client.models.update_indexing_schedule_response import Updat
|
|
|
104
119
|
from perceptic_core_client.models.update_tag_request import UpdateTagRequest
|
|
105
120
|
from perceptic_core_client.models.update_tag_response import UpdateTagResponse
|
|
106
121
|
from perceptic_core_client.models.upload_file_to_managed_file_system_response import UploadFileToManagedFileSystemResponse
|
|
122
|
+
from perceptic_core_client.models.upload_resource_response_v2 import UploadResourceResponseV2
|
|
107
123
|
from perceptic_core_client.models.user_info_response import UserInfoResponse
|
|
124
|
+
from perceptic_core_client.models.user_input_event import UserInputEvent
|
|
125
|
+
from perceptic_core_client.models.user_request_for_input_event import UserRequestForInputEvent
|
|
108
126
|
from perceptic_core_client.models.web_page_citation_metadata_api_dto import WebPageCitationMetadataApiDto
|
|
109
127
|
from perceptic_core_client.models.worker_event import WorkerEvent
|
|
128
|
+
from perceptic_core_client.models.worker_event_v2 import WorkerEventV2
|
|
110
129
|
from perceptic_core_client.models.worker_metadata_dto import WorkerMetadataDto
|
|
130
|
+
from perceptic_core_client.models.worker_run_event_rating_secondary_id import WorkerRunEventRatingSecondaryId
|
|
131
|
+
from perceptic_core_client.models.worker_stream_event_v2 import WorkerStreamEventV2
|
|
132
|
+
from perceptic_core_client.models.worker_v2_next_page_token import WorkerV2NextPageToken
|
|
133
|
+
from perceptic_core_client.models.workflow_status_response import WorkflowStatusResponse
|
|
134
|
+
|
|
@@ -118,21 +118,6 @@ class CitationMetadataApiDto(BaseModel):
|
|
|
118
118
|
instance.actual_instance = WebPageCitationMetadataApiDto.from_json(json_str)
|
|
119
119
|
return instance
|
|
120
120
|
|
|
121
|
-
# check if data type is `AnnotatedImageCitationMetadataApiDto`
|
|
122
|
-
if _data_type == "AnnotatedImageCitationMetadataApiDto":
|
|
123
|
-
instance.actual_instance = AnnotatedImageCitationMetadataApiDto.from_json(json_str)
|
|
124
|
-
return instance
|
|
125
|
-
|
|
126
|
-
# check if data type is `HighlightedTextCitationMetadataApiDto`
|
|
127
|
-
if _data_type == "HighlightedTextCitationMetadataApiDto":
|
|
128
|
-
instance.actual_instance = HighlightedTextCitationMetadataApiDto.from_json(json_str)
|
|
129
|
-
return instance
|
|
130
|
-
|
|
131
|
-
# check if data type is `WebPageCitationMetadataApiDto`
|
|
132
|
-
if _data_type == "WebPageCitationMetadataApiDto":
|
|
133
|
-
instance.actual_instance = WebPageCitationMetadataApiDto.from_json(json_str)
|
|
134
|
-
return instance
|
|
135
|
-
|
|
136
121
|
# deserialize data into HighlightedTextCitationMetadataApiDto
|
|
137
122
|
try:
|
|
138
123
|
instance.actual_instance = HighlightedTextCitationMetadataApiDto.from_json(json_str)
|
|
@@ -105,16 +105,6 @@ class ConnectionSettingsApiDto(BaseModel):
|
|
|
105
105
|
instance.actual_instance = S3ConnectionSettingsApiDto.from_json(json_str)
|
|
106
106
|
return instance
|
|
107
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
108
|
# deserialize data into S3ConnectionSettingsApiDto
|
|
119
109
|
try:
|
|
120
110
|
instance.actual_instance = S3ConnectionSettingsApiDto.from_json(json_str)
|
|
@@ -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 CreateFolderResponseV2(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateFolderResponseV2
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
resource_id: Optional[StrictStr] = Field(default=None, alias="resourceId")
|
|
30
|
+
uri: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["resourceId", "uri"]
|
|
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 CreateFolderResponseV2 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 CreateFolderResponseV2 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
|
+
"resourceId": obj.get("resourceId"),
|
|
85
|
+
"uri": obj.get("uri")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -105,16 +105,6 @@ class FileSystemApiDto(BaseModel):
|
|
|
105
105
|
instance.actual_instance = RemoteFileSystemApiDto.from_json(json_str)
|
|
106
106
|
return instance
|
|
107
107
|
|
|
108
|
-
# check if data type is `ManagedFileSystemApiDto`
|
|
109
|
-
if _data_type == "ManagedFileSystemApiDto":
|
|
110
|
-
instance.actual_instance = ManagedFileSystemApiDto.from_json(json_str)
|
|
111
|
-
return instance
|
|
112
|
-
|
|
113
|
-
# check if data type is `RemoteFileSystemApiDto`
|
|
114
|
-
if _data_type == "RemoteFileSystemApiDto":
|
|
115
|
-
instance.actual_instance = RemoteFileSystemApiDto.from_json(json_str)
|
|
116
|
-
return instance
|
|
117
|
-
|
|
118
108
|
# deserialize data into RemoteFileSystemApiDto
|
|
119
109
|
try:
|
|
120
110
|
instance.actual_instance = RemoteFileSystemApiDto.from_json(json_str)
|
|
@@ -105,16 +105,6 @@ class FileSystemRootMetadataApiDto(BaseModel):
|
|
|
105
105
|
instance.actual_instance = S3FileSystemRootMetadataApiDto.from_json(json_str)
|
|
106
106
|
return instance
|
|
107
107
|
|
|
108
|
-
# check if data type is `AzureBlobFileSystemRootMetadataApiDto`
|
|
109
|
-
if _data_type == "AzureBlobFileSystemRootMetadataApiDto":
|
|
110
|
-
instance.actual_instance = AzureBlobFileSystemRootMetadataApiDto.from_json(json_str)
|
|
111
|
-
return instance
|
|
112
|
-
|
|
113
|
-
# check if data type is `S3FileSystemRootMetadataApiDto`
|
|
114
|
-
if _data_type == "S3FileSystemRootMetadataApiDto":
|
|
115
|
-
instance.actual_instance = S3FileSystemRootMetadataApiDto.from_json(json_str)
|
|
116
|
-
return instance
|
|
117
|
-
|
|
118
108
|
# deserialize data into AzureBlobFileSystemRootMetadataApiDto
|
|
119
109
|
try:
|
|
120
110
|
instance.actual_instance = AzureBlobFileSystemRootMetadataApiDto.from_json(json_str)
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from perceptic_core_client.models.rating_dto_worker_run_event_rating_secondary_id import RatingDtoWorkerRunEventRatingSecondaryId
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class GetRunEventRatingResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
GetRunEventRatingResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
rating: Optional[RatingDtoWorkerRunEventRatingSecondaryId] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["rating"]
|
|
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 GetRunEventRatingResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of rating
|
|
73
|
+
if self.rating:
|
|
74
|
+
_dict['rating'] = self.rating.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of GetRunEventRatingResponse from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"rating": RatingDtoWorkerRunEventRatingSecondaryId.from_dict(obj["rating"]) if obj.get("rating") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from perceptic_core_client.models.worker_event_v2 import WorkerEventV2
|
|
23
|
+
from perceptic_core_client.models.worker_v2_next_page_token import WorkerV2NextPageToken
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class GetWorkerEventsV2Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GetWorkerEventsV2Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
events: Optional[List[WorkerEventV2]] = None
|
|
32
|
+
next_page_token: Optional[WorkerV2NextPageToken] = Field(default=None, alias="nextPageToken")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["events", "nextPageToken"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of GetWorkerEventsV2Response from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in events (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.events:
|
|
77
|
+
for _item_events in self.events:
|
|
78
|
+
if _item_events:
|
|
79
|
+
_items.append(_item_events.to_dict())
|
|
80
|
+
_dict['events'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of next_page_token
|
|
82
|
+
if self.next_page_token:
|
|
83
|
+
_dict['nextPageToken'] = self.next_page_token.to_dict()
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of GetWorkerEventsV2Response from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"events": [WorkerEventV2.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None,
|
|
97
|
+
"nextPageToken": WorkerV2NextPageToken.from_dict(obj["nextPageToken"]) if obj.get("nextPageToken") is not None else None
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -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 GetWorkerEventsV3Response(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
GetWorkerEventsV3Response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
events: Optional[List[Dict[str, Any]]] = None
|
|
30
|
+
next_page_token: Optional[StrictStr] = Field(default=None, alias="nextPageToken")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["events", "nextPageToken"]
|
|
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 GetWorkerEventsV3Response 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 GetWorkerEventsV3Response 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
|
+
"events": obj.get("events"),
|
|
85
|
+
"nextPageToken": obj.get("nextPageToken")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|