databricks-sdk 0.38.0__py3-none-any.whl → 0.39.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (29) hide show
  1. databricks/sdk/__init__.py +21 -0
  2. databricks/sdk/mixins/open_ai_client.py +2 -2
  3. databricks/sdk/service/apps.py +175 -0
  4. databricks/sdk/service/billing.py +247 -0
  5. databricks/sdk/service/catalog.py +1794 -61
  6. databricks/sdk/service/cleanrooms.py +1281 -0
  7. databricks/sdk/service/compute.py +1486 -8
  8. databricks/sdk/service/dashboards.py +326 -1
  9. databricks/sdk/service/files.py +162 -2
  10. databricks/sdk/service/iam.py +351 -0
  11. databricks/sdk/service/jobs.py +1264 -8
  12. databricks/sdk/service/marketplace.py +688 -0
  13. databricks/sdk/service/ml.py +1038 -2
  14. databricks/sdk/service/oauth2.py +175 -0
  15. databricks/sdk/service/pipelines.py +520 -0
  16. databricks/sdk/service/provisioning.py +387 -0
  17. databricks/sdk/service/serving.py +615 -0
  18. databricks/sdk/service/settings.py +1186 -1
  19. databricks/sdk/service/sharing.py +326 -2
  20. databricks/sdk/service/sql.py +1186 -2
  21. databricks/sdk/service/vectorsearch.py +290 -0
  22. databricks/sdk/service/workspace.py +451 -0
  23. databricks/sdk/version.py +1 -1
  24. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/METADATA +26 -26
  25. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/RECORD +29 -28
  26. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/WHEEL +1 -1
  27. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/LICENSE +0 -0
  28. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/NOTICE +0 -0
  29. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/top_level.txt +0 -0
@@ -53,6 +53,17 @@ class BaseJob:
53
53
  if self.settings: body['settings'] = self.settings.as_dict()
54
54
  return body
55
55
 
56
+ def as_shallow_dict(self) -> dict:
57
+ """Serializes the BaseJob into a shallow dictionary of its immediate attributes."""
58
+ body = {}
59
+ if self.created_time is not None: body['created_time'] = self.created_time
60
+ if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
61
+ if self.effective_budget_policy_id is not None:
62
+ body['effective_budget_policy_id'] = self.effective_budget_policy_id
63
+ if self.job_id is not None: body['job_id'] = self.job_id
64
+ if self.settings: body['settings'] = self.settings
65
+ return body
66
+
56
67
  @classmethod
57
68
  def from_dict(cls, d: Dict[str, any]) -> BaseJob:
58
69
  """Deserializes the BaseJob from a dictionary."""
@@ -240,6 +251,43 @@ class BaseRun:
240
251
  if self.trigger_info: body['trigger_info'] = self.trigger_info.as_dict()
241
252
  return body
242
253
 
254
+ def as_shallow_dict(self) -> dict:
255
+ """Serializes the BaseRun into a shallow dictionary of its immediate attributes."""
256
+ body = {}
257
+ if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
258
+ if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
259
+ if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
260
+ if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
261
+ if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
262
+ if self.description is not None: body['description'] = self.description
263
+ if self.end_time is not None: body['end_time'] = self.end_time
264
+ if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
265
+ if self.git_source: body['git_source'] = self.git_source
266
+ if self.job_clusters: body['job_clusters'] = self.job_clusters
267
+ if self.job_id is not None: body['job_id'] = self.job_id
268
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
269
+ if self.job_run_id is not None: body['job_run_id'] = self.job_run_id
270
+ if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
271
+ if self.original_attempt_run_id is not None:
272
+ body['original_attempt_run_id'] = self.original_attempt_run_id
273
+ if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters
274
+ if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
275
+ if self.repair_history: body['repair_history'] = self.repair_history
276
+ if self.run_duration is not None: body['run_duration'] = self.run_duration
277
+ if self.run_id is not None: body['run_id'] = self.run_id
278
+ if self.run_name is not None: body['run_name'] = self.run_name
279
+ if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
280
+ if self.run_type is not None: body['run_type'] = self.run_type
281
+ if self.schedule: body['schedule'] = self.schedule
282
+ if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
283
+ if self.start_time is not None: body['start_time'] = self.start_time
284
+ if self.state: body['state'] = self.state
285
+ if self.status: body['status'] = self.status
286
+ if self.tasks: body['tasks'] = self.tasks
287
+ if self.trigger is not None: body['trigger'] = self.trigger
288
+ if self.trigger_info: body['trigger_info'] = self.trigger_info
289
+ return body
290
+
243
291
  @classmethod
244
292
  def from_dict(cls, d: Dict[str, any]) -> BaseRun:
245
293
  """Deserializes the BaseRun from a dictionary."""
@@ -292,6 +340,13 @@ class CancelAllRuns:
292
340
  if self.job_id is not None: body['job_id'] = self.job_id
293
341
  return body
294
342
 
343
+ def as_shallow_dict(self) -> dict:
344
+ """Serializes the CancelAllRuns into a shallow dictionary of its immediate attributes."""
345
+ body = {}
346
+ if self.all_queued_runs is not None: body['all_queued_runs'] = self.all_queued_runs
347
+ if self.job_id is not None: body['job_id'] = self.job_id
348
+ return body
349
+
295
350
  @classmethod
296
351
  def from_dict(cls, d: Dict[str, any]) -> CancelAllRuns:
297
352
  """Deserializes the CancelAllRuns from a dictionary."""
@@ -306,6 +361,11 @@ class CancelAllRunsResponse:
306
361
  body = {}
307
362
  return body
308
363
 
364
+ def as_shallow_dict(self) -> dict:
365
+ """Serializes the CancelAllRunsResponse into a shallow dictionary of its immediate attributes."""
366
+ body = {}
367
+ return body
368
+
309
369
  @classmethod
310
370
  def from_dict(cls, d: Dict[str, any]) -> CancelAllRunsResponse:
311
371
  """Deserializes the CancelAllRunsResponse from a dictionary."""
@@ -323,6 +383,12 @@ class CancelRun:
323
383
  if self.run_id is not None: body['run_id'] = self.run_id
324
384
  return body
325
385
 
386
+ def as_shallow_dict(self) -> dict:
387
+ """Serializes the CancelRun into a shallow dictionary of its immediate attributes."""
388
+ body = {}
389
+ if self.run_id is not None: body['run_id'] = self.run_id
390
+ return body
391
+
326
392
  @classmethod
327
393
  def from_dict(cls, d: Dict[str, any]) -> CancelRun:
328
394
  """Deserializes the CancelRun from a dictionary."""
@@ -337,12 +403,82 @@ class CancelRunResponse:
337
403
  body = {}
338
404
  return body
339
405
 
406
+ def as_shallow_dict(self) -> dict:
407
+ """Serializes the CancelRunResponse into a shallow dictionary of its immediate attributes."""
408
+ body = {}
409
+ return body
410
+
340
411
  @classmethod
341
412
  def from_dict(cls, d: Dict[str, any]) -> CancelRunResponse:
342
413
  """Deserializes the CancelRunResponse from a dictionary."""
343
414
  return cls()
344
415
 
345
416
 
417
+ class CleanRoomTaskRunLifeCycleState(Enum):
418
+ """Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to
419
+ remove coupling with jobs API definition"""
420
+
421
+ BLOCKED = 'BLOCKED'
422
+ INTERNAL_ERROR = 'INTERNAL_ERROR'
423
+ PENDING = 'PENDING'
424
+ QUEUED = 'QUEUED'
425
+ RUNNING = 'RUNNING'
426
+ SKIPPED = 'SKIPPED'
427
+ TERMINATED = 'TERMINATED'
428
+ TERMINATING = 'TERMINATING'
429
+ WAITING_FOR_RETRY = 'WAITING_FOR_RETRY'
430
+
431
+
432
+ class CleanRoomTaskRunResultState(Enum):
433
+ """Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to avoid
434
+ cyclic dependency."""
435
+
436
+ CANCELED = 'CANCELED'
437
+ DISABLED = 'DISABLED'
438
+ EVICTED = 'EVICTED'
439
+ EXCLUDED = 'EXCLUDED'
440
+ FAILED = 'FAILED'
441
+ MAXIMUM_CONCURRENT_RUNS_REACHED = 'MAXIMUM_CONCURRENT_RUNS_REACHED'
442
+ SUCCESS = 'SUCCESS'
443
+ SUCCESS_WITH_FAILURES = 'SUCCESS_WITH_FAILURES'
444
+ TIMEDOUT = 'TIMEDOUT'
445
+ UPSTREAM_CANCELED = 'UPSTREAM_CANCELED'
446
+ UPSTREAM_EVICTED = 'UPSTREAM_EVICTED'
447
+ UPSTREAM_FAILED = 'UPSTREAM_FAILED'
448
+
449
+
450
+ @dataclass
451
+ class CleanRoomTaskRunState:
452
+ """Stores the run state of the clean room notebook V1 task."""
453
+
454
+ life_cycle_state: Optional[CleanRoomTaskRunLifeCycleState] = None
455
+ """A value indicating the run's current lifecycle state. This field is always available in the
456
+ response."""
457
+
458
+ result_state: Optional[CleanRoomTaskRunResultState] = None
459
+ """A value indicating the run's result. This field is only available for terminal lifecycle states."""
460
+
461
+ def as_dict(self) -> dict:
462
+ """Serializes the CleanRoomTaskRunState into a dictionary suitable for use as a JSON request body."""
463
+ body = {}
464
+ if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state.value
465
+ if self.result_state is not None: body['result_state'] = self.result_state.value
466
+ return body
467
+
468
+ def as_shallow_dict(self) -> dict:
469
+ """Serializes the CleanRoomTaskRunState into a shallow dictionary of its immediate attributes."""
470
+ body = {}
471
+ if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state
472
+ if self.result_state is not None: body['result_state'] = self.result_state
473
+ return body
474
+
475
+ @classmethod
476
+ def from_dict(cls, d: Dict[str, any]) -> CleanRoomTaskRunState:
477
+ """Deserializes the CleanRoomTaskRunState from a dictionary."""
478
+ return cls(life_cycle_state=_enum(d, 'life_cycle_state', CleanRoomTaskRunLifeCycleState),
479
+ result_state=_enum(d, 'result_state', CleanRoomTaskRunResultState))
480
+
481
+
346
482
  @dataclass
347
483
  class ClusterInstance:
348
484
  cluster_id: Optional[str] = None
@@ -369,6 +505,13 @@ class ClusterInstance:
369
505
  if self.spark_context_id is not None: body['spark_context_id'] = self.spark_context_id
370
506
  return body
371
507
 
508
+ def as_shallow_dict(self) -> dict:
509
+ """Serializes the ClusterInstance into a shallow dictionary of its immediate attributes."""
510
+ body = {}
511
+ if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
512
+ if self.spark_context_id is not None: body['spark_context_id'] = self.spark_context_id
513
+ return body
514
+
372
515
  @classmethod
373
516
  def from_dict(cls, d: Dict[str, any]) -> ClusterInstance:
374
517
  """Deserializes the ClusterInstance from a dictionary."""
@@ -402,6 +545,15 @@ class ClusterSpec:
402
545
  if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
403
546
  return body
404
547
 
548
+ def as_shallow_dict(self) -> dict:
549
+ """Serializes the ClusterSpec into a shallow dictionary of its immediate attributes."""
550
+ body = {}
551
+ if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
552
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
553
+ if self.libraries: body['libraries'] = self.libraries
554
+ if self.new_cluster: body['new_cluster'] = self.new_cluster
555
+ return body
556
+
405
557
  @classmethod
406
558
  def from_dict(cls, d: Dict[str, any]) -> ClusterSpec:
407
559
  """Deserializes the ClusterSpec from a dictionary."""
@@ -446,6 +598,14 @@ class ConditionTask:
446
598
  if self.right is not None: body['right'] = self.right
447
599
  return body
448
600
 
601
+ def as_shallow_dict(self) -> dict:
602
+ """Serializes the ConditionTask into a shallow dictionary of its immediate attributes."""
603
+ body = {}
604
+ if self.left is not None: body['left'] = self.left
605
+ if self.op is not None: body['op'] = self.op
606
+ if self.right is not None: body['right'] = self.right
607
+ return body
608
+
449
609
  @classmethod
450
610
  def from_dict(cls, d: Dict[str, any]) -> ConditionTask:
451
611
  """Deserializes the ConditionTask from a dictionary."""
@@ -482,6 +642,12 @@ class Continuous:
482
642
  if self.pause_status is not None: body['pause_status'] = self.pause_status.value
483
643
  return body
484
644
 
645
+ def as_shallow_dict(self) -> dict:
646
+ """Serializes the Continuous into a shallow dictionary of its immediate attributes."""
647
+ body = {}
648
+ if self.pause_status is not None: body['pause_status'] = self.pause_status
649
+ return body
650
+
485
651
  @classmethod
486
652
  def from_dict(cls, d: Dict[str, any]) -> Continuous:
487
653
  """Deserializes the Continuous from a dictionary."""
@@ -571,8 +737,8 @@ class CreateJob:
571
737
  """The queue settings of the job."""
572
738
 
573
739
  run_as: Optional[JobRunAs] = None
574
- """Write-only setting. Specifies the user, service principal or group that the job/pipeline runs
575
- as. If not specified, the job/pipeline runs as the user who created the job/pipeline.
740
+ """Write-only setting. Specifies the user or service principal that the job runs as. If not
741
+ specified, the job runs as the user who created the job.
576
742
 
577
743
  Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
578
744
 
@@ -629,6 +795,35 @@ class CreateJob:
629
795
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
630
796
  return body
631
797
 
