beamlit 0.0.24rc19__py3-none-any.whl → 0.0.24rc21__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. beamlit/agents/chat.py +37 -11
  2. beamlit/agents/decorator.py +97 -65
  3. beamlit/api/agents/create_agent.py +9 -14
  4. beamlit/api/agents/delete_agent.py +22 -1
  5. beamlit/api/agents/delete_agent_history.py +2 -6
  6. beamlit/api/agents/get_agent.py +22 -1
  7. beamlit/api/agents/get_agent_environment_logs.py +11 -11
  8. beamlit/api/agents/get_agent_history.py +2 -6
  9. beamlit/api/agents/get_agent_metrics.py +22 -1
  10. beamlit/api/agents/list_agent_history.py +11 -11
  11. beamlit/api/agents/list_agents.py +36 -4
  12. beamlit/api/agents/put_agent_history.py +2 -6
  13. beamlit/api/agents/update_agent.py +9 -14
  14. beamlit/api/functions/create_function.py +9 -14
  15. beamlit/api/functions/delete_function.py +22 -1
  16. beamlit/api/functions/get_function.py +22 -1
  17. beamlit/api/functions/get_function_environment_logs.py +11 -11
  18. beamlit/api/functions/get_function_metrics.py +22 -1
  19. beamlit/api/functions/list_functions.py +36 -4
  20. beamlit/api/functions/update_function.py +9 -14
  21. beamlit/api/history/get_agents_history.py +12 -12
  22. beamlit/api/history/list_agents_history.py +12 -12
  23. beamlit/api/integrations/get_integration_connection.py +16 -12
  24. beamlit/api/integrations/get_integration_connection_model.py +8 -1
  25. beamlit/api/integrations/get_integration_model.py +8 -1
  26. beamlit/api/locations/list_locations.py +12 -12
  27. beamlit/api/models/create_model.py +13 -14
  28. beamlit/api/models/delete_model.py +22 -1
  29. beamlit/api/models/get_model.py +22 -1
  30. beamlit/api/models/get_model_environment_logs.py +11 -11
  31. beamlit/api/models/get_model_metrics.py +38 -13
  32. beamlit/api/models/list_models.py +36 -4
  33. beamlit/api/models/update_model.py +13 -14
  34. beamlit/api/privateclusters/__init__.py +0 -0
  35. beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
  36. beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
  37. beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
  38. beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
  39. beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
  40. beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
  41. beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
  42. beamlit/authentication/device_mode.py +3 -9
  43. beamlit/common/generate.py +47 -34
  44. beamlit/common/settings.py +29 -27
  45. beamlit/deploy/deploy.py +101 -342
  46. beamlit/deploy/format.py +70 -0
  47. beamlit/deploy/parser.py +175 -0
  48. beamlit/functions/decorator.py +17 -14
  49. beamlit/models/__init__.py +64 -78
  50. beamlit/models/acl.py +4 -22
  51. beamlit/models/agent.py +34 -95
  52. beamlit/models/agent_history.py +7 -5
  53. beamlit/models/agent_history_event.py +11 -9
  54. beamlit/models/agent_metadata.py +5 -3
  55. beamlit/models/agent_spec.py +54 -45
  56. beamlit/models/api_key.py +14 -14
  57. beamlit/models/configuration.py +11 -0
  58. beamlit/models/core_spec.py +45 -32
  59. beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
  60. beamlit/models/environment.py +33 -105
  61. beamlit/models/environment_metadata.py +146 -0
  62. beamlit/models/environment_spec.py +8 -6
  63. beamlit/models/function.py +34 -95
  64. beamlit/models/function_metadata.py +5 -3
  65. beamlit/models/function_spec.py +53 -40
  66. beamlit/models/integration_connection.py +31 -137
  67. beamlit/models/integration_connection_spec.py +6 -4
  68. beamlit/models/metadata.py +5 -3
  69. beamlit/models/metadata_labels.py +4 -2
  70. beamlit/models/model.py +33 -94
  71. beamlit/models/model_metadata.py +5 -3
  72. beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
  73. beamlit/models/model_provider.py +27 -43
  74. beamlit/models/model_spec.py +45 -32
  75. beamlit/models/owner_fields.py +4 -2
  76. beamlit/models/pending_invitation.py +14 -14
  77. beamlit/models/pod_template_spec.py +4 -2
  78. beamlit/models/policy.py +33 -159
  79. beamlit/models/policy_spec.py +24 -28
  80. beamlit/models/private_cluster.py +183 -0
  81. beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
  82. beamlit/models/resource_deployment_metrics.py +0 -108
  83. beamlit/models/resource_environment_metrics.py +143 -71
  84. beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
  85. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
  86. beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
  87. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
  88. beamlit/models/resource_log.py +4 -2
  89. beamlit/models/runtime.py +20 -2
  90. beamlit/models/serverless_config.py +28 -21
  91. beamlit/models/spec_configuration.py +7 -5
  92. beamlit/models/store_agent.py +14 -14
  93. beamlit/models/store_function.py +14 -14
  94. beamlit/models/time_fields.py +4 -2
  95. beamlit/models/websocket_channel.py +4 -2
  96. beamlit/models/workspace.py +23 -14
  97. beamlit/run.py +0 -1
  98. beamlit/serve/app.py +1 -0
  99. beamlit/serve/middlewares/accesslog.py +3 -1
  100. {beamlit-0.0.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/METADATA +1 -1
  101. beamlit-0.0.24rc21.dist-info/RECORD +243 -0
  102. beamlit/api/agents/delete_agent_deployment.py +0 -163
  103. beamlit/api/agents/delete_agent_deployment_history.py +0 -172
  104. beamlit/api/agents/get_agent_deployment_history.py +0 -172
  105. beamlit/api/agents/get_agent_deployment_logs.py +0 -164
  106. beamlit/api/agents/list_agent_deployment_history.py +0 -164
  107. beamlit/api/agents/put_agent_deployment.py +0 -185
  108. beamlit/api/agents/put_agent_deployment_history.py +0 -198
  109. beamlit/api/functions/delete_function_deployment.py +0 -163
  110. beamlit/api/functions/get_function_deployment.py +0 -163
  111. beamlit/api/functions/get_function_deployment_logs.py +0 -164
  112. beamlit/api/functions/get_function_deployment_metrics.py +0 -159
  113. beamlit/api/functions/put_function_deployment.py +0 -185
  114. beamlit/api/models/delete_model_deployment.py +0 -171
  115. beamlit/api/models/get_model_deployment.py +0 -171
  116. beamlit/api/models/get_model_deployment_logs.py +0 -168
  117. beamlit/api/models/get_model_deployment_metrics.py +0 -163
  118. beamlit/api/models/put_model_deployment.py +0 -193
  119. beamlit/models/agent_configuration.py +0 -70
  120. beamlit/models/agent_deployment.py +0 -340
  121. beamlit/models/agent_deployment_configuration.py +0 -45
  122. beamlit/models/agent_deployment_configuration_type_0.py +0 -43
  123. beamlit/models/agent_deployment_history.py +0 -185
  124. beamlit/models/agent_deployment_history_event.py +0 -133
  125. beamlit/models/agent_deployment_pod_template.py +0 -45
  126. beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
  127. beamlit/models/agent_with_deployments.py +0 -176
  128. beamlit/models/authentication_provider_model.py +0 -144
  129. beamlit/models/authentication_provider_organization.py +0 -88
  130. beamlit/models/deployment_configuration.py +0 -70
  131. beamlit/models/deployment_configurations.py +0 -58
  132. beamlit/models/deployment_serverless_config.py +0 -131
  133. beamlit/models/deployment_serverless_config_type_0.py +0 -220
  134. beamlit/models/function_configuration.py +0 -70
  135. beamlit/models/function_deployment.py +0 -340
  136. beamlit/models/function_deployment_configuration.py +0 -45
  137. beamlit/models/function_deployment_configuration_type_0.py +0 -43
  138. beamlit/models/function_deployment_pod_template.py +0 -45
  139. beamlit/models/function_deployment_pod_template_type_0.py +0 -43
  140. beamlit/models/function_with_deployments.py +0 -176
  141. beamlit/models/integration.py +0 -198
  142. beamlit/models/integration_config.py +0 -45
  143. beamlit/models/integration_secret.py +0 -61
  144. beamlit/models/labels_type_0.py +0 -45
  145. beamlit/models/location.py +0 -122
  146. beamlit/models/model_deployment.py +0 -296
  147. beamlit/models/model_deployment_log.py +0 -70
  148. beamlit/models/model_deployment_metrics.py +0 -172
  149. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
  150. beamlit/models/model_deployment_pod_template.py +0 -45
  151. beamlit/models/model_deployment_pod_template_type_0.py +0 -43
  152. beamlit/models/model_metrics.py +0 -96
  153. beamlit/models/model_with_deployments.py +0 -176
  154. beamlit/models/resource_deployment_log.py +0 -70
  155. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
  156. beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
  157. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
  158. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
  159. beamlit/models/runtime_readiness_probe_type_0.py +0 -43
  160. beamlit/models/runtime_type_0.py +0 -111
  161. beamlit/models/runtime_type_0_readiness_probe.py +0 -43
  162. beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
  163. beamlit/models/runtime_type_0_resources.py +0 -59
  164. beamlit/models/standard_fields_dynamo_db.py +0 -88
  165. beamlit/models/store_agent_configuration.py +0 -97
  166. beamlit/models/store_agent_labels_type_0.py +0 -43
  167. beamlit/models/store_function_configuration.py +0 -97
  168. beamlit/models/store_function_labels_type_0.py +0 -43
  169. beamlit-0.0.24rc19.dist-info/RECORD +0 -303
  170. {beamlit-0.0.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/WHEEL +0 -0
@@ -1,340 +0,0 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
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_chain import AgentChain
10
- from ..models.agent_deployment_configuration import AgentDeploymentConfiguration
11
- from ..models.agent_deployment_pod_template import AgentDeploymentPodTemplate
12
- from ..models.deployment_serverless_config import DeploymentServerlessConfig
13
- from ..models.flavor import Flavor
14
- from ..models.labels_type_0 import LabelsType0
15
- from ..models.runtime import Runtime
16
-
17
-
18
- T = TypeVar("T", bound="AgentDeployment")
19
-
20
-
21
- @_attrs_define
22
- class AgentDeployment:
23
- """Agent deployment configuration
24
-
25
- Attributes:
26
- created_at (Union[Unset, str]): The date and time when the resource was created
27
- created_by (Union[Unset, str]): The user or service account who created the resource
28
- updated_at (Union[Unset, str]): The date and time when the resource was updated
29
- updated_by (Union[Unset, str]): The user or service account who updated the resource
30
- agent (Union[Unset, str]): The name of the agent
31
- agent_chain (Union[Unset, list['AgentChain']]): Agent chaining configuration
32
- configuration (Union[Unset, AgentDeploymentConfiguration]): Agent configuration, this is a key value storage. In
33
- your agent you can retrieve the value with config[key]
34
- description (Union[Unset, str]): Agent description, very important to have a clear description for your agent if
35
- you want to make it work with agent chaining
36
- enabled (Union[Unset, bool]): Whether the agent deployment is enabled
37
- environment (Union[Unset, str]): The name of the environment
38
- flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
39
- functions (Union[Unset, list[str]]): Functions used by the agent, those functions needs to be created before
40
- setting it here
41
- integration_connections (Union[Unset, list[str]]):
42
- labels (Union['LabelsType0', None, Unset]): Labels
43
- model (Union[Unset, str]): Model beamlit to use for agent, it should be compatible with function calling
44
- pod_template (Union[Unset, AgentDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
45
- template
46
- policies (Union[Unset, list[str]]):
47
- runtime (Union[Unset, Runtime]): Set of configurations for a deployment
48
- serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
49
- store_id (Union[Unset, str]): Create from a store registered function
50
- workspace (Union[Unset, str]): The workspace the agent deployment belongs to
51
- """
52
-
53
- created_at: Union[Unset, str] = UNSET
54
- created_by: Union[Unset, str] = UNSET
55
- updated_at: Union[Unset, str] = UNSET
56
- updated_by: Union[Unset, str] = UNSET
57
- agent: Union[Unset, str] = UNSET
58
- agent_chain: Union[Unset, list["AgentChain"]] = UNSET
59
- configuration: Union[Unset, "AgentDeploymentConfiguration"] = UNSET
60
- description: Union[Unset, str] = UNSET
61
- enabled: Union[Unset, bool] = UNSET
62
- environment: Union[Unset, str] = UNSET
63
- flavors: Union[Unset, list["Flavor"]] = UNSET
64
- functions: Union[Unset, list[str]] = UNSET
65
- integration_connections: Union[Unset, list[str]] = UNSET
66
- labels: Union["LabelsType0", None, Unset] = UNSET
67
- model: Union[Unset, str] = UNSET
68
- pod_template: Union[Unset, "AgentDeploymentPodTemplate"] = UNSET
69
- policies: Union[Unset, list[str]] = UNSET
70
- runtime: Union[Unset, "Runtime"] = UNSET
71
- serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
72
- store_id: Union[Unset, str] = UNSET
73
- workspace: Union[Unset, str] = UNSET
74
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
75
-
76
- def to_dict(self) -> dict[str, Any]:
77
- from ..models.labels_type_0 import LabelsType0
78
-
79
- created_at = self.created_at
80
-
81
- created_by = self.created_by
82
-
83
- updated_at = self.updated_at
84
-
85
- updated_by = self.updated_by
86
-
87
- agent = self.agent
88
-
89
- agent_chain: Union[Unset, list[dict[str, Any]]] = UNSET
90
- if not isinstance(self.agent_chain, Unset):
91
- agent_chain = []
92
- for agent_chain_item_data in self.agent_chain:
93
- agent_chain_item = agent_chain_item_data.to_dict()
94
- agent_chain.append(agent_chain_item)
95
-
96
- configuration: Union[Unset, dict[str, Any]] = UNSET
97
- if not isinstance(self.configuration, Unset):
98
- configuration = self.configuration.to_dict()
99
-
100
- description = self.description
101
-
102
- enabled = self.enabled
103
-
104
- environment = self.environment
105
-
106
- flavors: Union[Unset, list[dict[str, Any]]] = UNSET
107
- if not isinstance(self.flavors, Unset):
108
- flavors = []
109
- for componentsschemas_flavors_item_data in self.flavors:
110
- componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
111
- flavors.append(componentsschemas_flavors_item)
112
-
113
- functions: Union[Unset, list[str]] = UNSET
114
- if not isinstance(self.functions, Unset):
115
- functions = self.functions
116
-
117
- integration_connections: Union[Unset, list[str]] = UNSET
118
- if not isinstance(self.integration_connections, Unset):
119
- integration_connections = self.integration_connections
120
-
121
- labels: Union[None, Unset, dict[str, Any]]
122
- if isinstance(self.labels, Unset):
123
- labels = UNSET
124
- elif isinstance(self.labels, LabelsType0):
125
- labels = self.labels.to_dict()
126
- else:
127
- labels = self.labels
128
-
129
- model = self.model
130
-
131
- pod_template: Union[Unset, dict[str, Any]] = UNSET
132
- if not isinstance(self.pod_template, Unset):
133
- pod_template = self.pod_template.to_dict()
134
-
135
- policies: Union[Unset, list[str]] = UNSET
136
- if not isinstance(self.policies, Unset):
137
- policies = self.policies
138
-
139
- runtime: Union[Unset, dict[str, Any]] = UNSET
140
- if not isinstance(self.runtime, Unset):
141
- runtime = self.runtime.to_dict()
142
-
143
- serverless_config: Union[Unset, dict[str, Any]] = UNSET
144
- if not isinstance(self.serverless_config, Unset):
145
- serverless_config = self.serverless_config.to_dict()
146
-
147
- store_id = self.store_id
148
-
149
- workspace = self.workspace
150
-
151
- field_dict: dict[str, Any] = {}
152
- field_dict.update(self.additional_properties)
153
- field_dict.update({})
154
- if created_at is not UNSET:
155
- field_dict["created_at"] = created_at
156
- if created_by is not UNSET:
157
- field_dict["created_by"] = created_by
158
- if updated_at is not UNSET:
159
- field_dict["updated_at"] = updated_at
160
- if updated_by is not UNSET:
161
- field_dict["updated_by"] = updated_by
162
- if agent is not UNSET:
163
- field_dict["agent"] = agent
164
- if agent_chain is not UNSET:
165
- field_dict["agent_chain"] = agent_chain
166
- if configuration is not UNSET:
167
- field_dict["configuration"] = configuration
168
- if description is not UNSET:
169
- field_dict["description"] = description
170
- if enabled is not UNSET:
171
- field_dict["enabled"] = enabled
172
- if environment is not UNSET:
173
- field_dict["environment"] = environment
174
- if flavors is not UNSET:
175
- field_dict["flavors"] = flavors
176
- if functions is not UNSET:
177
- field_dict["functions"] = functions
178
- if integration_connections is not UNSET:
179
- field_dict["integration_connections"] = integration_connections
180
- if labels is not UNSET:
181
- field_dict["labels"] = labels
182
- if model is not UNSET:
183
- field_dict["model"] = model
184
- if pod_template is not UNSET:
185
- field_dict["pod_template"] = pod_template
186
- if policies is not UNSET:
187
- field_dict["policies"] = policies
188
- if runtime is not UNSET:
189
- field_dict["runtime"] = runtime
190
- if serverless_config is not UNSET:
191
- field_dict["serverless_config"] = serverless_config
192
- if store_id is not UNSET:
193
- field_dict["store_id"] = store_id
194
- if workspace is not UNSET:
195
- field_dict["workspace"] = workspace
196
-
197
- return field_dict
198
-
199
- @classmethod
200
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
201
- from ..models.agent_chain import AgentChain
202
- from ..models.agent_deployment_configuration import AgentDeploymentConfiguration
203
- from ..models.agent_deployment_pod_template import AgentDeploymentPodTemplate
204
- from ..models.deployment_serverless_config import DeploymentServerlessConfig
205
- from ..models.flavor import Flavor
206
- from ..models.labels_type_0 import LabelsType0
207
- from ..models.runtime import Runtime
208
-
209
- if not src_dict:
210
- return None
211
- d = src_dict.copy()
212
- created_at = d.pop("created_at", UNSET)
213
-
214
- created_by = d.pop("created_by", UNSET)
215
-
216
- updated_at = d.pop("updated_at", UNSET)
217
-
218
- updated_by = d.pop("updated_by", UNSET)
219
-
220
- agent = d.pop("agent", UNSET)
221
-
222
- agent_chain = []
223
- _agent_chain = d.pop("agent_chain", UNSET)
224
- for agent_chain_item_data in _agent_chain or []:
225
- agent_chain_item = AgentChain.from_dict(agent_chain_item_data)
226
-
227
- agent_chain.append(agent_chain_item)
228
-
229
- _configuration = d.pop("configuration", UNSET)
230
- configuration: Union[Unset, AgentDeploymentConfiguration]
231
- if isinstance(_configuration, Unset):
232
- configuration = UNSET
233
- else:
234
- configuration = AgentDeploymentConfiguration.from_dict(_configuration)
235
-
236
- description = d.pop("description", UNSET)
237
-
238
- enabled = d.pop("enabled", UNSET)
239
-
240
- environment = d.pop("environment", UNSET)
241
-
242
- flavors = []
243
- _flavors = d.pop("flavors", UNSET)
244
- for componentsschemas_flavors_item_data in _flavors or []:
245
- componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
246
-
247
- flavors.append(componentsschemas_flavors_item)
248
-
249
- functions = cast(list[str], d.pop("functions", UNSET))
250
-
251
- integration_connections = cast(list[str], d.pop("integration_connections", UNSET))
252
-
253
- def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
254
- if data is None:
255
- return data
256
- if isinstance(data, Unset):
257
- return data
258
- try:
259
- if not isinstance(data, dict):
260
- raise TypeError()
261
- componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
262
-
263
- return componentsschemas_labels_type_0
264
- except: # noqa: E722
265
- pass
266
- return cast(Union["LabelsType0", None, Unset], data)
267
-
268
- labels = _parse_labels(d.pop("labels", UNSET))
269
-
270
- model = d.pop("model", UNSET)
271
-
272
- _pod_template = d.pop("pod_template", UNSET)
273
- pod_template: Union[Unset, AgentDeploymentPodTemplate]
274
- if isinstance(_pod_template, Unset):
275
- pod_template = UNSET
276
- else:
277
- pod_template = AgentDeploymentPodTemplate.from_dict(_pod_template)
278
-
279
- policies = cast(list[str], d.pop("policies", UNSET))
280
-
281
- _runtime = d.pop("runtime", UNSET)
282
- runtime: Union[Unset, Runtime]
283
- if isinstance(_runtime, Unset):
284
- runtime = UNSET
285
- else:
286
- runtime = Runtime.from_dict(_runtime)
287
-
288
- _serverless_config = d.pop("serverless_config", UNSET)
289
- serverless_config: Union[Unset, DeploymentServerlessConfig]
290
- if isinstance(_serverless_config, Unset):
291
- serverless_config = UNSET
292
- else:
293
- serverless_config = DeploymentServerlessConfig.from_dict(_serverless_config)
294
-
295
- store_id = d.pop("store_id", UNSET)
296
-
297
- workspace = d.pop("workspace", UNSET)
298
-
299
- agent_deployment = cls(
300
- created_at=created_at,
301
- created_by=created_by,
302
- updated_at=updated_at,
303
- updated_by=updated_by,
304
- agent=agent,
305
- agent_chain=agent_chain,
306
- configuration=configuration,
307
- description=description,
308
- enabled=enabled,
309
- environment=environment,
310
- flavors=flavors,
311
- functions=functions,
312
- integration_connections=integration_connections,
313
- labels=labels,
314
- model=model,
315
- pod_template=pod_template,
316
- policies=policies,
317
- runtime=runtime,
318
- serverless_config=serverless_config,
319
- store_id=store_id,
320
- workspace=workspace,
321
- )
322
-
323
- agent_deployment.additional_properties = d
324
- return agent_deployment
325
-
326
- @property
327
- def additional_keys(self) -> list[str]:
328
- return list(self.additional_properties.keys())
329
-
330
- def __getitem__(self, key: str) -> Any:
331
- return self.additional_properties[key]
332
-
333
- def __setitem__(self, key: str, value: Any) -> None:
334
- self.additional_properties[key] = value
335
-
336
- def __delitem__(self, key: str) -> None:
337
- del self.additional_properties[key]
338
-
339
- def __contains__(self, key: str) -> bool:
340
- return key in self.additional_properties
@@ -1,45 +0,0 @@
1
- from typing import Any, TypeVar
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- T = TypeVar("T", bound="AgentDeploymentConfiguration")
7
-
8
-
9
- @_attrs_define
10
- class AgentDeploymentConfiguration:
11
- """Agent configuration, this is a key value storage. In your agent you can retrieve the value with config[key]"""
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_configuration = cls()
27
-
28
- agent_deployment_configuration.additional_properties = d
29
- return agent_deployment_configuration
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
@@ -1,43 +0,0 @@
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="AgentDeploymentConfigurationType0")
7
-
8
-
9
- @_attrs_define
10
- class AgentDeploymentConfigurationType0:
11
- """Agent configuration, this is a key value storage. In your agent you can retrieve the value with config[key]"""
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
- d = src_dict.copy()
24
- agent_deployment_configuration_type_0 = cls()
25
-
26
- agent_deployment_configuration_type_0.additional_properties = d
27
- return agent_deployment_configuration_type_0
28
-
29
- @property
30
- def additional_keys(self) -> list[str]:
31
- return list(self.additional_properties.keys())
32
-
33
- def __getitem__(self, key: str) -> Any:
34
- return self.additional_properties[key]
35
-
36
- def __setitem__(self, key: str, value: Any) -> None:
37
- self.additional_properties[key] = value
38
-
39
- def __delitem__(self, key: str) -> None:
40
- del self.additional_properties[key]
41
-
42
- def __contains__(self, key: str) -> bool:
43
- return key in self.additional_properties
@@ -1,185 +0,0 @@
1
- from typing import TYPE_CHECKING, Any, 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_deployment_history_event import AgentDeploymentHistoryEvent
10
-
11
-
12
- T = TypeVar("T", bound="AgentDeploymentHistory")
13
-
14
-
15
- @_attrs_define
16
- class AgentDeploymentHistory:
17
- """Agent deployment history
18
-
19
- Attributes:
20
- created_at (Union[Unset, str]): The date and time when the resource was created
21
- created_by (Union[Unset, str]): The user or service account who created the resource
22
- updated_at (Union[Unset, str]): The date and time when the resource was updated
23
- updated_by (Union[Unset, str]): The user or service account who updated the resource
24
- agent (Union[Unset, str]): Agent name
25
- end (Union[Unset, str]): End time
26
- environment (Union[Unset, str]): Environment name
27
- events (Union[Unset, list['AgentDeploymentHistoryEvent']]): Events
28
- request_id (Union[Unset, str]): Request ID
29
- start (Union[Unset, str]): Start time
30
- status (Union[Unset, str]): Status, eg: running, success, failed
31
- took (Union[Unset, int]): Number of milliseconds it took to complete the event
32
- workspace (Union[Unset, str]): The workspace the agent deployment belongs to
33
- """
34
-
35
- created_at: Union[Unset, str] = UNSET
36
- created_by: Union[Unset, str] = UNSET
37
- updated_at: Union[Unset, str] = UNSET
38
- updated_by: Union[Unset, str] = UNSET
39
- agent: Union[Unset, str] = UNSET
40
- end: Union[Unset, str] = UNSET
41
- environment: Union[Unset, str] = UNSET
42
- events: Union[Unset, list["AgentDeploymentHistoryEvent"]] = UNSET
43
- request_id: Union[Unset, str] = UNSET
44
- start: Union[Unset, str] = UNSET
45
- status: Union[Unset, str] = UNSET
46
- took: Union[Unset, int] = UNSET
47
- workspace: Union[Unset, str] = UNSET
48
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
49
-
50
- def to_dict(self) -> dict[str, Any]:
51
- created_at = self.created_at
52
-
53
- created_by = self.created_by
54
-
55
- updated_at = self.updated_at
56
-
57
- updated_by = self.updated_by
58
-
59
- agent = self.agent
60
-
61
- end = self.end
62
-
63
- environment = self.environment
64
-
65
- events: Union[Unset, list[dict[str, Any]]] = UNSET
66
- if not isinstance(self.events, Unset):
67
- events = []
68
- for events_item_data in self.events:
69
- events_item = events_item_data.to_dict()
70
- events.append(events_item)
71
-
72
- request_id = self.request_id
73
-
74
- start = self.start
75
-
76
- status = self.status
77
-
78
- took = self.took
79
-
80
- workspace = self.workspace
81
-
82
- field_dict: dict[str, Any] = {}
83
- field_dict.update(self.additional_properties)
84
- field_dict.update({})
85
- if created_at is not UNSET:
86
- field_dict["created_at"] = created_at
87
- if created_by is not UNSET:
88
- field_dict["created_by"] = created_by
89
- if updated_at is not UNSET:
90
- field_dict["updated_at"] = updated_at
91
- if updated_by is not UNSET:
92
- field_dict["updated_by"] = updated_by
93
- if agent is not UNSET:
94
- field_dict["agent"] = agent
95
- if end is not UNSET:
96
- field_dict["end"] = end
97
- if environment is not UNSET:
98
- field_dict["environment"] = environment
99
- if events is not UNSET:
100
- field_dict["events"] = events
101
- if request_id is not UNSET:
102
- field_dict["request_id"] = request_id
103
- if start is not UNSET:
104
- field_dict["start"] = start
105
- if status is not UNSET:
106
- field_dict["status"] = status
107
- if took is not UNSET:
108
- field_dict["took"] = took
109
- if workspace is not UNSET:
110
- field_dict["workspace"] = workspace
111
-
112
- return field_dict
113
-
114
- @classmethod
115
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
116
- from ..models.agent_deployment_history_event import AgentDeploymentHistoryEvent
117
-
118
- if not src_dict:
119
- return None
120
- d = src_dict.copy()
121
- created_at = d.pop("created_at", UNSET)
122
-
123
- created_by = d.pop("created_by", UNSET)
124
-
125
- updated_at = d.pop("updated_at", UNSET)
126
-
127
- updated_by = d.pop("updated_by", UNSET)
128
-
129
- agent = d.pop("agent", UNSET)
130
-
131
- end = d.pop("end", UNSET)
132
-
133
- environment = d.pop("environment", UNSET)
134
-
135
- events = []
136
- _events = d.pop("events", UNSET)
137
- for events_item_data in _events or []:
138
- events_item = AgentDeploymentHistoryEvent.from_dict(events_item_data)
139
-
140
- events.append(events_item)
141
-
142
- request_id = d.pop("request_id", UNSET)
143
-
144
- start = d.pop("start", UNSET)
145
-
146
- status = d.pop("status", UNSET)
147
-
148
- took = d.pop("took", UNSET)
149
-
150
- workspace = d.pop("workspace", UNSET)
151
-
152
- agent_deployment_history = cls(
153
- created_at=created_at,
154
- created_by=created_by,
155
- updated_at=updated_at,
156
- updated_by=updated_by,
157
- agent=agent,
158
- end=end,
159
- environment=environment,
160
- events=events,
161
- request_id=request_id,
162
- start=start,
163
- status=status,
164
- took=took,
165
- workspace=workspace,
166
- )
167
-
168
- agent_deployment_history.additional_properties = d
169
- return agent_deployment_history
170
-
171
- @property
172
- def additional_keys(self) -> list[str]:
173
- return list(self.additional_properties.keys())
174
-
175
- def __getitem__(self, key: str) -> Any:
176
- return self.additional_properties[key]
177
-
178
- def __setitem__(self, key: str, value: Any) -> None:
179
- self.additional_properties[key] = value
180
-
181
- def __delitem__(self, key: str) -> None:
182
- del self.additional_properties[key]
183
-
184
- def __contains__(self, key: str) -> bool:
185
- return key in self.additional_properties