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