798
+ def as_shallow_dict(self) -> dict:
799
+ """Serializes the CreateJob into a shallow dictionary of its immediate attributes."""
800
+ body = {}
801
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
802
+ if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
803
+ if self.continuous: body['continuous'] = self.continuous
804
+ if self.deployment: body['deployment'] = self.deployment
805
+ if self.description is not None: body['description'] = self.description
806
+ if self.edit_mode is not None: body['edit_mode'] = self.edit_mode
807
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
808
+ if self.environments: body['environments'] = self.environments
809
+ if self.format is not None: body['format'] = self.format
810
+ if self.git_source: body['git_source'] = self.git_source
811
+ if self.health: body['health'] = self.health
812
+ if self.job_clusters: body['job_clusters'] = self.job_clusters
813
+ if self.max_concurrent_runs is not None: body['max_concurrent_runs'] = self.max_concurrent_runs
814
+ if self.name is not None: body['name'] = self.name
815
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
816
+ if self.parameters: body['parameters'] = self.parameters
817
+ if self.queue: body['queue'] = self.queue
818
+ if self.run_as: body['run_as'] = self.run_as
819
+ if self.schedule: body['schedule'] = self.schedule
820
+ if self.tags: body['tags'] = self.tags
821
+ if self.tasks: body['tasks'] = self.tasks
822
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
823
+ if self.trigger: body['trigger'] = self.trigger
824
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
825
+ return body
826
+
632
827
  @classmethod
633
828
  def from_dict(cls, d: Dict[str, any]) -> CreateJob:
634
829
  """Deserializes the CreateJob from a dictionary."""
@@ -671,6 +866,12 @@ class CreateResponse:
671
866
  if self.job_id is not None: body['job_id'] = self.job_id
672
867
  return body
673
868
 
869
+ def as_shallow_dict(self) -> dict:
870
+ """Serializes the CreateResponse into a shallow dictionary of its immediate attributes."""
871
+ body = {}
872
+ if self.job_id is not None: body['job_id'] = self.job_id
873
+ return body
874
+
674
875
  @classmethod
675
876
  def from_dict(cls, d: Dict[str, any]) -> CreateResponse:
676
877
  """Deserializes the CreateResponse from a dictionary."""
@@ -703,6 +904,15 @@ class CronSchedule:
703
904
  if self.timezone_id is not None: body['timezone_id'] = self.timezone_id
704
905
  return body
705
906
 
907
+ def as_shallow_dict(self) -> dict:
908
+ """Serializes the CronSchedule into a shallow dictionary of its immediate attributes."""
909
+ body = {}
910
+ if self.pause_status is not None: body['pause_status'] = self.pause_status
911
+ if self.quartz_cron_expression is not None:
912
+ body['quartz_cron_expression'] = self.quartz_cron_expression
913
+ if self.timezone_id is not None: body['timezone_id'] = self.timezone_id
914
+ return body
915
+
706
916
  @classmethod
707
917
  def from_dict(cls, d: Dict[str, any]) -> CronSchedule:
708
918
  """Deserializes the CronSchedule from a dictionary."""
@@ -727,6 +937,13 @@ class DbtOutput:
727
937
  if self.artifacts_link is not None: body['artifacts_link'] = self.artifacts_link
728
938
  return body
729
939
 
940
+ def as_shallow_dict(self) -> dict:
941
+ """Serializes the DbtOutput into a shallow dictionary of its immediate attributes."""
942
+ body = {}
943
+ if self.artifacts_headers: body['artifacts_headers'] = self.artifacts_headers
944
+ if self.artifacts_link is not None: body['artifacts_link'] = self.artifacts_link
945
+ return body
946
+
730
947
  @classmethod
731
948
  def from_dict(cls, d: Dict[str, any]) -> DbtOutput:
732
949
  """Deserializes the DbtOutput from a dictionary."""
@@ -783,6 +1000,18 @@ class DbtTask:
783
1000
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
784
1001
  return body
785
1002
 
1003
+ def as_shallow_dict(self) -> dict:
1004
+ """Serializes the DbtTask into a shallow dictionary of its immediate attributes."""
1005
+ body = {}
1006
+ if self.catalog is not None: body['catalog'] = self.catalog
1007
+ if self.commands: body['commands'] = self.commands
1008
+ if self.profiles_directory is not None: body['profiles_directory'] = self.profiles_directory
1009
+ if self.project_directory is not None: body['project_directory'] = self.project_directory
1010
+ if self.schema is not None: body['schema'] = self.schema
1011
+ if self.source is not None: body['source'] = self.source
1012
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
1013
+ return body
1014
+
786
1015
  @classmethod
787
1016
  def from_dict(cls, d: Dict[str, any]) -> DbtTask:
788
1017
  """Deserializes the DbtTask from a dictionary."""
@@ -806,6 +1035,12 @@ class DeleteJob:
806
1035
  if self.job_id is not None: body['job_id'] = self.job_id
807
1036
  return body
808
1037
 
1038
+ def as_shallow_dict(self) -> dict:
1039
+ """Serializes the DeleteJob into a shallow dictionary of its immediate attributes."""
1040
+ body = {}
1041
+ if self.job_id is not None: body['job_id'] = self.job_id
1042
+ return body
1043
+
809
1044
  @classmethod
810
1045
  def from_dict(cls, d: Dict[str, any]) -> DeleteJob:
811
1046
  """Deserializes the DeleteJob from a dictionary."""
@@ -820,6 +1055,11 @@ class DeleteResponse:
820
1055
  body = {}
821
1056
  return body
822
1057
 
1058
+ def as_shallow_dict(self) -> dict:
1059
+ """Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
1060
+ body = {}
1061
+ return body
1062
+
823
1063
  @classmethod
824
1064
  def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
825
1065
  """Deserializes the DeleteResponse from a dictionary."""
@@ -837,6 +1077,12 @@ class DeleteRun:
837
1077
  if self.run_id is not None: body['run_id'] = self.run_id
838
1078
  return body
839
1079
 
1080
+ def as_shallow_dict(self) -> dict:
1081
+ """Serializes the DeleteRun into a shallow dictionary of its immediate attributes."""
1082
+ body = {}
1083
+ if self.run_id is not None: body['run_id'] = self.run_id
1084
+ return body
1085
+
840
1086
  @classmethod
841
1087
  def from_dict(cls, d: Dict[str, any]) -> DeleteRun:
842
1088
  """Deserializes the DeleteRun from a dictionary."""
@@ -851,6 +1097,11 @@ class DeleteRunResponse:
851
1097
  body = {}
852
1098
  return body
853
1099
 
1100
+ def as_shallow_dict(self) -> dict:
1101
+ """Serializes the DeleteRunResponse into a shallow dictionary of its immediate attributes."""
1102
+ body = {}
1103
+ return body
1104
+
854
1105
  @classmethod
855
1106
  def from_dict(cls, d: Dict[str, any]) -> DeleteRunResponse:
856
1107
  """Deserializes the DeleteRunResponse from a dictionary."""
@@ -883,6 +1134,14 @@ class EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
883
1134
  if self.previous_value is not None: body['previous_value'] = self.previous_value
884
1135
  return body
885
1136
 
1137
+ def as_shallow_dict(self) -> dict:
1138
+ """Serializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange into a shallow dictionary of its immediate attributes."""
1139
+ body = {}
1140
+ if self.field is not None: body['field'] = self.field
1141
+ if self.new_value is not None: body['new_value'] = self.new_value
1142
+ if self.previous_value is not None: body['previous_value'] = self.previous_value
1143
+ return body
1144
+
886
1145
  @classmethod
887
1146
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
888
1147
  """Deserializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange from a dictionary."""
@@ -906,6 +1165,13 @@ class EnforcePolicyComplianceRequest:
906
1165
  if self.validate_only is not None: body['validate_only'] = self.validate_only
907
1166
  return body
908
1167
 
1168
+ def as_shallow_dict(self) -> dict:
1169
+ """Serializes the EnforcePolicyComplianceRequest into a shallow dictionary of its immediate attributes."""
1170
+ body = {}
1171
+ if self.job_id is not None: body['job_id'] = self.job_id
1172
+ if self.validate_only is not None: body['validate_only'] = self.validate_only
1173
+ return body
1174
+
909
1175
  @classmethod
910
1176
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceRequest:
911
1177
  """Deserializes the EnforcePolicyComplianceRequest from a dictionary."""
@@ -937,6 +1203,14 @@ class EnforcePolicyComplianceResponse:
937
1203
  if self.settings: body['settings'] = self.settings.as_dict()
938
1204
  return body
939
1205
 
1206
+ def as_shallow_dict(self) -> dict:
1207
+ """Serializes the EnforcePolicyComplianceResponse into a shallow dictionary of its immediate attributes."""
1208
+ body = {}
1209
+ if self.has_changes is not None: body['has_changes'] = self.has_changes
1210
+ if self.job_cluster_changes: body['job_cluster_changes'] = self.job_cluster_changes
1211
+ if self.settings: body['settings'] = self.settings
1212
+ return body
1213
+
940
1214
  @classmethod
941
1215
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceResponse:
942
1216
  """Deserializes the EnforcePolicyComplianceResponse from a dictionary."""
@@ -963,6 +1237,12 @@ class ExportRunOutput:
963
1237
  if self.views: body['views'] = [v.as_dict() for v in self.views]
964
1238
  return body
965
1239
 
1240
+ def as_shallow_dict(self) -> dict:
1241
+ """Serializes the ExportRunOutput into a shallow dictionary of its immediate attributes."""
1242
+ body = {}
1243
+ if self.views: body['views'] = self.views
1244
+ return body
1245
+
966
1246
  @classmethod
967
1247
  def from_dict(cls, d: Dict[str, any]) -> ExportRunOutput:
968
1248
  """Deserializes the ExportRunOutput from a dictionary."""
@@ -994,6 +1274,16 @@ class FileArrivalTriggerConfiguration:
994
1274
  body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
995
1275
  return body
996
1276
 
1277
+ def as_shallow_dict(self) -> dict:
1278
+ """Serializes the FileArrivalTriggerConfiguration into a shallow dictionary of its immediate attributes."""
1279
+ body = {}
1280
+ if self.min_time_between_triggers_seconds is not None:
1281
+ body['min_time_between_triggers_seconds'] = self.min_time_between_triggers_seconds
1282
+ if self.url is not None: body['url'] = self.url
1283
+ if self.wait_after_last_change_seconds is not None:
1284
+ body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
1285
+ return body
1286
+
997
1287
  @classmethod
998
1288
  def from_dict(cls, d: Dict[str, any]) -> FileArrivalTriggerConfiguration:
999
1289
  """Deserializes the FileArrivalTriggerConfiguration from a dictionary."""
@@ -1018,6 +1308,13 @@ class ForEachStats:
1018
1308
  if self.task_run_stats: body['task_run_stats'] = self.task_run_stats.as_dict()
1019
1309
  return body
1020
1310
 
1311
+ def as_shallow_dict(self) -> dict:
1312
+ """Serializes the ForEachStats into a shallow dictionary of its immediate attributes."""
1313
+ body = {}
1314
+ if self.error_message_stats: body['error_message_stats'] = self.error_message_stats
1315
+ if self.task_run_stats: body['task_run_stats'] = self.task_run_stats
1316
+ return body
1317
+
1021
1318
  @classmethod
1022
1319
  def from_dict(cls, d: Dict[str, any]) -> ForEachStats:
1023
1320
  """Deserializes the ForEachStats from a dictionary."""
@@ -1045,6 +1342,14 @@ class ForEachTask:
1045
1342
  if self.task: body['task'] = self.task.as_dict()
1046
1343
  return body
1047
1344
 
1345
+ def as_shallow_dict(self) -> dict:
1346
+ """Serializes the ForEachTask into a shallow dictionary of its immediate attributes."""
1347
+ body = {}
1348
+ if self.concurrency is not None: body['concurrency'] = self.concurrency
1349
+ if self.inputs is not None: body['inputs'] = self.inputs
1350
+ if self.task: body['task'] = self.task
1351
+ return body
1352
+
1048
1353
  @classmethod
1049
1354
  def from_dict(cls, d: Dict[str, any]) -> ForEachTask:
1050
1355
  """Deserializes the ForEachTask from a dictionary."""
@@ -1072,6 +1377,14 @@ class ForEachTaskErrorMessageStats:
1072
1377
  if self.termination_category is not None: body['termination_category'] = self.termination_category
1073
1378
  return body
1074
1379
 
1380
+ def as_shallow_dict(self) -> dict:
1381
+ """Serializes the ForEachTaskErrorMessageStats into a shallow dictionary of its immediate attributes."""
1382
+ body = {}
1383
+ if self.count is not None: body['count'] = self.count
1384
+ if self.error_message is not None: body['error_message'] = self.error_message
1385
+ if self.termination_category is not None: body['termination_category'] = self.termination_category
1386
+ return body
1387
+
1075
1388
  @classmethod
1076
1389
  def from_dict(cls, d: Dict[str, any]) -> ForEachTaskErrorMessageStats:
1077
1390
  """Deserializes the ForEachTaskErrorMessageStats from a dictionary."""
@@ -1111,6 +1424,17 @@ class ForEachTaskTaskRunStats:
1111
1424
  if self.total_iterations is not None: body['total_iterations'] = self.total_iterations
1112
1425
  return body
1113
1426
 
1427
+ def as_shallow_dict(self) -> dict:
1428
+ """Serializes the ForEachTaskTaskRunStats into a shallow dictionary of its immediate attributes."""
1429
+ body = {}
1430
+ if self.active_iterations is not None: body['active_iterations'] = self.active_iterations
1431
+ if self.completed_iterations is not None: body['completed_iterations'] = self.completed_iterations
1432
+ if self.failed_iterations is not None: body['failed_iterations'] = self.failed_iterations
1433
+ if self.scheduled_iterations is not None: body['scheduled_iterations'] = self.scheduled_iterations
1434
+ if self.succeeded_iterations is not None: body['succeeded_iterations'] = self.succeeded_iterations
1435
+ if self.total_iterations is not None: body['total_iterations'] = self.total_iterations
1436
+ return body
1437
+
1114
1438
  @classmethod
1115
1439
  def from_dict(cls, d: Dict[str, any]) -> ForEachTaskTaskRunStats:
1116
1440
  """Deserializes the ForEachTaskTaskRunStats from a dictionary."""
@@ -1139,6 +1463,12 @@ class GetJobPermissionLevelsResponse:
1139
1463
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
1140
1464
  return body
1141
1465
 
1466
+ def as_shallow_dict(self) -> dict:
1467
+ """Serializes the GetJobPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
1468
+ body = {}
1469
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
1470
+ return body
1471
+
1142
1472
  @classmethod
