asteroid-odyssey 1.0.3__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- asteroid_odyssey/__init__.py +10 -2
- asteroid_odyssey/agents_v1_gen/__init__.py +87 -0
- asteroid_odyssey/agents_v1_gen/api/__init__.py +7 -0
- asteroid_odyssey/agents_v1_gen/api/agent_profile_api.py +1696 -0
- asteroid_odyssey/{openapi_client → agents_v1_gen}/api/api_api.py +4 -4
- asteroid_odyssey/{openapi_client/api/sdk_api.py → agents_v1_gen/api/execution_api.py} +314 -14
- asteroid_odyssey/{openapi_client → agents_v1_gen}/api_client.py +6 -6
- asteroid_odyssey/{openapi_client → agents_v1_gen}/configuration.py +2 -2
- asteroid_odyssey/agents_v1_gen/models/__init__.py +34 -0
- asteroid_odyssey/agents_v1_gen/models/agent_profile.py +118 -0
- asteroid_odyssey/agents_v1_gen/models/country_code.py +44 -0
- asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +112 -0
- asteroid_odyssey/agents_v1_gen/models/credential.py +95 -0
- asteroid_odyssey/agents_v1_gen/models/delete_agent_profile200_response.py +87 -0
- asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result_response.py +2 -2
- asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_status_response.py +1 -1
- asteroid_odyssey/agents_v1_gen/models/proxy_type.py +37 -0
- asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +112 -0
- asteroid_odyssey/{openapi_client → agents_v1_gen}/rest.py +1 -1
- asteroid_odyssey/agents_v2_gen/__init__.py +99 -0
- asteroid_odyssey/agents_v2_gen/api/__init__.py +5 -0
- asteroid_odyssey/agents_v2_gen/api/execution_api.py +625 -0
- asteroid_odyssey/agents_v2_gen/api_client.py +801 -0
- asteroid_odyssey/agents_v2_gen/api_response.py +21 -0
- asteroid_odyssey/agents_v2_gen/configuration.py +612 -0
- asteroid_odyssey/agents_v2_gen/exceptions.py +216 -0
- asteroid_odyssey/agents_v2_gen/models/__init__.py +42 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_completed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_failed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_started.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_generic.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_started.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_terminal.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/error.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_completed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_failed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_started_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_generic_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_payload_union.py +252 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_status_changed_payload.py +88 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_step_completed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_step_started_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_transitioned_node_payload.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_user_message_received_payload.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_status.py +43 -0
- asteroid_odyssey/agents_v2_gen/models/execution_terminal_payload.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/execution_user_messages_add_text_body.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/versions.py +37 -0
- asteroid_odyssey/agents_v2_gen/py.typed +0 -0
- asteroid_odyssey/agents_v2_gen/rest.py +258 -0
- asteroid_odyssey/client.py +640 -131
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/METADATA +2 -1
- asteroid_odyssey-1.2.0.dist-info/RECORD +72 -0
- asteroid_odyssey/openapi_client/__init__.py +0 -73
- asteroid_odyssey/openapi_client/api/__init__.py +0 -7
- asteroid_odyssey/openapi_client/api/execution_api.py +0 -335
- asteroid_odyssey/openapi_client/models/__init__.py +0 -27
- asteroid_odyssey-1.0.3.dist-info/RECORD +0 -29
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/api_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/exceptions.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/browser_session_recording_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/error_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check200_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check500_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/status.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/structured_agent_execution_request.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/upload_execution_files200_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/py.typed +0 -0
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Agent Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v2
|
|
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 asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_completed import ActivityPayloadUnionActionCompleted
|
|
21
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_failed import ActivityPayloadUnionActionFailed
|
|
22
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_started import ActivityPayloadUnionActionStarted
|
|
23
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_generic import ActivityPayloadUnionGeneric
|
|
24
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_status_changed import ActivityPayloadUnionStatusChanged
|
|
25
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_completed import ActivityPayloadUnionStepCompleted
|
|
26
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_started import ActivityPayloadUnionStepStarted
|
|
27
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_terminal import ActivityPayloadUnionTerminal
|
|
28
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_transitioned_node import ActivityPayloadUnionTransitionedNode
|
|
29
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_user_message_received import ActivityPayloadUnionUserMessageReceived
|
|
30
|
+
from pydantic import StrictStr, Field
|
|
31
|
+
from typing import Union, List, Set, Optional, Dict
|
|
32
|
+
from typing_extensions import Literal, Self
|
|
33
|
+
|
|
34
|
+
EXECUTIONACTIVITYPAYLOADUNION_ONE_OF_SCHEMAS = ["ActivityPayloadUnionActionCompleted", "ActivityPayloadUnionActionFailed", "ActivityPayloadUnionActionStarted", "ActivityPayloadUnionGeneric", "ActivityPayloadUnionStatusChanged", "ActivityPayloadUnionStepCompleted", "ActivityPayloadUnionStepStarted", "ActivityPayloadUnionTerminal", "ActivityPayloadUnionTransitionedNode", "ActivityPayloadUnionUserMessageReceived"]
|
|
35
|
+
|
|
36
|
+
class ExecutionActivityPayloadUnion(BaseModel):
|
|
37
|
+
"""
|
|
38
|
+
ExecutionActivityPayloadUnion
|
|
39
|
+
"""
|
|
40
|
+
# data type: ActivityPayloadUnionTerminal
|
|
41
|
+
oneof_schema_1_validator: Optional[ActivityPayloadUnionTerminal] = None
|
|
42
|
+
# data type: ActivityPayloadUnionGeneric
|
|
43
|
+
oneof_schema_2_validator: Optional[ActivityPayloadUnionGeneric] = None
|
|
44
|
+
# data type: ActivityPayloadUnionStepStarted
|
|
45
|
+
oneof_schema_3_validator: Optional[ActivityPayloadUnionStepStarted] = None
|
|
46
|
+
# data type: ActivityPayloadUnionStepCompleted
|
|
47
|
+
oneof_schema_4_validator: Optional[ActivityPayloadUnionStepCompleted] = None
|
|
48
|
+
# data type: ActivityPayloadUnionTransitionedNode
|
|
49
|
+
oneof_schema_5_validator: Optional[ActivityPayloadUnionTransitionedNode] = None
|
|
50
|
+
# data type: ActivityPayloadUnionStatusChanged
|
|
51
|
+
oneof_schema_6_validator: Optional[ActivityPayloadUnionStatusChanged] = None
|
|
52
|
+
# data type: ActivityPayloadUnionActionStarted
|
|
53
|
+
oneof_schema_7_validator: Optional[ActivityPayloadUnionActionStarted] = None
|
|
54
|
+
# data type: ActivityPayloadUnionActionCompleted
|
|
55
|
+
oneof_schema_8_validator: Optional[ActivityPayloadUnionActionCompleted] = None
|
|
56
|
+
# data type: ActivityPayloadUnionActionFailed
|
|
57
|
+
oneof_schema_9_validator: Optional[ActivityPayloadUnionActionFailed] = None
|
|
58
|
+
# data type: ActivityPayloadUnionUserMessageReceived
|
|
59
|
+
oneof_schema_10_validator: Optional[ActivityPayloadUnionUserMessageReceived] = None
|
|
60
|
+
actual_instance: Optional[Union[ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived]] = None
|
|
61
|
+
one_of_schemas: Set[str] = { "ActivityPayloadUnionActionCompleted", "ActivityPayloadUnionActionFailed", "ActivityPayloadUnionActionStarted", "ActivityPayloadUnionGeneric", "ActivityPayloadUnionStatusChanged", "ActivityPayloadUnionStepCompleted", "ActivityPayloadUnionStepStarted", "ActivityPayloadUnionTerminal", "ActivityPayloadUnionTransitionedNode", "ActivityPayloadUnionUserMessageReceived" }
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
validate_assignment=True,
|
|
65
|
+
protected_namespaces=(),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
73
|
+
if args:
|
|
74
|
+
if len(args) > 1:
|
|
75
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
76
|
+
if kwargs:
|
|
77
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
78
|
+
super().__init__(actual_instance=args[0])
|
|
79
|
+
else:
|
|
80
|
+
super().__init__(**kwargs)
|
|
81
|
+
|
|
82
|
+
@field_validator('actual_instance')
|
|
83
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
84
|
+
instance = ExecutionActivityPayloadUnion.model_construct()
|
|
85
|
+
error_messages = []
|
|
86
|
+
match = 0
|
|
87
|
+
# validate data type: ActivityPayloadUnionTerminal
|
|
88
|
+
if not isinstance(v, ActivityPayloadUnionTerminal):
|
|
89
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionTerminal`")
|
|
90
|
+
else:
|
|
91
|
+
match += 1
|
|
92
|
+
# validate data type: ActivityPayloadUnionGeneric
|
|
93
|
+
if not isinstance(v, ActivityPayloadUnionGeneric):
|
|
94
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionGeneric`")
|
|
95
|
+
else:
|
|
96
|
+
match += 1
|
|
97
|
+
# validate data type: ActivityPayloadUnionStepStarted
|
|
98
|
+
if not isinstance(v, ActivityPayloadUnionStepStarted):
|
|
99
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionStepStarted`")
|
|
100
|
+
else:
|
|
101
|
+
match += 1
|
|
102
|
+
# validate data type: ActivityPayloadUnionStepCompleted
|
|
103
|
+
if not isinstance(v, ActivityPayloadUnionStepCompleted):
|
|
104
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionStepCompleted`")
|
|
105
|
+
else:
|
|
106
|
+
match += 1
|
|
107
|
+
# validate data type: ActivityPayloadUnionTransitionedNode
|
|
108
|
+
if not isinstance(v, ActivityPayloadUnionTransitionedNode):
|
|
109
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionTransitionedNode`")
|
|
110
|
+
else:
|
|
111
|
+
match += 1
|
|
112
|
+
# validate data type: ActivityPayloadUnionStatusChanged
|
|
113
|
+
if not isinstance(v, ActivityPayloadUnionStatusChanged):
|
|
114
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionStatusChanged`")
|
|
115
|
+
else:
|
|
116
|
+
match += 1
|
|
117
|
+
# validate data type: ActivityPayloadUnionActionStarted
|
|
118
|
+
if not isinstance(v, ActivityPayloadUnionActionStarted):
|
|
119
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionActionStarted`")
|
|
120
|
+
else:
|
|
121
|
+
match += 1
|
|
122
|
+
# validate data type: ActivityPayloadUnionActionCompleted
|
|
123
|
+
if not isinstance(v, ActivityPayloadUnionActionCompleted):
|
|
124
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionActionCompleted`")
|
|
125
|
+
else:
|
|
126
|
+
match += 1
|
|
127
|
+
# validate data type: ActivityPayloadUnionActionFailed
|
|
128
|
+
if not isinstance(v, ActivityPayloadUnionActionFailed):
|
|
129
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionActionFailed`")
|
|
130
|
+
else:
|
|
131
|
+
match += 1
|
|
132
|
+
# validate data type: ActivityPayloadUnionUserMessageReceived
|
|
133
|
+
if not isinstance(v, ActivityPayloadUnionUserMessageReceived):
|
|
134
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionUserMessageReceived`")
|
|
135
|
+
else:
|
|
136
|
+
match += 1
|
|
137
|
+
if match > 1:
|
|
138
|
+
# more than 1 match
|
|
139
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
140
|
+
elif match == 0:
|
|
141
|
+
# no match
|
|
142
|
+
raise ValueError("No match found when setting `actual_instance` in ExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
143
|
+
else:
|
|
144
|
+
return v
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
148
|
+
return cls.from_json(json.dumps(obj))
|
|
149
|
+
|
|
150
|
+
@classmethod
|
|
151
|
+
def from_json(cls, json_str: str) -> Self:
|
|
152
|
+
"""Returns the object represented by the json string"""
|
|
153
|
+
instance = cls.model_construct()
|
|
154
|
+
error_messages = []
|
|
155
|
+
match = 0
|
|
156
|
+
|
|
157
|
+
# deserialize data into ActivityPayloadUnionTerminal
|
|
158
|
+
try:
|
|
159
|
+
instance.actual_instance = ActivityPayloadUnionTerminal.from_json(json_str)
|
|
160
|
+
match += 1
|
|
161
|
+
except (ValidationError, ValueError) as e:
|
|
162
|
+
error_messages.append(str(e))
|
|
163
|
+
# deserialize data into ActivityPayloadUnionGeneric
|
|
164
|
+
try:
|
|
165
|
+
instance.actual_instance = ActivityPayloadUnionGeneric.from_json(json_str)
|
|
166
|
+
match += 1
|
|
167
|
+
except (ValidationError, ValueError) as e:
|
|
168
|
+
error_messages.append(str(e))
|
|
169
|
+
# deserialize data into ActivityPayloadUnionStepStarted
|
|
170
|
+
try:
|
|
171
|
+
instance.actual_instance = ActivityPayloadUnionStepStarted.from_json(json_str)
|
|
172
|
+
match += 1
|
|
173
|
+
except (ValidationError, ValueError) as e:
|
|
174
|
+
error_messages.append(str(e))
|
|
175
|
+
# deserialize data into ActivityPayloadUnionStepCompleted
|
|
176
|
+
try:
|
|
177
|
+
instance.actual_instance = ActivityPayloadUnionStepCompleted.from_json(json_str)
|
|
178
|
+
match += 1
|
|
179
|
+
except (ValidationError, ValueError) as e:
|
|
180
|
+
error_messages.append(str(e))
|
|
181
|
+
# deserialize data into ActivityPayloadUnionTransitionedNode
|
|
182
|
+
try:
|
|
183
|
+
instance.actual_instance = ActivityPayloadUnionTransitionedNode.from_json(json_str)
|
|
184
|
+
match += 1
|
|
185
|
+
except (ValidationError, ValueError) as e:
|
|
186
|
+
error_messages.append(str(e))
|
|
187
|
+
# deserialize data into ActivityPayloadUnionStatusChanged
|
|
188
|
+
try:
|
|
189
|
+
instance.actual_instance = ActivityPayloadUnionStatusChanged.from_json(json_str)
|
|
190
|
+
match += 1
|
|
191
|
+
except (ValidationError, ValueError) as e:
|
|
192
|
+
error_messages.append(str(e))
|
|
193
|
+
# deserialize data into ActivityPayloadUnionActionStarted
|
|
194
|
+
try:
|
|
195
|
+
instance.actual_instance = ActivityPayloadUnionActionStarted.from_json(json_str)
|
|
196
|
+
match += 1
|
|
197
|
+
except (ValidationError, ValueError) as e:
|
|
198
|
+
error_messages.append(str(e))
|
|
199
|
+
# deserialize data into ActivityPayloadUnionActionCompleted
|
|
200
|
+
try:
|
|
201
|
+
instance.actual_instance = ActivityPayloadUnionActionCompleted.from_json(json_str)
|
|
202
|
+
match += 1
|
|
203
|
+
except (ValidationError, ValueError) as e:
|
|
204
|
+
error_messages.append(str(e))
|
|
205
|
+
# deserialize data into ActivityPayloadUnionActionFailed
|
|
206
|
+
try:
|
|
207
|
+
instance.actual_instance = ActivityPayloadUnionActionFailed.from_json(json_str)
|
|
208
|
+
match += 1
|
|
209
|
+
except (ValidationError, ValueError) as e:
|
|
210
|
+
error_messages.append(str(e))
|
|
211
|
+
# deserialize data into ActivityPayloadUnionUserMessageReceived
|
|
212
|
+
try:
|
|
213
|
+
instance.actual_instance = ActivityPayloadUnionUserMessageReceived.from_json(json_str)
|
|
214
|
+
match += 1
|
|
215
|
+
except (ValidationError, ValueError) as e:
|
|
216
|
+
error_messages.append(str(e))
|
|
217
|
+
|
|
218
|
+
if match > 1:
|
|
219
|
+
# more than 1 match
|
|
220
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
221
|
+
elif match == 0:
|
|
222
|
+
# no match
|
|
223
|
+
raise ValueError("No match found when deserializing the JSON string into ExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
224
|
+
else:
|
|
225
|
+
return instance
|
|
226
|
+
|
|
227
|
+
def to_json(self) -> str:
|
|
228
|
+
"""Returns the JSON representation of the actual instance"""
|
|
229
|
+
if self.actual_instance is None:
|
|
230
|
+
return "null"
|
|
231
|
+
|
|
232
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
233
|
+
return self.actual_instance.to_json()
|
|
234
|
+
else:
|
|
235
|
+
return json.dumps(self.actual_instance)
|
|
236
|
+
|
|
237
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived]]:
|
|
238
|
+
"""Returns the dict representation of the actual instance"""
|
|
239
|
+
if self.actual_instance is None:
|
|
240
|
+
return None
|
|
241
|
+
|
|
242
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
243
|
+
return self.actual_instance.to_dict()
|
|
244
|
+
else:
|
|
245
|
+
# primitive type
|
|
246
|
+
return self.actual_instance
|
|
247
|
+
|
|
248
|
+
def to_str(self) -> str:
|
|
249
|
+
"""Returns the string representation of the actual instance"""
|
|
250
|
+
return pprint.pformat(self.model_dump())
|
|
251
|
+
|
|
252
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Agent Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v2
|
|
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
|
|
22
|
+
from asteroid_odyssey.agents_v2_gen.models.execution_status import ExecutionStatus
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ExecutionActivityStatusChangedPayload(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ExecutionActivityStatusChangedPayload
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
status: ExecutionStatus
|
|
31
|
+
__properties: ClassVar[List[str]] = ["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 ExecutionActivityStatusChangedPayload 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 ExecutionActivityStatusChangedPayload 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
|
+
"status": obj.get("status")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
87
|
+
|
|
88
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Agent Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v2
|
|
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
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ExecutionActivityStepCompletedPayload(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ExecutionActivityStepCompletedPayload
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
step_number: StrictInt = Field(alias="stepNumber")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["stepNumber"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of ExecutionActivityStepCompletedPayload from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of ExecutionActivityStepCompletedPayload from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"stepNumber": obj.get("stepNumber")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Agent Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v2
|
|
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
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ExecutionActivityStepStartedPayload(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ExecutionActivityStepStartedPayload
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
step_number: StrictInt = Field(alias="stepNumber")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["stepNumber"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of ExecutionActivityStepStartedPayload from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of ExecutionActivityStepStartedPayload from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"stepNumber": obj.get("stepNumber")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Agent Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v2
|
|
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
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ExecutionActivityTransitionedNodePayload(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ExecutionActivityTransitionedNodePayload
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
new_node_name: StrictStr = Field(alias="newNodeName")
|
|
30
|
+
new_node_uuid: StrictStr = Field(alias="newNodeUUID")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["newNodeName", "newNodeUUID"]
|
|
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 ExecutionActivityTransitionedNodePayload 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 ExecutionActivityTransitionedNodePayload 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
|
+
"newNodeName": obj.get("newNodeName"),
|
|
85
|
+
"newNodeUUID": obj.get("newNodeUUID")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|