blaxel 0.64.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.
- blaxel/__init__.py +8 -0
- blaxel/agents/__init__.py +5 -0
- blaxel/agents/chain.py +153 -0
- blaxel/agents/chat.py +286 -0
- blaxel/agents/decorator.py +208 -0
- blaxel/agents/thread.py +24 -0
- blaxel/agents/voice/openai.py +255 -0
- blaxel/agents/voice/utils.py +25 -0
- blaxel/api/__init__.py +1 -0
- blaxel/api/agents/__init__.py +0 -0
- blaxel/api/agents/create_agent.py +155 -0
- blaxel/api/agents/delete_agent.py +146 -0
- blaxel/api/agents/get_agent.py +146 -0
- blaxel/api/agents/get_agent_logs.py +151 -0
- blaxel/api/agents/get_agent_metrics.py +150 -0
- blaxel/api/agents/get_agent_trace_ids.py +201 -0
- blaxel/api/agents/list_agent_revisions.py +155 -0
- blaxel/api/agents/list_agents.py +127 -0
- blaxel/api/agents/update_agent.py +168 -0
- blaxel/api/configurations/__init__.py +0 -0
- blaxel/api/configurations/get_configuration.py +122 -0
- blaxel/api/default/__init__.py +0 -0
- blaxel/api/default/get_trace.py +150 -0
- blaxel/api/default/get_trace_ids.py +218 -0
- blaxel/api/default/get_trace_logs.py +186 -0
- blaxel/api/default/list_mcp_hub_definitions.py +127 -0
- blaxel/api/functions/__init__.py +0 -0
- blaxel/api/functions/create_function.py +155 -0
- blaxel/api/functions/delete_function.py +146 -0
- blaxel/api/functions/get_function.py +146 -0
- blaxel/api/functions/get_function_logs.py +151 -0
- blaxel/api/functions/get_function_metrics.py +150 -0
- blaxel/api/functions/get_function_trace_ids.py +201 -0
- blaxel/api/functions/list_function_revisions.py +158 -0
- blaxel/api/functions/list_functions.py +131 -0
- blaxel/api/functions/update_function.py +168 -0
- blaxel/api/integrations/__init__.py +0 -0
- blaxel/api/integrations/create_integration_connection.py +167 -0
- blaxel/api/integrations/delete_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration.py +97 -0
- blaxel/api/integrations/get_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration_connection_model.py +104 -0
- blaxel/api/integrations/get_integration_connection_model_endpoint_configurations.py +97 -0
- blaxel/api/integrations/list_integration_connection_models.py +97 -0
- blaxel/api/integrations/list_integration_connections.py +139 -0
- blaxel/api/integrations/update_integration_connection.py +180 -0
- blaxel/api/invitations/__init__.py +0 -0
- blaxel/api/invitations/list_all_pending_invitations.py +142 -0
- blaxel/api/knowledgebases/__init__.py +0 -0
- blaxel/api/knowledgebases/create_knowledgebase.py +163 -0
- blaxel/api/knowledgebases/delete_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/get_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/list_knowledgebase_revisions.py +158 -0
- blaxel/api/knowledgebases/list_knowledgebases.py +139 -0
- blaxel/api/knowledgebases/update_knowledgebase.py +176 -0
- blaxel/api/locations/__init__.py +0 -0
- blaxel/api/locations/list_locations.py +139 -0
- blaxel/api/metrics/__init__.py +0 -0
- blaxel/api/metrics/get_metrics.py +130 -0
- blaxel/api/models/__init__.py +0 -0
- blaxel/api/models/create_model.py +163 -0
- blaxel/api/models/delete_model.py +154 -0
- blaxel/api/models/get_model.py +154 -0
- blaxel/api/models/get_model_logs.py +155 -0
- blaxel/api/models/get_model_metrics.py +158 -0
- blaxel/api/models/get_model_trace_ids.py +201 -0
- blaxel/api/models/list_model_revisions.py +158 -0
- blaxel/api/models/list_models.py +135 -0
- blaxel/api/models/update_model.py +176 -0
- blaxel/api/policies/__init__.py +0 -0
- blaxel/api/policies/create_policy.py +167 -0
- blaxel/api/policies/delete_policy.py +154 -0
- blaxel/api/policies/get_policy.py +154 -0
- blaxel/api/policies/list_policies.py +139 -0
- blaxel/api/policies/update_policy.py +180 -0
- blaxel/api/privateclusters/__init__.py +0 -0
- blaxel/api/privateclusters/create_private_cluster.py +132 -0
- blaxel/api/privateclusters/delete_private_cluster.py +156 -0
- blaxel/api/privateclusters/get_private_cluster.py +159 -0
- blaxel/api/privateclusters/get_private_cluster_health.py +97 -0
- blaxel/api/privateclusters/list_private_clusters.py +140 -0
- blaxel/api/privateclusters/update_private_cluster.py +156 -0
- blaxel/api/privateclusters/update_private_cluster_health.py +97 -0
- blaxel/api/service_accounts/__init__.py +0 -0
- blaxel/api/service_accounts/create_api_key_for_service_account.py +177 -0
- blaxel/api/service_accounts/create_workspace_service_account.py +170 -0
- blaxel/api/service_accounts/delete_api_key_for_service_account.py +104 -0
- blaxel/api/service_accounts/delete_workspace_service_account.py +160 -0
- blaxel/api/service_accounts/get_workspace_service_accounts.py +141 -0
- blaxel/api/service_accounts/list_api_keys_for_service_account.py +163 -0
- blaxel/api/service_accounts/update_workspace_service_account.py +183 -0
- blaxel/api/store/__init__.py +0 -0
- blaxel/api/store/get_store_agent.py +146 -0
- blaxel/api/store/get_store_function.py +146 -0
- blaxel/api/store/list_store_agents.py +131 -0
- blaxel/api/store/list_store_functions.py +131 -0
- blaxel/api/workspaces/__init__.py +0 -0
- blaxel/api/workspaces/accept_workspace_invitation.py +161 -0
- blaxel/api/workspaces/create_worspace.py +163 -0
- blaxel/api/workspaces/decline_workspace_invitation.py +158 -0
- blaxel/api/workspaces/delete_workspace.py +154 -0
- blaxel/api/workspaces/get_workspace.py +154 -0
- blaxel/api/workspaces/invite_workspace_user.py +174 -0
- blaxel/api/workspaces/leave_workspace.py +161 -0
- blaxel/api/workspaces/list_workspace_users.py +139 -0
- blaxel/api/workspaces/list_workspaces.py +139 -0
- blaxel/api/workspaces/remove_workspace_user.py +101 -0
- blaxel/api/workspaces/update_workspace.py +176 -0
- blaxel/api/workspaces/update_workspace_user_role.py +187 -0
- blaxel/authentication/__init__.py +45 -0
- blaxel/authentication/apikey.py +50 -0
- blaxel/authentication/authentication.py +176 -0
- blaxel/authentication/clientcredentials.py +103 -0
- blaxel/authentication/credentials.py +295 -0
- blaxel/authentication/device_mode.py +197 -0
- blaxel/client.py +281 -0
- blaxel/common/__init__.py +17 -0
- blaxel/common/error.py +27 -0
- blaxel/common/instrumentation.py +317 -0
- blaxel/common/logger.py +60 -0
- blaxel/common/secrets.py +39 -0
- blaxel/common/settings.py +150 -0
- blaxel/common/slugify.py +18 -0
- blaxel/common/utils.py +34 -0
- blaxel/deploy/__init__.py +8 -0
- blaxel/deploy/deploy.py +316 -0
- blaxel/deploy/format.py +46 -0
- blaxel/deploy/parser.py +192 -0
- blaxel/errors.py +16 -0
- blaxel/functions/__init__.py +7 -0
- blaxel/functions/common.py +228 -0
- blaxel/functions/decorator.py +64 -0
- blaxel/functions/local/local.py +48 -0
- blaxel/functions/mcp/client.py +96 -0
- blaxel/functions/mcp/mcp.py +168 -0
- blaxel/functions/mcp/utils.py +56 -0
- blaxel/functions/remote/remote.py +183 -0
- blaxel/models/__init__.py +233 -0
- blaxel/models/acl.py +133 -0
- blaxel/models/agent.py +126 -0
- blaxel/models/agent_chain.py +88 -0
- blaxel/models/agent_spec.py +346 -0
- blaxel/models/api_key.py +142 -0
- blaxel/models/configuration.py +85 -0
- blaxel/models/continent.py +70 -0
- blaxel/models/core_event.py +97 -0
- blaxel/models/core_spec.py +249 -0
- blaxel/models/core_spec_configurations.py +77 -0
- blaxel/models/country.py +70 -0
- blaxel/models/create_api_key_for_service_account_body.py +69 -0
- blaxel/models/create_workspace_service_account_body.py +71 -0
- blaxel/models/create_workspace_service_account_response_200.py +105 -0
- blaxel/models/delete_workspace_service_account_response_200.py +96 -0
- blaxel/models/entrypoint.py +96 -0
- blaxel/models/entrypoint_env.py +45 -0
- blaxel/models/flavor.py +70 -0
- blaxel/models/form.py +120 -0
- blaxel/models/form_config.py +45 -0
- blaxel/models/form_oauthomitempty.py +45 -0
- blaxel/models/form_secrets.py +45 -0
- blaxel/models/function.py +126 -0
- blaxel/models/function_kit.py +97 -0
- blaxel/models/function_spec.py +310 -0
- blaxel/models/get_trace_ids_response_200.py +45 -0
- blaxel/models/get_trace_logs_response_200.py +45 -0
- blaxel/models/get_trace_response_200.py +45 -0
- blaxel/models/get_workspace_service_accounts_response_200_item.py +96 -0
- blaxel/models/histogram_bucket.py +79 -0
- blaxel/models/histogram_stats.py +88 -0
- blaxel/models/integration_connection.py +96 -0
- blaxel/models/integration_connection_spec.py +114 -0
- blaxel/models/integration_connection_spec_config.py +45 -0
- blaxel/models/integration_connection_spec_secret.py +45 -0
- blaxel/models/integration_model.py +162 -0
- blaxel/models/integration_repository.py +88 -0
- blaxel/models/invite_workspace_user_body.py +60 -0
- blaxel/models/knowledgebase.py +126 -0
- blaxel/models/knowledgebase_spec.py +163 -0
- blaxel/models/knowledgebase_spec_options.py +45 -0
- blaxel/models/last_n_requests_metric.py +79 -0
- blaxel/models/latency_metric.py +144 -0
- blaxel/models/location_response.py +113 -0
- blaxel/models/mcp_definition.py +188 -0
- blaxel/models/mcp_definition_entrypoint.py +45 -0
- blaxel/models/mcp_definition_form.py +45 -0
- blaxel/models/metadata.py +139 -0
- blaxel/models/metadata_labels.py +45 -0
- blaxel/models/metric.py +79 -0
- blaxel/models/metrics.py +169 -0
- blaxel/models/metrics_models.py +45 -0
- blaxel/models/metrics_request_total_per_code.py +45 -0
- blaxel/models/metrics_rps_per_code.py +45 -0
- blaxel/models/model.py +126 -0
- blaxel/models/model_private_cluster.py +79 -0
- blaxel/models/model_spec.py +249 -0
- blaxel/models/o_auth.py +72 -0
- blaxel/models/owner_fields.py +70 -0
- blaxel/models/pending_invitation.py +124 -0
- blaxel/models/pending_invitation_accept.py +85 -0
- blaxel/models/pending_invitation_render.py +147 -0
- blaxel/models/pending_invitation_render_invited_by.py +88 -0
- blaxel/models/pending_invitation_render_workspace.py +70 -0
- blaxel/models/pending_invitation_workspace_details.py +72 -0
- blaxel/models/pod_template_spec.py +45 -0
- blaxel/models/policy.py +96 -0
- blaxel/models/policy_location.py +70 -0
- blaxel/models/policy_max_tokens.py +106 -0
- blaxel/models/policy_spec.py +151 -0
- blaxel/models/private_cluster.py +183 -0
- blaxel/models/private_location.py +61 -0
- blaxel/models/repository.py +70 -0
- blaxel/models/request_duration_over_time_metric.py +97 -0
- blaxel/models/request_duration_over_time_metrics.py +80 -0
- blaxel/models/request_total_by_origin_metric.py +115 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin.py +45 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +45 -0
- blaxel/models/request_total_metric.py +123 -0
- blaxel/models/request_total_metric_request_total_per_code.py +45 -0
- blaxel/models/request_total_metric_rps_per_code.py +45 -0
- blaxel/models/resource_log.py +79 -0
- blaxel/models/resource_metrics.py +270 -0
- blaxel/models/resource_metrics_request_total_per_code.py +45 -0
- blaxel/models/resource_metrics_rps_per_code.py +45 -0
- blaxel/models/revision_configuration.py +97 -0
- blaxel/models/revision_metadata.py +124 -0
- blaxel/models/runtime.py +196 -0
- blaxel/models/runtime_startup_probe.py +45 -0
- blaxel/models/serverless_config.py +80 -0
- blaxel/models/spec_configuration.py +70 -0
- blaxel/models/store_agent.py +178 -0
- blaxel/models/store_agent_labels.py +45 -0
- blaxel/models/store_configuration.py +151 -0
- blaxel/models/store_configuration_option.py +79 -0
- blaxel/models/store_function.py +211 -0
- blaxel/models/store_function_kit.py +97 -0
- blaxel/models/store_function_labels.py +45 -0
- blaxel/models/store_function_parameter.py +88 -0
- blaxel/models/time_fields.py +70 -0
- blaxel/models/token_rate_metric.py +88 -0
- blaxel/models/token_rate_metrics.py +120 -0
- blaxel/models/token_total_metric.py +106 -0
- blaxel/models/trace_ids_response.py +45 -0
- blaxel/models/update_workspace_service_account_body.py +69 -0
- blaxel/models/update_workspace_service_account_response_200.py +96 -0
- blaxel/models/update_workspace_user_role_body.py +60 -0
- blaxel/models/websocket_channel.py +88 -0
- blaxel/models/workspace.py +148 -0
- blaxel/models/workspace_labels.py +45 -0
- blaxel/models/workspace_user.py +115 -0
- blaxel/py.typed +1 -0
- blaxel/run.py +108 -0
- blaxel/serve/app.py +131 -0
- blaxel/serve/middlewares/__init__.py +10 -0
- blaxel/serve/middlewares/accesslog.py +32 -0
- blaxel/serve/middlewares/processtime.py +28 -0
- blaxel/types.py +46 -0
- blaxel-0.64.0.dist-info/METADATA +96 -0
- blaxel-0.64.0.dist-info/RECORD +261 -0
- blaxel-0.64.0.dist-info/WHEEL +4 -0
- blaxel-0.64.0.dist-info/entry_points.txt +2 -0
- blaxel-0.64.0.dist-info/licenses/LICENSE +21 -0
blaxel/models/api_key.py
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
from typing import 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
|
+
T = TypeVar("T", bound="ApiKey")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class ApiKey:
|
13
|
+
"""Long-lived API key for accessing Blaxel
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
17
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
18
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
19
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
20
|
+
api_key (Union[Unset, str]): Api key
|
21
|
+
expires_in (Union[Unset, str]): Duration until expiration (in seconds)
|
22
|
+
id (Union[Unset, str]): Api key id, to retrieve it from the API
|
23
|
+
name (Union[Unset, str]): Name for the API key
|
24
|
+
sub (Union[Unset, str]): User subject identifier
|
25
|
+
sub_type (Union[Unset, str]): Subject type
|
26
|
+
"""
|
27
|
+
|
28
|
+
created_at: Union[Unset, str] = UNSET
|
29
|
+
updated_at: Union[Unset, str] = UNSET
|
30
|
+
created_by: Union[Unset, str] = UNSET
|
31
|
+
updated_by: Union[Unset, str] = UNSET
|
32
|
+
api_key: Union[Unset, str] = UNSET
|
33
|
+
expires_in: Union[Unset, str] = UNSET
|
34
|
+
id: Union[Unset, str] = UNSET
|
35
|
+
name: Union[Unset, str] = UNSET
|
36
|
+
sub: Union[Unset, str] = UNSET
|
37
|
+
sub_type: Union[Unset, str] = UNSET
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
|
+
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
41
|
+
created_at = self.created_at
|
42
|
+
|
43
|
+
updated_at = self.updated_at
|
44
|
+
|
45
|
+
created_by = self.created_by
|
46
|
+
|
47
|
+
updated_by = self.updated_by
|
48
|
+
|
49
|
+
api_key = self.api_key
|
50
|
+
|
51
|
+
expires_in = self.expires_in
|
52
|
+
|
53
|
+
id = self.id
|
54
|
+
|
55
|
+
name = self.name
|
56
|
+
|
57
|
+
sub = self.sub
|
58
|
+
|
59
|
+
sub_type = self.sub_type
|
60
|
+
|
61
|
+
field_dict: dict[str, Any] = {}
|
62
|
+
field_dict.update(self.additional_properties)
|
63
|
+
field_dict.update({})
|
64
|
+
if created_at is not UNSET:
|
65
|
+
field_dict["createdAt"] = created_at
|
66
|
+
if updated_at is not UNSET:
|
67
|
+
field_dict["updatedAt"] = updated_at
|
68
|
+
if created_by is not UNSET:
|
69
|
+
field_dict["createdBy"] = created_by
|
70
|
+
if updated_by is not UNSET:
|
71
|
+
field_dict["updatedBy"] = updated_by
|
72
|
+
if api_key is not UNSET:
|
73
|
+
field_dict["apiKey"] = api_key
|
74
|
+
if expires_in is not UNSET:
|
75
|
+
field_dict["expires_in"] = expires_in
|
76
|
+
if id is not UNSET:
|
77
|
+
field_dict["id"] = id
|
78
|
+
if name is not UNSET:
|
79
|
+
field_dict["name"] = name
|
80
|
+
if sub is not UNSET:
|
81
|
+
field_dict["sub"] = sub
|
82
|
+
if sub_type is not UNSET:
|
83
|
+
field_dict["sub_type"] = sub_type
|
84
|
+
|
85
|
+
return field_dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
89
|
+
if not src_dict:
|
90
|
+
return None
|
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
|
+
api_key = d.pop("apiKey", UNSET)
|
101
|
+
|
102
|
+
expires_in = d.pop("expires_in", UNSET)
|
103
|
+
|
104
|
+
id = d.pop("id", UNSET)
|
105
|
+
|
106
|
+
name = d.pop("name", UNSET)
|
107
|
+
|
108
|
+
sub = d.pop("sub", UNSET)
|
109
|
+
|
110
|
+
sub_type = d.pop("sub_type", UNSET)
|
111
|
+
|
112
|
+
api_key = cls(
|
113
|
+
created_at=created_at,
|
114
|
+
updated_at=updated_at,
|
115
|
+
created_by=created_by,
|
116
|
+
updated_by=updated_by,
|
117
|
+
api_key=api_key,
|
118
|
+
expires_in=expires_in,
|
119
|
+
id=id,
|
120
|
+
name=name,
|
121
|
+
sub=sub,
|
122
|
+
sub_type=sub_type,
|
123
|
+
)
|
124
|
+
|
125
|
+
api_key.additional_properties = d
|
126
|
+
return api_key
|
127
|
+
|
128
|
+
@property
|
129
|
+
def additional_keys(self) -> list[str]:
|
130
|
+
return list(self.additional_properties.keys())
|
131
|
+
|
132
|
+
def __getitem__(self, key: str) -> Any:
|
133
|
+
return self.additional_properties[key]
|
134
|
+
|
135
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
136
|
+
self.additional_properties[key] = value
|
137
|
+
|
138
|
+
def __delitem__(self, key: str) -> None:
|
139
|
+
del self.additional_properties[key]
|
140
|
+
|
141
|
+
def __contains__(self, key: str) -> bool:
|
142
|
+
return key in self.additional_properties
|
@@ -0,0 +1,85 @@
|
|
1
|
+
from typing import 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
|
+
T = TypeVar("T", bound="Configuration")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class Configuration:
|
13
|
+
"""Configuration
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
continents (Union[Unset, list[Any]]): Continents
|
17
|
+
countries (Union[Unset, list[Any]]): Countries
|
18
|
+
private_locations (Union[Unset, list[Any]]): Private locations managed with blaxel operator
|
19
|
+
"""
|
20
|
+
|
21
|
+
continents: Union[Unset, list[Any]] = UNSET
|
22
|
+
countries: Union[Unset, list[Any]] = UNSET
|
23
|
+
private_locations: Union[Unset, list[Any]] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
continents: Union[Unset, list[Any]] = UNSET
|
28
|
+
if not isinstance(self.continents, Unset):
|
29
|
+
continents = self.continents
|
30
|
+
|
31
|
+
countries: Union[Unset, list[Any]] = UNSET
|
32
|
+
if not isinstance(self.countries, Unset):
|
33
|
+
countries = self.countries
|
34
|
+
|
35
|
+
private_locations: Union[Unset, list[Any]] = UNSET
|
36
|
+
if not isinstance(self.private_locations, Unset):
|
37
|
+
private_locations = self.private_locations
|
38
|
+
|
39
|
+
field_dict: dict[str, Any] = {}
|
40
|
+
field_dict.update(self.additional_properties)
|
41
|
+
field_dict.update({})
|
42
|
+
if continents is not UNSET:
|
43
|
+
field_dict["continents"] = continents
|
44
|
+
if countries is not UNSET:
|
45
|
+
field_dict["countries"] = countries
|
46
|
+
if private_locations is not UNSET:
|
47
|
+
field_dict["privateLocations"] = private_locations
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
53
|
+
if not src_dict:
|
54
|
+
return None
|
55
|
+
d = src_dict.copy()
|
56
|
+
continents = cast(list[Any], d.pop("continents", UNSET))
|
57
|
+
|
58
|
+
countries = cast(list[Any], d.pop("countries", UNSET))
|
59
|
+
|
60
|
+
private_locations = cast(list[Any], d.pop("privateLocations", UNSET))
|
61
|
+
|
62
|
+
configuration = cls(
|
63
|
+
continents=continents,
|
64
|
+
countries=countries,
|
65
|
+
private_locations=private_locations,
|
66
|
+
)
|
67
|
+
|
68
|
+
configuration.additional_properties = d
|
69
|
+
return configuration
|
70
|
+
|
71
|
+
@property
|
72
|
+
def additional_keys(self) -> list[str]:
|
73
|
+
return list(self.additional_properties.keys())
|
74
|
+
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
76
|
+
return self.additional_properties[key]
|
77
|
+
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
79
|
+
self.additional_properties[key] = value
|
80
|
+
|
81
|
+
def __delitem__(self, key: str) -> None:
|
82
|
+
del self.additional_properties[key]
|
83
|
+
|
84
|
+
def __contains__(self, key: str) -> bool:
|
85
|
+
return key in self.additional_properties
|
@@ -0,0 +1,70 @@
|
|
1
|
+
from typing import 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
|
+
T = TypeVar("T", bound="Continent")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class Continent:
|
13
|
+
"""Continent
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
display_name (Union[Unset, str]): Continent display name
|
17
|
+
name (Union[Unset, str]): Continent code
|
18
|
+
"""
|
19
|
+
|
20
|
+
display_name: Union[Unset, str] = UNSET
|
21
|
+
name: Union[Unset, str] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
display_name = self.display_name
|
26
|
+
|
27
|
+
name = self.name
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if display_name is not UNSET:
|
33
|
+
field_dict["displayName"] = display_name
|
34
|
+
if name is not UNSET:
|
35
|
+
field_dict["name"] = name
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
|
+
if not src_dict:
|
42
|
+
return None
|
43
|
+
d = src_dict.copy()
|
44
|
+
display_name = d.pop("displayName", UNSET)
|
45
|
+
|
46
|
+
name = d.pop("name", UNSET)
|
47
|
+
|
48
|
+
continent = cls(
|
49
|
+
display_name=display_name,
|
50
|
+
name=name,
|
51
|
+
)
|
52
|
+
|
53
|
+
continent.additional_properties = d
|
54
|
+
return continent
|
55
|
+
|
56
|
+
@property
|
57
|
+
def additional_keys(self) -> list[str]:
|
58
|
+
return list(self.additional_properties.keys())
|
59
|
+
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
61
|
+
return self.additional_properties[key]
|
62
|
+
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
64
|
+
self.additional_properties[key] = value
|
65
|
+
|
66
|
+
def __delitem__(self, key: str) -> None:
|
67
|
+
del self.additional_properties[key]
|
68
|
+
|
69
|
+
def __contains__(self, key: str) -> bool:
|
70
|
+
return key in self.additional_properties
|
@@ -0,0 +1,97 @@
|
|
1
|
+
from typing import 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
|
+
T = TypeVar("T", bound="CoreEvent")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class CoreEvent:
|
13
|
+
"""Core event
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
message (Union[Unset, str]): Event message
|
17
|
+
revision (Union[Unset, str]): RevisionID link to the event
|
18
|
+
status (Union[Unset, str]): Event status
|
19
|
+
time (Union[Unset, str]): Event time
|
20
|
+
type_ (Union[Unset, str]): Event type
|
21
|
+
"""
|
22
|
+
|
23
|
+
message: Union[Unset, str] = UNSET
|
24
|
+
revision: Union[Unset, str] = UNSET
|
25
|
+
status: Union[Unset, str] = UNSET
|
26
|
+
time: Union[Unset, str] = UNSET
|
27
|
+
type_: Union[Unset, str] = UNSET
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
29
|
+
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
31
|
+
message = self.message
|
32
|
+
|
33
|
+
revision = self.revision
|
34
|
+
|
35
|
+
status = self.status
|
36
|
+
|
37
|
+
time = self.time
|
38
|
+
|
39
|
+
type_ = self.type_
|
40
|
+
|
41
|
+
field_dict: dict[str, Any] = {}
|
42
|
+
field_dict.update(self.additional_properties)
|
43
|
+
field_dict.update({})
|
44
|
+
if message is not UNSET:
|
45
|
+
field_dict["message"] = message
|
46
|
+
if revision is not UNSET:
|
47
|
+
field_dict["revision"] = revision
|
48
|
+
if status is not UNSET:
|
49
|
+
field_dict["status"] = status
|
50
|
+
if time is not UNSET:
|
51
|
+
field_dict["time"] = time
|
52
|
+
if type_ is not UNSET:
|
53
|
+
field_dict["type"] = type_
|
54
|
+
|
55
|
+
return field_dict
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
59
|
+
if not src_dict:
|
60
|
+
return None
|
61
|
+
d = src_dict.copy()
|
62
|
+
message = d.pop("message", UNSET)
|
63
|
+
|
64
|
+
revision = d.pop("revision", UNSET)
|
65
|
+
|
66
|
+
status = d.pop("status", UNSET)
|
67
|
+
|
68
|
+
time = d.pop("time", UNSET)
|
69
|
+
|
70
|
+
type_ = d.pop("type", UNSET)
|
71
|
+
|
72
|
+
core_event = cls(
|
73
|
+
message=message,
|
74
|
+
revision=revision,
|
75
|
+
status=status,
|
76
|
+
time=time,
|
77
|
+
type_=type_,
|
78
|
+
)
|
79
|
+
|
80
|
+
core_event.additional_properties = d
|
81
|
+
return core_event
|
82
|
+
|
83
|
+
@property
|
84
|
+
def additional_keys(self) -> list[str]:
|
85
|
+
return list(self.additional_properties.keys())
|
86
|
+
|
87
|
+
def __getitem__(self, key: str) -> Any:
|
88
|
+
return self.additional_properties[key]
|
89
|
+
|
90
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
91
|
+
self.additional_properties[key] = value
|
92
|
+
|
93
|
+
def __delitem__(self, key: str) -> None:
|
94
|
+
del self.additional_properties[key]
|
95
|
+
|
96
|
+
def __contains__(self, key: str) -> bool:
|
97
|
+
return key in self.additional_properties
|
@@ -0,0 +1,249 @@
|
|
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.core_spec_configurations import CoreSpecConfigurations
|
10
|
+
from ..models.flavor import Flavor
|
11
|
+
from ..models.model_private_cluster import ModelPrivateCluster
|
12
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
13
|
+
from ..models.revision_configuration import RevisionConfiguration
|
14
|
+
from ..models.runtime import Runtime
|
15
|
+
from ..models.serverless_config import ServerlessConfig
|
16
|
+
|
17
|
+
|
18
|
+
T = TypeVar("T", bound="CoreSpec")
|
19
|
+
|
20
|
+
|
21
|
+
@_attrs_define
|
22
|
+
class CoreSpec:
|
23
|
+
"""Core specification
|
24
|
+
|
25
|
+
Attributes:
|
26
|
+
configurations (Union[Unset, CoreSpecConfigurations]): Optional configurations for the object
|
27
|
+
enabled (Union[Unset, bool]): Enable or disable the agent
|
28
|
+
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
29
|
+
integration_connections (Union[Unset, list[str]]):
|
30
|
+
pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
|
31
|
+
policies (Union[Unset, list[str]]):
|
32
|
+
private_clusters (Union[Unset, ModelPrivateCluster]): Private cluster where the model deployment is deployed
|
33
|
+
revision (Union[Unset, RevisionConfiguration]): Revision configuration
|
34
|
+
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
35
|
+
sandbox (Union[Unset, bool]): Sandbox mode
|
36
|
+
serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
|
37
|
+
"""
|
38
|
+
|
39
|
+
configurations: Union[Unset, "CoreSpecConfigurations"] = UNSET
|
40
|
+
enabled: Union[Unset, bool] = UNSET
|
41
|
+
flavors: Union[Unset, list["Flavor"]] = UNSET
|
42
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
43
|
+
pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
|
44
|
+
policies: Union[Unset, list[str]] = UNSET
|
45
|
+
private_clusters: Union[Unset, "ModelPrivateCluster"] = UNSET
|
46
|
+
revision: Union[Unset, "RevisionConfiguration"] = UNSET
|
47
|
+
runtime: Union[Unset, "Runtime"] = UNSET
|
48
|
+
sandbox: Union[Unset, bool] = UNSET
|
49
|
+
serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
51
|
+
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
53
|
+
configurations: Union[Unset, dict[str, Any]] = UNSET
|
54
|
+
if (
|
55
|
+
self.configurations
|
56
|
+
and not isinstance(self.configurations, Unset)
|
57
|
+
and not isinstance(self.configurations, dict)
|
58
|
+
):
|
59
|
+
configurations = self.configurations.to_dict()
|
60
|
+
elif self.configurations and isinstance(self.configurations, dict):
|
61
|
+
configurations = self.configurations
|
62
|
+
|
63
|
+
enabled = self.enabled
|
64
|
+
|
65
|
+
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
66
|
+
if not isinstance(self.flavors, Unset):
|
67
|
+
flavors = []
|
68
|
+
for componentsschemas_flavors_item_data in self.flavors:
|
69
|
+
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
70
|
+
flavors.append(componentsschemas_flavors_item)
|
71
|
+
|
72
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
73
|
+
if not isinstance(self.integration_connections, Unset):
|
74
|
+
integration_connections = self.integration_connections
|
75
|
+
|
76
|
+
pod_template: Union[Unset, dict[str, Any]] = UNSET
|
77
|
+
if self.pod_template and not isinstance(self.pod_template, Unset) and not isinstance(self.pod_template, dict):
|
78
|
+
pod_template = self.pod_template.to_dict()
|
79
|
+
elif self.pod_template and isinstance(self.pod_template, dict):
|
80
|
+
pod_template = self.pod_template
|
81
|
+
|
82
|
+
policies: Union[Unset, list[str]] = UNSET
|
83
|
+
if not isinstance(self.policies, Unset):
|
84
|
+
policies = self.policies
|
85
|
+
|
86
|
+
private_clusters: Union[Unset, dict[str, Any]] = UNSET
|
87
|
+
if (
|
88
|
+
self.private_clusters
|
89
|
+
and not isinstance(self.private_clusters, Unset)
|
90
|
+
and not isinstance(self.private_clusters, dict)
|
91
|
+
):
|
92
|
+
private_clusters = self.private_clusters.to_dict()
|
93
|
+
elif self.private_clusters and isinstance(self.private_clusters, dict):
|
94
|
+
private_clusters = self.private_clusters
|
95
|
+
|
96
|
+
revision: Union[Unset, dict[str, Any]] = UNSET
|
97
|
+
if self.revision and not isinstance(self.revision, Unset) and not isinstance(self.revision, dict):
|
98
|
+
revision = self.revision.to_dict()
|
99
|
+
elif self.revision and isinstance(self.revision, dict):
|
100
|
+
revision = self.revision
|
101
|
+
|
102
|
+
runtime: Union[Unset, dict[str, Any]] = UNSET
|
103
|
+
if self.runtime and not isinstance(self.runtime, Unset) and not isinstance(self.runtime, dict):
|
104
|
+
runtime = self.runtime.to_dict()
|
105
|
+
elif self.runtime and isinstance(self.runtime, dict):
|
106
|
+
runtime = self.runtime
|
107
|
+
|
108
|
+
sandbox = self.sandbox
|
109
|
+
|
110
|
+
serverless_config: Union[Unset, dict[str, Any]] = UNSET
|
111
|
+
if (
|
112
|
+
self.serverless_config
|
113
|
+
and not isinstance(self.serverless_config, Unset)
|
114
|
+
and not isinstance(self.serverless_config, dict)
|
115
|
+
):
|
116
|
+
serverless_config = self.serverless_config.to_dict()
|
117
|
+
elif self.serverless_config and isinstance(self.serverless_config, dict):
|
118
|
+
serverless_config = self.serverless_config
|
119
|
+
|
120
|
+
field_dict: dict[str, Any] = {}
|
121
|
+
field_dict.update(self.additional_properties)
|
122
|
+
field_dict.update({})
|
123
|
+
if configurations is not UNSET:
|
124
|
+
field_dict["configurations"] = configurations
|
125
|
+
if enabled is not UNSET:
|
126
|
+
field_dict["enabled"] = enabled
|
127
|
+
if flavors is not UNSET:
|
128
|
+
field_dict["flavors"] = flavors
|
129
|
+
if integration_connections is not UNSET:
|
130
|
+
field_dict["integrationConnections"] = integration_connections
|
131
|
+
if pod_template is not UNSET:
|
132
|
+
field_dict["podTemplate"] = pod_template
|
133
|
+
if policies is not UNSET:
|
134
|
+
field_dict["policies"] = policies
|
135
|
+
if private_clusters is not UNSET:
|
136
|
+
field_dict["privateClusters"] = private_clusters
|
137
|
+
if revision is not UNSET:
|
138
|
+
field_dict["revision"] = revision
|
139
|
+
if runtime is not UNSET:
|
140
|
+
field_dict["runtime"] = runtime
|
141
|
+
if sandbox is not UNSET:
|
142
|
+
field_dict["sandbox"] = sandbox
|
143
|
+
if serverless_config is not UNSET:
|
144
|
+
field_dict["serverlessConfig"] = serverless_config
|
145
|
+
|
146
|
+
return field_dict
|
147
|
+
|
148
|
+
@classmethod
|
149
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
150
|
+
from ..models.core_spec_configurations import CoreSpecConfigurations
|
151
|
+
from ..models.flavor import Flavor
|
152
|
+
from ..models.model_private_cluster import ModelPrivateCluster
|
153
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
154
|
+
from ..models.revision_configuration import RevisionConfiguration
|
155
|
+
from ..models.runtime import Runtime
|
156
|
+
from ..models.serverless_config import ServerlessConfig
|
157
|
+
|
158
|
+
if not src_dict:
|
159
|
+
return None
|
160
|
+
d = src_dict.copy()
|
161
|
+
_configurations = d.pop("configurations", UNSET)
|
162
|
+
configurations: Union[Unset, CoreSpecConfigurations]
|
163
|
+
if isinstance(_configurations, Unset):
|
164
|
+
configurations = UNSET
|
165
|
+
else:
|
166
|
+
configurations = CoreSpecConfigurations.from_dict(_configurations)
|
167
|
+
|
168
|
+
enabled = d.pop("enabled", UNSET)
|
169
|
+
|
170
|
+
flavors = []
|
171
|
+
_flavors = d.pop("flavors", UNSET)
|
172
|
+
for componentsschemas_flavors_item_data in _flavors or []:
|
173
|
+
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
174
|
+
|
175
|
+
flavors.append(componentsschemas_flavors_item)
|
176
|
+
|
177
|
+
integration_connections = cast(list[str], d.pop("integrationConnections", UNSET))
|
178
|
+
|
179
|
+
_pod_template = d.pop("podTemplate", UNSET)
|
180
|
+
pod_template: Union[Unset, PodTemplateSpec]
|
181
|
+
if isinstance(_pod_template, Unset):
|
182
|
+
pod_template = UNSET
|
183
|
+
else:
|
184
|
+
pod_template = PodTemplateSpec.from_dict(_pod_template)
|
185
|
+
|
186
|
+
policies = cast(list[str], d.pop("policies", UNSET))
|
187
|
+
|
188
|
+
_private_clusters = d.pop("privateClusters", UNSET)
|
189
|
+
private_clusters: Union[Unset, ModelPrivateCluster]
|
190
|
+
if isinstance(_private_clusters, Unset):
|
191
|
+
private_clusters = UNSET
|
192
|
+
else:
|
193
|
+
private_clusters = ModelPrivateCluster.from_dict(_private_clusters)
|
194
|
+
|
195
|
+
_revision = d.pop("revision", UNSET)
|
196
|
+
revision: Union[Unset, RevisionConfiguration]
|
197
|
+
if isinstance(_revision, Unset):
|
198
|
+
revision = UNSET
|
199
|
+
else:
|
200
|
+
revision = RevisionConfiguration.from_dict(_revision)
|
201
|
+
|
202
|
+
_runtime = d.pop("runtime", UNSET)
|
203
|
+
runtime: Union[Unset, Runtime]
|
204
|
+
if isinstance(_runtime, Unset):
|
205
|
+
runtime = UNSET
|
206
|
+
else:
|
207
|
+
runtime = Runtime.from_dict(_runtime)
|
208
|
+
|
209
|
+
sandbox = d.pop("sandbox", UNSET)
|
210
|
+
|
211
|
+
_serverless_config = d.pop("serverlessConfig", UNSET)
|
212
|
+
serverless_config: Union[Unset, ServerlessConfig]
|
213
|
+
if isinstance(_serverless_config, Unset):
|
214
|
+
serverless_config = UNSET
|
215
|
+
else:
|
216
|
+
serverless_config = ServerlessConfig.from_dict(_serverless_config)
|
217
|
+
|
218
|
+
core_spec = cls(
|
219
|
+
configurations=configurations,
|
220
|
+
enabled=enabled,
|
221
|
+
flavors=flavors,
|
222
|
+
integration_connections=integration_connections,
|
223
|
+
pod_template=pod_template,
|
224
|
+
policies=policies,
|
225
|
+
private_clusters=private_clusters,
|
226
|
+
revision=revision,
|
227
|
+
runtime=runtime,
|
228
|
+
sandbox=sandbox,
|
229
|
+
serverless_config=serverless_config,
|
230
|
+
)
|
231
|
+
|
232
|
+
core_spec.additional_properties = d
|
233
|
+
return core_spec
|
234
|
+
|
235
|
+
@property
|
236
|
+
def additional_keys(self) -> list[str]:
|
237
|
+
return list(self.additional_properties.keys())
|
238
|
+
|
239
|
+
def __getitem__(self, key: str) -> Any:
|
240
|
+
return self.additional_properties[key]
|
241
|
+
|
242
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
243
|
+
self.additional_properties[key] = value
|
244
|
+
|
245
|
+
def __delitem__(self, key: str) -> None:
|
246
|
+
del self.additional_properties[key]
|
247
|
+
|
248
|
+
def __contains__(self, key: str) -> bool:
|
249
|
+
return key in self.additional_properties
|