1143
1473
  def from_dict(cls, d: Dict[str, any]) -> GetJobPermissionLevelsResponse:
1144
1474
  """Deserializes the GetJobPermissionLevelsResponse from a dictionary."""
@@ -1165,6 +1495,13 @@ class GetPolicyComplianceResponse:
1165
1495
  if self.violations: body['violations'] = self.violations
1166
1496
  return body
1167
1497
 
1498
+ def as_shallow_dict(self) -> dict:
1499
+ """Serializes the GetPolicyComplianceResponse into a shallow dictionary of its immediate attributes."""
1500
+ body = {}
1501
+ if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
1502
+ if self.violations: body['violations'] = self.violations
1503
+ return body
1504
+
1168
1505
  @classmethod
1169
1506
  def from_dict(cls, d: Dict[str, any]) -> GetPolicyComplianceResponse:
1170
1507
  """Deserializes the GetPolicyComplianceResponse from a dictionary."""
@@ -1199,6 +1536,12 @@ class GitSnapshot:
1199
1536
  if self.used_commit is not None: body['used_commit'] = self.used_commit
1200
1537
  return body
1201
1538
 
1539
+ def as_shallow_dict(self) -> dict:
1540
+ """Serializes the GitSnapshot into a shallow dictionary of its immediate attributes."""
1541
+ body = {}
1542
+ if self.used_commit is not None: body['used_commit'] = self.used_commit
1543
+ return body
1544
+
1202
1545
  @classmethod
1203
1546
  def from_dict(cls, d: Dict[str, any]) -> GitSnapshot:
1204
1547
  """Deserializes the GitSnapshot from a dictionary."""
@@ -1253,6 +1596,18 @@ class GitSource:
1253
1596
  if self.job_source: body['job_source'] = self.job_source.as_dict()
1254
1597
  return body
1255
1598
 
1599
+ def as_shallow_dict(self) -> dict:
1600
+ """Serializes the GitSource into a shallow dictionary of its immediate attributes."""
1601
+ body = {}
1602
+ if self.git_branch is not None: body['git_branch'] = self.git_branch
1603
+ if self.git_commit is not None: body['git_commit'] = self.git_commit
1604
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
1605
+ if self.git_snapshot: body['git_snapshot'] = self.git_snapshot
1606
+ if self.git_tag is not None: body['git_tag'] = self.git_tag
1607
+ if self.git_url is not None: body['git_url'] = self.git_url
1608
+ if self.job_source: body['job_source'] = self.job_source
1609
+ return body
1610
+
1256
1611
  @classmethod
1257
1612
  def from_dict(cls, d: Dict[str, any]) -> GitSource:
1258
1613
  """Deserializes the GitSource from a dictionary."""
@@ -1310,6 +1665,18 @@ class Job:
1310
1665
  if self.settings: body['settings'] = self.settings.as_dict()
1311
1666
  return body
1312
1667
 
1668
+ def as_shallow_dict(self) -> dict:
1669
+ """Serializes the Job into a shallow dictionary of its immediate attributes."""
1670
+ body = {}
1671
+ if self.created_time is not None: body['created_time'] = self.created_time
1672
+ if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
1673
+ if self.effective_budget_policy_id is not None:
1674
+ body['effective_budget_policy_id'] = self.effective_budget_policy_id
1675
+ if self.job_id is not None: body['job_id'] = self.job_id
1676
+ if self.run_as_user_name is not None: body['run_as_user_name'] = self.run_as_user_name
1677
+ if self.settings: body['settings'] = self.settings
1678
+ return body
1679
+
1313
1680
  @classmethod
1314
1681
  def from_dict(cls, d: Dict[str, any]) -> Job:
1315
1682
  """Deserializes the Job from a dictionary."""
@@ -1345,6 +1712,16 @@ class JobAccessControlRequest:
1345
1712
  if self.user_name is not None: body['user_name'] = self.user_name
1346
1713
  return body
1347
1714
 
1715
+ def as_shallow_dict(self) -> dict:
1716
+ """Serializes the JobAccessControlRequest into a shallow dictionary of its immediate attributes."""
1717
+ body = {}
1718
+ if self.group_name is not None: body['group_name'] = self.group_name
1719
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1720
+ if self.service_principal_name is not None:
1721
+ body['service_principal_name'] = self.service_principal_name
1722
+ if self.user_name is not None: body['user_name'] = self.user_name
1723
+ return body
1724
+
1348
1725
  @classmethod
1349
1726
  def from_dict(cls, d: Dict[str, any]) -> JobAccessControlRequest:
1350
1727
  """Deserializes the JobAccessControlRequest from a dictionary."""
@@ -1382,6 +1759,17 @@ class JobAccessControlResponse:
1382
1759
  if self.user_name is not None: body['user_name'] = self.user_name
1383
1760
  return body
1384
1761
 
1762
+ def as_shallow_dict(self) -> dict:
1763
+ """Serializes the JobAccessControlResponse into a shallow dictionary of its immediate attributes."""
1764
+ body = {}
1765
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
1766
+ if self.display_name is not None: body['display_name'] = self.display_name
1767
+ if self.group_name is not None: body['group_name'] = self.group_name
1768
+ if self.service_principal_name is not None:
1769
+ body['service_principal_name'] = self.service_principal_name
1770
+ if self.user_name is not None: body['user_name'] = self.user_name
1771
+ return body
1772
+
1385
1773
  @classmethod
1386
1774
  def from_dict(cls, d: Dict[str, any]) -> JobAccessControlResponse:
1387
1775
  """Deserializes the JobAccessControlResponse from a dictionary."""
@@ -1409,6 +1797,13 @@ class JobCluster:
1409
1797
  if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
1410
1798
  return body
1411
1799
 
1800
+ def as_shallow_dict(self) -> dict:
1801
+ """Serializes the JobCluster into a shallow dictionary of its immediate attributes."""
1802
+ body = {}
1803
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
1804
+ if self.new_cluster: body['new_cluster'] = self.new_cluster
1805
+ return body
1806
+
1412
1807
  @classmethod
1413
1808
  def from_dict(cls, d: Dict[str, any]) -> JobCluster:
1414
1809
  """Deserializes the JobCluster from a dictionary."""
@@ -1438,6 +1833,14 @@ class JobCompliance:
1438
1833
  if self.violations: body['violations'] = self.violations
1439
1834
  return body
1440
1835
 
1836
+ def as_shallow_dict(self) -> dict:
1837
+ """Serializes the JobCompliance into a shallow dictionary of its immediate attributes."""
1838
+ body = {}
1839
+ if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
1840
+ if self.job_id is not None: body['job_id'] = self.job_id
1841
+ if self.violations: body['violations'] = self.violations
1842
+ return body
1843
+
1441
1844
  @classmethod
1442
1845
  def from_dict(cls, d: Dict[str, any]) -> JobCompliance:
1443
1846
  """Deserializes the JobCompliance from a dictionary."""
@@ -1463,6 +1866,13 @@ class JobDeployment:
1463
1866
  if self.metadata_file_path is not None: body['metadata_file_path'] = self.metadata_file_path
1464
1867
  return body
1465
1868
 
1869
+ def as_shallow_dict(self) -> dict:
1870
+ """Serializes the JobDeployment into a shallow dictionary of its immediate attributes."""
1871
+ body = {}
1872
+ if self.kind is not None: body['kind'] = self.kind
1873
+ if self.metadata_file_path is not None: body['metadata_file_path'] = self.metadata_file_path
1874
+ return body
1875
+
1466
1876
  @classmethod
1467
1877
  def from_dict(cls, d: Dict[str, any]) -> JobDeployment:
1468
1878
  """Deserializes the JobDeployment from a dictionary."""
@@ -1537,6 +1947,20 @@ class JobEmailNotifications:
1537
1947
  if self.on_success: body['on_success'] = [v for v in self.on_success]
1538
1948
  return body
1539
1949
 
1950
+ def as_shallow_dict(self) -> dict:
1951
+ """Serializes the JobEmailNotifications into a shallow dictionary of its immediate attributes."""
1952
+ body = {}
1953
+ if self.no_alert_for_skipped_runs is not None:
1954
+ body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
1955
+ if self.on_duration_warning_threshold_exceeded:
1956
+ body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
1957
+ if self.on_failure: body['on_failure'] = self.on_failure
1958
+ if self.on_start: body['on_start'] = self.on_start
1959
+ if self.on_streaming_backlog_exceeded:
1960
+ body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
1961
+ if self.on_success: body['on_success'] = self.on_success
1962
+ return body
1963
+
1540
1964
  @classmethod
1541
1965
  def from_dict(cls, d: Dict[str, any]) -> JobEmailNotifications:
1542
1966
  """Deserializes the JobEmailNotifications from a dictionary."""
@@ -1565,6 +1989,13 @@ class JobEnvironment:
1565
1989
  if self.spec: body['spec'] = self.spec.as_dict()
1566
1990
  return body
1567
1991
 
1992
+ def as_shallow_dict(self) -> dict:
1993
+ """Serializes the JobEnvironment into a shallow dictionary of its immediate attributes."""
1994
+ body = {}
1995
+ if self.environment_key is not None: body['environment_key'] = self.environment_key
1996
+ if self.spec: body['spec'] = self.spec
1997
+ return body
1998
+
1568
1999
  @classmethod
1569
2000
  def from_dict(cls, d: Dict[str, any]) -> JobEnvironment:
1570
2001
  """Deserializes the JobEnvironment from a dictionary."""
@@ -1591,6 +2022,15 @@ class JobNotificationSettings:
1591
2022
  body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
1592
2023
  return body
1593
2024
 
2025
+ def as_shallow_dict(self) -> dict:
2026
+ """Serializes the JobNotificationSettings into a shallow dictionary of its immediate attributes."""
2027
+ body = {}
2028
+ if self.no_alert_for_canceled_runs is not None:
2029
+ body['no_alert_for_canceled_runs'] = self.no_alert_for_canceled_runs
2030
+ if self.no_alert_for_skipped_runs is not None:
2031
+ body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
2032
+ return body
2033
+
1594
2034
  @classmethod
1595
2035
  def from_dict(cls, d: Dict[str, any]) -> JobNotificationSettings:
1596
2036
  """Deserializes the JobNotificationSettings from a dictionary."""
@@ -1617,6 +2057,14 @@ class JobParameter:
1617
2057
  if self.value is not None: body['value'] = self.value
1618
2058
  return body
1619
2059
 
2060
+ def as_shallow_dict(self) -> dict:
2061
+ """Serializes the JobParameter into a shallow dictionary of its immediate attributes."""
2062
+ body = {}
2063
+ if self.default is not None: body['default'] = self.default
2064
+ if self.name is not None: body['name'] = self.name
2065
+ if self.value is not None: body['value'] = self.value
2066
+ return body
2067
+
1620
2068
  @classmethod
1621
2069
  def from_dict(cls, d: Dict[str, any]) -> JobParameter:
1622
2070
  """Deserializes the JobParameter from a dictionary."""
@@ -1638,6 +2086,13 @@ class JobParameterDefinition:
1638
2086
  if self.name is not None: body['name'] = self.name
1639
2087
  return body
1640
2088
 
2089
+ def as_shallow_dict(self) -> dict:
2090
+ """Serializes the JobParameterDefinition into a shallow dictionary of its immediate attributes."""
2091
+ body = {}
2092
+ if self.default is not None: body['default'] = self.default
2093
+ if self.name is not None: body['name'] = self.name
2094
+ return body
2095
+
1641
2096
  @classmethod
1642
2097
  def from_dict(cls, d: Dict[str, any]) -> JobParameterDefinition:
1643
2098
  """Deserializes the JobParameterDefinition from a dictionary."""
@@ -1661,6 +2116,14 @@ class JobPermission:
1661
2116
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1662
2117
  return body
1663
2118
 
2119
+ def as_shallow_dict(self) -> dict:
2120
+ """Serializes the JobPermission into a shallow dictionary of its immediate attributes."""
2121
+ body = {}
2122
+ if self.inherited is not None: body['inherited'] = self.inherited
2123
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
2124
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
2125
+ return body
2126
+
1664
2127
  @classmethod
1665
2128
  def from_dict(cls, d: Dict[str, any]) -> JobPermission:
1666
2129
  """Deserializes the JobPermission from a dictionary."""
@@ -1695,6 +2158,14 @@ class JobPermissions:
1695
2158
  if self.object_type is not None: body['object_type'] = self.object_type
1696
2159
  return body
1697
2160
 
2161
+ def as_shallow_dict(self) -> dict:
2162
+ """Serializes the JobPermissions into a shallow dictionary of its immediate attributes."""
2163
+ body = {}
2164
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
2165
+ if self.object_id is not None: body['object_id'] = self.object_id
2166
+ if self.object_type is not None: body['object_type'] = self.object_type
2167
+ return body
2168
+
1698
2169
  @classmethod
