databricks-sdk 0.38.0__py3-none-any.whl → 0.40.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.
- databricks/sdk/__init__.py +36 -1
- databricks/sdk/mixins/open_ai_client.py +2 -2
- databricks/sdk/service/apps.py +175 -0
- databricks/sdk/service/billing.py +247 -0
- databricks/sdk/service/catalog.py +1795 -62
- databricks/sdk/service/cleanrooms.py +1281 -0
- databricks/sdk/service/compute.py +1843 -67
- databricks/sdk/service/dashboards.py +342 -3
- databricks/sdk/service/files.py +162 -2
- databricks/sdk/service/iam.py +351 -0
- databricks/sdk/service/jobs.py +1355 -24
- databricks/sdk/service/marketplace.py +688 -0
- databricks/sdk/service/ml.py +1038 -2
- databricks/sdk/service/oauth2.py +636 -0
- databricks/sdk/service/pipelines.py +524 -4
- databricks/sdk/service/provisioning.py +387 -0
- databricks/sdk/service/serving.py +615 -0
- databricks/sdk/service/settings.py +1186 -1
- databricks/sdk/service/sharing.py +326 -2
- databricks/sdk/service/sql.py +1186 -2
- databricks/sdk/service/vectorsearch.py +290 -0
- databricks/sdk/service/workspace.py +451 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/METADATA +26 -26
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/RECORD +29 -28
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/jobs.py
CHANGED
|
@@ -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."""
|
|
@@ -198,7 +209,8 @@ class BaseRun:
|
|
|
198
209
|
previously failed run. This occurs when you request to re-run the job in case of failures. *
|
|
199
210
|
`RUN_JOB_TASK`: Indicates a run that is triggered using a Run Job task. * `FILE_ARRIVAL`:
|
|
200
211
|
Indicates a run that is triggered by a file arrival. * `TABLE`: Indicates a run that is
|
|
201
|
-
triggered by a table update.
|
|
212
|
+
triggered by a table update. * `CONTINUOUS_RESTART`: Indicates a run created by user to manually
|
|
213
|
+
restart a continuous job run."""
|
|
202
214
|
|
|
203
215
|
trigger_info: Optional[TriggerInfo] = None
|
|
204
216
|
"""Additional details about what triggered the run"""
|
|
@@ -240,6 +252,43 @@ class BaseRun:
|
|
|
240
252
|
if self.trigger_info: body['trigger_info'] = self.trigger_info.as_dict()
|
|
241
253
|
return body
|
|
242
254
|
|
|
255
|
+
def as_shallow_dict(self) -> dict:
|
|
256
|
+
"""Serializes the BaseRun into a shallow dictionary of its immediate attributes."""
|
|
257
|
+
body = {}
|
|
258
|
+
if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
|
|
259
|
+
if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
|
|
260
|
+
if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
|
|
261
|
+
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
|
|
262
|
+
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
263
|
+
if self.description is not None: body['description'] = self.description
|
|
264
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
265
|
+
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
266
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
267
|
+
if self.job_clusters: body['job_clusters'] = self.job_clusters
|
|
268
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
269
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
270
|
+
if self.job_run_id is not None: body['job_run_id'] = self.job_run_id
|
|
271
|
+
if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
|
|
272
|
+
if self.original_attempt_run_id is not None:
|
|
273
|
+
body['original_attempt_run_id'] = self.original_attempt_run_id
|
|
274
|
+
if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters
|
|
275
|
+
if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
|
|
276
|
+
if self.repair_history: body['repair_history'] = self.repair_history
|
|
277
|
+
if self.run_duration is not None: body['run_duration'] = self.run_duration
|
|
278
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
279
|
+
if self.run_name is not None: body['run_name'] = self.run_name
|
|
280
|
+
if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
|
|
281
|
+
if self.run_type is not None: body['run_type'] = self.run_type
|
|
282
|
+
if self.schedule: body['schedule'] = self.schedule
|
|
283
|
+
if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
|
|
284
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
285
|
+
if self.state: body['state'] = self.state
|
|
286
|
+
if self.status: body['status'] = self.status
|
|
287
|
+
if self.tasks: body['tasks'] = self.tasks
|
|
288
|
+
if self.trigger is not None: body['trigger'] = self.trigger
|
|
289
|
+
if self.trigger_info: body['trigger_info'] = self.trigger_info
|
|
290
|
+
return body
|
|
291
|
+
|
|
243
292
|
@classmethod
|
|
244
293
|
def from_dict(cls, d: Dict[str, any]) -> BaseRun:
|
|
245
294
|
"""Deserializes the BaseRun from a dictionary."""
|
|
@@ -292,6 +341,13 @@ class CancelAllRuns:
|
|
|
292
341
|
if self.job_id is not None: body['job_id'] = self.job_id
|
|
293
342
|
return body
|
|
294
343
|
|
|
344
|
+
def as_shallow_dict(self) -> dict:
|
|
345
|
+
"""Serializes the CancelAllRuns into a shallow dictionary of its immediate attributes."""
|
|
346
|
+
body = {}
|
|
347
|
+
if self.all_queued_runs is not None: body['all_queued_runs'] = self.all_queued_runs
|
|
348
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
349
|
+
return body
|
|
350
|
+
|
|
295
351
|
@classmethod
|
|
296
352
|
def from_dict(cls, d: Dict[str, any]) -> CancelAllRuns:
|
|
297
353
|
"""Deserializes the CancelAllRuns from a dictionary."""
|
|
@@ -306,6 +362,11 @@ class CancelAllRunsResponse:
|
|
|
306
362
|
body = {}
|
|
307
363
|
return body
|
|
308
364
|
|
|
365
|
+
def as_shallow_dict(self) -> dict:
|
|
366
|
+
"""Serializes the CancelAllRunsResponse into a shallow dictionary of its immediate attributes."""
|
|
367
|
+
body = {}
|
|
368
|
+
return body
|
|
369
|
+
|
|
309
370
|
@classmethod
|
|
310
371
|
def from_dict(cls, d: Dict[str, any]) -> CancelAllRunsResponse:
|
|
311
372
|
"""Deserializes the CancelAllRunsResponse from a dictionary."""
|
|
@@ -323,6 +384,12 @@ class CancelRun:
|
|
|
323
384
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
324
385
|
return body
|
|
325
386
|
|
|
387
|
+
def as_shallow_dict(self) -> dict:
|
|
388
|
+
"""Serializes the CancelRun into a shallow dictionary of its immediate attributes."""
|
|
389
|
+
body = {}
|
|
390
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
391
|
+
return body
|
|
392
|
+
|
|
326
393
|
@classmethod
|
|
327
394
|
def from_dict(cls, d: Dict[str, any]) -> CancelRun:
|
|
328
395
|
"""Deserializes the CancelRun from a dictionary."""
|
|
@@ -337,12 +404,124 @@ class CancelRunResponse:
|
|
|
337
404
|
body = {}
|
|
338
405
|
return body
|
|
339
406
|
|
|
407
|
+
def as_shallow_dict(self) -> dict:
|
|
408
|
+
"""Serializes the CancelRunResponse into a shallow dictionary of its immediate attributes."""
|
|
409
|
+
body = {}
|
|
410
|
+
return body
|
|
411
|
+
|
|
340
412
|
@classmethod
|
|
341
413
|
def from_dict(cls, d: Dict[str, any]) -> CancelRunResponse:
|
|
342
414
|
"""Deserializes the CancelRunResponse from a dictionary."""
|
|
343
415
|
return cls()
|
|
344
416
|
|
|
345
417
|
|
|
418
|
+
class CleanRoomTaskRunLifeCycleState(Enum):
|
|
419
|
+
"""Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to
|
|
420
|
+
remove coupling with jobs API definition"""
|
|
421
|
+
|
|
422
|
+
BLOCKED = 'BLOCKED'
|
|
423
|
+
INTERNAL_ERROR = 'INTERNAL_ERROR'
|
|
424
|
+
PENDING = 'PENDING'
|
|
425
|
+
QUEUED = 'QUEUED'
|
|
426
|
+
RUNNING = 'RUNNING'
|
|
427
|
+
SKIPPED = 'SKIPPED'
|
|
428
|
+
TERMINATED = 'TERMINATED'
|
|
429
|
+
TERMINATING = 'TERMINATING'
|
|
430
|
+
WAITING_FOR_RETRY = 'WAITING_FOR_RETRY'
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class CleanRoomTaskRunResultState(Enum):
|
|
434
|
+
"""Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to avoid
|
|
435
|
+
cyclic dependency."""
|
|
436
|
+
|
|
437
|
+
CANCELED = 'CANCELED'
|
|
438
|
+
DISABLED = 'DISABLED'
|
|
439
|
+
EVICTED = 'EVICTED'
|
|
440
|
+
EXCLUDED = 'EXCLUDED'
|
|
441
|
+
FAILED = 'FAILED'
|
|
442
|
+
MAXIMUM_CONCURRENT_RUNS_REACHED = 'MAXIMUM_CONCURRENT_RUNS_REACHED'
|
|
443
|
+
SUCCESS = 'SUCCESS'
|
|
444
|
+
SUCCESS_WITH_FAILURES = 'SUCCESS_WITH_FAILURES'
|
|
445
|
+
TIMEDOUT = 'TIMEDOUT'
|
|
446
|
+
UPSTREAM_CANCELED = 'UPSTREAM_CANCELED'
|
|
447
|
+
UPSTREAM_EVICTED = 'UPSTREAM_EVICTED'
|
|
448
|
+
UPSTREAM_FAILED = 'UPSTREAM_FAILED'
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
@dataclass
|
|
452
|
+
class CleanRoomTaskRunState:
|
|
453
|
+
"""Stores the run state of the clean rooms notebook task."""
|
|
454
|
+
|
|
455
|
+
life_cycle_state: Optional[CleanRoomTaskRunLifeCycleState] = None
|
|
456
|
+
"""A value indicating the run's current lifecycle state. This field is always available in the
|
|
457
|
+
response."""
|
|
458
|
+
|
|
459
|
+
result_state: Optional[CleanRoomTaskRunResultState] = None
|
|
460
|
+
"""A value indicating the run's result. This field is only available for terminal lifecycle states."""
|
|
461
|
+
|
|
462
|
+
def as_dict(self) -> dict:
|
|
463
|
+
"""Serializes the CleanRoomTaskRunState into a dictionary suitable for use as a JSON request body."""
|
|
464
|
+
body = {}
|
|
465
|
+
if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state.value
|
|
466
|
+
if self.result_state is not None: body['result_state'] = self.result_state.value
|
|
467
|
+
return body
|
|
468
|
+
|
|
469
|
+
def as_shallow_dict(self) -> dict:
|
|
470
|
+
"""Serializes the CleanRoomTaskRunState into a shallow dictionary of its immediate attributes."""
|
|
471
|
+
body = {}
|
|
472
|
+
if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state
|
|
473
|
+
if self.result_state is not None: body['result_state'] = self.result_state
|
|
474
|
+
return body
|
|
475
|
+
|
|
476
|
+
@classmethod
|
|
477
|
+
def from_dict(cls, d: Dict[str, any]) -> CleanRoomTaskRunState:
|
|
478
|
+
"""Deserializes the CleanRoomTaskRunState from a dictionary."""
|
|
479
|
+
return cls(life_cycle_state=_enum(d, 'life_cycle_state', CleanRoomTaskRunLifeCycleState),
|
|
480
|
+
result_state=_enum(d, 'result_state', CleanRoomTaskRunResultState))
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
@dataclass
|
|
484
|
+
class CleanRoomsNotebookTask:
|
|
485
|
+
clean_room_name: str
|
|
486
|
+
"""The clean room that the notebook belongs to."""
|
|
487
|
+
|
|
488
|
+
notebook_name: str
|
|
489
|
+
"""Name of the notebook being run."""
|
|
490
|
+
|
|
491
|
+
etag: Optional[str] = None
|
|
492
|
+
"""Checksum to validate the freshness of the notebook resource (i.e. the notebook being run is the
|
|
493
|
+
latest version). It can be fetched by calling the :method:cleanroomassets/get API."""
|
|
494
|
+
|
|
495
|
+
notebook_base_parameters: Optional[Dict[str, str]] = None
|
|
496
|
+
"""Base parameters to be used for the clean room notebook job."""
|
|
497
|
+
|
|
498
|
+
def as_dict(self) -> dict:
|
|
499
|
+
"""Serializes the CleanRoomsNotebookTask into a dictionary suitable for use as a JSON request body."""
|
|
500
|
+
body = {}
|
|
501
|
+
if self.clean_room_name is not None: body['clean_room_name'] = self.clean_room_name
|
|
502
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
503
|
+
if self.notebook_base_parameters: body['notebook_base_parameters'] = self.notebook_base_parameters
|
|
504
|
+
if self.notebook_name is not None: body['notebook_name'] = self.notebook_name
|
|
505
|
+
return body
|
|
506
|
+
|
|
507
|
+
def as_shallow_dict(self) -> dict:
|
|
508
|
+
"""Serializes the CleanRoomsNotebookTask into a shallow dictionary of its immediate attributes."""
|
|
509
|
+
body = {}
|
|
510
|
+
if self.clean_room_name is not None: body['clean_room_name'] = self.clean_room_name
|
|
511
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
512
|
+
if self.notebook_base_parameters: body['notebook_base_parameters'] = self.notebook_base_parameters
|
|
513
|
+
if self.notebook_name is not None: body['notebook_name'] = self.notebook_name
|
|
514
|
+
return body
|
|
515
|
+
|
|
516
|
+
@classmethod
|
|
517
|
+
def from_dict(cls, d: Dict[str, any]) -> CleanRoomsNotebookTask:
|
|
518
|
+
"""Deserializes the CleanRoomsNotebookTask from a dictionary."""
|
|
519
|
+
return cls(clean_room_name=d.get('clean_room_name', None),
|
|
520
|
+
etag=d.get('etag', None),
|
|
521
|
+
notebook_base_parameters=d.get('notebook_base_parameters', None),
|
|
522
|
+
notebook_name=d.get('notebook_name', None))
|
|
523
|
+
|
|
524
|
+
|
|
346
525
|
@dataclass
|
|
347
526
|
class ClusterInstance:
|
|
348
527
|
cluster_id: Optional[str] = None
|
|
@@ -369,6 +548,13 @@ class ClusterInstance:
|
|
|
369
548
|
if self.spark_context_id is not None: body['spark_context_id'] = self.spark_context_id
|
|
370
549
|
return body
|
|
371
550
|
|
|
551
|
+
def as_shallow_dict(self) -> dict:
|
|
552
|
+
"""Serializes the ClusterInstance into a shallow dictionary of its immediate attributes."""
|
|
553
|
+
body = {}
|
|
554
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
555
|
+
if self.spark_context_id is not None: body['spark_context_id'] = self.spark_context_id
|
|
556
|
+
return body
|
|
557
|
+
|
|
372
558
|
@classmethod
|
|
373
559
|
def from_dict(cls, d: Dict[str, any]) -> ClusterInstance:
|
|
374
560
|
"""Deserializes the ClusterInstance from a dictionary."""
|
|
@@ -402,6 +588,15 @@ class ClusterSpec:
|
|
|
402
588
|
if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
|
|
403
589
|
return body
|
|
404
590
|
|
|
591
|
+
def as_shallow_dict(self) -> dict:
|
|
592
|
+
"""Serializes the ClusterSpec into a shallow dictionary of its immediate attributes."""
|
|
593
|
+
body = {}
|
|
594
|
+
if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
|
|
595
|
+
if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
|
|
596
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
597
|
+
if self.new_cluster: body['new_cluster'] = self.new_cluster
|
|
598
|
+
return body
|
|
599
|
+
|
|
405
600
|
@classmethod
|
|
406
601
|
def from_dict(cls, d: Dict[str, any]) -> ClusterSpec:
|
|
407
602
|
"""Deserializes the ClusterSpec from a dictionary."""
|
|
@@ -446,6 +641,14 @@ class ConditionTask:
|
|
|
446
641
|
if self.right is not None: body['right'] = self.right
|
|
447
642
|
return body
|
|
448
643
|
|
|
644
|
+
def as_shallow_dict(self) -> dict:
|
|
645
|
+
"""Serializes the ConditionTask into a shallow dictionary of its immediate attributes."""
|
|
646
|
+
body = {}
|
|
647
|
+
if self.left is not None: body['left'] = self.left
|
|
648
|
+
if self.op is not None: body['op'] = self.op
|
|
649
|
+
if self.right is not None: body['right'] = self.right
|
|
650
|
+
return body
|
|
651
|
+
|
|
449
652
|
@classmethod
|
|
450
653
|
def from_dict(cls, d: Dict[str, any]) -> ConditionTask:
|
|
451
654
|
"""Deserializes the ConditionTask from a dictionary."""
|
|
@@ -482,6 +685,12 @@ class Continuous:
|
|
|
482
685
|
if self.pause_status is not None: body['pause_status'] = self.pause_status.value
|
|
483
686
|
return body
|
|
484
687
|
|
|
688
|
+
def as_shallow_dict(self) -> dict:
|
|
689
|
+
"""Serializes the Continuous into a shallow dictionary of its immediate attributes."""
|
|
690
|
+
body = {}
|
|
691
|
+
if self.pause_status is not None: body['pause_status'] = self.pause_status
|
|
692
|
+
return body
|
|
693
|
+
|
|
485
694
|
@classmethod
|
|
486
695
|
def from_dict(cls, d: Dict[str, any]) -> Continuous:
|
|
487
696
|
"""Deserializes the Continuous from a dictionary."""
|
|
@@ -571,8 +780,8 @@ class CreateJob:
|
|
|
571
780
|
"""The queue settings of the job."""
|
|
572
781
|
|
|
573
782
|
run_as: Optional[JobRunAs] = None
|
|
574
|
-
"""Write-only setting. Specifies the user
|
|
575
|
-
|
|
783
|
+
"""Write-only setting. Specifies the user or service principal that the job runs as. If not
|
|
784
|
+
specified, the job runs as the user who created the job.
|
|
576
785
|
|
|
577
786
|
Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
|
|
578
787
|
|
|
@@ -629,6 +838,35 @@ class CreateJob:
|
|
|
629
838
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
630
839
|
return body
|
|
631
840
|
|
|
841
|
+
def as_shallow_dict(self) -> dict:
|
|
842
|
+
"""Serializes the CreateJob into a shallow dictionary of its immediate attributes."""
|
|
843
|
+
body = {}
|
|
844
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
845
|
+
if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
|
|
846
|
+
if self.continuous: body['continuous'] = self.continuous
|
|
847
|
+
if self.deployment: body['deployment'] = self.deployment
|
|
848
|
+
if self.description is not None: body['description'] = self.description
|
|
849
|
+
if self.edit_mode is not None: body['edit_mode'] = self.edit_mode
|
|
850
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
851
|
+
if self.environments: body['environments'] = self.environments
|
|
852
|
+
if self.format is not None: body['format'] = self.format
|
|
853
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
854
|
+
if self.health: body['health'] = self.health
|
|
855
|
+
if self.job_clusters: body['job_clusters'] = self.job_clusters
|
|
856
|
+
if self.max_concurrent_runs is not None: body['max_concurrent_runs'] = self.max_concurrent_runs
|
|
857
|
+
if self.name is not None: body['name'] = self.name
|
|
858
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
859
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
860
|
+
if self.queue: body['queue'] = self.queue
|
|
861
|
+
if self.run_as: body['run_as'] = self.run_as
|
|
862
|
+
if self.schedule: body['schedule'] = self.schedule
|
|
863
|
+
if self.tags: body['tags'] = self.tags
|
|
864
|
+
if self.tasks: body['tasks'] = self.tasks
|
|
865
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
866
|
+
if self.trigger: body['trigger'] = self.trigger
|
|
867
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
868
|
+
return body
|
|
869
|
+
|
|
632
870
|
@classmethod
|
|
633
871
|
def from_dict(cls, d: Dict[str, any]) -> CreateJob:
|
|
634
872
|
"""Deserializes the CreateJob from a dictionary."""
|
|
@@ -671,6 +909,12 @@ class CreateResponse:
|
|
|
671
909
|
if self.job_id is not None: body['job_id'] = self.job_id
|
|
672
910
|
return body
|
|
673
911
|
|
|
912
|
+
def as_shallow_dict(self) -> dict:
|
|
913
|
+
"""Serializes the CreateResponse into a shallow dictionary of its immediate attributes."""
|
|
914
|
+
body = {}
|
|
915
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
916
|
+
return body
|
|
917
|
+
|
|
674
918
|
@classmethod
|
|
675
919
|
def from_dict(cls, d: Dict[str, any]) -> CreateResponse:
|
|
676
920
|
"""Deserializes the CreateResponse from a dictionary."""
|
|
@@ -703,6 +947,15 @@ class CronSchedule:
|
|
|
703
947
|
if self.timezone_id is not None: body['timezone_id'] = self.timezone_id
|
|
704
948
|
return body
|
|
705
949
|
|
|
950
|
+
def as_shallow_dict(self) -> dict:
|
|
951
|
+
"""Serializes the CronSchedule into a shallow dictionary of its immediate attributes."""
|
|
952
|
+
body = {}
|
|
953
|
+
if self.pause_status is not None: body['pause_status'] = self.pause_status
|
|
954
|
+
if self.quartz_cron_expression is not None:
|
|
955
|
+
body['quartz_cron_expression'] = self.quartz_cron_expression
|
|
956
|
+
if self.timezone_id is not None: body['timezone_id'] = self.timezone_id
|
|
957
|
+
return body
|
|
958
|
+
|
|
706
959
|
@classmethod
|
|
707
960
|
def from_dict(cls, d: Dict[str, any]) -> CronSchedule:
|
|
708
961
|
"""Deserializes the CronSchedule from a dictionary."""
|
|
@@ -727,6 +980,13 @@ class DbtOutput:
|
|
|
727
980
|
if self.artifacts_link is not None: body['artifacts_link'] = self.artifacts_link
|
|
728
981
|
return body
|
|
729
982
|
|
|
983
|
+
def as_shallow_dict(self) -> dict:
|
|
984
|
+
"""Serializes the DbtOutput into a shallow dictionary of its immediate attributes."""
|
|
985
|
+
body = {}
|
|
986
|
+
if self.artifacts_headers: body['artifacts_headers'] = self.artifacts_headers
|
|
987
|
+
if self.artifacts_link is not None: body['artifacts_link'] = self.artifacts_link
|
|
988
|
+
return body
|
|
989
|
+
|
|
730
990
|
@classmethod
|
|
731
991
|
def from_dict(cls, d: Dict[str, any]) -> DbtOutput:
|
|
732
992
|
"""Deserializes the DbtOutput from a dictionary."""
|
|
@@ -783,6 +1043,18 @@ class DbtTask:
|
|
|
783
1043
|
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
784
1044
|
return body
|
|
785
1045
|
|
|
1046
|
+
def as_shallow_dict(self) -> dict:
|
|
1047
|
+
"""Serializes the DbtTask into a shallow dictionary of its immediate attributes."""
|
|
1048
|
+
body = {}
|
|
1049
|
+
if self.catalog is not None: body['catalog'] = self.catalog
|
|
1050
|
+
if self.commands: body['commands'] = self.commands
|
|
1051
|
+
if self.profiles_directory is not None: body['profiles_directory'] = self.profiles_directory
|
|
1052
|
+
if self.project_directory is not None: body['project_directory'] = self.project_directory
|
|
1053
|
+
if self.schema is not None: body['schema'] = self.schema
|
|
1054
|
+
if self.source is not None: body['source'] = self.source
|
|
1055
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
1056
|
+
return body
|
|
1057
|
+
|
|
786
1058
|
@classmethod
|
|
787
1059
|
def from_dict(cls, d: Dict[str, any]) -> DbtTask:
|
|
788
1060
|
"""Deserializes the DbtTask from a dictionary."""
|
|
@@ -806,6 +1078,12 @@ class DeleteJob:
|
|
|
806
1078
|
if self.job_id is not None: body['job_id'] = self.job_id
|
|
807
1079
|
return body
|
|
808
1080
|
|
|
1081
|
+
def as_shallow_dict(self) -> dict:
|
|
1082
|
+
"""Serializes the DeleteJob into a shallow dictionary of its immediate attributes."""
|
|
1083
|
+
body = {}
|
|
1084
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
1085
|
+
return body
|
|
1086
|
+
|
|
809
1087
|
@classmethod
|
|
810
1088
|
def from_dict(cls, d: Dict[str, any]) -> DeleteJob:
|
|
811
1089
|
"""Deserializes the DeleteJob from a dictionary."""
|
|
@@ -820,6 +1098,11 @@ class DeleteResponse:
|
|
|
820
1098
|
body = {}
|
|
821
1099
|
return body
|
|
822
1100
|
|
|
1101
|
+
def as_shallow_dict(self) -> dict:
|
|
1102
|
+
"""Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
|
|
1103
|
+
body = {}
|
|
1104
|
+
return body
|
|
1105
|
+
|
|
823
1106
|
@classmethod
|
|
824
1107
|
def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
|
|
825
1108
|
"""Deserializes the DeleteResponse from a dictionary."""
|
|
@@ -837,6 +1120,12 @@ class DeleteRun:
|
|
|
837
1120
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
838
1121
|
return body
|
|
839
1122
|
|
|
1123
|
+
def as_shallow_dict(self) -> dict:
|
|
1124
|
+
"""Serializes the DeleteRun into a shallow dictionary of its immediate attributes."""
|
|
1125
|
+
body = {}
|
|
1126
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
1127
|
+
return body
|
|
1128
|
+
|
|
840
1129
|
@classmethod
|
|
841
1130
|
def from_dict(cls, d: Dict[str, any]) -> DeleteRun:
|
|
842
1131
|
"""Deserializes the DeleteRun from a dictionary."""
|
|
@@ -851,6 +1140,11 @@ class DeleteRunResponse:
|
|
|
851
1140
|
body = {}
|
|
852
1141
|
return body
|
|
853
1142
|
|
|
1143
|
+
def as_shallow_dict(self) -> dict:
|
|
1144
|
+
"""Serializes the DeleteRunResponse into a shallow dictionary of its immediate attributes."""
|
|
1145
|
+
body = {}
|
|
1146
|
+
return body
|
|
1147
|
+
|
|
854
1148
|
@classmethod
|
|
855
1149
|
def from_dict(cls, d: Dict[str, any]) -> DeleteRunResponse:
|
|
856
1150
|
"""Deserializes the DeleteRunResponse from a dictionary."""
|
|
@@ -883,6 +1177,14 @@ class EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
|
|
|
883
1177
|
if self.previous_value is not None: body['previous_value'] = self.previous_value
|
|
884
1178
|
return body
|
|
885
1179
|
|
|
1180
|
+
def as_shallow_dict(self) -> dict:
|
|
1181
|
+
"""Serializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange into a shallow dictionary of its immediate attributes."""
|
|
1182
|
+
body = {}
|
|
1183
|
+
if self.field is not None: body['field'] = self.field
|
|
1184
|
+
if self.new_value is not None: body['new_value'] = self.new_value
|
|
1185
|
+
if self.previous_value is not None: body['previous_value'] = self.previous_value
|
|
1186
|
+
return body
|
|
1187
|
+
|
|
886
1188
|
@classmethod
|
|
887
1189
|
def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceForJobResponseJobClusterSettingsChange:
|
|
888
1190
|
"""Deserializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange from a dictionary."""
|
|
@@ -906,6 +1208,13 @@ class EnforcePolicyComplianceRequest:
|
|
|
906
1208
|
if self.validate_only is not None: body['validate_only'] = self.validate_only
|
|
907
1209
|
return body
|
|
908
1210
|
|
|
1211
|
+
def as_shallow_dict(self) -> dict:
|
|
1212
|
+
"""Serializes the EnforcePolicyComplianceRequest into a shallow dictionary of its immediate attributes."""
|
|
1213
|
+
body = {}
|
|
1214
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
1215
|
+
if self.validate_only is not None: body['validate_only'] = self.validate_only
|
|
1216
|
+
return body
|
|
1217
|
+
|
|
909
1218
|
@classmethod
|
|
910
1219
|
def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceRequest:
|
|
911
1220
|
"""Deserializes the EnforcePolicyComplianceRequest from a dictionary."""
|
|
@@ -937,6 +1246,14 @@ class EnforcePolicyComplianceResponse:
|
|
|
937
1246
|
if self.settings: body['settings'] = self.settings.as_dict()
|
|
938
1247
|
return body
|
|
939
1248
|
|
|
1249
|
+
def as_shallow_dict(self) -> dict:
|
|
1250
|
+
"""Serializes the EnforcePolicyComplianceResponse into a shallow dictionary of its immediate attributes."""
|
|
1251
|
+
body = {}
|
|
1252
|
+
if self.has_changes is not None: body['has_changes'] = self.has_changes
|
|
1253
|
+
if self.job_cluster_changes: body['job_cluster_changes'] = self.job_cluster_changes
|
|
1254
|
+
if self.settings: body['settings'] = self.settings
|
|
1255
|
+
return body
|
|
1256
|
+
|
|
940
1257
|
@classmethod
|
|
941
1258
|
def from_dict(cls, d: Dict[str, any]) -> EnforcePolicyComplianceResponse:
|
|
942
1259
|
"""Deserializes the EnforcePolicyComplianceResponse from a dictionary."""
|
|
@@ -963,6 +1280,12 @@ class ExportRunOutput:
|
|
|
963
1280
|
if self.views: body['views'] = [v.as_dict() for v in self.views]
|
|
964
1281
|
return body
|
|
965
1282
|
|
|
1283
|
+
def as_shallow_dict(self) -> dict:
|
|
1284
|
+
"""Serializes the ExportRunOutput into a shallow dictionary of its immediate attributes."""
|
|
1285
|
+
body = {}
|
|
1286
|
+
if self.views: body['views'] = self.views
|
|
1287
|
+
return body
|
|
1288
|
+
|
|
966
1289
|
@classmethod
|
|
967
1290
|
def from_dict(cls, d: Dict[str, any]) -> ExportRunOutput:
|
|
968
1291
|
"""Deserializes the ExportRunOutput from a dictionary."""
|
|
@@ -994,6 +1317,16 @@ class FileArrivalTriggerConfiguration:
|
|
|
994
1317
|
body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
|
|
995
1318
|
return body
|
|
996
1319
|
|
|
1320
|
+
def as_shallow_dict(self) -> dict:
|
|
1321
|
+
"""Serializes the FileArrivalTriggerConfiguration into a shallow dictionary of its immediate attributes."""
|
|
1322
|
+
body = {}
|
|
1323
|
+
if self.min_time_between_triggers_seconds is not None:
|
|
1324
|
+
body['min_time_between_triggers_seconds'] = self.min_time_between_triggers_seconds
|
|
1325
|
+
if self.url is not None: body['url'] = self.url
|
|
1326
|
+
if self.wait_after_last_change_seconds is not None:
|
|
1327
|
+
body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
|
|
1328
|
+
return body
|
|
1329
|
+
|
|
997
1330
|
@classmethod
|
|
998
1331
|
def from_dict(cls, d: Dict[str, any]) -> FileArrivalTriggerConfiguration:
|
|
999
1332
|
"""Deserializes the FileArrivalTriggerConfiguration from a dictionary."""
|
|
@@ -1018,6 +1351,13 @@ class ForEachStats:
|
|
|
1018
1351
|
if self.task_run_stats: body['task_run_stats'] = self.task_run_stats.as_dict()
|
|
1019
1352
|
return body
|
|
1020
1353
|
|
|
1354
|
+
def as_shallow_dict(self) -> dict:
|
|
1355
|
+
"""Serializes the ForEachStats into a shallow dictionary of its immediate attributes."""
|
|
1356
|
+
body = {}
|
|
1357
|
+
if self.error_message_stats: body['error_message_stats'] = self.error_message_stats
|
|
1358
|
+
if self.task_run_stats: body['task_run_stats'] = self.task_run_stats
|
|
1359
|
+
return body
|
|
1360
|
+
|
|
1021
1361
|
@classmethod
|
|
1022
1362
|
def from_dict(cls, d: Dict[str, any]) -> ForEachStats:
|
|
1023
1363
|
"""Deserializes the ForEachStats from a dictionary."""
|
|
@@ -1045,6 +1385,14 @@ class ForEachTask:
|
|
|
1045
1385
|
if self.task: body['task'] = self.task.as_dict()
|
|
1046
1386
|
return body
|
|
1047
1387
|
|
|
1388
|
+
def as_shallow_dict(self) -> dict:
|
|
1389
|
+
"""Serializes the ForEachTask into a shallow dictionary of its immediate attributes."""
|
|
1390
|
+
body = {}
|
|
1391
|
+
if self.concurrency is not None: body['concurrency'] = self.concurrency
|
|
1392
|
+
if self.inputs is not None: body['inputs'] = self.inputs
|
|
1393
|
+
if self.task: body['task'] = self.task
|
|
1394
|
+
return body
|
|
1395
|
+
|
|
1048
1396
|
@classmethod
|
|
1049
1397
|
def from_dict(cls, d: Dict[str, any]) -> ForEachTask:
|
|
1050
1398
|
"""Deserializes the ForEachTask from a dictionary."""
|
|
@@ -1072,6 +1420,14 @@ class ForEachTaskErrorMessageStats:
|
|
|
1072
1420
|
if self.termination_category is not None: body['termination_category'] = self.termination_category
|
|
1073
1421
|
return body
|
|
1074
1422
|
|
|
1423
|
+
def as_shallow_dict(self) -> dict:
|
|
1424
|
+
"""Serializes the ForEachTaskErrorMessageStats into a shallow dictionary of its immediate attributes."""
|
|
1425
|
+
body = {}
|
|
1426
|
+
if self.count is not None: body['count'] = self.count
|
|
1427
|
+
if self.error_message is not None: body['error_message'] = self.error_message
|
|
1428
|
+
if self.termination_category is not None: body['termination_category'] = self.termination_category
|
|
1429
|
+
return body
|
|
1430
|
+
|
|
1075
1431
|
@classmethod
|
|
1076
1432
|
def from_dict(cls, d: Dict[str, any]) -> ForEachTaskErrorMessageStats:
|
|
1077
1433
|
"""Deserializes the ForEachTaskErrorMessageStats from a dictionary."""
|
|
@@ -1111,6 +1467,17 @@ class ForEachTaskTaskRunStats:
|
|
|
1111
1467
|
if self.total_iterations is not None: body['total_iterations'] = self.total_iterations
|
|
1112
1468
|
return body
|
|
1113
1469
|
|
|
1470
|
+
def as_shallow_dict(self) -> dict:
|
|
1471
|
+
"""Serializes the ForEachTaskTaskRunStats into a shallow dictionary of its immediate attributes."""
|
|
1472
|
+
body = {}
|
|
1473
|
+
if self.active_iterations is not None: body['active_iterations'] = self.active_iterations
|
|
1474
|
+
if self.completed_iterations is not None: body['completed_iterations'] = self.completed_iterations
|
|
1475
|
+
if self.failed_iterations is not None: body['failed_iterations'] = self.failed_iterations
|
|
1476
|
+
if self.scheduled_iterations is not None: body['scheduled_iterations'] = self.scheduled_iterations
|
|
1477
|
+
if self.succeeded_iterations is not None: body['succeeded_iterations'] = self.succeeded_iterations
|
|
1478
|
+
if self.total_iterations is not None: body['total_iterations'] = self.total_iterations
|
|
1479
|
+
return body
|
|
1480
|
+
|
|
1114
1481
|
@classmethod
|
|
1115
1482
|
def from_dict(cls, d: Dict[str, any]) -> ForEachTaskTaskRunStats:
|
|
1116
1483
|
"""Deserializes the ForEachTaskTaskRunStats from a dictionary."""
|
|
@@ -1139,6 +1506,12 @@ class GetJobPermissionLevelsResponse:
|
|
|
1139
1506
|
if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
|
|
1140
1507
|
return body
|
|
1141
1508
|
|
|
1509
|
+
def as_shallow_dict(self) -> dict:
|
|
1510
|
+
"""Serializes the GetJobPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
|
|
1511
|
+
body = {}
|
|
1512
|
+
if self.permission_levels: body['permission_levels'] = self.permission_levels
|
|
1513
|
+
return body
|
|
1514
|
+
|
|
1142
1515
|
@classmethod
|
|
1143
1516
|
def from_dict(cls, d: Dict[str, any]) -> GetJobPermissionLevelsResponse:
|
|
1144
1517
|
"""Deserializes the GetJobPermissionLevelsResponse from a dictionary."""
|
|
@@ -1165,6 +1538,13 @@ class GetPolicyComplianceResponse:
|
|
|
1165
1538
|
if self.violations: body['violations'] = self.violations
|
|
1166
1539
|
return body
|
|
1167
1540
|
|
|
1541
|
+
def as_shallow_dict(self) -> dict:
|
|
1542
|
+
"""Serializes the GetPolicyComplianceResponse into a shallow dictionary of its immediate attributes."""
|
|
1543
|
+
body = {}
|
|
1544
|
+
if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
|
|
1545
|
+
if self.violations: body['violations'] = self.violations
|
|
1546
|
+
return body
|
|
1547
|
+
|
|
1168
1548
|
@classmethod
|
|
1169
1549
|
def from_dict(cls, d: Dict[str, any]) -> GetPolicyComplianceResponse:
|
|
1170
1550
|
"""Deserializes the GetPolicyComplianceResponse from a dictionary."""
|
|
@@ -1199,6 +1579,12 @@ class GitSnapshot:
|
|
|
1199
1579
|
if self.used_commit is not None: body['used_commit'] = self.used_commit
|
|
1200
1580
|
return body
|
|
1201
1581
|
|
|
1582
|
+
def as_shallow_dict(self) -> dict:
|
|
1583
|
+
"""Serializes the GitSnapshot into a shallow dictionary of its immediate attributes."""
|
|
1584
|
+
body = {}
|
|
1585
|
+
if self.used_commit is not None: body['used_commit'] = self.used_commit
|
|
1586
|
+
return body
|
|
1587
|
+
|
|
1202
1588
|
@classmethod
|
|
1203
1589
|
def from_dict(cls, d: Dict[str, any]) -> GitSnapshot:
|
|
1204
1590
|
"""Deserializes the GitSnapshot from a dictionary."""
|
|
@@ -1253,6 +1639,18 @@ class GitSource:
|
|
|
1253
1639
|
if self.job_source: body['job_source'] = self.job_source.as_dict()
|
|
1254
1640
|
return body
|
|
1255
1641
|
|
|
1642
|
+
def as_shallow_dict(self) -> dict:
|
|
1643
|
+
"""Serializes the GitSource into a shallow dictionary of its immediate attributes."""
|
|
1644
|
+
body = {}
|
|
1645
|
+
if self.git_branch is not None: body['git_branch'] = self.git_branch
|
|
1646
|
+
if self.git_commit is not None: body['git_commit'] = self.git_commit
|
|
1647
|
+
if self.git_provider is not None: body['git_provider'] = self.git_provider
|
|
1648
|
+
if self.git_snapshot: body['git_snapshot'] = self.git_snapshot
|
|
1649
|
+
if self.git_tag is not None: body['git_tag'] = self.git_tag
|
|
1650
|
+
if self.git_url is not None: body['git_url'] = self.git_url
|
|
1651
|
+
if self.job_source: body['job_source'] = self.job_source
|
|
1652
|
+
return body
|
|
1653
|
+
|
|
1256
1654
|
@classmethod
|
|
1257
1655
|
def from_dict(cls, d: Dict[str, any]) -> GitSource:
|
|
1258
1656
|
"""Deserializes the GitSource from a dictionary."""
|
|
@@ -1310,6 +1708,18 @@ class Job:
|
|
|
1310
1708
|
if self.settings: body['settings'] = self.settings.as_dict()
|
|
1311
1709
|
return body
|
|
1312
1710
|
|
|
1711
|
+
def as_shallow_dict(self) -> dict:
|
|
1712
|
+
"""Serializes the Job into a shallow dictionary of its immediate attributes."""
|
|
1713
|
+
body = {}
|
|
1714
|
+
if self.created_time is not None: body['created_time'] = self.created_time
|
|
1715
|
+
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
1716
|
+
if self.effective_budget_policy_id is not None:
|
|
1717
|
+
body['effective_budget_policy_id'] = self.effective_budget_policy_id
|
|
1718
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
1719
|
+
if self.run_as_user_name is not None: body['run_as_user_name'] = self.run_as_user_name
|
|
1720
|
+
if self.settings: body['settings'] = self.settings
|
|
1721
|
+
return body
|
|
1722
|
+
|
|
1313
1723
|
@classmethod
|
|
1314
1724
|
def from_dict(cls, d: Dict[str, any]) -> Job:
|
|
1315
1725
|
"""Deserializes the Job from a dictionary."""
|
|
@@ -1345,6 +1755,16 @@ class JobAccessControlRequest:
|
|
|
1345
1755
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1346
1756
|
return body
|
|
1347
1757
|
|
|
1758
|
+
def as_shallow_dict(self) -> dict:
|
|
1759
|
+
"""Serializes the JobAccessControlRequest into a shallow dictionary of its immediate attributes."""
|
|
1760
|
+
body = {}
|
|
1761
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
1762
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1763
|
+
if self.service_principal_name is not None:
|
|
1764
|
+
body['service_principal_name'] = self.service_principal_name
|
|
1765
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1766
|
+
return body
|
|
1767
|
+
|
|
1348
1768
|
@classmethod
|
|
1349
1769
|
def from_dict(cls, d: Dict[str, any]) -> JobAccessControlRequest:
|
|
1350
1770
|
"""Deserializes the JobAccessControlRequest from a dictionary."""
|
|
@@ -1382,6 +1802,17 @@ class JobAccessControlResponse:
|
|
|
1382
1802
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1383
1803
|
return body
|
|
1384
1804
|
|
|
1805
|
+
def as_shallow_dict(self) -> dict:
|
|
1806
|
+
"""Serializes the JobAccessControlResponse into a shallow dictionary of its immediate attributes."""
|
|
1807
|
+
body = {}
|
|
1808
|
+
if self.all_permissions: body['all_permissions'] = self.all_permissions
|
|
1809
|
+
if self.display_name is not None: body['display_name'] = self.display_name
|
|
1810
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
1811
|
+
if self.service_principal_name is not None:
|
|
1812
|
+
body['service_principal_name'] = self.service_principal_name
|
|
1813
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1814
|
+
return body
|
|
1815
|
+
|
|
1385
1816
|
@classmethod
|
|
1386
1817
|
def from_dict(cls, d: Dict[str, any]) -> JobAccessControlResponse:
|
|
1387
1818
|
"""Deserializes the JobAccessControlResponse from a dictionary."""
|
|
@@ -1409,6 +1840,13 @@ class JobCluster:
|
|
|
1409
1840
|
if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
|
|
1410
1841
|
return body
|
|
1411
1842
|
|
|
1843
|
+
def as_shallow_dict(self) -> dict:
|
|
1844
|
+
"""Serializes the JobCluster into a shallow dictionary of its immediate attributes."""
|
|
1845
|
+
body = {}
|
|
1846
|
+
if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
|
|
1847
|
+
if self.new_cluster: body['new_cluster'] = self.new_cluster
|
|
1848
|
+
return body
|
|
1849
|
+
|
|
1412
1850
|
@classmethod
|
|
1413
1851
|
def from_dict(cls, d: Dict[str, any]) -> JobCluster:
|
|
1414
1852
|
"""Deserializes the JobCluster from a dictionary."""
|
|
@@ -1438,6 +1876,14 @@ class JobCompliance:
|
|
|
1438
1876
|
if self.violations: body['violations'] = self.violations
|
|
1439
1877
|
return body
|
|
1440
1878
|
|
|
1879
|
+
def as_shallow_dict(self) -> dict:
|
|
1880
|
+
"""Serializes the JobCompliance into a shallow dictionary of its immediate attributes."""
|
|
1881
|
+
body = {}
|
|
1882
|
+
if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
|
|
1883
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
1884
|
+
if self.violations: body['violations'] = self.violations
|
|
1885
|
+
return body
|
|
1886
|
+
|
|
1441
1887
|
@classmethod
|
|
1442
1888
|
def from_dict(cls, d: Dict[str, any]) -> JobCompliance:
|
|
1443
1889
|
"""Deserializes the JobCompliance from a dictionary."""
|
|
@@ -1463,6 +1909,13 @@ class JobDeployment:
|
|
|
1463
1909
|
if self.metadata_file_path is not None: body['metadata_file_path'] = self.metadata_file_path
|
|
1464
1910
|
return body
|
|
1465
1911
|
|
|
1912
|
+
def as_shallow_dict(self) -> dict:
|
|
1913
|
+
"""Serializes the JobDeployment into a shallow dictionary of its immediate attributes."""
|
|
1914
|
+
body = {}
|
|
1915
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
1916
|
+
if self.metadata_file_path is not None: body['metadata_file_path'] = self.metadata_file_path
|
|
1917
|
+
return body
|
|
1918
|
+
|
|
1466
1919
|
@classmethod
|
|
1467
1920
|
def from_dict(cls, d: Dict[str, any]) -> JobDeployment:
|
|
1468
1921
|
"""Deserializes the JobDeployment from a dictionary."""
|
|
@@ -1537,6 +1990,20 @@ class JobEmailNotifications:
|
|
|
1537
1990
|
if self.on_success: body['on_success'] = [v for v in self.on_success]
|
|
1538
1991
|
return body
|
|
1539
1992
|
|
|
1993
|
+
def as_shallow_dict(self) -> dict:
|
|
1994
|
+
"""Serializes the JobEmailNotifications into a shallow dictionary of its immediate attributes."""
|
|
1995
|
+
body = {}
|
|
1996
|
+
if self.no_alert_for_skipped_runs is not None:
|
|
1997
|
+
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
1998
|
+
if self.on_duration_warning_threshold_exceeded:
|
|
1999
|
+
body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
|
|
2000
|
+
if self.on_failure: body['on_failure'] = self.on_failure
|
|
2001
|
+
if self.on_start: body['on_start'] = self.on_start
|
|
2002
|
+
if self.on_streaming_backlog_exceeded:
|
|
2003
|
+
body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
|
|
2004
|
+
if self.on_success: body['on_success'] = self.on_success
|
|
2005
|
+
return body
|
|
2006
|
+
|
|
1540
2007
|
@classmethod
|
|
1541
2008
|
def from_dict(cls, d: Dict[str, any]) -> JobEmailNotifications:
|
|
1542
2009
|
"""Deserializes the JobEmailNotifications from a dictionary."""
|
|
@@ -1565,6 +2032,13 @@ class JobEnvironment:
|
|
|
1565
2032
|
if self.spec: body['spec'] = self.spec.as_dict()
|
|
1566
2033
|
return body
|
|
1567
2034
|
|
|
2035
|
+
def as_shallow_dict(self) -> dict:
|
|
2036
|
+
"""Serializes the JobEnvironment into a shallow dictionary of its immediate attributes."""
|
|
2037
|
+
body = {}
|
|
2038
|
+
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
2039
|
+
if self.spec: body['spec'] = self.spec
|
|
2040
|
+
return body
|
|
2041
|
+
|
|
1568
2042
|
@classmethod
|
|
1569
2043
|
def from_dict(cls, d: Dict[str, any]) -> JobEnvironment:
|
|
1570
2044
|
"""Deserializes the JobEnvironment from a dictionary."""
|
|
@@ -1591,6 +2065,15 @@ class JobNotificationSettings:
|
|
|
1591
2065
|
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
1592
2066
|
return body
|
|
1593
2067
|
|
|
2068
|
+
def as_shallow_dict(self) -> dict:
|
|
2069
|
+
"""Serializes the JobNotificationSettings into a shallow dictionary of its immediate attributes."""
|
|
2070
|
+
body = {}
|
|
2071
|
+
if self.no_alert_for_canceled_runs is not None:
|
|
2072
|
+
body['no_alert_for_canceled_runs'] = self.no_alert_for_canceled_runs
|
|
2073
|
+
if self.no_alert_for_skipped_runs is not None:
|
|
2074
|
+
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
2075
|
+
return body
|
|
2076
|
+
|
|
1594
2077
|
@classmethod
|
|
1595
2078
|
def from_dict(cls, d: Dict[str, any]) -> JobNotificationSettings:
|
|
1596
2079
|
"""Deserializes the JobNotificationSettings from a dictionary."""
|
|
@@ -1617,6 +2100,14 @@ class JobParameter:
|
|
|
1617
2100
|
if self.value is not None: body['value'] = self.value
|
|
1618
2101
|
return body
|
|
1619
2102
|
|
|
2103
|
+
def as_shallow_dict(self) -> dict:
|
|
2104
|
+
"""Serializes the JobParameter into a shallow dictionary of its immediate attributes."""
|
|
2105
|
+
body = {}
|
|
2106
|
+
if self.default is not None: body['default'] = self.default
|
|
2107
|
+
if self.name is not None: body['name'] = self.name
|
|
2108
|
+
if self.value is not None: body['value'] = self.value
|
|
2109
|
+
return body
|
|
2110
|
+
|
|
1620
2111
|
@classmethod
|
|
1621
2112
|
def from_dict(cls, d: Dict[str, any]) -> JobParameter:
|
|
1622
2113
|
"""Deserializes the JobParameter from a dictionary."""
|
|
@@ -1638,6 +2129,13 @@ class JobParameterDefinition:
|
|
|
1638
2129
|
if self.name is not None: body['name'] = self.name
|
|
1639
2130
|
return body
|
|
1640
2131
|
|
|
2132
|
+
def as_shallow_dict(self) -> dict:
|
|
2133
|
+
"""Serializes the JobParameterDefinition into a shallow dictionary of its immediate attributes."""
|
|
2134
|
+
body = {}
|
|
2135
|
+
if self.default is not None: body['default'] = self.default
|
|
2136
|
+
if self.name is not None: body['name'] = self.name
|
|
2137
|
+
return body
|
|
2138
|
+
|
|
1641
2139
|
@classmethod
|
|
1642
2140
|
def from_dict(cls, d: Dict[str, any]) -> JobParameterDefinition:
|
|
1643
2141
|
"""Deserializes the JobParameterDefinition from a dictionary."""
|
|
@@ -1661,6 +2159,14 @@ class JobPermission:
|
|
|
1661
2159
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1662
2160
|
return body
|
|
1663
2161
|
|
|
2162
|
+
def as_shallow_dict(self) -> dict:
|
|
2163
|
+
"""Serializes the JobPermission into a shallow dictionary of its immediate attributes."""
|
|
2164
|
+
body = {}
|
|
2165
|
+
if self.inherited is not None: body['inherited'] = self.inherited
|
|
2166
|
+
if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
|
|
2167
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
2168
|
+
return body
|
|
2169
|
+
|
|
1664
2170
|
@classmethod
|
|
1665
2171
|
def from_dict(cls, d: Dict[str, any]) -> JobPermission:
|
|
1666
2172
|
"""Deserializes the JobPermission from a dictionary."""
|
|
@@ -1695,6 +2201,14 @@ class JobPermissions:
|
|
|
1695
2201
|
if self.object_type is not None: body['object_type'] = self.object_type
|
|
1696
2202
|
return body
|
|
1697
2203
|
|
|
2204
|
+
def as_shallow_dict(self) -> dict:
|
|
2205
|
+
"""Serializes the JobPermissions into a shallow dictionary of its immediate attributes."""
|
|
2206
|
+
body = {}
|
|
2207
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
2208
|
+
if self.object_id is not None: body['object_id'] = self.object_id
|
|
2209
|
+
if self.object_type is not None: body['object_type'] = self.object_type
|
|
2210
|
+
return body
|
|
2211
|
+
|
|
1698
2212
|
@classmethod
|
|
1699
2213
|
def from_dict(cls, d: Dict[str, any]) -> JobPermissions:
|
|
1700
2214
|
"""Deserializes the JobPermissions from a dictionary."""
|
|
@@ -1717,6 +2231,13 @@ class JobPermissionsDescription:
|
|
|
1717
2231
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1718
2232
|
return body
|
|
1719
2233
|
|
|
2234
|
+
def as_shallow_dict(self) -> dict:
|
|
2235
|
+
"""Serializes the JobPermissionsDescription into a shallow dictionary of its immediate attributes."""
|
|
2236
|
+
body = {}
|
|
2237
|
+
if self.description is not None: body['description'] = self.description
|
|
2238
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
2239
|
+
return body
|
|
2240
|
+
|
|
1720
2241
|
@classmethod
|
|
1721
2242
|
def from_dict(cls, d: Dict[str, any]) -> JobPermissionsDescription:
|
|
1722
2243
|
"""Deserializes the JobPermissionsDescription from a dictionary."""
|
|
@@ -1739,6 +2260,13 @@ class JobPermissionsRequest:
|
|
|
1739
2260
|
if self.job_id is not None: body['job_id'] = self.job_id
|
|
1740
2261
|
return body
|
|
1741
2262
|
|
|
2263
|
+
def as_shallow_dict(self) -> dict:
|
|
2264
|
+
"""Serializes the JobPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
2265
|
+
body = {}
|
|
2266
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
2267
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
2268
|
+
return body
|
|
2269
|
+
|
|
1742
2270
|
@classmethod
|
|
1743
2271
|
def from_dict(cls, d: Dict[str, any]) -> JobPermissionsRequest:
|
|
1744
2272
|
"""Deserializes the JobPermissionsRequest from a dictionary."""
|
|
@@ -1748,8 +2276,8 @@ class JobPermissionsRequest:
|
|
|
1748
2276
|
|
|
1749
2277
|
@dataclass
|
|
1750
2278
|
class JobRunAs:
|
|
1751
|
-
"""Write-only setting. Specifies the user
|
|
1752
|
-
|
|
2279
|
+
"""Write-only setting. Specifies the user or service principal that the job runs as. If not
|
|
2280
|
+
specified, the job runs as the user who created the job.
|
|
1753
2281
|
|
|
1754
2282
|
Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
|
|
1755
2283
|
|
|
@@ -1769,6 +2297,14 @@ class JobRunAs:
|
|
|
1769
2297
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1770
2298
|
return body
|
|
1771
2299
|
|
|
2300
|
+
def as_shallow_dict(self) -> dict:
|
|
2301
|
+
"""Serializes the JobRunAs into a shallow dictionary of its immediate attributes."""
|
|
2302
|
+
body = {}
|
|
2303
|
+
if self.service_principal_name is not None:
|
|
2304
|
+
body['service_principal_name'] = self.service_principal_name
|
|
2305
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
2306
|
+
return body
|
|
2307
|
+
|
|
1772
2308
|
@classmethod
|
|
1773
2309
|
def from_dict(cls, d: Dict[str, any]) -> JobRunAs:
|
|
1774
2310
|
"""Deserializes the JobRunAs from a dictionary."""
|
|
@@ -1856,8 +2392,8 @@ class JobSettings:
|
|
|
1856
2392
|
"""The queue settings of the job."""
|
|
1857
2393
|
|
|
1858
2394
|
run_as: Optional[JobRunAs] = None
|
|
1859
|
-
"""Write-only setting. Specifies the user
|
|
1860
|
-
|
|
2395
|
+
"""Write-only setting. Specifies the user or service principal that the job runs as. If not
|
|
2396
|
+
specified, the job runs as the user who created the job.
|
|
1861
2397
|
|
|
1862
2398
|
Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown."""
|
|
1863
2399
|
|
|
@@ -1912,6 +2448,34 @@ class JobSettings:
|
|
|
1912
2448
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
1913
2449
|
return body
|
|
1914
2450
|
|
|
2451
|
+
def as_shallow_dict(self) -> dict:
|
|
2452
|
+
"""Serializes the JobSettings into a shallow dictionary of its immediate attributes."""
|
|
2453
|
+
body = {}
|
|
2454
|
+
if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
|
|
2455
|
+
if self.continuous: body['continuous'] = self.continuous
|
|
2456
|
+
if self.deployment: body['deployment'] = self.deployment
|
|
2457
|
+
if self.description is not None: body['description'] = self.description
|
|
2458
|
+
if self.edit_mode is not None: body['edit_mode'] = self.edit_mode
|
|
2459
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
2460
|
+
if self.environments: body['environments'] = self.environments
|
|
2461
|
+
if self.format is not None: body['format'] = self.format
|
|
2462
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
2463
|
+
if self.health: body['health'] = self.health
|
|
2464
|
+
if self.job_clusters: body['job_clusters'] = self.job_clusters
|
|
2465
|
+
if self.max_concurrent_runs is not None: body['max_concurrent_runs'] = self.max_concurrent_runs
|
|
2466
|
+
if self.name is not None: body['name'] = self.name
|
|
2467
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
2468
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
2469
|
+
if self.queue: body['queue'] = self.queue
|
|
2470
|
+
if self.run_as: body['run_as'] = self.run_as
|
|
2471
|
+
if self.schedule: body['schedule'] = self.schedule
|
|
2472
|
+
if self.tags: body['tags'] = self.tags
|
|
2473
|
+
if self.tasks: body['tasks'] = self.tasks
|
|
2474
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
2475
|
+
if self.trigger: body['trigger'] = self.trigger
|
|
2476
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
2477
|
+
return body
|
|
2478
|
+
|
|
1915
2479
|
@classmethod
|
|
1916
2480
|
def from_dict(cls, d: Dict[str, any]) -> JobSettings:
|
|
1917
2481
|
"""Deserializes the JobSettings from a dictionary."""
|
|
@@ -1969,6 +2533,15 @@ class JobSource:
|
|
|
1969
2533
|
if self.job_config_path is not None: body['job_config_path'] = self.job_config_path
|
|
1970
2534
|
return body
|
|
1971
2535
|
|
|
2536
|
+
def as_shallow_dict(self) -> dict:
|
|
2537
|
+
"""Serializes the JobSource into a shallow dictionary of its immediate attributes."""
|
|
2538
|
+
body = {}
|
|
2539
|
+
if self.dirty_state is not None: body['dirty_state'] = self.dirty_state
|
|
2540
|
+
if self.import_from_git_branch is not None:
|
|
2541
|
+
body['import_from_git_branch'] = self.import_from_git_branch
|
|
2542
|
+
if self.job_config_path is not None: body['job_config_path'] = self.job_config_path
|
|
2543
|
+
return body
|
|
2544
|
+
|
|
1972
2545
|
@classmethod
|
|
1973
2546
|
def from_dict(cls, d: Dict[str, any]) -> JobSource:
|
|
1974
2547
|
"""Deserializes the JobSource from a dictionary."""
|
|
@@ -1996,11 +2569,11 @@ class JobsHealthMetric(Enum):
|
|
|
1996
2569
|
|
|
1997
2570
|
* `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * `STREAMING_BACKLOG_BYTES`:
|
|
1998
2571
|
An estimate of the maximum bytes of data waiting to be consumed across all streams. This metric
|
|
1999
|
-
is in
|
|
2000
|
-
across all streams. This metric is in
|
|
2001
|
-
|
|
2572
|
+
is in Public Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset lag
|
|
2573
|
+
across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_SECONDS`: An estimate
|
|
2574
|
+
of the maximum consumer delay across all streams. This metric is in Public Preview. *
|
|
2002
2575
|
`STREAMING_BACKLOG_FILES`: An estimate of the maximum number of outstanding files across all
|
|
2003
|
-
streams. This metric is in
|
|
2576
|
+
streams. This metric is in Public Preview."""
|
|
2004
2577
|
|
|
2005
2578
|
RUN_DURATION_SECONDS = 'RUN_DURATION_SECONDS'
|
|
2006
2579
|
STREAMING_BACKLOG_BYTES = 'STREAMING_BACKLOG_BYTES'
|
|
@@ -2022,11 +2595,11 @@ class JobsHealthRule:
|
|
|
2022
2595
|
|
|
2023
2596
|
* `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * `STREAMING_BACKLOG_BYTES`:
|
|
2024
2597
|
An estimate of the maximum bytes of data waiting to be consumed across all streams. This metric
|
|
2025
|
-
is in
|
|
2026
|
-
across all streams. This metric is in
|
|
2027
|
-
|
|
2598
|
+
is in Public Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset lag
|
|
2599
|
+
across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_SECONDS`: An estimate
|
|
2600
|
+
of the maximum consumer delay across all streams. This metric is in Public Preview. *
|
|
2028
2601
|
`STREAMING_BACKLOG_FILES`: An estimate of the maximum number of outstanding files across all
|
|
2029
|
-
streams. This metric is in
|
|
2602
|
+
streams. This metric is in Public Preview."""
|
|
2030
2603
|
|
|
2031
2604
|
op: JobsHealthOperator
|
|
2032
2605
|
"""Specifies the operator used to compare the health metric value with the specified threshold."""
|
|
@@ -2042,6 +2615,14 @@ class JobsHealthRule:
|
|
|
2042
2615
|
if self.value is not None: body['value'] = self.value
|
|
2043
2616
|
return body
|
|
2044
2617
|
|
|
2618
|
+
def as_shallow_dict(self) -> dict:
|
|
2619
|
+
"""Serializes the JobsHealthRule into a shallow dictionary of its immediate attributes."""
|
|
2620
|
+
body = {}
|
|
2621
|
+
if self.metric is not None: body['metric'] = self.metric
|
|
2622
|
+
if self.op is not None: body['op'] = self.op
|
|
2623
|
+
if self.value is not None: body['value'] = self.value
|
|
2624
|
+
return body
|
|
2625
|
+
|
|
2045
2626
|
@classmethod
|
|
2046
2627
|
def from_dict(cls, d: Dict[str, any]) -> JobsHealthRule:
|
|
2047
2628
|
"""Deserializes the JobsHealthRule from a dictionary."""
|
|
@@ -2062,6 +2643,12 @@ class JobsHealthRules:
|
|
|
2062
2643
|
if self.rules: body['rules'] = [v.as_dict() for v in self.rules]
|
|
2063
2644
|
return body
|
|
2064
2645
|
|
|
2646
|
+
def as_shallow_dict(self) -> dict:
|
|
2647
|
+
"""Serializes the JobsHealthRules into a shallow dictionary of its immediate attributes."""
|
|
2648
|
+
body = {}
|
|
2649
|
+
if self.rules: body['rules'] = self.rules
|
|
2650
|
+
return body
|
|
2651
|
+
|
|
2065
2652
|
@classmethod
|
|
2066
2653
|
def from_dict(cls, d: Dict[str, any]) -> JobsHealthRules:
|
|
2067
2654
|
"""Deserializes the JobsHealthRules from a dictionary."""
|
|
@@ -2089,6 +2676,14 @@ class ListJobComplianceForPolicyResponse:
|
|
|
2089
2676
|
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
2090
2677
|
return body
|
|
2091
2678
|
|
|
2679
|
+
def as_shallow_dict(self) -> dict:
|
|
2680
|
+
"""Serializes the ListJobComplianceForPolicyResponse into a shallow dictionary of its immediate attributes."""
|
|
2681
|
+
body = {}
|
|
2682
|
+
if self.jobs: body['jobs'] = self.jobs
|
|
2683
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
2684
|
+
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
2685
|
+
return body
|
|
2686
|
+
|
|
2092
2687
|
@classmethod
|
|
2093
2688
|
def from_dict(cls, d: Dict[str, any]) -> ListJobComplianceForPolicyResponse:
|
|
2094
2689
|
"""Deserializes the ListJobComplianceForPolicyResponse from a dictionary."""
|
|
@@ -2122,6 +2717,15 @@ class ListJobsResponse:
|
|
|
2122
2717
|
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
2123
2718
|
return body
|
|
2124
2719
|
|
|
2720
|
+
def as_shallow_dict(self) -> dict:
|
|
2721
|
+
"""Serializes the ListJobsResponse into a shallow dictionary of its immediate attributes."""
|
|
2722
|
+
body = {}
|
|
2723
|
+
if self.has_more is not None: body['has_more'] = self.has_more
|
|
2724
|
+
if self.jobs: body['jobs'] = self.jobs
|
|
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
|
+
return body
|
|
2728
|
+
|
|
2125
2729
|
@classmethod
|
|
2126
2730
|
def from_dict(cls, d: Dict[str, any]) -> ListJobsResponse:
|
|
2127
2731
|
"""Deserializes the ListJobsResponse from a dictionary."""
|
|
@@ -2157,6 +2761,15 @@ class ListRunsResponse:
|
|
|
2157
2761
|
if self.runs: body['runs'] = [v.as_dict() for v in self.runs]
|
|
2158
2762
|
return body
|
|
2159
2763
|
|
|
2764
|
+
def as_shallow_dict(self) -> dict:
|
|
2765
|
+
"""Serializes the ListRunsResponse into a shallow dictionary of its immediate attributes."""
|
|
2766
|
+
body = {}
|
|
2767
|
+
if self.has_more is not None: body['has_more'] = self.has_more
|
|
2768
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
2769
|
+
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
2770
|
+
if self.runs: body['runs'] = self.runs
|
|
2771
|
+
return body
|
|
2772
|
+
|
|
2160
2773
|
@classmethod
|
|
2161
2774
|
def from_dict(cls, d: Dict[str, any]) -> ListRunsResponse:
|
|
2162
2775
|
"""Deserializes the ListRunsResponse from a dictionary."""
|
|
@@ -2185,6 +2798,13 @@ class NotebookOutput:
|
|
|
2185
2798
|
if self.truncated is not None: body['truncated'] = self.truncated
|
|
2186
2799
|
return body
|
|
2187
2800
|
|
|
2801
|
+
def as_shallow_dict(self) -> dict:
|
|
2802
|
+
"""Serializes the NotebookOutput into a shallow dictionary of its immediate attributes."""
|
|
2803
|
+
body = {}
|
|
2804
|
+
if self.result is not None: body['result'] = self.result
|
|
2805
|
+
if self.truncated is not None: body['truncated'] = self.truncated
|
|
2806
|
+
return body
|
|
2807
|
+
|
|
2188
2808
|
@classmethod
|
|
2189
2809
|
def from_dict(cls, d: Dict[str, any]) -> NotebookOutput:
|
|
2190
2810
|
"""Deserializes the NotebookOutput from a dictionary."""
|
|
@@ -2237,6 +2857,15 @@ class NotebookTask:
|
|
|
2237
2857
|
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
2238
2858
|
return body
|
|
2239
2859
|
|
|
2860
|
+
def as_shallow_dict(self) -> dict:
|
|
2861
|
+
"""Serializes the NotebookTask into a shallow dictionary of its immediate attributes."""
|
|
2862
|
+
body = {}
|
|
2863
|
+
if self.base_parameters: body['base_parameters'] = self.base_parameters
|
|
2864
|
+
if self.notebook_path is not None: body['notebook_path'] = self.notebook_path
|
|
2865
|
+
if self.source is not None: body['source'] = self.source
|
|
2866
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
2867
|
+
return body
|
|
2868
|
+
|
|
2240
2869
|
@classmethod
|
|
2241
2870
|
def from_dict(cls, d: Dict[str, any]) -> NotebookTask:
|
|
2242
2871
|
"""Deserializes the NotebookTask from a dictionary."""
|
|
@@ -2267,6 +2896,13 @@ class PeriodicTriggerConfiguration:
|
|
|
2267
2896
|
if self.unit is not None: body['unit'] = self.unit.value
|
|
2268
2897
|
return body
|
|
2269
2898
|
|
|
2899
|
+
def as_shallow_dict(self) -> dict:
|
|
2900
|
+
"""Serializes the PeriodicTriggerConfiguration into a shallow dictionary of its immediate attributes."""
|
|
2901
|
+
body = {}
|
|
2902
|
+
if self.interval is not None: body['interval'] = self.interval
|
|
2903
|
+
if self.unit is not None: body['unit'] = self.unit
|
|
2904
|
+
return body
|
|
2905
|
+
|
|
2270
2906
|
@classmethod
|
|
2271
2907
|
def from_dict(cls, d: Dict[str, any]) -> PeriodicTriggerConfiguration:
|
|
2272
2908
|
"""Deserializes the PeriodicTriggerConfiguration from a dictionary."""
|
|
@@ -2292,6 +2928,12 @@ class PipelineParams:
|
|
|
2292
2928
|
if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
|
|
2293
2929
|
return body
|
|
2294
2930
|
|
|
2931
|
+
def as_shallow_dict(self) -> dict:
|
|
2932
|
+
"""Serializes the PipelineParams into a shallow dictionary of its immediate attributes."""
|
|
2933
|
+
body = {}
|
|
2934
|
+
if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
|
|
2935
|
+
return body
|
|
2936
|
+
|
|
2295
2937
|
@classmethod
|
|
2296
2938
|
def from_dict(cls, d: Dict[str, any]) -> PipelineParams:
|
|
2297
2939
|
"""Deserializes the PipelineParams from a dictionary."""
|
|
@@ -2313,6 +2955,13 @@ class PipelineTask:
|
|
|
2313
2955
|
if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
|
|
2314
2956
|
return body
|
|
2315
2957
|
|
|
2958
|
+
def as_shallow_dict(self) -> dict:
|
|
2959
|
+
"""Serializes the PipelineTask into a shallow dictionary of its immediate attributes."""
|
|
2960
|
+
body = {}
|
|
2961
|
+
if self.full_refresh is not None: body['full_refresh'] = self.full_refresh
|
|
2962
|
+
if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
|
|
2963
|
+
return body
|
|
2964
|
+
|
|
2316
2965
|
@classmethod
|
|
2317
2966
|
def from_dict(cls, d: Dict[str, any]) -> PipelineTask:
|
|
2318
2967
|
"""Deserializes the PipelineTask from a dictionary."""
|
|
@@ -2345,6 +2994,15 @@ class PythonWheelTask:
|
|
|
2345
2994
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
2346
2995
|
return body
|
|
2347
2996
|
|
|
2997
|
+
def as_shallow_dict(self) -> dict:
|
|
2998
|
+
"""Serializes the PythonWheelTask into a shallow dictionary of its immediate attributes."""
|
|
2999
|
+
body = {}
|
|
3000
|
+
if self.entry_point is not None: body['entry_point'] = self.entry_point
|
|
3001
|
+
if self.named_parameters: body['named_parameters'] = self.named_parameters
|
|
3002
|
+
if self.package_name is not None: body['package_name'] = self.package_name
|
|
3003
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
3004
|
+
return body
|
|
3005
|
+
|
|
2348
3006
|
@classmethod
|
|
2349
3007
|
def from_dict(cls, d: Dict[str, any]) -> PythonWheelTask:
|
|
2350
3008
|
"""Deserializes the PythonWheelTask from a dictionary."""
|
|
@@ -2374,6 +3032,13 @@ class QueueDetails:
|
|
|
2374
3032
|
if self.message is not None: body['message'] = self.message
|
|
2375
3033
|
return body
|
|
2376
3034
|
|
|
3035
|
+
def as_shallow_dict(self) -> dict:
|
|
3036
|
+
"""Serializes the QueueDetails into a shallow dictionary of its immediate attributes."""
|
|
3037
|
+
body = {}
|
|
3038
|
+
if self.code is not None: body['code'] = self.code
|
|
3039
|
+
if self.message is not None: body['message'] = self.message
|
|
3040
|
+
return body
|
|
3041
|
+
|
|
2377
3042
|
@classmethod
|
|
2378
3043
|
def from_dict(cls, d: Dict[str, any]) -> QueueDetails:
|
|
2379
3044
|
"""Deserializes the QueueDetails from a dictionary."""
|
|
@@ -2403,6 +3068,12 @@ class QueueSettings:
|
|
|
2403
3068
|
if self.enabled is not None: body['enabled'] = self.enabled
|
|
2404
3069
|
return body
|
|
2405
3070
|
|
|
3071
|
+
def as_shallow_dict(self) -> dict:
|
|
3072
|
+
"""Serializes the QueueSettings into a shallow dictionary of its immediate attributes."""
|
|
3073
|
+
body = {}
|
|
3074
|
+
if self.enabled is not None: body['enabled'] = self.enabled
|
|
3075
|
+
return body
|
|
3076
|
+
|
|
2406
3077
|
@classmethod
|
|
2407
3078
|
def from_dict(cls, d: Dict[str, any]) -> QueueSettings:
|
|
2408
3079
|
"""Deserializes the QueueSettings from a dictionary."""
|
|
@@ -2444,6 +3115,18 @@ class RepairHistoryItem:
|
|
|
2444
3115
|
if self.type is not None: body['type'] = self.type.value
|
|
2445
3116
|
return body
|
|
2446
3117
|
|
|
3118
|
+
def as_shallow_dict(self) -> dict:
|
|
3119
|
+
"""Serializes the RepairHistoryItem into a shallow dictionary of its immediate attributes."""
|
|
3120
|
+
body = {}
|
|
3121
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
3122
|
+
if self.id is not None: body['id'] = self.id
|
|
3123
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
3124
|
+
if self.state: body['state'] = self.state
|
|
3125
|
+
if self.status: body['status'] = self.status
|
|
3126
|
+
if self.task_run_ids: body['task_run_ids'] = self.task_run_ids
|
|
3127
|
+
if self.type is not None: body['type'] = self.type
|
|
3128
|
+
return body
|
|
3129
|
+
|
|
2447
3130
|
@classmethod
|
|
2448
3131
|
def from_dict(cls, d: Dict[str, any]) -> RepairHistoryItem:
|
|
2449
3132
|
"""Deserializes the RepairHistoryItem from a dictionary."""
|
|
@@ -2580,6 +3263,26 @@ class RepairRun:
|
|
|
2580
3263
|
if self.sql_params: body['sql_params'] = self.sql_params
|
|
2581
3264
|
return body
|
|
2582
3265
|
|
|
3266
|
+
def as_shallow_dict(self) -> dict:
|
|
3267
|
+
"""Serializes the RepairRun into a shallow dictionary of its immediate attributes."""
|
|
3268
|
+
body = {}
|
|
3269
|
+
if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
|
|
3270
|
+
if self.jar_params: body['jar_params'] = self.jar_params
|
|
3271
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
3272
|
+
if self.latest_repair_id is not None: body['latest_repair_id'] = self.latest_repair_id
|
|
3273
|
+
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
3274
|
+
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
|
|
3275
|
+
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
3276
|
+
if self.python_params: body['python_params'] = self.python_params
|
|
3277
|
+
if self.rerun_all_failed_tasks is not None:
|
|
3278
|
+
body['rerun_all_failed_tasks'] = self.rerun_all_failed_tasks
|
|
3279
|
+
if self.rerun_dependent_tasks is not None: body['rerun_dependent_tasks'] = self.rerun_dependent_tasks
|
|
3280
|
+
if self.rerun_tasks: body['rerun_tasks'] = self.rerun_tasks
|
|
3281
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
3282
|
+
if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
|
|
3283
|
+
if self.sql_params: body['sql_params'] = self.sql_params
|
|
3284
|
+
return body
|
|
3285
|
+
|
|
2583
3286
|
@classmethod
|
|
2584
3287
|
def from_dict(cls, d: Dict[str, any]) -> RepairRun:
|
|
2585
3288
|
"""Deserializes the RepairRun from a dictionary."""
|
|
@@ -2613,6 +3316,12 @@ class RepairRunResponse:
|
|
|
2613
3316
|
if self.repair_id is not None: body['repair_id'] = self.repair_id
|
|
2614
3317
|
return body
|
|
2615
3318
|
|
|
3319
|
+
def as_shallow_dict(self) -> dict:
|
|
3320
|
+
"""Serializes the RepairRunResponse into a shallow dictionary of its immediate attributes."""
|
|
3321
|
+
body = {}
|
|
3322
|
+
if self.repair_id is not None: body['repair_id'] = self.repair_id
|
|
3323
|
+
return body
|
|
3324
|
+
|
|
2616
3325
|
@classmethod
|
|
2617
3326
|
def from_dict(cls, d: Dict[str, any]) -> RepairRunResponse:
|
|
2618
3327
|
"""Deserializes the RepairRunResponse from a dictionary."""
|
|
@@ -2637,6 +3346,13 @@ class ResetJob:
|
|
|
2637
3346
|
if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
|
|
2638
3347
|
return body
|
|
2639
3348
|
|
|
3349
|
+
def as_shallow_dict(self) -> dict:
|
|
3350
|
+
"""Serializes the ResetJob into a shallow dictionary of its immediate attributes."""
|
|
3351
|
+
body = {}
|
|
3352
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
3353
|
+
if self.new_settings: body['new_settings'] = self.new_settings
|
|
3354
|
+
return body
|
|
3355
|
+
|
|
2640
3356
|
@classmethod
|
|
2641
3357
|
def from_dict(cls, d: Dict[str, any]) -> ResetJob:
|
|
2642
3358
|
"""Deserializes the ResetJob from a dictionary."""
|
|
@@ -2651,6 +3367,11 @@ class ResetResponse:
|
|
|
2651
3367
|
body = {}
|
|
2652
3368
|
return body
|
|
2653
3369
|
|
|
3370
|
+
def as_shallow_dict(self) -> dict:
|
|
3371
|
+
"""Serializes the ResetResponse into a shallow dictionary of its immediate attributes."""
|
|
3372
|
+
body = {}
|
|
3373
|
+
return body
|
|
3374
|
+
|
|
2654
3375
|
@classmethod
|
|
2655
3376
|
def from_dict(cls, d: Dict[str, any]) -> ResetResponse:
|
|
2656
3377
|
"""Deserializes the ResetResponse from a dictionary."""
|
|
@@ -2670,6 +3391,13 @@ class ResolvedConditionTaskValues:
|
|
|
2670
3391
|
if self.right is not None: body['right'] = self.right
|
|
2671
3392
|
return body
|
|
2672
3393
|
|
|
3394
|
+
def as_shallow_dict(self) -> dict:
|
|
3395
|
+
"""Serializes the ResolvedConditionTaskValues into a shallow dictionary of its immediate attributes."""
|
|
3396
|
+
body = {}
|
|
3397
|
+
if self.left is not None: body['left'] = self.left
|
|
3398
|
+
if self.right is not None: body['right'] = self.right
|
|
3399
|
+
return body
|
|
3400
|
+
|
|
2673
3401
|
@classmethod
|
|
2674
3402
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedConditionTaskValues:
|
|
2675
3403
|
"""Deserializes the ResolvedConditionTaskValues from a dictionary."""
|
|
@@ -2686,6 +3414,12 @@ class ResolvedDbtTaskValues:
|
|
|
2686
3414
|
if self.commands: body['commands'] = [v for v in self.commands]
|
|
2687
3415
|
return body
|
|
2688
3416
|
|
|
3417
|
+
def as_shallow_dict(self) -> dict:
|
|
3418
|
+
"""Serializes the ResolvedDbtTaskValues into a shallow dictionary of its immediate attributes."""
|
|
3419
|
+
body = {}
|
|
3420
|
+
if self.commands: body['commands'] = self.commands
|
|
3421
|
+
return body
|
|
3422
|
+
|
|
2689
3423
|
@classmethod
|
|
2690
3424
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedDbtTaskValues:
|
|
2691
3425
|
"""Deserializes the ResolvedDbtTaskValues from a dictionary."""
|
|
@@ -2702,6 +3436,12 @@ class ResolvedNotebookTaskValues:
|
|
|
2702
3436
|
if self.base_parameters: body['base_parameters'] = self.base_parameters
|
|
2703
3437
|
return body
|
|
2704
3438
|
|
|
3439
|
+
def as_shallow_dict(self) -> dict:
|
|
3440
|
+
"""Serializes the ResolvedNotebookTaskValues into a shallow dictionary of its immediate attributes."""
|
|
3441
|
+
body = {}
|
|
3442
|
+
if self.base_parameters: body['base_parameters'] = self.base_parameters
|
|
3443
|
+
return body
|
|
3444
|
+
|
|
2705
3445
|
@classmethod
|
|
2706
3446
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedNotebookTaskValues:
|
|
2707
3447
|
"""Deserializes the ResolvedNotebookTaskValues from a dictionary."""
|
|
@@ -2718,6 +3458,12 @@ class ResolvedParamPairValues:
|
|
|
2718
3458
|
if self.parameters: body['parameters'] = self.parameters
|
|
2719
3459
|
return body
|
|
2720
3460
|
|
|
3461
|
+
def as_shallow_dict(self) -> dict:
|
|
3462
|
+
"""Serializes the ResolvedParamPairValues into a shallow dictionary of its immediate attributes."""
|
|
3463
|
+
body = {}
|
|
3464
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
3465
|
+
return body
|
|
3466
|
+
|
|
2721
3467
|
@classmethod
|
|
2722
3468
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedParamPairValues:
|
|
2723
3469
|
"""Deserializes the ResolvedParamPairValues from a dictionary."""
|
|
@@ -2737,6 +3483,13 @@ class ResolvedPythonWheelTaskValues:
|
|
|
2737
3483
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
2738
3484
|
return body
|
|
2739
3485
|
|
|
3486
|
+
def as_shallow_dict(self) -> dict:
|
|
3487
|
+
"""Serializes the ResolvedPythonWheelTaskValues into a shallow dictionary of its immediate attributes."""
|
|
3488
|
+
body = {}
|
|
3489
|
+
if self.named_parameters: body['named_parameters'] = self.named_parameters
|
|
3490
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
3491
|
+
return body
|
|
3492
|
+
|
|
2740
3493
|
@classmethod
|
|
2741
3494
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedPythonWheelTaskValues:
|
|
2742
3495
|
"""Deserializes the ResolvedPythonWheelTaskValues from a dictionary."""
|
|
@@ -2756,6 +3509,13 @@ class ResolvedRunJobTaskValues:
|
|
|
2756
3509
|
if self.parameters: body['parameters'] = self.parameters
|
|
2757
3510
|
return body
|
|
2758
3511
|
|
|
3512
|
+
def as_shallow_dict(self) -> dict:
|
|
3513
|
+
"""Serializes the ResolvedRunJobTaskValues into a shallow dictionary of its immediate attributes."""
|
|
3514
|
+
body = {}
|
|
3515
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
3516
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
3517
|
+
return body
|
|
3518
|
+
|
|
2759
3519
|
@classmethod
|
|
2760
3520
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedRunJobTaskValues:
|
|
2761
3521
|
"""Deserializes the ResolvedRunJobTaskValues from a dictionary."""
|
|
@@ -2772,6 +3532,12 @@ class ResolvedStringParamsValues:
|
|
|
2772
3532
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
2773
3533
|
return body
|
|
2774
3534
|
|
|
3535
|
+
def as_shallow_dict(self) -> dict:
|
|
3536
|
+
"""Serializes the ResolvedStringParamsValues into a shallow dictionary of its immediate attributes."""
|
|
3537
|
+
body = {}
|
|
3538
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
3539
|
+
return body
|
|
3540
|
+
|
|
2775
3541
|
@classmethod
|
|
2776
3542
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedStringParamsValues:
|
|
2777
3543
|
"""Deserializes the ResolvedStringParamsValues from a dictionary."""
|
|
@@ -2815,6 +3581,21 @@ class ResolvedValues:
|
|
|
2815
3581
|
if self.sql_task: body['sql_task'] = self.sql_task.as_dict()
|
|
2816
3582
|
return body
|
|
2817
3583
|
|
|
3584
|
+
def as_shallow_dict(self) -> dict:
|
|
3585
|
+
"""Serializes the ResolvedValues into a shallow dictionary of its immediate attributes."""
|
|
3586
|
+
body = {}
|
|
3587
|
+
if self.condition_task: body['condition_task'] = self.condition_task
|
|
3588
|
+
if self.dbt_task: body['dbt_task'] = self.dbt_task
|
|
3589
|
+
if self.notebook_task: body['notebook_task'] = self.notebook_task
|
|
3590
|
+
if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
|
|
3591
|
+
if self.run_job_task: body['run_job_task'] = self.run_job_task
|
|
3592
|
+
if self.simulation_task: body['simulation_task'] = self.simulation_task
|
|
3593
|
+
if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
|
|
3594
|
+
if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
|
|
3595
|
+
if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
|
|
3596
|
+
if self.sql_task: body['sql_task'] = self.sql_task
|
|
3597
|
+
return body
|
|
3598
|
+
|
|
2818
3599
|
@classmethod
|
|
2819
3600
|
def from_dict(cls, d: Dict[str, any]) -> ResolvedValues:
|
|
2820
3601
|
"""Deserializes the ResolvedValues from a dictionary."""
|
|
@@ -2973,7 +3754,8 @@ class Run:
|
|
|
2973
3754
|
previously failed run. This occurs when you request to re-run the job in case of failures. *
|
|
2974
3755
|
`RUN_JOB_TASK`: Indicates a run that is triggered using a Run Job task. * `FILE_ARRIVAL`:
|
|
2975
3756
|
Indicates a run that is triggered by a file arrival. * `TABLE`: Indicates a run that is
|
|
2976
|
-
triggered by a table update.
|
|
3757
|
+
triggered by a table update. * `CONTINUOUS_RESTART`: Indicates a run created by user to manually
|
|
3758
|
+
restart a continuous job run."""
|
|
2977
3759
|
|
|
2978
3760
|
trigger_info: Optional[TriggerInfo] = None
|
|
2979
3761
|
"""Additional details about what triggered the run"""
|
|
@@ -3017,6 +3799,45 @@ class Run:
|
|
|
3017
3799
|
if self.trigger_info: body['trigger_info'] = self.trigger_info.as_dict()
|
|
3018
3800
|
return body
|
|
3019
3801
|
|
|
3802
|
+
def as_shallow_dict(self) -> dict:
|
|
3803
|
+
"""Serializes the Run into a shallow dictionary of its immediate attributes."""
|
|
3804
|
+
body = {}
|
|
3805
|
+
if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
|
|
3806
|
+
if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
|
|
3807
|
+
if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
|
|
3808
|
+
if self.cluster_spec: body['cluster_spec'] = self.cluster_spec
|
|
3809
|
+
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
3810
|
+
if self.description is not None: body['description'] = self.description
|
|
3811
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
3812
|
+
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
3813
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
3814
|
+
if self.iterations: body['iterations'] = self.iterations
|
|
3815
|
+
if self.job_clusters: body['job_clusters'] = self.job_clusters
|
|
3816
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
3817
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
3818
|
+
if self.job_run_id is not None: body['job_run_id'] = self.job_run_id
|
|
3819
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
3820
|
+
if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
|
|
3821
|
+
if self.original_attempt_run_id is not None:
|
|
3822
|
+
body['original_attempt_run_id'] = self.original_attempt_run_id
|
|
3823
|
+
if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters
|
|
3824
|
+
if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
|
|
3825
|
+
if self.repair_history: body['repair_history'] = self.repair_history
|
|
3826
|
+
if self.run_duration is not None: body['run_duration'] = self.run_duration
|
|
3827
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
3828
|
+
if self.run_name is not None: body['run_name'] = self.run_name
|
|
3829
|
+
if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
|
|
3830
|
+
if self.run_type is not None: body['run_type'] = self.run_type
|
|
3831
|
+
if self.schedule: body['schedule'] = self.schedule
|
|
3832
|
+
if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
|
|
3833
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
3834
|
+
if self.state: body['state'] = self.state
|
|
3835
|
+
if self.status: body['status'] = self.status
|
|
3836
|
+
if self.tasks: body['tasks'] = self.tasks
|
|
3837
|
+
if self.trigger is not None: body['trigger'] = self.trigger
|
|
3838
|
+
if self.trigger_info: body['trigger_info'] = self.trigger_info
|
|
3839
|
+
return body
|
|
3840
|
+
|
|
3020
3841
|
@classmethod
|
|
3021
3842
|
def from_dict(cls, d: Dict[str, any]) -> Run:
|
|
3022
3843
|
"""Deserializes the Run from a dictionary."""
|
|
@@ -3080,11 +3901,20 @@ class RunConditionTask:
|
|
|
3080
3901
|
"""The condition expression evaluation result. Filled in if the task was successfully completed.
|
|
3081
3902
|
Can be `"true"` or `"false"`"""
|
|
3082
3903
|
|
|
3083
|
-
def as_dict(self) -> dict:
|
|
3084
|
-
"""Serializes the RunConditionTask into a dictionary suitable for use as a JSON request body."""
|
|
3904
|
+
def as_dict(self) -> dict:
|
|
3905
|
+
"""Serializes the RunConditionTask into a dictionary suitable for use as a JSON request body."""
|
|
3906
|
+
body = {}
|
|
3907
|
+
if self.left is not None: body['left'] = self.left
|
|
3908
|
+
if self.op is not None: body['op'] = self.op.value
|
|
3909
|
+
if self.outcome is not None: body['outcome'] = self.outcome
|
|
3910
|
+
if self.right is not None: body['right'] = self.right
|
|
3911
|
+
return body
|
|
3912
|
+
|
|
3913
|
+
def as_shallow_dict(self) -> dict:
|
|
3914
|
+
"""Serializes the RunConditionTask into a shallow dictionary of its immediate attributes."""
|
|
3085
3915
|
body = {}
|
|
3086
3916
|
if self.left is not None: body['left'] = self.left
|
|
3087
|
-
if self.op is not None: body['op'] = self.op
|
|
3917
|
+
if self.op is not None: body['op'] = self.op
|
|
3088
3918
|
if self.outcome is not None: body['outcome'] = self.outcome
|
|
3089
3919
|
if self.right is not None: body['right'] = self.right
|
|
3090
3920
|
return body
|
|
@@ -3123,6 +3953,15 @@ class RunForEachTask:
|
|
|
3123
3953
|
if self.task: body['task'] = self.task.as_dict()
|
|
3124
3954
|
return body
|
|
3125
3955
|
|
|
3956
|
+
def as_shallow_dict(self) -> dict:
|
|
3957
|
+
"""Serializes the RunForEachTask into a shallow dictionary of its immediate attributes."""
|
|
3958
|
+
body = {}
|
|
3959
|
+
if self.concurrency is not None: body['concurrency'] = self.concurrency
|
|
3960
|
+
if self.inputs is not None: body['inputs'] = self.inputs
|
|
3961
|
+
if self.stats: body['stats'] = self.stats
|
|
3962
|
+
if self.task: body['task'] = self.task
|
|
3963
|
+
return body
|
|
3964
|
+
|
|
3126
3965
|
@classmethod
|
|
3127
3966
|
def from_dict(cls, d: Dict[str, any]) -> RunForEachTask:
|
|
3128
3967
|
"""Deserializes the RunForEachTask from a dictionary."""
|
|
@@ -3161,6 +4000,12 @@ class RunJobOutput:
|
|
|
3161
4000
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
3162
4001
|
return body
|
|
3163
4002
|
|
|
4003
|
+
def as_shallow_dict(self) -> dict:
|
|
4004
|
+
"""Serializes the RunJobOutput into a shallow dictionary of its immediate attributes."""
|
|
4005
|
+
body = {}
|
|
4006
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
4007
|
+
return body
|
|
4008
|
+
|
|
3164
4009
|
@classmethod
|
|
3165
4010
|
def from_dict(cls, d: Dict[str, any]) -> RunJobOutput:
|
|
3166
4011
|
"""Deserializes the RunJobOutput from a dictionary."""
|
|
@@ -3264,6 +4109,21 @@ class RunJobTask:
|
|
|
3264
4109
|
if self.sql_params: body['sql_params'] = self.sql_params
|
|
3265
4110
|
return body
|
|
3266
4111
|
|
|
4112
|
+
def as_shallow_dict(self) -> dict:
|
|
4113
|
+
"""Serializes the RunJobTask into a shallow dictionary of its immediate attributes."""
|
|
4114
|
+
body = {}
|
|
4115
|
+
if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
|
|
4116
|
+
if self.jar_params: body['jar_params'] = self.jar_params
|
|
4117
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
4118
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
4119
|
+
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
4120
|
+
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
|
|
4121
|
+
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
4122
|
+
if self.python_params: body['python_params'] = self.python_params
|
|
4123
|
+
if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
|
|
4124
|
+
if self.sql_params: body['sql_params'] = self.sql_params
|
|
4125
|
+
return body
|
|
4126
|
+
|
|
3267
4127
|
@classmethod
|
|
3268
4128
|
def from_dict(cls, d: Dict[str, any]) -> RunJobTask:
|
|
3269
4129
|
"""Deserializes the RunJobTask from a dictionary."""
|
|
@@ -3435,6 +4295,24 @@ class RunNow:
|
|
|
3435
4295
|
if self.sql_params: body['sql_params'] = self.sql_params
|
|
3436
4296
|
return body
|
|
3437
4297
|
|
|
4298
|
+
def as_shallow_dict(self) -> dict:
|
|
4299
|
+
"""Serializes the RunNow into a shallow dictionary of its immediate attributes."""
|
|
4300
|
+
body = {}
|
|
4301
|
+
if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
|
|
4302
|
+
if self.idempotency_token is not None: body['idempotency_token'] = self.idempotency_token
|
|
4303
|
+
if self.jar_params: body['jar_params'] = self.jar_params
|
|
4304
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
4305
|
+
if self.job_parameters: body['job_parameters'] = self.job_parameters
|
|
4306
|
+
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
4307
|
+
if self.only: body['only'] = self.only
|
|
4308
|
+
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
|
|
4309
|
+
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
4310
|
+
if self.python_params: body['python_params'] = self.python_params
|
|
4311
|
+
if self.queue: body['queue'] = self.queue
|
|
4312
|
+
if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
|
|
4313
|
+
if self.sql_params: body['sql_params'] = self.sql_params
|
|
4314
|
+
return body
|
|
4315
|
+
|
|
3438
4316
|
@classmethod
|
|
3439
4317
|
def from_dict(cls, d: Dict[str, any]) -> RunNow:
|
|
3440
4318
|
"""Deserializes the RunNow from a dictionary."""
|
|
@@ -3470,6 +4348,13 @@ class RunNowResponse:
|
|
|
3470
4348
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
3471
4349
|
return body
|
|
3472
4350
|
|
|
4351
|
+
def as_shallow_dict(self) -> dict:
|
|
4352
|
+
"""Serializes the RunNowResponse into a shallow dictionary of its immediate attributes."""
|
|
4353
|
+
body = {}
|
|
4354
|
+
if self.number_in_job is not None: body['number_in_job'] = self.number_in_job
|
|
4355
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
4356
|
+
return body
|
|
4357
|
+
|
|
3473
4358
|
@classmethod
|
|
3474
4359
|
def from_dict(cls, d: Dict[str, any]) -> RunNowResponse:
|
|
3475
4360
|
"""Deserializes the RunNowResponse from a dictionary."""
|
|
@@ -3536,6 +4421,21 @@ class RunOutput:
|
|
|
3536
4421
|
if self.sql_output: body['sql_output'] = self.sql_output.as_dict()
|
|
3537
4422
|
return body
|
|
3538
4423
|
|
|
4424
|
+
def as_shallow_dict(self) -> dict:
|
|
4425
|
+
"""Serializes the RunOutput into a shallow dictionary of its immediate attributes."""
|
|
4426
|
+
body = {}
|
|
4427
|
+
if self.dbt_output: body['dbt_output'] = self.dbt_output
|
|
4428
|
+
if self.error is not None: body['error'] = self.error
|
|
4429
|
+
if self.error_trace is not None: body['error_trace'] = self.error_trace
|
|
4430
|
+
if self.info is not None: body['info'] = self.info
|
|
4431
|
+
if self.logs is not None: body['logs'] = self.logs
|
|
4432
|
+
if self.logs_truncated is not None: body['logs_truncated'] = self.logs_truncated
|
|
4433
|
+
if self.metadata: body['metadata'] = self.metadata
|
|
4434
|
+
if self.notebook_output: body['notebook_output'] = self.notebook_output
|
|
4435
|
+
if self.run_job_output: body['run_job_output'] = self.run_job_output
|
|
4436
|
+
if self.sql_output: body['sql_output'] = self.sql_output
|
|
4437
|
+
return body
|
|
4438
|
+
|
|
3539
4439
|
@classmethod
|
|
3540
4440
|
def from_dict(cls, d: Dict[str, any]) -> RunOutput:
|
|
3541
4441
|
"""Deserializes the RunOutput from a dictionary."""
|
|
@@ -3640,6 +4540,19 @@ class RunParameters:
|
|
|
3640
4540
|
if self.sql_params: body['sql_params'] = self.sql_params
|
|
3641
4541
|
return body
|
|
3642
4542
|
|
|
4543
|
+
def as_shallow_dict(self) -> dict:
|
|
4544
|
+
"""Serializes the RunParameters into a shallow dictionary of its immediate attributes."""
|
|
4545
|
+
body = {}
|
|
4546
|
+
if self.dbt_commands: body['dbt_commands'] = self.dbt_commands
|
|
4547
|
+
if self.jar_params: body['jar_params'] = self.jar_params
|
|
4548
|
+
if self.notebook_params: body['notebook_params'] = self.notebook_params
|
|
4549
|
+
if self.pipeline_params: body['pipeline_params'] = self.pipeline_params
|
|
4550
|
+
if self.python_named_params: body['python_named_params'] = self.python_named_params
|
|
4551
|
+
if self.python_params: body['python_params'] = self.python_params
|
|
4552
|
+
if self.spark_submit_params: body['spark_submit_params'] = self.spark_submit_params
|
|
4553
|
+
if self.sql_params: body['sql_params'] = self.sql_params
|
|
4554
|
+
return body
|
|
4555
|
+
|
|
3643
4556
|
@classmethod
|
|
3644
4557
|
def from_dict(cls, d: Dict[str, any]) -> RunParameters:
|
|
3645
4558
|
"""Deserializes the RunParameters from a dictionary."""
|
|
@@ -3709,6 +4622,17 @@ class RunState:
|
|
|
3709
4622
|
body['user_cancelled_or_timedout'] = self.user_cancelled_or_timedout
|
|
3710
4623
|
return body
|
|
3711
4624
|
|
|
4625
|
+
def as_shallow_dict(self) -> dict:
|
|
4626
|
+
"""Serializes the RunState into a shallow dictionary of its immediate attributes."""
|
|
4627
|
+
body = {}
|
|
4628
|
+
if self.life_cycle_state is not None: body['life_cycle_state'] = self.life_cycle_state
|
|
4629
|
+
if self.queue_reason is not None: body['queue_reason'] = self.queue_reason
|
|
4630
|
+
if self.result_state is not None: body['result_state'] = self.result_state
|
|
4631
|
+
if self.state_message is not None: body['state_message'] = self.state_message
|
|
4632
|
+
if self.user_cancelled_or_timedout is not None:
|
|
4633
|
+
body['user_cancelled_or_timedout'] = self.user_cancelled_or_timedout
|
|
4634
|
+
return body
|
|
4635
|
+
|
|
3712
4636
|
@classmethod
|
|
3713
4637
|
def from_dict(cls, d: Dict[str, any]) -> RunState:
|
|
3714
4638
|
"""Deserializes the RunState from a dictionary."""
|
|
@@ -3741,6 +4665,14 @@ class RunStatus:
|
|
|
3741
4665
|
if self.termination_details: body['termination_details'] = self.termination_details.as_dict()
|
|
3742
4666
|
return body
|
|
3743
4667
|
|
|
4668
|
+
def as_shallow_dict(self) -> dict:
|
|
4669
|
+
"""Serializes the RunStatus into a shallow dictionary of its immediate attributes."""
|
|
4670
|
+
body = {}
|
|
4671
|
+
if self.queue_details: body['queue_details'] = self.queue_details
|
|
4672
|
+
if self.state is not None: body['state'] = self.state
|
|
4673
|
+
if self.termination_details: body['termination_details'] = self.termination_details
|
|
4674
|
+
return body
|
|
4675
|
+
|
|
3744
4676
|
@classmethod
|
|
3745
4677
|
def from_dict(cls, d: Dict[str, any]) -> RunStatus:
|
|
3746
4678
|
"""Deserializes the RunStatus from a dictionary."""
|
|
@@ -3765,6 +4697,11 @@ class RunTask:
|
|
|
3765
4697
|
original attempt’s ID and an incrementing `attempt_number`. Runs are retried only until they
|
|
3766
4698
|
succeed, and the maximum `attempt_number` is the same as the `max_retries` value for the job."""
|
|
3767
4699
|
|
|
4700
|
+
clean_rooms_notebook_task: Optional[CleanRoomsNotebookTask] = None
|
|
4701
|
+
"""The task runs a [clean rooms] notebook when the `clean_rooms_notebook_task` field is present.
|
|
4702
|
+
|
|
4703
|
+
[clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html"""
|
|
4704
|
+
|
|
3768
4705
|
cleanup_duration: Optional[int] = None
|
|
3769
4706
|
"""The time in milliseconds it took to terminate the cluster and clean up any associated artifacts.
|
|
3770
4707
|
The duration of a task run is the sum of the `setup_duration`, `execution_duration`, and the
|
|
@@ -3932,6 +4869,8 @@ class RunTask:
|
|
|
3932
4869
|
"""Serializes the RunTask into a dictionary suitable for use as a JSON request body."""
|
|
3933
4870
|
body = {}
|
|
3934
4871
|
if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
|
|
4872
|
+
if self.clean_rooms_notebook_task:
|
|
4873
|
+
body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task.as_dict()
|
|
3935
4874
|
if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
|
|
3936
4875
|
if self.cluster_instance: body['cluster_instance'] = self.cluster_instance.as_dict()
|
|
3937
4876
|
if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
|
|
@@ -3972,10 +4911,57 @@ class RunTask:
|
|
|
3972
4911
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
3973
4912
|
return body
|
|
3974
4913
|
|
|
4914
|
+
def as_shallow_dict(self) -> dict:
|
|
4915
|
+
"""Serializes the RunTask into a shallow dictionary of its immediate attributes."""
|
|
4916
|
+
body = {}
|
|
4917
|
+
if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
|
|
4918
|
+
if self.clean_rooms_notebook_task: body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task
|
|
4919
|
+
if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
|
|
4920
|
+
if self.cluster_instance: body['cluster_instance'] = self.cluster_instance
|
|
4921
|
+
if self.condition_task: body['condition_task'] = self.condition_task
|
|
4922
|
+
if self.dbt_task: body['dbt_task'] = self.dbt_task
|
|
4923
|
+
if self.depends_on: body['depends_on'] = self.depends_on
|
|
4924
|
+
if self.description is not None: body['description'] = self.description
|
|
4925
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
4926
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
4927
|
+
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
4928
|
+
if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
|
|
4929
|
+
if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
|
|
4930
|
+
if self.for_each_task: body['for_each_task'] = self.for_each_task
|
|
4931
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
4932
|
+
if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
|
|
4933
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
4934
|
+
if self.new_cluster: body['new_cluster'] = self.new_cluster
|
|
4935
|
+
if self.notebook_task: body['notebook_task'] = self.notebook_task
|
|
4936
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
4937
|
+
if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
|
|
4938
|
+
if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
|
|
4939
|
+
if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
|
|
4940
|
+
if self.resolved_values: body['resolved_values'] = self.resolved_values
|
|
4941
|
+
if self.run_duration is not None: body['run_duration'] = self.run_duration
|
|
4942
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
4943
|
+
if self.run_if is not None: body['run_if'] = self.run_if
|
|
4944
|
+
if self.run_job_task: body['run_job_task'] = self.run_job_task
|
|
4945
|
+
if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
|
|
4946
|
+
if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
|
|
4947
|
+
if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
|
|
4948
|
+
if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
|
|
4949
|
+
if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
|
|
4950
|
+
if self.sql_task: body['sql_task'] = self.sql_task
|
|
4951
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
4952
|
+
if self.state: body['state'] = self.state
|
|
4953
|
+
if self.status: body['status'] = self.status
|
|
4954
|
+
if self.task_key is not None: body['task_key'] = self.task_key
|
|
4955
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
4956
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
4957
|
+
return body
|
|
4958
|
+
|
|
3975
4959
|
@classmethod
|
|
3976
4960
|
def from_dict(cls, d: Dict[str, any]) -> RunTask:
|
|
3977
4961
|
"""Deserializes the RunTask from a dictionary."""
|
|
3978
4962
|
return cls(attempt_number=d.get('attempt_number', None),
|
|
4963
|
+
clean_rooms_notebook_task=_from_dict(d, 'clean_rooms_notebook_task',
|
|
4964
|
+
CleanRoomsNotebookTask),
|
|
3979
4965
|
cleanup_duration=d.get('cleanup_duration', None),
|
|
3980
4966
|
cluster_instance=_from_dict(d, 'cluster_instance', ClusterInstance),
|
|
3981
4967
|
condition_task=_from_dict(d, 'condition_task', RunConditionTask),
|
|
@@ -4069,6 +5055,14 @@ class SparkJarTask:
|
|
|
4069
5055
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
4070
5056
|
return body
|
|
4071
5057
|
|
|
5058
|
+
def as_shallow_dict(self) -> dict:
|
|
5059
|
+
"""Serializes the SparkJarTask into a shallow dictionary of its immediate attributes."""
|
|
5060
|
+
body = {}
|
|
5061
|
+
if self.jar_uri is not None: body['jar_uri'] = self.jar_uri
|
|
5062
|
+
if self.main_class_name is not None: body['main_class_name'] = self.main_class_name
|
|
5063
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
5064
|
+
return body
|
|
5065
|
+
|
|
4072
5066
|
@classmethod
|
|
4073
5067
|
def from_dict(cls, d: Dict[str, any]) -> SparkJarTask:
|
|
4074
5068
|
"""Deserializes the SparkJarTask from a dictionary."""
|
|
@@ -4109,6 +5103,14 @@ class SparkPythonTask:
|
|
|
4109
5103
|
if self.source is not None: body['source'] = self.source.value
|
|
4110
5104
|
return body
|
|
4111
5105
|
|
|
5106
|
+
def as_shallow_dict(self) -> dict:
|
|
5107
|
+
"""Serializes the SparkPythonTask into a shallow dictionary of its immediate attributes."""
|
|
5108
|
+
body = {}
|
|
5109
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
5110
|
+
if self.python_file is not None: body['python_file'] = self.python_file
|
|
5111
|
+
if self.source is not None: body['source'] = self.source
|
|
5112
|
+
return body
|
|
5113
|
+
|
|
4112
5114
|
@classmethod
|
|
4113
5115
|
def from_dict(cls, d: Dict[str, any]) -> SparkPythonTask:
|
|
4114
5116
|
"""Deserializes the SparkPythonTask from a dictionary."""
|
|
@@ -4132,6 +5134,12 @@ class SparkSubmitTask:
|
|
|
4132
5134
|
if self.parameters: body['parameters'] = [v for v in self.parameters]
|
|
4133
5135
|
return body
|
|
4134
5136
|
|
|
5137
|
+
def as_shallow_dict(self) -> dict:
|
|
5138
|
+
"""Serializes the SparkSubmitTask into a shallow dictionary of its immediate attributes."""
|
|
5139
|
+
body = {}
|
|
5140
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
5141
|
+
return body
|
|
5142
|
+
|
|
4135
5143
|
@classmethod
|
|
4136
5144
|
def from_dict(cls, d: Dict[str, any]) -> SparkSubmitTask:
|
|
4137
5145
|
"""Deserializes the SparkSubmitTask from a dictionary."""
|
|
@@ -4169,6 +5177,16 @@ class SqlAlertOutput:
|
|
|
4169
5177
|
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
4170
5178
|
return body
|
|
4171
5179
|
|
|
5180
|
+
def as_shallow_dict(self) -> dict:
|
|
5181
|
+
"""Serializes the SqlAlertOutput into a shallow dictionary of its immediate attributes."""
|
|
5182
|
+
body = {}
|
|
5183
|
+
if self.alert_state is not None: body['alert_state'] = self.alert_state
|
|
5184
|
+
if self.output_link is not None: body['output_link'] = self.output_link
|
|
5185
|
+
if self.query_text is not None: body['query_text'] = self.query_text
|
|
5186
|
+
if self.sql_statements: body['sql_statements'] = self.sql_statements
|
|
5187
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
5188
|
+
return body
|
|
5189
|
+
|
|
4172
5190
|
@classmethod
|
|
4173
5191
|
def from_dict(cls, d: Dict[str, any]) -> SqlAlertOutput:
|
|
4174
5192
|
"""Deserializes the SqlAlertOutput from a dictionary."""
|
|
@@ -4205,6 +5223,13 @@ class SqlDashboardOutput:
|
|
|
4205
5223
|
if self.widgets: body['widgets'] = [v.as_dict() for v in self.widgets]
|
|
4206
5224
|
return body
|
|
4207
5225
|
|
|
5226
|
+
def as_shallow_dict(self) -> dict:
|
|
5227
|
+
"""Serializes the SqlDashboardOutput into a shallow dictionary of its immediate attributes."""
|
|
5228
|
+
body = {}
|
|
5229
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
5230
|
+
if self.widgets: body['widgets'] = self.widgets
|
|
5231
|
+
return body
|
|
5232
|
+
|
|
4208
5233
|
@classmethod
|
|
4209
5234
|
def from_dict(cls, d: Dict[str, any]) -> SqlDashboardOutput:
|
|
4210
5235
|
"""Deserializes the SqlDashboardOutput from a dictionary."""
|
|
@@ -4247,6 +5272,18 @@ class SqlDashboardWidgetOutput:
|
|
|
4247
5272
|
if self.widget_title is not None: body['widget_title'] = self.widget_title
|
|
4248
5273
|
return body
|
|
4249
5274
|
|
|
5275
|
+
def as_shallow_dict(self) -> dict:
|
|
5276
|
+
"""Serializes the SqlDashboardWidgetOutput into a shallow dictionary of its immediate attributes."""
|
|
5277
|
+
body = {}
|
|
5278
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
5279
|
+
if self.error: body['error'] = self.error
|
|
5280
|
+
if self.output_link is not None: body['output_link'] = self.output_link
|
|
5281
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
5282
|
+
if self.status is not None: body['status'] = self.status
|
|
5283
|
+
if self.widget_id is not None: body['widget_id'] = self.widget_id
|
|
5284
|
+
if self.widget_title is not None: body['widget_title'] = self.widget_title
|
|
5285
|
+
return body
|
|
5286
|
+
|
|
4250
5287
|
@classmethod
|
|
4251
5288
|
def from_dict(cls, d: Dict[str, any]) -> SqlDashboardWidgetOutput:
|
|
4252
5289
|
"""Deserializes the SqlDashboardWidgetOutput from a dictionary."""
|
|
@@ -4287,6 +5324,14 @@ class SqlOutput:
|
|
|
4287
5324
|
if self.query_output: body['query_output'] = self.query_output.as_dict()
|
|
4288
5325
|
return body
|
|
4289
5326
|
|
|
5327
|
+
def as_shallow_dict(self) -> dict:
|
|
5328
|
+
"""Serializes the SqlOutput into a shallow dictionary of its immediate attributes."""
|
|
5329
|
+
body = {}
|
|
5330
|
+
if self.alert_output: body['alert_output'] = self.alert_output
|
|
5331
|
+
if self.dashboard_output: body['dashboard_output'] = self.dashboard_output
|
|
5332
|
+
if self.query_output: body['query_output'] = self.query_output
|
|
5333
|
+
return body
|
|
5334
|
+
|
|
4290
5335
|
@classmethod
|
|
4291
5336
|
def from_dict(cls, d: Dict[str, any]) -> SqlOutput:
|
|
4292
5337
|
"""Deserializes the SqlOutput from a dictionary."""
|
|
@@ -4306,6 +5351,12 @@ class SqlOutputError:
|
|
|
4306
5351
|
if self.message is not None: body['message'] = self.message
|
|
4307
5352
|
return body
|
|
4308
5353
|
|
|
5354
|
+
def as_shallow_dict(self) -> dict:
|
|
5355
|
+
"""Serializes the SqlOutputError into a shallow dictionary of its immediate attributes."""
|
|
5356
|
+
body = {}
|
|
5357
|
+
if self.message is not None: body['message'] = self.message
|
|
5358
|
+
return body
|
|
5359
|
+
|
|
4309
5360
|
@classmethod
|
|
4310
5361
|
def from_dict(cls, d: Dict[str, any]) -> SqlOutputError:
|
|
4311
5362
|
"""Deserializes the SqlOutputError from a dictionary."""
|
|
@@ -4338,6 +5389,16 @@ class SqlQueryOutput:
|
|
|
4338
5389
|
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
4339
5390
|
return body
|
|
4340
5391
|
|
|
5392
|
+
def as_shallow_dict(self) -> dict:
|
|
5393
|
+
"""Serializes the SqlQueryOutput into a shallow dictionary of its immediate attributes."""
|
|
5394
|
+
body = {}
|
|
5395
|
+
if self.endpoint_id is not None: body['endpoint_id'] = self.endpoint_id
|
|
5396
|
+
if self.output_link is not None: body['output_link'] = self.output_link
|
|
5397
|
+
if self.query_text is not None: body['query_text'] = self.query_text
|
|
5398
|
+
if self.sql_statements: body['sql_statements'] = self.sql_statements
|
|
5399
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
5400
|
+
return body
|
|
5401
|
+
|
|
4341
5402
|
@classmethod
|
|
4342
5403
|
def from_dict(cls, d: Dict[str, any]) -> SqlQueryOutput:
|
|
4343
5404
|
"""Deserializes the SqlQueryOutput from a dictionary."""
|
|
@@ -4359,6 +5420,12 @@ class SqlStatementOutput:
|
|
|
4359
5420
|
if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
|
|
4360
5421
|
return body
|
|
4361
5422
|
|
|
5423
|
+
def as_shallow_dict(self) -> dict:
|
|
5424
|
+
"""Serializes the SqlStatementOutput into a shallow dictionary of its immediate attributes."""
|
|
5425
|
+
body = {}
|
|
5426
|
+
if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
|
|
5427
|
+
return body
|
|
5428
|
+
|
|
4362
5429
|
@classmethod
|
|
4363
5430
|
def from_dict(cls, d: Dict[str, any]) -> SqlStatementOutput:
|
|
4364
5431
|
"""Deserializes the SqlStatementOutput from a dictionary."""
|
|
@@ -4399,6 +5466,17 @@ class SqlTask:
|
|
|
4399
5466
|
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
4400
5467
|
return body
|
|
4401
5468
|
|
|
5469
|
+
def as_shallow_dict(self) -> dict:
|
|
5470
|
+
"""Serializes the SqlTask into a shallow dictionary of its immediate attributes."""
|
|
5471
|
+
body = {}
|
|
5472
|
+
if self.alert: body['alert'] = self.alert
|
|
5473
|
+
if self.dashboard: body['dashboard'] = self.dashboard
|
|
5474
|
+
if self.file: body['file'] = self.file
|
|
5475
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
5476
|
+
if self.query: body['query'] = self.query
|
|
5477
|
+
if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
|
|
5478
|
+
return body
|
|
5479
|
+
|
|
4402
5480
|
@classmethod
|
|
4403
5481
|
def from_dict(cls, d: Dict[str, any]) -> SqlTask:
|
|
4404
5482
|
"""Deserializes the SqlTask from a dictionary."""
|
|
@@ -4429,6 +5507,14 @@ class SqlTaskAlert:
|
|
|
4429
5507
|
if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
|
|
4430
5508
|
return body
|
|
4431
5509
|
|
|
5510
|
+
def as_shallow_dict(self) -> dict:
|
|
5511
|
+
"""Serializes the SqlTaskAlert into a shallow dictionary of its immediate attributes."""
|
|
5512
|
+
body = {}
|
|
5513
|
+
if self.alert_id is not None: body['alert_id'] = self.alert_id
|
|
5514
|
+
if self.pause_subscriptions is not None: body['pause_subscriptions'] = self.pause_subscriptions
|
|
5515
|
+
if self.subscriptions: body['subscriptions'] = self.subscriptions
|
|
5516
|
+
return body
|
|
5517
|
+
|
|
4432
5518
|
@classmethod
|
|
4433
5519
|
def from_dict(cls, d: Dict[str, any]) -> SqlTaskAlert:
|
|
4434
5520
|
"""Deserializes the SqlTaskAlert from a dictionary."""
|
|
@@ -4460,6 +5546,15 @@ class SqlTaskDashboard:
|
|
|
4460
5546
|
if self.subscriptions: body['subscriptions'] = [v.as_dict() for v in self.subscriptions]
|
|
4461
5547
|
return body
|
|
4462
5548
|
|
|
5549
|
+
def as_shallow_dict(self) -> dict:
|
|
5550
|
+
"""Serializes the SqlTaskDashboard into a shallow dictionary of its immediate attributes."""
|
|
5551
|
+
body = {}
|
|
5552
|
+
if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
|
|
5553
|
+
if self.dashboard_id is not None: body['dashboard_id'] = self.dashboard_id
|
|
5554
|
+
if self.pause_subscriptions is not None: body['pause_subscriptions'] = self.pause_subscriptions
|
|
5555
|
+
if self.subscriptions: body['subscriptions'] = self.subscriptions
|
|
5556
|
+
return body
|
|
5557
|
+
|
|
4463
5558
|
@classmethod
|
|
4464
5559
|
def from_dict(cls, d: Dict[str, any]) -> SqlTaskDashboard:
|
|
4465
5560
|
"""Deserializes the SqlTaskDashboard from a dictionary."""
|
|
@@ -4491,6 +5586,13 @@ class SqlTaskFile:
|
|
|
4491
5586
|
if self.source is not None: body['source'] = self.source.value
|
|
4492
5587
|
return body
|
|
4493
5588
|
|
|
5589
|
+
def as_shallow_dict(self) -> dict:
|
|
5590
|
+
"""Serializes the SqlTaskFile into a shallow dictionary of its immediate attributes."""
|
|
5591
|
+
body = {}
|
|
5592
|
+
if self.path is not None: body['path'] = self.path
|
|
5593
|
+
if self.source is not None: body['source'] = self.source
|
|
5594
|
+
return body
|
|
5595
|
+
|
|
4494
5596
|
@classmethod
|
|
4495
5597
|
def from_dict(cls, d: Dict[str, any]) -> SqlTaskFile:
|
|
4496
5598
|
"""Deserializes the SqlTaskFile from a dictionary."""
|
|
@@ -4508,6 +5610,12 @@ class SqlTaskQuery:
|
|
|
4508
5610
|
if self.query_id is not None: body['query_id'] = self.query_id
|
|
4509
5611
|
return body
|
|
4510
5612
|
|
|
5613
|
+
def as_shallow_dict(self) -> dict:
|
|
5614
|
+
"""Serializes the SqlTaskQuery into a shallow dictionary of its immediate attributes."""
|
|
5615
|
+
body = {}
|
|
5616
|
+
if self.query_id is not None: body['query_id'] = self.query_id
|
|
5617
|
+
return body
|
|
5618
|
+
|
|
4511
5619
|
@classmethod
|
|
4512
5620
|
def from_dict(cls, d: Dict[str, any]) -> SqlTaskQuery:
|
|
4513
5621
|
"""Deserializes the SqlTaskQuery from a dictionary."""
|
|
@@ -4532,6 +5640,13 @@ class SqlTaskSubscription:
|
|
|
4532
5640
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
4533
5641
|
return body
|
|
4534
5642
|
|
|
5643
|
+
def as_shallow_dict(self) -> dict:
|
|
5644
|
+
"""Serializes the SqlTaskSubscription into a shallow dictionary of its immediate attributes."""
|
|
5645
|
+
body = {}
|
|
5646
|
+
if self.destination_id is not None: body['destination_id'] = self.destination_id
|
|
5647
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
5648
|
+
return body
|
|
5649
|
+
|
|
4535
5650
|
@classmethod
|
|
4536
5651
|
def from_dict(cls, d: Dict[str, any]) -> SqlTaskSubscription:
|
|
4537
5652
|
"""Deserializes the SqlTaskSubscription from a dictionary."""
|
|
@@ -4622,6 +5737,25 @@ class SubmitRun:
|
|
|
4622
5737
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
4623
5738
|
return body
|
|
4624
5739
|
|
|
5740
|
+
def as_shallow_dict(self) -> dict:
|
|
5741
|
+
"""Serializes the SubmitRun into a shallow dictionary of its immediate attributes."""
|
|
5742
|
+
body = {}
|
|
5743
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
5744
|
+
if self.budget_policy_id is not None: body['budget_policy_id'] = self.budget_policy_id
|
|
5745
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
5746
|
+
if self.environments: body['environments'] = self.environments
|
|
5747
|
+
if self.git_source: body['git_source'] = self.git_source
|
|
5748
|
+
if self.health: body['health'] = self.health
|
|
5749
|
+
if self.idempotency_token is not None: body['idempotency_token'] = self.idempotency_token
|
|
5750
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
5751
|
+
if self.queue: body['queue'] = self.queue
|
|
5752
|
+
if self.run_as: body['run_as'] = self.run_as
|
|
5753
|
+
if self.run_name is not None: body['run_name'] = self.run_name
|
|
5754
|
+
if self.tasks: body['tasks'] = self.tasks
|
|
5755
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
5756
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
5757
|
+
return body
|
|
5758
|
+
|
|
4625
5759
|
@classmethod
|
|
4626
5760
|
def from_dict(cls, d: Dict[str, any]) -> SubmitRun:
|
|
4627
5761
|
"""Deserializes the SubmitRun from a dictionary."""
|
|
@@ -4654,6 +5788,12 @@ class SubmitRunResponse:
|
|
|
4654
5788
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
4655
5789
|
return body
|
|
4656
5790
|
|
|
5791
|
+
def as_shallow_dict(self) -> dict:
|
|
5792
|
+
"""Serializes the SubmitRunResponse into a shallow dictionary of its immediate attributes."""
|
|
5793
|
+
body = {}
|
|
5794
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
5795
|
+
return body
|
|
5796
|
+
|
|
4657
5797
|
@classmethod
|
|
4658
5798
|
def from_dict(cls, d: Dict[str, any]) -> SubmitRunResponse:
|
|
4659
5799
|
"""Deserializes the SubmitRunResponse from a dictionary."""
|
|
@@ -4667,6 +5807,11 @@ class SubmitTask:
|
|
|
4667
5807
|
field is required and must be unique within its parent job. On Update or Reset, this field is
|
|
4668
5808
|
used to reference the tasks to be updated or reset."""
|
|
4669
5809
|
|
|
5810
|
+
clean_rooms_notebook_task: Optional[CleanRoomsNotebookTask] = None
|
|
5811
|
+
"""The task runs a [clean rooms] notebook when the `clean_rooms_notebook_task` field is present.
|
|
5812
|
+
|
|
5813
|
+
[clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html"""
|
|
5814
|
+
|
|
4670
5815
|
condition_task: Optional[ConditionTask] = None
|
|
4671
5816
|
"""The task evaluates a condition that can be used to control the execution of other tasks when the
|
|
4672
5817
|
`condition_task` field is present. The condition task does not require a cluster to execute and
|
|
@@ -4771,6 +5916,8 @@ class SubmitTask:
|
|
|
4771
5916
|
def as_dict(self) -> dict:
|
|
4772
5917
|
"""Serializes the SubmitTask into a dictionary suitable for use as a JSON request body."""
|
|
4773
5918
|
body = {}
|
|
5919
|
+
if self.clean_rooms_notebook_task:
|
|
5920
|
+
body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task.as_dict()
|
|
4774
5921
|
if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
|
|
4775
5922
|
if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
|
|
4776
5923
|
if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
|
|
@@ -4797,10 +5944,42 @@ class SubmitTask:
|
|
|
4797
5944
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
4798
5945
|
return body
|
|
4799
5946
|
|
|
5947
|
+
def as_shallow_dict(self) -> dict:
|
|
5948
|
+
"""Serializes the SubmitTask into a shallow dictionary of its immediate attributes."""
|
|
5949
|
+
body = {}
|
|
5950
|
+
if self.clean_rooms_notebook_task: body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task
|
|
5951
|
+
if self.condition_task: body['condition_task'] = self.condition_task
|
|
5952
|
+
if self.dbt_task: body['dbt_task'] = self.dbt_task
|
|
5953
|
+
if self.depends_on: body['depends_on'] = self.depends_on
|
|
5954
|
+
if self.description is not None: body['description'] = self.description
|
|
5955
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
5956
|
+
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
5957
|
+
if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
|
|
5958
|
+
if self.for_each_task: body['for_each_task'] = self.for_each_task
|
|
5959
|
+
if self.health: body['health'] = self.health
|
|
5960
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
5961
|
+
if self.new_cluster: body['new_cluster'] = self.new_cluster
|
|
5962
|
+
if self.notebook_task: body['notebook_task'] = self.notebook_task
|
|
5963
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
5964
|
+
if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
|
|
5965
|
+
if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
|
|
5966
|
+
if self.run_if is not None: body['run_if'] = self.run_if
|
|
5967
|
+
if self.run_job_task: body['run_job_task'] = self.run_job_task
|
|
5968
|
+
if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
|
|
5969
|
+
if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
|
|
5970
|
+
if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
|
|
5971
|
+
if self.sql_task: body['sql_task'] = self.sql_task
|
|
5972
|
+
if self.task_key is not None: body['task_key'] = self.task_key
|
|
5973
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
5974
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
5975
|
+
return body
|
|
5976
|
+
|
|
4800
5977
|
@classmethod
|
|
4801
5978
|
def from_dict(cls, d: Dict[str, any]) -> SubmitTask:
|
|
4802
5979
|
"""Deserializes the SubmitTask from a dictionary."""
|
|
4803
|
-
return cls(
|
|
5980
|
+
return cls(clean_rooms_notebook_task=_from_dict(d, 'clean_rooms_notebook_task',
|
|
5981
|
+
CleanRoomsNotebookTask),
|
|
5982
|
+
condition_task=_from_dict(d, 'condition_task', ConditionTask),
|
|
4804
5983
|
dbt_task=_from_dict(d, 'dbt_task', DbtTask),
|
|
4805
5984
|
depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
|
|
4806
5985
|
description=d.get('description', None),
|
|
@@ -4855,6 +6034,17 @@ class TableUpdateTriggerConfiguration:
|
|
|
4855
6034
|
body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
|
|
4856
6035
|
return body
|
|
4857
6036
|
|
|
6037
|
+
def as_shallow_dict(self) -> dict:
|
|
6038
|
+
"""Serializes the TableUpdateTriggerConfiguration into a shallow dictionary of its immediate attributes."""
|
|
6039
|
+
body = {}
|
|
6040
|
+
if self.condition is not None: body['condition'] = self.condition
|
|
6041
|
+
if self.min_time_between_triggers_seconds is not None:
|
|
6042
|
+
body['min_time_between_triggers_seconds'] = self.min_time_between_triggers_seconds
|
|
6043
|
+
if self.table_names: body['table_names'] = self.table_names
|
|
6044
|
+
if self.wait_after_last_change_seconds is not None:
|
|
6045
|
+
body['wait_after_last_change_seconds'] = self.wait_after_last_change_seconds
|
|
6046
|
+
return body
|
|
6047
|
+
|
|
4858
6048
|
@classmethod
|
|
4859
6049
|
def from_dict(cls, d: Dict[str, any]) -> TableUpdateTriggerConfiguration:
|
|
4860
6050
|
"""Deserializes the TableUpdateTriggerConfiguration from a dictionary."""
|
|
@@ -4871,6 +6061,11 @@ class Task:
|
|
|
4871
6061
|
field is required and must be unique within its parent job. On Update or Reset, this field is
|
|
4872
6062
|
used to reference the tasks to be updated or reset."""
|
|
4873
6063
|
|
|
6064
|
+
clean_rooms_notebook_task: Optional[CleanRoomsNotebookTask] = None
|
|
6065
|
+
"""The task runs a [clean rooms] notebook when the `clean_rooms_notebook_task` field is present.
|
|
6066
|
+
|
|
6067
|
+
[clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html"""
|
|
6068
|
+
|
|
4874
6069
|
condition_task: Optional[ConditionTask] = None
|
|
4875
6070
|
"""The task evaluates a condition that can be used to control the execution of other tasks when the
|
|
4876
6071
|
`condition_task` field is present. The condition task does not require a cluster to execute and
|
|
@@ -5000,6 +6195,8 @@ class Task:
|
|
|
5000
6195
|
def as_dict(self) -> dict:
|
|
5001
6196
|
"""Serializes the Task into a dictionary suitable for use as a JSON request body."""
|
|
5002
6197
|
body = {}
|
|
6198
|
+
if self.clean_rooms_notebook_task:
|
|
6199
|
+
body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task.as_dict()
|
|
5003
6200
|
if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
|
|
5004
6201
|
if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
|
|
5005
6202
|
if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
|
|
@@ -5033,10 +6230,49 @@ class Task:
|
|
|
5033
6230
|
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
|
|
5034
6231
|
return body
|
|
5035
6232
|
|
|
6233
|
+
def as_shallow_dict(self) -> dict:
|
|
6234
|
+
"""Serializes the Task into a shallow dictionary of its immediate attributes."""
|
|
6235
|
+
body = {}
|
|
6236
|
+
if self.clean_rooms_notebook_task: body['clean_rooms_notebook_task'] = self.clean_rooms_notebook_task
|
|
6237
|
+
if self.condition_task: body['condition_task'] = self.condition_task
|
|
6238
|
+
if self.dbt_task: body['dbt_task'] = self.dbt_task
|
|
6239
|
+
if self.depends_on: body['depends_on'] = self.depends_on
|
|
6240
|
+
if self.description is not None: body['description'] = self.description
|
|
6241
|
+
if self.disable_auto_optimization is not None:
|
|
6242
|
+
body['disable_auto_optimization'] = self.disable_auto_optimization
|
|
6243
|
+
if self.email_notifications: body['email_notifications'] = self.email_notifications
|
|
6244
|
+
if self.environment_key is not None: body['environment_key'] = self.environment_key
|
|
6245
|
+
if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
|
|
6246
|
+
if self.for_each_task: body['for_each_task'] = self.for_each_task
|
|
6247
|
+
if self.health: body['health'] = self.health
|
|
6248
|
+
if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
|
|
6249
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
6250
|
+
if self.max_retries is not None: body['max_retries'] = self.max_retries
|
|
6251
|
+
if self.min_retry_interval_millis is not None:
|
|
6252
|
+
body['min_retry_interval_millis'] = self.min_retry_interval_millis
|
|
6253
|
+
if self.new_cluster: body['new_cluster'] = self.new_cluster
|
|
6254
|
+
if self.notebook_task: body['notebook_task'] = self.notebook_task
|
|
6255
|
+
if self.notification_settings: body['notification_settings'] = self.notification_settings
|
|
6256
|
+
if self.pipeline_task: body['pipeline_task'] = self.pipeline_task
|
|
6257
|
+
if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task
|
|
6258
|
+
if self.retry_on_timeout is not None: body['retry_on_timeout'] = self.retry_on_timeout
|
|
6259
|
+
if self.run_if is not None: body['run_if'] = self.run_if
|
|
6260
|
+
if self.run_job_task: body['run_job_task'] = self.run_job_task
|
|
6261
|
+
if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task
|
|
6262
|
+
if self.spark_python_task: body['spark_python_task'] = self.spark_python_task
|
|
6263
|
+
if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task
|
|
6264
|
+
if self.sql_task: body['sql_task'] = self.sql_task
|
|
6265
|
+
if self.task_key is not None: body['task_key'] = self.task_key
|
|
6266
|
+
if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
|
|
6267
|
+
if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications
|
|
6268
|
+
return body
|
|
6269
|
+
|
|
5036
6270
|
@classmethod
|
|
5037
6271
|
def from_dict(cls, d: Dict[str, any]) -> Task:
|
|
5038
6272
|
"""Deserializes the Task from a dictionary."""
|
|
5039
|
-
return cls(
|
|
6273
|
+
return cls(clean_rooms_notebook_task=_from_dict(d, 'clean_rooms_notebook_task',
|
|
6274
|
+
CleanRoomsNotebookTask),
|
|
6275
|
+
condition_task=_from_dict(d, 'condition_task', ConditionTask),
|
|
5040
6276
|
dbt_task=_from_dict(d, 'dbt_task', DbtTask),
|
|
5041
6277
|
depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
|
|
5042
6278
|
description=d.get('description', None),
|
|
@@ -5083,6 +6319,13 @@ class TaskDependency:
|
|
|
5083
6319
|
if self.task_key is not None: body['task_key'] = self.task_key
|
|
5084
6320
|
return body
|
|
5085
6321
|
|
|
6322
|
+
def as_shallow_dict(self) -> dict:
|
|
6323
|
+
"""Serializes the TaskDependency into a shallow dictionary of its immediate attributes."""
|
|
6324
|
+
body = {}
|
|
6325
|
+
if self.outcome is not None: body['outcome'] = self.outcome
|
|
6326
|
+
if self.task_key is not None: body['task_key'] = self.task_key
|
|
6327
|
+
return body
|
|
6328
|
+
|
|
5086
6329
|
@classmethod
|
|
5087
6330
|
def from_dict(cls, d: Dict[str, any]) -> TaskDependency:
|
|
5088
6331
|
"""Deserializes the TaskDependency from a dictionary."""
|
|
@@ -5140,6 +6383,20 @@ class TaskEmailNotifications:
|
|
|
5140
6383
|
if self.on_success: body['on_success'] = [v for v in self.on_success]
|
|
5141
6384
|
return body
|
|
5142
6385
|
|
|
6386
|
+
def as_shallow_dict(self) -> dict:
|
|
6387
|
+
"""Serializes the TaskEmailNotifications into a shallow dictionary of its immediate attributes."""
|
|
6388
|
+
body = {}
|
|
6389
|
+
if self.no_alert_for_skipped_runs is not None:
|
|
6390
|
+
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
6391
|
+
if self.on_duration_warning_threshold_exceeded:
|
|
6392
|
+
body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
|
|
6393
|
+
if self.on_failure: body['on_failure'] = self.on_failure
|
|
6394
|
+
if self.on_start: body['on_start'] = self.on_start
|
|
6395
|
+
if self.on_streaming_backlog_exceeded:
|
|
6396
|
+
body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
|
|
6397
|
+
if self.on_success: body['on_success'] = self.on_success
|
|
6398
|
+
return body
|
|
6399
|
+
|
|
5143
6400
|
@classmethod
|
|
5144
6401
|
def from_dict(cls, d: Dict[str, any]) -> TaskEmailNotifications:
|
|
5145
6402
|
"""Deserializes the TaskEmailNotifications from a dictionary."""
|
|
@@ -5177,6 +6434,16 @@ class TaskNotificationSettings:
|
|
|
5177
6434
|
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
5178
6435
|
return body
|
|
5179
6436
|
|
|
6437
|
+
def as_shallow_dict(self) -> dict:
|
|
6438
|
+
"""Serializes the TaskNotificationSettings into a shallow dictionary of its immediate attributes."""
|
|
6439
|
+
body = {}
|
|
6440
|
+
if self.alert_on_last_attempt is not None: body['alert_on_last_attempt'] = self.alert_on_last_attempt
|
|
6441
|
+
if self.no_alert_for_canceled_runs is not None:
|
|
6442
|
+
body['no_alert_for_canceled_runs'] = self.no_alert_for_canceled_runs
|
|
6443
|
+
if self.no_alert_for_skipped_runs is not None:
|
|
6444
|
+
body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
|
|
6445
|
+
return body
|
|
6446
|
+
|
|
5180
6447
|
@classmethod
|
|
5181
6448
|
def from_dict(cls, d: Dict[str, any]) -> TaskNotificationSettings:
|
|
5182
6449
|
"""Deserializes the TaskNotificationSettings from a dictionary."""
|
|
@@ -5306,6 +6573,14 @@ class TerminationDetails:
|
|
|
5306
6573
|
if self.type is not None: body['type'] = self.type.value
|
|
5307
6574
|
return body
|
|
5308
6575
|
|
|
6576
|
+
def as_shallow_dict(self) -> dict:
|
|
6577
|
+
"""Serializes the TerminationDetails into a shallow dictionary of its immediate attributes."""
|
|
6578
|
+
body = {}
|
|
6579
|
+
if self.code is not None: body['code'] = self.code
|
|
6580
|
+
if self.message is not None: body['message'] = self.message
|
|
6581
|
+
if self.type is not None: body['type'] = self.type
|
|
6582
|
+
return body
|
|
6583
|
+
|
|
5309
6584
|
@classmethod
|
|
5310
6585
|
def from_dict(cls, d: Dict[str, any]) -> TerminationDetails:
|
|
5311
6586
|
"""Deserializes the TerminationDetails from a dictionary."""
|
|
@@ -5342,6 +6617,12 @@ class TriggerInfo:
|
|
|
5342
6617
|
if self.run_id is not None: body['run_id'] = self.run_id
|
|
5343
6618
|
return body
|
|
5344
6619
|
|
|
6620
|
+
def as_shallow_dict(self) -> dict:
|
|
6621
|
+
"""Serializes the TriggerInfo into a shallow dictionary of its immediate attributes."""
|
|
6622
|
+
body = {}
|
|
6623
|
+
if self.run_id is not None: body['run_id'] = self.run_id
|
|
6624
|
+
return body
|
|
6625
|
+
|
|
5345
6626
|
@classmethod
|
|
5346
6627
|
def from_dict(cls, d: Dict[str, any]) -> TriggerInfo:
|
|
5347
6628
|
"""Deserializes the TriggerInfo from a dictionary."""
|
|
@@ -5374,6 +6655,16 @@ class TriggerSettings:
|
|
|
5374
6655
|
if self.table_update: body['table_update'] = self.table_update.as_dict()
|
|
5375
6656
|
return body
|
|
5376
6657
|
|
|
6658
|
+
def as_shallow_dict(self) -> dict:
|
|
6659
|
+
"""Serializes the TriggerSettings into a shallow dictionary of its immediate attributes."""
|
|
6660
|
+
body = {}
|
|
6661
|
+
if self.file_arrival: body['file_arrival'] = self.file_arrival
|
|
6662
|
+
if self.pause_status is not None: body['pause_status'] = self.pause_status
|
|
6663
|
+
if self.periodic: body['periodic'] = self.periodic
|
|
6664
|
+
if self.table: body['table'] = self.table
|
|
6665
|
+
if self.table_update: body['table_update'] = self.table_update
|
|
6666
|
+
return body
|
|
6667
|
+
|
|
5377
6668
|
@classmethod
|
|
5378
6669
|
def from_dict(cls, d: Dict[str, any]) -> TriggerSettings:
|
|
5379
6670
|
"""Deserializes the TriggerSettings from a dictionary."""
|
|
@@ -5393,7 +6684,8 @@ class TriggerType(Enum):
|
|
|
5393
6684
|
previously failed run. This occurs when you request to re-run the job in case of failures. *
|
|
5394
6685
|
`RUN_JOB_TASK`: Indicates a run that is triggered using a Run Job task. * `FILE_ARRIVAL`:
|
|
5395
6686
|
Indicates a run that is triggered by a file arrival. * `TABLE`: Indicates a run that is
|
|
5396
|
-
triggered by a table update.
|
|
6687
|
+
triggered by a table update. * `CONTINUOUS_RESTART`: Indicates a run created by user to manually
|
|
6688
|
+
restart a continuous job run."""
|
|
5397
6689
|
|
|
5398
6690
|
FILE_ARRIVAL = 'FILE_ARRIVAL'
|
|
5399
6691
|
ONE_TIME = 'ONE_TIME'
|
|
@@ -5432,6 +6724,14 @@ class UpdateJob:
|
|
|
5432
6724
|
if self.new_settings: body['new_settings'] = self.new_settings.as_dict()
|
|
5433
6725
|
return body
|
|
5434
6726
|
|
|
6727
|
+
def as_shallow_dict(self) -> dict:
|
|
6728
|
+
"""Serializes the UpdateJob into a shallow dictionary of its immediate attributes."""
|
|
6729
|
+
body = {}
|
|
6730
|
+
if self.fields_to_remove: body['fields_to_remove'] = self.fields_to_remove
|
|
6731
|
+
if self.job_id is not None: body['job_id'] = self.job_id
|
|
6732
|
+
if self.new_settings: body['new_settings'] = self.new_settings
|
|
6733
|
+
return body
|
|
6734
|
+
|
|
5435
6735
|
@classmethod
|
|
5436
6736
|
def from_dict(cls, d: Dict[str, any]) -> UpdateJob:
|
|
5437
6737
|
"""Deserializes the UpdateJob from a dictionary."""
|
|
@@ -5448,6 +6748,11 @@ class UpdateResponse:
|
|
|
5448
6748
|
body = {}
|
|
5449
6749
|
return body
|
|
5450
6750
|
|
|
6751
|
+
def as_shallow_dict(self) -> dict:
|
|
6752
|
+
"""Serializes the UpdateResponse into a shallow dictionary of its immediate attributes."""
|
|
6753
|
+
body = {}
|
|
6754
|
+
return body
|
|
6755
|
+
|
|
5451
6756
|
@classmethod
|
|
5452
6757
|
def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
|
|
5453
6758
|
"""Deserializes the UpdateResponse from a dictionary."""
|
|
@@ -5474,6 +6779,14 @@ class ViewItem:
|
|
|
5474
6779
|
if self.type is not None: body['type'] = self.type.value
|
|
5475
6780
|
return body
|
|
5476
6781
|
|
|
6782
|
+
def as_shallow_dict(self) -> dict:
|
|
6783
|
+
"""Serializes the ViewItem into a shallow dictionary of its immediate attributes."""
|
|
6784
|
+
body = {}
|
|
6785
|
+
if self.content is not None: body['content'] = self.content
|
|
6786
|
+
if self.name is not None: body['name'] = self.name
|
|
6787
|
+
if self.type is not None: body['type'] = self.type
|
|
6788
|
+
return body
|
|
6789
|
+
|
|
5477
6790
|
@classmethod
|
|
5478
6791
|
def from_dict(cls, d: Dict[str, any]) -> ViewItem:
|
|
5479
6792
|
"""Deserializes the ViewItem from a dictionary."""
|
|
@@ -5506,6 +6819,12 @@ class Webhook:
|
|
|
5506
6819
|
if self.id is not None: body['id'] = self.id
|
|
5507
6820
|
return body
|
|
5508
6821
|
|
|
6822
|
+
def as_shallow_dict(self) -> dict:
|
|
6823
|
+
"""Serializes the Webhook into a shallow dictionary of its immediate attributes."""
|
|
6824
|
+
body = {}
|
|
6825
|
+
if self.id is not None: body['id'] = self.id
|
|
6826
|
+
return body
|
|
6827
|
+
|
|
5509
6828
|
@classmethod
|
|
5510
6829
|
def from_dict(cls, d: Dict[str, any]) -> Webhook:
|
|
5511
6830
|
"""Deserializes the Webhook from a dictionary."""
|
|
@@ -5553,6 +6872,18 @@ class WebhookNotifications:
|
|
|
5553
6872
|
if self.on_success: body['on_success'] = [v.as_dict() for v in self.on_success]
|
|
5554
6873
|
return body
|
|
5555
6874
|
|
|
6875
|
+
def as_shallow_dict(self) -> dict:
|
|
6876
|
+
"""Serializes the WebhookNotifications into a shallow dictionary of its immediate attributes."""
|
|
6877
|
+
body = {}
|
|
6878
|
+
if self.on_duration_warning_threshold_exceeded:
|
|
6879
|
+
body['on_duration_warning_threshold_exceeded'] = self.on_duration_warning_threshold_exceeded
|
|
6880
|
+
if self.on_failure: body['on_failure'] = self.on_failure
|
|
6881
|
+
if self.on_start: body['on_start'] = self.on_start
|
|
6882
|
+
if self.on_streaming_backlog_exceeded:
|
|
6883
|
+
body['on_streaming_backlog_exceeded'] = self.on_streaming_backlog_exceeded
|
|
6884
|
+
if self.on_success: body['on_success'] = self.on_success
|
|
6885
|
+
return body
|
|
6886
|
+
|
|
5556
6887
|
@classmethod
|
|
5557
6888
|
def from_dict(cls, d: Dict[str, any]) -> WebhookNotifications:
|
|
5558
6889
|
"""Deserializes the WebhookNotifications from a dictionary."""
|
|
@@ -5754,8 +7085,8 @@ class JobsAPI:
|
|
|
5754
7085
|
:param queue: :class:`QueueSettings` (optional)
|
|
5755
7086
|
The queue settings of the job.
|
|
5756
7087
|
:param run_as: :class:`JobRunAs` (optional)
|
|
5757
|
-
Write-only setting. Specifies the user
|
|
5758
|
-
|
|
7088
|
+
Write-only setting. Specifies the user or service principal that the job runs as. If not specified,
|
|
7089
|
+
the job runs as the user who created the job.
|
|
5759
7090
|
|
|
5760
7091
|
Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown.
|
|
5761
7092
|
:param schedule: :class:`CronSchedule` (optional)
|