blaxel 0.2.31__py3-none-any.whl → 0.2.31rc121__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.
Files changed (174) hide show
  1. blaxel/__init__.py +3 -3
  2. blaxel/core/agents/__init__.py +6 -13
  3. blaxel/core/authentication/__init__.py +1 -2
  4. blaxel/core/authentication/devicemode.py +1 -9
  5. blaxel/core/authentication/oauth.py +6 -13
  6. blaxel/core/authentication/types.py +0 -1
  7. blaxel/core/cache/cache.py +3 -10
  8. blaxel/core/client/api/agents/list_agent_revisions.py +1 -3
  9. blaxel/core/client/api/compute/delete_sandbox_preview_token.py +2 -6
  10. blaxel/core/client/api/compute/start_sandbox.py +1 -3
  11. blaxel/core/client/api/compute/stop_sandbox.py +1 -3
  12. blaxel/core/client/api/default/list_sandbox_hub_definitions.py +2 -6
  13. blaxel/core/client/api/functions/list_function_revisions.py +1 -3
  14. blaxel/core/client/api/images/cleanup_images.py +1 -3
  15. blaxel/core/client/api/integrations/list_integration_connections.py +2 -6
  16. blaxel/core/client/api/invitations/list_all_pending_invitations.py +1 -3
  17. blaxel/core/client/api/jobs/create_job_execution.py +1 -3
  18. blaxel/core/client/api/jobs/delete_job_execution.py +1 -3
  19. blaxel/core/client/api/jobs/get_job_execution.py +1 -3
  20. blaxel/core/client/api/jobs/list_job_executions.py +2 -6
  21. blaxel/core/client/api/jobs/list_job_revisions.py +1 -3
  22. blaxel/core/client/api/locations/list_locations.py +1 -3
  23. blaxel/core/client/api/models/list_model_revisions.py +1 -3
  24. blaxel/core/client/api/service_accounts/create_workspace_service_account.py +2 -6
  25. blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +2 -6
  26. blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +1 -3
  27. blaxel/core/client/api/service_accounts/update_workspace_service_account.py +2 -6
  28. blaxel/core/client/api/volume_templates/list_volume_templates.py +1 -3
  29. blaxel/core/client/api/workspaces/accept_workspace_invitation.py +2 -6
  30. blaxel/core/client/api/workspaces/invite_workspace_user.py +2 -6
  31. blaxel/core/client/api/workspaces/update_workspace_user_role.py +2 -6
  32. blaxel/core/client/client.py +1 -3
  33. blaxel/core/client/models/agent.py +4 -11
  34. blaxel/core/client/models/agent_spec.py +5 -18
  35. blaxel/core/client/models/billable_time_metric.py +1 -0
  36. blaxel/core/client/models/configuration.py +1 -0
  37. blaxel/core/client/models/core_spec.py +3 -10
  38. blaxel/core/client/models/core_spec_configurations.py +1 -0
  39. blaxel/core/client/models/create_job_execution_request.py +1 -0
  40. blaxel/core/client/models/create_job_execution_response.py +1 -0
  41. blaxel/core/client/models/custom_domain.py +2 -5
  42. blaxel/core/client/models/custom_domain_metadata.py +1 -0
  43. blaxel/core/client/models/custom_domain_spec.py +2 -5
  44. blaxel/core/client/models/delete_volume_template_version_response_200.py +2 -5
  45. blaxel/core/client/models/entrypoint.py +1 -0
  46. blaxel/core/client/models/form.py +2 -5
  47. blaxel/core/client/models/function.py +4 -11
  48. blaxel/core/client/models/function_spec.py +4 -13
  49. blaxel/core/client/models/image.py +2 -5
  50. blaxel/core/client/models/image_spec.py +1 -0
  51. blaxel/core/client/models/integration.py +3 -10
  52. blaxel/core/client/models/integration_connection.py +2 -5
  53. blaxel/core/client/models/integration_connection_spec.py +1 -0
  54. blaxel/core/client/models/integration_endpoint.py +2 -5
  55. blaxel/core/client/models/integration_endpoints.py +2 -0
  56. blaxel/core/client/models/job.py +4 -11
  57. blaxel/core/client/models/job_execution.py +2 -5
  58. blaxel/core/client/models/job_execution_spec.py +1 -0
  59. blaxel/core/client/models/job_execution_task.py +2 -5
  60. blaxel/core/client/models/job_metrics.py +2 -5
  61. blaxel/core/client/models/job_spec.py +4 -13
  62. blaxel/core/client/models/jobs_network_chart.py +1 -0
  63. blaxel/core/client/models/jobs_success_failed_chart.py +3 -10
  64. blaxel/core/client/models/latency_metric.py +2 -5
  65. blaxel/core/client/models/location_response.py +1 -0
  66. blaxel/core/client/models/mcp_definition.py +2 -5
  67. blaxel/core/client/models/metadata.py +1 -0
  68. blaxel/core/client/models/metrics.py +4 -11
  69. blaxel/core/client/models/model.py +4 -11
  70. blaxel/core/client/models/model_spec.py +3 -10
  71. blaxel/core/client/models/pending_invitation_accept.py +2 -5
  72. blaxel/core/client/models/pending_invitation_render.py +3 -10
  73. blaxel/core/client/models/policy.py +2 -5
  74. blaxel/core/client/models/policy_spec.py +4 -11
  75. blaxel/core/client/models/preview.py +2 -5
  76. blaxel/core/client/models/preview_spec.py +1 -0
  77. blaxel/core/client/models/preview_token.py +2 -5
  78. blaxel/core/client/models/public_ips.py +1 -0
  79. blaxel/core/client/models/request_duration_over_time_metrics.py +1 -0
  80. blaxel/core/client/models/request_total_by_origin_metric.py +7 -16
  81. blaxel/core/client/models/request_total_metric.py +3 -8
  82. blaxel/core/client/models/resource_metrics.py +17 -58
  83. blaxel/core/client/models/runtime.py +1 -0
  84. blaxel/core/client/models/sandbox.py +4 -11
  85. blaxel/core/client/models/sandbox_definition.py +1 -0
  86. blaxel/core/client/models/sandbox_lifecycle.py +1 -0
  87. blaxel/core/client/models/sandbox_spec.py +6 -21
  88. blaxel/core/client/models/serverless_config.py +1 -0
  89. blaxel/core/client/models/start_sandbox.py +2 -5
  90. blaxel/core/client/models/stop_sandbox.py +2 -5
  91. blaxel/core/client/models/store_agent.py +1 -0
  92. blaxel/core/client/models/store_configuration.py +1 -0
  93. blaxel/core/client/models/template.py +1 -0
  94. blaxel/core/client/models/time_to_first_token_over_time_metrics.py +2 -3
  95. blaxel/core/client/models/token_rate_metrics.py +1 -0
  96. blaxel/core/client/models/trigger.py +1 -0
  97. blaxel/core/client/models/trigger_configuration.py +1 -0
  98. blaxel/core/client/models/volume.py +4 -11
  99. blaxel/core/client/models/volume_template.py +2 -5
  100. blaxel/core/client/models/workspace.py +2 -5
  101. blaxel/core/client/response_interceptor.py +1 -3
  102. blaxel/core/common/autoload.py +11 -9
  103. blaxel/core/common/env.py +8 -10
  104. blaxel/core/common/settings.py +2 -4
  105. blaxel/core/common/webhook.py +1 -0
  106. blaxel/core/jobs/__init__.py +3 -13
  107. blaxel/core/mcp/client.py +2 -8
  108. blaxel/core/mcp/server.py +2 -8
  109. blaxel/core/models/__init__.py +5 -6
  110. blaxel/core/sandbox/__init__.py +1 -1
  111. blaxel/core/sandbox/client/api/codegen/get_codegen_reranking_path.py +2 -6
  112. blaxel/core/sandbox/client/api/fastapply/put_codegen_fastapply_path.py +2 -6
  113. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_multipart_upload_id_abort.py +2 -6
  114. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_path.py +2 -6
  115. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_tree_path.py +2 -6
  116. blaxel/core/sandbox/client/api/filesystem/get_filesystem_content_search_path.py +1 -3
  117. blaxel/core/sandbox/client/api/filesystem/get_filesystem_find_path.py +2 -6
  118. blaxel/core/sandbox/client/api/filesystem/get_filesystem_search_path.py +2 -6
  119. blaxel/core/sandbox/client/api/filesystem/get_watch_filesystem_path.py +2 -6
  120. blaxel/core/sandbox/client/api/filesystem/post_filesystem_multipart_upload_id_complete.py +2 -6
  121. blaxel/core/sandbox/client/api/filesystem/put_filesystem_path.py +2 -6
  122. blaxel/core/sandbox/client/api/process/delete_process_identifier.py +2 -6
  123. blaxel/core/sandbox/client/api/process/delete_process_identifier_kill.py +2 -6
  124. blaxel/core/sandbox/client/api/process/get_process.py +1 -3
  125. blaxel/core/sandbox/client/api/process/get_process_identifier.py +2 -6
  126. blaxel/core/sandbox/client/api/process/get_process_identifier_logs.py +2 -6
  127. blaxel/core/sandbox/client/api/process/get_process_identifier_logs_stream.py +2 -6
  128. blaxel/core/sandbox/client/api/process/post_process.py +2 -6
  129. blaxel/core/sandbox/client/client.py +1 -3
  130. blaxel/core/sandbox/client/models/filesystem_multipart_upload_parts.py +1 -3
  131. blaxel/core/sandbox/default/__init__.py +1 -0
  132. blaxel/core/sandbox/default/action.py +3 -3
  133. blaxel/core/sandbox/default/codegen.py +4 -2
  134. blaxel/core/sandbox/default/filesystem.py +82 -38
  135. blaxel/core/sandbox/default/interpreter.py +10 -17
  136. blaxel/core/sandbox/default/preview.py +2 -6
  137. blaxel/core/sandbox/default/process.py +7 -25
  138. blaxel/core/sandbox/default/sandbox.py +2 -7
  139. blaxel/core/sandbox/sync/__init__.py +2 -0
  140. blaxel/core/sandbox/sync/action.py +3 -2
  141. blaxel/core/sandbox/sync/codegen.py +5 -1
  142. blaxel/core/sandbox/sync/filesystem.py +6 -17
  143. blaxel/core/sandbox/sync/interpreter.py +6 -10
  144. blaxel/core/sandbox/sync/network.py +2 -0
  145. blaxel/core/sandbox/sync/preview.py +9 -21
  146. blaxel/core/sandbox/sync/process.py +8 -32
  147. blaxel/core/sandbox/sync/sandbox.py +6 -13
  148. blaxel/core/sandbox/sync/session.py +4 -6
  149. blaxel/core/sandbox/types.py +1 -2
  150. blaxel/core/tools/__init__.py +6 -30
  151. blaxel/core/tools/common.py +1 -1
  152. blaxel/core/tools/types.py +1 -2
  153. blaxel/crewai/model.py +5 -20
  154. blaxel/googleadk/__init__.py +1 -1
  155. blaxel/googleadk/tools.py +5 -3
  156. blaxel/langgraph/custom/gemini.py +133 -126
  157. blaxel/langgraph/model.py +50 -54
  158. blaxel/langgraph/tools.py +3 -9
  159. blaxel/llamaindex/custom/cohere.py +16 -25
  160. blaxel/llamaindex/model.py +57 -44
  161. blaxel/llamaindex/tools.py +3 -2
  162. blaxel/pydantic/custom/gemini.py +3 -3
  163. blaxel/pydantic/tools.py +4 -2
  164. blaxel/telemetry/exporters.py +3 -10
  165. blaxel/telemetry/instrumentation/blaxel_langgraph.py +2 -4
  166. blaxel/telemetry/instrumentation/blaxel_langgraph_gemini.py +5 -22
  167. blaxel/telemetry/instrumentation/utils.py +3 -3
  168. blaxel/telemetry/log/log.py +3 -2
  169. blaxel/telemetry/log/logger.py +15 -21
  170. blaxel/telemetry/span.py +6 -10
  171. {blaxel-0.2.31.dist-info → blaxel-0.2.31rc121.dist-info}/METADATA +2 -2
  172. {blaxel-0.2.31.dist-info → blaxel-0.2.31rc121.dist-info}/RECORD +174 -174
  173. {blaxel-0.2.31.dist-info → blaxel-0.2.31rc121.dist-info}/WHEEL +0 -0
  174. {blaxel-0.2.31.dist-info → blaxel-0.2.31rc121.dist-info}/licenses/LICENSE +0 -0