1699
2170
  def from_dict(cls, d: Dict[str, any]) -> JobPermissions:
1700
2171
  """Deserializes the JobPermissions from a dictionary."""
@@ -1717,6 +2188,13 @@ class JobPermissionsDescription:
1717
2188
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1718
2189
  return body
1719
2190
 
2191
+ def as_shallow_dict(self) -> dict:
2192
+ """Serializes the JobPermissionsDescription into a shallow dictionary of its immediate attributes."""
2193
+ body = {}
2194
+ if self.description is not None: body['description'] = self.description
2195
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
2196
+ return body
2197
+
1720
2198
  @classmethod
1721
2199
  def from_dict(cls, d: Dict[str, any]) -> JobPermissionsDescription:
1722
2200
  """Deserializes the JobPermissionsDescription from a dictionary."""
@@ -1739,6 +2217,13 @@ class JobPermissionsRequest:
1739
2217
  if self.job_id is not None: body['job_id'] = self.job_id
1740
2218
  return body
1741
2219
 
2220
+ def as_shallow_dict(self) -> dict:
2221
+ """Serializes the JobPermissionsRequest into a shallow dictionary of its immediate attributes."""
2222
+ body = {}
2223
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
2224
+ if self.job_id is not None: body['job_id'] = self.job_id
2225
+ return body
2226
+
1742
2227
  @classmethod
1743
2228
  def from_dict(cls, d: Dict[str, any]) -> JobPermissionsRequest:
1744
2229
  """Deserializes the JobPermissionsRequest from a dictionary."""
@@ -1748,8 +2233,8 @@ class JobPermissionsRequest:
1748
2233
 
1749
2234
  @dataclass
1750
2235
  class JobRunAs:
1751
- """Write-only setting. Specifies the user, service principal or group that the job/pipeline runs
1752
- as. If not specified, the job/pipeline runs as the user who created the job/pipeline.
2236
+ """Write-only setting. Specifies the user or service principal that the job runs as. If not
2237
+ specified, the job runs as the user who created the job.
1753
2238
 
1754
2239
  Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
1755
2240
 
@@ -1769,6 +2254,14 @@ class JobRunAs:
1769
2254
  if self.user_name is not None: body['user_name'] = self.user_name
1770
2255
  return body
1771
2256
 
2257
+ def as_shallow_dict(self) -> dict:
2258
+ """Serializes the JobRunAs into a shallow dictionary of its immediate attributes."""
2259
+ body = {}
2260
+ if self.service_principal_name is not None:
2261
+ body['service_principal_name'] = self.service_principal_name
2262
+ if self.user_name is not None: body['user_name'] = self.user_name
2263
+ return body
2264
+
1772
2265
  @classmethod
1773
2266
  def from_dict(cls, d: Dict[str, any]) -> JobRunAs:
1774
2267
  """Deserializes the JobRunAs from a dictionary."""
@@ -1856,8 +2349,8 @@ class JobSettings:
1856
2349
  """The queue settings of the job."""
1857
2350
 
1858
2351
  run_as: Optional[JobRunAs] = None
1859
- """Write-only setting. Specifies the user, service principal or group that the job/pipeline runs
1860
- as. If not specified, the job/pipeline runs as the user who created the job/pipeline.
2352
+ """Write-only setting. Specifies the user or service principal that the job runs as. If not
2353
+ specified, the job runs as the user who created the job.
1861
2354
 
1862
2355
  Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
1863
2356
 
@@ -1912,6 +2405,34 @@ class JobSettings:
1912
2405
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
1913
2406
  return body
1914
2407
 
2408
+ def as_shallow_dict(self) -> dict:
2409
+ """Serializes the JobSettings into a shallow dictionary of its immediate attributes."""
2410
+ body = {}
2411
+ if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
2412
+ if self.continuous: body['continuous'] = self.continuous
2413
+ if self.deployment: body['deployment'] = self.deployment
2414
+ if self.description is not None: body['description'] = self.description
2415
+ if self.edit_mode is not None: body['edit_mode'] = self.edit_mode
2416
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
2417
+ if self.environments: body['environments'] = self.environments
2418
+ if self.format is not None: body['format'] = self.format
2419
+ if self.git_source: body['git_source'] = self.git_source
2420
+ if self.health: body['health'] = self.health
2421
+ if self.job_clusters: body['job_clusters'] = self.job_clusters
2422
+ if self.max_concurrent_runs is not None: body['max_concurrent_runs'] = self.max_concurrent_runs
2423
+ if self.name is not None: body['name'] = self.name
2424
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
2425
+ if self.parameters: body['parameters'] = self.parameters
2426
+ if self.queue: body['queue'] = self.queue
2427
+ if self.run_as: body['run_as'] = self.run_as
2428
+ if self.schedule: body['schedule'] = self.schedule
2429
+ if self.tags: body['tags'] = self.tags
2430
+ if self.tasks: body['tasks'] = self.tasks
2431
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
2432
+ if self.trigger: body['trigger'] = self.trigger
2433
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
2434
+ return body
2435
+
1915
2436
  @classmethod
1916
2437
  def from_dict(cls, d: Dict[str, any]) -> JobSettings:
1917
2438
  """Deserializes the JobSettings from a dictionary."""
@@ -1969,6 +2490,15 @@ class JobSource:
1969
2490
  if self.job_config_path is not None: body['job_config_path'] = self.job_config_path
1970
2491
  return body
1971
2492
 
2493
+ def as_shallow_dict(self) -> dict:
2494
+ """Serializes the JobSource into a shallow dictionary of its immediate attributes."""
2495
+ body = {}
2496
+ if self.dirty_state is not None: body['dirty_state'] = self.dirty_state
2497
+ if self.import_from_git_branch is not None:
2498
+ body['import_from_git_branch'] = self.import_from_git_branch
2499
+ if self.job_config_path is not None: body['job_config_path'] = self.job_config_path
2500
+ return body
2501
+
1972
2502
  @classmethod
1973
2503
  def from_dict(cls, d: Dict[str, any]) -> JobSource:
1974
2504
  """Deserializes the JobSource from a dictionary."""
@@ -2042,6 +2572,14 @@ class JobsHealthRule:
2042
2572
  if self.value is not None: body['value'] = self.value
2043
2573
  return body
2044
2574
 
2575
+ def as_shallow_dict(self) -> dict:
2576
+ """Serializes the JobsHealthRule into a shallow dictionary of its immediate attributes."""
2577
+ body = {}
2578
+ if self.metric is not None: body['metric'] = self.metric
2579
+ if self.op is not None: body['op'] = self.op
2580
+ if self.value is not None: body['value'] = self.value
2581
+ return body
2582
+
2045
2583
  @classmethod
2046
2584
  def from_dict(cls, d: Dict[str, any]) -> JobsHealthRule:
2047
2585
  """Deserializes the JobsHealthRule from a dictionary."""
@@ -2062,6 +2600,12 @@ class JobsHealthRules:
2062
2600
  if self.rules: body['rules'] = [v.as_dict() for v in self.rules]
2063
2601
  return body
2064
2602
 
2603
+ def as_shallow_dict(self) -> dict:
2604
+ """Serializes the JobsHealthRules into a shallow dictionary of its immediate attributes."""
2605
+ body = {}
2606
+ if self.rules: body['rules'] = self.rules
2607
+ return body
2608
+
2065
2609
  @classmethod
2066
2610
  def from_dict(cls, d: Dict[str, any]) -> JobsHealthRules:
2067
2611
  """Deserializes the JobsHealthRules from a dictionary."""
@@ -2089,6 +2633,14 @@ class ListJobComplianceForPolicyResponse:
2089
2633
  if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2090
2634
  return body
2091
2635
 
2636
+ def as_shallow_dict(self) -> dict:
2637
+ """Serializes the ListJobComplianceForPolicyResponse into a shallow dictionary of its immediate attributes."""
2638
+ body = {}
2639
+ if self.jobs: body['jobs'] = self.jobs
2640
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
2641
+ if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2642
+ return body
2643
+
2092
2644
  @classmethod
2093
2645
  def from_dict(cls, d: Dict[str, any]) -> ListJobComplianceForPolicyResponse:
2094
2646
  """Deserializes the ListJobComplianceForPolicyResponse from a dictionary."""
@@ -2122,6 +2674,15 @@ class ListJobsResponse:
2122
2674
  if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2123
2675
  return body
2124
2676
 
2677
+ def as_shallow_dict(self) -> dict:
2678
+ """Serializes the ListJobsResponse into a shallow dictionary of its immediate attributes."""
2679
+ body = {}
2680
+ if self.has_more is not None: body['has_more'] = self.has_more
2681
+ if self.jobs: body['jobs'] = self.jobs
2682
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
2683
+ if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2684
+ return body
2685
+
2125
2686
  @classmethod
2126
2687
  def from_dict(cls, d: Dict[str, any]) -> ListJobsResponse:
2127
2688
  """Deserializes the ListJobsResponse from a dictionary."""
@@ -2157,6 +2718,15 @@ class ListRunsResponse:
2157
2718
  if self.runs: body['runs'] = [v.as_dict() for v in self.runs]
2158
2719
  return body
2159
2720
 
2721
+ def as_shallow_dict(self) -> dict:
2722
+ """Serializes the ListRunsResponse into a shallow dictionary of its immediate attributes."""
2723
+ body = {}
2724
+ if self.has_more is not None: body['has_more'] = self.has_more
2725
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
2726
+ if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2727
+ if self.runs: body['runs'] = self.runs
2728
+ return body
2729
+
2160
2730
  @classmethod
2161
2731
  def from_dict(cls, d: Dict[str, any]) -> ListRunsResponse:
2162
2732
  """Deserializes the ListRunsResponse from a dictionary."""
@@ -2185,6 +2755,13 @@ class NotebookOutput:
2185
2755
  if self.truncated is not None: body['truncated'] = self.truncated
2186
2756
  return body
2187
2757
 
2758
+ def as_shallow_dict(self) -> dict:
2759
+ """Serializes the NotebookOutput into a shallow dictionary of its immediate attributes."""
2760
+ body = {}
2761
+ if self.result is not None: body['result'] = self.result
2762
+ if self.truncated is not None: body['truncated'] = self.truncated
2763
+ return body
2764
+
2188
2765
  @classmethod
2189
2766
  def from_dict(cls, d: Dict[str, any]) -> NotebookOutput:
2190
2767
  """Deserializes the NotebookOutput from a dictionary."""
@@ -2237,6 +2814,15 @@ class NotebookTask:
2237
2814
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2238
2815
  return body
2239
2816
 
2817
+ def as_shallow_dict(self) -> dict:
2818
+ """Serializes the NotebookTask into a shallow dictionary of its immediate attributes."""
2819
+ body = {}
2820
+ if self.base_parameters: body['base_parameters'] = self.base_parameters
2821
+ if self.notebook_path is not None: body['notebook_path'] = self.notebook_path
2822
+ if self.source is not None: body['source'] = self.source
2823
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2824
+ return body
2825
+
2240
2826
  @classmethod
2241
2827
  def from_dict(cls, d: Dict[str, any]) -> NotebookTask:
2242
2828
  """Deserializes the NotebookTask from a dictionary."""
@@ -2267,6 +2853,13 @@ class PeriodicTriggerConfiguration:
2267
2853
  if self.unit is not None: body['unit'] = self.unit.value
2268
2854
  return body
2269
2855
 
2856
+ def as_shallow_dict(self) -> dict:
2857
+ """Serializes the PeriodicTriggerConfiguration into a shallow dictionary of its immediate attributes."""
2858
+ body = {}
2859
+ if self.interval is not None: body['interval'] = self.interval
2860
+ if self.unit is not None: body['unit'] = self.unit
2861
+ return body
2862
+
2270
2863
  @classmethod
2271
2864
  def from_dict(cls, d: Dict[str, any]) -> PeriodicTriggerConfiguration:
2272
2865
  """Deserializes the PeriodicTriggerConfiguration from a dictionary."""
@@ -2292,6 +2885,12 @@ class PipelineParams:
2292
2885
  if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
2293
2886
  return body
2294
2887
 
2888
+ def as_shallow_dict(self) -> dict:
2889
+ """Serializes the PipelineParams into a shallow dictionary of its immediate attributes."""
2890
+ body = {}
2891
+ if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
2892
+ return body
2893
+
2295
2894
  @classmethod
2296
2895
  def from_dict(cls, d: Dict[str, any]) -> PipelineParams:
2297
2896
  """Deserializes the PipelineParams from a dictionary."""
@@ -2313,6 +2912,13 @@ class PipelineTask:
2313
2912
  if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
2314
2913
  return body
2315
2914
 
2915
+ def as_shallow_dict(self) -> dict:
2916
+ """Serializes the PipelineTask into a shallow dictionary of its immediate attributes."""
2917
+ body = {}
2918
+ if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
2919
+ if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
2920
+ return body
2921
+
2316
2922
  @classmethod
2317
2923
  def from_dict(cls, d: Dict[str, any]) -> PipelineTask:
2318
2924
  """Deserializes the PipelineTask from a dictionary."""
@@ -2345,6 +2951,15 @@ class PythonWheelTask:
2345
2951
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2346
2952
  return body
2347
2953
 
2954
+ def as_shallow_dict(self) -> dict:
2955
+ """Serializes the PythonWheelTask into a shallow dictionary of its immediate attributes."""
2956
+ body = {}
2957
+ if self.entry_point is not None: body['entry_point'] = self.entry_point
2958
+ if self.named_parameters: body['named_parameters'] = self.named_parameters
2959
+ if self.package_name is not None: body['package_name'] = self.package_name
2960
+ if self.parameters: body['parameters'] = self.parameters
2961
+ return body
2962
+
2348
2963
  @classmethod
