databricks-sdk 0.37.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 (33) hide show
  1. databricks/sdk/__init__.py +24 -2
  2. databricks/sdk/_base_client.py +61 -14
  3. databricks/sdk/config.py +10 -9
  4. databricks/sdk/credentials_provider.py +6 -5
  5. databricks/sdk/mixins/jobs.py +49 -0
  6. databricks/sdk/mixins/open_ai_client.py +2 -2
  7. databricks/sdk/service/apps.py +185 -4
  8. databricks/sdk/service/billing.py +248 -1
  9. databricks/sdk/service/catalog.py +1943 -46
  10. databricks/sdk/service/cleanrooms.py +1281 -0
  11. databricks/sdk/service/compute.py +1486 -8
  12. databricks/sdk/service/dashboards.py +336 -11
  13. databricks/sdk/service/files.py +162 -2
  14. databricks/sdk/service/iam.py +353 -2
  15. databricks/sdk/service/jobs.py +1281 -16
  16. databricks/sdk/service/marketplace.py +688 -0
  17. databricks/sdk/service/ml.py +1038 -2
  18. databricks/sdk/service/oauth2.py +176 -0
  19. databricks/sdk/service/pipelines.py +602 -15
  20. databricks/sdk/service/provisioning.py +402 -0
  21. databricks/sdk/service/serving.py +615 -0
  22. databricks/sdk/service/settings.py +1190 -3
  23. databricks/sdk/service/sharing.py +328 -2
  24. databricks/sdk/service/sql.py +1186 -2
  25. databricks/sdk/service/vectorsearch.py +290 -0
  26. databricks/sdk/service/workspace.py +453 -1
  27. databricks/sdk/version.py +1 -1
  28. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/METADATA +26 -26
  29. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/RECORD +33 -31
  30. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/WHEEL +1 -1
  31. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/LICENSE +0 -0
  32. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/NOTICE +0 -0
  33. {databricks_sdk-0.37.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,11 +737,10 @@ 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
- Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If not,
578
- an error is thrown."""
743
+ Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
579
744
 
580
745
  schedule: Optional[CronSchedule] = None
581
746
  """An optional periodic schedule for this job. The default behavior is that the job only runs when
@@ -630,6 +795,35 @@ class CreateJob:
630
795
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
631
796
  return body
632
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
+
633
827
  @classmethod
634
828
  def from_dict(cls, d: Dict[str, any]) -> CreateJob:
635
829
  """Deserializes the CreateJob from a dictionary."""
@@ -672,6 +866,12 @@ class CreateResponse:
672
866
  if self.job_id is not None: body['job_id'] = self.job_id
673
867
  return body
674
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
+
675
875
  @classmethod
676
876
  def from_dict(cls, d: Dict[str, any]) -> CreateResponse:
677
877
  """Deserializes the CreateResponse from a dictionary."""
@@ -704,6 +904,15 @@ class CronSchedule:
704
904
  if self.timezone_id is not None: body['timezone_id'] = self.timezone_id
705
905
  return body
706
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
+
707
916
  @classmethod
708
917
  def from_dict(cls, d: Dict[str, any]) -> CronSchedule:
709
918
  """Deserializes the CronSchedule from a dictionary."""
@@ -728,6 +937,13 @@ class DbtOutput:
728
937
  if self.artifacts_link is not None: body['artifacts_link'] = self.artifacts_link
729
938
  return body
730
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
+
731
947
  @classmethod
732
948
  def from_dict(cls, d: Dict[str, any]) -> DbtOutput:
733
949
  """Deserializes the DbtOutput from a dictionary."""
@@ -784,6 +1000,18 @@ class DbtTask:
784
1000
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
785
1001
  return body
786
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
+
787
1015
  @classmethod
788
1016
  def from_dict(cls, d: Dict[str, any]) -> DbtTask:
789
1017
  """Deserializes the DbtTask from a dictionary."""
@@ -807,6 +1035,12 @@ class DeleteJob:
807
1035
  if self.job_id is not None: body['job_id'] = self.job_id
808
1036
  return body
809
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
+
810
1044
  @classmethod
811
1045
  def from_dict(cls, d: Dict[str, any]) -> DeleteJob:
812
1046
  """Deserializes the DeleteJob from a dictionary."""
@@ -821,6 +1055,11 @@ class DeleteResponse:
821
1055
  body = {}
822
1056
  return body
823
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
+
824
1063
  @classmethod
825
1064
  def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
826
1065
  """Deserializes the DeleteResponse from a dictionary."""
@@ -838,6 +1077,12 @@ class DeleteRun:
838
1077
  if self.run_id is not None: body['run_id'] = self.run_id
839
1078
  return body
840
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
+
841
1086
  @classmethod
842
1087
  def from_dict(cls, d: Dict[str, any]) -> DeleteRun:
843
1088
  """Deserializes the DeleteRun from a dictionary."""
@@ -852,6 +1097,11 @@ class DeleteRunResponse:
852
1097
  body = {}
853
1098
  return body
854
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
+
855
1105
  @classmethod
856
1106
  def from_dict(cls, d: Dict[str, any]) -> DeleteRunResponse:
857
1107
  """Deserializes the DeleteRunResponse from a dictionary."""
@@ -884,6 +1134,14 @@ class EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
884
1134
  if self.previous_value is not None: body['previous_value'] = self.previous_value
885
1135
  return body
886
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
+
887
1145
  @classmethod
888
1146
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
889
1147
  """Deserializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange from a dictionary."""
@@ -907,6 +1165,13 @@ class EnforcePolicyComplianceRequest:
907
1165
  if self.validate_only is not None: body['validate_only'] = self.validate_only
908
1166
  return body
909
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
+
910
1175
  @classmethod
911
1176
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceRequest:
912
1177
  """Deserializes the EnforcePolicyComplianceRequest from a dictionary."""
@@ -938,6 +1203,14 @@ class EnforcePolicyComplianceResponse:
938
1203
  if self.settings: body['settings'] = self.settings.as_dict()
939
1204
  return body
940
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
+
941
1214
  @classmethod
942
1215
  def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceResponse:
943
1216
  """Deserializes the EnforcePolicyComplianceResponse from a dictionary."""
@@ -964,6 +1237,12 @@ class ExportRunOutput:
964
1237
  if self.views: body['views'] = [v.as_dict() for v in self.views]
965
1238
  return body
966
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
+
967
1246
  @classmethod
968
1247
  def from_dict(cls, d: Dict[str, any]) -> ExportRunOutput:
969
1248
  """Deserializes the ExportRunOutput from a dictionary."""
@@ -995,6 +1274,16 @@ class FileArrivalTriggerConfiguration:
995
1274
  body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
996
1275
  return body
997
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
+
998
1287
  @classmethod
999
1288
  def from_dict(cls, d: Dict[str, any]) -> FileArrivalTriggerConfiguration:
1000
1289
  """Deserializes the FileArrivalTriggerConfiguration from a dictionary."""
@@ -1019,6 +1308,13 @@ class ForEachStats:
1019
1308
  if self.task_run_stats: body['task_run_stats'] = self.task_run_stats.as_dict()
1020
1309
  return body
1021
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
+
1022
1318
  @classmethod
1023
1319
  def from_dict(cls, d: Dict[str, any]) -> ForEachStats:
1024
1320
  """Deserializes the ForEachStats from a dictionary."""
@@ -1046,6 +1342,14 @@ class ForEachTask:
1046
1342
  if self.task: body['task'] = self.task.as_dict()
1047
1343
  return body
1048
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
+
1049
1353
  @classmethod
1050
1354
  def from_dict(cls, d: Dict[str, any]) -> ForEachTask:
1051
1355
  """Deserializes the ForEachTask from a dictionary."""
@@ -1073,6 +1377,14 @@ class ForEachTaskErrorMessageStats:
1073
1377
  if self.termination_category is not None: body['termination_category'] = self.termination_category
1074
1378
  return body
1075
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
+
1076
1388
  @classmethod
1077
1389
  def from_dict(cls, d: Dict[str, any]) -> ForEachTaskErrorMessageStats:
1078
1390
  """Deserializes the ForEachTaskErrorMessageStats from a dictionary."""
@@ -1112,6 +1424,17 @@ class ForEachTaskTaskRunStats:
1112
1424
  if self.total_iterations is not None: body['total_iterations'] = self.total_iterations
1113
1425
  return body
1114
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
+
1115
1438
  @classmethod
1116
1439
  def from_dict(cls, d: Dict[str, any]) -> ForEachTaskTaskRunStats:
1117
1440
  """Deserializes the ForEachTaskTaskRunStats from a dictionary."""
@@ -1140,6 +1463,12 @@ class GetJobPermissionLevelsResponse:
1140
1463
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
1141
1464
  return body
1142
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
+
1143
1472
  @classmethod
1144
1473
  def from_dict(cls, d: Dict[str, any]) -> GetJobPermissionLevelsResponse:
1145
1474
  """Deserializes the GetJobPermissionLevelsResponse from a dictionary."""
@@ -1166,6 +1495,13 @@ class GetPolicyComplianceResponse:
1166
1495
  if self.violations: body['violations'] = self.violations
1167
1496
  return body
1168
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
+
1169
1505
  @classmethod
1170
1506
  def from_dict(cls, d: Dict[str, any]) -> GetPolicyComplianceResponse:
1171
1507
  """Deserializes the GetPolicyComplianceResponse from a dictionary."""
@@ -1200,6 +1536,12 @@ class GitSnapshot:
1200
1536
  if self.used_commit is not None: body['used_commit'] = self.used_commit
1201
1537
  return body
1202
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
+
1203
1545
  @classmethod
1204
1546
  def from_dict(cls, d: Dict[str, any]) -> GitSnapshot:
1205
1547
  """Deserializes the GitSnapshot from a dictionary."""
@@ -1254,6 +1596,18 @@ class GitSource:
1254
1596
  if self.job_source: body['job_source'] = self.job_source.as_dict()
1255
1597
  return body
1256
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
+
1257
1611
  @classmethod
1258
1612
  def from_dict(cls, d: Dict[str, any]) -> GitSource:
1259
1613
  """Deserializes the GitSource from a dictionary."""
@@ -1311,6 +1665,18 @@ class Job:
1311
1665
  if self.settings: body['settings'] = self.settings.as_dict()
1312
1666
  return body
1313
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
+
1314
1680
  @classmethod
1315
1681
  def from_dict(cls, d: Dict[str, any]) -> Job:
1316
1682
  """Deserializes the Job from a dictionary."""
@@ -1346,6 +1712,16 @@ class JobAccessControlRequest:
1346
1712
  if self.user_name is not None: body['user_name'] = self.user_name
1347
1713
  return body
1348
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
+
1349
1725
  @classmethod
1350
1726
  def from_dict(cls, d: Dict[str, any]) -> JobAccessControlRequest:
1351
1727
  """Deserializes the JobAccessControlRequest from a dictionary."""
@@ -1383,6 +1759,17 @@ class JobAccessControlResponse:
1383
1759
  if self.user_name is not None: body['user_name'] = self.user_name
1384
1760
  return body
1385
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
+
1386
1773
  @classmethod
1387
1774
  def from_dict(cls, d: Dict[str, any]) -> JobAccessControlResponse:
1388
1775
  """Deserializes the JobAccessControlResponse from a dictionary."""
@@ -1410,6 +1797,13 @@ class JobCluster:
1410
1797
  if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
1411
1798
  return body
1412
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
+
1413
1807
  @classmethod
1414
1808
  def from_dict(cls, d: Dict[str, any]) -> JobCluster:
1415
1809
  """Deserializes the JobCluster from a dictionary."""
@@ -1439,6 +1833,14 @@ class JobCompliance:
1439
1833
  if self.violations: body['violations'] = self.violations
1440
1834
  return body
1441
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
+
1442
1844
  @classmethod
1443
1845
  def from_dict(cls, d: Dict[str, any]) -> JobCompliance:
1444
1846
  """Deserializes the JobCompliance from a dictionary."""
@@ -1464,6 +1866,13 @@ class JobDeployment:
1464
1866
  if self.metadata_file_path is not None: body['metadata_file_path'] = self.metadata_file_path
1465
1867
  return body
1466
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
+
1467
1876
  @classmethod
1468
1877
  def from_dict(cls, d: Dict[str, any]) -> JobDeployment:
1469
1878
  """Deserializes the JobDeployment from a dictionary."""
@@ -1538,6 +1947,20 @@ class JobEmailNotifications:
1538
1947
  if self.on_success: body['on_success'] = [v for v in self.on_success]
1539
1948
  return body
1540
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
+
1541
1964
  @classmethod
1542
1965
  def from_dict(cls, d: Dict[str, any]) -> JobEmailNotifications:
1543
1966
  """Deserializes the JobEmailNotifications from a dictionary."""
@@ -1566,6 +1989,13 @@ class JobEnvironment:
1566
1989
  if self.spec: body['spec'] = self.spec.as_dict()
1567
1990
  return body
1568
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
+
1569
1999
  @classmethod
1570
2000
  def from_dict(cls, d: Dict[str, any]) -> JobEnvironment:
1571
2001
  """Deserializes the JobEnvironment from a dictionary."""
@@ -1592,6 +2022,15 @@ class JobNotificationSettings:
1592
2022
  body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
1593
2023
  return body
1594
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
+
1595
2034
  @classmethod
1596
2035
  def from_dict(cls, d: Dict[str, any]) -> JobNotificationSettings:
1597
2036
  """Deserializes the JobNotificationSettings from a dictionary."""
@@ -1618,6 +2057,14 @@ class JobParameter:
1618
2057
  if self.value is not None: body['value'] = self.value
1619
2058
  return body
1620
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
+
1621
2068
  @classmethod
1622
2069
  def from_dict(cls, d: Dict[str, any]) -> JobParameter:
1623
2070
  """Deserializes the JobParameter from a dictionary."""
@@ -1639,6 +2086,13 @@ class JobParameterDefinition:
1639
2086
  if self.name is not None: body['name'] = self.name
1640
2087
  return body
1641
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
+
1642
2096
  @classmethod
1643
2097
  def from_dict(cls, d: Dict[str, any]) -> JobParameterDefinition:
1644
2098
  """Deserializes the JobParameterDefinition from a dictionary."""
@@ -1662,6 +2116,14 @@ class JobPermission:
1662
2116
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1663
2117
  return body
1664
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
+
1665
2127
  @classmethod
1666
2128
  def from_dict(cls, d: Dict[str, any]) -> JobPermission:
1667
2129
  """Deserializes the JobPermission from a dictionary."""
@@ -1696,6 +2158,14 @@ class JobPermissions:
1696
2158
  if self.object_type is not None: body['object_type'] = self.object_type
1697
2159
  return body
1698
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
+
1699
2169
  @classmethod
1700
2170
  def from_dict(cls, d: Dict[str, any]) -> JobPermissions:
1701
2171
  """Deserializes the JobPermissions from a dictionary."""
@@ -1718,6 +2188,13 @@ class JobPermissionsDescription:
1718
2188
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1719
2189
  return body
1720
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
+
1721
2198
  @classmethod
1722
2199
  def from_dict(cls, d: Dict[str, any]) -> JobPermissionsDescription:
1723
2200
  """Deserializes the JobPermissionsDescription from a dictionary."""
@@ -1740,6 +2217,13 @@ class JobPermissionsRequest:
1740
2217
  if self.job_id is not None: body['job_id'] = self.job_id
1741
2218
  return body
1742
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
+
1743
2227
  @classmethod
1744
2228
  def from_dict(cls, d: Dict[str, any]) -> JobPermissionsRequest:
1745
2229
  """Deserializes the JobPermissionsRequest from a dictionary."""
@@ -1749,11 +2233,10 @@ class JobPermissionsRequest:
1749
2233
 
1750
2234
  @dataclass
1751
2235
  class JobRunAs:
1752
- """Write-only setting. Specifies the user, service principal or group that the job/pipeline runs
1753
- 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.
1754
2238
 
1755
- Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If not,
1756
- an error is thrown."""
2239
+ Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
1757
2240
 
1758
2241
  service_principal_name: Optional[str] = None
1759
2242
  """Application ID of an active service principal. Setting this field requires the
@@ -1771,6 +2254,14 @@ class JobRunAs:
1771
2254
  if self.user_name is not None: body['user_name'] = self.user_name
1772
2255
  return body
1773
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
+
1774
2265
  @classmethod
1775
2266
  def from_dict(cls, d: Dict[str, any]) -> JobRunAs:
1776
2267
  """Deserializes the JobRunAs from a dictionary."""
@@ -1858,11 +2349,10 @@ class JobSettings:
1858
2349
  """The queue settings of the job."""
1859
2350
 
1860
2351
  run_as: Optional[JobRunAs] = None
1861
- """Write-only setting. Specifies the user, service principal or group that the job/pipeline runs
1862
- 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.
1863
2354
 
1864
- Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If not,
1865
- an error is thrown."""
2355
+ Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
1866
2356
 
1867
2357
  schedule: Optional[CronSchedule] = None
1868
2358
  """An optional periodic schedule for this job. The default behavior is that the job only runs when
@@ -1915,6 +2405,34 @@ class JobSettings:
1915
2405
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
1916
2406
  return body
1917
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
+
1918
2436
  @classmethod
1919
2437
  def from_dict(cls, d: Dict[str, any]) -> JobSettings:
1920
2438
  """Deserializes the JobSettings from a dictionary."""
@@ -1972,6 +2490,15 @@ class JobSource:
1972
2490
  if self.job_config_path is not None: body['job_config_path'] = self.job_config_path
1973
2491
  return body
1974
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
+
1975
2502
  @classmethod
1976
2503
  def from_dict(cls, d: Dict[str, any]) -> JobSource:
1977
2504
  """Deserializes the JobSource from a dictionary."""
@@ -2045,6 +2572,14 @@ class JobsHealthRule:
2045
2572
  if self.value is not None: body['value'] = self.value
2046
2573
  return body
2047
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
+
2048
2583
  @classmethod
2049
2584
  def from_dict(cls, d: Dict[str, any]) -> JobsHealthRule:
2050
2585
  """Deserializes the JobsHealthRule from a dictionary."""
@@ -2065,6 +2600,12 @@ class JobsHealthRules:
2065
2600
  if self.rules: body['rules'] = [v.as_dict() for v in self.rules]
2066
2601
  return body
2067
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
+
2068
2609
  @classmethod
2069
2610
  def from_dict(cls, d: Dict[str, any]) -> JobsHealthRules:
2070
2611
  """Deserializes the JobsHealthRules from a dictionary."""
@@ -2092,6 +2633,14 @@ class ListJobComplianceForPolicyResponse:
2092
2633
  if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2093
2634
  return body
2094
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
+
2095
2644
  @classmethod
2096
2645
  def from_dict(cls, d: Dict[str, any]) -> ListJobComplianceForPolicyResponse:
2097
2646
  """Deserializes the ListJobComplianceForPolicyResponse from a dictionary."""
@@ -2125,6 +2674,15 @@ class ListJobsResponse:
2125
2674
  if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
2126
2675
  return body
2127
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
+
2128
2686
  @classmethod
2129
2687
  def from_dict(cls, d: Dict[str, any]) -> ListJobsResponse:
2130
2688
  """Deserializes the ListJobsResponse from a dictionary."""
@@ -2160,6 +2718,15 @@ class ListRunsResponse:
2160
2718
  if self.runs: body['runs'] = [v.as_dict() for v in self.runs]
2161
2719
  return body
2162
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
+
2163
2730
  @classmethod
2164
2731
  def from_dict(cls, d: Dict[str, any]) -> ListRunsResponse:
2165
2732
  """Deserializes the ListRunsResponse from a dictionary."""
@@ -2188,6 +2755,13 @@ class NotebookOutput:
2188
2755
  if self.truncated is not None: body['truncated'] = self.truncated
2189
2756
  return body
2190
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
+
2191
2765
  @classmethod
2192
2766
  def from_dict(cls, d: Dict[str, any]) -> NotebookOutput:
2193
2767
  """Deserializes the NotebookOutput from a dictionary."""
@@ -2240,6 +2814,15 @@ class NotebookTask:
2240
2814
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2241
2815
  return body
2242
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
+
2243
2826
  @classmethod
2244
2827
  def from_dict(cls, d: Dict[str, any]) -> NotebookTask:
2245
2828
  """Deserializes the NotebookTask from a dictionary."""
@@ -2270,6 +2853,13 @@ class PeriodicTriggerConfiguration:
2270
2853
  if self.unit is not None: body['unit'] = self.unit.value
2271
2854
  return body
2272
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
+
2273
2863
  @classmethod
2274
2864
  def from_dict(cls, d: Dict[str, any]) -> PeriodicTriggerConfiguration:
2275
2865
  """Deserializes the PeriodicTriggerConfiguration from a dictionary."""
@@ -2295,6 +2885,12 @@ class PipelineParams:
2295
2885
  if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
2296
2886
  return body
2297
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
+
2298
2894
  @classmethod
2299
2895
  def from_dict(cls, d: Dict[str, any]) -> PipelineParams:
2300
2896
  """Deserializes the PipelineParams from a dictionary."""
@@ -2316,6 +2912,13 @@ class PipelineTask:
2316
2912
  if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
2317
2913
  return body
2318
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
+
2319
2922
  @classmethod
2320
2923
  def from_dict(cls, d: Dict[str, any]) -> PipelineTask:
2321
2924
  """Deserializes the PipelineTask from a dictionary."""
@@ -2348,6 +2951,15 @@ class PythonWheelTask:
2348
2951
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2349
2952
  return body
2350
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
+
2351
2963
  @classmethod
2352
2964
  def from_dict(cls, d: Dict[str, any]) -> PythonWheelTask:
2353
2965
  """Deserializes the PythonWheelTask from a dictionary."""
@@ -2377,6 +2989,13 @@ class QueueDetails:
2377
2989
  if self.message is not None: body['message'] = self.message
2378
2990
  return body
2379
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
+
2380
2999
  @classmethod
2381
3000
  def from_dict(cls, d: Dict[str, any]) -> QueueDetails:
2382
3001
  """Deserializes the QueueDetails from a dictionary."""
@@ -2406,6 +3025,12 @@ class QueueSettings:
2406
3025
  if self.enabled is not None: body['enabled'] = self.enabled
2407
3026
  return body
2408
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
+
2409
3034
  @classmethod
2410
3035
  def from_dict(cls, d: Dict[str, any]) -> QueueSettings:
2411
3036
  """Deserializes the QueueSettings from a dictionary."""
@@ -2447,6 +3072,18 @@ class RepairHistoryItem:
2447
3072
  if self.type is not None: body['type'] = self.type.value
2448
3073
  return body
2449
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
+
2450
3087
  @classmethod
2451
3088
  def from_dict(cls, d: Dict[str, any]) -> RepairHistoryItem:
2452
3089
  """Deserializes the RepairHistoryItem from a dictionary."""
@@ -2583,6 +3220,26 @@ class RepairRun:
2583
3220
  if self.sql_params: body['sql_params'] = self.sql_params
2584
3221
  return body
2585
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
+
2586
3243
  @classmethod
2587
3244
  def from_dict(cls, d: Dict[str, any]) -> RepairRun:
2588
3245
  """Deserializes the RepairRun from a dictionary."""
@@ -2616,6 +3273,12 @@ class RepairRunResponse:
2616
3273
  if self.repair_id is not None: body['repair_id'] = self.repair_id
2617
3274
  return body
2618
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
+
2619
3282
  @classmethod
2620
3283
  def from_dict(cls, d: Dict[str, any]) -> RepairRunResponse:
2621
3284
  """Deserializes the RepairRunResponse from a dictionary."""
@@ -2640,6 +3303,13 @@ class ResetJob:
2640
3303
  if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
2641
3304
  return body
2642
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
+
2643
3313
  @classmethod
2644
3314
  def from_dict(cls, d: Dict[str, any]) -> ResetJob:
2645
3315
  """Deserializes the ResetJob from a dictionary."""
@@ -2654,6 +3324,11 @@ class ResetResponse:
2654
3324
  body = {}
2655
3325
  return body
2656
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
+
2657
3332
  @classmethod
2658
3333
  def from_dict(cls, d: Dict[str, any]) -> ResetResponse:
2659
3334
  """Deserializes the ResetResponse from a dictionary."""
@@ -2673,6 +3348,13 @@ class ResolvedConditionTaskValues:
2673
3348
  if self.right is not None: body['right'] = self.right
2674
3349
  return body
2675
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
+
2676
3358
  @classmethod
2677
3359
  def from_dict(cls, d: Dict[str, any]) -> ResolvedConditionTaskValues:
2678
3360
  """Deserializes the ResolvedConditionTaskValues from a dictionary."""
@@ -2689,6 +3371,12 @@ class ResolvedDbtTaskValues:
2689
3371
  if self.commands: body['commands'] = [v for v in self.commands]
2690
3372
  return body
2691
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
+
2692
3380
  @classmethod
2693
3381
  def from_dict(cls, d: Dict[str, any]) -> ResolvedDbtTaskValues:
2694
3382
  """Deserializes the ResolvedDbtTaskValues from a dictionary."""
@@ -2705,6 +3393,12 @@ class ResolvedNotebookTaskValues:
2705
3393
  if self.base_parameters: body['base_parameters'] = self.base_parameters
2706
3394
  return body
2707
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
+
2708
3402
  @classmethod
2709
3403
  def from_dict(cls, d: Dict[str, any]) -> ResolvedNotebookTaskValues:
2710
3404
  """Deserializes the ResolvedNotebookTaskValues from a dictionary."""
@@ -2721,6 +3415,12 @@ class ResolvedParamPairValues:
2721
3415
  if self.parameters: body['parameters'] = self.parameters
2722
3416
  return body
2723
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
+
2724
3424
  @classmethod
2725
3425
  def from_dict(cls, d: Dict[str, any]) -> ResolvedParamPairValues:
2726
3426
  """Deserializes the ResolvedParamPairValues from a dictionary."""
@@ -2740,6 +3440,13 @@ class ResolvedPythonWheelTaskValues:
2740
3440
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2741
3441
  return body
2742
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
+
2743
3450
  @classmethod
2744
3451
  def from_dict(cls, d: Dict[str, any]) -> ResolvedPythonWheelTaskValues:
2745
3452
  """Deserializes the ResolvedPythonWheelTaskValues from a dictionary."""
@@ -2759,6 +3466,13 @@ class ResolvedRunJobTaskValues:
2759
3466
  if self.parameters: body['parameters'] = self.parameters
2760
3467
  return body
2761
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
+
2762
3476
  @classmethod
2763
3477
  def from_dict(cls, d: Dict[str, any]) -> ResolvedRunJobTaskValues:
2764
3478
  """Deserializes the ResolvedRunJobTaskValues from a dictionary."""
@@ -2775,6 +3489,12 @@ class ResolvedStringParamsValues:
2775
3489
  if self.parameters: body['parameters'] = [v for v in self.parameters]
2776
3490
  return body
2777
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
+
2778
3498
  @classmethod
2779
3499
  def from_dict(cls, d: Dict[str, any]) -> ResolvedStringParamsValues:
2780
3500
  """Deserializes the ResolvedStringParamsValues from a dictionary."""
@@ -2818,6 +3538,21 @@ class ResolvedValues:
2818
3538
  if self.sql_task: body['sql_task'] = self.sql_task.as_dict()
2819
3539
  return body
2820
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
+
2821
3556
  @classmethod
2822
3557
  def from_dict(cls, d: Dict[str, any]) -> ResolvedValues:
2823
3558
  """Deserializes the ResolvedValues from a dictionary."""
@@ -3020,6 +3755,45 @@ class Run:
3020
3755
  if self.trigger_info: body['trigger_info'] = self.trigger_info.as_dict()
3021
3756
  return body
3022
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
+
3023
3797
  @classmethod
3024
3798
  def from_dict(cls, d: Dict[str, any]) -> Run:
3025
3799
  """Deserializes the Run from a dictionary."""
@@ -3092,6 +3866,15 @@ class RunConditionTask:
3092
3866
  if self.right is not None: body['right'] = self.right
3093
3867
  return body
3094
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
+
3095
3878
  @classmethod
3096
3879
  def from_dict(cls, d: Dict[str, any]) -> RunConditionTask:
3097
3880
  """Deserializes the RunConditionTask from a dictionary."""
@@ -3126,6 +3909,15 @@ class RunForEachTask:
3126
3909
  if self.task: body['task'] = self.task.as_dict()
3127
3910
  return body
3128
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
+
3129
3921
  @classmethod
3130
3922
  def from_dict(cls, d: Dict[str, any]) -> RunForEachTask:
3131
3923
  """Deserializes the RunForEachTask from a dictionary."""
@@ -3164,6 +3956,12 @@ class RunJobOutput:
3164
3956
  if self.run_id is not None: body['run_id'] = self.run_id
3165
3957
  return body
3166
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
+
3167
3965
  @classmethod
3168
3966
  def from_dict(cls, d: Dict[str, any]) -> RunJobOutput:
3169
3967
  """Deserializes the RunJobOutput from a dictionary."""
@@ -3267,6 +4065,21 @@ class RunJobTask:
3267
4065
  if self.sql_params: body['sql_params'] = self.sql_params
3268
4066
  return body
3269
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
+
3270
4083
  @classmethod
3271
4084
  def from_dict(cls, d: Dict[str, any]) -> RunJobTask:
3272
4085
  """Deserializes the RunJobTask from a dictionary."""
@@ -3371,6 +4184,10 @@ class RunNow:
3371
4184
  [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
3372
4185
  [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
3373
4186
 
4187
+ only: Optional[List[str]] = None
4188
+ """A list of task keys to run inside of the job. If this field is not provided, all tasks in the
4189
+ job will be run."""
4190
+
3374
4191
  pipeline_params: Optional[PipelineParams] = None
3375
4192
  """Controls whether the pipeline should perform a full refresh"""
3376
4193
 
@@ -3425,6 +4242,7 @@ class RunNow:
3425
4242
  if self.job_id is not None: body['job_id'] = self.job_id
3426
4243
  if self.job_parameters: body['job_parameters'] = self.job_parameters
3427
4244
  if self.notebook_params: body['notebook_params'] = self.notebook_params
4245
+ if self.only: body['only'] = [v for v in self.only]
3428
4246
  if self.pipeline_params: body['pipeline_params'] = self.pipeline_params.as_dict()
3429
4247
  if self.python_named_params: body['python_named_params'] = self.python_named_params
3430
4248
  if self.python_params: body['python_params'] = [v for v in self.python_params]
@@ -3433,6 +4251,24 @@ class RunNow:
3433
4251
  if self.sql_params: body['sql_params'] = self.sql_params
3434
4252
  return body
3435
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
+
3436
4272
  @classmethod
3437
4273
  def from_dict(cls, d: Dict[str, any]) -> RunNow:
3438
4274
  """Deserializes the RunNow from a dictionary."""
@@ -3442,6 +4278,7 @@ class RunNow:
3442
4278
  job_id=d.get('job_id', None),
3443
4279
  job_parameters=d.get('job_parameters', None),
3444
4280
  notebook_params=d.get('notebook_params', None),
4281
+ only=d.get('only', None),
3445
4282
  pipeline_params=_from_dict(d, 'pipeline_params', PipelineParams),
3446
4283
  python_named_params=d.get('python_named_params', None),
3447
4284
  python_params=d.get('python_params', None),
@@ -3467,6 +4304,13 @@ class RunNowResponse:
3467
4304
  if self.run_id is not None: body['run_id'] = self.run_id
3468
4305
  return body
3469
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
+
3470
4314
  @classmethod
3471
4315
  def from_dict(cls, d: Dict[str, any]) -> RunNowResponse:
3472
4316
  """Deserializes the RunNowResponse from a dictionary."""
@@ -3533,6 +4377,21 @@ class RunOutput:
3533
4377
  if self.sql_output: body['sql_output'] = self.sql_output.as_dict()
3534
4378
  return body
3535
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
+
3536
4395
  @classmethod
3537
4396
  def from_dict(cls, d: Dict[str, any]) -> RunOutput:
3538
4397
  """Deserializes the RunOutput from a dictionary."""
@@ -3637,6 +4496,19 @@ class RunParameters:
3637
4496
  if self.sql_params: body['sql_params'] = self.sql_params
3638
4497
  return body
3639
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
+
3640
4512
  @classmethod
3641
4513
  def from_dict(cls, d: Dict[str, any]) -> RunParameters:
3642
4514
  """Deserializes the RunParameters from a dictionary."""
@@ -3706,6 +4578,17 @@ class RunState:
3706
4578
  body['user_cancelled_or_timedout'] = self.user_cancelled_or_timedout
3707
4579
  return body
3708
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
+
3709
4592
  @classmethod
3710
4593
  def from_dict(cls, d: Dict[str, any]) -> RunState:
3711
4594
  """Deserializes the RunState from a dictionary."""
@@ -3738,6 +4621,14 @@ class RunStatus:
3738
4621
  if self.termination_details: body['termination_details'] = self.termination_details.as_dict()
3739
4622
  return body
3740
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
+
3741
4632
  @classmethod
3742
4633
  def from_dict(cls, d: Dict[str, any]) -> RunStatus:
3743
4634
  """Deserializes the RunStatus from a dictionary."""
@@ -3969,6 +4860,50 @@ class RunTask:
3969
4860
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
3970
4861
  return body
3971
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
+
3972
4907
  @classmethod
3973
4908
  def from_dict(cls, d: Dict[str, any]) -> RunTask:
3974
4909
  """Deserializes the RunTask from a dictionary."""
@@ -4066,6 +5001,14 @@ class SparkJarTask:
4066
5001
  if self.parameters: body['parameters'] = [v for v in self.parameters]
4067
5002
  return body
4068
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
+
4069
5012
  @classmethod
4070
5013
  def from_dict(cls, d: Dict[str, any]) -> SparkJarTask:
4071
5014
  """Deserializes the SparkJarTask from a dictionary."""
@@ -4106,6 +5049,14 @@ class SparkPythonTask:
4106
5049
  if self.source is not None: body['source'] = self.source.value
4107
5050
  return body
4108
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
+
4109
5060
  @classmethod
4110
5061
  def from_dict(cls, d: Dict[str, any]) -> SparkPythonTask:
4111
5062
  """Deserializes the SparkPythonTask from a dictionary."""
@@ -4129,6 +5080,12 @@ class SparkSubmitTask:
4129
5080
  if self.parameters: body['parameters'] = [v for v in self.parameters]
4130
5081
  return body
4131
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
+
4132
5089
  @classmethod
4133
5090
  def from_dict(cls, d: Dict[str, any]) -> SparkSubmitTask:
4134
5091
  """Deserializes the SparkSubmitTask from a dictionary."""
@@ -4166,6 +5123,16 @@ class SqlAlertOutput:
4166
5123
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4167
5124
  return body
4168
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
+
4169
5136
  @classmethod
4170
5137
  def from_dict(cls, d: Dict[str, any]) -> SqlAlertOutput:
4171
5138
  """Deserializes the SqlAlertOutput from a dictionary."""
@@ -4202,6 +5169,13 @@ class SqlDashboardOutput:
4202
5169
  if self.widgets: body['widgets'] = [v.as_dict() for v in self.widgets]
4203
5170
  return body
4204
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
+
4205
5179
  @classmethod
4206
5180
  def from_dict(cls, d: Dict[str, any]) -> SqlDashboardOutput:
4207
5181
  """Deserializes the SqlDashboardOutput from a dictionary."""
@@ -4244,6 +5218,18 @@ class SqlDashboardWidgetOutput:
4244
5218
  if self.widget_title is not None: body['widget_title'] = self.widget_title
4245
5219
  return body
4246
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
+
4247
5233
  @classmethod
4248
5234
  def from_dict(cls, d: Dict[str, any]) -> SqlDashboardWidgetOutput:
4249
5235
  """Deserializes the SqlDashboardWidgetOutput from a dictionary."""
@@ -4284,6 +5270,14 @@ class SqlOutput:
4284
5270
  if self.query_output: body['query_output'] = self.query_output.as_dict()
4285
5271
  return body
4286
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
+
4287
5281
  @classmethod
4288
5282
  def from_dict(cls, d: Dict[str, any]) -> SqlOutput:
4289
5283
  """Deserializes the SqlOutput from a dictionary."""
@@ -4303,6 +5297,12 @@ class SqlOutputError:
4303
5297
  if self.message is not None: body['message'] = self.message
4304
5298
  return body
4305
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
+
4306
5306
  @classmethod
4307
5307
  def from_dict(cls, d: Dict[str, any]) -> SqlOutputError:
4308
5308
  """Deserializes the SqlOutputError from a dictionary."""
@@ -4335,6 +5335,16 @@ class SqlQueryOutput:
4335
5335
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4336
5336
  return body
4337
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
+
4338
5348
  @classmethod
4339
5349
  def from_dict(cls, d: Dict[str, any]) -> SqlQueryOutput:
4340
5350
  """Deserializes the SqlQueryOutput from a dictionary."""
@@ -4356,6 +5366,12 @@ class SqlStatementOutput:
4356
5366
  if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
4357
5367
  return body
4358
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
+
4359
5375
  @classmethod
4360
5376
  def from_dict(cls, d: Dict[str, any]) -> SqlStatementOutput:
4361
5377
  """Deserializes the SqlStatementOutput from a dictionary."""
@@ -4396,6 +5412,17 @@ class SqlTask:
4396
5412
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4397
5413
  return body
4398
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
+
4399
5426
  @classmethod
4400
5427
  def from_dict(cls, d: Dict[str, any]) -> SqlTask:
4401
5428
  """Deserializes the SqlTask from a dictionary."""
@@ -4426,6 +5453,14 @@ class SqlTaskAlert:
4426
5453
  if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
4427
5454
  return body
4428
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
+
4429
5464
  @classmethod
4430
5465
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskAlert:
4431
5466
  """Deserializes the SqlTaskAlert from a dictionary."""
@@ -4457,6 +5492,15 @@ class SqlTaskDashboard:
4457
5492
  if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
4458
5493
  return body
4459
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
+
4460
5504
  @classmethod
4461
5505
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskDashboard:
4462
5506
  """Deserializes the SqlTaskDashboard from a dictionary."""
@@ -4488,6 +5532,13 @@ class SqlTaskFile:
4488
5532
  if self.source is not None: body['source'] = self.source.value
4489
5533
  return body
4490
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
+
4491
5542
  @classmethod
4492
5543
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskFile:
4493
5544
  """Deserializes the SqlTaskFile from a dictionary."""
@@ -4505,6 +5556,12 @@ class SqlTaskQuery:
4505
5556
  if self.query_id is not None: body['query_id'] = self.query_id
4506
5557
  return body
4507
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
+
4508
5565
  @classmethod
4509
5566
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskQuery:
4510
5567
  """Deserializes the SqlTaskQuery from a dictionary."""
@@ -4529,6 +5586,13 @@ class SqlTaskSubscription:
4529
5586
  if self.user_name is not None: body['user_name'] = self.user_name
4530
5587
  return body
4531
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
+
4532
5596
  @classmethod
4533
5597
  def from_dict(cls, d: Dict[str, any]) -> SqlTaskSubscription:
4534
5598
  """Deserializes the SqlTaskSubscription from a dictionary."""
@@ -4619,6 +5683,25 @@ class SubmitRun:
4619
5683
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
4620
5684
  return body
4621
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
+
4622
5705
  @classmethod
4623
5706
  def from_dict(cls, d: Dict[str, any]) -> SubmitRun:
4624
5707
  """Deserializes the SubmitRun from a dictionary."""
@@ -4651,6 +5734,12 @@ class SubmitRunResponse:
4651
5734
  if self.run_id is not None: body['run_id'] = self.run_id
4652
5735
  return body
4653
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
+
4654
5743
  @classmethod
4655
5744
  def from_dict(cls, d: Dict[str, any]) -> SubmitRunResponse:
4656
5745
  """Deserializes the SubmitRunResponse from a dictionary."""
@@ -4794,6 +5883,35 @@ class SubmitTask:
4794
5883
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
4795
5884
  return body
4796
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
+
4797
5915
  @classmethod
4798
5916
  def from_dict(cls, d: Dict[str, any]) -> SubmitTask:
4799
5917
  """Deserializes the SubmitTask from a dictionary."""
@@ -4852,6 +5970,17 @@ class TableUpdateTriggerConfiguration:
4852
5970
  body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
4853
5971
  return body
4854
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
+
4855
5984
  @classmethod
4856
5985
  def from_dict(cls, d: Dict[str, any]) -> TableUpdateTriggerConfiguration:
4857
5986
  """Deserializes the TableUpdateTriggerConfiguration from a dictionary."""
@@ -5030,6 +6159,42 @@ class Task:
5030
6159
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
5031
6160
  return body
5032
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
+
5033
6198
  @classmethod
5034
6199
  def from_dict(cls, d: Dict[str, any]) -> Task:
5035
6200
  """Deserializes the Task from a dictionary."""
@@ -5080,6 +6245,13 @@ class TaskDependency:
5080
6245
  if self.task_key is not None: body['task_key'] = self.task_key
5081
6246
  return body
5082
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
+
5083
6255
  @classmethod
5084
6256
  def from_dict(cls, d: Dict[str, any]) -> TaskDependency:
5085
6257
  """Deserializes the TaskDependency from a dictionary."""
@@ -5137,6 +6309,20 @@ class TaskEmailNotifications:
5137
6309
  if self.on_success: body['on_success'] = [v for v in self.on_success]
5138
6310
  return body
5139
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
+
5140
6326
  @classmethod
5141
6327
  def from_dict(cls, d: Dict[str, any]) -> TaskEmailNotifications:
5142
6328
  """Deserializes the TaskEmailNotifications from a dictionary."""
@@ -5174,6 +6360,16 @@ class TaskNotificationSettings:
5174
6360
  body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
5175
6361
  return body
5176
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
+
5177
6373
  @classmethod
5178
6374
  def from_dict(cls, d: Dict[str, any]) -> TaskNotificationSettings:
5179
6375
  """Deserializes the TaskNotificationSettings from a dictionary."""
@@ -5303,6 +6499,14 @@ class TerminationDetails:
5303
6499
  if self.type is not None: body['type'] = self.type.value
5304
6500
  return body
5305
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
+
5306
6510
  @classmethod
5307
6511
  def from_dict(cls, d: Dict[str, any]) -> TerminationDetails:
5308
6512
  """Deserializes the TerminationDetails from a dictionary."""
@@ -5339,6 +6543,12 @@ class TriggerInfo:
5339
6543
  if self.run_id is not None: body['run_id'] = self.run_id
5340
6544
  return body
5341
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
+
5342
6552
  @classmethod
5343
6553
  def from_dict(cls, d: Dict[str, any]) -> TriggerInfo:
5344
6554
  """Deserializes the TriggerInfo from a dictionary."""
@@ -5371,6 +6581,16 @@ class TriggerSettings:
5371
6581
  if self.table_update: body['table_update'] = self.table_update.as_dict()
5372
6582
  return body
5373
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
+
5374
6594
  @classmethod
5375
6595
  def from_dict(cls, d: Dict[str, any]) -> TriggerSettings:
5376
6596
  """Deserializes the TriggerSettings from a dictionary."""
@@ -5429,6 +6649,14 @@ class UpdateJob:
5429
6649
  if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
5430
6650
  return body
5431
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
+
5432
6660
  @classmethod
5433
6661
  def from_dict(cls, d: Dict[str, any]) -> UpdateJob:
5434
6662
  """Deserializes the UpdateJob from a dictionary."""
@@ -5445,6 +6673,11 @@ class UpdateResponse:
5445
6673
  body = {}
5446
6674
  return body
5447
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
+
5448
6681
  @classmethod
5449
6682
  def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
5450
6683
  """Deserializes the UpdateResponse from a dictionary."""
@@ -5471,6 +6704,14 @@ class ViewItem:
5471
6704
  if self.type is not None: body['type'] = self.type.value
5472
6705
  return body
5473
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
+
5474
6715
  @classmethod
5475
6716
  def from_dict(cls, d: Dict[str, any]) -> ViewItem:
5476
6717
  """Deserializes the ViewItem from a dictionary."""
@@ -5503,6 +6744,12 @@ class Webhook:
5503
6744
  if self.id is not None: body['id'] = self.id
5504
6745
  return body
5505
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
+
5506
6753
  @classmethod
5507
6754
  def from_dict(cls, d: Dict[str, any]) -> Webhook:
5508
6755
  """Deserializes the Webhook from a dictionary."""
@@ -5550,6 +6797,18 @@ class WebhookNotifications:
5550
6797
  if self.on_success: body['on_success'] = [v.as_dict() for v in self.on_success]
5551
6798
  return body
5552
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
+
5553
6812
  @classmethod
5554
6813
  def from_dict(cls, d: Dict[str, any]) -> WebhookNotifications:
5555
6814
  """Deserializes the WebhookNotifications from a dictionary."""
@@ -5751,11 +7010,10 @@ class JobsAPI:
5751
7010
  :param queue: :class:`QueueSettings` (optional)
5752
7011
  The queue settings of the job.
5753
7012
  :param run_as: :class:`JobRunAs` (optional)
5754
- Write-only setting. Specifies the user, service principal or group that the job/pipeline runs as. If
5755
- 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.
5756
7015
 
5757
- Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If not, an
5758
- error is thrown.
7016
+ Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown.
5759
7017
  :param schedule: :class:`CronSchedule` (optional)
5760
7018
  An optional periodic schedule for this job. The default behavior is that the job only runs when
5761
7019
  triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`.
@@ -6275,6 +7533,7 @@ class JobsAPI:
6275
7533
  jar_params: Optional[List[str]] = None,
6276
7534
  job_parameters: Optional[Dict[str, str]] = None,
6277
7535
  notebook_params: Optional[Dict[str, str]] = None,
7536
+ only: Optional[List[str]] = None,
6278
7537
  pipeline_params: Optional[PipelineParams] = None,
6279
7538
  python_named_params: Optional[Dict[str, str]] = None,
6280
7539
  python_params: Optional[List[str]] = None,
@@ -6331,6 +7590,9 @@ class JobsAPI:
6331
7590
 
6332
7591
  [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
6333
7592
  [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
7593
+ :param only: List[str] (optional)
7594
+ A list of task keys to run inside of the job. If this field is not provided, all tasks in the job
7595
+ will be run.
6334
7596
  :param pipeline_params: :class:`PipelineParams` (optional)
6335
7597
  Controls whether the pipeline should perform a full refresh
6336
7598
  :param python_named_params: Dict[str,str] (optional)
@@ -6382,6 +7644,7 @@ class JobsAPI:
6382
7644
  if job_id is not None: body['job_id'] = job_id
6383
7645
  if job_parameters is not None: body['job_parameters'] = job_parameters
6384
7646
  if notebook_params is not None: body['notebook_params'] = notebook_params
7647
+ if only is not None: body['only'] = [v for v in only]
6385
7648
  if pipeline_params is not None: body['pipeline_params'] = pipeline_params.as_dict()
6386
7649
  if python_named_params is not None: body['python_named_params'] = python_named_params
6387
7650
  if python_params is not None: body['python_params'] = [v for v in python_params]
@@ -6403,6 +7666,7 @@ class JobsAPI:
6403
7666
  jar_params: Optional[List[str]] = None,
6404
7667
  job_parameters: Optional[Dict[str, str]] = None,
6405
7668
  notebook_params: Optional[Dict[str, str]] = None,
7669
+ only: Optional[List[str]] = None,
6406
7670
  pipeline_params: Optional[PipelineParams] = None,
6407
7671
  python_named_params: Optional[Dict[str, str]] = None,
6408
7672
  python_params: Optional[List[str]] = None,
@@ -6416,6 +7680,7 @@ class JobsAPI:
6416
7680
  job_id=job_id,
6417
7681
  job_parameters=job_parameters,
6418
7682
  notebook_params=notebook_params,
7683
+ only=only,
6419
7684
  pipeline_params=pipeline_params,
6420
7685
  python_named_params=python_named_params,
6421
7686
  python_params=python_params,