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
|
@@ -1,162 +0,0 @@
|
|
|
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="IntegrationModel")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class IntegrationModel:
|
|
13
|
-
"""Model obtained from an external authentication provider, such as HuggingFace, OpenAI, etc...
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
author (Union[Unset, str]): Provider model author
|
|
17
|
-
created_at (Union[Unset, str]): Provider model created at
|
|
18
|
-
downloads (Union[Unset, int]): Provider model downloads
|
|
19
|
-
endpoint (Union[Unset, str]): Model endpoint URL
|
|
20
|
-
id (Union[Unset, str]): Provider model ID
|
|
21
|
-
library_name (Union[Unset, str]): Provider model library name
|
|
22
|
-
likes (Union[Unset, int]): Provider model likes
|
|
23
|
-
model_private (Union[Unset, str]): Is the model private
|
|
24
|
-
name (Union[Unset, str]): Provider model name
|
|
25
|
-
pipeline_tag (Union[Unset, str]): Provider model pipeline tag
|
|
26
|
-
tags (Union[Unset, list[str]]): Provider model tags
|
|
27
|
-
trending_score (Union[Unset, int]): Provider model trending score
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
author: Union[Unset, str] = UNSET
|
|
31
|
-
created_at: Union[Unset, str] = UNSET
|
|
32
|
-
downloads: Union[Unset, int] = UNSET
|
|
33
|
-
endpoint: Union[Unset, str] = UNSET
|
|
34
|
-
id: Union[Unset, str] = UNSET
|
|
35
|
-
library_name: Union[Unset, str] = UNSET
|
|
36
|
-
likes: Union[Unset, int] = UNSET
|
|
37
|
-
model_private: Union[Unset, str] = UNSET
|
|
38
|
-
name: Union[Unset, str] = UNSET
|
|
39
|
-
pipeline_tag: Union[Unset, str] = UNSET
|
|
40
|
-
tags: Union[Unset, list[str]] = UNSET
|
|
41
|
-
trending_score: Union[Unset, int] = UNSET
|
|
42
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
|
-
|
|
44
|
-
def to_dict(self) -> dict[str, Any]:
|
|
45
|
-
author = self.author
|
|
46
|
-
|
|
47
|
-
created_at = self.created_at
|
|
48
|
-
|
|
49
|
-
downloads = self.downloads
|
|
50
|
-
|
|
51
|
-
endpoint = self.endpoint
|
|
52
|
-
|
|
53
|
-
id = self.id
|
|
54
|
-
|
|
55
|
-
library_name = self.library_name
|
|
56
|
-
|
|
57
|
-
likes = self.likes
|
|
58
|
-
|
|
59
|
-
model_private = self.model_private
|
|
60
|
-
|
|
61
|
-
name = self.name
|
|
62
|
-
|
|
63
|
-
pipeline_tag = self.pipeline_tag
|
|
64
|
-
|
|
65
|
-
tags: Union[Unset, list[str]] = UNSET
|
|
66
|
-
if not isinstance(self.tags, Unset):
|
|
67
|
-
tags = self.tags
|
|
68
|
-
|
|
69
|
-
trending_score = self.trending_score
|
|
70
|
-
|
|
71
|
-
field_dict: dict[str, Any] = {}
|
|
72
|
-
field_dict.update(self.additional_properties)
|
|
73
|
-
field_dict.update({})
|
|
74
|
-
if author is not UNSET:
|
|
75
|
-
field_dict["author"] = author
|
|
76
|
-
if created_at is not UNSET:
|
|
77
|
-
field_dict["created_at"] = created_at
|
|
78
|
-
if downloads is not UNSET:
|
|
79
|
-
field_dict["downloads"] = downloads
|
|
80
|
-
if endpoint is not UNSET:
|
|
81
|
-
field_dict["endpoint"] = endpoint
|
|
82
|
-
if id is not UNSET:
|
|
83
|
-
field_dict["id"] = id
|
|
84
|
-
if library_name is not UNSET:
|
|
85
|
-
field_dict["library_name"] = library_name
|
|
86
|
-
if likes is not UNSET:
|
|
87
|
-
field_dict["likes"] = likes
|
|
88
|
-
if model_private is not UNSET:
|
|
89
|
-
field_dict["model_private"] = model_private
|
|
90
|
-
if name is not UNSET:
|
|
91
|
-
field_dict["name"] = name
|
|
92
|
-
if pipeline_tag is not UNSET:
|
|
93
|
-
field_dict["pipeline_tag"] = pipeline_tag
|
|
94
|
-
if tags is not UNSET:
|
|
95
|
-
field_dict["tags"] = tags
|
|
96
|
-
if trending_score is not UNSET:
|
|
97
|
-
field_dict["trending_score"] = trending_score
|
|
98
|
-
|
|
99
|
-
return field_dict
|
|
100
|
-
|
|
101
|
-
@classmethod
|
|
102
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
103
|
-
if not src_dict:
|
|
104
|
-
return None
|
|
105
|
-
d = src_dict.copy()
|
|
106
|
-
author = d.pop("author", UNSET)
|
|
107
|
-
|
|
108
|
-
created_at = d.pop("created_at", UNSET)
|
|
109
|
-
|
|
110
|
-
downloads = d.pop("downloads", UNSET)
|
|
111
|
-
|
|
112
|
-
endpoint = d.pop("endpoint", UNSET)
|
|
113
|
-
|
|
114
|
-
id = d.pop("id", UNSET)
|
|
115
|
-
|
|
116
|
-
library_name = d.pop("library_name", UNSET)
|
|
117
|
-
|
|
118
|
-
likes = d.pop("likes", UNSET)
|
|
119
|
-
|
|
120
|
-
model_private = d.pop("model_private", UNSET)
|
|
121
|
-
|
|
122
|
-
name = d.pop("name", UNSET)
|
|
123
|
-
|
|
124
|
-
pipeline_tag = d.pop("pipeline_tag", UNSET)
|
|
125
|
-
|
|
126
|
-
tags = cast(list[str], d.pop("tags", UNSET))
|
|
127
|
-
|
|
128
|
-
trending_score = d.pop("trending_score", UNSET)
|
|
129
|
-
|
|
130
|
-
integration_model = cls(
|
|
131
|
-
author=author,
|
|
132
|
-
created_at=created_at,
|
|
133
|
-
downloads=downloads,
|
|
134
|
-
endpoint=endpoint,
|
|
135
|
-
id=id,
|
|
136
|
-
library_name=library_name,
|
|
137
|
-
likes=likes,
|
|
138
|
-
model_private=model_private,
|
|
139
|
-
name=name,
|
|
140
|
-
pipeline_tag=pipeline_tag,
|
|
141
|
-
tags=tags,
|
|
142
|
-
trending_score=trending_score,
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
integration_model.additional_properties = d
|
|
146
|
-
return integration_model
|
|
147
|
-
|
|
148
|
-
@property
|
|
149
|
-
def additional_keys(self) -> list[str]:
|
|
150
|
-
return list(self.additional_properties.keys())
|
|
151
|
-
|
|
152
|
-
def __getitem__(self, key: str) -> Any:
|
|
153
|
-
return self.additional_properties[key]
|
|
154
|
-
|
|
155
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
156
|
-
self.additional_properties[key] = value
|
|
157
|
-
|
|
158
|
-
def __delitem__(self, key: str) -> None:
|
|
159
|
-
del self.additional_properties[key]
|
|
160
|
-
|
|
161
|
-
def __contains__(self, key: str) -> bool:
|
|
162
|
-
return key in self.additional_properties
|
|
@@ -1,79 +0,0 @@
|
|
|
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="JobExecutionConfig")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class JobExecutionConfig:
|
|
13
|
-
"""Configuration for a job execution
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
max_concurrent_tasks (Union[Unset, int]): The maximum number of concurrent tasks for an execution
|
|
17
|
-
max_retries (Union[Unset, int]): The maximum number of retries for the job execution
|
|
18
|
-
timeout (Union[Unset, int]): The timeout for the job execution in seconds
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
max_concurrent_tasks: Union[Unset, int] = UNSET
|
|
22
|
-
max_retries: Union[Unset, int] = UNSET
|
|
23
|
-
timeout: Union[Unset, int] = UNSET
|
|
24
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
-
|
|
26
|
-
def to_dict(self) -> dict[str, Any]:
|
|
27
|
-
max_concurrent_tasks = self.max_concurrent_tasks
|
|
28
|
-
|
|
29
|
-
max_retries = self.max_retries
|
|
30
|
-
|
|
31
|
-
timeout = self.timeout
|
|
32
|
-
|
|
33
|
-
field_dict: dict[str, Any] = {}
|
|
34
|
-
field_dict.update(self.additional_properties)
|
|
35
|
-
field_dict.update({})
|
|
36
|
-
if max_concurrent_tasks is not UNSET:
|
|
37
|
-
field_dict["maxConcurrentTasks"] = max_concurrent_tasks
|
|
38
|
-
if max_retries is not UNSET:
|
|
39
|
-
field_dict["maxRetries"] = max_retries
|
|
40
|
-
if timeout is not UNSET:
|
|
41
|
-
field_dict["timeout"] = timeout
|
|
42
|
-
|
|
43
|
-
return field_dict
|
|
44
|
-
|
|
45
|
-
@classmethod
|
|
46
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
47
|
-
if not src_dict:
|
|
48
|
-
return None
|
|
49
|
-
d = src_dict.copy()
|
|
50
|
-
max_concurrent_tasks = d.pop("maxConcurrentTasks", d.pop("max_concurrent_tasks", UNSET))
|
|
51
|
-
|
|
52
|
-
max_retries = d.pop("maxRetries", d.pop("max_retries", UNSET))
|
|
53
|
-
|
|
54
|
-
timeout = d.pop("timeout", UNSET)
|
|
55
|
-
|
|
56
|
-
job_execution_config = cls(
|
|
57
|
-
max_concurrent_tasks=max_concurrent_tasks,
|
|
58
|
-
max_retries=max_retries,
|
|
59
|
-
timeout=timeout,
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
job_execution_config.additional_properties = d
|
|
63
|
-
return job_execution_config
|
|
64
|
-
|
|
65
|
-
@property
|
|
66
|
-
def additional_keys(self) -> list[str]:
|
|
67
|
-
return list(self.additional_properties.keys())
|
|
68
|
-
|
|
69
|
-
def __getitem__(self, key: str) -> Any:
|
|
70
|
-
return self.additional_properties[key]
|
|
71
|
-
|
|
72
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
73
|
-
self.additional_properties[key] = value
|
|
74
|
-
|
|
75
|
-
def __delitem__(self, key: str) -> None:
|
|
76
|
-
del self.additional_properties[key]
|
|
77
|
-
|
|
78
|
-
def __contains__(self, key: str) -> bool:
|
|
79
|
-
return key in self.additional_properties
|
|
@@ -1,262 +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.job_metrics_executions_total import JobMetricsExecutionsTotal
|
|
10
|
-
from ..models.job_metrics_tasks_total import JobMetricsTasksTotal
|
|
11
|
-
from ..models.jobs_chart_value import JobsChartValue
|
|
12
|
-
from ..models.jobs_success_failed_chart import JobsSuccessFailedChart
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
T = TypeVar("T", bound="JobMetrics")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@_attrs_define
|
|
19
|
-
class JobMetrics:
|
|
20
|
-
"""Metrics for job
|
|
21
|
-
|
|
22
|
-
Attributes:
|
|
23
|
-
billable_time (Union[Unset, list['JobsChartValue']]): Billable time
|
|
24
|
-
cpu_usage (Union[Unset, list['JobsChartValue']]): CPU usage
|
|
25
|
-
executions_chart (Union[Unset, list['JobsSuccessFailedChart']]): Executions chart
|
|
26
|
-
executions_running (Union[Unset, list['JobsChartValue']]): Executions running
|
|
27
|
-
executions_total (Union[Unset, JobMetricsExecutionsTotal]): Total executions
|
|
28
|
-
ram_usage (Union[Unset, list['JobsChartValue']]): RAM usage
|
|
29
|
-
tasks_chart (Union[Unset, list['JobsSuccessFailedChart']]): Tasks chart
|
|
30
|
-
tasks_running (Union[Unset, list['JobsChartValue']]): Tasks running
|
|
31
|
-
tasks_total (Union[Unset, JobMetricsTasksTotal]): Total tasks
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
billable_time: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
35
|
-
cpu_usage: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
36
|
-
executions_chart: Union[Unset, list["JobsSuccessFailedChart"]] = UNSET
|
|
37
|
-
executions_running: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
38
|
-
executions_total: Union[Unset, "JobMetricsExecutionsTotal"] = UNSET
|
|
39
|
-
ram_usage: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
40
|
-
tasks_chart: Union[Unset, list["JobsSuccessFailedChart"]] = UNSET
|
|
41
|
-
tasks_running: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
42
|
-
tasks_total: Union[Unset, "JobMetricsTasksTotal"] = UNSET
|
|
43
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
44
|
-
|
|
45
|
-
def to_dict(self) -> dict[str, Any]:
|
|
46
|
-
billable_time: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
47
|
-
if not isinstance(self.billable_time, Unset):
|
|
48
|
-
billable_time = []
|
|
49
|
-
for billable_time_item_data in self.billable_time:
|
|
50
|
-
if type(billable_time_item_data) is dict:
|
|
51
|
-
billable_time_item = billable_time_item_data
|
|
52
|
-
else:
|
|
53
|
-
billable_time_item = billable_time_item_data.to_dict()
|
|
54
|
-
billable_time.append(billable_time_item)
|
|
55
|
-
|
|
56
|
-
cpu_usage: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
57
|
-
if not isinstance(self.cpu_usage, Unset):
|
|
58
|
-
cpu_usage = []
|
|
59
|
-
for cpu_usage_item_data in self.cpu_usage:
|
|
60
|
-
if type(cpu_usage_item_data) is dict:
|
|
61
|
-
cpu_usage_item = cpu_usage_item_data
|
|
62
|
-
else:
|
|
63
|
-
cpu_usage_item = cpu_usage_item_data.to_dict()
|
|
64
|
-
cpu_usage.append(cpu_usage_item)
|
|
65
|
-
|
|
66
|
-
executions_chart: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
67
|
-
if not isinstance(self.executions_chart, Unset):
|
|
68
|
-
executions_chart = []
|
|
69
|
-
for executions_chart_item_data in self.executions_chart:
|
|
70
|
-
if type(executions_chart_item_data) is dict:
|
|
71
|
-
executions_chart_item = executions_chart_item_data
|
|
72
|
-
else:
|
|
73
|
-
executions_chart_item = executions_chart_item_data.to_dict()
|
|
74
|
-
executions_chart.append(executions_chart_item)
|
|
75
|
-
|
|
76
|
-
executions_running: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
77
|
-
if not isinstance(self.executions_running, Unset):
|
|
78
|
-
executions_running = []
|
|
79
|
-
for executions_running_item_data in self.executions_running:
|
|
80
|
-
if type(executions_running_item_data) is dict:
|
|
81
|
-
executions_running_item = executions_running_item_data
|
|
82
|
-
else:
|
|
83
|
-
executions_running_item = executions_running_item_data.to_dict()
|
|
84
|
-
executions_running.append(executions_running_item)
|
|
85
|
-
|
|
86
|
-
executions_total: Union[Unset, dict[str, Any]] = UNSET
|
|
87
|
-
if (
|
|
88
|
-
self.executions_total
|
|
89
|
-
and not isinstance(self.executions_total, Unset)
|
|
90
|
-
and not isinstance(self.executions_total, dict)
|
|
91
|
-
):
|
|
92
|
-
executions_total = self.executions_total.to_dict()
|
|
93
|
-
elif self.executions_total and isinstance(self.executions_total, dict):
|
|
94
|
-
executions_total = self.executions_total
|
|
95
|
-
|
|
96
|
-
ram_usage: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
97
|
-
if not isinstance(self.ram_usage, Unset):
|
|
98
|
-
ram_usage = []
|
|
99
|
-
for ram_usage_item_data in self.ram_usage:
|
|
100
|
-
if type(ram_usage_item_data) is dict:
|
|
101
|
-
ram_usage_item = ram_usage_item_data
|
|
102
|
-
else:
|
|
103
|
-
ram_usage_item = ram_usage_item_data.to_dict()
|
|
104
|
-
ram_usage.append(ram_usage_item)
|
|
105
|
-
|
|
106
|
-
tasks_chart: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
107
|
-
if not isinstance(self.tasks_chart, Unset):
|
|
108
|
-
tasks_chart = []
|
|
109
|
-
for tasks_chart_item_data in self.tasks_chart:
|
|
110
|
-
if type(tasks_chart_item_data) is dict:
|
|
111
|
-
tasks_chart_item = tasks_chart_item_data
|
|
112
|
-
else:
|
|
113
|
-
tasks_chart_item = tasks_chart_item_data.to_dict()
|
|
114
|
-
tasks_chart.append(tasks_chart_item)
|
|
115
|
-
|
|
116
|
-
tasks_running: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
117
|
-
if not isinstance(self.tasks_running, Unset):
|
|
118
|
-
tasks_running = []
|
|
119
|
-
for tasks_running_item_data in self.tasks_running:
|
|
120
|
-
if type(tasks_running_item_data) is dict:
|
|
121
|
-
tasks_running_item = tasks_running_item_data
|
|
122
|
-
else:
|
|
123
|
-
tasks_running_item = tasks_running_item_data.to_dict()
|
|
124
|
-
tasks_running.append(tasks_running_item)
|
|
125
|
-
|
|
126
|
-
tasks_total: Union[Unset, dict[str, Any]] = UNSET
|
|
127
|
-
if (
|
|
128
|
-
self.tasks_total
|
|
129
|
-
and not isinstance(self.tasks_total, Unset)
|
|
130
|
-
and not isinstance(self.tasks_total, dict)
|
|
131
|
-
):
|
|
132
|
-
tasks_total = self.tasks_total.to_dict()
|
|
133
|
-
elif self.tasks_total and isinstance(self.tasks_total, dict):
|
|
134
|
-
tasks_total = self.tasks_total
|
|
135
|
-
|
|
136
|
-
field_dict: dict[str, Any] = {}
|
|
137
|
-
field_dict.update(self.additional_properties)
|
|
138
|
-
field_dict.update({})
|
|
139
|
-
if billable_time is not UNSET:
|
|
140
|
-
field_dict["billableTime"] = billable_time
|
|
141
|
-
if cpu_usage is not UNSET:
|
|
142
|
-
field_dict["cpuUsage"] = cpu_usage
|
|
143
|
-
if executions_chart is not UNSET:
|
|
144
|
-
field_dict["executionsChart"] = executions_chart
|
|
145
|
-
if executions_running is not UNSET:
|
|
146
|
-
field_dict["executionsRunning"] = executions_running
|
|
147
|
-
if executions_total is not UNSET:
|
|
148
|
-
field_dict["executionsTotal"] = executions_total
|
|
149
|
-
if ram_usage is not UNSET:
|
|
150
|
-
field_dict["ramUsage"] = ram_usage
|
|
151
|
-
if tasks_chart is not UNSET:
|
|
152
|
-
field_dict["tasksChart"] = tasks_chart
|
|
153
|
-
if tasks_running is not UNSET:
|
|
154
|
-
field_dict["tasksRunning"] = tasks_running
|
|
155
|
-
if tasks_total is not UNSET:
|
|
156
|
-
field_dict["tasksTotal"] = tasks_total
|
|
157
|
-
|
|
158
|
-
return field_dict
|
|
159
|
-
|
|
160
|
-
@classmethod
|
|
161
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
162
|
-
from ..models.job_metrics_executions_total import JobMetricsExecutionsTotal
|
|
163
|
-
from ..models.job_metrics_tasks_total import JobMetricsTasksTotal
|
|
164
|
-
from ..models.jobs_chart_value import JobsChartValue
|
|
165
|
-
from ..models.jobs_success_failed_chart import JobsSuccessFailedChart
|
|
166
|
-
|
|
167
|
-
if not src_dict:
|
|
168
|
-
return None
|
|
169
|
-
d = src_dict.copy()
|
|
170
|
-
billable_time = []
|
|
171
|
-
_billable_time = d.pop("billableTime", d.pop("billable_time", UNSET))
|
|
172
|
-
for billable_time_item_data in _billable_time or []:
|
|
173
|
-
billable_time_item = JobsChartValue.from_dict(billable_time_item_data)
|
|
174
|
-
|
|
175
|
-
billable_time.append(billable_time_item)
|
|
176
|
-
|
|
177
|
-
cpu_usage = []
|
|
178
|
-
_cpu_usage = d.pop("cpuUsage", d.pop("cpu_usage", UNSET))
|
|
179
|
-
for cpu_usage_item_data in _cpu_usage or []:
|
|
180
|
-
cpu_usage_item = JobsChartValue.from_dict(cpu_usage_item_data)
|
|
181
|
-
|
|
182
|
-
cpu_usage.append(cpu_usage_item)
|
|
183
|
-
|
|
184
|
-
executions_chart = []
|
|
185
|
-
_executions_chart = d.pop("executionsChart", d.pop("executions_chart", UNSET))
|
|
186
|
-
for executions_chart_item_data in _executions_chart or []:
|
|
187
|
-
executions_chart_item = JobsSuccessFailedChart.from_dict(executions_chart_item_data)
|
|
188
|
-
|
|
189
|
-
executions_chart.append(executions_chart_item)
|
|
190
|
-
|
|
191
|
-
executions_running = []
|
|
192
|
-
_executions_running = d.pop("executionsRunning", d.pop("executions_running", UNSET))
|
|
193
|
-
for executions_running_item_data in _executions_running or []:
|
|
194
|
-
executions_running_item = JobsChartValue.from_dict(executions_running_item_data)
|
|
195
|
-
|
|
196
|
-
executions_running.append(executions_running_item)
|
|
197
|
-
|
|
198
|
-
_executions_total = d.pop("executionsTotal", d.pop("executions_total", UNSET))
|
|
199
|
-
executions_total: Union[Unset, JobMetricsExecutionsTotal]
|
|
200
|
-
if isinstance(_executions_total, Unset):
|
|
201
|
-
executions_total = UNSET
|
|
202
|
-
else:
|
|
203
|
-
executions_total = JobMetricsExecutionsTotal.from_dict(_executions_total)
|
|
204
|
-
|
|
205
|
-
ram_usage = []
|
|
206
|
-
_ram_usage = d.pop("ramUsage", d.pop("ram_usage", UNSET))
|
|
207
|
-
for ram_usage_item_data in _ram_usage or []:
|
|
208
|
-
ram_usage_item = JobsChartValue.from_dict(ram_usage_item_data)
|
|
209
|
-
|
|
210
|
-
ram_usage.append(ram_usage_item)
|
|
211
|
-
|
|
212
|
-
tasks_chart = []
|
|
213
|
-
_tasks_chart = d.pop("tasksChart", d.pop("tasks_chart", UNSET))
|
|
214
|
-
for tasks_chart_item_data in _tasks_chart or []:
|
|
215
|
-
tasks_chart_item = JobsSuccessFailedChart.from_dict(tasks_chart_item_data)
|
|
216
|
-
|
|
217
|
-
tasks_chart.append(tasks_chart_item)
|
|
218
|
-
|
|
219
|
-
tasks_running = []
|
|
220
|
-
_tasks_running = d.pop("tasksRunning", d.pop("tasks_running", UNSET))
|
|
221
|
-
for tasks_running_item_data in _tasks_running or []:
|
|
222
|
-
tasks_running_item = JobsChartValue.from_dict(tasks_running_item_data)
|
|
223
|
-
|
|
224
|
-
tasks_running.append(tasks_running_item)
|
|
225
|
-
|
|
226
|
-
_tasks_total = d.pop("tasksTotal", d.pop("tasks_total", UNSET))
|
|
227
|
-
tasks_total: Union[Unset, JobMetricsTasksTotal]
|
|
228
|
-
if isinstance(_tasks_total, Unset):
|
|
229
|
-
tasks_total = UNSET
|
|
230
|
-
else:
|
|
231
|
-
tasks_total = JobMetricsTasksTotal.from_dict(_tasks_total)
|
|
232
|
-
|
|
233
|
-
job_metrics = cls(
|
|
234
|
-
billable_time=billable_time,
|
|
235
|
-
cpu_usage=cpu_usage,
|
|
236
|
-
executions_chart=executions_chart,
|
|
237
|
-
executions_running=executions_running,
|
|
238
|
-
executions_total=executions_total,
|
|
239
|
-
ram_usage=ram_usage,
|
|
240
|
-
tasks_chart=tasks_chart,
|
|
241
|
-
tasks_running=tasks_running,
|
|
242
|
-
tasks_total=tasks_total,
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
job_metrics.additional_properties = d
|
|
246
|
-
return job_metrics
|
|
247
|
-
|
|
248
|
-
@property
|
|
249
|
-
def additional_keys(self) -> list[str]:
|
|
250
|
-
return list(self.additional_properties.keys())
|
|
251
|
-
|
|
252
|
-
def __getitem__(self, key: str) -> Any:
|
|
253
|
-
return self.additional_properties[key]
|
|
254
|
-
|
|
255
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
256
|
-
self.additional_properties[key] = value
|
|
257
|
-
|
|
258
|
-
def __delitem__(self, key: str) -> None:
|
|
259
|
-
del self.additional_properties[key]
|
|
260
|
-
|
|
261
|
-
def __contains__(self, key: str) -> bool:
|
|
262
|
-
return key in self.additional_properties
|
|
@@ -1,70 +0,0 @@
|
|
|
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="JobsChartValue")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@_attrs_define
|
|
12
|
-
class JobsChartValue:
|
|
13
|
-
"""Jobs CPU usage
|
|
14
|
-
|
|
15
|
-
Attributes:
|
|
16
|
-
timestamp (Union[Unset, str]): Metric timestamp
|
|
17
|
-
value (Union[Unset, float]): Metric value
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
timestamp: Union[Unset, str] = UNSET
|
|
21
|
-
value: Union[Unset, float] = UNSET
|
|
22
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
-
|
|
24
|
-
def to_dict(self) -> dict[str, Any]:
|
|
25
|
-
timestamp = self.timestamp
|
|
26
|
-
|
|
27
|
-
value = self.value
|
|
28
|
-
|
|
29
|
-
field_dict: dict[str, Any] = {}
|
|
30
|
-
field_dict.update(self.additional_properties)
|
|
31
|
-
field_dict.update({})
|
|
32
|
-
if timestamp is not UNSET:
|
|
33
|
-
field_dict["timestamp"] = timestamp
|
|
34
|
-
if value is not UNSET:
|
|
35
|
-
field_dict["value"] = value
|
|
36
|
-
|
|
37
|
-
return field_dict
|
|
38
|
-
|
|
39
|
-
@classmethod
|
|
40
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
41
|
-
if not src_dict:
|
|
42
|
-
return None
|
|
43
|
-
d = src_dict.copy()
|
|
44
|
-
timestamp = d.pop("timestamp", UNSET)
|
|
45
|
-
|
|
46
|
-
value = d.pop("value", UNSET)
|
|
47
|
-
|
|
48
|
-
jobs_chart_value = cls(
|
|
49
|
-
timestamp=timestamp,
|
|
50
|
-
value=value,
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
jobs_chart_value.additional_properties = d
|
|
54
|
-
return jobs_chart_value
|
|
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
|
|
@@ -1,102 +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.jobs_chart_value import JobsChartValue
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
T = TypeVar("T", bound="JobsNetworkChart")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@_attrs_define
|
|
16
|
-
class JobsNetworkChart:
|
|
17
|
-
"""Jobs chart
|
|
18
|
-
|
|
19
|
-
Attributes:
|
|
20
|
-
received (Union[Unset, list['JobsChartValue']]): Received
|
|
21
|
-
sent (Union[Unset, list['JobsChartValue']]): Sent
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
received: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
25
|
-
sent: Union[Unset, list["JobsChartValue"]] = UNSET
|
|
26
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
-
|
|
28
|
-
def to_dict(self) -> dict[str, Any]:
|
|
29
|
-
received: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
30
|
-
if not isinstance(self.received, Unset):
|
|
31
|
-
received = []
|
|
32
|
-
for received_item_data in self.received:
|
|
33
|
-
if type(received_item_data) is dict:
|
|
34
|
-
received_item = received_item_data
|
|
35
|
-
else:
|
|
36
|
-
received_item = received_item_data.to_dict()
|
|
37
|
-
received.append(received_item)
|
|
38
|
-
|
|
39
|
-
sent: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
40
|
-
if not isinstance(self.sent, Unset):
|
|
41
|
-
sent = []
|
|
42
|
-
for sent_item_data in self.sent:
|
|
43
|
-
if type(sent_item_data) is dict:
|
|
44
|
-
sent_item = sent_item_data
|
|
45
|
-
else:
|
|
46
|
-
sent_item = sent_item_data.to_dict()
|
|
47
|
-
sent.append(sent_item)
|
|
48
|
-
|
|
49
|
-
field_dict: dict[str, Any] = {}
|
|
50
|
-
field_dict.update(self.additional_properties)
|
|
51
|
-
field_dict.update({})
|
|
52
|
-
if received is not UNSET:
|
|
53
|
-
field_dict["received"] = received
|
|
54
|
-
if sent is not UNSET:
|
|
55
|
-
field_dict["sent"] = sent
|
|
56
|
-
|
|
57
|
-
return field_dict
|
|
58
|
-
|
|
59
|
-
@classmethod
|
|
60
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
61
|
-
from ..models.jobs_chart_value import JobsChartValue
|
|
62
|
-
|
|
63
|
-
if not src_dict:
|
|
64
|
-
return None
|
|
65
|
-
d = src_dict.copy()
|
|
66
|
-
received = []
|
|
67
|
-
_received = d.pop("received", UNSET)
|
|
68
|
-
for received_item_data in _received or []:
|
|
69
|
-
received_item = JobsChartValue.from_dict(received_item_data)
|
|
70
|
-
|
|
71
|
-
received.append(received_item)
|
|
72
|
-
|
|
73
|
-
sent = []
|
|
74
|
-
_sent = d.pop("sent", UNSET)
|
|
75
|
-
for sent_item_data in _sent or []:
|
|
76
|
-
sent_item = JobsChartValue.from_dict(sent_item_data)
|
|
77
|
-
|
|
78
|
-
sent.append(sent_item)
|
|
79
|
-
|
|
80
|
-
jobs_network_chart = cls(
|
|
81
|
-
received=received,
|
|
82
|
-
sent=sent,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
jobs_network_chart.additional_properties = d
|
|
86
|
-
return jobs_network_chart
|
|
87
|
-
|
|
88
|
-
@property
|
|
89
|
-
def additional_keys(self) -> list[str]:
|
|
90
|
-
return list(self.additional_properties.keys())
|
|
91
|
-
|
|
92
|
-
def __getitem__(self, key: str) -> Any:
|
|
93
|
-
return self.additional_properties[key]
|
|
94
|
-
|
|
95
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
96
|
-
self.additional_properties[key] = value
|
|
97
|
-
|
|
98
|
-
def __delitem__(self, key: str) -> None:
|
|
99
|
-
del self.additional_properties[key]
|
|
100
|
-
|
|
101
|
-
def __contains__(self, key: str) -> bool:
|
|
102
|
-
return key in self.additional_properties
|