2349
2964
  def from_dict(cls, d: Dict[str, any]) -> PythonWheelTask:
2350
2965
  """Deserializes the PythonWheelTask from a dictionary."""
@@ -2374,6 +2989,13 @@ class QueueDetails:
2374
2989
  if self.message is not None: body['message'] = self.message
2375
2990
  return body
2376
2991
 
2992
+ def as_shallow_dict(self) -> dict:
2993
+ """Serializes the QueueDetails into a shallow dictionary of its immediate attributes."""
2994
+ body = {}
2995
+ if self.code is not None: body['code'] = self.code
2996
+ if self.message is not None: body['message'] = self.message
2997
+ return body
2998
+
2377
2999
  @classmethod
2378
3000
  def from_dict(cls, d: Dict[str, any]) -> QueueDetails:
2379
3001
  """Deserializes the QueueDetails from a dictionary."""
@@ -2403,6 +3025,12 @@ class QueueSettings:
2403
3025
  if self.enabled is not None: body['enabled'] = self.enabled
2404
3026
  return body
2405
3027
 
3028
+ def as_shallow_dict(self) -> dict:
3029
+ """Serializes the QueueSettings into a shallow dictionary of its immediate attributes."""
3030
+ body = {}
3031
+ if self.enabled is not None: body['enabled'] = self.enabled
3032
+ return body
3033
+
2406
3034
  @classmethod
2407
3035
  def from_dict(cls, d: Dict[str, any]) -> QueueSettings:
2408
3036
  """Deserializes the QueueSettings from a dictionary."""
@@ -2444,6 +3072,18 @@ class RepairHistoryItem:
2444
3072
  if self.type is not None: body['type'] = self.type.value
2445
3073
  return body
2446
3074
 
3075
+ def as_shallow_dict(self) -> dict:
3076
+ """Serializes the RepairHistoryItem into a shallow dictionary of its immediate attributes."""
3077
+ body = {}
3078
+ if self.end_time is not None: body['end_time'] = self.end_time
3079
+ if self.id is not None: body['id'] = self.id
3080
+ if self.start_time is not None: body['start_time'] = self.start_time
3081
+ if self.state: body['state'] = self.state
3082
+ if self.status: body['status'] = self.status
3083
+ if self.task_run_ids: body['task_run_ids'] = self.task_run_ids
3084
+ if self.type is not None: body['type'] = self.type
3085
+ return body
3086
+
2447
3087
  @classmethod
2448
3088
  def from_dict(cls, d: Dict[str, any]) -> RepairHistoryItem:
2449
3089
  """Deserializes the RepairHistoryItem from a dictionary."""
@@ -2580,6 +3220,26 @@ class RepairRun:
2580
3220
  if self.sql_params: body['sql_params'] = self.sql_params
2581
3221
  return body
2582
3222
 
3223
+ def as_shallow_dict(self) -> dict:
3224
+ """Serializes the RepairRun into a shallow dictionary of its immediate attributes."""
3225
+ body = {}
3226
+ if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
3227
+ if self.jar_params: body['jar_params'] = self.jar_params
3228
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
3229
+ if self.latest_repair_id is not None: body['latest_repair_id'] = self.latest_repair_id
3230
+ if self.notebook_params: body['notebook_params'] = self.notebook_params
3231
+ if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
3232
+ if self.python_named_params: body['python_named_params'] = self.python_named_params
3233
+ if self.python_params: body['python_params'] = self.python_params
3234
+ if self.rerun_all_failed_tasks is not None:
3235
+ body['rerun_all_failed_tasks'] = self.rerun_all_failed_tasks
3236
+ if self.rerun_dependent_tasks is not None: body['rerun_dependent_tasks'] = self.rerun_dependent_tasks
3237
+ if self.rerun_tasks: body['rerun_tasks'] = self.rerun_tasks
3238
+ if self.run_id is not None: body['run_id'] = self.run_id
3239
+ if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
3240
+ if self.sql_params: body['sql_params'] = self.sql_params
3241
+ return body
3242
+
2583
3243
  @classmethod
2584
3244
  def from_dict(cls, d: Dict[str, any]) -> RepairRun:
2585
3245
  """Deserializes the RepairRun from a dictionary."""
@@ -2613,6 +3273,12 @@ class RepairRunResponse:
2613
3273
  if self.repair_id is not None: body['repair_id'] = self.repair_id
2614
3274
  return body
2615
3275
 
3276
+ def as_shallow_dict(self) -> dict:
3277
+ """Serializes the RepairRunResponse into a shallow dictionary of its immediate attributes."""
3278
+ body = {}
3279
+ if self.repair_id is not None: body['repair_id'] = self.repair_id
3280
+ return body
3281
+
2616
3282
  @classmethod
2617
3283
  def from_dict(cls, d: Dict[str, any]) -> RepairRunResponse:
2618
3284
  """Deserializes the RepairRunResponse from a dictionary."""
@@ -2637,6 +3303,13 @@ class ResetJob:
2637
3303
  if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
2638
3304
  return body
2639
3305
 
3306
+ def as_shallow_dict(self) -> dict:
3307
+ """Serializes the ResetJob into a shallow dictionary of its immediate attributes."""
3308
+ body = {}
3309
+ if self.job_id is not None: body['job_id'] = self.job_id
3310
+ if self.new_settings: body['new_settings'] = self.new_settings
3311
+ return body
3312
+
2640
3313
  @classmethod
2641
3314
  def from_dict(cls, d: Dict[str, any]) -> ResetJob:
2642
3315
  """Deserializes the ResetJob from a dictionary."""
@@ -2651,6 +3324,11 @@ class ResetResponse:
2651
3324
  body = {}
2652
3325
  return body
2653
3326
 
3327
+ def as_shallow_dict(self) -> dict:
3328
+ """Serializes the ResetResponse into a shallow dictionary of its immediate attributes."""
3329
+ body = {}
3330
+ return body
3331
+
2654
3332
  @classmethod
2655
3333
  def from_dict(cls, d: Dict[str, any]) -> ResetResponse:
2656
3334
  """Deserializes the ResetResponse from a dictionary."""
@@ -2670,6 +3348,13 @@ class ResolvedConditionTaskValues:
2670
3348
  if self.right is not None: body['right'] = self.right
2671
3349
  return body
2672
3350
 
3351
+ def as_shallow_dict(self) -> dict:
3352
+ """Serializes the ResolvedConditionTaskValues into a shallow dictionary of its immediate attributes."""
3353
+ body = {}
3354
+ if self.left is not None: body['left'] = self.left
3355
+ if self.right is not None: body['right'] = self.right
3356
+ return body
3357
+
2673
3358
  @classmethod
2674
3359
  def from_dict(cls, d: Dict[str, any]) -> ResolvedConditionTaskValues:
2675
3360
  """Deserializes the ResolvedConditionTaskValues from a dictionary."""
@@ -2686,6 +3371,12 @@ class ResolvedDbtTaskValues:
2686
3371
  if self.commands: body['commands'] = [v for v in self.commands]
2687
3372
  return body
2688
3373
 
3374
+ def as_shallow_dict(self) -> dict:
3375
+ """Serializes the ResolvedDbtTaskValues into a shallow dictionary of its immediate attributes."""
3376
+ body = {}
3377
+ if self.commands: body['commands'] = self.commands
3378
+ return body
3379
+
2689
3380
  @classmethod
2690
3381
  def from_dict(cls, d: Dict[str, any]) -> ResolvedDbtTaskValues:
2691
3382
  """Deserializes the ResolvedDbtTaskValues from a dictionary."""
@@ -2702,6 +3393,12 @@ class ResolvedNotebookTaskValues:
2702
3393
  if self.base_parameters: body['base_parameters'] = self.base_parameters
2703
3394
  return body
2704
3395
 
3396
+ def as_shallow_dict(self) -> dict:
3397
+ """Serializes the ResolvedNotebookTaskValues into a shallow dictionary of its immediate attributes."""
3398
+ body = {}
3399
+ if self.base_parameters: body['base_parameters'] = self.base_parameters
3400
+ return body
3401
+
2705
3402
  @classmethod
2706
3403
  def from_dict(cls, d: Dict[str, any]) -> ResolvedNotebookTaskValues:
2707
3404
  """Deserializes the ResolvedNotebookTaskValues from a dictionary."""
@@ -2718,6 +3415,12 @@ class ResolvedParamPairValues:
2718
3415
  if self.parameters: body['parameters'] = self.parameters
2719
3416
  return body
2720
3417
 
3418
+ def as_shallow_dict(self) -> dict:
3419
+ """Serializes the ResolvedParamPairValues into a shallow dictionary of its immediate attributes."""
3420
+ body = {}
3421
+ if self.parameters: body['parameters'] = self.parameters
3422
+ return body
3423
+
2721
3424
  @classmethod
2722
3425
  def from_dict(cls, d: Dict[str, any]) -> ResolvedParamPairValues:
2723
3426
  """Deserializes the ResolvedParamPairValues from a dictionary."""
@@ -2737,6 +3440,13 @@ class ResolvedPythonWheelTaskValues:
2737
3440
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2738
3441
  return body
2739
3442
 
3443
+ def as_shallow_dict(self) -> dict:
3444
+ """Serializes the ResolvedPythonWheelTaskValues into a shallow dictionary of its immediate attributes."""
3445
+ body = {}
3446
+ if self.named_parameters: body['named_parameters'] = self.named_parameters
3447
+ if self.parameters: body['parameters'] = self.parameters
3448
+ return body
3449
+
2740
3450
  @classmethod
2741
3451
  def from_dict(cls, d: Dict[str, any]) -> ResolvedPythonWheelTaskValues:
2742
3452
  """Deserializes the ResolvedPythonWheelTaskValues from a dictionary."""
@@ -2756,6 +3466,13 @@ class ResolvedRunJobTaskValues:
2756
3466
  if self.parameters: body['parameters'] = self.parameters
2757
3467
  return body
2758
3468
 
3469
+ def as_shallow_dict(self) -> dict:
3470
+ """Serializes the ResolvedRunJobTaskValues into a shallow dictionary of its immediate attributes."""
3471
+ body = {}
3472
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
3473
+ if self.parameters: body['parameters'] = self.parameters
3474
+ return body
3475
+
2759
3476
  @classmethod
2760
3477
  def from_dict(cls, d: Dict[str, any]) -> ResolvedRunJobTaskValues:
2761
3478
  """Deserializes the ResolvedRunJobTaskValues from a dictionary."""
@@ -2772,6 +3489,12 @@ class ResolvedStringParamsValues:
2772
3489
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2773
3490
  return body
2774
3491
 
3492
+ def as_shallow_dict(self) -> dict:
3493
+ """Serializes the ResolvedStringParamsValues into a shallow dictionary of its immediate attributes."""
3494
+ body = {}
3495
+ if self.parameters: body['parameters'] = self.parameters
3496
+ return body
3497
+
2775
3498
  @classmethod
2776
3499
  def from_dict(cls, d: Dict[str, any]) -> ResolvedStringParamsValues:
2777
3500
  """Deserializes the ResolvedStringParamsValues from a dictionary."""
@@ -2815,6 +3538,21 @@ class ResolvedValues:
2815
3538
  if self.sql_task: body['sql_task'] = self.sql_task.as_dict()
2816
3539
  return body
2817
3540
 
3541
+ def as_shallow_dict(self) -> dict:
3542
+ """Serializes the ResolvedValues into a shallow dictionary of its immediate attributes."""
3543
+ body = {}
3544
+ if self.condition_task: body['condition_task'] = self.condition_task
3545
+ if self.dbt_task: body['dbt_task'] = self.dbt_task
3546
+ if self.notebook_task: body['notebook_task'] = self.notebook_task
3547
+ if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
3548
+ if self.run_job_task: body['run_job_task'] = self.run_job_task
3549
+ if self.simulation_task: body['simulation_task'] = self.simulation_task
3550
+ if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
3551
+ if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
3552
+ if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
3553
+ if self.sql_task: body['sql_task'] = self.sql_task
3554
+ return body
3555
+
2818
3556
  @classmethod
2819
3557
  def from_dict(cls, d: Dict[str, any]) -> ResolvedValues:
2820
3558
  """Deserializes the ResolvedValues from a dictionary."""
@@ -3017,6 +3755,45 @@ class Run:
3017
3755
  if self.trigger_info: body['trigger_info'] = self.trigger_info.as_dict()
3018
3756
  return body
3019
3757
 
3758
+ def as_shallow_dict(self) -> dict:
3759
+ """Serializes the Run into a shallow dictionary of its immediate attributes."""
3760
+ body = {}
3761
+ if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
3762
+ if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
3763
+ if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
3764
+ if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
3765
+ if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
3766
+ if self.description is not None: body['description'] = self.description
3767
+ if self.end_time is not None: body['end_time'] = self.end_time
3768
+ if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
3769
+ if self.git_source: body['git_source'] = self.git_source
3770
+ if self.iterations: body['iterations'] = self.iterations
3771
+ if self.job_clusters: body['job_clusters'] = self.job_clusters
3772
+ if self.job_id is not None: body['job_id'] = self.job_id
3773
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
3774
+ if self.job_run_id is not None: body['job_run_id'] = self.job_run_id
3775
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
3776
+ if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
3777
+ if self.original_attempt_run_id is not None:
3778
+ body['original_attempt_run_id'] = self.original_attempt_run_id
3779
+ if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters
3780
+ if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
3781
+ if self.repair_history: body['repair_history'] = self.repair_history
3782
+ if self.run_duration is not None: body['run_duration'] = self.run_duration
3783
+ if self.run_id is not None: body['run_id'] = self.run_id
3784
+ if self.run_name is not None: body['run_name'] = self.run_name
3785
+ if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
3786
+ if self.run_type is not None: body['run_type'] = self.run_type
3787
+ if self.schedule: body['schedule'] = self.schedule
3788
+ if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
3789
+ if self.start_time is not None: body['start_time'] = self.start_time
3790
+ if self.state: body['state'] = self.state
3791
+ if self.status: body['status'] = self.status
3792
+ if self.tasks: body['tasks'] = self.tasks
3793
+ if self.trigger is not None: body['trigger'] = self.trigger
3794
+ if self.trigger_info: body['trigger_info'] = self.trigger_info
3795
+ return body
3796
+
3020
3797
  @classmethod