@@ -49,6 +49,7 @@ class AgentSpec:
49
49
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
50
50
 
51
51
  def to_dict(self) -> dict[str, Any]:
52
+
52
53
  configurations: Union[Unset, dict[str, Any]] = UNSET
53
54
  if (
54
55
  self.configurations
@@ -80,21 +81,13 @@ class AgentSpec:
80
81
  policies = self.policies
81
82
 
82
83
  revision: Union[Unset, dict[str, Any]] = UNSET
83
- if (
84
- self.revision
85
- and not isinstance(self.revision, Unset)
86
- and not isinstance(self.revision, dict)
87
- ):
84
+ if self.revision and not isinstance(self.revision, Unset) and not isinstance(self.revision, dict):
88
85
  revision = self.revision.to_dict()
89
86
  elif self.revision and isinstance(self.revision, dict):
90
87
  revision = self.revision
91
88
 
92
89
  runtime: Union[Unset, dict[str, Any]] = UNSET
93
- if (
94
- self.runtime
95
- and not isinstance(self.runtime, Unset)
96
- and not isinstance(self.runtime, dict)
97
- ):
90
+ if self.runtime and not isinstance(self.runtime, Unset) and not isinstance(self.runtime, dict):
98
91
  runtime = self.runtime.to_dict()
99
92
  elif self.runtime and isinstance(self.runtime, dict):
100
93
  runtime = self.runtime
@@ -104,11 +97,7 @@ class AgentSpec:
104
97
  description = self.description
105
98
 
106
99
  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
- ):
100
+ if self.repository and not isinstance(self.repository, Unset) and not isinstance(self.repository, dict):
112
101
  repository = self.repository.to_dict()
