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
|
@@ -0,0 +1,108 @@
|
|
|
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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UserRequestForInputEvent(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UserRequestForInputEvent
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
sequence: Optional[StrictInt] = None
|
|
31
|
+
requested_data: Optional[Dict[str, Any]] = Field(default=None, alias="requestedData")
|
|
32
|
+
provided_data: Optional[Dict[str, Any]] = Field(default=None, alias="providedData")
|
|
33
|
+
attribution: Optional[StrictStr] = None
|
|
34
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
35
|
+
type: Optional[StrictStr] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["sequence", "requestedData", "providedData", "attribution", "createdAt", "type"]
|
|
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 UserRequestForInputEvent 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
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# set to None if provided_data (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.provided_data is None and "provided_data" in self.model_fields_set:
|
|
80
|
+
_dict['providedData'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if attribution (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.attribution is None and "attribution" in self.model_fields_set:
|
|
85
|
+
_dict['attribution'] = None
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of UserRequestForInputEvent from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"sequence": obj.get("sequence"),
|
|
100
|
+
"requestedData": obj.get("requestedData"),
|
|
101
|
+
"providedData": obj.get("providedData"),
|
|
102
|
+
"attribution": obj.get("attribution"),
|
|
103
|
+
"createdAt": obj.get("createdAt"),
|
|
104
|
+
"type": obj.get("type")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -118,21 +118,6 @@ class WorkerEvent(BaseModel):
|
|
|
118
118
|
instance.actual_instance = ProgressEvent.from_json(json_str)
|
|
119
119
|
return instance
|
|
120
120
|
|
|
121
|
-
# check if data type is `InfoEvent`
|
|
122
|
-
if _data_type == "InfoEvent":
|
|
123
|
-
instance.actual_instance = InfoEvent.from_json(json_str)
|
|
124
|
-
return instance
|
|
125
|
-
|
|
126
|
-
# check if data type is `ProgressEvent`
|
|
127
|
-
if _data_type == "ProgressEvent":
|
|
128
|
-
instance.actual_instance = ProgressEvent.from_json(json_str)
|
|
129
|
-
return instance
|
|
130
|
-
|
|
131
|
-
# check if data type is `RequestForInputEvent`
|
|
132
|
-
if _data_type == "RequestForInputEvent":
|
|
133
|
-
instance.actual_instance = RequestForInputEvent.from_json(json_str)
|
|
134
|
-
return instance
|
|
135
|
-
|
|
136
121
|
# deserialize data into InfoEvent
|
|
137
122
|
try:
|
|
138
123
|
instance.actual_instance = InfoEvent.from_json(json_str)
|
|
@@ -0,0 +1,193 @@
|
|
|
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.info_event1 import InfoEvent1
|
|
21
|
+
from perceptic_core_client.models.progress_event1 import ProgressEvent1
|
|
22
|
+
from perceptic_core_client.models.user_input_event import UserInputEvent
|
|
23
|
+
from perceptic_core_client.models.user_request_for_input_event import UserRequestForInputEvent
|
|
24
|
+
from pydantic import StrictStr, Field
|
|
25
|
+
from typing import Union, List, Set, Optional, Dict
|
|
26
|
+
from typing_extensions import Literal, Self
|
|
27
|
+
|
|
28
|
+
WORKEREVENTV2_ONE_OF_SCHEMAS = ["InfoEvent1", "ProgressEvent1", "UserInputEvent", "UserRequestForInputEvent"]
|
|
29
|
+
|
|
30
|
+
class WorkerEventV2(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
WorkerEventV2
|
|
33
|
+
"""
|
|
34
|
+
# data type: InfoEvent1
|
|
35
|
+
oneof_schema_1_validator: Optional[InfoEvent1] = None
|
|
36
|
+
# data type: ProgressEvent1
|
|
37
|
+
oneof_schema_2_validator: Optional[ProgressEvent1] = None
|
|
38
|
+
# data type: UserRequestForInputEvent
|
|
39
|
+
oneof_schema_3_validator: Optional[UserRequestForInputEvent] = None
|
|
40
|
+
# data type: UserInputEvent
|
|
41
|
+
oneof_schema_4_validator: Optional[UserInputEvent] = None
|
|
42
|
+
actual_instance: Optional[Union[InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent]] = None
|
|
43
|
+
one_of_schemas: Set[str] = { "InfoEvent1", "ProgressEvent1", "UserInputEvent", "UserRequestForInputEvent" }
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
55
|
+
if args:
|
|
56
|
+
if len(args) > 1:
|
|
57
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
58
|
+
if kwargs:
|
|
59
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
60
|
+
super().__init__(actual_instance=args[0])
|
|
61
|
+
else:
|
|
62
|
+
super().__init__(**kwargs)
|
|
63
|
+
|
|
64
|
+
@field_validator('actual_instance')
|
|
65
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
66
|
+
instance = WorkerEventV2.model_construct()
|
|
67
|
+
error_messages = []
|
|
68
|
+
match = 0
|
|
69
|
+
# validate data type: InfoEvent1
|
|
70
|
+
if not isinstance(v, InfoEvent1):
|
|
71
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `InfoEvent1`")
|
|
72
|
+
else:
|
|
73
|
+
match += 1
|
|
74
|
+
# validate data type: ProgressEvent1
|
|
75
|
+
if not isinstance(v, ProgressEvent1):
|
|
76
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ProgressEvent1`")
|
|
77
|
+
else:
|
|
78
|
+
match += 1
|
|
79
|
+
# validate data type: UserRequestForInputEvent
|
|
80
|
+
if not isinstance(v, UserRequestForInputEvent):
|
|
81
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UserRequestForInputEvent`")
|
|
82
|
+
else:
|
|
83
|
+
match += 1
|
|
84
|
+
# validate data type: UserInputEvent
|
|
85
|
+
if not isinstance(v, UserInputEvent):
|
|
86
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UserInputEvent`")
|
|
87
|
+
else:
|
|
88
|
+
match += 1
|
|
89
|
+
if match > 1:
|
|
90
|
+
# more than 1 match
|
|
91
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in WorkerEventV2 with oneOf schemas: InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent. Details: " + ", ".join(error_messages))
|
|
92
|
+
elif match == 0:
|
|
93
|
+
# no match
|
|
94
|
+
raise ValueError("No match found when setting `actual_instance` in WorkerEventV2 with oneOf schemas: InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent. Details: " + ", ".join(error_messages))
|
|
95
|
+
else:
|
|
96
|
+
return v
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
100
|
+
return cls.from_json(json.dumps(obj))
|
|
101
|
+
|
|
102
|
+
@classmethod
|
|
103
|
+
def from_json(cls, json_str: str) -> Self:
|
|
104
|
+
"""Returns the object represented by the json string"""
|
|
105
|
+
instance = cls.model_construct()
|
|
106
|
+
error_messages = []
|
|
107
|
+
match = 0
|
|
108
|
+
|
|
109
|
+
# use oneOf discriminator to lookup the data type
|
|
110
|
+
_data_type = json.loads(json_str).get("type")
|
|
111
|
+
if not _data_type:
|
|
112
|
+
raise ValueError("Failed to lookup data type from the field `type` in the input.")
|
|
113
|
+
|
|
114
|
+
# check if data type is `InfoEvent1`
|
|
115
|
+
if _data_type == "info":
|
|
116
|
+
instance.actual_instance = InfoEvent1.from_json(json_str)
|
|
117
|
+
return instance
|
|
118
|
+
|
|
119
|
+
# check if data type is `ProgressEvent1`
|
|
120
|
+
if _data_type == "progress":
|
|
121
|
+
instance.actual_instance = ProgressEvent1.from_json(json_str)
|
|
122
|
+
return instance
|
|
123
|
+
|
|
124
|
+
# check if data type is `UserInputEvent`
|
|
125
|
+
if _data_type == "user_input":
|
|
126
|
+
instance.actual_instance = UserInputEvent.from_json(json_str)
|
|
127
|
+
return instance
|
|
128
|
+
|
|
129
|
+
# check if data type is `UserRequestForInputEvent`
|
|
130
|
+
if _data_type == "user_input_request":
|
|
131
|
+
instance.actual_instance = UserRequestForInputEvent.from_json(json_str)
|
|
132
|
+
return instance
|
|
133
|
+
|
|
134
|
+
# deserialize data into InfoEvent1
|
|
135
|
+
try:
|
|
136
|
+
instance.actual_instance = InfoEvent1.from_json(json_str)
|
|
137
|
+
match += 1
|
|
138
|
+
except (ValidationError, ValueError) as e:
|
|
139
|
+
error_messages.append(str(e))
|
|
140
|
+
# deserialize data into ProgressEvent1
|
|
141
|
+
try:
|
|
142
|
+
instance.actual_instance = ProgressEvent1.from_json(json_str)
|
|
143
|
+
match += 1
|
|
144
|
+
except (ValidationError, ValueError) as e:
|
|
145
|
+
error_messages.append(str(e))
|
|
146
|
+
# deserialize data into UserRequestForInputEvent
|
|
147
|
+
try:
|
|
148
|
+
instance.actual_instance = UserRequestForInputEvent.from_json(json_str)
|
|
149
|
+
match += 1
|
|
150
|
+
except (ValidationError, ValueError) as e:
|
|
151
|
+
error_messages.append(str(e))
|
|
152
|
+
# deserialize data into UserInputEvent
|
|
153
|
+
try:
|
|
154
|
+
instance.actual_instance = UserInputEvent.from_json(json_str)
|
|
155
|
+
match += 1
|
|
156
|
+
except (ValidationError, ValueError) as e:
|
|
157
|
+
error_messages.append(str(e))
|
|
158
|
+
|
|
159
|
+
if match > 1:
|
|
160
|
+
# more than 1 match
|
|
161
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into WorkerEventV2 with oneOf schemas: InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent. Details: " + ", ".join(error_messages))
|
|
162
|
+
elif match == 0:
|
|
163
|
+
# no match
|
|
164
|
+
raise ValueError("No match found when deserializing the JSON string into WorkerEventV2 with oneOf schemas: InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent. Details: " + ", ".join(error_messages))
|
|
165
|
+
else:
|
|
166
|
+
return instance
|
|
167
|
+
|
|
168
|
+
def to_json(self) -> str:
|
|
169
|
+
"""Returns the JSON representation of the actual instance"""
|
|
170
|
+
if self.actual_instance is None:
|
|
171
|
+
return "null"
|
|
172
|
+
|
|
173
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
174
|
+
return self.actual_instance.to_json()
|
|
175
|
+
else:
|
|
176
|
+
return json.dumps(self.actual_instance)
|
|
177
|
+
|
|
178
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], InfoEvent1, ProgressEvent1, UserInputEvent, UserRequestForInputEvent]]:
|
|
179
|
+
"""Returns the dict representation of the actual instance"""
|
|
180
|
+
if self.actual_instance is None:
|
|
181
|
+
return None
|
|
182
|
+
|
|
183
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
184
|
+
return self.actual_instance.to_dict()
|
|
185
|
+
else:
|
|
186
|
+
# primitive type
|
|
187
|
+
return self.actual_instance
|
|
188
|
+
|
|
189
|
+
def to_str(self) -> str:
|
|
190
|
+
"""Returns the string representation of the actual instance"""
|
|
191
|
+
return pprint.pformat(self.model_dump())
|
|
192
|
+
|
|
193
|
+
|
|
@@ -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, StrictInt, 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 WorkerRunEventRatingSecondaryId(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WorkerRunEventRatingSecondaryId
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
run_rid: StrictStr = Field(alias="runRid")
|
|
30
|
+
sequence: Optional[StrictInt] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["runRid", "sequence"]
|
|
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 WorkerRunEventRatingSecondaryId 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 WorkerRunEventRatingSecondaryId 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
|
+
"runRid": obj.get("runRid"),
|
|
85
|
+
"sequence": obj.get("sequence")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class WorkerStreamEventV2(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WorkerStreamEventV2
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
sequence: Optional[StrictInt] = None
|
|
31
|
+
stored_at: Optional[datetime] = Field(default=None, alias="storedAt")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["sequence", "storedAt"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of WorkerStreamEventV2 from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of WorkerStreamEventV2 from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"sequence": obj.get("sequence"),
|
|
86
|
+
"storedAt": obj.get("storedAt")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -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, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class WorkerV2NextPageToken(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WorkerV2NextPageToken
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
offset_for_worker_run_events: Optional[StrictInt] = Field(default=None, alias="offsetForWorkerRunEvents")
|
|
30
|
+
offset_for_input_request_events: Optional[StrictInt] = Field(default=None, alias="offsetForInputRequestEvents")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["offsetForWorkerRunEvents", "offsetForInputRequestEvents"]
|
|
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 WorkerV2NextPageToken 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 WorkerV2NextPageToken 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
|
+
"offsetForWorkerRunEvents": obj.get("offsetForWorkerRunEvents"),
|
|
85
|
+
"offsetForInputRequestEvents": obj.get("offsetForInputRequestEvents")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -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 WorkflowStatusResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WorkflowStatusResponse
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
run_rid: Optional[StrictStr] = Field(default=None, alias="runRid")
|
|
30
|
+
status: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["runRid", "status"]
|
|
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 WorkflowStatusResponse 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 WorkflowStatusResponse 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
|
+
"runRid": obj.get("runRid"),
|
|
85
|
+
"status": obj.get("status")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|