3021
3798
  def from_dict(cls, d: Dict[str, any]) -> Run:
3022
3799
  """Deserializes the Run from a dictionary."""
@@ -3089,6 +3866,15 @@ class RunConditionTask:
3089
3866
  if self.right is not None: body['right'] = self.right
3090
3867
  return body
3091
3868
 
3869
+ def as_shallow_dict(self) -> dict:
3870
+ """Serializes the RunConditionTask into a shallow dictionary of its immediate attributes."""
3871
+ body = {}
3872
+ if self.left is not None: body['left'] = self.left
3873
+ if self.op is not None: body['op'] = self.op
3874
+ if self.outcome is not None: body['outcome'] = self.outcome
3875
+ if self.right is not None: body['right'] = self.right
3876
+ return body
3877
+
3092
3878
  @classmethod
3093
3879
  def from_dict(cls, d: Dict[str, any]) -> RunConditionTask:
3094
3880
  """Deserializes the RunConditionTask from a dictionary."""
@@ -3123,6 +3909,15 @@ class RunForEachTask:
3123
3909
  if self.task: body['task'] = self.task.as_dict()
3124
3910
  return body
3125
3911
 
3912
+ def as_shallow_dict(self) -> dict:
3913
+ """Serializes the RunForEachTask into a shallow dictionary of its immediate attributes."""
3914
+ body = {}
3915
+ if self.concurrency is not None: body['concurrency'] = self.concurrency
3916
+ if self.inputs is not None: body['inputs'] = self.inputs
3917
+ if self.stats: body['stats'] = self.stats
3918
+ if self.task: body['task'] = self.task
3919
+ return body
3920
+
3126
3921
  @classmethod
3127
3922
  def from_dict(cls, d: Dict[str, any]) -> RunForEachTask:
3128
3923
  """Deserializes the RunForEachTask from a dictionary."""
@@ -3161,6 +3956,12 @@ class RunJobOutput:
3161
3956
  if self.run_id is not None: body['run_id'] = self.run_id
3162
3957
  return body
3163
3958
 
3959
+ def as_shallow_dict(self) -> dict:
3960
+ """Serializes the RunJobOutput into a shallow dictionary of its immediate attributes."""
3961
+ body = {}
3962
+ if self.run_id is not None: body['run_id'] = self.run_id
3963
+ return body
3964
+
3164
3965
  @classmethod
3165
3966
  def from_dict(cls, d: Dict[str, any]) -> RunJobOutput:
3166
3967
  """Deserializes the RunJobOutput from a dictionary."""
@@ -3264,6 +4065,21 @@ class RunJobTask:
3264
4065
  if self.sql_params: body['sql_params'] = self.sql_params
3265
4066
  return body
3266
4067
 
4068
+ def as_shallow_dict(self) -> dict:
4069
+ """Serializes the RunJobTask into a shallow dictionary of its immediate attributes."""
4070
+ body = {}
4071
+ if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
4072
+ if self.jar_params: body['jar_params'] = self.jar_params
4073
+ if self.job_id is not None: body['job_id'] = self.job_id
4074
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
4075
+ if self.notebook_params: body['notebook_params'] = self.notebook_params
4076
+ if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
4077
+ if self.python_named_params: body['python_named_params'] = self.python_named_params
4078
+ if self.python_params: body['python_params'] = self.python_params
4079
+ if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
4080
+ if self.sql_params: body['sql_params'] = self.sql_params
4081
+ return body
4082
+
3267
4083
  @classmethod
3268
4084
  def from_dict(cls, d: Dict[str, any]) -> RunJobTask:
3269
4085
  """Deserializes the RunJobTask from a dictionary."""
@@ -3435,6 +4251,24 @@ class RunNow:
3435
4251
  if self.sql_params: body['sql_params'] = self.sql_params
3436
4252
  return body
3437
4253
 
4254
+ def as_shallow_dict(self) -> dict:
4255
+ """Serializes the RunNow into a shallow dictionary of its immediate attributes."""
4256
+ body = {}
4257
+ if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
4258
+ if self.idempotency_token is not None: body['idempotency_token'] = self.idempotency_token
4259
+ if self.jar_params: body['jar_params'] = self.jar_params
4260
+ if self.job_id is not None: body['job_id'] = self.job_id
4261
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
4262
+ if self.notebook_params: body['notebook_params'] = self.notebook_params
4263
+ if self.only: body['only'] = self.only
4264
+ if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
4265
+ if self.python_named_params: body['python_named_params'] = self.python_named_params
4266
+ if self.python_params: body['python_params'] = self.python_params
4267
+ if self.queue: body['queue'] = self.queue
4268
+ if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
4269
+ if self.sql_params: body['sql_params'] = self.sql_params
4270
+ return body
4271
+
3438
4272
  @classmethod
3439
4273
  def from_dict(cls, d: Dict[str, any]) -> RunNow:
3440
4274
  """Deserializes the RunNow from a dictionary."""
@@ -3470,6 +4304,13 @@ class RunNowResponse:
3470
4304
  if self.run_id is not None: body['run_id'] = self.run_id
3471
4305
  return body
3472
4306
 
4307
+ def as_shallow_dict(self) -> dict:
4308
+ """Serializes the RunNowResponse into a shallow dictionary of its immediate attributes."""
4309
+ body = {}
4310
+ if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
4311
+ if self.run_id is not None: body['run_id'] = self.run_id
4312
+ return body
4313
+
3473
4314
  @classmethod
3474
4315
  def from_dict(cls, d: Dict[str, any]) -> RunNowResponse:
3475
4316
  """Deserializes the RunNowResponse from a dictionary."""
@@ -3536,6 +4377,21 @@ class RunOutput:
3536
4377
  if self.sql_output: body['sql_output'] = self.sql_output.as_dict()
3537
4378
  return body
3538
4379
 
4380
+ def as_shallow_dict(self) -> dict:
4381
+ """Serializes the RunOutput into a shallow dictionary of its immediate attributes."""
4382
+ body = {}
4383
+ if self.dbt_output: body['dbt_output'] = self.dbt_output
4384
+ if self.error is not None: body['error'] = self.error
4385
+ if self.error_trace is not None: body['error_trace'] = self.error_trace
4386
+ if self.info is not None: body['info'] = self.info
4387
+ if self.logs is not None: body['logs'] = self.logs
4388
+ if self.logs_truncated is not None: body['logs_truncated'] = self.logs_truncated
4389
+ if self.metadata: body['metadata'] = self.metadata
4390
+ if self.notebook_output: body['notebook_output'] = self.notebook_output
4391
+ if self.run_job_output: body['run_job_output'] = self.run_job_output
4392
+ if self.sql_output: body['sql_output'] = self.sql_output
4393
+ return body
4394
+
3539
4395
  @classmethod
3540
4396
  def from_dict(cls, d: Dict[str, any]) -> RunOutput:
3541
4397
  """Deserializes the RunOutput from a dictionary."""
@@ -3640,6 +4496,19 @@ class RunParameters:
3640
4496
  if self.sql_params: body['sql_params'] = self.sql_params
3641
4497
  return body
3642
4498
 
4499
+ def as_shallow_dict(self) -> dict:
4500
+ """Serializes the RunParameters into a shallow dictionary of its immediate attributes."""
4501
+ body = {}
4502
+ if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
4503
+ if self.jar_params: body['jar_params'] = self.jar_params
4504
+ if self.notebook_params: body['notebook_params'] = self.notebook_params
4505
+ if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
4506
+ if self.python_named_params: body['python_named_params'] = self.python_named_params
4507
+ if self.python_params: body['python_params'] = self.python_params
4508
+ if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
4509
+ if self.sql_params: body['sql_params'] = self.sql_params
4510
+ return body
4511
+
3643
4512
  @classmethod
3644
4513
  def from_dict(cls, d: Dict[str, any]) -> RunParameters:
3645
4514
  """Deserializes the RunParameters from a dictionary."""
@@ -3709,6 +4578,17 @@ class RunState:
3709
4578
  body['user_cancelled_or_timedout'] = self.user_cancelled_or_timedout
3710
4579
  return body
3711
4580
 
4581
+ def as_shallow_dict(self) -> dict:
4582
+ """Serializes the RunState into a shallow dictionary of its immediate attributes."""
4583
+ body = {}
4584
+ if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state
4585
+ if self.queue_reason is not None: body['queue_reason'] = self.queue_reason
4586
+ if self.result_state is not None: body['result_state'] = self.result_state
4587
+ if self.state_message is not None: body['state_message'] = self.state_message
4588
+ if self.user_cancelled_or_timedout is not None:
4589
+ body['user_cancelled_or_timedout'] = self.user_cancelled_or_timedout
4590
+ return body
4591
+
3712
4592
  @classmethod
3713
4593
  def from_dict(cls, d: Dict[str, any]) -> RunState:
3714
4594
  """Deserializes the RunState from a dictionary."""
@@ -3741,6 +4621,14 @@ class RunStatus:
3741
4621
  if self.termination_details: body['termination_details'] = self.termination_details.as_dict()
3742
4622
  return body
3743
4623
 
4624
+ def as_shallow_dict(self) -> dict:
4625
+ """Serializes the RunStatus into a shallow dictionary of its immediate attributes."""
4626
+ body = {}
4627
+ if self.queue_details: body['queue_details'] = self.queue_details
4628
+ if self.state is not None: body['state'] = self.state
4629
+ if self.termination_details: body['termination_details'] = self.termination_details
4630
+ return body
4631
+
3744
4632
  @classmethod
3745
4633
  def from_dict(cls, d: Dict[str, any]) -> RunStatus:
3746
4634
  """Deserializes the RunStatus from a dictionary."""
@@ -3972,6 +4860,50 @@ class RunTask:
3972
4860
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
3973
4861
  return body
3974
4862
 
4863
+ def as_shallow_dict(self) -> dict:
4864
+ """Serializes the RunTask into a shallow dictionary of its immediate attributes."""
4865
+ body = {}
4866
+ if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
4867
+ if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
4868
+ if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
4869
+ if self.condition_task: body['condition_task'] = self.condition_task
4870
+ if self.dbt_task: body['dbt_task'] = self.dbt_task
4871
+ if self.depends_on: body['depends_on'] = self.depends_on
4872
+ if self.description is not None: body['description'] = self.description
4873
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
4874
+ if self.end_time is not None: body['end_time'] = self.end_time
4875
+ if self.environment_key is not None: body['environment_key'] = self.environment_key
4876
+ if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
4877
+ if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
4878
+ if self.for_each_task: body['for_each_task'] = self.for_each_task
4879
+ if self.git_source: body['git_source'] = self.git_source
4880
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
4881
+ if self.libraries: body['libraries'] = self.libraries
4882
+ if self.new_cluster: body['new_cluster'] = self.new_cluster
4883
+ if self.notebook_task: body['notebook_task'] = self.notebook_task
4884
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
4885
+ if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
4886
+ if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
4887
+ if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
4888
+ if self.resolved_values: body['resolved_values'] = self.resolved_values
4889
+ if self.run_duration is not None: body['run_duration'] = self.run_duration
4890
+ if self.run_id is not None: body['run_id'] = self.run_id
4891
+ if self.run_if is not None: body['run_if'] = self.run_if
4892
+ if self.run_job_task: body['run_job_task'] = self.run_job_task
4893
+ if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
4894
+ if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
4895
+ if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
4896
+ if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
4897
+ if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
4898
+ if self.sql_task: body['sql_task'] = self.sql_task
4899
+ if self.start_time is not None: body['start_time'] = self.start_time
4900
+ if self.state: body['state'] = self.state
4901
+ if self.status: body['status'] = self.status
4902
+ if self.task_key is not None: body['task_key'] = self.task_key
4903
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
4904
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
4905
+ return body
4906
+
3975
4907
  @classmethod
3976
4908
  def from_dict(cls, d: Dict[str, any]) -> RunTask:
3977
4909
  """Deserializes the RunTask from a dictionary."""
@@ -4069,6 +5001,14 @@ class SparkJarTask:
4069
5001
  if self.parameters: body['parameters'] = [v for v in self.parameters]
4070
5002
  return body
4071
5003
 
5004
+ def as_shallow_dict(self) -> dict:
5005
+ """Serializes the SparkJarTask into a shallow dictionary of its immediate attributes."""
5006
+ body = {}
5007
+ if self.jar_uri is not None: body['jar_uri'] = self.jar_uri
5008
+ if self.main_class_name is not None: body['main_class_name'] = self.main_class_name
5009
+ if self.parameters: body['parameters'] = self.parameters
5010
+ return body
5011
+
4072
5012
  @classmethod
4073
5013
  def from_dict(cls, d: Dict[str, any]) -> SparkJarTask:
4074
5014
  """Deserializes the SparkJarTask from a dictionary."""
@@ -4109,6 +5049,14 @@ class SparkPythonTask:
4109
5049
  if self.source is not None: body['source'] = self.source.value
4110
5050
  return body