113
102
  elif self.repository and isinstance(self.repository, dict):
114
103
  repository = self.repository
@@ -211,9 +200,7 @@ class AgentSpec:
211
200
  triggers = []
212
201
  _triggers = d.pop("triggers", UNSET)
213
202
  for componentsschemas_triggers_item_data in _triggers or []:
214
- componentsschemas_triggers_item = Trigger.from_dict(
215
- componentsschemas_triggers_item_data
216
- )
203
+ componentsschemas_triggers_item = Trigger.from_dict(componentsschemas_triggers_item_data)
217
204
 
218
205
  triggers.append(componentsschemas_triggers_item)
219
206
 
@@ -26,6 +26,7 @@ class BillableTimeMetric:
26
26
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
27
 
28
28
  def to_dict(self) -> dict[str, Any]:
29
+
29
30
  billable_time: Union[Unset, list[dict[str, Any]]] = UNSET
30
31
  if not isinstance(self.billable_time, Unset):
31
32
  billable_time = []
@@ -33,6 +33,7 @@ class Configuration:
33
33
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
34
 
35
35
  def to_dict(self) -> dict[str, Any]:
36
+
36
37
  continents: Union[Unset, list[dict[str, Any]]] = UNSET
37
38
  if not isinstance(self.continents, Unset):
