blaxel 0.2.34__py3-none-any.whl → 0.2.35__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 +2 -2
- blaxel/core/client/api/agents/create_agent.py +64 -19
- blaxel/core/client/api/agents/delete_agent.py +44 -15
- blaxel/core/client/api/agents/get_agent.py +43 -14
- blaxel/core/client/api/agents/list_agents.py +40 -11
- blaxel/core/client/api/agents/update_agent.py +60 -19
- blaxel/core/client/api/compute/create_sandbox.py +60 -23
- blaxel/core/client/api/compute/delete_sandbox.py +40 -19
- blaxel/core/client/api/compute/get_sandbox.py +39 -18
- blaxel/core/client/api/compute/list_sandboxes.py +40 -19
- blaxel/core/client/api/compute/update_sandbox.py +56 -23
- blaxel/core/client/api/configurations/get_configuration.py +16 -4
- blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
- blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
- blaxel/core/client/api/default/get_template.py +8 -4
- blaxel/core/client/api/functions/create_function.py +62 -19
- blaxel/core/client/api/functions/delete_function.py +46 -15
- blaxel/core/client/api/functions/get_function.py +45 -14
- blaxel/core/client/api/functions/list_functions.py +44 -15
- blaxel/core/client/api/functions/update_function.py +62 -19
- blaxel/core/client/api/images/cleanup_images.py +12 -12
- blaxel/core/client/api/images/delete_image.py +12 -8
- blaxel/core/client/api/images/delete_image_tag.py +12 -8
- blaxel/core/client/api/images/get_image.py +12 -8
- blaxel/core/client/api/images/list_images.py +12 -8
- blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
- blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
- blaxel/core/client/api/integrations/get_integration.py +12 -8
- blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
- blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
- blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
- blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
- blaxel/core/client/api/jobs/create_job.py +20 -12
- blaxel/core/client/api/jobs/create_job_execution.py +22 -16
- blaxel/core/client/api/jobs/delete_job.py +12 -8
- blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
- blaxel/core/client/api/jobs/get_job.py +24 -20
- blaxel/core/client/api/jobs/get_job_execution.py +8 -4
- blaxel/core/client/api/jobs/list_job_executions.py +8 -4
- blaxel/core/client/api/jobs/list_jobs.py +12 -8
- blaxel/core/client/api/jobs/update_job.py +20 -12
- blaxel/core/client/api/locations/list_locations.py +12 -8
- blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
- blaxel/core/client/api/models/create_model.py +52 -23
- blaxel/core/client/api/models/delete_model.py +40 -19
- blaxel/core/client/api/models/get_model.py +40 -19
- blaxel/core/client/api/models/list_models.py +40 -19
- blaxel/core/client/api/models/update_model.py +52 -23
- blaxel/core/client/api/policies/create_policy.py +12 -8
- blaxel/core/client/api/policies/delete_policy.py +12 -8
- blaxel/core/client/api/policies/get_policy.py +12 -8
- blaxel/core/client/api/policies/list_policies.py +12 -8
- blaxel/core/client/api/policies/update_policy.py +12 -8
- blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
- blaxel/core/client/api/sandboxhub/__init__.py +0 -0
- blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
- blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
- blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
- blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
- blaxel/core/client/api/templates/list_templates.py +12 -8
- blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
- blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
- blaxel/core/client/api/volumes/create_volume.py +56 -23
- blaxel/core/client/api/volumes/delete_volume.py +44 -19
- blaxel/core/client/api/volumes/get_volume.py +40 -19
- blaxel/core/client/api/volumes/list_volumes.py +40 -19
- blaxel/core/client/api/workspaces/create_workspace.py +54 -23
- blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
- blaxel/core/client/api/workspaces/get_workspace.py +42 -19
- blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
- blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
- blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
- blaxel/core/client/api/workspaces/update_workspace.py +50 -19
- blaxel/core/client/models/__init__.py +76 -146
- blaxel/core/client/models/agent.py +43 -47
- blaxel/core/client/models/agent_runtime.py +139 -0
- blaxel/core/client/models/agent_runtime_generation.py +18 -0
- blaxel/core/client/models/agent_spec.py +33 -110
- blaxel/core/client/models/api_key.py +5 -4
- blaxel/core/client/models/core_event.py +5 -5
- blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
- blaxel/core/client/models/create_job_execution_request.py +1 -1
- blaxel/core/client/models/create_job_execution_response.py +13 -9
- blaxel/core/client/models/custom_domain.py +19 -36
- blaxel/core/client/models/custom_domain_metadata.py +4 -3
- blaxel/core/client/models/custom_domain_spec.py +14 -5
- blaxel/core/client/models/custom_domain_spec_status.py +19 -0
- blaxel/core/client/models/entrypoint.py +39 -13
- blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
- blaxel/core/client/models/entrypoint_env.py +3 -3
- blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
- blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
- blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
- blaxel/core/client/models/expiration_policy.py +30 -11
- blaxel/core/client/models/expiration_policy_action.py +17 -0
- blaxel/core/client/models/expiration_policy_type.py +19 -0
- blaxel/core/client/models/flavor.py +13 -5
- blaxel/core/client/models/flavor_type.py +18 -0
- blaxel/core/client/models/form.py +6 -6
- blaxel/core/client/models/function.py +43 -47
- blaxel/core/client/models/function_runtime.py +138 -0
- blaxel/core/client/models/function_runtime_generation.py +18 -0
- blaxel/core/client/models/function_spec.py +27 -73
- blaxel/core/client/models/function_spec_transport.py +18 -0
- blaxel/core/client/models/image.py +19 -36
- blaxel/core/client/models/integration_connection.py +25 -39
- blaxel/core/client/models/integration_connection_spec.py +8 -5
- blaxel/core/client/models/integration_connection_spec_config.py +1 -1
- blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
- blaxel/core/client/models/integration_endpoint.py +41 -11
- blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
- blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
- blaxel/core/client/models/job.py +43 -47
- blaxel/core/client/models/job_execution.py +30 -37
- blaxel/core/client/models/job_execution_metadata.py +3 -3
- blaxel/core/client/models/job_execution_spec.py +2 -2
- blaxel/core/client/models/job_execution_stats.py +5 -5
- blaxel/core/client/models/job_execution_status.py +24 -0
- blaxel/core/client/models/job_execution_task.py +12 -4
- blaxel/core/client/models/job_execution_task_metadata.py +1 -1
- blaxel/core/client/models/job_execution_task_spec.py +2 -2
- blaxel/core/client/models/job_execution_task_status.py +23 -0
- blaxel/core/client/models/job_runtime.py +172 -0
- blaxel/core/client/models/job_runtime_generation.py +18 -0
- blaxel/core/client/models/job_spec.py +20 -88
- blaxel/core/client/models/location_response.py +5 -5
- blaxel/core/client/models/mcp_definition.py +30 -17
- blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
- blaxel/core/client/models/metadata.py +23 -17
- blaxel/core/client/models/metadata_labels.py +4 -1
- blaxel/core/client/models/model.py +43 -47
- blaxel/core/client/models/model_runtime.py +99 -0
- blaxel/core/client/models/model_runtime_type.py +34 -0
- blaxel/core/client/models/model_spec.py +12 -58
- blaxel/core/client/models/o_auth.py +23 -6
- blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
- blaxel/core/client/models/pending_invitation_accept.py +2 -1
- blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
- blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
- blaxel/core/client/models/policy.py +20 -36
- blaxel/core/client/models/policy_location.py +13 -5
- blaxel/core/client/models/policy_location_type.py +19 -0
- blaxel/core/client/models/policy_max_tokens.py +6 -6
- blaxel/core/client/models/policy_resource_type.py +20 -0
- blaxel/core/client/models/policy_spec.py +31 -10
- blaxel/core/client/models/policy_spec_type.py +19 -0
- blaxel/core/client/models/port.py +25 -15
- blaxel/core/client/models/port_protocol.py +19 -0
- blaxel/core/client/models/preview.py +19 -36
- blaxel/core/client/models/preview_metadata.py +12 -10
- blaxel/core/client/models/preview_token.py +19 -36
- blaxel/core/client/models/preview_token_metadata.py +8 -6
- blaxel/core/client/models/repository.py +2 -2
- blaxel/core/client/models/revision_configuration.py +3 -3
- blaxel/core/client/models/sandbox.py +45 -58
- blaxel/core/client/models/sandbox_definition.py +37 -22
- blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
- blaxel/core/client/models/sandbox_error.py +148 -0
- blaxel/core/client/models/sandbox_error_details.py +45 -0
- blaxel/core/client/models/sandbox_lifecycle.py +3 -2
- blaxel/core/client/models/sandbox_runtime.py +145 -0
- blaxel/core/client/models/sandbox_spec.py +33 -134
- blaxel/core/client/models/status.py +25 -0
- blaxel/core/client/models/template.py +8 -7
- blaxel/core/client/models/template_variable.py +5 -5
- blaxel/core/client/models/trigger.py +14 -6
- blaxel/core/client/models/trigger_configuration.py +7 -6
- blaxel/core/client/models/trigger_type.py +19 -0
- blaxel/core/client/models/volume.py +35 -47
- blaxel/core/client/models/volume_attachment.py +6 -4
- blaxel/core/client/models/volume_spec.py +7 -4
- blaxel/core/client/models/volume_state.py +3 -3
- blaxel/core/client/models/volume_template.py +19 -33
- blaxel/core/client/models/volume_template_state.py +12 -4
- blaxel/core/client/models/volume_template_state_status.py +19 -0
- blaxel/core/client/models/volume_template_version.py +12 -4
- blaxel/core/client/models/volume_template_version_status.py +19 -0
- blaxel/core/client/models/workspace.py +35 -25
- blaxel/core/client/models/workspace_runtime.py +3 -2
- blaxel/core/client/models/workspace_status.py +22 -0
- blaxel/core/common/__init__.py +1 -1
- blaxel/core/jobs/__init__.py +0 -1
- blaxel/core/sandbox/__init__.py +2 -0
- blaxel/core/sandbox/client/api/process/post_process.py +8 -4
- blaxel/core/sandbox/client/models/__init__.py +0 -2
- blaxel/core/sandbox/client/models/process_response.py +16 -0
- blaxel/core/sandbox/client/models/process_response_status.py +9 -0
- blaxel/core/sandbox/default/__init__.py +2 -0
- blaxel/core/sandbox/default/interpreter.py +5 -1
- blaxel/core/sandbox/default/preview.py +3 -1
- blaxel/core/sandbox/default/sandbox.py +51 -16
- blaxel/core/sandbox/sync/process.py +2 -1
- blaxel/core/sandbox/sync/sandbox.py +34 -13
- blaxel/core/tools/common.py +16 -2
- blaxel/core/volume/__init__.py +2 -2
- blaxel/core/volume/volume.py +32 -10
- blaxel/langgraph/tools.py +34 -2
- blaxel/openai/tools.py +33 -1
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/RECORD +207 -246
- blaxel/core/client/models/acl.py +0 -133
- blaxel/core/client/models/billable_time_metric.py +0 -89
- blaxel/core/client/models/core_spec.py +0 -194
- blaxel/core/client/models/core_spec_configurations.py +0 -77
- blaxel/core/client/models/histogram_bucket.py +0 -79
- blaxel/core/client/models/histogram_stats.py +0 -88
- blaxel/core/client/models/integration_model.py +0 -162
- blaxel/core/client/models/job_execution_config.py +0 -79
- blaxel/core/client/models/job_metrics.py +0 -262
- blaxel/core/client/models/jobs_chart_value.py +0 -70
- blaxel/core/client/models/jobs_network_chart.py +0 -102
- blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
- blaxel/core/client/models/jobs_total.py +0 -88
- blaxel/core/client/models/last_n_requests_metric.py +0 -97
- blaxel/core/client/models/latency_metric.py +0 -148
- blaxel/core/client/models/logs_response.py +0 -63
- blaxel/core/client/models/logs_response_data.py +0 -99
- blaxel/core/client/models/mcp_definition_form.py +0 -45
- blaxel/core/client/models/memory_allocation_by_name.py +0 -70
- blaxel/core/client/models/memory_allocation_metric.py +0 -61
- blaxel/core/client/models/metric.py +0 -79
- blaxel/core/client/models/metrics.py +0 -273
- blaxel/core/client/models/metrics_models.py +0 -45
- blaxel/core/client/models/metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/pod_template_spec.py +0 -45
- blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
- blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
- blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
- blaxel/core/client/models/request_total_metric.py +0 -155
- blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
- blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
- blaxel/core/client/models/request_total_response_data.py +0 -97
- blaxel/core/client/models/resource.py +0 -99
- blaxel/core/client/models/resource_log.py +0 -88
- blaxel/core/client/models/resource_log_chart.py +0 -133
- blaxel/core/client/models/resource_log_response.py +0 -83
- blaxel/core/client/models/resource_metrics.py +0 -618
- blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_trace.py +0 -97
- blaxel/core/client/models/runtime.py +0 -317
- blaxel/core/client/models/runtime_configuration.py +0 -45
- blaxel/core/client/models/runtime_startup_probe.py +0 -45
- blaxel/core/client/models/sandbox_metrics.py +0 -88
- blaxel/core/client/models/serverless_config.py +0 -117
- blaxel/core/client/models/serverless_config_configuration.py +0 -45
- blaxel/core/client/models/start_sandbox.py +0 -98
- blaxel/core/client/models/stop_sandbox.py +0 -98
- blaxel/core/client/models/store_agent.py +0 -181
- blaxel/core/client/models/store_agent_labels.py +0 -45
- blaxel/core/client/models/store_configuration.py +0 -156
- blaxel/core/client/models/store_configuration_option.py +0 -79
- blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
- blaxel/core/client/models/token_rate_metric.py +0 -106
- blaxel/core/client/models/token_rate_metrics.py +0 -124
- blaxel/core/client/models/token_total_metric.py +0 -112
- blaxel/core/client/models/trace_ids_response.py +0 -45
- blaxel/core/client/models/websocket_channel.py +0 -97
- blaxel/core/client/models/websocket_message.py +0 -106
- blaxel/core/sandbox/client/api/root/delete.py +0 -130
- blaxel/core/sandbox/client/api/root/get.py +0 -130
- blaxel/core/sandbox/client/api/root/options.py +0 -130
- blaxel/core/sandbox/client/api/root/patch.py +0 -130
- blaxel/core/sandbox/client/api/root/post.py +0 -130
- blaxel/core/sandbox/client/api/root/put.py +0 -130
- /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
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 ..models.agent_runtime_generation import AgentRuntimeGeneration
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.env import Env
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="AgentRuntime")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class AgentRuntime:
|
|
18
|
+
"""Runtime configuration defining how the AI agent is deployed and scaled globally
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
envs (Union[Unset, list['Env']]): Environment variables injected into the agent. Supports Kubernetes EnvVar
|
|
22
|
+
format with valueFrom references.
|
|
23
|
+
generation (Union[Unset, AgentRuntimeGeneration]): Infrastructure generation: mk2 (containers, 2-10s cold
|
|
24
|
+
starts, 15+ global regions) or mk3 (microVMs, sub-25ms cold starts) Example: mk3.
|
|
25
|
+
image (Union[Unset, str]): Container image built by Blaxel when deploying with 'bl deploy'. This field is auto-
|
|
26
|
+
populated during deployment.
|
|
27
|
+
max_scale (Union[Unset, int]): Maximum number of concurrent agent instances for auto-scaling under load Example:
|
|
28
|
+
10.
|
|
29
|
+
memory (Union[Unset, int]): Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory
|
|
30
|
+
in MB / 2048, e.g., 4096MB = 2 CPUs). Example: 2048.
|
|
31
|
+
min_scale (Union[Unset, int]): Minimum instances to keep warm. Set to 1+ to eliminate cold starts, 0 for scale-
|
|
32
|
+
to-zero.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
envs: Union[Unset, list["Env"]] = UNSET
|
|
36
|
+
generation: Union[Unset, AgentRuntimeGeneration] = UNSET
|
|
37
|
+
image: Union[Unset, str] = UNSET
|
|
38
|
+
max_scale: Union[Unset, int] = UNSET
|
|
39
|
+
memory: Union[Unset, int] = UNSET
|
|
40
|
+
min_scale: Union[Unset, int] = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
envs: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
45
|
+
if not isinstance(self.envs, Unset):
|
|
46
|
+
envs = []
|
|
47
|
+
for envs_item_data in self.envs:
|
|
48
|
+
if type(envs_item_data) is dict:
|
|
49
|
+
envs_item = envs_item_data
|
|
50
|
+
else:
|
|
51
|
+
envs_item = envs_item_data.to_dict()
|
|
52
|
+
envs.append(envs_item)
|
|
53
|
+
|
|
54
|
+
generation: Union[Unset, str] = UNSET
|
|
55
|
+
if not isinstance(self.generation, Unset):
|
|
56
|
+
generation = self.generation.value
|
|
57
|
+
|
|
58
|
+
image = self.image
|
|
59
|
+
|
|
60
|
+
max_scale = self.max_scale
|
|
61
|
+
|
|
62
|
+
memory = self.memory
|
|
63
|
+
|
|
64
|
+
min_scale = self.min_scale
|
|
65
|
+
|
|
66
|
+
field_dict: dict[str, Any] = {}
|
|
67
|
+
field_dict.update(self.additional_properties)
|
|
68
|
+
field_dict.update({})
|
|
69
|
+
if envs is not UNSET:
|
|
70
|
+
field_dict["envs"] = envs
|
|
71
|
+
if generation is not UNSET:
|
|
72
|
+
field_dict["generation"] = generation
|
|
73
|
+
if image is not UNSET:
|
|
74
|
+
field_dict["image"] = image
|
|
75
|
+
if max_scale is not UNSET:
|
|
76
|
+
field_dict["maxScale"] = max_scale
|
|
77
|
+
if memory is not UNSET:
|
|
78
|
+
field_dict["memory"] = memory
|
|
79
|
+
if min_scale is not UNSET:
|
|
80
|
+
field_dict["minScale"] = min_scale
|
|
81
|
+
|
|
82
|
+
return field_dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
86
|
+
from ..models.env import Env
|
|
87
|
+
|
|
88
|
+
if not src_dict:
|
|
89
|
+
return None
|
|
90
|
+
d = src_dict.copy()
|
|
91
|
+
envs = []
|
|
92
|
+
_envs = d.pop("envs", UNSET)
|
|
93
|
+
for envs_item_data in _envs or []:
|
|
94
|
+
envs_item = Env.from_dict(envs_item_data)
|
|
95
|
+
|
|
96
|
+
envs.append(envs_item)
|
|
97
|
+
|
|
98
|
+
_generation = d.pop("generation", UNSET)
|
|
99
|
+
generation: Union[Unset, AgentRuntimeGeneration]
|
|
100
|
+
if isinstance(_generation, Unset):
|
|
101
|
+
generation = UNSET
|
|
102
|
+
else:
|
|
103
|
+
generation = AgentRuntimeGeneration(_generation)
|
|
104
|
+
|
|
105
|
+
image = d.pop("image", UNSET)
|
|
106
|
+
|
|
107
|
+
max_scale = d.pop("maxScale", d.pop("max_scale", UNSET))
|
|
108
|
+
|
|
109
|
+
memory = d.pop("memory", UNSET)
|
|
110
|
+
|
|
111
|
+
min_scale = d.pop("minScale", d.pop("min_scale", UNSET))
|
|
112
|
+
|
|
113
|
+
agent_runtime = cls(
|
|
114
|
+
envs=envs,
|
|
115
|
+
generation=generation,
|
|
116
|
+
image=image,
|
|
117
|
+
max_scale=max_scale,
|
|
118
|
+
memory=memory,
|
|
119
|
+
min_scale=min_scale,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
agent_runtime.additional_properties = d
|
|
123
|
+
return agent_runtime
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def additional_keys(self) -> list[str]:
|
|
127
|
+
return list(self.additional_properties.keys())
|
|
128
|
+
|
|
129
|
+
def __getitem__(self, key: str) -> Any:
|
|
130
|
+
return self.additional_properties[key]
|
|
131
|
+
|
|
132
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
133
|
+
self.additional_properties[key] = value
|
|
134
|
+
|
|
135
|
+
def __delitem__(self, key: str) -> None:
|
|
136
|
+
del self.additional_properties[key]
|
|
137
|
+
|
|
138
|
+
def __contains__(self, key: str) -> bool:
|
|
139
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AgentRuntimeGeneration(str, Enum):
|
|
5
|
+
MK2 = "mk2"
|
|
6
|
+
MK3 = "mk3"
|
|
7
|
+
|
|
8
|
+
def __str__(self) -> str:
|
|
9
|
+
return str(self.value)
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
def _missing_(cls, value: object) -> "AgentRuntimeGeneration | None":
|
|
13
|
+
if isinstance(value, str):
|
|
14
|
+
upper_value = value.upper()
|
|
15
|
+
for member in cls:
|
|
16
|
+
if member.value.upper() == upper_value:
|
|
17
|
+
return member
|
|
18
|
+
return None
|
|
@@ -6,11 +6,9 @@ from attrs import field as _attrs_field
|
|
|
6
6
|
from ..types import UNSET, Unset
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
from ..models.
|
|
10
|
-
from ..models.flavor import Flavor
|
|
9
|
+
from ..models.agent_runtime import AgentRuntime
|
|
11
10
|
from ..models.repository import Repository
|
|
12
11
|
from ..models.revision_configuration import RevisionConfiguration
|
|
13
|
-
from ..models.runtime import Runtime
|
|
14
12
|
from ..models.trigger import Trigger
|
|
15
13
|
|
|
16
14
|
|
|
@@ -19,66 +17,44 @@ T = TypeVar("T", bound="AgentSpec")
|
|
|
19
17
|
|
|
20
18
|
@_attrs_define
|
|
21
19
|
class AgentSpec:
|
|
22
|
-
"""
|
|
20
|
+
"""Configuration for an AI agent including runtime settings, repository source, and deployment triggers
|
|
23
21
|
|
|
24
22
|
Attributes:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
|
28
|
-
integration_connections (Union[Unset, list[str]]):
|
|
23
|
+
enabled (Union[Unset, bool]): When false, the agent is disabled and will not serve inference requests Default:
|
|
24
|
+
True. Example: True.
|
|
29
25
|
policies (Union[Unset, list[str]]):
|
|
30
|
-
revision (Union[Unset, RevisionConfiguration]): Revision configuration
|
|
31
|
-
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
|
32
|
-
sandbox (Union[Unset, bool]): Sandbox mode
|
|
33
|
-
description (Union[Unset, str]): Description, small description computed from the prompt
|
|
34
26
|
repository (Union[Unset, Repository]): Repository
|
|
27
|
+
revision (Union[Unset, RevisionConfiguration]): Revision configuration
|
|
28
|
+
runtime (Union[Unset, AgentRuntime]): Runtime configuration defining how the AI agent is deployed and scaled
|
|
29
|
+
globally
|
|
35
30
|
triggers (Union[Unset, list['Trigger']]): Triggers to use your agent
|
|
36
31
|
"""
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
enabled: Union[Unset, bool] = UNSET
|
|
40
|
-
flavors: Union[Unset, list["Flavor"]] = UNSET
|
|
41
|
-
integration_connections: Union[Unset, list[str]] = UNSET
|
|
33
|
+
enabled: Union[Unset, bool] = True
|
|
42
34
|
policies: Union[Unset, list[str]] = UNSET
|
|
43
|
-
revision: Union[Unset, "RevisionConfiguration"] = UNSET
|
|
44
|
-
runtime: Union[Unset, "Runtime"] = UNSET
|
|
45
|
-
sandbox: Union[Unset, bool] = UNSET
|
|
46
|
-
description: Union[Unset, str] = UNSET
|
|
47
35
|
repository: Union[Unset, "Repository"] = UNSET
|
|
36
|
+
revision: Union[Unset, "RevisionConfiguration"] = UNSET
|
|
37
|
+
runtime: Union[Unset, "AgentRuntime"] = UNSET
|
|
48
38
|
triggers: Union[Unset, list["Trigger"]] = UNSET
|
|
49
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
50
40
|
|
|
51
41
|
def to_dict(self) -> dict[str, Any]:
|
|
52
|
-
configurations: Union[Unset, dict[str, Any]] = UNSET
|
|
53
|
-
if (
|
|
54
|
-
self.configurations
|
|
55
|
-
and not isinstance(self.configurations, Unset)
|
|
56
|
-
and not isinstance(self.configurations, dict)
|
|
57
|
-
):
|
|
58
|
-
configurations = self.configurations.to_dict()
|
|
59
|
-
elif self.configurations and isinstance(self.configurations, dict):
|
|
60
|
-
configurations = self.configurations
|
|
61
|
-
|
|
62
42
|
enabled = self.enabled
|
|
63
43
|
|
|
64
|
-
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
65
|
-
if not isinstance(self.flavors, Unset):
|
|
66
|
-
flavors = []
|
|
67
|
-
for componentsschemas_flavors_item_data in self.flavors:
|
|
68
|
-
if type(componentsschemas_flavors_item_data) is dict:
|
|
69
|
-
componentsschemas_flavors_item = componentsschemas_flavors_item_data
|
|
70
|
-
else:
|
|
71
|
-
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
|
72
|
-
flavors.append(componentsschemas_flavors_item)
|
|
73
|
-
|
|
74
|
-
integration_connections: Union[Unset, list[str]] = UNSET
|
|
75
|
-
if not isinstance(self.integration_connections, Unset):
|
|
76
|
-
integration_connections = self.integration_connections
|
|
77
|
-
|
|
78
44
|
policies: Union[Unset, list[str]] = UNSET
|
|
79
45
|
if not isinstance(self.policies, Unset):
|
|
80
46
|
policies = self.policies
|
|
81
47
|
|
|
48
|
+
repository: Union[Unset, dict[str, Any]] = UNSET
|
|
49
|
+
if (
|
|
50
|
+
self.repository
|
|
51
|
+
and not isinstance(self.repository, Unset)
|
|
52
|
+
and not isinstance(self.repository, dict)
|
|
53
|
+
):
|
|
54
|
+
repository = self.repository.to_dict()
|
|
55
|
+
elif self.repository and isinstance(self.repository, dict):
|
|
56
|
+
repository = self.repository
|
|
57
|
+
|
|
82
58
|
revision: Union[Unset, dict[str, Any]] = UNSET
|
|
83
59
|
if (
|
|
84
60
|
self.revision
|
|
@@ -99,20 +75,6 @@ class AgentSpec:
|
|
|
99
75
|
elif self.runtime and isinstance(self.runtime, dict):
|
|
100
76
|
runtime = self.runtime
|
|
101
77
|
|
|
102
|
-
sandbox = self.sandbox
|
|
103
|
-
|
|
104
|
-
description = self.description
|
|
105
|
-
|
|
106
|
-
repository: Union[Unset, dict[str, Any]] = UNSET
|
|
107
|
-
if (
|
|
108
|
-
self.repository
|
|
109
|
-
and not isinstance(self.repository, Unset)
|
|
110
|
-
and not isinstance(self.repository, dict)
|
|
111
|
-
):
|
|
112
|
-
repository = self.repository.to_dict()
|
|
113
|
-
elif self.repository and isinstance(self.repository, dict):
|
|
114
|
-
repository = self.repository
|
|
115
|
-
|
|
116
78
|
triggers: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
117
79
|
if not isinstance(self.triggers, Unset):
|
|
118
80
|
triggers = []
|
|
@@ -126,26 +88,16 @@ class AgentSpec:
|
|
|
126
88
|
field_dict: dict[str, Any] = {}
|
|
127
89
|
field_dict.update(self.additional_properties)
|
|
128
90
|
field_dict.update({})
|
|
129
|
-
if configurations is not UNSET:
|
|
130
|
-
field_dict["configurations"] = configurations
|
|
131
91
|
if enabled is not UNSET:
|
|
132
92
|
field_dict["enabled"] = enabled
|
|
133
|
-
if flavors is not UNSET:
|
|
134
|
-
field_dict["flavors"] = flavors
|
|
135
|
-
if integration_connections is not UNSET:
|
|
136
|
-
field_dict["integrationConnections"] = integration_connections
|
|
137
93
|
if policies is not UNSET:
|
|
138
94
|
field_dict["policies"] = policies
|
|
95
|
+
if repository is not UNSET:
|
|
96
|
+
field_dict["repository"] = repository
|
|
139
97
|
if revision is not UNSET:
|
|
140
98
|
field_dict["revision"] = revision
|
|
141
99
|
if runtime is not UNSET:
|
|
142
100
|
field_dict["runtime"] = runtime
|
|
143
|
-
if sandbox is not UNSET:
|
|
144
|
-
field_dict["sandbox"] = sandbox
|
|
145
|
-
if description is not UNSET:
|
|
146
|
-
field_dict["description"] = description
|
|
147
|
-
if repository is not UNSET:
|
|
148
|
-
field_dict["repository"] = repository
|
|
149
101
|
if triggers is not UNSET:
|
|
150
102
|
field_dict["triggers"] = triggers
|
|
151
103
|
|
|
@@ -153,38 +105,25 @@ class AgentSpec:
|
|
|
153
105
|
|
|
154
106
|
@classmethod
|
|
155
107
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
156
|
-
from ..models.
|
|
157
|
-
from ..models.flavor import Flavor
|
|
108
|
+
from ..models.agent_runtime import AgentRuntime
|
|
158
109
|
from ..models.repository import Repository
|
|
159
110
|
from ..models.revision_configuration import RevisionConfiguration
|
|
160
|
-
from ..models.runtime import Runtime
|
|
161
111
|
from ..models.trigger import Trigger
|
|
162
112
|
|
|
163
113
|
if not src_dict:
|
|
164
114
|
return None
|
|
165
115
|
d = src_dict.copy()
|
|
166
|
-
_configurations = d.pop("configurations", UNSET)
|
|
167
|
-
configurations: Union[Unset, CoreSpecConfigurations]
|
|
168
|
-
if isinstance(_configurations, Unset):
|
|
169
|
-
configurations = UNSET
|
|
170
|
-
else:
|
|
171
|
-
configurations = CoreSpecConfigurations.from_dict(_configurations)
|
|
172
|
-
|
|
173
116
|
enabled = d.pop("enabled", UNSET)
|
|
174
117
|
|
|
175
|
-
flavors = []
|
|
176
|
-
_flavors = d.pop("flavors", UNSET)
|
|
177
|
-
for componentsschemas_flavors_item_data in _flavors or []:
|
|
178
|
-
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
|
179
|
-
|
|
180
|
-
flavors.append(componentsschemas_flavors_item)
|
|
181
|
-
|
|
182
|
-
integration_connections = cast(
|
|
183
|
-
list[str], d.pop("integrationConnections", d.pop("integration_connections", UNSET))
|
|
184
|
-
)
|
|
185
|
-
|
|
186
118
|
policies = cast(list[str], d.pop("policies", UNSET))
|
|
187
119
|
|
|
120
|
+
_repository = d.pop("repository", UNSET)
|
|
121
|
+
repository: Union[Unset, Repository]
|
|
122
|
+
if isinstance(_repository, Unset):
|
|
123
|
+
repository = UNSET
|
|
124
|
+
else:
|
|
125
|
+
repository = Repository.from_dict(_repository)
|
|
126
|
+
|
|
188
127
|
_revision = d.pop("revision", UNSET)
|
|
189
128
|
revision: Union[Unset, RevisionConfiguration]
|
|
190
129
|
if isinstance(_revision, Unset):
|
|
@@ -193,22 +132,11 @@ class AgentSpec:
|
|
|
193
132
|
revision = RevisionConfiguration.from_dict(_revision)
|
|
194
133
|
|
|
195
134
|
_runtime = d.pop("runtime", UNSET)
|
|
196
|
-
runtime: Union[Unset,
|
|
135
|
+
runtime: Union[Unset, AgentRuntime]
|
|
197
136
|
if isinstance(_runtime, Unset):
|
|
198
137
|
runtime = UNSET
|
|
199
138
|
else:
|
|
200
|
-
runtime =
|
|
201
|
-
|
|
202
|
-
sandbox = d.pop("sandbox", UNSET)
|
|
203
|
-
|
|
204
|
-
description = d.pop("description", UNSET)
|
|
205
|
-
|
|
206
|
-
_repository = d.pop("repository", UNSET)
|
|
207
|
-
repository: Union[Unset, Repository]
|
|
208
|
-
if isinstance(_repository, Unset):
|
|
209
|
-
repository = UNSET
|
|
210
|
-
else:
|
|
211
|
-
repository = Repository.from_dict(_repository)
|
|
139
|
+
runtime = AgentRuntime.from_dict(_runtime)
|
|
212
140
|
|
|
213
141
|
triggers = []
|
|
214
142
|
_triggers = d.pop("triggers", UNSET)
|
|
@@ -220,16 +148,11 @@ class AgentSpec:
|
|
|
220
148
|
triggers.append(componentsschemas_triggers_item)
|
|
221
149
|
|
|
222
150
|
agent_spec = cls(
|
|
223
|
-
configurations=configurations,
|
|
224
151
|
enabled=enabled,
|
|
225
|
-
flavors=flavors,
|
|
226
|
-
integration_connections=integration_connections,
|
|
227
152
|
policies=policies,
|
|
153
|
+
repository=repository,
|
|
228
154
|
revision=revision,
|
|
229
155
|
runtime=runtime,
|
|
230
|
-
sandbox=sandbox,
|
|
231
|
-
description=description,
|
|
232
|
-
repository=repository,
|
|
233
156
|
triggers=triggers,
|
|
234
157
|
)
|
|
235
158
|
|
|
@@ -18,11 +18,12 @@ class ApiKey:
|
|
|
18
18
|
created_by (Union[Unset, str]): The user or service account who created the resource
|
|
19
19
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
|
20
20
|
api_key (Union[Unset, str]): Api key
|
|
21
|
-
expires_in (Union[Unset, str]): Duration until expiration (
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
expires_in (Union[Unset, str]): Duration until expiration. Supports formats like '30d' (30 days), '24h' (24
|
|
22
|
+
hours), '1w' (1 week). If not set, the API key never expires. Example: 30d.
|
|
23
|
+
id (Union[Unset, str]): Api key id, to retrieve it from the API Example: ak_abc123def456.
|
|
24
|
+
name (Union[Unset, str]): Name for the API key Example: CI/CD Pipeline Key.
|
|
24
25
|
sub (Union[Unset, str]): User subject identifier
|
|
25
|
-
sub_type (Union[Unset, str]): Subject type
|
|
26
|
+
sub_type (Union[Unset, str]): Subject type (user or service_account) Example: user.
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
29
|
created_at: Union[Unset, str] = UNSET
|
|
@@ -14,11 +14,11 @@ class CoreEvent:
|
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
16
|
canary_revision (Union[Unset, str]): Canary revisionID link to the event
|
|
17
|
-
message (Union[Unset, str]): Event message
|
|
18
|
-
revision (Union[Unset, str]): RevisionID link to the event
|
|
19
|
-
status (Union[Unset, str]): Event status
|
|
20
|
-
time (Union[Unset, str]): Event time
|
|
21
|
-
type_ (Union[Unset, str]): Event type
|
|
17
|
+
message (Union[Unset, str]): Event message Example: Deployment successful.
|
|
18
|
+
revision (Union[Unset, str]): RevisionID link to the event Example: rev-abc123.
|
|
19
|
+
status (Union[Unset, str]): Event status Example: DEPLOYED.
|
|
20
|
+
time (Union[Unset, str]): Event time Example: 2025-01-15T10:30:00Z.
|
|
21
|
+
type_ (Union[Unset, str]): Event type Example: deployment.
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
24
|
canary_revision: Union[Unset, str] = UNSET
|
|
@@ -12,7 +12,8 @@ T = TypeVar("T", bound="CreateApiKeyForServiceAccountBody")
|
|
|
12
12
|
class CreateApiKeyForServiceAccountBody:
|
|
13
13
|
"""
|
|
14
14
|
Attributes:
|
|
15
|
-
expires_in (Union[Unset, str]): Expiration period for the API key
|
|
15
|
+
expires_in (Union[Unset, str]): Expiration period for the API key. Supports formats like '30d' (30 days), '24h'
|
|
16
|
+
(24 hours), '1w' (1 week). If not set, the API key never expires.
|
|
16
17
|
name (Union[Unset, str]): Name for the API key
|
|
17
18
|
"""
|
|
18
19
|
|
|
@@ -19,7 +19,7 @@ class CreateJobExecutionRequest:
|
|
|
19
19
|
Attributes:
|
|
20
20
|
execution_id (Union[Unset, str]): Execution ID (optional, will be generated if not provided)
|
|
21
21
|
id (Union[Unset, str]): Unique message ID
|
|
22
|
-
job_id (Union[Unset, str]): Job ID
|
|
22
|
+
job_id (Union[Unset, str]): Job ID Example: data-processing-job.
|
|
23
23
|
tasks (Union[Unset, list['CreateJobExecutionRequestTasksItem']]): Array of task parameters for parallel
|
|
24
24
|
execution
|
|
25
25
|
workspace_id (Union[Unset, str]): Workspace ID
|
|
@@ -16,15 +16,19 @@ T = TypeVar("T", bound="CreateJobExecutionResponse")
|
|
|
16
16
|
|
|
17
17
|
@_attrs_define
|
|
18
18
|
class CreateJobExecutionResponse:
|
|
19
|
-
"""Response
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
"""Response returned when a job execution is successfully created. Contains identifiers and the tasks that will be
|
|
20
|
+
executed.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
execution_id (Union[Unset, str]): Unique identifier for the created execution. Use this ID to track execution
|
|
24
|
+
status, retrieve logs, or cancel the execution. Example: exec-abc123.
|
|
25
|
+
id (Union[Unset, str]): Unique identifier for this request, used for idempotency and tracking. Auto-generated if
|
|
26
|
+
not provided in the request. Example: 550e8400-e29b-41d4-a716-446655440000.
|
|
27
|
+
job_id (Union[Unset, str]): Name of the job that this execution belongs to Example: data-processing-job.
|
|
28
|
+
tasks (Union[Unset, list['CreateJobExecutionResponseTasksItem']]): Array of task configurations that will be
|
|
29
|
+
executed in parallel according to the job's concurrency settings. Each task can have custom parameters.
|
|
30
|
+
workspace_id (Union[Unset, str]): Name of the workspace where the job execution was created Example: my-
|
|
31
|
+
workspace.
|
|
28
32
|
"""
|
|
29
33
|
|
|
30
34
|
execution_id: Union[Unset, str] = UNSET
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
2
2
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
6
|
if TYPE_CHECKING:
|
|
9
7
|
from ..models.custom_domain_metadata import CustomDomainMetadata
|
|
10
8
|
from ..models.custom_domain_spec import CustomDomainSpec
|
|
@@ -21,38 +19,33 @@ class CustomDomain:
|
|
|
21
19
|
<preview-id>.preview.<base-domain> (e.g., abc123.preview.example.com)
|
|
22
20
|
|
|
23
21
|
Attributes:
|
|
24
|
-
metadata (
|
|
25
|
-
spec (
|
|
22
|
+
metadata (CustomDomainMetadata): Custom domain metadata
|
|
23
|
+
spec (CustomDomainSpec): Custom domain specification
|
|
26
24
|
"""
|
|
27
25
|
|
|
28
|
-
metadata:
|
|
29
|
-
spec:
|
|
26
|
+
metadata: "CustomDomainMetadata"
|
|
27
|
+
spec: "CustomDomainSpec"
|
|
30
28
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
29
|
|
|
32
30
|
def to_dict(self) -> dict[str, Any]:
|
|
33
|
-
metadata
|
|
34
|
-
if (
|
|
35
|
-
self.metadata
|
|
36
|
-
and not isinstance(self.metadata, Unset)
|
|
37
|
-
and not isinstance(self.metadata, dict)
|
|
38
|
-
):
|
|
39
|
-
metadata = self.metadata.to_dict()
|
|
40
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
31
|
+
if type(self.metadata) is dict:
|
|
41
32
|
metadata = self.metadata
|
|
33
|
+
else:
|
|
34
|
+
metadata = self.metadata.to_dict()
|
|
42
35
|
|
|
43
|
-
spec
|
|
44
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
45
|
-
spec = self.spec.to_dict()
|
|
46
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
36
|
+
if type(self.spec) is dict:
|
|
47
37
|
spec = self.spec
|
|
38
|
+
else:
|
|
39
|
+
spec = self.spec.to_dict()
|
|
48
40
|
|
|
49
41
|
field_dict: dict[str, Any] = {}
|
|
50
42
|
field_dict.update(self.additional_properties)
|
|
51
|
-
field_dict.update(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"metadata": metadata,
|
|
46
|
+
"spec": spec,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
56
49
|
|
|
57
50
|
return field_dict
|
|
58
51
|
|
|
@@ -64,19 +57,9 @@ class CustomDomain:
|
|
|
64
57
|
if not src_dict:
|
|
65
58
|
return None
|
|
66
59
|
d = src_dict.copy()
|
|
67
|
-
|
|
68
|
-
metadata: Union[Unset, CustomDomainMetadata]
|
|
69
|
-
if isinstance(_metadata, Unset):
|
|
70
|
-
metadata = UNSET
|
|
71
|
-
else:
|
|
72
|
-
metadata = CustomDomainMetadata.from_dict(_metadata)
|
|
60
|
+
metadata = CustomDomainMetadata.from_dict(d.pop("metadata"))
|
|
73
61
|
|
|
74
|
-
|
|
75
|
-
spec: Union[Unset, CustomDomainSpec]
|
|
76
|
-
if isinstance(_spec, Unset):
|
|
77
|
-
spec = UNSET
|
|
78
|
-
else:
|
|
79
|
-
spec = CustomDomainSpec.from_dict(_spec)
|
|
62
|
+
spec = CustomDomainSpec.from_dict(d.pop("spec"))
|
|
80
63
|
|
|
81
64
|
custom_domain = cls(
|
|
82
65
|
metadata=metadata,
|
|
@@ -21,9 +21,10 @@ class CustomDomainMetadata:
|
|
|
21
21
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
|
22
22
|
created_by (Union[Unset, str]): The user or service account who created the resource
|
|
23
23
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
|
24
|
-
display_name (Union[Unset, str]): Display name for the custom domain
|
|
25
|
-
labels (Union[Unset, MetadataLabels]): Labels
|
|
26
|
-
|
|
24
|
+
display_name (Union[Unset, str]): Display name for the custom domain Example: Preview Domain.
|
|
25
|
+
labels (Union[Unset, MetadataLabels]): Key-value pairs for organizing and filtering resources. Labels can be
|
|
26
|
+
used to categorize resources by environment, project, team, or any custom taxonomy.
|
|
27
|
+
name (Union[Unset, str]): Domain name (e.g., "example.com") Example: preview.example.com.
|
|
27
28
|
workspace (Union[Unset, str]): Workspace name
|
|
28
29
|
"""
|
|
29
30
|
|
|
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.custom_domain_spec_status import CustomDomainSpecStatus
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
@@ -19,8 +20,9 @@ class CustomDomainSpec:
|
|
|
19
20
|
Attributes:
|
|
20
21
|
cname_records (Union[Unset, str]): CNAME target for the domain
|
|
21
22
|
last_verified_at (Union[Unset, str]): Last verification attempt timestamp
|
|
22
|
-
region (Union[Unset, str]): Region that the custom domain is associated with
|
|
23
|
-
status (Union[Unset,
|
|
23
|
+
region (Union[Unset, str]): Region that the custom domain is associated with Example: us-pdx-1.
|
|
24
|
+
status (Union[Unset, CustomDomainSpecStatus]): Current status of the domain (pending, verified, failed) Example:
|
|
25
|
+
verified.
|
|
24
26
|
txt_records (Union[Unset, CustomDomainSpecTxtRecords]): Map of TXT record names to values for domain
|
|
25
27
|
verification
|
|
26
28
|
verification_error (Union[Unset, str]): Error message if verification failed
|
|
@@ -29,7 +31,7 @@ class CustomDomainSpec:
|
|
|
29
31
|
cname_records: Union[Unset, str] = UNSET
|
|
30
32
|
last_verified_at: Union[Unset, str] = UNSET
|
|
31
33
|
region: Union[Unset, str] = UNSET
|
|
32
|
-
status: Union[Unset,
|
|
34
|
+
status: Union[Unset, CustomDomainSpecStatus] = UNSET
|
|
33
35
|
txt_records: Union[Unset, "CustomDomainSpecTxtRecords"] = UNSET
|
|
34
36
|
verification_error: Union[Unset, str] = UNSET
|
|
35
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -41,7 +43,9 @@ class CustomDomainSpec:
|
|
|
41
43
|
|
|
42
44
|
region = self.region
|
|
43
45
|
|
|
44
|
-
status =
|
|
46
|
+
status: Union[Unset, str] = UNSET
|
|
47
|
+
if not isinstance(self.status, Unset):
|
|
48
|
+
status = self.status.value
|
|
45
49
|
|
|
46
50
|
txt_records: Union[Unset, dict[str, Any]] = UNSET
|
|
47
51
|
if (
|
|
@@ -86,7 +90,12 @@ class CustomDomainSpec:
|
|
|
86
90
|
|
|
87
91
|
region = d.pop("region", UNSET)
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
_status = d.pop("status", UNSET)
|
|
94
|
+
status: Union[Unset, CustomDomainSpecStatus]
|
|
95
|
+
if isinstance(_status, Unset):
|
|
96
|
+
status = UNSET
|
|
97
|
+
else:
|
|
98
|
+
status = CustomDomainSpecStatus(_status)
|
|
90
99
|
|
|
91
100
|
_txt_records = d.pop("txtRecords", d.pop("txt_records", UNSET))
|
|
92
101
|
txt_records: Union[Unset, CustomDomainSpecTxtRecords]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class CustomDomainSpecStatus(str, Enum):
|
|
5
|
+
FAILED = "failed"
|
|
6
|
+
PENDING = "pending"
|
|
7
|
+
VERIFIED = "verified"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def _missing_(cls, value: object) -> "CustomDomainSpecStatus | None":
|
|
14
|
+
if isinstance(value, str):
|
|
15
|
+
upper_value = value.upper()
|
|
16
|
+
for member in cls:
|
|
17
|
+
if member.value.upper() == upper_value:
|
|
18
|
+
return member
|
|
19
|
+
return None
|