4111
5051
 
5052
+ def as_shallow_dict(self) -> dict:
5053
+ """Serializes the SparkPythonTask into a shallow dictionary of its immediate attributes."""
5054
+ body = {}
5055
+ if self.parameters: body['parameters'] = self.parameters
5056
+ if self.python_file is not None: body['python_file'] = self.python_file
5057
+ if self.source is not None: body['source'] = self.source
5058
+ return body
5059
+
4112
5060
  @classmethod
4113
5061
  def from_dict(cls, d: Dict[str, any]) -> SparkPythonTask:
4114
5062
  """Deserializes the SparkPythonTask from a dictionary."""
@@ -4132,6 +5080,12 @@ class SparkSubmitTask:
4132
5080
  if self.parameters: body['parameters'] = [v for v in self.parameters]
4133
5081
  return body
4134
5082
 
5083
+ def as_shallow_dict(self) -> dict:
5084
+ """Serializes the SparkSubmitTask into a shallow dictionary of its immediate attributes."""
5085
+ body = {}
5086
+ if self.parameters: body['parameters'] = self.parameters
5087
+ return body
5088
+
4135
5089
  @classmethod
4136
5090
  def from_dict(cls, d: Dict[str, any]) -> SparkSubmitTask:
4137
5091
  """Deserializes the SparkSubmitTask from a dictionary."""
@@ -4169,6 +5123,16 @@ class SqlAlertOutput:
4169
5123
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4170
5124
  return body
4171
5125
 
5126
+ def as_shallow_dict(self) -> dict:
5127
+ """Serializes the SqlAlertOutput into a shallow dictionary of its immediate attributes."""
5128
+ body = {}
5129
+ if self.alert_state is not None: body['alert_state'] = self.alert_state
5130
+ if self.output_link is not None: body['output_link'] = self.output_link
5131
+ if self.query_text is not None: body['query_text'] = self.query_text
5132
+ if self.sql_statements: body['sql_statements'] = self.sql_statements
5133
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5134
+ return body
5135
+
4172
5136
  @classmethod
4173
5137
  def from_dict(cls, d: Dict[str, any]) -> SqlAlertOutput:
4174
5138
  """Deserializes the SqlAlertOutput from a dictionary."""
@@ -4205,6 +5169,13 @@ class SqlDashboardOutput:
4205
5169
  if self.widgets: body['widgets'] = [v.as_dict() for v in self.widgets]
4206
5170
  return body
4207
5171
 
5172
+ def as_shallow_dict(self) -> dict:
5173
+ """Serializes the SqlDashboardOutput into a shallow dictionary of its immediate attributes."""
5174
+ body = {}
5175
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5176
+ if self.widgets: body['widgets'] = self.widgets
5177
+ return body
5178
+
4208
5179
  @classmethod
4209
5180
  def from_dict(cls, d: Dict[str, any]) -> SqlDashboardOutput:
4210
5181
  """Deserializes the SqlDashboardOutput from a dictionary."""
@@ -4247,6 +5218,18 @@ class SqlDashboardWidgetOutput:
4247
5218
  if self.widget_title is not None: body['widget_title'] = self.widget_title
4248
5219
  return body
4249
5220
 
5221
+ def as_shallow_dict(self) -> dict:
5222
+ """Serializes the SqlDashboardWidgetOutput into a shallow dictionary of its immediate attributes."""
5223
+ body = {}
5224
+ if self.end_time is not None: body['end_time'] = self.end_time
5225
+ if self.error: body['error'] = self.error
5226
+ if self.output_link is not None: body['output_link'] = self.output_link
5227
+ if self.start_time is not None: body['start_time'] = self.start_time
5228
+ if self.status is not None: body['status'] = self.status
5229
+ if self.widget_id is not None: body['widget_id'] = self.widget_id
5230
+ if self.widget_title is not None: body['widget_title'] = self.widget_title
5231
+ return body
5232
+
4250
5233
  @classmethod
4251
5234
  def from_dict(cls, d: Dict[str, any]) -> SqlDashboardWidgetOutput:
4252
5235
  """Deserializes the SqlDashboardWidgetOutput from a dictionary."""
@@ -4287,6 +5270,14 @@ class SqlOutput:
4287
5270
  if self.query_output: body['query_output'] = self.query_output.as_dict()
4288
5271
  return body
4289
5272
 
5273
+ def as_shallow_dict(self) -> dict:
5274
+ """Serializes the SqlOutput into a shallow dictionary of its immediate attributes."""
5275
+ body = {}
5276
+ if self.alert_output: body['alert_output'] = self.alert_output
5277
+ if self.dashboard_output: body['dashboard_output'] = self.dashboard_output
5278
+ if self.query_output: body['query_output'] = self.query_output
5279
+ return body
5280
+
4290
5281
  @classmethod
4291
5282
  def from_dict(cls, d: Dict[str, any]) -> SqlOutput:
4292
5283
  """Deserializes the SqlOutput from a dictionary."""
@@ -4306,6 +5297,12 @@ class SqlOutputError:
4306
5297
  if self.message is not None: body['message'] = self.message
4307
5298
  return body
4308
5299
 
5300
+ def as_shallow_dict(self) -> dict:
5301
+ """Serializes the SqlOutputError into a shallow dictionary of its immediate attributes."""
5302
+ body = {}
5303
+ if self.message is not None: body['message'] = self.message
5304
+ return body
5305
+
4309
5306
  @classmethod
4310
5307
  def from_dict(cls, d: Dict[str, any]) -> SqlOutputError:
4311
5308
  """Deserializes the SqlOutputError from a dictionary."""
@@ -4338,6 +5335,16 @@ class SqlQueryOutput:
4338
5335
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4339
5336
  return body
4340
5337
 
5338
+ def as_shallow_dict(self) -> dict:
5339
+ """Serializes the SqlQueryOutput into a shallow dictionary of its immediate attributes."""
5340
+ body = {}
5341
+ if self.endpoint_id is not None: body['endpoint_id'] = self.endpoint_id
5342
+ if self.output_link is not None: body['output_link'] = self.output_link
5343
+ if self.query_text is not None: body['query_text'] = self.query_text
5344
+ if self.sql_statements: body['sql_statements'] = self.sql_statements
5345
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5346
+ return body
5347
+
4341
5348
  @classmethod
4342
5349
  def from_dict(cls, d: Dict[str, any]) -> SqlQueryOutput:
4343
5350
  """Deserializes the SqlQueryOutput from a dictionary."""
@@ -4359,6 +5366,12 @@ class SqlStatementOutput:
4359
5366
  if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
4360
5367
  return body
4361
5368
 
5369
+ def as_shallow_dict(self) -> dict:
5370
+ """Serializes the SqlStatementOutput into a shallow dictionary of its immediate attributes."""
5371
+ body = {}
5372
+ if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
5373
+ return body
5374
+
4362
5375
  @classmethod
4363
5376
  def from_dict(cls, d: Dict[str, any]) -> SqlStatementOutput:
4364
5377
  """Deserializes the SqlStatementOutput from a dictionary."""
@@ -4399,6 +5412,17 @@ class SqlTask:
4399
5412
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4400
5413
  return body
4401
5414
 
5415
+ def as_shallow_dict(self) -> dict:
5416
+ """Serializes the SqlTask into a shallow dictionary of its immediate attributes."""
5417
+ body = {}
5418
+ if self.alert: body['alert'] = self.alert
5419
+ if self.dashboard: body['dashboard'] = self.dashboard
5420
+ if self.file: body['file'] = self.file
5421
+ if self.parameters: body['parameters'] = self.parameters
5422
+ if self.query: body['query'] = self.query
5423
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5424
+ return body
5425
+
4402
5426
  @classmethod
4403
5427
  def from_dict(cls, d: Dict[str, any]) -> SqlTask:
4404
5428
  """Deserializes the SqlTask from a dictionary."""
@@ -4429,6 +5453,14 @@ class SqlTaskAlert:
4429
5453
  if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
4430
5454
  return body
4431
5455
 
5456
+ def as_shallow_dict(self) -> dict:
5457
+ """Serializes the SqlTaskAlert into a shallow dictionary of its immediate attributes."""
5458
+ body = {}
5459
+ if self.alert_id is not None: body['alert_id'] = self.alert_id
5460
+ if self.pause_subscriptions is not None: body['pause_subscriptions'] = self.pause_subscriptions
5461
+ if self.subscriptions: body['subscriptions'] = self.subscriptions
5462
+ return body
5463
+
4432
5464
  @classmethod
4433
5465
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskAlert:
4434
5466
  """Deserializes the SqlTaskAlert from a dictionary."""
@@ -4460,6 +5492,15 @@ class SqlTaskDashboard:
4460
5492
  if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
4461
5493
  return body
4462
5494
 
5495
+ def as_shallow_dict(self) -> dict:
5496
+ """Serializes the SqlTaskDashboard into a shallow dictionary of its immediate attributes."""
5497
+ body = {}
5498
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
5499
+ if self.dashboard_id is not None: body['dashboard_id'] = self.dashboard_id
5500
+ if self.pause_subscriptions is not None: body['pause_subscriptions'] = self.pause_subscriptions
5501
+ if self.subscriptions: body['subscriptions'] = self.subscriptions
5502
+ return body
5503
+
4463
5504
  @classmethod
4464
5505
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskDashboard:
4465
5506
  """Deserializes the SqlTaskDashboard from a dictionary."""
@@ -4491,6 +5532,13 @@ class SqlTaskFile:
4491
5532
  if self.source is not None: body['source'] = self.source.value
4492
5533
  return body
4493
5534
 
5535
+ def as_shallow_dict(self) -> dict:
5536
+ """Serializes the SqlTaskFile into a shallow dictionary of its immediate attributes."""
5537
+ body = {}
5538
+ if self.path is not None: body['path'] = self.path
5539
+ if self.source is not None: body['source'] = self.source
5540
+ return body
5541
+
4494
5542
  @classmethod
4495
5543
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskFile:
4496
5544
  """Deserializes the SqlTaskFile from a dictionary."""
@@ -4508,6 +5556,12 @@ class SqlTaskQuery:
4508
5556
  if self.query_id is not None: body['query_id'] = self.query_id
4509
5557
  return body
4510
5558
 
5559
+ def as_shallow_dict(self) -> dict:
5560
+ """Serializes the SqlTaskQuery into a shallow dictionary of its immediate attributes."""
5561
+ body = {}
5562
+ if self.query_id is not None: body['query_id'] = self.query_id
5563
+ return body
5564
+
4511
5565
  @classmethod
4512
5566
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskQuery:
4513
5567
  """Deserializes the SqlTaskQuery from a dictionary."""
@@ -4532,6 +5586,13 @@ class SqlTaskSubscription:
4532
5586
  if self.user_name is not None: body['user_name'] = self.user_name
4533
5587
  return body
4534
5588
 
5589
+ def as_shallow_dict(self) -> dict:
5590
+ """Serializes the SqlTaskSubscription into a shallow dictionary of its immediate attributes."""
5591
+ body = {}
5592
+ if self.destination_id is not None: body['destination_id'] = self.destination_id
5593
+ if self.user_name is not None: body['user_name'] = self.user_name
5594
+ return body
5595
+
4535
5596
  @classmethod
4536
5597
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskSubscription:
4537
5598
  """Deserializes the SqlTaskSubscription from a dictionary."""
@@ -4622,6 +5683,25 @@ class SubmitRun:
4622
5683
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
4623
5684
  return body
4624
5685
 
5686
+ def as_shallow_dict(self) -> dict:
5687
+ """Serializes the SubmitRun into a shallow dictionary of its immediate attributes."""
5688
+ body = {}
5689
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
5690
+ if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
5691
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
5692
+ if self.environments: body['environments'] = self.environments
5693
+ if self.git_source: body['git_source'] = self.git_source
5694
+ if self.health: body['health'] = self.health
5695
+ if self.idempotency_token is not None: body['idempotency_token'] = self.idempotency_token
5696
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
5697
+ if self.queue: body['queue'] = self.queue
5698
+ if self.run_as: body['run_as'] = self.run_as
5699
+ if self.run_name is not None: body['run_name'] = self.run_name
5700
+ if self.tasks: body['tasks'] = self.tasks
5701
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
5702
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
5703
+ return body
5704
+
4625
5705
  @classmethod
4626
5706
  def from_dict(cls, d: Dict[str, any]) -> SubmitRun:
4627
5707
  """Deserializes the SubmitRun from a dictionary."""
@@ -4654,6 +5734,12 @@ class SubmitRunResponse:
4654
5734
  if self.run_id is not None: body['run_id'] = self.run_id
4655
5735
  return body
4656
5736
 
5737
+ def as_shallow_dict(self) -> dict:
5738
+ """Serializes the SubmitRunResponse into a shallow dictionary of its immediate attributes."""
5739
+ body = {}
5740
+ if self.run_id is not None: body['run_id'] = self.run_id
5741
+ return body
5742
+
4657
5743
  @classmethod
4658
5744
  def from_dict(cls, d: Dict[str, any]) -> SubmitRunResponse:
4659
5745
  """Deserializes the SubmitRunResponse from a dictionary."""
@@ -4797,6 +5883,35 @@ class SubmitTask:
4797
5883
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
4798
5884
  return body
4799
5885
 
