beamlit 0.0.20rc2__py3-none-any.whl → 0.0.20rc4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/api/agents/delete_agent_history.py +155 -0
- beamlit/api/agents/get_agent_deployment.py +1 -22
- beamlit/api/agents/get_agent_environment_logs.py +151 -0
- beamlit/api/agents/get_agent_history.py +155 -0
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/put_agent_history.py +181 -0
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/models/get_model_environment_logs.py +155 -0
- beamlit/common/generate.py +8 -3
- beamlit/common/settings.py +1 -6
- beamlit/models/__init__.py +28 -30
- beamlit/models/acl.py +2 -0
- beamlit/models/agent.py +2 -0
- beamlit/models/agent_chain.py +2 -0
- beamlit/models/agent_configuration.py +2 -0
- beamlit/models/agent_deployment.py +44 -99
- beamlit/models/agent_deployment_configuration.py +45 -0
- beamlit/models/agent_deployment_history.py +15 -46
- beamlit/models/agent_deployment_history_event.py +24 -78
- beamlit/models/agent_deployment_pod_template.py +45 -0
- beamlit/models/agent_history.py +165 -0
- beamlit/models/agent_history_event.py +131 -0
- beamlit/models/agent_metadata.py +144 -0
- beamlit/models/agent_release.py +2 -0
- beamlit/models/agent_spec.py +238 -0
- beamlit/models/agent_with_deployments.py +2 -0
- beamlit/models/api_key.py +2 -0
- beamlit/models/authentication_provider_model.py +2 -0
- beamlit/models/authentication_provider_organization.py +2 -0
- beamlit/models/configuration.py +2 -0
- beamlit/models/continent.py +2 -0
- beamlit/models/core_spec.py +179 -0
- beamlit/models/country.py +2 -0
- beamlit/models/create_api_key_for_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_response_200.py +2 -0
- beamlit/models/delete_workspace_service_account_response_200.py +2 -0
- beamlit/models/deployment_configuration.py +2 -0
- beamlit/models/deployment_configurations.py +2 -0
- beamlit/models/deployment_serverless_config.py +131 -0
- beamlit/models/environment.py +2 -0
- beamlit/models/environment_metrics.py +2 -0
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +2 -0
- beamlit/models/function.py +2 -0
- beamlit/models/function_configuration.py +2 -0
- beamlit/models/function_deployment.py +44 -99
- beamlit/models/function_deployment_configuration.py +45 -0
- beamlit/models/function_deployment_pod_template.py +45 -0
- beamlit/models/function_kit.py +2 -0
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +2 -0
- beamlit/models/function_release.py +2 -0
- beamlit/models/function_spec.py +240 -0
- beamlit/models/function_with_deployments.py +2 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +2 -0
- beamlit/models/increase_and_rate_metric.py +2 -0
- beamlit/models/integration.py +2 -0
- beamlit/models/integration_config.py +2 -0
- beamlit/models/integration_connection.py +2 -0
- beamlit/models/integration_connection_config.py +2 -0
- beamlit/models/integration_connection_secret.py +2 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +2 -0
- beamlit/models/integration_secret.py +2 -0
- beamlit/models/invite_workspace_user_body.py +2 -0
- beamlit/models/labels_type_0.py +2 -0
- beamlit/models/location.py +2 -0
- beamlit/models/location_response.py +2 -0
- beamlit/models/metadata.py +135 -0
- beamlit/models/metadata_labels.py +43 -0
- beamlit/models/metric.py +2 -0
- beamlit/models/metrics.py +2 -0
- beamlit/models/model.py +2 -0
- beamlit/models/model_deployment.py +66 -85
- beamlit/models/model_deployment_log.py +2 -0
- beamlit/models/model_deployment_metrics.py +2 -0
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +2 -0
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +2 -0
- beamlit/models/model_deployment_pod_template.py +45 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +2 -0
- beamlit/models/model_provider.py +2 -0
- beamlit/models/model_provider_ref.py +2 -0
- beamlit/models/model_release.py +2 -0
- beamlit/models/model_spec.py +188 -0
- beamlit/models/model_with_deployments.py +2 -0
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +2 -0
- beamlit/models/pending_invitation_accept.py +2 -0
- beamlit/models/pending_invitation_render.py +2 -0
- beamlit/models/pending_invitation_render_invited_by.py +2 -0
- beamlit/models/pending_invitation_render_workspace.py +2 -0
- beamlit/models/pending_invitation_workspace_details.py +2 -0
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +36 -8
- beamlit/models/policy_location.py +2 -0
- beamlit/models/policy_spec.py +119 -0
- beamlit/models/provider_config.py +2 -0
- beamlit/models/qps.py +2 -0
- beamlit/models/resource_deployment_log.py +2 -0
- beamlit/models/resource_deployment_metrics.py +70 -155
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +75 -0
- beamlit/models/resource_environment_metrics.py +172 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +75 -0
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_log.py +68 -0
- beamlit/models/resource_metrics.py +2 -0
- beamlit/models/runtime.py +14 -29
- beamlit/models/runtime_readiness_probe.py +45 -0
- beamlit/models/runtime_resources.py +2 -0
- beamlit/models/runtime_type_0.py +111 -0
- beamlit/models/runtime_type_0_readiness_probe.py +43 -0
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_type_0_resources.py +59 -0
- beamlit/models/serverless_config.py +2 -0
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +2 -0
- beamlit/models/store_agent.py +15 -29
- beamlit/models/store_agent_configuration.py +2 -0
- beamlit/models/store_agent_labels.py +45 -0
- beamlit/models/store_configuration.py +6 -15
- beamlit/models/store_configuration_option.py +7 -18
- beamlit/models/store_function.py +15 -29
- beamlit/models/store_function_configuration.py +2 -0
- beamlit/models/store_function_kit.py +2 -0
- beamlit/models/store_function_labels.py +45 -0
- beamlit/models/store_function_parameter.py +2 -0
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +2 -0
- beamlit/models/update_workspace_service_account_response_200.py +2 -0
- beamlit/models/update_workspace_user_role_body.py +2 -0
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +2 -0
- beamlit/models/workspace_labels.py +2 -0
- beamlit/models/workspace_user.py +2 -0
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/METADATA +1 -1
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/RECORD +142 -95
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any, Type, TypeVar, Union
|
1
|
+
from typing import Any, Type, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -13,64 +13,44 @@ class AgentDeploymentHistoryEvent:
|
|
13
13
|
"""Agent deployment history event
|
14
14
|
|
15
15
|
Attributes:
|
16
|
-
end (Union[
|
17
|
-
error (Union[
|
16
|
+
end (Union[Unset, str]): End time
|
17
|
+
error (Union[Unset, str]): Error message
|
18
18
|
name (Union[Unset, str]): Name of the function or agent
|
19
19
|
parameters (Union[Unset, str]): Parameters
|
20
|
-
start (Union[
|
20
|
+
start (Union[Unset, str]): Start time
|
21
21
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
22
|
-
sub_function (Union[
|
23
|
-
took (Union[
|
22
|
+
sub_function (Union[Unset, str]): Function used in kit if a kit was used
|
23
|
+
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
24
24
|
type (Union[Unset, str]): Type, one of function or agent
|
25
25
|
"""
|
26
26
|
|
27
|
-
end: Union[
|
28
|
-
error: Union[
|
27
|
+
end: Union[Unset, str] = UNSET
|
28
|
+
error: Union[Unset, str] = UNSET
|
29
29
|
name: Union[Unset, str] = UNSET
|
30
30
|
parameters: Union[Unset, str] = UNSET
|
31
|
-
start: Union[
|
31
|
+
start: Union[Unset, str] = UNSET
|
32
32
|
status: Union[Unset, str] = UNSET
|
33
|
-
sub_function: Union[
|
34
|
-
took: Union[
|
33
|
+
sub_function: Union[Unset, str] = UNSET
|
34
|
+
took: Union[Unset, int] = UNSET
|
35
35
|
type: Union[Unset, str] = UNSET
|
36
36
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
37
|
|
38
38
|
def to_dict(self) -> dict[str, Any]:
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
else:
|
43
|
-
end = self.end
|
44
|
-
|
45
|
-
error: Union[None, Unset, str]
|
46
|
-
if isinstance(self.error, Unset):
|
47
|
-
error = UNSET
|
48
|
-
else:
|
49
|
-
error = self.error
|
39
|
+
end = self.end
|
40
|
+
|
41
|
+
error = self.error
|
50
42
|
|
51
43
|
name = self.name
|
52
44
|
|
53
45
|
parameters = self.parameters
|
54
46
|
|
55
|
-
start
|
56
|
-
if isinstance(self.start, Unset):
|
57
|
-
start = UNSET
|
58
|
-
else:
|
59
|
-
start = self.start
|
47
|
+
start = self.start
|
60
48
|
|
61
49
|
status = self.status
|
62
50
|
|
63
|
-
sub_function
|
64
|
-
if isinstance(self.sub_function, Unset):
|
65
|
-
sub_function = UNSET
|
66
|
-
else:
|
67
|
-
sub_function = self.sub_function
|
51
|
+
sub_function = self.sub_function
|
68
52
|
|
69
|
-
took
|
70
|
-
if isinstance(self.took, Unset):
|
71
|
-
took = UNSET
|
72
|
-
else:
|
73
|
-
took = self.took
|
53
|
+
took = self.took
|
74
54
|
|
75
55
|
type = self.type
|
76
56
|
|
@@ -100,58 +80,24 @@ class AgentDeploymentHistoryEvent:
|
|
100
80
|
|
101
81
|
@classmethod
|
102
82
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
83
|
+
if not src_dict:
|
84
|
+
return None
|
103
85
|
d = src_dict.copy()
|
86
|
+
end = d.pop("end", UNSET)
|
104
87
|
|
105
|
-
|
106
|
-
if data is None:
|
107
|
-
return data
|
108
|
-
if isinstance(data, Unset):
|
109
|
-
return data
|
110
|
-
return cast(Union[None, Unset, str], data)
|
111
|
-
|
112
|
-
end = _parse_end(d.pop("end", UNSET))
|
113
|
-
|
114
|
-
def _parse_error(data: object) -> Union[None, Unset, str]:
|
115
|
-
if data is None:
|
116
|
-
return data
|
117
|
-
if isinstance(data, Unset):
|
118
|
-
return data
|
119
|
-
return cast(Union[None, Unset, str], data)
|
120
|
-
|
121
|
-
error = _parse_error(d.pop("error", UNSET))
|
88
|
+
error = d.pop("error", UNSET)
|
122
89
|
|
123
90
|
name = d.pop("name", UNSET)
|
124
91
|
|
125
92
|
parameters = d.pop("parameters", UNSET)
|
126
93
|
|
127
|
-
|
128
|
-
if data is None:
|
129
|
-
return data
|
130
|
-
if isinstance(data, Unset):
|
131
|
-
return data
|
132
|
-
return cast(Union[None, Unset, str], data)
|
133
|
-
|
134
|
-
start = _parse_start(d.pop("start", UNSET))
|
94
|
+
start = d.pop("start", UNSET)
|
135
95
|
|
136
96
|
status = d.pop("status", UNSET)
|
137
97
|
|
138
|
-
|
139
|
-
if data is None:
|
140
|
-
return data
|
141
|
-
if isinstance(data, Unset):
|
142
|
-
return data
|
143
|
-
return cast(Union[None, Unset, str], data)
|
144
|
-
|
145
|
-
sub_function = _parse_sub_function(d.pop("sub_function", UNSET))
|
146
|
-
|
147
|
-
def _parse_took(data: object) -> Union[None, Unset, int]:
|
148
|
-
if data is None:
|
149
|
-
return data
|
150
|
-
if isinstance(data, Unset):
|
151
|
-
return data
|
152
|
-
return cast(Union[None, Unset, int], data)
|
98
|
+
sub_function = d.pop("sub_function", UNSET)
|
153
99
|
|
154
|
-
took =
|
100
|
+
took = d.pop("took", UNSET)
|
155
101
|
|
156
102
|
type = d.pop("type", UNSET)
|
157
103
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, Type, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="AgentDeploymentPodTemplate")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class AgentDeploymentPodTemplate:
|
11
|
+
"""The pod template, should be a valid Kubernetes pod template"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
agent_deployment_pod_template = cls()
|
27
|
+
|
28
|
+
agent_deployment_pod_template.additional_properties = d
|
29
|
+
return agent_deployment_pod_template
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -0,0 +1,165 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.agent_history_event import AgentHistoryEvent
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="AgentHistory")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class AgentHistory:
|
17
|
+
"""Agent deployment history
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
agent (Union[Unset, str]): Agent name
|
23
|
+
end (Union[Unset, str]): End time
|
24
|
+
environment (Union[Unset, str]): Environment name
|
25
|
+
events (Union[Unset, List['AgentHistoryEvent']]): Events
|
26
|
+
request_id (Union[Unset, str]): Request ID
|
27
|
+
start (Union[Unset, str]): Start time
|
28
|
+
status (Union[Unset, str]): Status, eg: running, success, failed
|
29
|
+
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
30
|
+
workspace (Union[Unset, str]): The workspace the agent deployment belongs to
|
31
|
+
"""
|
32
|
+
|
33
|
+
created_at: Union[Unset, str] = UNSET
|
34
|
+
updated_at: Union[Unset, str] = UNSET
|
35
|
+
agent: Union[Unset, str] = UNSET
|
36
|
+
end: Union[Unset, str] = UNSET
|
37
|
+
environment: Union[Unset, str] = UNSET
|
38
|
+
events: Union[Unset, List["AgentHistoryEvent"]] = UNSET
|
39
|
+
request_id: Union[Unset, str] = UNSET
|
40
|
+
start: Union[Unset, str] = UNSET
|
41
|
+
status: Union[Unset, str] = UNSET
|
42
|
+
took: Union[Unset, int] = UNSET
|
43
|
+
workspace: Union[Unset, str] = UNSET
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
45
|
+
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
47
|
+
created_at = self.created_at
|
48
|
+
|
49
|
+
updated_at = self.updated_at
|
50
|
+
|
51
|
+
agent = self.agent
|
52
|
+
|
53
|
+
end = self.end
|
54
|
+
|
55
|
+
environment = self.environment
|
56
|
+
|
57
|
+
events: Union[Unset, List[Dict[str, Any]]] = UNSET
|
58
|
+
if not isinstance(self.events, Unset):
|
59
|
+
events = []
|
60
|
+
for events_item_data in self.events:
|
61
|
+
events_item = events_item_data.to_dict()
|
62
|
+
events.append(events_item)
|
63
|
+
|
64
|
+
request_id = self.request_id
|
65
|
+
|
66
|
+
start = self.start
|
67
|
+
|
68
|
+
status = self.status
|
69
|
+
|
70
|
+
took = self.took
|
71
|
+
|
72
|
+
workspace = self.workspace
|
73
|
+
|
74
|
+
field_dict: dict[str, Any] = {}
|
75
|
+
field_dict.update(self.additional_properties)
|
76
|
+
field_dict.update({})
|
77
|
+
if created_at is not UNSET:
|
78
|
+
field_dict["createdAt"] = created_at
|
79
|
+
if updated_at is not UNSET:
|
80
|
+
field_dict["updatedAt"] = updated_at
|
81
|
+
if agent is not UNSET:
|
82
|
+
field_dict["agent"] = agent
|
83
|
+
if end is not UNSET:
|
84
|
+
field_dict["end"] = end
|
85
|
+
if environment is not UNSET:
|
86
|
+
field_dict["environment"] = environment
|
87
|
+
if events is not UNSET:
|
88
|
+
field_dict["events"] = events
|
89
|
+
if request_id is not UNSET:
|
90
|
+
field_dict["request_id"] = request_id
|
91
|
+
if start is not UNSET:
|
92
|
+
field_dict["start"] = start
|
93
|
+
if status is not UNSET:
|
94
|
+
field_dict["status"] = status
|
95
|
+
if took is not UNSET:
|
96
|
+
field_dict["took"] = took
|
97
|
+
if workspace is not UNSET:
|
98
|
+
field_dict["workspace"] = workspace
|
99
|
+
|
100
|
+
return field_dict
|
101
|
+
|
102
|
+
@classmethod
|
103
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
104
|
+
from ..models.agent_history_event import AgentHistoryEvent
|
105
|
+
|
106
|
+
d = src_dict.copy()
|
107
|
+
created_at = d.pop("createdAt", UNSET)
|
108
|
+
|
109
|
+
updated_at = d.pop("updatedAt", UNSET)
|
110
|
+
|
111
|
+
agent = d.pop("agent", UNSET)
|
112
|
+
|
113
|
+
end = d.pop("end", UNSET)
|
114
|
+
|
115
|
+
environment = d.pop("environment", UNSET)
|
116
|
+
|
117
|
+
events = []
|
118
|
+
_events = d.pop("events", UNSET)
|
119
|
+
for events_item_data in _events or []:
|
120
|
+
events_item = AgentHistoryEvent.from_dict(events_item_data)
|
121
|
+
|
122
|
+
events.append(events_item)
|
123
|
+
|
124
|
+
request_id = d.pop("request_id", UNSET)
|
125
|
+
|
126
|
+
start = d.pop("start", UNSET)
|
127
|
+
|
128
|
+
status = d.pop("status", UNSET)
|
129
|
+
|
130
|
+
took = d.pop("took", UNSET)
|
131
|
+
|
132
|
+
workspace = d.pop("workspace", UNSET)
|
133
|
+
|
134
|
+
agent_history = cls(
|
135
|
+
created_at=created_at,
|
136
|
+
updated_at=updated_at,
|
137
|
+
agent=agent,
|
138
|
+
end=end,
|
139
|
+
environment=environment,
|
140
|
+
events=events,
|
141
|
+
request_id=request_id,
|
142
|
+
start=start,
|
143
|
+
status=status,
|
144
|
+
took=took,
|
145
|
+
workspace=workspace,
|
146
|
+
)
|
147
|
+
|
148
|
+
agent_history.additional_properties = d
|
149
|
+
return agent_history
|
150
|
+
|
151
|
+
@property
|
152
|
+
def additional_keys(self) -> list[str]:
|
153
|
+
return list(self.additional_properties.keys())
|
154
|
+
|
155
|
+
def __getitem__(self, key: str) -> Any:
|
156
|
+
return self.additional_properties[key]
|
157
|
+
|
158
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
159
|
+
self.additional_properties[key] = value
|
160
|
+
|
161
|
+
def __delitem__(self, key: str) -> None:
|
162
|
+
del self.additional_properties[key]
|
163
|
+
|
164
|
+
def __contains__(self, key: str) -> bool:
|
165
|
+
return key in self.additional_properties
|
@@ -0,0 +1,131 @@
|
|
1
|
+
from typing import Any, Type, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="AgentHistoryEvent")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class AgentHistoryEvent:
|
13
|
+
"""Agent deployment history event
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
end (Union[Unset, str]): End time
|
17
|
+
error (Union[Unset, str]): Error message
|
18
|
+
name (Union[Unset, str]): Name of the function or agent
|
19
|
+
parameters (Union[Unset, str]): Parameters
|
20
|
+
start (Union[Unset, str]): Start time
|
21
|
+
status (Union[Unset, str]): Status, eg: running, success, failed
|
22
|
+
sub_function (Union[Unset, str]): Function used in kit if a kit was used
|
23
|
+
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
24
|
+
type (Union[Unset, str]): Type, one of function or agent
|
25
|
+
"""
|
26
|
+
|
27
|
+
end: Union[Unset, str] = UNSET
|
28
|
+
error: Union[Unset, str] = UNSET
|
29
|
+
name: Union[Unset, str] = UNSET
|
30
|
+
parameters: Union[Unset, str] = UNSET
|
31
|
+
start: Union[Unset, str] = UNSET
|
32
|
+
status: Union[Unset, str] = UNSET
|
33
|
+
sub_function: Union[Unset, str] = UNSET
|
34
|
+
took: Union[Unset, int] = UNSET
|
35
|
+
type: Union[Unset, str] = UNSET
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
|
+
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
39
|
+
end = self.end
|
40
|
+
|
41
|
+
error = self.error
|
42
|
+
|
43
|
+
name = self.name
|
44
|
+
|
45
|
+
parameters = self.parameters
|
46
|
+
|
47
|
+
start = self.start
|
48
|
+
|
49
|
+
status = self.status
|
50
|
+
|
51
|
+
sub_function = self.sub_function
|
52
|
+
|
53
|
+
took = self.took
|
54
|
+
|
55
|
+
type = self.type
|
56
|
+
|
57
|
+
field_dict: dict[str, Any] = {}
|
58
|
+
field_dict.update(self.additional_properties)
|
59
|
+
field_dict.update({})
|
60
|
+
if end is not UNSET:
|
61
|
+
field_dict["end"] = end
|
62
|
+
if error is not UNSET:
|
63
|
+
field_dict["error"] = error
|
64
|
+
if name is not UNSET:
|
65
|
+
field_dict["name"] = name
|
66
|
+
if parameters is not UNSET:
|
67
|
+
field_dict["parameters"] = parameters
|
68
|
+
if start is not UNSET:
|
69
|
+
field_dict["start"] = start
|
70
|
+
if status is not UNSET:
|
71
|
+
field_dict["status"] = status
|
72
|
+
if sub_function is not UNSET:
|
73
|
+
field_dict["sub_function"] = sub_function
|
74
|
+
if took is not UNSET:
|
75
|
+
field_dict["took"] = took
|
76
|
+
if type is not UNSET:
|
77
|
+
field_dict["type"] = type
|
78
|
+
|
79
|
+
return field_dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
83
|
+
d = src_dict.copy()
|
84
|
+
end = d.pop("end", UNSET)
|
85
|
+
|
86
|
+
error = d.pop("error", UNSET)
|
87
|
+
|
88
|
+
name = d.pop("name", UNSET)
|
89
|
+
|
90
|
+
parameters = d.pop("parameters", UNSET)
|
91
|
+
|
92
|
+
start = d.pop("start", UNSET)
|
93
|
+
|
94
|
+
status = d.pop("status", UNSET)
|
95
|
+
|
96
|
+
sub_function = d.pop("sub_function", UNSET)
|
97
|
+
|
98
|
+
took = d.pop("took", UNSET)
|
99
|
+
|
100
|
+
type = d.pop("type", UNSET)
|
101
|
+
|
102
|
+
agent_history_event = cls(
|
103
|
+
end=end,
|
104
|
+
error=error,
|
105
|
+
name=name,
|
106
|
+
parameters=parameters,
|
107
|
+
start=start,
|
108
|
+
status=status,
|
109
|
+
sub_function=sub_function,
|
110
|
+
took=took,
|
111
|
+
type=type,
|
112
|
+
)
|
113
|
+
|
114
|
+
agent_history_event.additional_properties = d
|
115
|
+
return agent_history_event
|
116
|
+
|
117
|
+
@property
|
118
|
+
def additional_keys(self) -> list[str]:
|
119
|
+
return list(self.additional_properties.keys())
|
120
|
+
|
121
|
+
def __getitem__(self, key: str) -> Any:
|
122
|
+
return self.additional_properties[key]
|
123
|
+
|
124
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
125
|
+
self.additional_properties[key] = value
|
126
|
+
|
127
|
+
def __delitem__(self, key: str) -> None:
|
128
|
+
del self.additional_properties[key]
|
129
|
+
|
130
|
+
def __contains__(self, key: str) -> bool:
|
131
|
+
return key in self.additional_properties
|
@@ -0,0 +1,144 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.metadata_labels import MetadataLabels
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="AgentMetadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class AgentMetadata:
|
17
|
+
"""Agent metadata
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
|
+
display_name (Union[Unset, str]): Model display name
|
25
|
+
labels (Union[Unset, MetadataLabels]): Labels
|
26
|
+
name (Union[Unset, str]): Model name
|
27
|
+
workspace (Union[Unset, str]): Workspace name
|
28
|
+
environment (Union[Unset, str]): Environment name
|
29
|
+
"""
|
30
|
+
|
31
|
+
created_at: Union[Unset, str] = UNSET
|
32
|
+
updated_at: Union[Unset, str] = UNSET
|
33
|
+
created_by: Union[Unset, str] = UNSET
|
34
|
+
updated_by: Union[Unset, str] = UNSET
|
35
|
+
display_name: Union[Unset, str] = UNSET
|
36
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
37
|
+
name: Union[Unset, str] = UNSET
|
38
|
+
workspace: Union[Unset, str] = UNSET
|
39
|
+
environment: Union[Unset, str] = UNSET
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
41
|
+
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
43
|
+
created_at = self.created_at
|
44
|
+
|
45
|
+
updated_at = self.updated_at
|
46
|
+
|
47
|
+
created_by = self.created_by
|
48
|
+
|
49
|
+
updated_by = self.updated_by
|
50
|
+
|
51
|
+
display_name = self.display_name
|
52
|
+
|
53
|
+
labels: Union[Unset, Dict[str, Any]] = UNSET
|
54
|
+
if not isinstance(self.labels, Unset):
|
55
|
+
labels = self.labels.to_dict()
|
56
|
+
|
57
|
+
name = self.name
|
58
|
+
|
59
|
+
workspace = self.workspace
|
60
|
+
|
61
|
+
environment = self.environment
|
62
|
+
|
63
|
+
field_dict: dict[str, Any] = {}
|
64
|
+
field_dict.update(self.additional_properties)
|
65
|
+
field_dict.update({})
|
66
|
+
if created_at is not UNSET:
|
67
|
+
field_dict["createdAt"] = created_at
|
68
|
+
if updated_at is not UNSET:
|
69
|
+
field_dict["updatedAt"] = updated_at
|
70
|
+
if created_by is not UNSET:
|
71
|
+
field_dict["createdBy"] = created_by
|
72
|
+
if updated_by is not UNSET:
|
73
|
+
field_dict["updatedBy"] = updated_by
|
74
|
+
if display_name is not UNSET:
|
75
|
+
field_dict["displayName"] = display_name
|
76
|
+
if labels is not UNSET:
|
77
|
+
field_dict["labels"] = labels
|
78
|
+
if name is not UNSET:
|
79
|
+
field_dict["name"] = name
|
80
|
+
if workspace is not UNSET:
|
81
|
+
field_dict["workspace"] = workspace
|
82
|
+
if environment is not UNSET:
|
83
|
+
field_dict["environment"] = environment
|
84
|
+
|
85
|
+
return field_dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
89
|
+
from ..models.metadata_labels import MetadataLabels
|
90
|
+
|
91
|
+
d = src_dict.copy()
|
92
|
+
created_at = d.pop("createdAt", UNSET)
|
93
|
+
|
94
|
+
updated_at = d.pop("updatedAt", UNSET)
|
95
|
+
|
96
|
+
created_by = d.pop("createdBy", UNSET)
|
97
|
+
|
98
|
+
updated_by = d.pop("updatedBy", UNSET)
|
99
|
+
|
100
|
+
display_name = d.pop("displayName", UNSET)
|
101
|
+
|
102
|
+
_labels = d.pop("labels", UNSET)
|
103
|
+
labels: Union[Unset, MetadataLabels]
|
104
|
+
if isinstance(_labels, Unset):
|
105
|
+
labels = UNSET
|
106
|
+
else:
|
107
|
+
labels = MetadataLabels.from_dict(_labels)
|
108
|
+
|
109
|
+
name = d.pop("name", UNSET)
|
110
|
+
|
111
|
+
workspace = d.pop("workspace", UNSET)
|
112
|
+
|
113
|
+
environment = d.pop("environment", UNSET)
|
114
|
+
|
115
|
+
agent_metadata = cls(
|
116
|
+
created_at=created_at,
|
117
|
+
updated_at=updated_at,
|
118
|
+
created_by=created_by,
|
119
|
+
updated_by=updated_by,
|
120
|
+
display_name=display_name,
|
121
|
+
labels=labels,
|
122
|
+
name=name,
|
123
|
+
workspace=workspace,
|
124
|
+
environment=environment,
|
125
|
+
)
|
126
|
+
|
127
|
+
agent_metadata.additional_properties = d
|
128
|
+
return agent_metadata
|
129
|
+
|
130
|
+
@property
|
131
|
+
def additional_keys(self) -> list[str]:
|
132
|
+
return list(self.additional_properties.keys())
|
133
|
+
|
134
|
+
def __getitem__(self, key: str) -> Any:
|
135
|
+
return self.additional_properties[key]
|
136
|
+
|
137
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
138
|
+
self.additional_properties[key] = value
|
139
|
+
|
140
|
+
def __delitem__(self, key: str) -> None:
|
141
|
+
del self.additional_properties[key]
|
142
|
+
|
143
|
+
def __contains__(self, key: str) -> bool:
|
144
|
+
return key in self.additional_properties
|