38
39
  continents = []
@@ -41,6 +41,7 @@ class CoreSpec:
41
41
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
42
 
43
43
  def to_dict(self) -> dict[str, Any]:
44
+
44
45
  configurations: Union[Unset, dict[str, Any]] = UNSET
45
46
  if (
46
47
  self.configurations
@@ -72,21 +73,13 @@ class CoreSpec:
72
73
  policies = self.policies
73
74
 
74
75
  revision: Union[Unset, dict[str, Any]] = UNSET
75
- if (
76
- self.revision
77
- and not isinstance(self.revision, Unset)
78
- and not isinstance(self.revision, dict)
79
- ):
76
+ if self.revision and not isinstance(self.revision, Unset) and not isinstance(self.revision, dict):
80
77
  revision = self.revision.to_dict()
81
78
  elif self.revision and isinstance(self.revision, dict):
82
79
  revision = self.revision
83
80
 
84
81
  runtime: Union[Unset, dict[str, Any]] = UNSET
85
- if (
86
- self.runtime
87
- and not isinstance(self.runtime, Unset)
88
- and not isinstance(self.runtime, dict)
89
- ):
82
+ if self.runtime and not isinstance(self.runtime, Unset) and not isinstance(self.runtime, dict):
90
83
  runtime = self.runtime.to_dict()
91
84
  elif self.runtime and isinstance(self.runtime, dict):
92
85
  runtime = self.runtime
@@ -25,6 +25,7 @@ class CoreSpecConfigurations:
25
25
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
26
 
27
27
  def to_dict(self) -> dict[str, Any]:
28
+
28
29
  key: Union[Unset, dict[str, Any]] = UNSET
29
30
  if self.key and not isinstance(self.key, Unset) and not isinstance(self.key, dict):
30
31
  key = self.key.to_dict()
@@ -33,6 +33,7 @@ class CreateJobExecutionRequest:
33
33
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
34
 
35
35
  def to_dict(self) -> dict[str, Any]:
36
+
36
37
  execution_id = self.execution_id
37
38
 
38
39
  id = self.id
@@ -35,6 +35,7 @@ class CreateJobExecutionResponse:
35
35
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
36
 
37
37
  def to_dict(self) -> dict[str, Any]:
38
+
38
39
  execution_id = self.execution_id
39
40
 
40
41
  id = self.id
@@ -30,12 +30,9 @@ class CustomDomain:
30
30
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
31
 
32
32
  def to_dict(self) -> dict[str, Any]:
33
+
33
34
  metadata: Union[Unset, dict[str, Any]] = UNSET
34
- if (
35
- self.metadata
36
- and not isinstance(self.metadata, Unset)
37
- and not isinstance(self.metadata, dict)
38
- ):
35
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
39
36
  metadata = self.metadata.to_dict()
40
37
  elif self.metadata and isinstance(self.metadata, dict):
41
38
  metadata = self.metadata
@@ -38,6 +38,7 @@ class CustomDomainMetadata:
38
38
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
39
 
40
40
  def to_dict(self) -> dict[str, Any]:
41
+
41
42
  created_at = self.created_at
42
43
 
43
44
  updated_at = self.updated_at
@@ -35,6 +35,7 @@ class CustomDomainSpec:
35
35
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
36
 
37
37
  def to_dict(self) -> dict[str, Any]:
38
+
38
39
  cname_records = self.cname_records
39
40
 
40
41
  last_verified_at = self.last_verified_at
@@ -44,11 +45,7 @@ class CustomDomainSpec:
44
45
  status = self.status
45
46
 
46
47
  txt_records: Union[Unset, dict[str, Any]] = UNSET
47
- if (
48
- self.txt_records
49
- and not isinstance(self.txt_records, Unset)
50
- and not isinstance(self.txt_records, dict)
51
- ):
48
+ if self.txt_records and not isinstance(self.txt_records, Unset) and not isinstance(self.txt_records, dict):
52
49
  txt_records = self.txt_records.to_dict()
53
50
  elif self.txt_records and isinstance(self.txt_records, dict):
54
51
  txt_records = self.txt_records
@@ -25,14 +25,11 @@ class DeleteVolumeTemplateVersionResponse200:
25
25
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
26
 
27
27
  def to_dict(self) -> dict[str, Any]:
28
+
28
29
  message = self.message
29
30
 
30
31
  template: Union[Unset, dict[str, Any]] = UNSET
31
- if (
32
- self.template
33
- and not isinstance(self.template, Unset)
34
- and not isinstance(self.template, dict)
35
- ):
32
+ if self.template and not isinstance(self.template, Unset) and not isinstance(self.template, dict):
36
33
  template = self.template.to_dict()
37
34
  elif self.template and isinstance(self.template, dict):
38
35
  template = self.template
@@ -30,6 +30,7 @@ class Entrypoint:
30
30
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
31
 
32
32
  def to_dict(self) -> dict[str, Any]:
33
+
33
34
  args: Union[Unset, list[Any]] = UNSET
34
35
  if not isinstance(self.args, Unset):
35
36
  args = self.args
@@ -30,6 +30,7 @@ class Form:
30
30
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
31
 
32
32
  def to_dict(self) -> dict[str, Any]:
33
+
33
34
  config: Union[Unset, dict[str, Any]] = UNSET
34
35
  if self.config and not isinstance(self.config, Unset) and not isinstance(self.config, dict):
35
36
  config = self.config.to_dict()
@@ -43,11 +44,7 @@ class Form:
43
44
  oauth = self.oauth
44
45
 
45
46
  secrets: Union[Unset, dict[str, Any]] = UNSET
46
- if (
47
- self.secrets
48
- and not isinstance(self.secrets, Unset)
49
- and not isinstance(self.secrets, dict)
50
- ):
47
+ if self.secrets and not isinstance(self.secrets, Unset) and not isinstance(self.secrets, dict):
51
48
  secrets = self.secrets.to_dict()
52
49
  elif self.secrets and isinstance(self.secrets, dict):
53
50
  secrets = self.secrets
@@ -32,6 +32,7 @@ class Function:
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
35
+
35
36
  events: Union[Unset, list[dict[str, Any]]] = UNSET
36
37
  if not isinstance(self.events, Unset):
37
38
  events = []
@@ -39,17 +40,11 @@ class Function:
39
40
  if type(componentsschemas_core_events_item_data) is dict:
40
41
  componentsschemas_core_events_item = componentsschemas_core_events_item_data
41
42
  else:
42
- componentsschemas_core_events_item = (
43
- componentsschemas_core_events_item_data.to_dict()
44
- )
43
+ componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
45
44
  events.append(componentsschemas_core_events_item)
46
45
 
47
46
  metadata: Union[Unset, dict[str, Any]] = UNSET
48
- if (
49
- self.metadata
50
- and not isinstance(self.metadata, Unset)
51
- and not isinstance(self.metadata, dict)
52
- ):
47
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
53
48
  metadata = self.metadata.to_dict()
54
49
  elif self.metadata and isinstance(self.metadata, dict):
55
50
  metadata = self.metadata
@@ -88,9 +83,7 @@ class Function:
88
83
  events = []
89
84
  _events = d.pop("events", UNSET)
90
85
  for componentsschemas_core_events_item_data in _events or []:
91
- componentsschemas_core_events_item = CoreEvent.from_dict(
92
- componentsschemas_core_events_item_data
93
- )
86
+ componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
94
87
 
95
88
  events.append(componentsschemas_core_events_item)
96
89
 
@@ -46,6 +46,7 @@ class FunctionSpec:
46
46
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
47
47
 
48
48
  def to_dict(self) -> dict[str, Any]:
49
+
49
50
  configurations: Union[Unset, dict[str, Any]] = UNSET
50
51
  if (
51
52
  self.configurations
@@ -77,21 +78,13 @@ class FunctionSpec:
77
78
  policies = self.policies
78
79
 
79
80
  revision: Union[Unset, dict[str, Any]] = UNSET
80
- if (
81
- self.revision
82
- and not isinstance(self.revision, Unset)
83
- and not isinstance(self.revision, dict)
84
- ):
81
+ if self.revision and not isinstance(self.revision, Unset) and not isinstance(self.revision, dict):
85
82
  revision = self.revision.to_dict()
86
83
  elif self.revision and isinstance(self.revision, dict):
87
84
  revision = self.revision
88
85
 
89
86
  runtime: Union[Unset, dict[str, Any]] = UNSET
90
- if (
91
- self.runtime
92
- and not isinstance(self.runtime, Unset)
93
- and not isinstance(self.runtime, dict)
94
- ):
87
+ if self.runtime and not isinstance(self.runtime, Unset) and not isinstance(self.runtime, dict):
95
88
  runtime = self.runtime.to_dict()
96
89
  elif self.runtime and isinstance(self.runtime, dict):
97
90
  runtime = self.runtime
@@ -188,9 +181,7 @@ class FunctionSpec:
188
181
  triggers = []
189
182
  _triggers = d.pop("triggers", UNSET)
190
183
  for componentsschemas_triggers_item_data in _triggers or []:
191
- componentsschemas_triggers_item = Trigger.from_dict(
192
- componentsschemas_triggers_item_data
193
- )
184
+ componentsschemas_triggers_item = Trigger.from_dict(componentsschemas_triggers_item_data)
194
185
 
195
186
  triggers.append(componentsschemas_triggers_item)
196
187
 
@@ -26,12 +26,9 @@ class Image:
26
26
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
27
 
28
28
  def to_dict(self) -> dict[str, Any]:
29
+
29
30
  metadata: Union[Unset, dict[str, Any]] = UNSET
30
- if (
31
- self.metadata
32
- and not isinstance(self.metadata, Unset)
33
- and not isinstance(self.metadata, dict)
34
- ):
31
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
35
32
  metadata = self.metadata.to_dict()
36
33
  elif self.metadata and isinstance(self.metadata, dict):
37
34
  metadata = self.metadata
@@ -25,6 +25,7 @@ class ImageSpec:
25
25
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
26
 
27
27
  def to_dict(self) -> dict[str, Any]:
28
+
28
29
  size = self.size
29
30
 
30
31
  tags: Union[Unset, list[dict[str, Any]]] = UNSET
@@ -41,6 +41,7 @@ class Integration:
41
41
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
42
 
43
43
  def to_dict(self) -> dict[str, Any]:
44
+
44
45
  additional_infos: Union[Unset, dict[str, Any]] = UNSET
45
46
  if (
46
47
  self.additional_infos
@@ -52,21 +53,13 @@ class Integration:
52
53
  additional_infos = self.additional_infos
53
54
 
54
55
  endpoints: Union[Unset, dict[str, Any]] = UNSET
55
- if (
56
- self.endpoints
57
- and not isinstance(self.endpoints, Unset)
58
- and not isinstance(self.endpoints, dict)
59
- ):
56
+ if self.endpoints and not isinstance(self.endpoints, Unset) and not isinstance(self.endpoints, dict):
60
57
  endpoints = self.endpoints.to_dict()
61
58
  elif self.endpoints and isinstance(self.endpoints, dict):
62
59
  endpoints = self.endpoints
63
60
 
64
61
  headers: Union[Unset, dict[str, Any]] = UNSET
65
- if (
66
- self.headers
67
- and not isinstance(self.headers, Unset)
68
- and not isinstance(self.headers, dict)
69
- ):
62
+ if self.headers and not isinstance(self.headers, Unset) and not isinstance(self.headers, dict):
70
63
  headers = self.headers.to_dict()
71
64
  elif self.headers and isinstance(self.headers, dict):
72
65
  headers = self.headers
@@ -27,12 +27,9 @@ class IntegrationConnection:
27
27
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
28
 
29
29
  def to_dict(self) -> dict[str, Any]:
30
+
30
31
  metadata: Union[Unset, dict[str, Any]] = UNSET
31
- if (
32
- self.metadata
33
- and not isinstance(self.metadata, Unset)
34
- and not isinstance(self.metadata, dict)
35
- ):
32
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
36
33
  metadata = self.metadata.to_dict()
37
34
  elif self.metadata and isinstance(self.metadata, dict):
38
35
  metadata = self.metadata
@@ -31,6 +31,7 @@ class IntegrationConnectionSpec:
31
31
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
32
 
33
33
  def to_dict(self) -> dict[str, Any]:
34
+
34
35
  config: Union[Unset, dict[str, Any]] = UNSET
35
36
  if self.config and not isinstance(self.config, Unset) and not isinstance(self.config, dict):
36
37
  config = self.config.to_dict()
@@ -36,6 +36,7 @@ class IntegrationEndpoint:
36
36
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
37
 
38
38
  def to_dict(self) -> dict[str, Any]:
39
+
39
40
  body = self.body
40
41
 
41
42
  ignore_models: Union[Unset, list[Any]] = UNSET
@@ -51,11 +52,7 @@ class IntegrationEndpoint:
51
52
  stream_key = self.stream_key
52
53
 
53
54
  stream_token: Union[Unset, dict[str, Any]] = UNSET
54
- if (
55
- self.stream_token
56
- and not isinstance(self.stream_token, Unset)
57
- and not isinstance(self.stream_token, dict)
58
- ):
55
+ if self.stream_token and not isinstance(self.stream_token, Unset) and not isinstance(self.stream_token, dict):
59
56
  stream_token = self.stream_token.to_dict()
60
57
  elif self.stream_token and isinstance(self.stream_token, dict):
61
58
  stream_token = self.stream_token
@@ -17,6 +17,7 @@ class IntegrationEndpoints:
17
17
  additional_properties: dict[str, "IntegrationEndpoint"] = _attrs_field(init=False, factory=dict)
18
18
 
19
19
  def to_dict(self) -> dict[str, Any]:
20
+
20
21
  field_dict: dict[str, Any] = {}
21
22
  for prop_name, prop in self.additional_properties.items():
22
23
  if type(prop) is dict:
@@ -35,6 +36,7 @@ class IntegrationEndpoints:
35
36
  d = src_dict.copy()
36
37
  integration_endpoints = cls()
37
38
 
39
+
38
40
  additional_properties = {}
39
41
  for prop_name, prop_dict in d.items():
40
42
  additional_property = IntegrationEndpoint.from_dict(prop_dict)
@@ -32,6 +32,7 @@ class Job:
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
35
+
35
36
  events: Union[Unset, list[dict[str, Any]]] = UNSET
36
37
  if not isinstance(self.events, Unset):
37
38
  events = []
@@ -39,17 +40,11 @@ class Job:
39
40
  if type(componentsschemas_core_events_item_data) is dict:
40
41
  componentsschemas_core_events_item = componentsschemas_core_events_item_data
41
42
  else:
42
- componentsschemas_core_events_item = (
43
- componentsschemas_core_events_item_data.to_dict()
44
- )
43
+ componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
45
44
  events.append(componentsschemas_core_events_item)
46
45
 
47
46
  metadata: Union[Unset, dict[str, Any]] = UNSET
48
- if (
49
- self.metadata
50
- and not isinstance(self.metadata, Unset)
51
- and not isinstance(self.metadata, dict)
52
- ):
47
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
53
48
  metadata = self.metadata.to_dict()
54
49
  elif self.metadata and isinstance(self.metadata, dict):
55
50
  metadata = self.metadata
@@ -88,9 +83,7 @@ class Job:
88
83
  events = []
89
84
  _events = d.pop("events", UNSET)
90
85
  for componentsschemas_core_events_item_data in _events or []:
91
- componentsschemas_core_events_item = CoreEvent.from_dict(
92
- componentsschemas_core_events_item_data
93
- )
86
+ componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
94
87
 
95
88
  events.append(componentsschemas_core_events_item)
96
89
 
@@ -35,12 +35,9 @@ class JobExecution:
35
35
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
36
 
37
37
  def to_dict(self) -> dict[str, Any]:
38
+
38
39
  metadata: Union[Unset, dict[str, Any]] = UNSET
39
- if (
40
- self.metadata
41
- and not isinstance(self.metadata, Unset)
42
- and not isinstance(self.metadata, dict)
43
- ):
40
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
44
41
  metadata = self.metadata.to_dict()
45
42
  elif self.metadata and isinstance(self.metadata, dict):
46
43
  metadata = self.metadata
@@ -28,6 +28,7 @@ class JobExecutionSpec:
28
28
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
29
 
30
30
  def to_dict(self) -> dict[str, Any]:
31
+
31
32
  parallelism = self.parallelism
32
33
 
33
34
  tasks: Union[Unset, list[dict[str, Any]]] = UNSET
@@ -32,6 +32,7 @@ class JobExecutionTask:
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
35
+
35
36
  conditions: Union[Unset, list[dict[str, Any]]] = UNSET
36
37
  if not isinstance(self.conditions, Unset):
37
38
  conditions = []
@@ -43,11 +44,7 @@ class JobExecutionTask:
43
44
  conditions.append(conditions_item)
44
45
 
45
46
  metadata: Union[Unset, dict[str, Any]] = UNSET
46
- if (
47
- self.metadata
48
- and not isinstance(self.metadata, Unset)
49
- and not isinstance(self.metadata, dict)
50
- ):
47
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
51
48
  metadata = self.metadata.to_dict()
52
49
  elif self.metadata and isinstance(self.metadata, dict):
53
50
  metadata = self.metadata
@@ -43,6 +43,7 @@ class JobMetrics:
43
43
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
44
 
45
45
  def to_dict(self) -> dict[str, Any]:
46
+
46
47
  billable_time: Union[Unset, list[dict[str, Any]]] = UNSET
47
48
  if not isinstance(self.billable_time, Unset):
48
49
  billable_time = []
@@ -124,11 +125,7 @@ class JobMetrics:
124
125
  tasks_running.append(tasks_running_item)
125
126
 
126
127
  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
- ):
128
+ if self.tasks_total and not isinstance(self.tasks_total, Unset) and not isinstance(self.tasks_total, dict):
132
129
  tasks_total = self.tasks_total.to_dict()
133
130
  elif self.tasks_total and isinstance(self.tasks_total, dict):
134
131
  tasks_total = self.tasks_total
@@ -46,6 +46,7 @@ class JobSpec:
46
46
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
47
47
 
48
48
  def to_dict(self) -> dict[str, Any]:
49
+
49
50
  configurations: Union[Unset, dict[str, Any]] = UNSET
50
51
  if (
51
52
  self.configurations
@@ -77,21 +78,13 @@ class JobSpec:
77
78
  policies = self.policies
78
79
 
79
80
  revision: Union[Unset, dict[str, Any]] = UNSET
80
- if (
81
- self.revision
82
- and not isinstance(self.revision, Unset)
83
- and not isinstance(self.revision, dict)
84
- ):
81
+ if self.revision and not isinstance(self.revision, Unset) and not isinstance(self.revision, dict):
85
82
  revision = self.revision.to_dict()
86
83
  elif self.revision and isinstance(self.revision, dict):
87
84
  revision = self.revision
88
85
 
89
86
  runtime: Union[Unset, dict[str, Any]] = UNSET
90
- if (
91
- self.runtime
92
- and not isinstance(self.runtime, Unset)
93
- and not isinstance(self.runtime, dict)
94
- ):
87
+ if self.runtime and not isinstance(self.runtime, Unset) and not isinstance(self.runtime, dict):
95
88
  runtime = self.runtime.to_dict()
96
89
  elif self.runtime and isinstance(self.runtime, dict):
97
90
  runtime = self.runtime
@@ -188,9 +181,7 @@ class JobSpec:
188
181
  triggers = []
189
182
  _triggers = d.pop("triggers", UNSET)
190
183
  for componentsschemas_triggers_item_data in _triggers or []:
191
- componentsschemas_triggers_item = Trigger.from_dict(
192
- componentsschemas_triggers_item_data
193
- )
184
+ componentsschemas_triggers_item = Trigger.from_dict(componentsschemas_triggers_item_data)
194
185
 
195
186
  triggers.append(componentsschemas_triggers_item)
196
187
 
@@ -26,6 +26,7 @@ class JobsNetworkChart:
26
26
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
27
 
28
28
  def to_dict(self) -> dict[str, Any]:
29
+
29
30
  received: Union[Unset, list[dict[str, Any]]] = UNSET
30
31
  if not isinstance(self.received, Unset):
31
32
  received = []
@@ -32,6 +32,7 @@ class JobsSuccessFailedChart:
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
35
+
35
36
  failed: Union[Unset, dict[str, Any]] = UNSET
36
37
  if self.failed and not isinstance(self.failed, Unset) and not isinstance(self.failed, dict):
37
38
  failed = self.failed.to_dict()
@@ -39,21 +40,13 @@ class JobsSuccessFailedChart:
39
40
  failed = self.failed
40
41
 
41
42
  retried: Union[Unset, dict[str, Any]] = UNSET
42
- if (
43
- self.retried
44
- and not isinstance(self.retried, Unset)
45
- and not isinstance(self.retried, dict)
46
- ):
43
+ if self.retried and not isinstance(self.retried, Unset) and not isinstance(self.retried, dict):
47
44
  retried = self.retried.to_dict()
48
45
  elif self.retried and isinstance(self.retried, dict):
49
46
  retried = self.retried
50
47
 
51
48
  success: Union[Unset, dict[str, Any]] = UNSET
52
- if (
53
- self.success
54
- and not isinstance(self.success, Unset)
55
- and not isinstance(self.success, dict)
56
- ):
49
+ if self.success and not isinstance(self.success, Unset) and not isinstance(self.success, dict):
57
50
  success = self.success.to_dict()
58
51
  elif self.success and isinstance(self.success, dict):
59
52
  success = self.success
@@ -31,6 +31,7 @@ class LatencyMetric:
31
31
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
32
 
33
33
  def to_dict(self) -> dict[str, Any]:
34
+
34
35
  global_histogram: Union[Unset, list[dict[str, Any]]] = UNSET
35
36
  if not isinstance(self.global_histogram, Unset):
36
37
  global_histogram = []
@@ -42,11 +43,7 @@ class LatencyMetric:
42
43
  global_histogram.append(global_histogram_item)
43
44
 
44
45
  global_stats: Union[Unset, dict[str, Any]] = UNSET
45
- if (
46
- self.global_stats
47
- and not isinstance(self.global_stats, Unset)
48
- and not isinstance(self.global_stats, dict)
49
- ):
46
+ if self.global_stats and not isinstance(self.global_stats, Unset) and not isinstance(self.global_stats, dict):
50
47
  global_stats = self.global_stats.to_dict()
51
48
  elif self.global_stats and isinstance(self.global_stats, dict):
52
49
  global_stats = self.global_stats
@@ -34,6 +34,7 @@ class LocationResponse:
34
34
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
35
 
36
36
  def to_dict(self) -> dict[str, Any]:
37
+
37
38
  continent = self.continent
38
39
 
39
40
  country = self.country