5886
+ def as_shallow_dict(self) -> dict:
5887
+ """Serializes the SubmitTask into a shallow dictionary of its immediate attributes."""
5888
+ body = {}
5889
+ if self.condition_task: body['condition_task'] = self.condition_task
5890
+ if self.dbt_task: body['dbt_task'] = self.dbt_task
5891
+ if self.depends_on: body['depends_on'] = self.depends_on
5892
+ if self.description is not None: body['description'] = self.description
5893
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
5894
+ if self.environment_key is not None: body['environment_key'] = self.environment_key
5895
+ if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
5896
+ if self.for_each_task: body['for_each_task'] = self.for_each_task
5897
+ if self.health: body['health'] = self.health
5898
+ if self.libraries: body['libraries'] = self.libraries
5899
+ if self.new_cluster: body['new_cluster'] = self.new_cluster
5900
+ if self.notebook_task: body['notebook_task'] = self.notebook_task
5901
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
5902
+ if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
5903
+ if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
5904
+ if self.run_if is not None: body['run_if'] = self.run_if
5905
+ if self.run_job_task: body['run_job_task'] = self.run_job_task
5906
+ if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
5907
+ if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
5908
+ if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
5909
+ if self.sql_task: body['sql_task'] = self.sql_task
5910
+ if self.task_key is not None: body['task_key'] = self.task_key
5911
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
5912
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
5913
+ return body
5914
+
4800
5915
  @classmethod
4801
5916
  def from_dict(cls, d: Dict[str, any]) -> SubmitTask:
4802
5917
  """Deserializes the SubmitTask from a dictionary."""
@@ -4855,6 +5970,17 @@ class TableUpdateTriggerConfiguration:
4855
5970
  body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
4856
5971
  return body
4857
5972
 
5973
+ def as_shallow_dict(self) -> dict:
5974
+ """Serializes the TableUpdateTriggerConfiguration into a shallow dictionary of its immediate attributes."""
5975
+ body = {}
5976
+ if self.condition is not None: body['condition'] = self.condition
5977
+ if self.min_time_between_triggers_seconds is not None:
5978
+ body['min_time_between_triggers_seconds'] = self.min_time_between_triggers_seconds
5979
+ if self.table_names: body['table_names'] = self.table_names
5980
+ if self.wait_after_last_change_seconds is not None:
5981
+ body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
5982
+ return body
5983
+
4858
5984
  @classmethod
4859
5985
  def from_dict(cls, d: Dict[str, any]) -> TableUpdateTriggerConfiguration:
4860
5986
  """Deserializes the TableUpdateTriggerConfiguration from a dictionary."""
@@ -5033,6 +6159,42 @@ class Task:
5033
6159
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
5034
6160
  return body
5035
6161
 
6162
+ def as_shallow_dict(self) -> dict:
6163
+ """Serializes the Task into a shallow dictionary of its immediate attributes."""
6164
+ body = {}
6165
+ if self.condition_task: body['condition_task'] = self.condition_task
6166
+ if self.dbt_task: body['dbt_task'] = self.dbt_task
6167
+ if self.depends_on: body['depends_on'] = self.depends_on
6168
+ if self.description is not None: body['description'] = self.description
6169
+ if self.disable_auto_optimization is not None:
6170
+ body['disable_auto_optimization'] = self.disable_auto_optimization
6171
+ if self.email_notifications: body['email_notifications'] = self.email_notifications
6172
+ if self.environment_key is not None: body['environment_key'] = self.environment_key
6173
+ if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
6174
+ if self.for_each_task: body['for_each_task'] = self.for_each_task
6175
+ if self.health: body['health'] = self.health
6176
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
6177
+ if self.libraries: body['libraries'] = self.libraries
6178
+ if self.max_retries is not None: body['max_retries'] = self.max_retries
6179
+ if self.min_retry_interval_millis is not None:
6180
+ body['min_retry_interval_millis'] = self.min_retry_interval_millis
6181
+ if self.new_cluster: body['new_cluster'] = self.new_cluster
6182
+ if self.notebook_task: body['notebook_task'] = self.notebook_task
6183
+ if self.notification_settings: body['notification_settings'] = self.notification_settings
6184
+ if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
6185
+ if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
6186
+ if self.retry_on_timeout is not None: body['retry_on_timeout'] = self.retry_on_timeout
6187
+ if self.run_if is not None: body['run_if'] = self.run_if
6188
+ if self.run_job_task: body['run_job_task'] = self.run_job_task
6189
+ if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
6190
+ if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
6191
+ if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
6192
+ if self.sql_task: body['sql_task'] = self.sql_task
6193
+ if self.task_key is not None: body['task_key'] = self.task_key
6194
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
6195
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
6196
+ return body
6197
+
5036
6198
  @classmethod
5037
6199
  def from_dict(cls, d: Dict[str, any]) -> Task:
5038
6200
  """Deserializes the Task from a dictionary."""
@@ -5083,6 +6245,13 @@ class TaskDependency:
5083
6245
  if self.task_key is not None: body['task_key'] = self.task_key
5084
6246
  return body
5085
6247
 
6248
+ def as_shallow_dict(self) -> dict:
6249
+ """Serializes the TaskDependency into a shallow dictionary of its immediate attributes."""
6250
+ body = {}
6251
+ if self.outcome is not None: body['outcome'] = self.outcome
6252
+ if self.task_key is not None: body['task_key'] = self.task_key
6253
+ return body
6254
+
5086
6255
  @classmethod
5087
6256
  def from_dict(cls, d: Dict[str, any]) -> TaskDependency:
5088
6257
  """Deserializes the TaskDependency from a dictionary."""
@@ -5140,6 +6309,20 @@ class TaskEmailNotifications:
5140
6309
  if self.on_success: body['on_success'] = [v for v in self.on_success]
5141
6310
  return body
5142
6311
 
6312
+ def as_shallow_dict(self) -> dict:
6313
+ """Serializes the TaskEmailNotifications into a shallow dictionary of its immediate attributes."""
6314
+ body = {}
6315
+ if self.no_alert_for_skipped_runs is not None:
6316
+ body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
6317
+ if self.on_duration_warning_threshold_exceeded:
6318
+ body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
6319
+ if self.on_failure: body['on_failure'] = self.on_failure
6320
+ if self.on_start: body['on_start'] = self.on_start
6321
+ if self.on_streaming_backlog_exceeded:
6322
+ body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
6323
+ if self.on_success: body['on_success'] = self.on_success
6324
+ return body
6325
+
5143
6326
  @classmethod
5144
6327
  def from_dict(cls, d: Dict[str, any]) -> TaskEmailNotifications:
5145
6328
  """Deserializes the TaskEmailNotifications from a dictionary."""
@@ -5177,6 +6360,16 @@ class TaskNotificationSettings:
5177
6360
  body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
5178
6361
  return body
5179
6362
 
6363
+ def as_shallow_dict(self) -> dict:
6364
+ """Serializes the TaskNotificationSettings into a shallow dictionary of its immediate attributes."""
6365
+ body = {}
6366
+ if self.alert_on_last_attempt is not None: body['alert_on_last_attempt'] = self.alert_on_last_attempt
6367
+ if self.no_alert_for_canceled_runs is not None:
6368
+ body['no_alert_for_canceled_runs'] = self.no_alert_for_canceled_runs
6369
+ if self.no_alert_for_skipped_runs is not None:
6370
+ body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
6371
+ return body
6372
+
5180
6373
  @classmethod
5181
6374
  def from_dict(cls, d: Dict[str, any]) -> TaskNotificationSettings:
5182
6375
  """Deserializes the TaskNotificationSettings from a dictionary."""
@@ -5306,6 +6499,14 @@ class TerminationDetails:
5306
6499
  if self.type is not None: body['type'] = self.type.value
5307
6500
  return body
5308
6501
 
6502
+ def as_shallow_dict(self) -> dict:
6503
+ """Serializes the TerminationDetails into a shallow dictionary of its immediate attributes."""
6504
+ body = {}
6505
+ if self.code is not None: body['code'] = self.code
6506
+ if self.message is not None: body['message'] = self.message
6507
+ if self.type is not None: body['type'] = self.type
6508
+ return body
6509
+
5309
6510
  @classmethod
5310
6511
  def from_dict(cls, d: Dict[str, any]) -> TerminationDetails:
5311
6512
  """Deserializes the TerminationDetails from a dictionary."""
@@ -5342,6 +6543,12 @@ class TriggerInfo:
5342
6543
  if self.run_id is not None: body['run_id'] = self.run_id
5343
6544
  return body
5344
6545
 
6546
+ def as_shallow_dict(self) -> dict:
6547
+ """Serializes the TriggerInfo into a shallow dictionary of its immediate attributes."""
6548
+ body = {}
6549
+ if self.run_id is not None: body['run_id'] = self.run_id
6550
+ return body
6551
+
5345
6552
  @classmethod
5346
6553
  def from_dict(cls, d: Dict[str, any]) -> TriggerInfo:
5347
6554
  """Deserializes the TriggerInfo from a dictionary."""
@@ -5374,6 +6581,16 @@ class TriggerSettings:
5374
6581
  if self.table_update: body['table_update'] = self.table_update.as_dict()
5375
6582
  return body
5376
6583
 
6584
+ def as_shallow_dict(self) -> dict:
6585
+ """Serializes the TriggerSettings into a shallow dictionary of its immediate attributes."""
6586
+ body = {}
6587
+ if self.file_arrival: body['file_arrival'] = self.file_arrival
6588
+ if self.pause_status is not None: body['pause_status'] = self.pause_status
6589
+ if self.periodic: body['periodic'] = self.periodic
6590
+ if self.table: body['table'] = self.table
6591
+ if self.table_update: body['table_update'] = self.table_update
6592
+ return body
6593
+
5377
6594
  @classmethod
5378
6595
  def from_dict(cls, d: Dict[str, any]) -> TriggerSettings:
5379
6596
  """Deserializes the TriggerSettings from a dictionary."""
@@ -5432,6 +6649,14 @@ class UpdateJob:
5432
6649
  if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
5433
6650
  return body
5434
6651
 
6652
+ def as_shallow_dict(self) -> dict:
6653
+ """Serializes the UpdateJob into a shallow dictionary of its immediate attributes."""
6654
+ body = {}
6655
+ if self.fields_to_remove: body['fields_to_remove'] = self.fields_to_remove
6656
+ if self.job_id is not None: body['job_id'] = self.job_id
6657
+ if self.new_settings: body['new_settings'] = self.new_settings
6658
+ return body
6659
+
5435
6660
  @classmethod
5436
6661
  def from_dict(cls, d: Dict[str, any]) -> UpdateJob:
5437
6662
  """Deserializes the UpdateJob from a dictionary."""
@@ -5448,6 +6673,11 @@ class UpdateResponse:
5448
6673
  body = {}
5449
6674
  return body
5450
6675
 
6676
+ def as_shallow_dict(self) -> dict:
6677
+ """Serializes the UpdateResponse into a shallow dictionary of its immediate attributes."""
6678
+ body = {}
6679
+ return body
6680
+
5451
6681
  @classmethod
5452
6682
  def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
5453
6683
  """Deserializes the UpdateResponse from a dictionary."""
@@ -5474,6 +6704,14 @@ class ViewItem:
5474
6704
  if self.type is not None: body['type'] = self.type.value
5475
6705
  return body
5476
6706
 
6707
+ def as_shallow_dict(self) -> dict:
6708
+ """Serializes the ViewItem into a shallow dictionary of its immediate attributes."""
6709
+ body = {}
6710
+ if self.content is not None: body['content'] = self.content
6711
+ if self.name is not None: body['name'] = self.name
6712
+ if self.type is not None: body['type'] = self.type
6713
+ return body
6714
+
5477
6715
  @classmethod
5478
6716
  def from_dict(cls, d: Dict[str, any]) -> ViewItem:
5479
6717
  """Deserializes the ViewItem from a dictionary."""
@@ -5506,6 +6744,12 @@ class Webhook:
5506
6744
  if self.id is not None: body['id'] = self.id
5507
6745
  return body
5508
6746
 
6747
+ def as_shallow_dict(self) -> dict:
6748
+ """Serializes the Webhook into a shallow dictionary of its immediate attributes."""
6749
+ body = {}
6750
+ if self.id is not None: body['id'] = self.id
6751
+ return body
6752
+
5509
6753
  @classmethod
5510
6754
  def from_dict(cls, d: Dict[str, any]) -> Webhook:
5511
6755
  """Deserializes the Webhook from a dictionary."""
@@ -5553,6 +6797,18 @@ class WebhookNotifications:
5553
6797
  if self.on_success: body['on_success'] = [v.as_dict() for v in self.on_success]
5554
6798
  return body
5555
6799
 
6800
+ def as_shallow_dict(self) -> dict:
6801
+ """Serializes the WebhookNotifications into a shallow dictionary of its immediate attributes."""
6802
+ body = {}
6803
+ if self.on_duration_warning_threshold_exceeded:
6804
+ body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
6805
+ if self.on_failure: body['on_failure'] = self.on_failure
6806
+ if self.on_start: body['on_start'] = self.on_start
6807
+ if self.on_streaming_backlog_exceeded:
6808
+ body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
6809
+ if self.on_success: body['on_success'] = self.on_success
6810
+ return body
6811
+
5556
6812
  @classmethod
5557
6813
  def from_dict(cls, d: Dict[str, any]) -> WebhookNotifications:
5558
6814
  """Deserializes the WebhookNotifications from a dictionary."""
@@ -5754,8 +7010,8 @@ class JobsAPI:
5754
7010
  :param queue: :class:`QueueSettings` (optional)
5755
7011
  The queue settings of the job.
5756
7012
  :param run_as: :class:`JobRunAs` (optional)
5757
- Write-only setting. Specifies the user, service principal or group that the job/pipeline runs as. If
5758
- not specified, the job/pipeline runs as the user who created the job/pipeline.
7013
+ Write-only setting. Specifies the user or service principal that the job runs as. If not specified,
7014
+ the job runs as the user who created the job.
5759
7015
 
5760
7016
  Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown.
5761
7017
  :param schedule: :class:`CronSchedule` (optional)