databricks-sdk 0.44.1__py3-none-any.whl → 0.46.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 +135 -116
- databricks/sdk/_base_client.py +112 -88
- databricks/sdk/_property.py +12 -7
- databricks/sdk/_widgets/__init__.py +13 -2
- databricks/sdk/_widgets/default_widgets_utils.py +21 -15
- databricks/sdk/_widgets/ipywidgets_utils.py +47 -24
- databricks/sdk/azure.py +8 -6
- databricks/sdk/casing.py +5 -5
- databricks/sdk/config.py +156 -99
- databricks/sdk/core.py +57 -47
- databricks/sdk/credentials_provider.py +306 -206
- databricks/sdk/data_plane.py +75 -50
- databricks/sdk/dbutils.py +123 -87
- databricks/sdk/environments.py +52 -35
- databricks/sdk/errors/base.py +61 -35
- databricks/sdk/errors/customizer.py +3 -3
- databricks/sdk/errors/deserializer.py +38 -25
- databricks/sdk/errors/details.py +417 -0
- databricks/sdk/errors/mapper.py +1 -1
- databricks/sdk/errors/overrides.py +27 -24
- databricks/sdk/errors/parser.py +26 -14
- databricks/sdk/errors/platform.py +10 -10
- databricks/sdk/errors/private_link.py +24 -24
- databricks/sdk/logger/round_trip_logger.py +28 -20
- databricks/sdk/mixins/compute.py +90 -60
- databricks/sdk/mixins/files.py +815 -145
- databricks/sdk/mixins/jobs.py +191 -16
- databricks/sdk/mixins/open_ai_client.py +26 -20
- databricks/sdk/mixins/workspace.py +45 -34
- databricks/sdk/oauth.py +379 -198
- databricks/sdk/retries.py +14 -12
- databricks/sdk/runtime/__init__.py +34 -17
- databricks/sdk/runtime/dbutils_stub.py +52 -39
- databricks/sdk/service/_internal.py +12 -7
- databricks/sdk/service/apps.py +618 -418
- databricks/sdk/service/billing.py +827 -604
- databricks/sdk/service/catalog.py +6552 -4474
- databricks/sdk/service/cleanrooms.py +550 -388
- databricks/sdk/service/compute.py +5263 -3536
- databricks/sdk/service/dashboards.py +1331 -924
- databricks/sdk/service/files.py +446 -309
- databricks/sdk/service/iam.py +2115 -1483
- databricks/sdk/service/jobs.py +4151 -2588
- databricks/sdk/service/marketplace.py +2210 -1517
- databricks/sdk/service/ml.py +3839 -2256
- databricks/sdk/service/oauth2.py +910 -584
- databricks/sdk/service/pipelines.py +1865 -1203
- databricks/sdk/service/provisioning.py +1435 -1029
- databricks/sdk/service/serving.py +2060 -1290
- databricks/sdk/service/settings.py +2846 -1929
- databricks/sdk/service/sharing.py +2201 -877
- databricks/sdk/service/sql.py +4650 -3103
- databricks/sdk/service/vectorsearch.py +816 -550
- databricks/sdk/service/workspace.py +1330 -906
- databricks/sdk/useragent.py +36 -22
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/METADATA +31 -31
- databricks_sdk-0.46.0.dist-info/RECORD +70 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/WHEEL +1 -1
- databricks_sdk-0.44.1.dist-info/RECORD +0 -69
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/top_level.txt +0 -0
|
@@ -8,12 +8,13 @@ import time
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from datetime import timedelta
|
|
10
10
|
from enum import Enum
|
|
11
|
-
from typing import Callable, Dict, Iterator, List, Optional
|
|
11
|
+
from typing import Any, Callable, Dict, Iterator, List, Optional
|
|
12
12
|
|
|
13
13
|
from ..errors import OperationFailed
|
|
14
14
|
from ._internal import Wait, _enum, _from_dict, _repeated_dict, _repeated_enum
|
|
15
15
|
|
|
16
|
-
_LOG = logging.getLogger(
|
|
16
|
+
_LOG = logging.getLogger("databricks.sdk")
|
|
17
|
+
|
|
17
18
|
|
|
18
19
|
from databricks.sdk.service import compute
|
|
19
20
|
|
|
@@ -114,94 +115,148 @@ class CreatePipeline:
|
|
|
114
115
|
def as_dict(self) -> dict:
|
|
115
116
|
"""Serializes the CreatePipeline into a dictionary suitable for use as a JSON request body."""
|
|
116
117
|
body = {}
|
|
117
|
-
if self.allow_duplicate_names is not None:
|
|
118
|
-
|
|
119
|
-
if self.
|
|
120
|
-
|
|
121
|
-
if self.
|
|
122
|
-
|
|
123
|
-
if self.
|
|
124
|
-
|
|
125
|
-
if self.
|
|
126
|
-
|
|
127
|
-
if self.
|
|
128
|
-
|
|
129
|
-
if self.
|
|
130
|
-
|
|
131
|
-
if self.
|
|
132
|
-
|
|
133
|
-
if self.
|
|
134
|
-
|
|
135
|
-
if self.
|
|
136
|
-
|
|
137
|
-
if self.
|
|
138
|
-
|
|
139
|
-
if self.
|
|
140
|
-
|
|
141
|
-
if self.
|
|
142
|
-
|
|
118
|
+
if self.allow_duplicate_names is not None:
|
|
119
|
+
body["allow_duplicate_names"] = self.allow_duplicate_names
|
|
120
|
+
if self.budget_policy_id is not None:
|
|
121
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
122
|
+
if self.catalog is not None:
|
|
123
|
+
body["catalog"] = self.catalog
|
|
124
|
+
if self.channel is not None:
|
|
125
|
+
body["channel"] = self.channel
|
|
126
|
+
if self.clusters:
|
|
127
|
+
body["clusters"] = [v.as_dict() for v in self.clusters]
|
|
128
|
+
if self.configuration:
|
|
129
|
+
body["configuration"] = self.configuration
|
|
130
|
+
if self.continuous is not None:
|
|
131
|
+
body["continuous"] = self.continuous
|
|
132
|
+
if self.deployment:
|
|
133
|
+
body["deployment"] = self.deployment.as_dict()
|
|
134
|
+
if self.development is not None:
|
|
135
|
+
body["development"] = self.development
|
|
136
|
+
if self.dry_run is not None:
|
|
137
|
+
body["dry_run"] = self.dry_run
|
|
138
|
+
if self.edition is not None:
|
|
139
|
+
body["edition"] = self.edition
|
|
140
|
+
if self.filters:
|
|
141
|
+
body["filters"] = self.filters.as_dict()
|
|
142
|
+
if self.gateway_definition:
|
|
143
|
+
body["gateway_definition"] = self.gateway_definition.as_dict()
|
|
144
|
+
if self.id is not None:
|
|
145
|
+
body["id"] = self.id
|
|
146
|
+
if self.ingestion_definition:
|
|
147
|
+
body["ingestion_definition"] = self.ingestion_definition.as_dict()
|
|
148
|
+
if self.libraries:
|
|
149
|
+
body["libraries"] = [v.as_dict() for v in self.libraries]
|
|
150
|
+
if self.name is not None:
|
|
151
|
+
body["name"] = self.name
|
|
152
|
+
if self.notifications:
|
|
153
|
+
body["notifications"] = [v.as_dict() for v in self.notifications]
|
|
154
|
+
if self.photon is not None:
|
|
155
|
+
body["photon"] = self.photon
|
|
156
|
+
if self.restart_window:
|
|
157
|
+
body["restart_window"] = self.restart_window.as_dict()
|
|
158
|
+
if self.run_as:
|
|
159
|
+
body["run_as"] = self.run_as.as_dict()
|
|
160
|
+
if self.schema is not None:
|
|
161
|
+
body["schema"] = self.schema
|
|
162
|
+
if self.serverless is not None:
|
|
163
|
+
body["serverless"] = self.serverless
|
|
164
|
+
if self.storage is not None:
|
|
165
|
+
body["storage"] = self.storage
|
|
166
|
+
if self.target is not None:
|
|
167
|
+
body["target"] = self.target
|
|
168
|
+
if self.trigger:
|
|
169
|
+
body["trigger"] = self.trigger.as_dict()
|
|
143
170
|
return body
|
|
144
171
|
|
|
145
172
|
def as_shallow_dict(self) -> dict:
|
|
146
173
|
"""Serializes the CreatePipeline into a shallow dictionary of its immediate attributes."""
|
|
147
174
|
body = {}
|
|
148
|
-
if self.allow_duplicate_names is not None:
|
|
149
|
-
|
|
150
|
-
if self.
|
|
151
|
-
|
|
152
|
-
if self.
|
|
153
|
-
|
|
154
|
-
if self.
|
|
155
|
-
|
|
156
|
-
if self.
|
|
157
|
-
|
|
158
|
-
if self.
|
|
159
|
-
|
|
160
|
-
if self.
|
|
161
|
-
|
|
162
|
-
if self.
|
|
163
|
-
|
|
164
|
-
if self.
|
|
165
|
-
|
|
166
|
-
if self.
|
|
167
|
-
|
|
168
|
-
if self.
|
|
169
|
-
|
|
170
|
-
if self.
|
|
171
|
-
|
|
172
|
-
if self.
|
|
173
|
-
|
|
175
|
+
if self.allow_duplicate_names is not None:
|
|
176
|
+
body["allow_duplicate_names"] = self.allow_duplicate_names
|
|
177
|
+
if self.budget_policy_id is not None:
|
|
178
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
179
|
+
if self.catalog is not None:
|
|
180
|
+
body["catalog"] = self.catalog
|
|
181
|
+
if self.channel is not None:
|
|
182
|
+
body["channel"] = self.channel
|
|
183
|
+
if self.clusters:
|
|
184
|
+
body["clusters"] = self.clusters
|
|
185
|
+
if self.configuration:
|
|
186
|
+
body["configuration"] = self.configuration
|
|
187
|
+
if self.continuous is not None:
|
|
188
|
+
body["continuous"] = self.continuous
|
|
189
|
+
if self.deployment:
|
|
190
|
+
body["deployment"] = self.deployment
|
|
191
|
+
if self.development is not None:
|
|
192
|
+
body["development"] = self.development
|
|
193
|
+
if self.dry_run is not None:
|
|
194
|
+
body["dry_run"] = self.dry_run
|
|
195
|
+
if self.edition is not None:
|
|
196
|
+
body["edition"] = self.edition
|
|
197
|
+
if self.filters:
|
|
198
|
+
body["filters"] = self.filters
|
|
199
|
+
if self.gateway_definition:
|
|
200
|
+
body["gateway_definition"] = self.gateway_definition
|
|
201
|
+
if self.id is not None:
|
|
202
|
+
body["id"] = self.id
|
|
203
|
+
if self.ingestion_definition:
|
|
204
|
+
body["ingestion_definition"] = self.ingestion_definition
|
|
205
|
+
if self.libraries:
|
|
206
|
+
body["libraries"] = self.libraries
|
|
207
|
+
if self.name is not None:
|
|
208
|
+
body["name"] = self.name
|
|
209
|
+
if self.notifications:
|
|
210
|
+
body["notifications"] = self.notifications
|
|
211
|
+
if self.photon is not None:
|
|
212
|
+
body["photon"] = self.photon
|
|
213
|
+
if self.restart_window:
|
|
214
|
+
body["restart_window"] = self.restart_window
|
|
215
|
+
if self.run_as:
|
|
216
|
+
body["run_as"] = self.run_as
|
|
217
|
+
if self.schema is not None:
|
|
218
|
+
body["schema"] = self.schema
|
|
219
|
+
if self.serverless is not None:
|
|
220
|
+
body["serverless"] = self.serverless
|
|
221
|
+
if self.storage is not None:
|
|
222
|
+
body["storage"] = self.storage
|
|
223
|
+
if self.target is not None:
|
|
224
|
+
body["target"] = self.target
|
|
225
|
+
if self.trigger:
|
|
226
|
+
body["trigger"] = self.trigger
|
|
174
227
|
return body
|
|
175
228
|
|
|
176
229
|
@classmethod
|
|
177
|
-
def from_dict(cls, d: Dict[str,
|
|
230
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreatePipeline:
|
|
178
231
|
"""Deserializes the CreatePipeline from a dictionary."""
|
|
179
|
-
return cls(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
232
|
+
return cls(
|
|
233
|
+
allow_duplicate_names=d.get("allow_duplicate_names", None),
|
|
234
|
+
budget_policy_id=d.get("budget_policy_id", None),
|
|
235
|
+
catalog=d.get("catalog", None),
|
|
236
|
+
channel=d.get("channel", None),
|
|
237
|
+
clusters=_repeated_dict(d, "clusters", PipelineCluster),
|
|
238
|
+
configuration=d.get("configuration", None),
|
|
239
|
+
continuous=d.get("continuous", None),
|
|
240
|
+
deployment=_from_dict(d, "deployment", PipelineDeployment),
|
|
241
|
+
development=d.get("development", None),
|
|
242
|
+
dry_run=d.get("dry_run", None),
|
|
243
|
+
edition=d.get("edition", None),
|
|
244
|
+
filters=_from_dict(d, "filters", Filters),
|
|
245
|
+
gateway_definition=_from_dict(d, "gateway_definition", IngestionGatewayPipelineDefinition),
|
|
246
|
+
id=d.get("id", None),
|
|
247
|
+
ingestion_definition=_from_dict(d, "ingestion_definition", IngestionPipelineDefinition),
|
|
248
|
+
libraries=_repeated_dict(d, "libraries", PipelineLibrary),
|
|
249
|
+
name=d.get("name", None),
|
|
250
|
+
notifications=_repeated_dict(d, "notifications", Notifications),
|
|
251
|
+
photon=d.get("photon", None),
|
|
252
|
+
restart_window=_from_dict(d, "restart_window", RestartWindow),
|
|
253
|
+
run_as=_from_dict(d, "run_as", RunAs),
|
|
254
|
+
schema=d.get("schema", None),
|
|
255
|
+
serverless=d.get("serverless", None),
|
|
256
|
+
storage=d.get("storage", None),
|
|
257
|
+
target=d.get("target", None),
|
|
258
|
+
trigger=_from_dict(d, "trigger", PipelineTrigger),
|
|
259
|
+
)
|
|
205
260
|
|
|
206
261
|
|
|
207
262
|
@dataclass
|
|
@@ -215,22 +270,27 @@ class CreatePipelineResponse:
|
|
|
215
270
|
def as_dict(self) -> dict:
|
|
216
271
|
"""Serializes the CreatePipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
217
272
|
body = {}
|
|
218
|
-
if self.effective_settings:
|
|
219
|
-
|
|
273
|
+
if self.effective_settings:
|
|
274
|
+
body["effective_settings"] = self.effective_settings.as_dict()
|
|
275
|
+
if self.pipeline_id is not None:
|
|
276
|
+
body["pipeline_id"] = self.pipeline_id
|
|
220
277
|
return body
|
|
221
278
|
|
|
222
279
|
def as_shallow_dict(self) -> dict:
|
|
223
280
|
"""Serializes the CreatePipelineResponse into a shallow dictionary of its immediate attributes."""
|
|
224
281
|
body = {}
|
|
225
|
-
if self.effective_settings:
|
|
226
|
-
|
|
282
|
+
if self.effective_settings:
|
|
283
|
+
body["effective_settings"] = self.effective_settings
|
|
284
|
+
if self.pipeline_id is not None:
|
|
285
|
+
body["pipeline_id"] = self.pipeline_id
|
|
227
286
|
return body
|
|
228
287
|
|
|
229
288
|
@classmethod
|
|
230
|
-
def from_dict(cls, d: Dict[str,
|
|
289
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreatePipelineResponse:
|
|
231
290
|
"""Deserializes the CreatePipelineResponse from a dictionary."""
|
|
232
|
-
return cls(
|
|
233
|
-
|
|
291
|
+
return cls(
|
|
292
|
+
effective_settings=_from_dict(d, "effective_settings", PipelineSpec), pipeline_id=d.get("pipeline_id", None)
|
|
293
|
+
)
|
|
234
294
|
|
|
235
295
|
|
|
236
296
|
@dataclass
|
|
@@ -242,22 +302,25 @@ class CronTrigger:
|
|
|
242
302
|
def as_dict(self) -> dict:
|
|
243
303
|
"""Serializes the CronTrigger into a dictionary suitable for use as a JSON request body."""
|
|
244
304
|
body = {}
|
|
245
|
-
if self.quartz_cron_schedule is not None:
|
|
246
|
-
|
|
305
|
+
if self.quartz_cron_schedule is not None:
|
|
306
|
+
body["quartz_cron_schedule"] = self.quartz_cron_schedule
|
|
307
|
+
if self.timezone_id is not None:
|
|
308
|
+
body["timezone_id"] = self.timezone_id
|
|
247
309
|
return body
|
|
248
310
|
|
|
249
311
|
def as_shallow_dict(self) -> dict:
|
|
250
312
|
"""Serializes the CronTrigger into a shallow dictionary of its immediate attributes."""
|
|
251
313
|
body = {}
|
|
252
|
-
if self.quartz_cron_schedule is not None:
|
|
253
|
-
|
|
314
|
+
if self.quartz_cron_schedule is not None:
|
|
315
|
+
body["quartz_cron_schedule"] = self.quartz_cron_schedule
|
|
316
|
+
if self.timezone_id is not None:
|
|
317
|
+
body["timezone_id"] = self.timezone_id
|
|
254
318
|
return body
|
|
255
319
|
|
|
256
320
|
@classmethod
|
|
257
|
-
def from_dict(cls, d: Dict[str,
|
|
321
|
+
def from_dict(cls, d: Dict[str, Any]) -> CronTrigger:
|
|
258
322
|
"""Deserializes the CronTrigger from a dictionary."""
|
|
259
|
-
return cls(quartz_cron_schedule=d.get(
|
|
260
|
-
timezone_id=d.get('timezone_id', None))
|
|
323
|
+
return cls(quartz_cron_schedule=d.get("quartz_cron_schedule", None), timezone_id=d.get("timezone_id", None))
|
|
261
324
|
|
|
262
325
|
|
|
263
326
|
@dataclass
|
|
@@ -271,39 +334,42 @@ class DataPlaneId:
|
|
|
271
334
|
def as_dict(self) -> dict:
|
|
272
335
|
"""Serializes the DataPlaneId into a dictionary suitable for use as a JSON request body."""
|
|
273
336
|
body = {}
|
|
274
|
-
if self.instance is not None:
|
|
275
|
-
|
|
337
|
+
if self.instance is not None:
|
|
338
|
+
body["instance"] = self.instance
|
|
339
|
+
if self.seq_no is not None:
|
|
340
|
+
body["seq_no"] = self.seq_no
|
|
276
341
|
return body
|
|
277
342
|
|
|
278
343
|
def as_shallow_dict(self) -> dict:
|
|
279
344
|
"""Serializes the DataPlaneId into a shallow dictionary of its immediate attributes."""
|
|
280
345
|
body = {}
|
|
281
|
-
if self.instance is not None:
|
|
282
|
-
|
|
346
|
+
if self.instance is not None:
|
|
347
|
+
body["instance"] = self.instance
|
|
348
|
+
if self.seq_no is not None:
|
|
349
|
+
body["seq_no"] = self.seq_no
|
|
283
350
|
return body
|
|
284
351
|
|
|
285
352
|
@classmethod
|
|
286
|
-
def from_dict(cls, d: Dict[str,
|
|
353
|
+
def from_dict(cls, d: Dict[str, Any]) -> DataPlaneId:
|
|
287
354
|
"""Deserializes the DataPlaneId from a dictionary."""
|
|
288
|
-
return cls(instance=d.get(
|
|
355
|
+
return cls(instance=d.get("instance", None), seq_no=d.get("seq_no", None))
|
|
289
356
|
|
|
290
357
|
|
|
291
358
|
class DayOfWeek(Enum):
|
|
292
359
|
"""Days of week in which the restart is allowed to happen (within a five-hour window starting at
|
|
293
360
|
start_hour). If not specified all days of the week will be used."""
|
|
294
361
|
|
|
295
|
-
FRIDAY =
|
|
296
|
-
MONDAY =
|
|
297
|
-
SATURDAY =
|
|
298
|
-
SUNDAY =
|
|
299
|
-
THURSDAY =
|
|
300
|
-
TUESDAY =
|
|
301
|
-
WEDNESDAY =
|
|
362
|
+
FRIDAY = "FRIDAY"
|
|
363
|
+
MONDAY = "MONDAY"
|
|
364
|
+
SATURDAY = "SATURDAY"
|
|
365
|
+
SUNDAY = "SUNDAY"
|
|
366
|
+
THURSDAY = "THURSDAY"
|
|
367
|
+
TUESDAY = "TUESDAY"
|
|
368
|
+
WEDNESDAY = "WEDNESDAY"
|
|
302
369
|
|
|
303
370
|
|
|
304
371
|
@dataclass
|
|
305
372
|
class DeletePipelineResponse:
|
|
306
|
-
|
|
307
373
|
def as_dict(self) -> dict:
|
|
308
374
|
"""Serializes the DeletePipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
309
375
|
body = {}
|
|
@@ -315,7 +381,7 @@ class DeletePipelineResponse:
|
|
|
315
381
|
return body
|
|
316
382
|
|
|
317
383
|
@classmethod
|
|
318
|
-
def from_dict(cls, d: Dict[str,
|
|
384
|
+
def from_dict(cls, d: Dict[str, Any]) -> DeletePipelineResponse:
|
|
319
385
|
"""Deserializes the DeletePipelineResponse from a dictionary."""
|
|
320
386
|
return cls()
|
|
321
387
|
|
|
@@ -324,7 +390,7 @@ class DeploymentKind(Enum):
|
|
|
324
390
|
"""The deployment method that manages the pipeline: - BUNDLE: The pipeline is managed by a
|
|
325
391
|
Databricks Asset Bundle."""
|
|
326
392
|
|
|
327
|
-
BUNDLE =
|
|
393
|
+
BUNDLE = "BUNDLE"
|
|
328
394
|
|
|
329
395
|
|
|
330
396
|
@dataclass
|
|
@@ -426,104 +492,157 @@ class EditPipeline:
|
|
|
426
492
|
def as_dict(self) -> dict:
|
|
427
493
|
"""Serializes the EditPipeline into a dictionary suitable for use as a JSON request body."""
|
|
428
494
|
body = {}
|
|
429
|
-
if self.allow_duplicate_names is not None:
|
|
430
|
-
|
|
431
|
-
if self.
|
|
432
|
-
|
|
433
|
-
if self.
|
|
434
|
-
|
|
435
|
-
if self.
|
|
436
|
-
|
|
437
|
-
if self.
|
|
438
|
-
|
|
495
|
+
if self.allow_duplicate_names is not None:
|
|
496
|
+
body["allow_duplicate_names"] = self.allow_duplicate_names
|
|
497
|
+
if self.budget_policy_id is not None:
|
|
498
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
499
|
+
if self.catalog is not None:
|
|
500
|
+
body["catalog"] = self.catalog
|
|
501
|
+
if self.channel is not None:
|
|
502
|
+
body["channel"] = self.channel
|
|
503
|
+
if self.clusters:
|
|
504
|
+
body["clusters"] = [v.as_dict() for v in self.clusters]
|
|
505
|
+
if self.configuration:
|
|
506
|
+
body["configuration"] = self.configuration
|
|
507
|
+
if self.continuous is not None:
|
|
508
|
+
body["continuous"] = self.continuous
|
|
509
|
+
if self.deployment:
|
|
510
|
+
body["deployment"] = self.deployment.as_dict()
|
|
511
|
+
if self.development is not None:
|
|
512
|
+
body["development"] = self.development
|
|
513
|
+
if self.edition is not None:
|
|
514
|
+
body["edition"] = self.edition
|
|
439
515
|
if self.expected_last_modified is not None:
|
|
440
|
-
body[
|
|
441
|
-
if self.filters:
|
|
442
|
-
|
|
443
|
-
if self.
|
|
444
|
-
|
|
445
|
-
if self.
|
|
446
|
-
|
|
447
|
-
if self.
|
|
448
|
-
|
|
449
|
-
if self.
|
|
450
|
-
|
|
451
|
-
if self.
|
|
452
|
-
|
|
453
|
-
if self.
|
|
454
|
-
|
|
455
|
-
if self.
|
|
456
|
-
|
|
516
|
+
body["expected_last_modified"] = self.expected_last_modified
|
|
517
|
+
if self.filters:
|
|
518
|
+
body["filters"] = self.filters.as_dict()
|
|
519
|
+
if self.gateway_definition:
|
|
520
|
+
body["gateway_definition"] = self.gateway_definition.as_dict()
|
|
521
|
+
if self.id is not None:
|
|
522
|
+
body["id"] = self.id
|
|
523
|
+
if self.ingestion_definition:
|
|
524
|
+
body["ingestion_definition"] = self.ingestion_definition.as_dict()
|
|
525
|
+
if self.libraries:
|
|
526
|
+
body["libraries"] = [v.as_dict() for v in self.libraries]
|
|
527
|
+
if self.name is not None:
|
|
528
|
+
body["name"] = self.name
|
|
529
|
+
if self.notifications:
|
|
530
|
+
body["notifications"] = [v.as_dict() for v in self.notifications]
|
|
531
|
+
if self.photon is not None:
|
|
532
|
+
body["photon"] = self.photon
|
|
533
|
+
if self.pipeline_id is not None:
|
|
534
|
+
body["pipeline_id"] = self.pipeline_id
|
|
535
|
+
if self.restart_window:
|
|
536
|
+
body["restart_window"] = self.restart_window.as_dict()
|
|
537
|
+
if self.run_as:
|
|
538
|
+
body["run_as"] = self.run_as.as_dict()
|
|
539
|
+
if self.schema is not None:
|
|
540
|
+
body["schema"] = self.schema
|
|
541
|
+
if self.serverless is not None:
|
|
542
|
+
body["serverless"] = self.serverless
|
|
543
|
+
if self.storage is not None:
|
|
544
|
+
body["storage"] = self.storage
|
|
545
|
+
if self.target is not None:
|
|
546
|
+
body["target"] = self.target
|
|
547
|
+
if self.trigger:
|
|
548
|
+
body["trigger"] = self.trigger.as_dict()
|
|
457
549
|
return body
|
|
458
550
|
|
|
459
551
|
def as_shallow_dict(self) -> dict:
|
|
460
552
|
"""Serializes the EditPipeline into a shallow dictionary of its immediate attributes."""
|
|
461
553
|
body = {}
|
|
462
|
-
if self.allow_duplicate_names is not None:
|
|
463
|
-
|
|
464
|
-
if self.
|
|
465
|
-
|
|
466
|
-
if self.
|
|
467
|
-
|
|
468
|
-
if self.
|
|
469
|
-
|
|
470
|
-
if self.
|
|
471
|
-
|
|
554
|
+
if self.allow_duplicate_names is not None:
|
|
555
|
+
body["allow_duplicate_names"] = self.allow_duplicate_names
|
|
556
|
+
if self.budget_policy_id is not None:
|
|
557
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
558
|
+
if self.catalog is not None:
|
|
559
|
+
body["catalog"] = self.catalog
|
|
560
|
+
if self.channel is not None:
|
|
561
|
+
body["channel"] = self.channel
|
|
562
|
+
if self.clusters:
|
|
563
|
+
body["clusters"] = self.clusters
|
|
564
|
+
if self.configuration:
|
|
565
|
+
body["configuration"] = self.configuration
|
|
566
|
+
if self.continuous is not None:
|
|
567
|
+
body["continuous"] = self.continuous
|
|
568
|
+
if self.deployment:
|
|
569
|
+
body["deployment"] = self.deployment
|
|
570
|
+
if self.development is not None:
|
|
571
|
+
body["development"] = self.development
|
|
572
|
+
if self.edition is not None:
|
|
573
|
+
body["edition"] = self.edition
|
|
472
574
|
if self.expected_last_modified is not None:
|
|
473
|
-
body[
|
|
474
|
-
if self.filters:
|
|
475
|
-
|
|
476
|
-
if self.
|
|
477
|
-
|
|
478
|
-
if self.
|
|
479
|
-
|
|
480
|
-
if self.
|
|
481
|
-
|
|
482
|
-
if self.
|
|
483
|
-
|
|
484
|
-
if self.
|
|
485
|
-
|
|
486
|
-
if self.
|
|
487
|
-
|
|
488
|
-
if self.
|
|
489
|
-
|
|
575
|
+
body["expected_last_modified"] = self.expected_last_modified
|
|
576
|
+
if self.filters:
|
|
577
|
+
body["filters"] = self.filters
|
|
578
|
+
if self.gateway_definition:
|
|
579
|
+
body["gateway_definition"] = self.gateway_definition
|
|
580
|
+
if self.id is not None:
|
|
581
|
+
body["id"] = self.id
|
|
582
|
+
if self.ingestion_definition:
|
|
583
|
+
body["ingestion_definition"] = self.ingestion_definition
|
|
584
|
+
if self.libraries:
|
|
585
|
+
body["libraries"] = self.libraries
|
|
586
|
+
if self.name is not None:
|
|
587
|
+
body["name"] = self.name
|
|
588
|
+
if self.notifications:
|
|
589
|
+
body["notifications"] = self.notifications
|
|
590
|
+
if self.photon is not None:
|
|
591
|
+
body["photon"] = self.photon
|
|
592
|
+
if self.pipeline_id is not None:
|
|
593
|
+
body["pipeline_id"] = self.pipeline_id
|
|
594
|
+
if self.restart_window:
|
|
595
|
+
body["restart_window"] = self.restart_window
|
|
596
|
+
if self.run_as:
|
|
597
|
+
body["run_as"] = self.run_as
|
|
598
|
+
if self.schema is not None:
|
|
599
|
+
body["schema"] = self.schema
|
|
600
|
+
if self.serverless is not None:
|
|
601
|
+
body["serverless"] = self.serverless
|
|
602
|
+
if self.storage is not None:
|
|
603
|
+
body["storage"] = self.storage
|
|
604
|
+
if self.target is not None:
|
|
605
|
+
body["target"] = self.target
|
|
606
|
+
if self.trigger:
|
|
607
|
+
body["trigger"] = self.trigger
|
|
490
608
|
return body
|
|
491
609
|
|
|
492
610
|
@classmethod
|
|
493
|
-
def from_dict(cls, d: Dict[str,
|
|
611
|
+
def from_dict(cls, d: Dict[str, Any]) -> EditPipeline:
|
|
494
612
|
"""Deserializes the EditPipeline from a dictionary."""
|
|
495
|
-
return cls(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
613
|
+
return cls(
|
|
614
|
+
allow_duplicate_names=d.get("allow_duplicate_names", None),
|
|
615
|
+
budget_policy_id=d.get("budget_policy_id", None),
|
|
616
|
+
catalog=d.get("catalog", None),
|
|
617
|
+
channel=d.get("channel", None),
|
|
618
|
+
clusters=_repeated_dict(d, "clusters", PipelineCluster),
|
|
619
|
+
configuration=d.get("configuration", None),
|
|
620
|
+
continuous=d.get("continuous", None),
|
|
621
|
+
deployment=_from_dict(d, "deployment", PipelineDeployment),
|
|
622
|
+
development=d.get("development", None),
|
|
623
|
+
edition=d.get("edition", None),
|
|
624
|
+
expected_last_modified=d.get("expected_last_modified", None),
|
|
625
|
+
filters=_from_dict(d, "filters", Filters),
|
|
626
|
+
gateway_definition=_from_dict(d, "gateway_definition", IngestionGatewayPipelineDefinition),
|
|
627
|
+
id=d.get("id", None),
|
|
628
|
+
ingestion_definition=_from_dict(d, "ingestion_definition", IngestionPipelineDefinition),
|
|
629
|
+
libraries=_repeated_dict(d, "libraries", PipelineLibrary),
|
|
630
|
+
name=d.get("name", None),
|
|
631
|
+
notifications=_repeated_dict(d, "notifications", Notifications),
|
|
632
|
+
photon=d.get("photon", None),
|
|
633
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
634
|
+
restart_window=_from_dict(d, "restart_window", RestartWindow),
|
|
635
|
+
run_as=_from_dict(d, "run_as", RunAs),
|
|
636
|
+
schema=d.get("schema", None),
|
|
637
|
+
serverless=d.get("serverless", None),
|
|
638
|
+
storage=d.get("storage", None),
|
|
639
|
+
target=d.get("target", None),
|
|
640
|
+
trigger=_from_dict(d, "trigger", PipelineTrigger),
|
|
641
|
+
)
|
|
522
642
|
|
|
523
643
|
|
|
524
644
|
@dataclass
|
|
525
645
|
class EditPipelineResponse:
|
|
526
|
-
|
|
527
646
|
def as_dict(self) -> dict:
|
|
528
647
|
"""Serializes the EditPipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
529
648
|
body = {}
|
|
@@ -535,7 +654,7 @@ class EditPipelineResponse:
|
|
|
535
654
|
return body
|
|
536
655
|
|
|
537
656
|
@classmethod
|
|
538
|
-
def from_dict(cls, d: Dict[str,
|
|
657
|
+
def from_dict(cls, d: Dict[str, Any]) -> EditPipelineResponse:
|
|
539
658
|
"""Deserializes the EditPipelineResponse from a dictionary."""
|
|
540
659
|
return cls()
|
|
541
660
|
|
|
@@ -551,31 +670,34 @@ class ErrorDetail:
|
|
|
551
670
|
def as_dict(self) -> dict:
|
|
552
671
|
"""Serializes the ErrorDetail into a dictionary suitable for use as a JSON request body."""
|
|
553
672
|
body = {}
|
|
554
|
-
if self.exceptions:
|
|
555
|
-
|
|
673
|
+
if self.exceptions:
|
|
674
|
+
body["exceptions"] = [v.as_dict() for v in self.exceptions]
|
|
675
|
+
if self.fatal is not None:
|
|
676
|
+
body["fatal"] = self.fatal
|
|
556
677
|
return body
|
|
557
678
|
|
|
558
679
|
def as_shallow_dict(self) -> dict:
|
|
559
680
|
"""Serializes the ErrorDetail into a shallow dictionary of its immediate attributes."""
|
|
560
681
|
body = {}
|
|
561
|
-
if self.exceptions:
|
|
562
|
-
|
|
682
|
+
if self.exceptions:
|
|
683
|
+
body["exceptions"] = self.exceptions
|
|
684
|
+
if self.fatal is not None:
|
|
685
|
+
body["fatal"] = self.fatal
|
|
563
686
|
return body
|
|
564
687
|
|
|
565
688
|
@classmethod
|
|
566
|
-
def from_dict(cls, d: Dict[str,
|
|
689
|
+
def from_dict(cls, d: Dict[str, Any]) -> ErrorDetail:
|
|
567
690
|
"""Deserializes the ErrorDetail from a dictionary."""
|
|
568
|
-
return cls(exceptions=_repeated_dict(d,
|
|
569
|
-
fatal=d.get('fatal', None))
|
|
691
|
+
return cls(exceptions=_repeated_dict(d, "exceptions", SerializedException), fatal=d.get("fatal", None))
|
|
570
692
|
|
|
571
693
|
|
|
572
694
|
class EventLevel(Enum):
|
|
573
695
|
"""The severity level of the event."""
|
|
574
696
|
|
|
575
|
-
ERROR =
|
|
576
|
-
INFO =
|
|
577
|
-
METRICS =
|
|
578
|
-
WARN =
|
|
697
|
+
ERROR = "ERROR"
|
|
698
|
+
INFO = "INFO"
|
|
699
|
+
METRICS = "METRICS"
|
|
700
|
+
WARN = "WARN"
|
|
579
701
|
|
|
580
702
|
|
|
581
703
|
@dataclass
|
|
@@ -586,19 +708,21 @@ class FileLibrary:
|
|
|
586
708
|
def as_dict(self) -> dict:
|
|
587
709
|
"""Serializes the FileLibrary into a dictionary suitable for use as a JSON request body."""
|
|
588
710
|
body = {}
|
|
589
|
-
if self.path is not None:
|
|
711
|
+
if self.path is not None:
|
|
712
|
+
body["path"] = self.path
|
|
590
713
|
return body
|
|
591
714
|
|
|
592
715
|
def as_shallow_dict(self) -> dict:
|
|
593
716
|
"""Serializes the FileLibrary into a shallow dictionary of its immediate attributes."""
|
|
594
717
|
body = {}
|
|
595
|
-
if self.path is not None:
|
|
718
|
+
if self.path is not None:
|
|
719
|
+
body["path"] = self.path
|
|
596
720
|
return body
|
|
597
721
|
|
|
598
722
|
@classmethod
|
|
599
|
-
def from_dict(cls, d: Dict[str,
|
|
723
|
+
def from_dict(cls, d: Dict[str, Any]) -> FileLibrary:
|
|
600
724
|
"""Deserializes the FileLibrary from a dictionary."""
|
|
601
|
-
return cls(path=d.get(
|
|
725
|
+
return cls(path=d.get("path", None))
|
|
602
726
|
|
|
603
727
|
|
|
604
728
|
@dataclass
|
|
@@ -612,21 +736,25 @@ class Filters:
|
|
|
612
736
|
def as_dict(self) -> dict:
|
|
613
737
|
"""Serializes the Filters into a dictionary suitable for use as a JSON request body."""
|
|
614
738
|
body = {}
|
|
615
|
-
if self.exclude:
|
|
616
|
-
|
|
739
|
+
if self.exclude:
|
|
740
|
+
body["exclude"] = [v for v in self.exclude]
|
|
741
|
+
if self.include:
|
|
742
|
+
body["include"] = [v for v in self.include]
|
|
617
743
|
return body
|
|
618
744
|
|
|
619
745
|
def as_shallow_dict(self) -> dict:
|
|
620
746
|
"""Serializes the Filters into a shallow dictionary of its immediate attributes."""
|
|
621
747
|
body = {}
|
|
622
|
-
if self.exclude:
|
|
623
|
-
|
|
748
|
+
if self.exclude:
|
|
749
|
+
body["exclude"] = self.exclude
|
|
750
|
+
if self.include:
|
|
751
|
+
body["include"] = self.include
|
|
624
752
|
return body
|
|
625
753
|
|
|
626
754
|
@classmethod
|
|
627
|
-
def from_dict(cls, d: Dict[str,
|
|
755
|
+
def from_dict(cls, d: Dict[str, Any]) -> Filters:
|
|
628
756
|
"""Deserializes the Filters from a dictionary."""
|
|
629
|
-
return cls(exclude=d.get(
|
|
757
|
+
return cls(exclude=d.get("exclude", None), include=d.get("include", None))
|
|
630
758
|
|
|
631
759
|
|
|
632
760
|
@dataclass
|
|
@@ -637,19 +765,21 @@ class GetPipelinePermissionLevelsResponse:
|
|
|
637
765
|
def as_dict(self) -> dict:
|
|
638
766
|
"""Serializes the GetPipelinePermissionLevelsResponse into a dictionary suitable for use as a JSON request body."""
|
|
639
767
|
body = {}
|
|
640
|
-
if self.permission_levels:
|
|
768
|
+
if self.permission_levels:
|
|
769
|
+
body["permission_levels"] = [v.as_dict() for v in self.permission_levels]
|
|
641
770
|
return body
|
|
642
771
|
|
|
643
772
|
def as_shallow_dict(self) -> dict:
|
|
644
773
|
"""Serializes the GetPipelinePermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
|
|
645
774
|
body = {}
|
|
646
|
-
if self.permission_levels:
|
|
775
|
+
if self.permission_levels:
|
|
776
|
+
body["permission_levels"] = self.permission_levels
|
|
647
777
|
return body
|
|
648
778
|
|
|
649
779
|
@classmethod
|
|
650
|
-
def from_dict(cls, d: Dict[str,
|
|
780
|
+
def from_dict(cls, d: Dict[str, Any]) -> GetPipelinePermissionLevelsResponse:
|
|
651
781
|
"""Deserializes the GetPipelinePermissionLevelsResponse from a dictionary."""
|
|
652
|
-
return cls(permission_levels=_repeated_dict(d,
|
|
782
|
+
return cls(permission_levels=_repeated_dict(d, "permission_levels", PipelinePermissionsDescription))
|
|
653
783
|
|
|
654
784
|
|
|
655
785
|
@dataclass
|
|
@@ -693,61 +823,85 @@ class GetPipelineResponse:
|
|
|
693
823
|
def as_dict(self) -> dict:
|
|
694
824
|
"""Serializes the GetPipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
695
825
|
body = {}
|
|
696
|
-
if self.cause is not None:
|
|
697
|
-
|
|
698
|
-
if self.
|
|
826
|
+
if self.cause is not None:
|
|
827
|
+
body["cause"] = self.cause
|
|
828
|
+
if self.cluster_id is not None:
|
|
829
|
+
body["cluster_id"] = self.cluster_id
|
|
830
|
+
if self.creator_user_name is not None:
|
|
831
|
+
body["creator_user_name"] = self.creator_user_name
|
|
699
832
|
if self.effective_budget_policy_id is not None:
|
|
700
|
-
body[
|
|
701
|
-
if self.health is not None:
|
|
702
|
-
|
|
703
|
-
if self.
|
|
704
|
-
|
|
705
|
-
if self.
|
|
706
|
-
|
|
707
|
-
if self.
|
|
708
|
-
|
|
833
|
+
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
834
|
+
if self.health is not None:
|
|
835
|
+
body["health"] = self.health.value
|
|
836
|
+
if self.last_modified is not None:
|
|
837
|
+
body["last_modified"] = self.last_modified
|
|
838
|
+
if self.latest_updates:
|
|
839
|
+
body["latest_updates"] = [v.as_dict() for v in self.latest_updates]
|
|
840
|
+
if self.name is not None:
|
|
841
|
+
body["name"] = self.name
|
|
842
|
+
if self.pipeline_id is not None:
|
|
843
|
+
body["pipeline_id"] = self.pipeline_id
|
|
844
|
+
if self.run_as_user_name is not None:
|
|
845
|
+
body["run_as_user_name"] = self.run_as_user_name
|
|
846
|
+
if self.spec:
|
|
847
|
+
body["spec"] = self.spec.as_dict()
|
|
848
|
+
if self.state is not None:
|
|
849
|
+
body["state"] = self.state.value
|
|
709
850
|
return body
|
|
710
851
|
|
|
711
852
|
def as_shallow_dict(self) -> dict:
|
|
712
853
|
"""Serializes the GetPipelineResponse into a shallow dictionary of its immediate attributes."""
|
|
713
854
|
body = {}
|
|
714
|
-
if self.cause is not None:
|
|
715
|
-
|
|
716
|
-
if self.
|
|
855
|
+
if self.cause is not None:
|
|
856
|
+
body["cause"] = self.cause
|
|
857
|
+
if self.cluster_id is not None:
|
|
858
|
+
body["cluster_id"] = self.cluster_id
|
|
859
|
+
if self.creator_user_name is not None:
|
|
860
|
+
body["creator_user_name"] = self.creator_user_name
|
|
717
861
|
if self.effective_budget_policy_id is not None:
|
|
718
|
-
body[
|
|
719
|
-
if self.health is not None:
|
|
720
|
-
|
|
721
|
-
if self.
|
|
722
|
-
|
|
723
|
-
if self.
|
|
724
|
-
|
|
725
|
-
if self.
|
|
726
|
-
|
|
862
|
+
body["effective_budget_policy_id"] = self.effective_budget_policy_id
|
|
863
|
+
if self.health is not None:
|
|
864
|
+
body["health"] = self.health
|
|
865
|
+
if self.last_modified is not None:
|
|
866
|
+
body["last_modified"] = self.last_modified
|
|
867
|
+
if self.latest_updates:
|
|
868
|
+
body["latest_updates"] = self.latest_updates
|
|
869
|
+
if self.name is not None:
|
|
870
|
+
body["name"] = self.name
|
|
871
|
+
if self.pipeline_id is not None:
|
|
872
|
+
body["pipeline_id"] = self.pipeline_id
|
|
873
|
+
if self.run_as_user_name is not None:
|
|
874
|
+
body["run_as_user_name"] = self.run_as_user_name
|
|
875
|
+
if self.spec:
|
|
876
|
+
body["spec"] = self.spec
|
|
877
|
+
if self.state is not None:
|
|
878
|
+
body["state"] = self.state
|
|
727
879
|
return body
|
|
728
880
|
|
|
729
881
|
@classmethod
|
|
730
|
-
def from_dict(cls, d: Dict[str,
|
|
882
|
+
def from_dict(cls, d: Dict[str, Any]) -> GetPipelineResponse:
|
|
731
883
|
"""Deserializes the GetPipelineResponse from a dictionary."""
|
|
732
|
-
return cls(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
884
|
+
return cls(
|
|
885
|
+
cause=d.get("cause", None),
|
|
886
|
+
cluster_id=d.get("cluster_id", None),
|
|
887
|
+
creator_user_name=d.get("creator_user_name", None),
|
|
888
|
+
effective_budget_policy_id=d.get("effective_budget_policy_id", None),
|
|
889
|
+
health=_enum(d, "health", GetPipelineResponseHealth),
|
|
890
|
+
last_modified=d.get("last_modified", None),
|
|
891
|
+
latest_updates=_repeated_dict(d, "latest_updates", UpdateStateInfo),
|
|
892
|
+
name=d.get("name", None),
|
|
893
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
894
|
+
run_as_user_name=d.get("run_as_user_name", None),
|
|
895
|
+
spec=_from_dict(d, "spec", PipelineSpec),
|
|
896
|
+
state=_enum(d, "state", PipelineState),
|
|
897
|
+
)
|
|
744
898
|
|
|
745
899
|
|
|
746
900
|
class GetPipelineResponseHealth(Enum):
|
|
747
901
|
"""The health of a pipeline."""
|
|
748
902
|
|
|
749
|
-
HEALTHY =
|
|
750
|
-
UNHEALTHY =
|
|
903
|
+
HEALTHY = "HEALTHY"
|
|
904
|
+
UNHEALTHY = "UNHEALTHY"
|
|
751
905
|
|
|
752
906
|
|
|
753
907
|
@dataclass
|
|
@@ -758,19 +912,21 @@ class GetUpdateResponse:
|
|
|
758
912
|
def as_dict(self) -> dict:
|
|
759
913
|
"""Serializes the GetUpdateResponse into a dictionary suitable for use as a JSON request body."""
|
|
760
914
|
body = {}
|
|
761
|
-
if self.update:
|
|
915
|
+
if self.update:
|
|
916
|
+
body["update"] = self.update.as_dict()
|
|
762
917
|
return body
|
|
763
918
|
|
|
764
919
|
def as_shallow_dict(self) -> dict:
|
|
765
920
|
"""Serializes the GetUpdateResponse into a shallow dictionary of its immediate attributes."""
|
|
766
921
|
body = {}
|
|
767
|
-
if self.update:
|
|
922
|
+
if self.update:
|
|
923
|
+
body["update"] = self.update
|
|
768
924
|
return body
|
|
769
925
|
|
|
770
926
|
@classmethod
|
|
771
|
-
def from_dict(cls, d: Dict[str,
|
|
927
|
+
def from_dict(cls, d: Dict[str, Any]) -> GetUpdateResponse:
|
|
772
928
|
"""Deserializes the GetUpdateResponse from a dictionary."""
|
|
773
|
-
return cls(update=_from_dict(d,
|
|
929
|
+
return cls(update=_from_dict(d, "update", UpdateInfo))
|
|
774
930
|
|
|
775
931
|
|
|
776
932
|
@dataclass
|
|
@@ -787,25 +943,33 @@ class IngestionConfig:
|
|
|
787
943
|
def as_dict(self) -> dict:
|
|
788
944
|
"""Serializes the IngestionConfig into a dictionary suitable for use as a JSON request body."""
|
|
789
945
|
body = {}
|
|
790
|
-
if self.report:
|
|
791
|
-
|
|
792
|
-
if self.
|
|
946
|
+
if self.report:
|
|
947
|
+
body["report"] = self.report.as_dict()
|
|
948
|
+
if self.schema:
|
|
949
|
+
body["schema"] = self.schema.as_dict()
|
|
950
|
+
if self.table:
|
|
951
|
+
body["table"] = self.table.as_dict()
|
|
793
952
|
return body
|
|
794
953
|
|
|
795
954
|
def as_shallow_dict(self) -> dict:
|
|
796
955
|
"""Serializes the IngestionConfig into a shallow dictionary of its immediate attributes."""
|
|
797
956
|
body = {}
|
|
798
|
-
if self.report:
|
|
799
|
-
|
|
800
|
-
if self.
|
|
957
|
+
if self.report:
|
|
958
|
+
body["report"] = self.report
|
|
959
|
+
if self.schema:
|
|
960
|
+
body["schema"] = self.schema
|
|
961
|
+
if self.table:
|
|
962
|
+
body["table"] = self.table
|
|
801
963
|
return body
|
|
802
964
|
|
|
803
965
|
@classmethod
|
|
804
|
-
def from_dict(cls, d: Dict[str,
|
|
966
|
+
def from_dict(cls, d: Dict[str, Any]) -> IngestionConfig:
|
|
805
967
|
"""Deserializes the IngestionConfig from a dictionary."""
|
|
806
|
-
return cls(
|
|
807
|
-
|
|
808
|
-
|
|
968
|
+
return cls(
|
|
969
|
+
report=_from_dict(d, "report", ReportSpec),
|
|
970
|
+
schema=_from_dict(d, "schema", SchemaSpec),
|
|
971
|
+
table=_from_dict(d, "table", TableSpec),
|
|
972
|
+
)
|
|
809
973
|
|
|
810
974
|
|
|
811
975
|
@dataclass
|
|
@@ -832,35 +996,43 @@ class IngestionGatewayPipelineDefinition:
|
|
|
832
996
|
def as_dict(self) -> dict:
|
|
833
997
|
"""Serializes the IngestionGatewayPipelineDefinition into a dictionary suitable for use as a JSON request body."""
|
|
834
998
|
body = {}
|
|
835
|
-
if self.connection_id is not None:
|
|
836
|
-
|
|
999
|
+
if self.connection_id is not None:
|
|
1000
|
+
body["connection_id"] = self.connection_id
|
|
1001
|
+
if self.connection_name is not None:
|
|
1002
|
+
body["connection_name"] = self.connection_name
|
|
837
1003
|
if self.gateway_storage_catalog is not None:
|
|
838
|
-
body[
|
|
839
|
-
if self.gateway_storage_name is not None:
|
|
1004
|
+
body["gateway_storage_catalog"] = self.gateway_storage_catalog
|
|
1005
|
+
if self.gateway_storage_name is not None:
|
|
1006
|
+
body["gateway_storage_name"] = self.gateway_storage_name
|
|
840
1007
|
if self.gateway_storage_schema is not None:
|
|
841
|
-
body[
|
|
1008
|
+
body["gateway_storage_schema"] = self.gateway_storage_schema
|
|
842
1009
|
return body
|
|
843
1010
|
|
|
844
1011
|
def as_shallow_dict(self) -> dict:
|
|
845
1012
|
"""Serializes the IngestionGatewayPipelineDefinition into a shallow dictionary of its immediate attributes."""
|
|
846
1013
|
body = {}
|
|
847
|
-
if self.connection_id is not None:
|
|
848
|
-
|
|
1014
|
+
if self.connection_id is not None:
|
|
1015
|
+
body["connection_id"] = self.connection_id
|
|
1016
|
+
if self.connection_name is not None:
|
|
1017
|
+
body["connection_name"] = self.connection_name
|
|
849
1018
|
if self.gateway_storage_catalog is not None:
|
|
850
|
-
body[
|
|
851
|
-
if self.gateway_storage_name is not None:
|
|
1019
|
+
body["gateway_storage_catalog"] = self.gateway_storage_catalog
|
|
1020
|
+
if self.gateway_storage_name is not None:
|
|
1021
|
+
body["gateway_storage_name"] = self.gateway_storage_name
|
|
852
1022
|
if self.gateway_storage_schema is not None:
|
|
853
|
-
body[
|
|
1023
|
+
body["gateway_storage_schema"] = self.gateway_storage_schema
|
|
854
1024
|
return body
|
|
855
1025
|
|
|
856
1026
|
@classmethod
|
|
857
|
-
def from_dict(cls, d: Dict[str,
|
|
1027
|
+
def from_dict(cls, d: Dict[str, Any]) -> IngestionGatewayPipelineDefinition:
|
|
858
1028
|
"""Deserializes the IngestionGatewayPipelineDefinition from a dictionary."""
|
|
859
|
-
return cls(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
1029
|
+
return cls(
|
|
1030
|
+
connection_id=d.get("connection_id", None),
|
|
1031
|
+
connection_name=d.get("connection_name", None),
|
|
1032
|
+
gateway_storage_catalog=d.get("gateway_storage_catalog", None),
|
|
1033
|
+
gateway_storage_name=d.get("gateway_storage_name", None),
|
|
1034
|
+
gateway_storage_schema=d.get("gateway_storage_schema", None),
|
|
1035
|
+
)
|
|
864
1036
|
|
|
865
1037
|
|
|
866
1038
|
@dataclass
|
|
@@ -883,28 +1055,38 @@ class IngestionPipelineDefinition:
|
|
|
883
1055
|
def as_dict(self) -> dict:
|
|
884
1056
|
"""Serializes the IngestionPipelineDefinition into a dictionary suitable for use as a JSON request body."""
|
|
885
1057
|
body = {}
|
|
886
|
-
if self.connection_name is not None:
|
|
887
|
-
|
|
888
|
-
if self.
|
|
889
|
-
|
|
1058
|
+
if self.connection_name is not None:
|
|
1059
|
+
body["connection_name"] = self.connection_name
|
|
1060
|
+
if self.ingestion_gateway_id is not None:
|
|
1061
|
+
body["ingestion_gateway_id"] = self.ingestion_gateway_id
|
|
1062
|
+
if self.objects:
|
|
1063
|
+
body["objects"] = [v.as_dict() for v in self.objects]
|
|
1064
|
+
if self.table_configuration:
|
|
1065
|
+
body["table_configuration"] = self.table_configuration.as_dict()
|
|
890
1066
|
return body
|
|
891
1067
|
|
|
892
1068
|
def as_shallow_dict(self) -> dict:
|
|
893
1069
|
"""Serializes the IngestionPipelineDefinition into a shallow dictionary of its immediate attributes."""
|
|
894
1070
|
body = {}
|
|
895
|
-
if self.connection_name is not None:
|
|
896
|
-
|
|
897
|
-
if self.
|
|
898
|
-
|
|
1071
|
+
if self.connection_name is not None:
|
|
1072
|
+
body["connection_name"] = self.connection_name
|
|
1073
|
+
if self.ingestion_gateway_id is not None:
|
|
1074
|
+
body["ingestion_gateway_id"] = self.ingestion_gateway_id
|
|
1075
|
+
if self.objects:
|
|
1076
|
+
body["objects"] = self.objects
|
|
1077
|
+
if self.table_configuration:
|
|
1078
|
+
body["table_configuration"] = self.table_configuration
|
|
899
1079
|
return body
|
|
900
1080
|
|
|
901
1081
|
@classmethod
|
|
902
|
-
def from_dict(cls, d: Dict[str,
|
|
1082
|
+
def from_dict(cls, d: Dict[str, Any]) -> IngestionPipelineDefinition:
|
|
903
1083
|
"""Deserializes the IngestionPipelineDefinition from a dictionary."""
|
|
904
|
-
return cls(
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1084
|
+
return cls(
|
|
1085
|
+
connection_name=d.get("connection_name", None),
|
|
1086
|
+
ingestion_gateway_id=d.get("ingestion_gateway_id", None),
|
|
1087
|
+
objects=_repeated_dict(d, "objects", IngestionConfig),
|
|
1088
|
+
table_configuration=_from_dict(d, "table_configuration", TableSpecificConfig),
|
|
1089
|
+
)
|
|
908
1090
|
|
|
909
1091
|
|
|
910
1092
|
@dataclass
|
|
@@ -921,25 +1103,33 @@ class ListPipelineEventsResponse:
|
|
|
921
1103
|
def as_dict(self) -> dict:
|
|
922
1104
|
"""Serializes the ListPipelineEventsResponse into a dictionary suitable for use as a JSON request body."""
|
|
923
1105
|
body = {}
|
|
924
|
-
if self.events:
|
|
925
|
-
|
|
926
|
-
if self.
|
|
1106
|
+
if self.events:
|
|
1107
|
+
body["events"] = [v.as_dict() for v in self.events]
|
|
1108
|
+
if self.next_page_token is not None:
|
|
1109
|
+
body["next_page_token"] = self.next_page_token
|
|
1110
|
+
if self.prev_page_token is not None:
|
|
1111
|
+
body["prev_page_token"] = self.prev_page_token
|
|
927
1112
|
return body
|
|
928
1113
|
|
|
929
1114
|
def as_shallow_dict(self) -> dict:
|
|
930
1115
|
"""Serializes the ListPipelineEventsResponse into a shallow dictionary of its immediate attributes."""
|
|
931
1116
|
body = {}
|
|
932
|
-
if self.events:
|
|
933
|
-
|
|
934
|
-
if self.
|
|
1117
|
+
if self.events:
|
|
1118
|
+
body["events"] = self.events
|
|
1119
|
+
if self.next_page_token is not None:
|
|
1120
|
+
body["next_page_token"] = self.next_page_token
|
|
1121
|
+
if self.prev_page_token is not None:
|
|
1122
|
+
body["prev_page_token"] = self.prev_page_token
|
|
935
1123
|
return body
|
|
936
1124
|
|
|
937
1125
|
@classmethod
|
|
938
|
-
def from_dict(cls, d: Dict[str,
|
|
1126
|
+
def from_dict(cls, d: Dict[str, Any]) -> ListPipelineEventsResponse:
|
|
939
1127
|
"""Deserializes the ListPipelineEventsResponse from a dictionary."""
|
|
940
|
-
return cls(
|
|
941
|
-
|
|
942
|
-
|
|
1128
|
+
return cls(
|
|
1129
|
+
events=_repeated_dict(d, "events", PipelineEvent),
|
|
1130
|
+
next_page_token=d.get("next_page_token", None),
|
|
1131
|
+
prev_page_token=d.get("prev_page_token", None),
|
|
1132
|
+
)
|
|
943
1133
|
|
|
944
1134
|
|
|
945
1135
|
@dataclass
|
|
@@ -953,22 +1143,27 @@ class ListPipelinesResponse:
|
|
|
953
1143
|
def as_dict(self) -> dict:
|
|
954
1144
|
"""Serializes the ListPipelinesResponse into a dictionary suitable for use as a JSON request body."""
|
|
955
1145
|
body = {}
|
|
956
|
-
if self.next_page_token is not None:
|
|
957
|
-
|
|
1146
|
+
if self.next_page_token is not None:
|
|
1147
|
+
body["next_page_token"] = self.next_page_token
|
|
1148
|
+
if self.statuses:
|
|
1149
|
+
body["statuses"] = [v.as_dict() for v in self.statuses]
|
|
958
1150
|
return body
|
|
959
1151
|
|
|
960
1152
|
def as_shallow_dict(self) -> dict:
|
|
961
1153
|
"""Serializes the ListPipelinesResponse into a shallow dictionary of its immediate attributes."""
|
|
962
1154
|
body = {}
|
|
963
|
-
if self.next_page_token is not None:
|
|
964
|
-
|
|
1155
|
+
if self.next_page_token is not None:
|
|
1156
|
+
body["next_page_token"] = self.next_page_token
|
|
1157
|
+
if self.statuses:
|
|
1158
|
+
body["statuses"] = self.statuses
|
|
965
1159
|
return body
|
|
966
1160
|
|
|
967
1161
|
@classmethod
|
|
968
|
-
def from_dict(cls, d: Dict[str,
|
|
1162
|
+
def from_dict(cls, d: Dict[str, Any]) -> ListPipelinesResponse:
|
|
969
1163
|
"""Deserializes the ListPipelinesResponse from a dictionary."""
|
|
970
|
-
return cls(
|
|
971
|
-
|
|
1164
|
+
return cls(
|
|
1165
|
+
next_page_token=d.get("next_page_token", None), statuses=_repeated_dict(d, "statuses", PipelineStateInfo)
|
|
1166
|
+
)
|
|
972
1167
|
|
|
973
1168
|
|
|
974
1169
|
@dataclass
|
|
@@ -985,30 +1180,37 @@ class ListUpdatesResponse:
|
|
|
985
1180
|
def as_dict(self) -> dict:
|
|
986
1181
|
"""Serializes the ListUpdatesResponse into a dictionary suitable for use as a JSON request body."""
|
|
987
1182
|
body = {}
|
|
988
|
-
if self.next_page_token is not None:
|
|
989
|
-
|
|
990
|
-
if self.
|
|
1183
|
+
if self.next_page_token is not None:
|
|
1184
|
+
body["next_page_token"] = self.next_page_token
|
|
1185
|
+
if self.prev_page_token is not None:
|
|
1186
|
+
body["prev_page_token"] = self.prev_page_token
|
|
1187
|
+
if self.updates:
|
|
1188
|
+
body["updates"] = [v.as_dict() for v in self.updates]
|
|
991
1189
|
return body
|
|
992
1190
|
|
|
993
1191
|
def as_shallow_dict(self) -> dict:
|
|
994
1192
|
"""Serializes the ListUpdatesResponse into a shallow dictionary of its immediate attributes."""
|
|
995
1193
|
body = {}
|
|
996
|
-
if self.next_page_token is not None:
|
|
997
|
-
|
|
998
|
-
if self.
|
|
1194
|
+
if self.next_page_token is not None:
|
|
1195
|
+
body["next_page_token"] = self.next_page_token
|
|
1196
|
+
if self.prev_page_token is not None:
|
|
1197
|
+
body["prev_page_token"] = self.prev_page_token
|
|
1198
|
+
if self.updates:
|
|
1199
|
+
body["updates"] = self.updates
|
|
999
1200
|
return body
|
|
1000
1201
|
|
|
1001
1202
|
@classmethod
|
|
1002
|
-
def from_dict(cls, d: Dict[str,
|
|
1203
|
+
def from_dict(cls, d: Dict[str, Any]) -> ListUpdatesResponse:
|
|
1003
1204
|
"""Deserializes the ListUpdatesResponse from a dictionary."""
|
|
1004
|
-
return cls(
|
|
1005
|
-
|
|
1006
|
-
|
|
1205
|
+
return cls(
|
|
1206
|
+
next_page_token=d.get("next_page_token", None),
|
|
1207
|
+
prev_page_token=d.get("prev_page_token", None),
|
|
1208
|
+
updates=_repeated_dict(d, "updates", UpdateInfo),
|
|
1209
|
+
)
|
|
1007
1210
|
|
|
1008
1211
|
|
|
1009
1212
|
@dataclass
|
|
1010
1213
|
class ManualTrigger:
|
|
1011
|
-
|
|
1012
1214
|
def as_dict(self) -> dict:
|
|
1013
1215
|
"""Serializes the ManualTrigger into a dictionary suitable for use as a JSON request body."""
|
|
1014
1216
|
body = {}
|
|
@@ -1020,7 +1222,7 @@ class ManualTrigger:
|
|
|
1020
1222
|
return body
|
|
1021
1223
|
|
|
1022
1224
|
@classmethod
|
|
1023
|
-
def from_dict(cls, d: Dict[str,
|
|
1225
|
+
def from_dict(cls, d: Dict[str, Any]) -> ManualTrigger:
|
|
1024
1226
|
"""Deserializes the ManualTrigger from a dictionary."""
|
|
1025
1227
|
return cls()
|
|
1026
1228
|
|
|
@@ -1028,9 +1230,9 @@ class ManualTrigger:
|
|
|
1028
1230
|
class MaturityLevel(Enum):
|
|
1029
1231
|
"""Maturity level for EventDetails."""
|
|
1030
1232
|
|
|
1031
|
-
DEPRECATED =
|
|
1032
|
-
EVOLVING =
|
|
1033
|
-
STABLE =
|
|
1233
|
+
DEPRECATED = "DEPRECATED"
|
|
1234
|
+
EVOLVING = "EVOLVING"
|
|
1235
|
+
STABLE = "STABLE"
|
|
1034
1236
|
|
|
1035
1237
|
|
|
1036
1238
|
@dataclass
|
|
@@ -1041,19 +1243,21 @@ class NotebookLibrary:
|
|
|
1041
1243
|
def as_dict(self) -> dict:
|
|
1042
1244
|
"""Serializes the NotebookLibrary into a dictionary suitable for use as a JSON request body."""
|
|
1043
1245
|
body = {}
|
|
1044
|
-
if self.path is not None:
|
|
1246
|
+
if self.path is not None:
|
|
1247
|
+
body["path"] = self.path
|
|
1045
1248
|
return body
|
|
1046
1249
|
|
|
1047
1250
|
def as_shallow_dict(self) -> dict:
|
|
1048
1251
|
"""Serializes the NotebookLibrary into a shallow dictionary of its immediate attributes."""
|
|
1049
1252
|
body = {}
|
|
1050
|
-
if self.path is not None:
|
|
1253
|
+
if self.path is not None:
|
|
1254
|
+
body["path"] = self.path
|
|
1051
1255
|
return body
|
|
1052
1256
|
|
|
1053
1257
|
@classmethod
|
|
1054
|
-
def from_dict(cls, d: Dict[str,
|
|
1258
|
+
def from_dict(cls, d: Dict[str, Any]) -> NotebookLibrary:
|
|
1055
1259
|
"""Deserializes the NotebookLibrary from a dictionary."""
|
|
1056
|
-
return cls(path=d.get(
|
|
1260
|
+
return cls(path=d.get("path", None))
|
|
1057
1261
|
|
|
1058
1262
|
|
|
1059
1263
|
@dataclass
|
|
@@ -1072,21 +1276,25 @@ class Notifications:
|
|
|
1072
1276
|
def as_dict(self) -> dict:
|
|
1073
1277
|
"""Serializes the Notifications into a dictionary suitable for use as a JSON request body."""
|
|
1074
1278
|
body = {}
|
|
1075
|
-
if self.alerts:
|
|
1076
|
-
|
|
1279
|
+
if self.alerts:
|
|
1280
|
+
body["alerts"] = [v for v in self.alerts]
|
|
1281
|
+
if self.email_recipients:
|
|
1282
|
+
body["email_recipients"] = [v for v in self.email_recipients]
|
|
1077
1283
|
return body
|
|
1078
1284
|
|
|
1079
1285
|
def as_shallow_dict(self) -> dict:
|
|
1080
1286
|
"""Serializes the Notifications into a shallow dictionary of its immediate attributes."""
|
|
1081
1287
|
body = {}
|
|
1082
|
-
if self.alerts:
|
|
1083
|
-
|
|
1288
|
+
if self.alerts:
|
|
1289
|
+
body["alerts"] = self.alerts
|
|
1290
|
+
if self.email_recipients:
|
|
1291
|
+
body["email_recipients"] = self.email_recipients
|
|
1084
1292
|
return body
|
|
1085
1293
|
|
|
1086
1294
|
@classmethod
|
|
1087
|
-
def from_dict(cls, d: Dict[str,
|
|
1295
|
+
def from_dict(cls, d: Dict[str, Any]) -> Notifications:
|
|
1088
1296
|
"""Deserializes the Notifications from a dictionary."""
|
|
1089
|
-
return cls(alerts=d.get(
|
|
1297
|
+
return cls(alerts=d.get("alerts", None), email_recipients=d.get("email_recipients", None))
|
|
1090
1298
|
|
|
1091
1299
|
|
|
1092
1300
|
@dataclass
|
|
@@ -1146,67 +1354,103 @@ class Origin:
|
|
|
1146
1354
|
def as_dict(self) -> dict:
|
|
1147
1355
|
"""Serializes the Origin into a dictionary suitable for use as a JSON request body."""
|
|
1148
1356
|
body = {}
|
|
1149
|
-
if self.batch_id is not None:
|
|
1150
|
-
|
|
1151
|
-
if self.
|
|
1152
|
-
|
|
1153
|
-
if self.
|
|
1154
|
-
|
|
1155
|
-
if self.
|
|
1156
|
-
|
|
1157
|
-
if self.
|
|
1158
|
-
|
|
1159
|
-
if self.
|
|
1160
|
-
|
|
1161
|
-
if self.
|
|
1162
|
-
|
|
1163
|
-
if self.
|
|
1164
|
-
|
|
1165
|
-
if self.
|
|
1357
|
+
if self.batch_id is not None:
|
|
1358
|
+
body["batch_id"] = self.batch_id
|
|
1359
|
+
if self.cloud is not None:
|
|
1360
|
+
body["cloud"] = self.cloud
|
|
1361
|
+
if self.cluster_id is not None:
|
|
1362
|
+
body["cluster_id"] = self.cluster_id
|
|
1363
|
+
if self.dataset_name is not None:
|
|
1364
|
+
body["dataset_name"] = self.dataset_name
|
|
1365
|
+
if self.flow_id is not None:
|
|
1366
|
+
body["flow_id"] = self.flow_id
|
|
1367
|
+
if self.flow_name is not None:
|
|
1368
|
+
body["flow_name"] = self.flow_name
|
|
1369
|
+
if self.host is not None:
|
|
1370
|
+
body["host"] = self.host
|
|
1371
|
+
if self.maintenance_id is not None:
|
|
1372
|
+
body["maintenance_id"] = self.maintenance_id
|
|
1373
|
+
if self.materialization_name is not None:
|
|
1374
|
+
body["materialization_name"] = self.materialization_name
|
|
1375
|
+
if self.org_id is not None:
|
|
1376
|
+
body["org_id"] = self.org_id
|
|
1377
|
+
if self.pipeline_id is not None:
|
|
1378
|
+
body["pipeline_id"] = self.pipeline_id
|
|
1379
|
+
if self.pipeline_name is not None:
|
|
1380
|
+
body["pipeline_name"] = self.pipeline_name
|
|
1381
|
+
if self.region is not None:
|
|
1382
|
+
body["region"] = self.region
|
|
1383
|
+
if self.request_id is not None:
|
|
1384
|
+
body["request_id"] = self.request_id
|
|
1385
|
+
if self.table_id is not None:
|
|
1386
|
+
body["table_id"] = self.table_id
|
|
1387
|
+
if self.uc_resource_id is not None:
|
|
1388
|
+
body["uc_resource_id"] = self.uc_resource_id
|
|
1389
|
+
if self.update_id is not None:
|
|
1390
|
+
body["update_id"] = self.update_id
|
|
1166
1391
|
return body
|
|
1167
1392
|
|
|
1168
1393
|
def as_shallow_dict(self) -> dict:
|
|
1169
1394
|
"""Serializes the Origin into a shallow dictionary of its immediate attributes."""
|
|
1170
1395
|
body = {}
|
|
1171
|
-
if self.batch_id is not None:
|
|
1172
|
-
|
|
1173
|
-
if self.
|
|
1174
|
-
|
|
1175
|
-
if self.
|
|
1176
|
-
|
|
1177
|
-
if self.
|
|
1178
|
-
|
|
1179
|
-
if self.
|
|
1180
|
-
|
|
1181
|
-
if self.
|
|
1182
|
-
|
|
1183
|
-
if self.
|
|
1184
|
-
|
|
1185
|
-
if self.
|
|
1186
|
-
|
|
1187
|
-
if self.
|
|
1396
|
+
if self.batch_id is not None:
|
|
1397
|
+
body["batch_id"] = self.batch_id
|
|
1398
|
+
if self.cloud is not None:
|
|
1399
|
+
body["cloud"] = self.cloud
|
|
1400
|
+
if self.cluster_id is not None:
|
|
1401
|
+
body["cluster_id"] = self.cluster_id
|
|
1402
|
+
if self.dataset_name is not None:
|
|
1403
|
+
body["dataset_name"] = self.dataset_name
|
|
1404
|
+
if self.flow_id is not None:
|
|
1405
|
+
body["flow_id"] = self.flow_id
|
|
1406
|
+
if self.flow_name is not None:
|
|
1407
|
+
body["flow_name"] = self.flow_name
|
|
1408
|
+
if self.host is not None:
|
|
1409
|
+
body["host"] = self.host
|
|
1410
|
+
if self.maintenance_id is not None:
|
|
1411
|
+
body["maintenance_id"] = self.maintenance_id
|
|
1412
|
+
if self.materialization_name is not None:
|
|
1413
|
+
body["materialization_name"] = self.materialization_name
|
|
1414
|
+
if self.org_id is not None:
|
|
1415
|
+
body["org_id"] = self.org_id
|
|
1416
|
+
if self.pipeline_id is not None:
|
|
1417
|
+
body["pipeline_id"] = self.pipeline_id
|
|
1418
|
+
if self.pipeline_name is not None:
|
|
1419
|
+
body["pipeline_name"] = self.pipeline_name
|
|
1420
|
+
if self.region is not None:
|
|
1421
|
+
body["region"] = self.region
|
|
1422
|
+
if self.request_id is not None:
|
|
1423
|
+
body["request_id"] = self.request_id
|
|
1424
|
+
if self.table_id is not None:
|
|
1425
|
+
body["table_id"] = self.table_id
|
|
1426
|
+
if self.uc_resource_id is not None:
|
|
1427
|
+
body["uc_resource_id"] = self.uc_resource_id
|
|
1428
|
+
if self.update_id is not None:
|
|
1429
|
+
body["update_id"] = self.update_id
|
|
1188
1430
|
return body
|
|
1189
1431
|
|
|
1190
1432
|
@classmethod
|
|
1191
|
-
def from_dict(cls, d: Dict[str,
|
|
1433
|
+
def from_dict(cls, d: Dict[str, Any]) -> Origin:
|
|
1192
1434
|
"""Deserializes the Origin from a dictionary."""
|
|
1193
|
-
return cls(
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1435
|
+
return cls(
|
|
1436
|
+
batch_id=d.get("batch_id", None),
|
|
1437
|
+
cloud=d.get("cloud", None),
|
|
1438
|
+
cluster_id=d.get("cluster_id", None),
|
|
1439
|
+
dataset_name=d.get("dataset_name", None),
|
|
1440
|
+
flow_id=d.get("flow_id", None),
|
|
1441
|
+
flow_name=d.get("flow_name", None),
|
|
1442
|
+
host=d.get("host", None),
|
|
1443
|
+
maintenance_id=d.get("maintenance_id", None),
|
|
1444
|
+
materialization_name=d.get("materialization_name", None),
|
|
1445
|
+
org_id=d.get("org_id", None),
|
|
1446
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
1447
|
+
pipeline_name=d.get("pipeline_name", None),
|
|
1448
|
+
region=d.get("region", None),
|
|
1449
|
+
request_id=d.get("request_id", None),
|
|
1450
|
+
table_id=d.get("table_id", None),
|
|
1451
|
+
uc_resource_id=d.get("uc_resource_id", None),
|
|
1452
|
+
update_id=d.get("update_id", None),
|
|
1453
|
+
)
|
|
1210
1454
|
|
|
1211
1455
|
|
|
1212
1456
|
@dataclass
|
|
@@ -1226,30 +1470,38 @@ class PipelineAccessControlRequest:
|
|
|
1226
1470
|
def as_dict(self) -> dict:
|
|
1227
1471
|
"""Serializes the PipelineAccessControlRequest into a dictionary suitable for use as a JSON request body."""
|
|
1228
1472
|
body = {}
|
|
1229
|
-
if self.group_name is not None:
|
|
1230
|
-
|
|
1473
|
+
if self.group_name is not None:
|
|
1474
|
+
body["group_name"] = self.group_name
|
|
1475
|
+
if self.permission_level is not None:
|
|
1476
|
+
body["permission_level"] = self.permission_level.value
|
|
1231
1477
|
if self.service_principal_name is not None:
|
|
1232
|
-
body[
|
|
1233
|
-
if self.user_name is not None:
|
|
1478
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1479
|
+
if self.user_name is not None:
|
|
1480
|
+
body["user_name"] = self.user_name
|
|
1234
1481
|
return body
|
|
1235
1482
|
|
|
1236
1483
|
def as_shallow_dict(self) -> dict:
|
|
1237
1484
|
"""Serializes the PipelineAccessControlRequest into a shallow dictionary of its immediate attributes."""
|
|
1238
1485
|
body = {}
|
|
1239
|
-
if self.group_name is not None:
|
|
1240
|
-
|
|
1486
|
+
if self.group_name is not None:
|
|
1487
|
+
body["group_name"] = self.group_name
|
|
1488
|
+
if self.permission_level is not None:
|
|
1489
|
+
body["permission_level"] = self.permission_level
|
|
1241
1490
|
if self.service_principal_name is not None:
|
|
1242
|
-
body[
|
|
1243
|
-
if self.user_name is not None:
|
|
1491
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1492
|
+
if self.user_name is not None:
|
|
1493
|
+
body["user_name"] = self.user_name
|
|
1244
1494
|
return body
|
|
1245
1495
|
|
|
1246
1496
|
@classmethod
|
|
1247
|
-
def from_dict(cls, d: Dict[str,
|
|
1497
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineAccessControlRequest:
|
|
1248
1498
|
"""Deserializes the PipelineAccessControlRequest from a dictionary."""
|
|
1249
|
-
return cls(
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1499
|
+
return cls(
|
|
1500
|
+
group_name=d.get("group_name", None),
|
|
1501
|
+
permission_level=_enum(d, "permission_level", PipelinePermissionLevel),
|
|
1502
|
+
service_principal_name=d.get("service_principal_name", None),
|
|
1503
|
+
user_name=d.get("user_name", None),
|
|
1504
|
+
)
|
|
1253
1505
|
|
|
1254
1506
|
|
|
1255
1507
|
@dataclass
|
|
@@ -1272,33 +1524,43 @@ class PipelineAccessControlResponse:
|
|
|
1272
1524
|
def as_dict(self) -> dict:
|
|
1273
1525
|
"""Serializes the PipelineAccessControlResponse into a dictionary suitable for use as a JSON request body."""
|
|
1274
1526
|
body = {}
|
|
1275
|
-
if self.all_permissions:
|
|
1276
|
-
|
|
1277
|
-
if self.
|
|
1527
|
+
if self.all_permissions:
|
|
1528
|
+
body["all_permissions"] = [v.as_dict() for v in self.all_permissions]
|
|
1529
|
+
if self.display_name is not None:
|
|
1530
|
+
body["display_name"] = self.display_name
|
|
1531
|
+
if self.group_name is not None:
|
|
1532
|
+
body["group_name"] = self.group_name
|
|
1278
1533
|
if self.service_principal_name is not None:
|
|
1279
|
-
body[
|
|
1280
|
-
if self.user_name is not None:
|
|
1534
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1535
|
+
if self.user_name is not None:
|
|
1536
|
+
body["user_name"] = self.user_name
|
|
1281
1537
|
return body
|
|
1282
1538
|
|
|
1283
1539
|
def as_shallow_dict(self) -> dict:
|
|
1284
1540
|
"""Serializes the PipelineAccessControlResponse into a shallow dictionary of its immediate attributes."""
|
|
1285
1541
|
body = {}
|
|
1286
|
-
if self.all_permissions:
|
|
1287
|
-
|
|
1288
|
-
if self.
|
|
1542
|
+
if self.all_permissions:
|
|
1543
|
+
body["all_permissions"] = self.all_permissions
|
|
1544
|
+
if self.display_name is not None:
|
|
1545
|
+
body["display_name"] = self.display_name
|
|
1546
|
+
if self.group_name is not None:
|
|
1547
|
+
body["group_name"] = self.group_name
|
|
1289
1548
|
if self.service_principal_name is not None:
|
|
1290
|
-
body[
|
|
1291
|
-
if self.user_name is not None:
|
|
1549
|
+
body["service_principal_name"] = self.service_principal_name
|
|
1550
|
+
if self.user_name is not None:
|
|
1551
|
+
body["user_name"] = self.user_name
|
|
1292
1552
|
return body
|
|
1293
1553
|
|
|
1294
1554
|
@classmethod
|
|
1295
|
-
def from_dict(cls, d: Dict[str,
|
|
1555
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineAccessControlResponse:
|
|
1296
1556
|
"""Deserializes the PipelineAccessControlResponse from a dictionary."""
|
|
1297
|
-
return cls(
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1557
|
+
return cls(
|
|
1558
|
+
all_permissions=_repeated_dict(d, "all_permissions", PipelinePermission),
|
|
1559
|
+
display_name=d.get("display_name", None),
|
|
1560
|
+
group_name=d.get("group_name", None),
|
|
1561
|
+
service_principal_name=d.get("service_principal_name", None),
|
|
1562
|
+
user_name=d.get("user_name", None),
|
|
1563
|
+
)
|
|
1302
1564
|
|
|
1303
1565
|
|
|
1304
1566
|
@dataclass
|
|
@@ -1407,78 +1669,112 @@ class PipelineCluster:
|
|
|
1407
1669
|
"""Serializes the PipelineCluster into a dictionary suitable for use as a JSON request body."""
|
|
1408
1670
|
body = {}
|
|
1409
1671
|
if self.apply_policy_default_values is not None:
|
|
1410
|
-
body[
|
|
1411
|
-
if self.autoscale:
|
|
1412
|
-
|
|
1413
|
-
if self.
|
|
1414
|
-
|
|
1415
|
-
if self.
|
|
1672
|
+
body["apply_policy_default_values"] = self.apply_policy_default_values
|
|
1673
|
+
if self.autoscale:
|
|
1674
|
+
body["autoscale"] = self.autoscale.as_dict()
|
|
1675
|
+
if self.aws_attributes:
|
|
1676
|
+
body["aws_attributes"] = self.aws_attributes.as_dict()
|
|
1677
|
+
if self.azure_attributes:
|
|
1678
|
+
body["azure_attributes"] = self.azure_attributes.as_dict()
|
|
1679
|
+
if self.cluster_log_conf:
|
|
1680
|
+
body["cluster_log_conf"] = self.cluster_log_conf.as_dict()
|
|
1681
|
+
if self.custom_tags:
|
|
1682
|
+
body["custom_tags"] = self.custom_tags
|
|
1416
1683
|
if self.driver_instance_pool_id is not None:
|
|
1417
|
-
body[
|
|
1418
|
-
if self.driver_node_type_id is not None:
|
|
1684
|
+
body["driver_instance_pool_id"] = self.driver_instance_pool_id
|
|
1685
|
+
if self.driver_node_type_id is not None:
|
|
1686
|
+
body["driver_node_type_id"] = self.driver_node_type_id
|
|
1419
1687
|
if self.enable_local_disk_encryption is not None:
|
|
1420
|
-
body[
|
|
1421
|
-
if self.gcp_attributes:
|
|
1422
|
-
|
|
1423
|
-
if self.
|
|
1424
|
-
|
|
1425
|
-
if self.
|
|
1426
|
-
|
|
1427
|
-
if self.
|
|
1428
|
-
|
|
1429
|
-
if self.
|
|
1430
|
-
|
|
1688
|
+
body["enable_local_disk_encryption"] = self.enable_local_disk_encryption
|
|
1689
|
+
if self.gcp_attributes:
|
|
1690
|
+
body["gcp_attributes"] = self.gcp_attributes.as_dict()
|
|
1691
|
+
if self.init_scripts:
|
|
1692
|
+
body["init_scripts"] = [v.as_dict() for v in self.init_scripts]
|
|
1693
|
+
if self.instance_pool_id is not None:
|
|
1694
|
+
body["instance_pool_id"] = self.instance_pool_id
|
|
1695
|
+
if self.label is not None:
|
|
1696
|
+
body["label"] = self.label
|
|
1697
|
+
if self.node_type_id is not None:
|
|
1698
|
+
body["node_type_id"] = self.node_type_id
|
|
1699
|
+
if self.num_workers is not None:
|
|
1700
|
+
body["num_workers"] = self.num_workers
|
|
1701
|
+
if self.policy_id is not None:
|
|
1702
|
+
body["policy_id"] = self.policy_id
|
|
1703
|
+
if self.spark_conf:
|
|
1704
|
+
body["spark_conf"] = self.spark_conf
|
|
1705
|
+
if self.spark_env_vars:
|
|
1706
|
+
body["spark_env_vars"] = self.spark_env_vars
|
|
1707
|
+
if self.ssh_public_keys:
|
|
1708
|
+
body["ssh_public_keys"] = [v for v in self.ssh_public_keys]
|
|
1431
1709
|
return body
|
|
1432
1710
|
|
|
1433
1711
|
def as_shallow_dict(self) -> dict:
|
|
1434
1712
|
"""Serializes the PipelineCluster into a shallow dictionary of its immediate attributes."""
|
|
1435
1713
|
body = {}
|
|
1436
1714
|
if self.apply_policy_default_values is not None:
|
|
1437
|
-
body[
|
|
1438
|
-
if self.autoscale:
|
|
1439
|
-
|
|
1440
|
-
if self.
|
|
1441
|
-
|
|
1442
|
-
if self.
|
|
1715
|
+
body["apply_policy_default_values"] = self.apply_policy_default_values
|
|
1716
|
+
if self.autoscale:
|
|
1717
|
+
body["autoscale"] = self.autoscale
|
|
1718
|
+
if self.aws_attributes:
|
|
1719
|
+
body["aws_attributes"] = self.aws_attributes
|
|
1720
|
+
if self.azure_attributes:
|
|
1721
|
+
body["azure_attributes"] = self.azure_attributes
|
|
1722
|
+
if self.cluster_log_conf:
|
|
1723
|
+
body["cluster_log_conf"] = self.cluster_log_conf
|
|
1724
|
+
if self.custom_tags:
|
|
1725
|
+
body["custom_tags"] = self.custom_tags
|
|
1443
1726
|
if self.driver_instance_pool_id is not None:
|
|
1444
|
-
body[
|
|
1445
|
-
if self.driver_node_type_id is not None:
|
|
1727
|
+
body["driver_instance_pool_id"] = self.driver_instance_pool_id
|
|
1728
|
+
if self.driver_node_type_id is not None:
|
|
1729
|
+
body["driver_node_type_id"] = self.driver_node_type_id
|
|
1446
1730
|
if self.enable_local_disk_encryption is not None:
|
|
1447
|
-
body[
|
|
1448
|
-
if self.gcp_attributes:
|
|
1449
|
-
|
|
1450
|
-
if self.
|
|
1451
|
-
|
|
1452
|
-
if self.
|
|
1453
|
-
|
|
1454
|
-
if self.
|
|
1455
|
-
|
|
1456
|
-
if self.
|
|
1457
|
-
|
|
1731
|
+
body["enable_local_disk_encryption"] = self.enable_local_disk_encryption
|
|
1732
|
+
if self.gcp_attributes:
|
|
1733
|
+
body["gcp_attributes"] = self.gcp_attributes
|
|
1734
|
+
if self.init_scripts:
|
|
1735
|
+
body["init_scripts"] = self.init_scripts
|
|
1736
|
+
if self.instance_pool_id is not None:
|
|
1737
|
+
body["instance_pool_id"] = self.instance_pool_id
|
|
1738
|
+
if self.label is not None:
|
|
1739
|
+
body["label"] = self.label
|
|
1740
|
+
if self.node_type_id is not None:
|
|
1741
|
+
body["node_type_id"] = self.node_type_id
|
|
1742
|
+
if self.num_workers is not None:
|
|
1743
|
+
body["num_workers"] = self.num_workers
|
|
1744
|
+
if self.policy_id is not None:
|
|
1745
|
+
body["policy_id"] = self.policy_id
|
|
1746
|
+
if self.spark_conf:
|
|
1747
|
+
body["spark_conf"] = self.spark_conf
|
|
1748
|
+
if self.spark_env_vars:
|
|
1749
|
+
body["spark_env_vars"] = self.spark_env_vars
|
|
1750
|
+
if self.ssh_public_keys:
|
|
1751
|
+
body["ssh_public_keys"] = self.ssh_public_keys
|
|
1458
1752
|
return body
|
|
1459
1753
|
|
|
1460
1754
|
@classmethod
|
|
1461
|
-
def from_dict(cls, d: Dict[str,
|
|
1755
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineCluster:
|
|
1462
1756
|
"""Deserializes the PipelineCluster from a dictionary."""
|
|
1463
|
-
return cls(
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1757
|
+
return cls(
|
|
1758
|
+
apply_policy_default_values=d.get("apply_policy_default_values", None),
|
|
1759
|
+
autoscale=_from_dict(d, "autoscale", PipelineClusterAutoscale),
|
|
1760
|
+
aws_attributes=_from_dict(d, "aws_attributes", compute.AwsAttributes),
|
|
1761
|
+
azure_attributes=_from_dict(d, "azure_attributes", compute.AzureAttributes),
|
|
1762
|
+
cluster_log_conf=_from_dict(d, "cluster_log_conf", compute.ClusterLogConf),
|
|
1763
|
+
custom_tags=d.get("custom_tags", None),
|
|
1764
|
+
driver_instance_pool_id=d.get("driver_instance_pool_id", None),
|
|
1765
|
+
driver_node_type_id=d.get("driver_node_type_id", None),
|
|
1766
|
+
enable_local_disk_encryption=d.get("enable_local_disk_encryption", None),
|
|
1767
|
+
gcp_attributes=_from_dict(d, "gcp_attributes", compute.GcpAttributes),
|
|
1768
|
+
init_scripts=_repeated_dict(d, "init_scripts", compute.InitScriptInfo),
|
|
1769
|
+
instance_pool_id=d.get("instance_pool_id", None),
|
|
1770
|
+
label=d.get("label", None),
|
|
1771
|
+
node_type_id=d.get("node_type_id", None),
|
|
1772
|
+
num_workers=d.get("num_workers", None),
|
|
1773
|
+
policy_id=d.get("policy_id", None),
|
|
1774
|
+
spark_conf=d.get("spark_conf", None),
|
|
1775
|
+
spark_env_vars=d.get("spark_env_vars", None),
|
|
1776
|
+
ssh_public_keys=d.get("ssh_public_keys", None),
|
|
1777
|
+
)
|
|
1482
1778
|
|
|
1483
1779
|
|
|
1484
1780
|
@dataclass
|
|
@@ -1500,25 +1796,33 @@ class PipelineClusterAutoscale:
|
|
|
1500
1796
|
def as_dict(self) -> dict:
|
|
1501
1797
|
"""Serializes the PipelineClusterAutoscale into a dictionary suitable for use as a JSON request body."""
|
|
1502
1798
|
body = {}
|
|
1503
|
-
if self.max_workers is not None:
|
|
1504
|
-
|
|
1505
|
-
if self.
|
|
1799
|
+
if self.max_workers is not None:
|
|
1800
|
+
body["max_workers"] = self.max_workers
|
|
1801
|
+
if self.min_workers is not None:
|
|
1802
|
+
body["min_workers"] = self.min_workers
|
|
1803
|
+
if self.mode is not None:
|
|
1804
|
+
body["mode"] = self.mode.value
|
|
1506
1805
|
return body
|
|
1507
1806
|
|
|
1508
1807
|
def as_shallow_dict(self) -> dict:
|
|
1509
1808
|
"""Serializes the PipelineClusterAutoscale into a shallow dictionary of its immediate attributes."""
|
|
1510
1809
|
body = {}
|
|
1511
|
-
if self.max_workers is not None:
|
|
1512
|
-
|
|
1513
|
-
if self.
|
|
1810
|
+
if self.max_workers is not None:
|
|
1811
|
+
body["max_workers"] = self.max_workers
|
|
1812
|
+
if self.min_workers is not None:
|
|
1813
|
+
body["min_workers"] = self.min_workers
|
|
1814
|
+
if self.mode is not None:
|
|
1815
|
+
body["mode"] = self.mode
|
|
1514
1816
|
return body
|
|
1515
1817
|
|
|
1516
1818
|
@classmethod
|
|
1517
|
-
def from_dict(cls, d: Dict[str,
|
|
1819
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineClusterAutoscale:
|
|
1518
1820
|
"""Deserializes the PipelineClusterAutoscale from a dictionary."""
|
|
1519
|
-
return cls(
|
|
1520
|
-
|
|
1521
|
-
|
|
1821
|
+
return cls(
|
|
1822
|
+
max_workers=d.get("max_workers", None),
|
|
1823
|
+
min_workers=d.get("min_workers", None),
|
|
1824
|
+
mode=_enum(d, "mode", PipelineClusterAutoscaleMode),
|
|
1825
|
+
)
|
|
1522
1826
|
|
|
1523
1827
|
|
|
1524
1828
|
class PipelineClusterAutoscaleMode(Enum):
|
|
@@ -1527,8 +1831,8 @@ class PipelineClusterAutoscaleMode(Enum):
|
|
|
1527
1831
|
of your pipelines. Enhanced Autoscaling is available for `updates` clusters only. The legacy
|
|
1528
1832
|
autoscaling feature is used for `maintenance` clusters."""
|
|
1529
1833
|
|
|
1530
|
-
ENHANCED =
|
|
1531
|
-
LEGACY =
|
|
1834
|
+
ENHANCED = "ENHANCED"
|
|
1835
|
+
LEGACY = "LEGACY"
|
|
1532
1836
|
|
|
1533
1837
|
|
|
1534
1838
|
@dataclass
|
|
@@ -1542,22 +1846,25 @@ class PipelineDeployment:
|
|
|
1542
1846
|
def as_dict(self) -> dict:
|
|
1543
1847
|
"""Serializes the PipelineDeployment into a dictionary suitable for use as a JSON request body."""
|
|
1544
1848
|
body = {}
|
|
1545
|
-
if self.kind is not None:
|
|
1546
|
-
|
|
1849
|
+
if self.kind is not None:
|
|
1850
|
+
body["kind"] = self.kind.value
|
|
1851
|
+
if self.metadata_file_path is not None:
|
|
1852
|
+
body["metadata_file_path"] = self.metadata_file_path
|
|
1547
1853
|
return body
|
|
1548
1854
|
|
|
1549
1855
|
def as_shallow_dict(self) -> dict:
|
|
1550
1856
|
"""Serializes the PipelineDeployment into a shallow dictionary of its immediate attributes."""
|
|
1551
1857
|
body = {}
|
|
1552
|
-
if self.kind is not None:
|
|
1553
|
-
|
|
1858
|
+
if self.kind is not None:
|
|
1859
|
+
body["kind"] = self.kind
|
|
1860
|
+
if self.metadata_file_path is not None:
|
|
1861
|
+
body["metadata_file_path"] = self.metadata_file_path
|
|
1554
1862
|
return body
|
|
1555
1863
|
|
|
1556
1864
|
@classmethod
|
|
1557
|
-
def from_dict(cls, d: Dict[str,
|
|
1865
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineDeployment:
|
|
1558
1866
|
"""Deserializes the PipelineDeployment from a dictionary."""
|
|
1559
|
-
return cls(kind=_enum(d,
|
|
1560
|
-
metadata_file_path=d.get('metadata_file_path', None))
|
|
1867
|
+
return cls(kind=_enum(d, "kind", DeploymentKind), metadata_file_path=d.get("metadata_file_path", None))
|
|
1561
1868
|
|
|
1562
1869
|
|
|
1563
1870
|
@dataclass
|
|
@@ -1592,43 +1899,63 @@ class PipelineEvent:
|
|
|
1592
1899
|
def as_dict(self) -> dict:
|
|
1593
1900
|
"""Serializes the PipelineEvent into a dictionary suitable for use as a JSON request body."""
|
|
1594
1901
|
body = {}
|
|
1595
|
-
if self.error:
|
|
1596
|
-
|
|
1597
|
-
if self.
|
|
1598
|
-
|
|
1599
|
-
if self.
|
|
1600
|
-
|
|
1601
|
-
if self.
|
|
1602
|
-
|
|
1603
|
-
if self.
|
|
1902
|
+
if self.error:
|
|
1903
|
+
body["error"] = self.error.as_dict()
|
|
1904
|
+
if self.event_type is not None:
|
|
1905
|
+
body["event_type"] = self.event_type
|
|
1906
|
+
if self.id is not None:
|
|
1907
|
+
body["id"] = self.id
|
|
1908
|
+
if self.level is not None:
|
|
1909
|
+
body["level"] = self.level.value
|
|
1910
|
+
if self.maturity_level is not None:
|
|
1911
|
+
body["maturity_level"] = self.maturity_level.value
|
|
1912
|
+
if self.message is not None:
|
|
1913
|
+
body["message"] = self.message
|
|
1914
|
+
if self.origin:
|
|
1915
|
+
body["origin"] = self.origin.as_dict()
|
|
1916
|
+
if self.sequence:
|
|
1917
|
+
body["sequence"] = self.sequence.as_dict()
|
|
1918
|
+
if self.timestamp is not None:
|
|
1919
|
+
body["timestamp"] = self.timestamp
|
|
1604
1920
|
return body
|
|
1605
1921
|
|
|
1606
1922
|
def as_shallow_dict(self) -> dict:
|
|
1607
1923
|
"""Serializes the PipelineEvent into a shallow dictionary of its immediate attributes."""
|
|
1608
1924
|
body = {}
|
|
1609
|
-
if self.error:
|
|
1610
|
-
|
|
1611
|
-
if self.
|
|
1612
|
-
|
|
1613
|
-
if self.
|
|
1614
|
-
|
|
1615
|
-
if self.
|
|
1616
|
-
|
|
1617
|
-
if self.
|
|
1925
|
+
if self.error:
|
|
1926
|
+
body["error"] = self.error
|
|
1927
|
+
if self.event_type is not None:
|
|
1928
|
+
body["event_type"] = self.event_type
|
|
1929
|
+
if self.id is not None:
|
|
1930
|
+
body["id"] = self.id
|
|
1931
|
+
if self.level is not None:
|
|
1932
|
+
body["level"] = self.level
|
|
1933
|
+
if self.maturity_level is not None:
|
|
1934
|
+
body["maturity_level"] = self.maturity_level
|
|
1935
|
+
if self.message is not None:
|
|
1936
|
+
body["message"] = self.message
|
|
1937
|
+
if self.origin:
|
|
1938
|
+
body["origin"] = self.origin
|
|
1939
|
+
if self.sequence:
|
|
1940
|
+
body["sequence"] = self.sequence
|
|
1941
|
+
if self.timestamp is not None:
|
|
1942
|
+
body["timestamp"] = self.timestamp
|
|
1618
1943
|
return body
|
|
1619
1944
|
|
|
1620
1945
|
@classmethod
|
|
1621
|
-
def from_dict(cls, d: Dict[str,
|
|
1946
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineEvent:
|
|
1622
1947
|
"""Deserializes the PipelineEvent from a dictionary."""
|
|
1623
|
-
return cls(
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1948
|
+
return cls(
|
|
1949
|
+
error=_from_dict(d, "error", ErrorDetail),
|
|
1950
|
+
event_type=d.get("event_type", None),
|
|
1951
|
+
id=d.get("id", None),
|
|
1952
|
+
level=_enum(d, "level", EventLevel),
|
|
1953
|
+
maturity_level=_enum(d, "maturity_level", MaturityLevel),
|
|
1954
|
+
message=d.get("message", None),
|
|
1955
|
+
origin=_from_dict(d, "origin", Origin),
|
|
1956
|
+
sequence=_from_dict(d, "sequence", Sequencing),
|
|
1957
|
+
timestamp=d.get("timestamp", None),
|
|
1958
|
+
)
|
|
1632
1959
|
|
|
1633
1960
|
|
|
1634
1961
|
@dataclass
|
|
@@ -1651,31 +1978,43 @@ class PipelineLibrary:
|
|
|
1651
1978
|
def as_dict(self) -> dict:
|
|
1652
1979
|
"""Serializes the PipelineLibrary into a dictionary suitable for use as a JSON request body."""
|
|
1653
1980
|
body = {}
|
|
1654
|
-
if self.file:
|
|
1655
|
-
|
|
1656
|
-
if self.
|
|
1657
|
-
|
|
1658
|
-
if self.
|
|
1981
|
+
if self.file:
|
|
1982
|
+
body["file"] = self.file.as_dict()
|
|
1983
|
+
if self.jar is not None:
|
|
1984
|
+
body["jar"] = self.jar
|
|
1985
|
+
if self.maven:
|
|
1986
|
+
body["maven"] = self.maven.as_dict()
|
|
1987
|
+
if self.notebook:
|
|
1988
|
+
body["notebook"] = self.notebook.as_dict()
|
|
1989
|
+
if self.whl is not None:
|
|
1990
|
+
body["whl"] = self.whl
|
|
1659
1991
|
return body
|
|
1660
1992
|
|
|
1661
1993
|
def as_shallow_dict(self) -> dict:
|
|
1662
1994
|
"""Serializes the PipelineLibrary into a shallow dictionary of its immediate attributes."""
|
|
1663
1995
|
body = {}
|
|
1664
|
-
if self.file:
|
|
1665
|
-
|
|
1666
|
-
if self.
|
|
1667
|
-
|
|
1668
|
-
if self.
|
|
1996
|
+
if self.file:
|
|
1997
|
+
body["file"] = self.file
|
|
1998
|
+
if self.jar is not None:
|
|
1999
|
+
body["jar"] = self.jar
|
|
2000
|
+
if self.maven:
|
|
2001
|
+
body["maven"] = self.maven
|
|
2002
|
+
if self.notebook:
|
|
2003
|
+
body["notebook"] = self.notebook
|
|
2004
|
+
if self.whl is not None:
|
|
2005
|
+
body["whl"] = self.whl
|
|
1669
2006
|
return body
|
|
1670
2007
|
|
|
1671
2008
|
@classmethod
|
|
1672
|
-
def from_dict(cls, d: Dict[str,
|
|
2009
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineLibrary:
|
|
1673
2010
|
"""Deserializes the PipelineLibrary from a dictionary."""
|
|
1674
|
-
return cls(
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
2011
|
+
return cls(
|
|
2012
|
+
file=_from_dict(d, "file", FileLibrary),
|
|
2013
|
+
jar=d.get("jar", None),
|
|
2014
|
+
maven=_from_dict(d, "maven", compute.MavenLibrary),
|
|
2015
|
+
notebook=_from_dict(d, "notebook", NotebookLibrary),
|
|
2016
|
+
whl=d.get("whl", None),
|
|
2017
|
+
)
|
|
1679
2018
|
|
|
1680
2019
|
|
|
1681
2020
|
@dataclass
|
|
@@ -1690,34 +2029,42 @@ class PipelinePermission:
|
|
|
1690
2029
|
def as_dict(self) -> dict:
|
|
1691
2030
|
"""Serializes the PipelinePermission into a dictionary suitable for use as a JSON request body."""
|
|
1692
2031
|
body = {}
|
|
1693
|
-
if self.inherited is not None:
|
|
1694
|
-
|
|
1695
|
-
if self.
|
|
2032
|
+
if self.inherited is not None:
|
|
2033
|
+
body["inherited"] = self.inherited
|
|
2034
|
+
if self.inherited_from_object:
|
|
2035
|
+
body["inherited_from_object"] = [v for v in self.inherited_from_object]
|
|
2036
|
+
if self.permission_level is not None:
|
|
2037
|
+
body["permission_level"] = self.permission_level.value
|
|
1696
2038
|
return body
|
|
1697
2039
|
|
|
1698
2040
|
def as_shallow_dict(self) -> dict:
|
|
1699
2041
|
"""Serializes the PipelinePermission into a shallow dictionary of its immediate attributes."""
|
|
1700
2042
|
body = {}
|
|
1701
|
-
if self.inherited is not None:
|
|
1702
|
-
|
|
1703
|
-
if self.
|
|
2043
|
+
if self.inherited is not None:
|
|
2044
|
+
body["inherited"] = self.inherited
|
|
2045
|
+
if self.inherited_from_object:
|
|
2046
|
+
body["inherited_from_object"] = self.inherited_from_object
|
|
2047
|
+
if self.permission_level is not None:
|
|
2048
|
+
body["permission_level"] = self.permission_level
|
|
1704
2049
|
return body
|
|
1705
2050
|
|
|
1706
2051
|
@classmethod
|
|
1707
|
-
def from_dict(cls, d: Dict[str,
|
|
2052
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelinePermission:
|
|
1708
2053
|
"""Deserializes the PipelinePermission from a dictionary."""
|
|
1709
|
-
return cls(
|
|
1710
|
-
|
|
1711
|
-
|
|
2054
|
+
return cls(
|
|
2055
|
+
inherited=d.get("inherited", None),
|
|
2056
|
+
inherited_from_object=d.get("inherited_from_object", None),
|
|
2057
|
+
permission_level=_enum(d, "permission_level", PipelinePermissionLevel),
|
|
2058
|
+
)
|
|
1712
2059
|
|
|
1713
2060
|
|
|
1714
2061
|
class PipelinePermissionLevel(Enum):
|
|
1715
2062
|
"""Permission level"""
|
|
1716
2063
|
|
|
1717
|
-
CAN_MANAGE =
|
|
1718
|
-
CAN_RUN =
|
|
1719
|
-
CAN_VIEW =
|
|
1720
|
-
IS_OWNER =
|
|
2064
|
+
CAN_MANAGE = "CAN_MANAGE"
|
|
2065
|
+
CAN_RUN = "CAN_RUN"
|
|
2066
|
+
CAN_VIEW = "CAN_VIEW"
|
|
2067
|
+
IS_OWNER = "IS_OWNER"
|
|
1721
2068
|
|
|
1722
2069
|
|
|
1723
2070
|
@dataclass
|
|
@@ -1732,26 +2079,32 @@ class PipelinePermissions:
|
|
|
1732
2079
|
"""Serializes the PipelinePermissions into a dictionary suitable for use as a JSON request body."""
|
|
1733
2080
|
body = {}
|
|
1734
2081
|
if self.access_control_list:
|
|
1735
|
-
body[
|
|
1736
|
-
if self.object_id is not None:
|
|
1737
|
-
|
|
2082
|
+
body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
|
|
2083
|
+
if self.object_id is not None:
|
|
2084
|
+
body["object_id"] = self.object_id
|
|
2085
|
+
if self.object_type is not None:
|
|
2086
|
+
body["object_type"] = self.object_type
|
|
1738
2087
|
return body
|
|
1739
2088
|
|
|
1740
2089
|
def as_shallow_dict(self) -> dict:
|
|
1741
2090
|
"""Serializes the PipelinePermissions into a shallow dictionary of its immediate attributes."""
|
|
1742
2091
|
body = {}
|
|
1743
|
-
if self.access_control_list:
|
|
1744
|
-
|
|
1745
|
-
if self.
|
|
2092
|
+
if self.access_control_list:
|
|
2093
|
+
body["access_control_list"] = self.access_control_list
|
|
2094
|
+
if self.object_id is not None:
|
|
2095
|
+
body["object_id"] = self.object_id
|
|
2096
|
+
if self.object_type is not None:
|
|
2097
|
+
body["object_type"] = self.object_type
|
|
1746
2098
|
return body
|
|
1747
2099
|
|
|
1748
2100
|
@classmethod
|
|
1749
|
-
def from_dict(cls, d: Dict[str,
|
|
2101
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelinePermissions:
|
|
1750
2102
|
"""Deserializes the PipelinePermissions from a dictionary."""
|
|
1751
|
-
return cls(
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
2103
|
+
return cls(
|
|
2104
|
+
access_control_list=_repeated_dict(d, "access_control_list", PipelineAccessControlResponse),
|
|
2105
|
+
object_id=d.get("object_id", None),
|
|
2106
|
+
object_type=d.get("object_type", None),
|
|
2107
|
+
)
|
|
1755
2108
|
|
|
1756
2109
|
|
|
1757
2110
|
@dataclass
|
|
@@ -1764,22 +2117,28 @@ class PipelinePermissionsDescription:
|
|
|
1764
2117
|
def as_dict(self) -> dict:
|
|
1765
2118
|
"""Serializes the PipelinePermissionsDescription into a dictionary suitable for use as a JSON request body."""
|
|
1766
2119
|
body = {}
|
|
1767
|
-
if self.description is not None:
|
|
1768
|
-
|
|
2120
|
+
if self.description is not None:
|
|
2121
|
+
body["description"] = self.description
|
|
2122
|
+
if self.permission_level is not None:
|
|
2123
|
+
body["permission_level"] = self.permission_level.value
|
|
1769
2124
|
return body
|
|
1770
2125
|
|
|
1771
2126
|
def as_shallow_dict(self) -> dict:
|
|
1772
2127
|
"""Serializes the PipelinePermissionsDescription into a shallow dictionary of its immediate attributes."""
|
|
1773
2128
|
body = {}
|
|
1774
|
-
if self.description is not None:
|
|
1775
|
-
|
|
2129
|
+
if self.description is not None:
|
|
2130
|
+
body["description"] = self.description
|
|
2131
|
+
if self.permission_level is not None:
|
|
2132
|
+
body["permission_level"] = self.permission_level
|
|
1776
2133
|
return body
|
|
1777
2134
|
|
|
1778
2135
|
@classmethod
|
|
1779
|
-
def from_dict(cls, d: Dict[str,
|
|
2136
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelinePermissionsDescription:
|
|
1780
2137
|
"""Deserializes the PipelinePermissionsDescription from a dictionary."""
|
|
1781
|
-
return cls(
|
|
1782
|
-
|
|
2138
|
+
return cls(
|
|
2139
|
+
description=d.get("description", None),
|
|
2140
|
+
permission_level=_enum(d, "permission_level", PipelinePermissionLevel),
|
|
2141
|
+
)
|
|
1783
2142
|
|
|
1784
2143
|
|
|
1785
2144
|
@dataclass
|
|
@@ -1793,22 +2152,27 @@ class PipelinePermissionsRequest:
|
|
|
1793
2152
|
"""Serializes the PipelinePermissionsRequest into a dictionary suitable for use as a JSON request body."""
|
|
1794
2153
|
body = {}
|
|
1795
2154
|
if self.access_control_list:
|
|
1796
|
-
body[
|
|
1797
|
-
if self.pipeline_id is not None:
|
|
2155
|
+
body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
|
|
2156
|
+
if self.pipeline_id is not None:
|
|
2157
|
+
body["pipeline_id"] = self.pipeline_id
|
|
1798
2158
|
return body
|
|
1799
2159
|
|
|
1800
2160
|
def as_shallow_dict(self) -> dict:
|
|
1801
2161
|
"""Serializes the PipelinePermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
1802
2162
|
body = {}
|
|
1803
|
-
if self.access_control_list:
|
|
1804
|
-
|
|
2163
|
+
if self.access_control_list:
|
|
2164
|
+
body["access_control_list"] = self.access_control_list
|
|
2165
|
+
if self.pipeline_id is not None:
|
|
2166
|
+
body["pipeline_id"] = self.pipeline_id
|
|
1805
2167
|
return body
|
|
1806
2168
|
|
|
1807
2169
|
@classmethod
|
|
1808
|
-
def from_dict(cls, d: Dict[str,
|
|
2170
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelinePermissionsRequest:
|
|
1809
2171
|
"""Deserializes the PipelinePermissionsRequest from a dictionary."""
|
|
1810
|
-
return cls(
|
|
1811
|
-
|
|
2172
|
+
return cls(
|
|
2173
|
+
access_control_list=_repeated_dict(d, "access_control_list", PipelineAccessControlRequest),
|
|
2174
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
2175
|
+
)
|
|
1812
2176
|
|
|
1813
2177
|
|
|
1814
2178
|
@dataclass
|
|
@@ -1892,99 +2256,147 @@ class PipelineSpec:
|
|
|
1892
2256
|
def as_dict(self) -> dict:
|
|
1893
2257
|
"""Serializes the PipelineSpec into a dictionary suitable for use as a JSON request body."""
|
|
1894
2258
|
body = {}
|
|
1895
|
-
if self.budget_policy_id is not None:
|
|
1896
|
-
|
|
1897
|
-
if self.
|
|
1898
|
-
|
|
1899
|
-
if self.
|
|
1900
|
-
|
|
1901
|
-
if self.
|
|
1902
|
-
|
|
1903
|
-
if self.
|
|
1904
|
-
|
|
1905
|
-
if self.
|
|
1906
|
-
|
|
1907
|
-
if self.
|
|
1908
|
-
|
|
1909
|
-
if self.
|
|
1910
|
-
|
|
1911
|
-
if self.
|
|
1912
|
-
|
|
1913
|
-
if self.
|
|
1914
|
-
|
|
1915
|
-
if self.
|
|
1916
|
-
|
|
1917
|
-
if self.
|
|
2259
|
+
if self.budget_policy_id is not None:
|
|
2260
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
2261
|
+
if self.catalog is not None:
|
|
2262
|
+
body["catalog"] = self.catalog
|
|
2263
|
+
if self.channel is not None:
|
|
2264
|
+
body["channel"] = self.channel
|
|
2265
|
+
if self.clusters:
|
|
2266
|
+
body["clusters"] = [v.as_dict() for v in self.clusters]
|
|
2267
|
+
if self.configuration:
|
|
2268
|
+
body["configuration"] = self.configuration
|
|
2269
|
+
if self.continuous is not None:
|
|
2270
|
+
body["continuous"] = self.continuous
|
|
2271
|
+
if self.deployment:
|
|
2272
|
+
body["deployment"] = self.deployment.as_dict()
|
|
2273
|
+
if self.development is not None:
|
|
2274
|
+
body["development"] = self.development
|
|
2275
|
+
if self.edition is not None:
|
|
2276
|
+
body["edition"] = self.edition
|
|
2277
|
+
if self.filters:
|
|
2278
|
+
body["filters"] = self.filters.as_dict()
|
|
2279
|
+
if self.gateway_definition:
|
|
2280
|
+
body["gateway_definition"] = self.gateway_definition.as_dict()
|
|
2281
|
+
if self.id is not None:
|
|
2282
|
+
body["id"] = self.id
|
|
2283
|
+
if self.ingestion_definition:
|
|
2284
|
+
body["ingestion_definition"] = self.ingestion_definition.as_dict()
|
|
2285
|
+
if self.libraries:
|
|
2286
|
+
body["libraries"] = [v.as_dict() for v in self.libraries]
|
|
2287
|
+
if self.name is not None:
|
|
2288
|
+
body["name"] = self.name
|
|
2289
|
+
if self.notifications:
|
|
2290
|
+
body["notifications"] = [v.as_dict() for v in self.notifications]
|
|
2291
|
+
if self.photon is not None:
|
|
2292
|
+
body["photon"] = self.photon
|
|
2293
|
+
if self.restart_window:
|
|
2294
|
+
body["restart_window"] = self.restart_window.as_dict()
|
|
2295
|
+
if self.schema is not None:
|
|
2296
|
+
body["schema"] = self.schema
|
|
2297
|
+
if self.serverless is not None:
|
|
2298
|
+
body["serverless"] = self.serverless
|
|
2299
|
+
if self.storage is not None:
|
|
2300
|
+
body["storage"] = self.storage
|
|
2301
|
+
if self.target is not None:
|
|
2302
|
+
body["target"] = self.target
|
|
2303
|
+
if self.trigger:
|
|
2304
|
+
body["trigger"] = self.trigger.as_dict()
|
|
1918
2305
|
return body
|
|
1919
2306
|
|
|
1920
2307
|
def as_shallow_dict(self) -> dict:
|
|
1921
2308
|
"""Serializes the PipelineSpec into a shallow dictionary of its immediate attributes."""
|
|
1922
2309
|
body = {}
|
|
1923
|
-
if self.budget_policy_id is not None:
|
|
1924
|
-
|
|
1925
|
-
if self.
|
|
1926
|
-
|
|
1927
|
-
if self.
|
|
1928
|
-
|
|
1929
|
-
if self.
|
|
1930
|
-
|
|
1931
|
-
if self.
|
|
1932
|
-
|
|
1933
|
-
if self.
|
|
1934
|
-
|
|
1935
|
-
if self.
|
|
1936
|
-
|
|
1937
|
-
if self.
|
|
1938
|
-
|
|
1939
|
-
if self.
|
|
1940
|
-
|
|
1941
|
-
if self.
|
|
1942
|
-
|
|
1943
|
-
if self.
|
|
1944
|
-
|
|
1945
|
-
if self.
|
|
2310
|
+
if self.budget_policy_id is not None:
|
|
2311
|
+
body["budget_policy_id"] = self.budget_policy_id
|
|
2312
|
+
if self.catalog is not None:
|
|
2313
|
+
body["catalog"] = self.catalog
|
|
2314
|
+
if self.channel is not None:
|
|
2315
|
+
body["channel"] = self.channel
|
|
2316
|
+
if self.clusters:
|
|
2317
|
+
body["clusters"] = self.clusters
|
|
2318
|
+
if self.configuration:
|
|
2319
|
+
body["configuration"] = self.configuration
|
|
2320
|
+
if self.continuous is not None:
|
|
2321
|
+
body["continuous"] = self.continuous
|
|
2322
|
+
if self.deployment:
|
|
2323
|
+
body["deployment"] = self.deployment
|
|
2324
|
+
if self.development is not None:
|
|
2325
|
+
body["development"] = self.development
|
|
2326
|
+
if self.edition is not None:
|
|
2327
|
+
body["edition"] = self.edition
|
|
2328
|
+
if self.filters:
|
|
2329
|
+
body["filters"] = self.filters
|
|
2330
|
+
if self.gateway_definition:
|
|
2331
|
+
body["gateway_definition"] = self.gateway_definition
|
|
2332
|
+
if self.id is not None:
|
|
2333
|
+
body["id"] = self.id
|
|
2334
|
+
if self.ingestion_definition:
|
|
2335
|
+
body["ingestion_definition"] = self.ingestion_definition
|
|
2336
|
+
if self.libraries:
|
|
2337
|
+
body["libraries"] = self.libraries
|
|
2338
|
+
if self.name is not None:
|
|
2339
|
+
body["name"] = self.name
|
|
2340
|
+
if self.notifications:
|
|
2341
|
+
body["notifications"] = self.notifications
|
|
2342
|
+
if self.photon is not None:
|
|
2343
|
+
body["photon"] = self.photon
|
|
2344
|
+
if self.restart_window:
|
|
2345
|
+
body["restart_window"] = self.restart_window
|
|
2346
|
+
if self.schema is not None:
|
|
2347
|
+
body["schema"] = self.schema
|
|
2348
|
+
if self.serverless is not None:
|
|
2349
|
+
body["serverless"] = self.serverless
|
|
2350
|
+
if self.storage is not None:
|
|
2351
|
+
body["storage"] = self.storage
|
|
2352
|
+
if self.target is not None:
|
|
2353
|
+
body["target"] = self.target
|
|
2354
|
+
if self.trigger:
|
|
2355
|
+
body["trigger"] = self.trigger
|
|
1946
2356
|
return body
|
|
1947
2357
|
|
|
1948
2358
|
@classmethod
|
|
1949
|
-
def from_dict(cls, d: Dict[str,
|
|
2359
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineSpec:
|
|
1950
2360
|
"""Deserializes the PipelineSpec from a dictionary."""
|
|
1951
|
-
return cls(
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
2361
|
+
return cls(
|
|
2362
|
+
budget_policy_id=d.get("budget_policy_id", None),
|
|
2363
|
+
catalog=d.get("catalog", None),
|
|
2364
|
+
channel=d.get("channel", None),
|
|
2365
|
+
clusters=_repeated_dict(d, "clusters", PipelineCluster),
|
|
2366
|
+
configuration=d.get("configuration", None),
|
|
2367
|
+
continuous=d.get("continuous", None),
|
|
2368
|
+
deployment=_from_dict(d, "deployment", PipelineDeployment),
|
|
2369
|
+
development=d.get("development", None),
|
|
2370
|
+
edition=d.get("edition", None),
|
|
2371
|
+
filters=_from_dict(d, "filters", Filters),
|
|
2372
|
+
gateway_definition=_from_dict(d, "gateway_definition", IngestionGatewayPipelineDefinition),
|
|
2373
|
+
id=d.get("id", None),
|
|
2374
|
+
ingestion_definition=_from_dict(d, "ingestion_definition", IngestionPipelineDefinition),
|
|
2375
|
+
libraries=_repeated_dict(d, "libraries", PipelineLibrary),
|
|
2376
|
+
name=d.get("name", None),
|
|
2377
|
+
notifications=_repeated_dict(d, "notifications", Notifications),
|
|
2378
|
+
photon=d.get("photon", None),
|
|
2379
|
+
restart_window=_from_dict(d, "restart_window", RestartWindow),
|
|
2380
|
+
schema=d.get("schema", None),
|
|
2381
|
+
serverless=d.get("serverless", None),
|
|
2382
|
+
storage=d.get("storage", None),
|
|
2383
|
+
target=d.get("target", None),
|
|
2384
|
+
trigger=_from_dict(d, "trigger", PipelineTrigger),
|
|
2385
|
+
)
|
|
1974
2386
|
|
|
1975
2387
|
|
|
1976
2388
|
class PipelineState(Enum):
|
|
1977
2389
|
"""The pipeline state."""
|
|
1978
2390
|
|
|
1979
|
-
DELETED =
|
|
1980
|
-
DEPLOYING =
|
|
1981
|
-
FAILED =
|
|
1982
|
-
IDLE =
|
|
1983
|
-
RECOVERING =
|
|
1984
|
-
RESETTING =
|
|
1985
|
-
RUNNING =
|
|
1986
|
-
STARTING =
|
|
1987
|
-
STOPPING =
|
|
2391
|
+
DELETED = "DELETED"
|
|
2392
|
+
DEPLOYING = "DEPLOYING"
|
|
2393
|
+
FAILED = "FAILED"
|
|
2394
|
+
IDLE = "IDLE"
|
|
2395
|
+
RECOVERING = "RECOVERING"
|
|
2396
|
+
RESETTING = "RESETTING"
|
|
2397
|
+
RUNNING = "RUNNING"
|
|
2398
|
+
STARTING = "STARTING"
|
|
2399
|
+
STOPPING = "STOPPING"
|
|
1988
2400
|
|
|
1989
2401
|
|
|
1990
2402
|
@dataclass
|
|
@@ -2017,47 +2429,65 @@ class PipelineStateInfo:
|
|
|
2017
2429
|
def as_dict(self) -> dict:
|
|
2018
2430
|
"""Serializes the PipelineStateInfo into a dictionary suitable for use as a JSON request body."""
|
|
2019
2431
|
body = {}
|
|
2020
|
-
if self.cluster_id is not None:
|
|
2021
|
-
|
|
2022
|
-
if self.
|
|
2023
|
-
|
|
2024
|
-
if self.
|
|
2025
|
-
|
|
2026
|
-
if self.
|
|
2027
|
-
|
|
2432
|
+
if self.cluster_id is not None:
|
|
2433
|
+
body["cluster_id"] = self.cluster_id
|
|
2434
|
+
if self.creator_user_name is not None:
|
|
2435
|
+
body["creator_user_name"] = self.creator_user_name
|
|
2436
|
+
if self.health is not None:
|
|
2437
|
+
body["health"] = self.health.value
|
|
2438
|
+
if self.latest_updates:
|
|
2439
|
+
body["latest_updates"] = [v.as_dict() for v in self.latest_updates]
|
|
2440
|
+
if self.name is not None:
|
|
2441
|
+
body["name"] = self.name
|
|
2442
|
+
if self.pipeline_id is not None:
|
|
2443
|
+
body["pipeline_id"] = self.pipeline_id
|
|
2444
|
+
if self.run_as_user_name is not None:
|
|
2445
|
+
body["run_as_user_name"] = self.run_as_user_name
|
|
2446
|
+
if self.state is not None:
|
|
2447
|
+
body["state"] = self.state.value
|
|
2028
2448
|
return body
|
|
2029
2449
|
|
|
2030
2450
|
def as_shallow_dict(self) -> dict:
|
|
2031
2451
|
"""Serializes the PipelineStateInfo into a shallow dictionary of its immediate attributes."""
|
|
2032
2452
|
body = {}
|
|
2033
|
-
if self.cluster_id is not None:
|
|
2034
|
-
|
|
2035
|
-
if self.
|
|
2036
|
-
|
|
2037
|
-
if self.
|
|
2038
|
-
|
|
2039
|
-
if self.
|
|
2040
|
-
|
|
2453
|
+
if self.cluster_id is not None:
|
|
2454
|
+
body["cluster_id"] = self.cluster_id
|
|
2455
|
+
if self.creator_user_name is not None:
|
|
2456
|
+
body["creator_user_name"] = self.creator_user_name
|
|
2457
|
+
if self.health is not None:
|
|
2458
|
+
body["health"] = self.health
|
|
2459
|
+
if self.latest_updates:
|
|
2460
|
+
body["latest_updates"] = self.latest_updates
|
|
2461
|
+
if self.name is not None:
|
|
2462
|
+
body["name"] = self.name
|
|
2463
|
+
if self.pipeline_id is not None:
|
|
2464
|
+
body["pipeline_id"] = self.pipeline_id
|
|
2465
|
+
if self.run_as_user_name is not None:
|
|
2466
|
+
body["run_as_user_name"] = self.run_as_user_name
|
|
2467
|
+
if self.state is not None:
|
|
2468
|
+
body["state"] = self.state
|
|
2041
2469
|
return body
|
|
2042
2470
|
|
|
2043
2471
|
@classmethod
|
|
2044
|
-
def from_dict(cls, d: Dict[str,
|
|
2472
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineStateInfo:
|
|
2045
2473
|
"""Deserializes the PipelineStateInfo from a dictionary."""
|
|
2046
|
-
return cls(
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2474
|
+
return cls(
|
|
2475
|
+
cluster_id=d.get("cluster_id", None),
|
|
2476
|
+
creator_user_name=d.get("creator_user_name", None),
|
|
2477
|
+
health=_enum(d, "health", PipelineStateInfoHealth),
|
|
2478
|
+
latest_updates=_repeated_dict(d, "latest_updates", UpdateStateInfo),
|
|
2479
|
+
name=d.get("name", None),
|
|
2480
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
2481
|
+
run_as_user_name=d.get("run_as_user_name", None),
|
|
2482
|
+
state=_enum(d, "state", PipelineState),
|
|
2483
|
+
)
|
|
2054
2484
|
|
|
2055
2485
|
|
|
2056
2486
|
class PipelineStateInfoHealth(Enum):
|
|
2057
2487
|
"""The health of a pipeline."""
|
|
2058
2488
|
|
|
2059
|
-
HEALTHY =
|
|
2060
|
-
UNHEALTHY =
|
|
2489
|
+
HEALTHY = "HEALTHY"
|
|
2490
|
+
UNHEALTHY = "UNHEALTHY"
|
|
2061
2491
|
|
|
2062
2492
|
|
|
2063
2493
|
@dataclass
|
|
@@ -2069,21 +2499,25 @@ class PipelineTrigger:
|
|
|
2069
2499
|
def as_dict(self) -> dict:
|
|
2070
2500
|
"""Serializes the PipelineTrigger into a dictionary suitable for use as a JSON request body."""
|
|
2071
2501
|
body = {}
|
|
2072
|
-
if self.cron:
|
|
2073
|
-
|
|
2502
|
+
if self.cron:
|
|
2503
|
+
body["cron"] = self.cron.as_dict()
|
|
2504
|
+
if self.manual:
|
|
2505
|
+
body["manual"] = self.manual.as_dict()
|
|
2074
2506
|
return body
|
|
2075
2507
|
|
|
2076
2508
|
def as_shallow_dict(self) -> dict:
|
|
2077
2509
|
"""Serializes the PipelineTrigger into a shallow dictionary of its immediate attributes."""
|
|
2078
2510
|
body = {}
|
|
2079
|
-
if self.cron:
|
|
2080
|
-
|
|
2511
|
+
if self.cron:
|
|
2512
|
+
body["cron"] = self.cron
|
|
2513
|
+
if self.manual:
|
|
2514
|
+
body["manual"] = self.manual
|
|
2081
2515
|
return body
|
|
2082
2516
|
|
|
2083
2517
|
@classmethod
|
|
2084
|
-
def from_dict(cls, d: Dict[str,
|
|
2518
|
+
def from_dict(cls, d: Dict[str, Any]) -> PipelineTrigger:
|
|
2085
2519
|
"""Deserializes the PipelineTrigger from a dictionary."""
|
|
2086
|
-
return cls(cron=_from_dict(d,
|
|
2520
|
+
return cls(cron=_from_dict(d, "cron", CronTrigger), manual=_from_dict(d, "manual", ManualTrigger))
|
|
2087
2521
|
|
|
2088
2522
|
|
|
2089
2523
|
@dataclass
|
|
@@ -2107,31 +2541,43 @@ class ReportSpec:
|
|
|
2107
2541
|
def as_dict(self) -> dict:
|
|
2108
2542
|
"""Serializes the ReportSpec into a dictionary suitable for use as a JSON request body."""
|
|
2109
2543
|
body = {}
|
|
2110
|
-
if self.destination_catalog is not None:
|
|
2111
|
-
|
|
2112
|
-
if self.
|
|
2113
|
-
|
|
2114
|
-
if self.
|
|
2544
|
+
if self.destination_catalog is not None:
|
|
2545
|
+
body["destination_catalog"] = self.destination_catalog
|
|
2546
|
+
if self.destination_schema is not None:
|
|
2547
|
+
body["destination_schema"] = self.destination_schema
|
|
2548
|
+
if self.destination_table is not None:
|
|
2549
|
+
body["destination_table"] = self.destination_table
|
|
2550
|
+
if self.source_url is not None:
|
|
2551
|
+
body["source_url"] = self.source_url
|
|
2552
|
+
if self.table_configuration:
|
|
2553
|
+
body["table_configuration"] = self.table_configuration.as_dict()
|
|
2115
2554
|
return body
|
|
2116
2555
|
|
|
2117
2556
|
def as_shallow_dict(self) -> dict:
|
|
2118
2557
|
"""Serializes the ReportSpec into a shallow dictionary of its immediate attributes."""
|
|
2119
2558
|
body = {}
|
|
2120
|
-
if self.destination_catalog is not None:
|
|
2121
|
-
|
|
2122
|
-
if self.
|
|
2123
|
-
|
|
2124
|
-
if self.
|
|
2559
|
+
if self.destination_catalog is not None:
|
|
2560
|
+
body["destination_catalog"] = self.destination_catalog
|
|
2561
|
+
if self.destination_schema is not None:
|
|
2562
|
+
body["destination_schema"] = self.destination_schema
|
|
2563
|
+
if self.destination_table is not None:
|
|
2564
|
+
body["destination_table"] = self.destination_table
|
|
2565
|
+
if self.source_url is not None:
|
|
2566
|
+
body["source_url"] = self.source_url
|
|
2567
|
+
if self.table_configuration:
|
|
2568
|
+
body["table_configuration"] = self.table_configuration
|
|
2125
2569
|
return body
|
|
2126
2570
|
|
|
2127
2571
|
@classmethod
|
|
2128
|
-
def from_dict(cls, d: Dict[str,
|
|
2572
|
+
def from_dict(cls, d: Dict[str, Any]) -> ReportSpec:
|
|
2129
2573
|
"""Deserializes the ReportSpec from a dictionary."""
|
|
2130
|
-
return cls(
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2574
|
+
return cls(
|
|
2575
|
+
destination_catalog=d.get("destination_catalog", None),
|
|
2576
|
+
destination_schema=d.get("destination_schema", None),
|
|
2577
|
+
destination_table=d.get("destination_table", None),
|
|
2578
|
+
source_url=d.get("source_url", None),
|
|
2579
|
+
table_configuration=_from_dict(d, "table_configuration", TableSpecificConfig),
|
|
2580
|
+
)
|
|
2135
2581
|
|
|
2136
2582
|
|
|
2137
2583
|
@dataclass
|
|
@@ -2152,25 +2598,33 @@ class RestartWindow:
|
|
|
2152
2598
|
def as_dict(self) -> dict:
|
|
2153
2599
|
"""Serializes the RestartWindow into a dictionary suitable for use as a JSON request body."""
|
|
2154
2600
|
body = {}
|
|
2155
|
-
if self.days_of_week:
|
|
2156
|
-
|
|
2157
|
-
if self.
|
|
2601
|
+
if self.days_of_week:
|
|
2602
|
+
body["days_of_week"] = [v.value for v in self.days_of_week]
|
|
2603
|
+
if self.start_hour is not None:
|
|
2604
|
+
body["start_hour"] = self.start_hour
|
|
2605
|
+
if self.time_zone_id is not None:
|
|
2606
|
+
body["time_zone_id"] = self.time_zone_id
|
|
2158
2607
|
return body
|
|
2159
2608
|
|
|
2160
2609
|
def as_shallow_dict(self) -> dict:
|
|
2161
2610
|
"""Serializes the RestartWindow into a shallow dictionary of its immediate attributes."""
|
|
2162
2611
|
body = {}
|
|
2163
|
-
if self.days_of_week:
|
|
2164
|
-
|
|
2165
|
-
if self.
|
|
2612
|
+
if self.days_of_week:
|
|
2613
|
+
body["days_of_week"] = self.days_of_week
|
|
2614
|
+
if self.start_hour is not None:
|
|
2615
|
+
body["start_hour"] = self.start_hour
|
|
2616
|
+
if self.time_zone_id is not None:
|
|
2617
|
+
body["time_zone_id"] = self.time_zone_id
|
|
2166
2618
|
return body
|
|
2167
2619
|
|
|
2168
2620
|
@classmethod
|
|
2169
|
-
def from_dict(cls, d: Dict[str,
|
|
2621
|
+
def from_dict(cls, d: Dict[str, Any]) -> RestartWindow:
|
|
2170
2622
|
"""Deserializes the RestartWindow from a dictionary."""
|
|
2171
|
-
return cls(
|
|
2172
|
-
|
|
2173
|
-
|
|
2623
|
+
return cls(
|
|
2624
|
+
days_of_week=_repeated_enum(d, "days_of_week", DayOfWeek),
|
|
2625
|
+
start_hour=d.get("start_hour", None),
|
|
2626
|
+
time_zone_id=d.get("time_zone_id", None),
|
|
2627
|
+
)
|
|
2174
2628
|
|
|
2175
2629
|
|
|
2176
2630
|
@dataclass
|
|
@@ -2178,7 +2632,7 @@ class RunAs:
|
|
|
2178
2632
|
"""Write-only setting, available only in Create/Update calls. Specifies the user or service
|
|
2179
2633
|
principal that the pipeline runs as. If not specified, the pipeline runs as the user who created
|
|
2180
2634
|
the pipeline.
|
|
2181
|
-
|
|
2635
|
+
|
|
2182
2636
|
Only `user_name` or `service_principal_name` can be specified. If both are specified, an error
|
|
2183
2637
|
is thrown."""
|
|
2184
2638
|
|
|
@@ -2193,23 +2647,24 @@ class RunAs:
|
|
|
2193
2647
|
"""Serializes the RunAs into a dictionary suitable for use as a JSON request body."""
|
|
2194
2648
|
body = {}
|
|
2195
2649
|
if self.service_principal_name is not None:
|
|
2196
|
-
body[
|
|
2197
|
-
if self.user_name is not None:
|
|
2650
|
+
body["service_principal_name"] = self.service_principal_name
|
|
2651
|
+
if self.user_name is not None:
|
|
2652
|
+
body["user_name"] = self.user_name
|
|
2198
2653
|
return body
|
|
2199
2654
|
|
|
2200
2655
|
def as_shallow_dict(self) -> dict:
|
|
2201
2656
|
"""Serializes the RunAs into a shallow dictionary of its immediate attributes."""
|
|
2202
2657
|
body = {}
|
|
2203
2658
|
if self.service_principal_name is not None:
|
|
2204
|
-
body[
|
|
2205
|
-
if self.user_name is not None:
|
|
2659
|
+
body["service_principal_name"] = self.service_principal_name
|
|
2660
|
+
if self.user_name is not None:
|
|
2661
|
+
body["user_name"] = self.user_name
|
|
2206
2662
|
return body
|
|
2207
2663
|
|
|
2208
2664
|
@classmethod
|
|
2209
|
-
def from_dict(cls, d: Dict[str,
|
|
2665
|
+
def from_dict(cls, d: Dict[str, Any]) -> RunAs:
|
|
2210
2666
|
"""Deserializes the RunAs from a dictionary."""
|
|
2211
|
-
return cls(service_principal_name=d.get(
|
|
2212
|
-
user_name=d.get('user_name', None))
|
|
2667
|
+
return cls(service_principal_name=d.get("service_principal_name", None), user_name=d.get("user_name", None))
|
|
2213
2668
|
|
|
2214
2669
|
|
|
2215
2670
|
@dataclass
|
|
@@ -2236,31 +2691,43 @@ class SchemaSpec:
|
|
|
2236
2691
|
def as_dict(self) -> dict:
|
|
2237
2692
|
"""Serializes the SchemaSpec into a dictionary suitable for use as a JSON request body."""
|
|
2238
2693
|
body = {}
|
|
2239
|
-
if self.destination_catalog is not None:
|
|
2240
|
-
|
|
2241
|
-
if self.
|
|
2242
|
-
|
|
2243
|
-
if self.
|
|
2694
|
+
if self.destination_catalog is not None:
|
|
2695
|
+
body["destination_catalog"] = self.destination_catalog
|
|
2696
|
+
if self.destination_schema is not None:
|
|
2697
|
+
body["destination_schema"] = self.destination_schema
|
|
2698
|
+
if self.source_catalog is not None:
|
|
2699
|
+
body["source_catalog"] = self.source_catalog
|
|
2700
|
+
if self.source_schema is not None:
|
|
2701
|
+
body["source_schema"] = self.source_schema
|
|
2702
|
+
if self.table_configuration:
|
|
2703
|
+
body["table_configuration"] = self.table_configuration.as_dict()
|
|
2244
2704
|
return body
|
|
2245
2705
|
|
|
2246
2706
|
def as_shallow_dict(self) -> dict:
|
|
2247
2707
|
"""Serializes the SchemaSpec into a shallow dictionary of its immediate attributes."""
|
|
2248
2708
|
body = {}
|
|
2249
|
-
if self.destination_catalog is not None:
|
|
2250
|
-
|
|
2251
|
-
if self.
|
|
2252
|
-
|
|
2253
|
-
if self.
|
|
2709
|
+
if self.destination_catalog is not None:
|
|
2710
|
+
body["destination_catalog"] = self.destination_catalog
|
|
2711
|
+
if self.destination_schema is not None:
|
|
2712
|
+
body["destination_schema"] = self.destination_schema
|
|
2713
|
+
if self.source_catalog is not None:
|
|
2714
|
+
body["source_catalog"] = self.source_catalog
|
|
2715
|
+
if self.source_schema is not None:
|
|
2716
|
+
body["source_schema"] = self.source_schema
|
|
2717
|
+
if self.table_configuration:
|
|
2718
|
+
body["table_configuration"] = self.table_configuration
|
|
2254
2719
|
return body
|
|
2255
2720
|
|
|
2256
2721
|
@classmethod
|
|
2257
|
-
def from_dict(cls, d: Dict[str,
|
|
2722
|
+
def from_dict(cls, d: Dict[str, Any]) -> SchemaSpec:
|
|
2258
2723
|
"""Deserializes the SchemaSpec from a dictionary."""
|
|
2259
|
-
return cls(
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2724
|
+
return cls(
|
|
2725
|
+
destination_catalog=d.get("destination_catalog", None),
|
|
2726
|
+
destination_schema=d.get("destination_schema", None),
|
|
2727
|
+
source_catalog=d.get("source_catalog", None),
|
|
2728
|
+
source_schema=d.get("source_schema", None),
|
|
2729
|
+
table_configuration=_from_dict(d, "table_configuration", TableSpecificConfig),
|
|
2730
|
+
)
|
|
2264
2731
|
|
|
2265
2732
|
|
|
2266
2733
|
@dataclass
|
|
@@ -2274,22 +2741,28 @@ class Sequencing:
|
|
|
2274
2741
|
def as_dict(self) -> dict:
|
|
2275
2742
|
"""Serializes the Sequencing into a dictionary suitable for use as a JSON request body."""
|
|
2276
2743
|
body = {}
|
|
2277
|
-
if self.control_plane_seq_no is not None:
|
|
2278
|
-
|
|
2744
|
+
if self.control_plane_seq_no is not None:
|
|
2745
|
+
body["control_plane_seq_no"] = self.control_plane_seq_no
|
|
2746
|
+
if self.data_plane_id:
|
|
2747
|
+
body["data_plane_id"] = self.data_plane_id.as_dict()
|
|
2279
2748
|
return body
|
|
2280
2749
|
|
|
2281
2750
|
def as_shallow_dict(self) -> dict:
|
|
2282
2751
|
"""Serializes the Sequencing into a shallow dictionary of its immediate attributes."""
|
|
2283
2752
|
body = {}
|
|
2284
|
-
if self.control_plane_seq_no is not None:
|
|
2285
|
-
|
|
2753
|
+
if self.control_plane_seq_no is not None:
|
|
2754
|
+
body["control_plane_seq_no"] = self.control_plane_seq_no
|
|
2755
|
+
if self.data_plane_id:
|
|
2756
|
+
body["data_plane_id"] = self.data_plane_id
|
|
2286
2757
|
return body
|
|
2287
2758
|
|
|
2288
2759
|
@classmethod
|
|
2289
|
-
def from_dict(cls, d: Dict[str,
|
|
2760
|
+
def from_dict(cls, d: Dict[str, Any]) -> Sequencing:
|
|
2290
2761
|
"""Deserializes the Sequencing from a dictionary."""
|
|
2291
|
-
return cls(
|
|
2292
|
-
|
|
2762
|
+
return cls(
|
|
2763
|
+
control_plane_seq_no=d.get("control_plane_seq_no", None),
|
|
2764
|
+
data_plane_id=_from_dict(d, "data_plane_id", DataPlaneId),
|
|
2765
|
+
)
|
|
2293
2766
|
|
|
2294
2767
|
|
|
2295
2768
|
@dataclass
|
|
@@ -2306,25 +2779,33 @@ class SerializedException:
|
|
|
2306
2779
|
def as_dict(self) -> dict:
|
|
2307
2780
|
"""Serializes the SerializedException into a dictionary suitable for use as a JSON request body."""
|
|
2308
2781
|
body = {}
|
|
2309
|
-
if self.class_name is not None:
|
|
2310
|
-
|
|
2311
|
-
if self.
|
|
2782
|
+
if self.class_name is not None:
|
|
2783
|
+
body["class_name"] = self.class_name
|
|
2784
|
+
if self.message is not None:
|
|
2785
|
+
body["message"] = self.message
|
|
2786
|
+
if self.stack:
|
|
2787
|
+
body["stack"] = [v.as_dict() for v in self.stack]
|
|
2312
2788
|
return body
|
|
2313
2789
|
|
|
2314
2790
|
def as_shallow_dict(self) -> dict:
|
|
2315
2791
|
"""Serializes the SerializedException into a shallow dictionary of its immediate attributes."""
|
|
2316
2792
|
body = {}
|
|
2317
|
-
if self.class_name is not None:
|
|
2318
|
-
|
|
2319
|
-
if self.
|
|
2793
|
+
if self.class_name is not None:
|
|
2794
|
+
body["class_name"] = self.class_name
|
|
2795
|
+
if self.message is not None:
|
|
2796
|
+
body["message"] = self.message
|
|
2797
|
+
if self.stack:
|
|
2798
|
+
body["stack"] = self.stack
|
|
2320
2799
|
return body
|
|
2321
2800
|
|
|
2322
2801
|
@classmethod
|
|
2323
|
-
def from_dict(cls, d: Dict[str,
|
|
2802
|
+
def from_dict(cls, d: Dict[str, Any]) -> SerializedException:
|
|
2324
2803
|
"""Deserializes the SerializedException from a dictionary."""
|
|
2325
|
-
return cls(
|
|
2326
|
-
|
|
2327
|
-
|
|
2804
|
+
return cls(
|
|
2805
|
+
class_name=d.get("class_name", None),
|
|
2806
|
+
message=d.get("message", None),
|
|
2807
|
+
stack=_repeated_dict(d, "stack", StackFrame),
|
|
2808
|
+
)
|
|
2328
2809
|
|
|
2329
2810
|
|
|
2330
2811
|
@dataclass
|
|
@@ -2344,28 +2825,38 @@ class StackFrame:
|
|
|
2344
2825
|
def as_dict(self) -> dict:
|
|
2345
2826
|
"""Serializes the StackFrame into a dictionary suitable for use as a JSON request body."""
|
|
2346
2827
|
body = {}
|
|
2347
|
-
if self.declaring_class is not None:
|
|
2348
|
-
|
|
2349
|
-
if self.
|
|
2350
|
-
|
|
2828
|
+
if self.declaring_class is not None:
|
|
2829
|
+
body["declaring_class"] = self.declaring_class
|
|
2830
|
+
if self.file_name is not None:
|
|
2831
|
+
body["file_name"] = self.file_name
|
|
2832
|
+
if self.line_number is not None:
|
|
2833
|
+
body["line_number"] = self.line_number
|
|
2834
|
+
if self.method_name is not None:
|
|
2835
|
+
body["method_name"] = self.method_name
|
|
2351
2836
|
return body
|
|
2352
2837
|
|
|
2353
2838
|
def as_shallow_dict(self) -> dict:
|
|
2354
2839
|
"""Serializes the StackFrame into a shallow dictionary of its immediate attributes."""
|
|
2355
2840
|
body = {}
|
|
2356
|
-
if self.declaring_class is not None:
|
|
2357
|
-
|
|
2358
|
-
if self.
|
|
2359
|
-
|
|
2841
|
+
if self.declaring_class is not None:
|
|
2842
|
+
body["declaring_class"] = self.declaring_class
|
|
2843
|
+
if self.file_name is not None:
|
|
2844
|
+
body["file_name"] = self.file_name
|
|
2845
|
+
if self.line_number is not None:
|
|
2846
|
+
body["line_number"] = self.line_number
|
|
2847
|
+
if self.method_name is not None:
|
|
2848
|
+
body["method_name"] = self.method_name
|
|
2360
2849
|
return body
|
|
2361
2850
|
|
|
2362
2851
|
@classmethod
|
|
2363
|
-
def from_dict(cls, d: Dict[str,
|
|
2852
|
+
def from_dict(cls, d: Dict[str, Any]) -> StackFrame:
|
|
2364
2853
|
"""Deserializes the StackFrame from a dictionary."""
|
|
2365
|
-
return cls(
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2854
|
+
return cls(
|
|
2855
|
+
declaring_class=d.get("declaring_class", None),
|
|
2856
|
+
file_name=d.get("file_name", None),
|
|
2857
|
+
line_number=d.get("line_number", None),
|
|
2858
|
+
method_name=d.get("method_name", None),
|
|
2859
|
+
)
|
|
2369
2860
|
|
|
2370
2861
|
|
|
2371
2862
|
@dataclass
|
|
@@ -2394,45 +2885,58 @@ class StartUpdate:
|
|
|
2394
2885
|
def as_dict(self) -> dict:
|
|
2395
2886
|
"""Serializes the StartUpdate into a dictionary suitable for use as a JSON request body."""
|
|
2396
2887
|
body = {}
|
|
2397
|
-
if self.cause is not None:
|
|
2398
|
-
|
|
2888
|
+
if self.cause is not None:
|
|
2889
|
+
body["cause"] = self.cause.value
|
|
2890
|
+
if self.full_refresh is not None:
|
|
2891
|
+
body["full_refresh"] = self.full_refresh
|
|
2399
2892
|
if self.full_refresh_selection:
|
|
2400
|
-
body[
|
|
2401
|
-
if self.pipeline_id is not None:
|
|
2402
|
-
|
|
2403
|
-
if self.
|
|
2893
|
+
body["full_refresh_selection"] = [v for v in self.full_refresh_selection]
|
|
2894
|
+
if self.pipeline_id is not None:
|
|
2895
|
+
body["pipeline_id"] = self.pipeline_id
|
|
2896
|
+
if self.refresh_selection:
|
|
2897
|
+
body["refresh_selection"] = [v for v in self.refresh_selection]
|
|
2898
|
+
if self.validate_only is not None:
|
|
2899
|
+
body["validate_only"] = self.validate_only
|
|
2404
2900
|
return body
|
|
2405
2901
|
|
|
2406
2902
|
def as_shallow_dict(self) -> dict:
|
|
2407
2903
|
"""Serializes the StartUpdate into a shallow dictionary of its immediate attributes."""
|
|
2408
2904
|
body = {}
|
|
2409
|
-
if self.cause is not None:
|
|
2410
|
-
|
|
2411
|
-
if self.
|
|
2412
|
-
|
|
2413
|
-
if self.
|
|
2414
|
-
|
|
2905
|
+
if self.cause is not None:
|
|
2906
|
+
body["cause"] = self.cause
|
|
2907
|
+
if self.full_refresh is not None:
|
|
2908
|
+
body["full_refresh"] = self.full_refresh
|
|
2909
|
+
if self.full_refresh_selection:
|
|
2910
|
+
body["full_refresh_selection"] = self.full_refresh_selection
|
|
2911
|
+
if self.pipeline_id is not None:
|
|
2912
|
+
body["pipeline_id"] = self.pipeline_id
|
|
2913
|
+
if self.refresh_selection:
|
|
2914
|
+
body["refresh_selection"] = self.refresh_selection
|
|
2915
|
+
if self.validate_only is not None:
|
|
2916
|
+
body["validate_only"] = self.validate_only
|
|
2415
2917
|
return body
|
|
2416
2918
|
|
|
2417
2919
|
@classmethod
|
|
2418
|
-
def from_dict(cls, d: Dict[str,
|
|
2920
|
+
def from_dict(cls, d: Dict[str, Any]) -> StartUpdate:
|
|
2419
2921
|
"""Deserializes the StartUpdate from a dictionary."""
|
|
2420
|
-
return cls(
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2922
|
+
return cls(
|
|
2923
|
+
cause=_enum(d, "cause", StartUpdateCause),
|
|
2924
|
+
full_refresh=d.get("full_refresh", None),
|
|
2925
|
+
full_refresh_selection=d.get("full_refresh_selection", None),
|
|
2926
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
2927
|
+
refresh_selection=d.get("refresh_selection", None),
|
|
2928
|
+
validate_only=d.get("validate_only", None),
|
|
2929
|
+
)
|
|
2426
2930
|
|
|
2427
2931
|
|
|
2428
2932
|
class StartUpdateCause(Enum):
|
|
2429
2933
|
|
|
2430
|
-
API_CALL =
|
|
2431
|
-
JOB_TASK =
|
|
2432
|
-
RETRY_ON_FAILURE =
|
|
2433
|
-
SCHEMA_CHANGE =
|
|
2434
|
-
SERVICE_UPGRADE =
|
|
2435
|
-
USER_ACTION =
|
|
2934
|
+
API_CALL = "API_CALL"
|
|
2935
|
+
JOB_TASK = "JOB_TASK"
|
|
2936
|
+
RETRY_ON_FAILURE = "RETRY_ON_FAILURE"
|
|
2937
|
+
SCHEMA_CHANGE = "SCHEMA_CHANGE"
|
|
2938
|
+
SERVICE_UPGRADE = "SERVICE_UPGRADE"
|
|
2939
|
+
USER_ACTION = "USER_ACTION"
|
|
2436
2940
|
|
|
2437
2941
|
|
|
2438
2942
|
@dataclass
|
|
@@ -2442,24 +2946,25 @@ class StartUpdateResponse:
|
|
|
2442
2946
|
def as_dict(self) -> dict:
|
|
2443
2947
|
"""Serializes the StartUpdateResponse into a dictionary suitable for use as a JSON request body."""
|
|
2444
2948
|
body = {}
|
|
2445
|
-
if self.update_id is not None:
|
|
2949
|
+
if self.update_id is not None:
|
|
2950
|
+
body["update_id"] = self.update_id
|
|
2446
2951
|
return body
|
|
2447
2952
|
|
|
2448
2953
|
def as_shallow_dict(self) -> dict:
|
|
2449
2954
|
"""Serializes the StartUpdateResponse into a shallow dictionary of its immediate attributes."""
|
|
2450
2955
|
body = {}
|
|
2451
|
-
if self.update_id is not None:
|
|
2956
|
+
if self.update_id is not None:
|
|
2957
|
+
body["update_id"] = self.update_id
|
|
2452
2958
|
return body
|
|
2453
2959
|
|
|
2454
2960
|
@classmethod
|
|
2455
|
-
def from_dict(cls, d: Dict[str,
|
|
2961
|
+
def from_dict(cls, d: Dict[str, Any]) -> StartUpdateResponse:
|
|
2456
2962
|
"""Deserializes the StartUpdateResponse from a dictionary."""
|
|
2457
|
-
return cls(update_id=d.get(
|
|
2963
|
+
return cls(update_id=d.get("update_id", None))
|
|
2458
2964
|
|
|
2459
2965
|
|
|
2460
2966
|
@dataclass
|
|
2461
2967
|
class StopPipelineResponse:
|
|
2462
|
-
|
|
2463
2968
|
def as_dict(self) -> dict:
|
|
2464
2969
|
"""Serializes the StopPipelineResponse into a dictionary suitable for use as a JSON request body."""
|
|
2465
2970
|
body = {}
|
|
@@ -2471,7 +2976,7 @@ class StopPipelineResponse:
|
|
|
2471
2976
|
return body
|
|
2472
2977
|
|
|
2473
2978
|
@classmethod
|
|
2474
|
-
def from_dict(cls, d: Dict[str,
|
|
2979
|
+
def from_dict(cls, d: Dict[str, Any]) -> StopPipelineResponse:
|
|
2475
2980
|
"""Deserializes the StopPipelineResponse from a dictionary."""
|
|
2476
2981
|
return cls()
|
|
2477
2982
|
|
|
@@ -2504,37 +3009,53 @@ class TableSpec:
|
|
|
2504
3009
|
def as_dict(self) -> dict:
|
|
2505
3010
|
"""Serializes the TableSpec into a dictionary suitable for use as a JSON request body."""
|
|
2506
3011
|
body = {}
|
|
2507
|
-
if self.destination_catalog is not None:
|
|
2508
|
-
|
|
2509
|
-
if self.
|
|
2510
|
-
|
|
2511
|
-
if self.
|
|
2512
|
-
|
|
2513
|
-
if self.
|
|
3012
|
+
if self.destination_catalog is not None:
|
|
3013
|
+
body["destination_catalog"] = self.destination_catalog
|
|
3014
|
+
if self.destination_schema is not None:
|
|
3015
|
+
body["destination_schema"] = self.destination_schema
|
|
3016
|
+
if self.destination_table is not None:
|
|
3017
|
+
body["destination_table"] = self.destination_table
|
|
3018
|
+
if self.source_catalog is not None:
|
|
3019
|
+
body["source_catalog"] = self.source_catalog
|
|
3020
|
+
if self.source_schema is not None:
|
|
3021
|
+
body["source_schema"] = self.source_schema
|
|
3022
|
+
if self.source_table is not None:
|
|
3023
|
+
body["source_table"] = self.source_table
|
|
3024
|
+
if self.table_configuration:
|
|
3025
|
+
body["table_configuration"] = self.table_configuration.as_dict()
|
|
2514
3026
|
return body
|
|
2515
3027
|
|
|
2516
3028
|
def as_shallow_dict(self) -> dict:
|
|
2517
3029
|
"""Serializes the TableSpec into a shallow dictionary of its immediate attributes."""
|
|
2518
3030
|
body = {}
|
|
2519
|
-
if self.destination_catalog is not None:
|
|
2520
|
-
|
|
2521
|
-
if self.
|
|
2522
|
-
|
|
2523
|
-
if self.
|
|
2524
|
-
|
|
2525
|
-
if self.
|
|
3031
|
+
if self.destination_catalog is not None:
|
|
3032
|
+
body["destination_catalog"] = self.destination_catalog
|
|
3033
|
+
if self.destination_schema is not None:
|
|
3034
|
+
body["destination_schema"] = self.destination_schema
|
|
3035
|
+
if self.destination_table is not None:
|
|
3036
|
+
body["destination_table"] = self.destination_table
|
|
3037
|
+
if self.source_catalog is not None:
|
|
3038
|
+
body["source_catalog"] = self.source_catalog
|
|
3039
|
+
if self.source_schema is not None:
|
|
3040
|
+
body["source_schema"] = self.source_schema
|
|
3041
|
+
if self.source_table is not None:
|
|
3042
|
+
body["source_table"] = self.source_table
|
|
3043
|
+
if self.table_configuration:
|
|
3044
|
+
body["table_configuration"] = self.table_configuration
|
|
2526
3045
|
return body
|
|
2527
3046
|
|
|
2528
3047
|
@classmethod
|
|
2529
|
-
def from_dict(cls, d: Dict[str,
|
|
3048
|
+
def from_dict(cls, d: Dict[str, Any]) -> TableSpec:
|
|
2530
3049
|
"""Deserializes the TableSpec from a dictionary."""
|
|
2531
|
-
return cls(
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
3050
|
+
return cls(
|
|
3051
|
+
destination_catalog=d.get("destination_catalog", None),
|
|
3052
|
+
destination_schema=d.get("destination_schema", None),
|
|
3053
|
+
destination_table=d.get("destination_table", None),
|
|
3054
|
+
source_catalog=d.get("source_catalog", None),
|
|
3055
|
+
source_schema=d.get("source_schema", None),
|
|
3056
|
+
source_table=d.get("source_table", None),
|
|
3057
|
+
table_configuration=_from_dict(d, "table_configuration", TableSpecificConfig),
|
|
3058
|
+
)
|
|
2538
3059
|
|
|
2539
3060
|
|
|
2540
3061
|
@dataclass
|
|
@@ -2556,37 +3077,45 @@ class TableSpecificConfig:
|
|
|
2556
3077
|
def as_dict(self) -> dict:
|
|
2557
3078
|
"""Serializes the TableSpecificConfig into a dictionary suitable for use as a JSON request body."""
|
|
2558
3079
|
body = {}
|
|
2559
|
-
if self.primary_keys:
|
|
3080
|
+
if self.primary_keys:
|
|
3081
|
+
body["primary_keys"] = [v for v in self.primary_keys]
|
|
2560
3082
|
if self.salesforce_include_formula_fields is not None:
|
|
2561
|
-
body[
|
|
2562
|
-
if self.scd_type is not None:
|
|
2563
|
-
|
|
3083
|
+
body["salesforce_include_formula_fields"] = self.salesforce_include_formula_fields
|
|
3084
|
+
if self.scd_type is not None:
|
|
3085
|
+
body["scd_type"] = self.scd_type.value
|
|
3086
|
+
if self.sequence_by:
|
|
3087
|
+
body["sequence_by"] = [v for v in self.sequence_by]
|
|
2564
3088
|
return body
|
|
2565
3089
|
|
|
2566
3090
|
def as_shallow_dict(self) -> dict:
|
|
2567
3091
|
"""Serializes the TableSpecificConfig into a shallow dictionary of its immediate attributes."""
|
|
2568
3092
|
body = {}
|
|
2569
|
-
if self.primary_keys:
|
|
3093
|
+
if self.primary_keys:
|
|
3094
|
+
body["primary_keys"] = self.primary_keys
|
|
2570
3095
|
if self.salesforce_include_formula_fields is not None:
|
|
2571
|
-
body[
|
|
2572
|
-
if self.scd_type is not None:
|
|
2573
|
-
|
|
3096
|
+
body["salesforce_include_formula_fields"] = self.salesforce_include_formula_fields
|
|
3097
|
+
if self.scd_type is not None:
|
|
3098
|
+
body["scd_type"] = self.scd_type
|
|
3099
|
+
if self.sequence_by:
|
|
3100
|
+
body["sequence_by"] = self.sequence_by
|
|
2574
3101
|
return body
|
|
2575
3102
|
|
|
2576
3103
|
@classmethod
|
|
2577
|
-
def from_dict(cls, d: Dict[str,
|
|
3104
|
+
def from_dict(cls, d: Dict[str, Any]) -> TableSpecificConfig:
|
|
2578
3105
|
"""Deserializes the TableSpecificConfig from a dictionary."""
|
|
2579
|
-
return cls(
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
3106
|
+
return cls(
|
|
3107
|
+
primary_keys=d.get("primary_keys", None),
|
|
3108
|
+
salesforce_include_formula_fields=d.get("salesforce_include_formula_fields", None),
|
|
3109
|
+
scd_type=_enum(d, "scd_type", TableSpecificConfigScdType),
|
|
3110
|
+
sequence_by=d.get("sequence_by", None),
|
|
3111
|
+
)
|
|
2583
3112
|
|
|
2584
3113
|
|
|
2585
3114
|
class TableSpecificConfigScdType(Enum):
|
|
2586
3115
|
"""The SCD type to use to ingest the table."""
|
|
2587
3116
|
|
|
2588
|
-
SCD_TYPE_1 =
|
|
2589
|
-
SCD_TYPE_2 =
|
|
3117
|
+
SCD_TYPE_1 = "SCD_TYPE_1"
|
|
3118
|
+
SCD_TYPE_2 = "SCD_TYPE_2"
|
|
2590
3119
|
|
|
2591
3120
|
|
|
2592
3121
|
@dataclass
|
|
@@ -2633,77 +3162,100 @@ class UpdateInfo:
|
|
|
2633
3162
|
def as_dict(self) -> dict:
|
|
2634
3163
|
"""Serializes the UpdateInfo into a dictionary suitable for use as a JSON request body."""
|
|
2635
3164
|
body = {}
|
|
2636
|
-
if self.cause is not None:
|
|
2637
|
-
|
|
2638
|
-
if self.
|
|
2639
|
-
|
|
2640
|
-
if self.
|
|
3165
|
+
if self.cause is not None:
|
|
3166
|
+
body["cause"] = self.cause.value
|
|
3167
|
+
if self.cluster_id is not None:
|
|
3168
|
+
body["cluster_id"] = self.cluster_id
|
|
3169
|
+
if self.config:
|
|
3170
|
+
body["config"] = self.config.as_dict()
|
|
3171
|
+
if self.creation_time is not None:
|
|
3172
|
+
body["creation_time"] = self.creation_time
|
|
3173
|
+
if self.full_refresh is not None:
|
|
3174
|
+
body["full_refresh"] = self.full_refresh
|
|
2641
3175
|
if self.full_refresh_selection:
|
|
2642
|
-
body[
|
|
2643
|
-
if self.pipeline_id is not None:
|
|
2644
|
-
|
|
2645
|
-
if self.
|
|
2646
|
-
|
|
2647
|
-
if self.
|
|
3176
|
+
body["full_refresh_selection"] = [v for v in self.full_refresh_selection]
|
|
3177
|
+
if self.pipeline_id is not None:
|
|
3178
|
+
body["pipeline_id"] = self.pipeline_id
|
|
3179
|
+
if self.refresh_selection:
|
|
3180
|
+
body["refresh_selection"] = [v for v in self.refresh_selection]
|
|
3181
|
+
if self.state is not None:
|
|
3182
|
+
body["state"] = self.state.value
|
|
3183
|
+
if self.update_id is not None:
|
|
3184
|
+
body["update_id"] = self.update_id
|
|
3185
|
+
if self.validate_only is not None:
|
|
3186
|
+
body["validate_only"] = self.validate_only
|
|
2648
3187
|
return body
|
|
2649
3188
|
|
|
2650
3189
|
def as_shallow_dict(self) -> dict:
|
|
2651
3190
|
"""Serializes the UpdateInfo into a shallow dictionary of its immediate attributes."""
|
|
2652
3191
|
body = {}
|
|
2653
|
-
if self.cause is not None:
|
|
2654
|
-
|
|
2655
|
-
if self.
|
|
2656
|
-
|
|
2657
|
-
if self.
|
|
2658
|
-
|
|
2659
|
-
if self.
|
|
2660
|
-
|
|
2661
|
-
if self.
|
|
2662
|
-
|
|
2663
|
-
if self.
|
|
3192
|
+
if self.cause is not None:
|
|
3193
|
+
body["cause"] = self.cause
|
|
3194
|
+
if self.cluster_id is not None:
|
|
3195
|
+
body["cluster_id"] = self.cluster_id
|
|
3196
|
+
if self.config:
|
|
3197
|
+
body["config"] = self.config
|
|
3198
|
+
if self.creation_time is not None:
|
|
3199
|
+
body["creation_time"] = self.creation_time
|
|
3200
|
+
if self.full_refresh is not None:
|
|
3201
|
+
body["full_refresh"] = self.full_refresh
|
|
3202
|
+
if self.full_refresh_selection:
|
|
3203
|
+
body["full_refresh_selection"] = self.full_refresh_selection
|
|
3204
|
+
if self.pipeline_id is not None:
|
|
3205
|
+
body["pipeline_id"] = self.pipeline_id
|
|
3206
|
+
if self.refresh_selection:
|
|
3207
|
+
body["refresh_selection"] = self.refresh_selection
|
|
3208
|
+
if self.state is not None:
|
|
3209
|
+
body["state"] = self.state
|
|
3210
|
+
if self.update_id is not None:
|
|
3211
|
+
body["update_id"] = self.update_id
|
|
3212
|
+
if self.validate_only is not None:
|
|
3213
|
+
body["validate_only"] = self.validate_only
|
|
2664
3214
|
return body
|
|
2665
3215
|
|
|
2666
3216
|
@classmethod
|
|
2667
|
-
def from_dict(cls, d: Dict[str,
|
|
3217
|
+
def from_dict(cls, d: Dict[str, Any]) -> UpdateInfo:
|
|
2668
3218
|
"""Deserializes the UpdateInfo from a dictionary."""
|
|
2669
|
-
return cls(
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
3219
|
+
return cls(
|
|
3220
|
+
cause=_enum(d, "cause", UpdateInfoCause),
|
|
3221
|
+
cluster_id=d.get("cluster_id", None),
|
|
3222
|
+
config=_from_dict(d, "config", PipelineSpec),
|
|
3223
|
+
creation_time=d.get("creation_time", None),
|
|
3224
|
+
full_refresh=d.get("full_refresh", None),
|
|
3225
|
+
full_refresh_selection=d.get("full_refresh_selection", None),
|
|
3226
|
+
pipeline_id=d.get("pipeline_id", None),
|
|
3227
|
+
refresh_selection=d.get("refresh_selection", None),
|
|
3228
|
+
state=_enum(d, "state", UpdateInfoState),
|
|
3229
|
+
update_id=d.get("update_id", None),
|
|
3230
|
+
validate_only=d.get("validate_only", None),
|
|
3231
|
+
)
|
|
2680
3232
|
|
|
2681
3233
|
|
|
2682
3234
|
class UpdateInfoCause(Enum):
|
|
2683
3235
|
"""What triggered this update."""
|
|
2684
3236
|
|
|
2685
|
-
API_CALL =
|
|
2686
|
-
JOB_TASK =
|
|
2687
|
-
RETRY_ON_FAILURE =
|
|
2688
|
-
SCHEMA_CHANGE =
|
|
2689
|
-
SERVICE_UPGRADE =
|
|
2690
|
-
USER_ACTION =
|
|
3237
|
+
API_CALL = "API_CALL"
|
|
3238
|
+
JOB_TASK = "JOB_TASK"
|
|
3239
|
+
RETRY_ON_FAILURE = "RETRY_ON_FAILURE"
|
|
3240
|
+
SCHEMA_CHANGE = "SCHEMA_CHANGE"
|
|
3241
|
+
SERVICE_UPGRADE = "SERVICE_UPGRADE"
|
|
3242
|
+
USER_ACTION = "USER_ACTION"
|
|
2691
3243
|
|
|
2692
3244
|
|
|
2693
3245
|
class UpdateInfoState(Enum):
|
|
2694
3246
|
"""The update state."""
|
|
2695
3247
|
|
|
2696
|
-
CANCELED =
|
|
2697
|
-
COMPLETED =
|
|
2698
|
-
CREATED =
|
|
2699
|
-
FAILED =
|
|
2700
|
-
INITIALIZING =
|
|
2701
|
-
QUEUED =
|
|
2702
|
-
RESETTING =
|
|
2703
|
-
RUNNING =
|
|
2704
|
-
SETTING_UP_TABLES =
|
|
2705
|
-
STOPPING =
|
|
2706
|
-
WAITING_FOR_RESOURCES =
|
|
3248
|
+
CANCELED = "CANCELED"
|
|
3249
|
+
COMPLETED = "COMPLETED"
|
|
3250
|
+
CREATED = "CREATED"
|
|
3251
|
+
FAILED = "FAILED"
|
|
3252
|
+
INITIALIZING = "INITIALIZING"
|
|
3253
|
+
QUEUED = "QUEUED"
|
|
3254
|
+
RESETTING = "RESETTING"
|
|
3255
|
+
RUNNING = "RUNNING"
|
|
3256
|
+
SETTING_UP_TABLES = "SETTING_UP_TABLES"
|
|
3257
|
+
STOPPING = "STOPPING"
|
|
3258
|
+
WAITING_FOR_RESOURCES = "WAITING_FOR_RESOURCES"
|
|
2707
3259
|
|
|
2708
3260
|
|
|
2709
3261
|
@dataclass
|
|
@@ -2717,49 +3269,57 @@ class UpdateStateInfo:
|
|
|
2717
3269
|
def as_dict(self) -> dict:
|
|
2718
3270
|
"""Serializes the UpdateStateInfo into a dictionary suitable for use as a JSON request body."""
|
|
2719
3271
|
body = {}
|
|
2720
|
-
if self.creation_time is not None:
|
|
2721
|
-
|
|
2722
|
-
if self.
|
|
3272
|
+
if self.creation_time is not None:
|
|
3273
|
+
body["creation_time"] = self.creation_time
|
|
3274
|
+
if self.state is not None:
|
|
3275
|
+
body["state"] = self.state.value
|
|
3276
|
+
if self.update_id is not None:
|
|
3277
|
+
body["update_id"] = self.update_id
|
|
2723
3278
|
return body
|
|
2724
3279
|
|
|
2725
3280
|
def as_shallow_dict(self) -> dict:
|
|
2726
3281
|
"""Serializes the UpdateStateInfo into a shallow dictionary of its immediate attributes."""
|
|
2727
3282
|
body = {}
|
|
2728
|
-
if self.creation_time is not None:
|
|
2729
|
-
|
|
2730
|
-
if self.
|
|
3283
|
+
if self.creation_time is not None:
|
|
3284
|
+
body["creation_time"] = self.creation_time
|
|
3285
|
+
if self.state is not None:
|
|
3286
|
+
body["state"] = self.state
|
|
3287
|
+
if self.update_id is not None:
|
|
3288
|
+
body["update_id"] = self.update_id
|
|
2731
3289
|
return body
|
|
2732
3290
|
|
|
2733
3291
|
@classmethod
|
|
2734
|
-
def from_dict(cls, d: Dict[str,
|
|
3292
|
+
def from_dict(cls, d: Dict[str, Any]) -> UpdateStateInfo:
|
|
2735
3293
|
"""Deserializes the UpdateStateInfo from a dictionary."""
|
|
2736
|
-
return cls(
|
|
2737
|
-
|
|
2738
|
-
|
|
3294
|
+
return cls(
|
|
3295
|
+
creation_time=d.get("creation_time", None),
|
|
3296
|
+
state=_enum(d, "state", UpdateStateInfoState),
|
|
3297
|
+
update_id=d.get("update_id", None),
|
|
3298
|
+
)
|
|
2739
3299
|
|
|
2740
3300
|
|
|
2741
3301
|
class UpdateStateInfoState(Enum):
|
|
2742
3302
|
|
|
2743
|
-
CANCELED =
|
|
2744
|
-
COMPLETED =
|
|
2745
|
-
CREATED =
|
|
2746
|
-
FAILED =
|
|
2747
|
-
INITIALIZING =
|
|
2748
|
-
QUEUED =
|
|
2749
|
-
RESETTING =
|
|
2750
|
-
RUNNING =
|
|
2751
|
-
SETTING_UP_TABLES =
|
|
2752
|
-
STOPPING =
|
|
2753
|
-
WAITING_FOR_RESOURCES =
|
|
3303
|
+
CANCELED = "CANCELED"
|
|
3304
|
+
COMPLETED = "COMPLETED"
|
|
3305
|
+
CREATED = "CREATED"
|
|
3306
|
+
FAILED = "FAILED"
|
|
3307
|
+
INITIALIZING = "INITIALIZING"
|
|
3308
|
+
QUEUED = "QUEUED"
|
|
3309
|
+
RESETTING = "RESETTING"
|
|
3310
|
+
RUNNING = "RUNNING"
|
|
3311
|
+
SETTING_UP_TABLES = "SETTING_UP_TABLES"
|
|
3312
|
+
STOPPING = "STOPPING"
|
|
3313
|
+
WAITING_FOR_RESOURCES = "WAITING_FOR_RESOURCES"
|
|
2754
3314
|
|
|
2755
3315
|
|
|
2756
3316
|
class PipelinesAPI:
|
|
2757
3317
|
"""The Delta Live Tables API allows you to create, edit, delete, start, and view details about pipelines.
|
|
2758
|
-
|
|
3318
|
+
|
|
2759
3319
|
Delta Live Tables is a framework for building reliable, maintainable, and testable data processing
|
|
2760
3320
|
pipelines. You define the transformations to perform on your data, and Delta Live Tables manages task
|
|
2761
3321
|
orchestration, cluster management, monitoring, data quality, and error handling.
|
|
2762
|
-
|
|
3322
|
+
|
|
2763
3323
|
Instead of defining your data pipelines using a series of separate Apache Spark tasks, Delta Live Tables
|
|
2764
3324
|
manages how your data is transformed based on a target schema you define for each processing step. You can
|
|
2765
3325
|
also enforce data quality with Delta Live Tables expectations. Expectations allow you to define expected
|
|
@@ -2769,14 +3329,15 @@ class PipelinesAPI:
|
|
|
2769
3329
|
self._api = api_client
|
|
2770
3330
|
|
|
2771
3331
|
def wait_get_pipeline_running(
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
3332
|
+
self,
|
|
3333
|
+
pipeline_id: str,
|
|
3334
|
+
timeout=timedelta(minutes=20),
|
|
3335
|
+
callback: Optional[Callable[[GetPipelineResponse], None]] = None,
|
|
3336
|
+
) -> GetPipelineResponse:
|
|
2776
3337
|
deadline = time.time() + timeout.total_seconds()
|
|
2777
|
-
target_states = (PipelineState.RUNNING,
|
|
2778
|
-
failure_states = (PipelineState.FAILED,
|
|
2779
|
-
status_message =
|
|
3338
|
+
target_states = (PipelineState.RUNNING,)
|
|
3339
|
+
failure_states = (PipelineState.FAILED,)
|
|
3340
|
+
status_message = "polling..."
|
|
2780
3341
|
attempt = 1
|
|
2781
3342
|
while time.time() < deadline:
|
|
2782
3343
|
poll = self.get(pipeline_id=pipeline_id)
|
|
@@ -2787,27 +3348,28 @@ class PipelinesAPI:
|
|
|
2787
3348
|
if callback:
|
|
2788
3349
|
callback(poll)
|
|
2789
3350
|
if status in failure_states:
|
|
2790
|
-
msg = f
|
|
3351
|
+
msg = f"failed to reach RUNNING, got {status}: {status_message}"
|
|
2791
3352
|
raise OperationFailed(msg)
|
|
2792
3353
|
prefix = f"pipeline_id={pipeline_id}"
|
|
2793
3354
|
sleep = attempt
|
|
2794
3355
|
if sleep > 10:
|
|
2795
3356
|
# sleep 10s max per attempt
|
|
2796
3357
|
sleep = 10
|
|
2797
|
-
_LOG.debug(f
|
|
3358
|
+
_LOG.debug(f"{prefix}: ({status}) {status_message} (sleeping ~{sleep}s)")
|
|
2798
3359
|
time.sleep(sleep + random.random())
|
|
2799
3360
|
attempt += 1
|
|
2800
|
-
raise TimeoutError(f
|
|
3361
|
+
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
2801
3362
|
|
|
2802
3363
|
def wait_get_pipeline_idle(
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
3364
|
+
self,
|
|
3365
|
+
pipeline_id: str,
|
|
3366
|
+
timeout=timedelta(minutes=20),
|
|
3367
|
+
callback: Optional[Callable[[GetPipelineResponse], None]] = None,
|
|
3368
|
+
) -> GetPipelineResponse:
|
|
2807
3369
|
deadline = time.time() + timeout.total_seconds()
|
|
2808
|
-
target_states = (PipelineState.IDLE,
|
|
2809
|
-
failure_states = (PipelineState.FAILED,
|
|
2810
|
-
status_message =
|
|
3370
|
+
target_states = (PipelineState.IDLE,)
|
|
3371
|
+
failure_states = (PipelineState.FAILED,)
|
|
3372
|
+
status_message = "polling..."
|
|
2811
3373
|
attempt = 1
|
|
2812
3374
|
while time.time() < deadline:
|
|
2813
3375
|
poll = self.get(pipeline_id=pipeline_id)
|
|
@@ -2818,51 +3380,53 @@ class PipelinesAPI:
|
|
|
2818
3380
|
if callback:
|
|
2819
3381
|
callback(poll)
|
|
2820
3382
|
if status in failure_states:
|
|
2821
|
-
msg = f
|
|
3383
|
+
msg = f"failed to reach IDLE, got {status}: {status_message}"
|
|
2822
3384
|
raise OperationFailed(msg)
|
|
2823
3385
|
prefix = f"pipeline_id={pipeline_id}"
|
|
2824
3386
|
sleep = attempt
|
|
2825
3387
|
if sleep > 10:
|
|
2826
3388
|
# sleep 10s max per attempt
|
|
2827
3389
|
sleep = 10
|
|
2828
|
-
_LOG.debug(f
|
|
3390
|
+
_LOG.debug(f"{prefix}: ({status}) {status_message} (sleeping ~{sleep}s)")
|
|
2829
3391
|
time.sleep(sleep + random.random())
|
|
2830
3392
|
attempt += 1
|
|
2831
|
-
raise TimeoutError(f
|
|
2832
|
-
|
|
2833
|
-
def create(
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
3393
|
+
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
3394
|
+
|
|
3395
|
+
def create(
|
|
3396
|
+
self,
|
|
3397
|
+
*,
|
|
3398
|
+
allow_duplicate_names: Optional[bool] = None,
|
|
3399
|
+
budget_policy_id: Optional[str] = None,
|
|
3400
|
+
catalog: Optional[str] = None,
|
|
3401
|
+
channel: Optional[str] = None,
|
|
3402
|
+
clusters: Optional[List[PipelineCluster]] = None,
|
|
3403
|
+
configuration: Optional[Dict[str, str]] = None,
|
|
3404
|
+
continuous: Optional[bool] = None,
|
|
3405
|
+
deployment: Optional[PipelineDeployment] = None,
|
|
3406
|
+
development: Optional[bool] = None,
|
|
3407
|
+
dry_run: Optional[bool] = None,
|
|
3408
|
+
edition: Optional[str] = None,
|
|
3409
|
+
filters: Optional[Filters] = None,
|
|
3410
|
+
gateway_definition: Optional[IngestionGatewayPipelineDefinition] = None,
|
|
3411
|
+
id: Optional[str] = None,
|
|
3412
|
+
ingestion_definition: Optional[IngestionPipelineDefinition] = None,
|
|
3413
|
+
libraries: Optional[List[PipelineLibrary]] = None,
|
|
3414
|
+
name: Optional[str] = None,
|
|
3415
|
+
notifications: Optional[List[Notifications]] = None,
|
|
3416
|
+
photon: Optional[bool] = None,
|
|
3417
|
+
restart_window: Optional[RestartWindow] = None,
|
|
3418
|
+
run_as: Optional[RunAs] = None,
|
|
3419
|
+
schema: Optional[str] = None,
|
|
3420
|
+
serverless: Optional[bool] = None,
|
|
3421
|
+
storage: Optional[str] = None,
|
|
3422
|
+
target: Optional[str] = None,
|
|
3423
|
+
trigger: Optional[PipelineTrigger] = None,
|
|
3424
|
+
) -> CreatePipelineResponse:
|
|
2861
3425
|
"""Create a pipeline.
|
|
2862
|
-
|
|
3426
|
+
|
|
2863
3427
|
Creates a new data processing pipeline based on the requested configuration. If successful, this
|
|
2864
3428
|
method returns the ID of the new pipeline.
|
|
2865
|
-
|
|
3429
|
+
|
|
2866
3430
|
:param allow_duplicate_names: bool (optional)
|
|
2867
3431
|
If false, deployment will fail if name conflicts with that of another pipeline.
|
|
2868
3432
|
:param budget_policy_id: str (optional)
|
|
@@ -2908,7 +3472,7 @@ class PipelinesAPI:
|
|
|
2908
3472
|
:param run_as: :class:`RunAs` (optional)
|
|
2909
3473
|
Write-only setting, available only in Create/Update calls. Specifies the user or service principal
|
|
2910
3474
|
that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline.
|
|
2911
|
-
|
|
3475
|
+
|
|
2912
3476
|
Only `user_name` or `service_principal_name` can be specified. If both are specified, an error is
|
|
2913
3477
|
thrown.
|
|
2914
3478
|
:param schema: str (optional)
|
|
@@ -2923,137 +3487,176 @@ class PipelinesAPI:
|
|
|
2923
3487
|
to the Hive metastore or Unity Catalog. To publish to Unity Catalog, also specify `catalog`.
|
|
2924
3488
|
:param trigger: :class:`PipelineTrigger` (optional)
|
|
2925
3489
|
Which pipeline trigger to use. Deprecated: Use `continuous` instead.
|
|
2926
|
-
|
|
3490
|
+
|
|
2927
3491
|
:returns: :class:`CreatePipelineResponse`
|
|
2928
3492
|
"""
|
|
2929
3493
|
body = {}
|
|
2930
|
-
if allow_duplicate_names is not None:
|
|
2931
|
-
|
|
2932
|
-
if
|
|
2933
|
-
|
|
2934
|
-
if
|
|
2935
|
-
|
|
2936
|
-
if
|
|
2937
|
-
|
|
2938
|
-
if
|
|
2939
|
-
|
|
2940
|
-
if
|
|
2941
|
-
|
|
2942
|
-
if
|
|
2943
|
-
|
|
2944
|
-
if
|
|
2945
|
-
|
|
2946
|
-
if
|
|
2947
|
-
|
|
2948
|
-
if
|
|
2949
|
-
|
|
2950
|
-
if
|
|
2951
|
-
|
|
2952
|
-
if
|
|
2953
|
-
|
|
2954
|
-
if
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
3494
|
+
if allow_duplicate_names is not None:
|
|
3495
|
+
body["allow_duplicate_names"] = allow_duplicate_names
|
|
3496
|
+
if budget_policy_id is not None:
|
|
3497
|
+
body["budget_policy_id"] = budget_policy_id
|
|
3498
|
+
if catalog is not None:
|
|
3499
|
+
body["catalog"] = catalog
|
|
3500
|
+
if channel is not None:
|
|
3501
|
+
body["channel"] = channel
|
|
3502
|
+
if clusters is not None:
|
|
3503
|
+
body["clusters"] = [v.as_dict() for v in clusters]
|
|
3504
|
+
if configuration is not None:
|
|
3505
|
+
body["configuration"] = configuration
|
|
3506
|
+
if continuous is not None:
|
|
3507
|
+
body["continuous"] = continuous
|
|
3508
|
+
if deployment is not None:
|
|
3509
|
+
body["deployment"] = deployment.as_dict()
|
|
3510
|
+
if development is not None:
|
|
3511
|
+
body["development"] = development
|
|
3512
|
+
if dry_run is not None:
|
|
3513
|
+
body["dry_run"] = dry_run
|
|
3514
|
+
if edition is not None:
|
|
3515
|
+
body["edition"] = edition
|
|
3516
|
+
if filters is not None:
|
|
3517
|
+
body["filters"] = filters.as_dict()
|
|
3518
|
+
if gateway_definition is not None:
|
|
3519
|
+
body["gateway_definition"] = gateway_definition.as_dict()
|
|
3520
|
+
if id is not None:
|
|
3521
|
+
body["id"] = id
|
|
3522
|
+
if ingestion_definition is not None:
|
|
3523
|
+
body["ingestion_definition"] = ingestion_definition.as_dict()
|
|
3524
|
+
if libraries is not None:
|
|
3525
|
+
body["libraries"] = [v.as_dict() for v in libraries]
|
|
3526
|
+
if name is not None:
|
|
3527
|
+
body["name"] = name
|
|
3528
|
+
if notifications is not None:
|
|
3529
|
+
body["notifications"] = [v.as_dict() for v in notifications]
|
|
3530
|
+
if photon is not None:
|
|
3531
|
+
body["photon"] = photon
|
|
3532
|
+
if restart_window is not None:
|
|
3533
|
+
body["restart_window"] = restart_window.as_dict()
|
|
3534
|
+
if run_as is not None:
|
|
3535
|
+
body["run_as"] = run_as.as_dict()
|
|
3536
|
+
if schema is not None:
|
|
3537
|
+
body["schema"] = schema
|
|
3538
|
+
if serverless is not None:
|
|
3539
|
+
body["serverless"] = serverless
|
|
3540
|
+
if storage is not None:
|
|
3541
|
+
body["storage"] = storage
|
|
3542
|
+
if target is not None:
|
|
3543
|
+
body["target"] = target
|
|
3544
|
+
if trigger is not None:
|
|
3545
|
+
body["trigger"] = trigger.as_dict()
|
|
3546
|
+
headers = {
|
|
3547
|
+
"Accept": "application/json",
|
|
3548
|
+
"Content-Type": "application/json",
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
res = self._api.do("POST", "/api/2.0/pipelines", body=body, headers=headers)
|
|
2959
3552
|
return CreatePipelineResponse.from_dict(res)
|
|
2960
3553
|
|
|
2961
3554
|
def delete(self, pipeline_id: str):
|
|
2962
3555
|
"""Delete a pipeline.
|
|
2963
|
-
|
|
3556
|
+
|
|
2964
3557
|
Deletes a pipeline.
|
|
2965
|
-
|
|
3558
|
+
|
|
2966
3559
|
:param pipeline_id: str
|
|
2967
|
-
|
|
2968
|
-
|
|
3560
|
+
|
|
3561
|
+
|
|
2969
3562
|
"""
|
|
2970
3563
|
|
|
2971
|
-
headers = {
|
|
3564
|
+
headers = {
|
|
3565
|
+
"Accept": "application/json",
|
|
3566
|
+
}
|
|
2972
3567
|
|
|
2973
|
-
self._api.do(
|
|
3568
|
+
self._api.do("DELETE", f"/api/2.0/pipelines/{pipeline_id}", headers=headers)
|
|
2974
3569
|
|
|
2975
3570
|
def get(self, pipeline_id: str) -> GetPipelineResponse:
|
|
2976
3571
|
"""Get a pipeline.
|
|
2977
|
-
|
|
3572
|
+
|
|
2978
3573
|
:param pipeline_id: str
|
|
2979
|
-
|
|
3574
|
+
|
|
2980
3575
|
:returns: :class:`GetPipelineResponse`
|
|
2981
3576
|
"""
|
|
2982
3577
|
|
|
2983
|
-
headers = {
|
|
3578
|
+
headers = {
|
|
3579
|
+
"Accept": "application/json",
|
|
3580
|
+
}
|
|
2984
3581
|
|
|
2985
|
-
res = self._api.do(
|
|
3582
|
+
res = self._api.do("GET", f"/api/2.0/pipelines/{pipeline_id}", headers=headers)
|
|
2986
3583
|
return GetPipelineResponse.from_dict(res)
|
|
2987
3584
|
|
|
2988
3585
|
def get_permission_levels(self, pipeline_id: str) -> GetPipelinePermissionLevelsResponse:
|
|
2989
3586
|
"""Get pipeline permission levels.
|
|
2990
|
-
|
|
3587
|
+
|
|
2991
3588
|
Gets the permission levels that a user can have on an object.
|
|
2992
|
-
|
|
3589
|
+
|
|
2993
3590
|
:param pipeline_id: str
|
|
2994
3591
|
The pipeline for which to get or manage permissions.
|
|
2995
|
-
|
|
3592
|
+
|
|
2996
3593
|
:returns: :class:`GetPipelinePermissionLevelsResponse`
|
|
2997
3594
|
"""
|
|
2998
3595
|
|
|
2999
|
-
headers = {
|
|
3596
|
+
headers = {
|
|
3597
|
+
"Accept": "application/json",
|
|
3598
|
+
}
|
|
3000
3599
|
|
|
3001
|
-
res = self._api.do(
|
|
3002
|
-
f'/api/2.0/permissions/pipelines/{pipeline_id}/permissionLevels',
|
|
3003
|
-
headers=headers)
|
|
3600
|
+
res = self._api.do("GET", f"/api/2.0/permissions/pipelines/{pipeline_id}/permissionLevels", headers=headers)
|
|
3004
3601
|
return GetPipelinePermissionLevelsResponse.from_dict(res)
|
|
3005
3602
|
|
|
3006
3603
|
def get_permissions(self, pipeline_id: str) -> PipelinePermissions:
|
|
3007
3604
|
"""Get pipeline permissions.
|
|
3008
|
-
|
|
3605
|
+
|
|
3009
3606
|
Gets the permissions of a pipeline. Pipelines can inherit permissions from their root object.
|
|
3010
|
-
|
|
3607
|
+
|
|
3011
3608
|
:param pipeline_id: str
|
|
3012
3609
|
The pipeline for which to get or manage permissions.
|
|
3013
|
-
|
|
3610
|
+
|
|
3014
3611
|
:returns: :class:`PipelinePermissions`
|
|
3015
3612
|
"""
|
|
3016
3613
|
|
|
3017
|
-
headers = {
|
|
3614
|
+
headers = {
|
|
3615
|
+
"Accept": "application/json",
|
|
3616
|
+
}
|
|
3018
3617
|
|
|
3019
|
-
res = self._api.do(
|
|
3618
|
+
res = self._api.do("GET", f"/api/2.0/permissions/pipelines/{pipeline_id}", headers=headers)
|
|
3020
3619
|
return PipelinePermissions.from_dict(res)
|
|
3021
3620
|
|
|
3022
3621
|
def get_update(self, pipeline_id: str, update_id: str) -> GetUpdateResponse:
|
|
3023
3622
|
"""Get a pipeline update.
|
|
3024
|
-
|
|
3623
|
+
|
|
3025
3624
|
Gets an update from an active pipeline.
|
|
3026
|
-
|
|
3625
|
+
|
|
3027
3626
|
:param pipeline_id: str
|
|
3028
3627
|
The ID of the pipeline.
|
|
3029
3628
|
:param update_id: str
|
|
3030
3629
|
The ID of the update.
|
|
3031
|
-
|
|
3630
|
+
|
|
3032
3631
|
:returns: :class:`GetUpdateResponse`
|
|
3033
3632
|
"""
|
|
3034
3633
|
|
|
3035
|
-
headers = {
|
|
3634
|
+
headers = {
|
|
3635
|
+
"Accept": "application/json",
|
|
3636
|
+
}
|
|
3036
3637
|
|
|
3037
|
-
res = self._api.do(
|
|
3638
|
+
res = self._api.do("GET", f"/api/2.0/pipelines/{pipeline_id}/updates/{update_id}", headers=headers)
|
|
3038
3639
|
return GetUpdateResponse.from_dict(res)
|
|
3039
3640
|
|
|
3040
|
-
def list_pipeline_events(
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3641
|
+
def list_pipeline_events(
|
|
3642
|
+
self,
|
|
3643
|
+
pipeline_id: str,
|
|
3644
|
+
*,
|
|
3645
|
+
filter: Optional[str] = None,
|
|
3646
|
+
max_results: Optional[int] = None,
|
|
3647
|
+
order_by: Optional[List[str]] = None,
|
|
3648
|
+
page_token: Optional[str] = None,
|
|
3649
|
+
) -> Iterator[PipelineEvent]:
|
|
3047
3650
|
"""List pipeline events.
|
|
3048
|
-
|
|
3651
|
+
|
|
3049
3652
|
Retrieves events for a pipeline.
|
|
3050
|
-
|
|
3653
|
+
|
|
3051
3654
|
:param pipeline_id: str
|
|
3052
3655
|
:param filter: str (optional)
|
|
3053
3656
|
Criteria to select a subset of results, expressed using a SQL-like syntax. The supported filters
|
|
3054
3657
|
are: 1. level='INFO' (or WARN or ERROR) 2. level in ('INFO', 'WARN') 3. id='[event-id]' 4. timestamp
|
|
3055
3658
|
> 'TIMESTAMP' (or >=,<,<=,=)
|
|
3056
|
-
|
|
3659
|
+
|
|
3057
3660
|
Composite expressions are supported, for example: level in ('ERROR', 'WARN') AND timestamp>
|
|
3058
3661
|
'2021-07-22T06:37:33.083Z'
|
|
3059
3662
|
:param max_results: int (optional)
|
|
@@ -3067,46 +3670,51 @@ class PipelinesAPI:
|
|
|
3067
3670
|
Page token returned by previous call. This field is mutually exclusive with all fields in this
|
|
3068
3671
|
request except max_results. An error is returned if any fields other than max_results are set when
|
|
3069
3672
|
this field is set.
|
|
3070
|
-
|
|
3673
|
+
|
|
3071
3674
|
:returns: Iterator over :class:`PipelineEvent`
|
|
3072
3675
|
"""
|
|
3073
3676
|
|
|
3074
3677
|
query = {}
|
|
3075
|
-
if filter is not None:
|
|
3076
|
-
|
|
3077
|
-
if
|
|
3078
|
-
|
|
3079
|
-
|
|
3678
|
+
if filter is not None:
|
|
3679
|
+
query["filter"] = filter
|
|
3680
|
+
if max_results is not None:
|
|
3681
|
+
query["max_results"] = max_results
|
|
3682
|
+
if order_by is not None:
|
|
3683
|
+
query["order_by"] = [v for v in order_by]
|
|
3684
|
+
if page_token is not None:
|
|
3685
|
+
query["page_token"] = page_token
|
|
3686
|
+
headers = {
|
|
3687
|
+
"Accept": "application/json",
|
|
3688
|
+
}
|
|
3080
3689
|
|
|
3081
3690
|
while True:
|
|
3082
|
-
json = self._api.do(
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
headers=headers)
|
|
3086
|
-
if 'events' in json:
|
|
3087
|
-
for v in json['events']:
|
|
3691
|
+
json = self._api.do("GET", f"/api/2.0/pipelines/{pipeline_id}/events", query=query, headers=headers)
|
|
3692
|
+
if "events" in json:
|
|
3693
|
+
for v in json["events"]:
|
|
3088
3694
|
yield PipelineEvent.from_dict(v)
|
|
3089
|
-
if
|
|
3695
|
+
if "next_page_token" not in json or not json["next_page_token"]:
|
|
3090
3696
|
return
|
|
3091
|
-
query[
|
|
3092
|
-
|
|
3093
|
-
def list_pipelines(
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3697
|
+
query["page_token"] = json["next_page_token"]
|
|
3698
|
+
|
|
3699
|
+
def list_pipelines(
|
|
3700
|
+
self,
|
|
3701
|
+
*,
|
|
3702
|
+
filter: Optional[str] = None,
|
|
3703
|
+
max_results: Optional[int] = None,
|
|
3704
|
+
order_by: Optional[List[str]] = None,
|
|
3705
|
+
page_token: Optional[str] = None,
|
|
3706
|
+
) -> Iterator[PipelineStateInfo]:
|
|
3099
3707
|
"""List pipelines.
|
|
3100
|
-
|
|
3708
|
+
|
|
3101
3709
|
Lists pipelines defined in the Delta Live Tables system.
|
|
3102
|
-
|
|
3710
|
+
|
|
3103
3711
|
:param filter: str (optional)
|
|
3104
3712
|
Select a subset of results based on the specified criteria. The supported filters are:
|
|
3105
|
-
|
|
3713
|
+
|
|
3106
3714
|
* `notebook='<path>'` to select pipelines that reference the provided notebook path. * `name LIKE
|
|
3107
3715
|
'[pattern]'` to select pipelines with a name that matches pattern. Wildcards are supported, for
|
|
3108
3716
|
example: `name LIKE '%shopping%'`
|
|
3109
|
-
|
|
3717
|
+
|
|
3110
3718
|
Composite filters are not supported. This field is optional.
|
|
3111
3719
|
:param max_results: int (optional)
|
|
3112
3720
|
The maximum number of entries to return in a single page. The system may return fewer than
|
|
@@ -3118,36 +3726,44 @@ class PipelinesAPI:
|
|
|
3118
3726
|
default is id asc. This field is optional.
|
|
3119
3727
|
:param page_token: str (optional)
|
|
3120
3728
|
Page token returned by previous call
|
|
3121
|
-
|
|
3729
|
+
|
|
3122
3730
|
:returns: Iterator over :class:`PipelineStateInfo`
|
|
3123
3731
|
"""
|
|
3124
3732
|
|
|
3125
3733
|
query = {}
|
|
3126
|
-
if filter is not None:
|
|
3127
|
-
|
|
3128
|
-
if
|
|
3129
|
-
|
|
3130
|
-
|
|
3734
|
+
if filter is not None:
|
|
3735
|
+
query["filter"] = filter
|
|
3736
|
+
if max_results is not None:
|
|
3737
|
+
query["max_results"] = max_results
|
|
3738
|
+
if order_by is not None:
|
|
3739
|
+
query["order_by"] = [v for v in order_by]
|
|
3740
|
+
if page_token is not None:
|
|
3741
|
+
query["page_token"] = page_token
|
|
3742
|
+
headers = {
|
|
3743
|
+
"Accept": "application/json",
|
|
3744
|
+
}
|
|
3131
3745
|
|
|
3132
3746
|
while True:
|
|
3133
|
-
json = self._api.do(
|
|
3134
|
-
if
|
|
3135
|
-
for v in json[
|
|
3747
|
+
json = self._api.do("GET", "/api/2.0/pipelines", query=query, headers=headers)
|
|
3748
|
+
if "statuses" in json:
|
|
3749
|
+
for v in json["statuses"]:
|
|
3136
3750
|
yield PipelineStateInfo.from_dict(v)
|
|
3137
|
-
if
|
|
3751
|
+
if "next_page_token" not in json or not json["next_page_token"]:
|
|
3138
3752
|
return
|
|
3139
|
-
query[
|
|
3140
|
-
|
|
3141
|
-
def list_updates(
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3753
|
+
query["page_token"] = json["next_page_token"]
|
|
3754
|
+
|
|
3755
|
+
def list_updates(
|
|
3756
|
+
self,
|
|
3757
|
+
pipeline_id: str,
|
|
3758
|
+
*,
|
|
3759
|
+
max_results: Optional[int] = None,
|
|
3760
|
+
page_token: Optional[str] = None,
|
|
3761
|
+
until_update_id: Optional[str] = None,
|
|
3762
|
+
) -> ListUpdatesResponse:
|
|
3147
3763
|
"""List pipeline updates.
|
|
3148
|
-
|
|
3764
|
+
|
|
3149
3765
|
List updates for an active pipeline.
|
|
3150
|
-
|
|
3766
|
+
|
|
3151
3767
|
:param pipeline_id: str
|
|
3152
3768
|
The pipeline to return updates for.
|
|
3153
3769
|
:param max_results: int (optional)
|
|
@@ -3156,56 +3772,64 @@ class PipelinesAPI:
|
|
|
3156
3772
|
Page token returned by previous call
|
|
3157
3773
|
:param until_update_id: str (optional)
|
|
3158
3774
|
If present, returns updates until and including this update_id.
|
|
3159
|
-
|
|
3775
|
+
|
|
3160
3776
|
:returns: :class:`ListUpdatesResponse`
|
|
3161
3777
|
"""
|
|
3162
3778
|
|
|
3163
3779
|
query = {}
|
|
3164
|
-
if max_results is not None:
|
|
3165
|
-
|
|
3166
|
-
if
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3780
|
+
if max_results is not None:
|
|
3781
|
+
query["max_results"] = max_results
|
|
3782
|
+
if page_token is not None:
|
|
3783
|
+
query["page_token"] = page_token
|
|
3784
|
+
if until_update_id is not None:
|
|
3785
|
+
query["until_update_id"] = until_update_id
|
|
3786
|
+
headers = {
|
|
3787
|
+
"Accept": "application/json",
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
res = self._api.do("GET", f"/api/2.0/pipelines/{pipeline_id}/updates", query=query, headers=headers)
|
|
3170
3791
|
return ListUpdatesResponse.from_dict(res)
|
|
3171
3792
|
|
|
3172
3793
|
def set_permissions(
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
*,
|
|
3176
|
-
access_control_list: Optional[List[PipelineAccessControlRequest]] = None) -> PipelinePermissions:
|
|
3794
|
+
self, pipeline_id: str, *, access_control_list: Optional[List[PipelineAccessControlRequest]] = None
|
|
3795
|
+
) -> PipelinePermissions:
|
|
3177
3796
|
"""Set pipeline permissions.
|
|
3178
|
-
|
|
3797
|
+
|
|
3179
3798
|
Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
3180
3799
|
permissions if none are specified. Objects can inherit permissions from their root object.
|
|
3181
|
-
|
|
3800
|
+
|
|
3182
3801
|
:param pipeline_id: str
|
|
3183
3802
|
The pipeline for which to get or manage permissions.
|
|
3184
3803
|
:param access_control_list: List[:class:`PipelineAccessControlRequest`] (optional)
|
|
3185
|
-
|
|
3804
|
+
|
|
3186
3805
|
:returns: :class:`PipelinePermissions`
|
|
3187
3806
|
"""
|
|
3188
3807
|
body = {}
|
|
3189
3808
|
if access_control_list is not None:
|
|
3190
|
-
body[
|
|
3191
|
-
headers = {
|
|
3809
|
+
body["access_control_list"] = [v.as_dict() for v in access_control_list]
|
|
3810
|
+
headers = {
|
|
3811
|
+
"Accept": "application/json",
|
|
3812
|
+
"Content-Type": "application/json",
|
|
3813
|
+
}
|
|
3192
3814
|
|
|
3193
|
-
res = self._api.do(
|
|
3815
|
+
res = self._api.do("PUT", f"/api/2.0/permissions/pipelines/{pipeline_id}", body=body, headers=headers)
|
|
3194
3816
|
return PipelinePermissions.from_dict(res)
|
|
3195
3817
|
|
|
3196
|
-
def start_update(
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3818
|
+
def start_update(
|
|
3819
|
+
self,
|
|
3820
|
+
pipeline_id: str,
|
|
3821
|
+
*,
|
|
3822
|
+
cause: Optional[StartUpdateCause] = None,
|
|
3823
|
+
full_refresh: Optional[bool] = None,
|
|
3824
|
+
full_refresh_selection: Optional[List[str]] = None,
|
|
3825
|
+
refresh_selection: Optional[List[str]] = None,
|
|
3826
|
+
validate_only: Optional[bool] = None,
|
|
3827
|
+
) -> StartUpdateResponse:
|
|
3204
3828
|
"""Start a pipeline.
|
|
3205
|
-
|
|
3829
|
+
|
|
3206
3830
|
Starts a new update for the pipeline. If there is already an active update for the pipeline, the
|
|
3207
3831
|
request will fail and the active update will remain running.
|
|
3208
|
-
|
|
3832
|
+
|
|
3209
3833
|
:param pipeline_id: str
|
|
3210
3834
|
:param cause: :class:`StartUpdateCause` (optional)
|
|
3211
3835
|
:param full_refresh: bool (optional)
|
|
@@ -3221,77 +3845,88 @@ class PipelinesAPI:
|
|
|
3221
3845
|
:param validate_only: bool (optional)
|
|
3222
3846
|
If true, this update only validates the correctness of pipeline source code but does not materialize
|
|
3223
3847
|
or publish any datasets.
|
|
3224
|
-
|
|
3848
|
+
|
|
3225
3849
|
:returns: :class:`StartUpdateResponse`
|
|
3226
3850
|
"""
|
|
3227
3851
|
body = {}
|
|
3228
|
-
if cause is not None:
|
|
3229
|
-
|
|
3852
|
+
if cause is not None:
|
|
3853
|
+
body["cause"] = cause.value
|
|
3854
|
+
if full_refresh is not None:
|
|
3855
|
+
body["full_refresh"] = full_refresh
|
|
3230
3856
|
if full_refresh_selection is not None:
|
|
3231
|
-
body[
|
|
3232
|
-
if refresh_selection is not None:
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3857
|
+
body["full_refresh_selection"] = [v for v in full_refresh_selection]
|
|
3858
|
+
if refresh_selection is not None:
|
|
3859
|
+
body["refresh_selection"] = [v for v in refresh_selection]
|
|
3860
|
+
if validate_only is not None:
|
|
3861
|
+
body["validate_only"] = validate_only
|
|
3862
|
+
headers = {
|
|
3863
|
+
"Accept": "application/json",
|
|
3864
|
+
"Content-Type": "application/json",
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
res = self._api.do("POST", f"/api/2.0/pipelines/{pipeline_id}/updates", body=body, headers=headers)
|
|
3237
3868
|
return StartUpdateResponse.from_dict(res)
|
|
3238
3869
|
|
|
3239
3870
|
def stop(self, pipeline_id: str) -> Wait[GetPipelineResponse]:
|
|
3240
3871
|
"""Stop a pipeline.
|
|
3241
|
-
|
|
3872
|
+
|
|
3242
3873
|
Stops the pipeline by canceling the active update. If there is no active update for the pipeline, this
|
|
3243
3874
|
request is a no-op.
|
|
3244
|
-
|
|
3875
|
+
|
|
3245
3876
|
:param pipeline_id: str
|
|
3246
|
-
|
|
3877
|
+
|
|
3247
3878
|
:returns:
|
|
3248
3879
|
Long-running operation waiter for :class:`GetPipelineResponse`.
|
|
3249
3880
|
See :method:wait_get_pipeline_idle for more details.
|
|
3250
3881
|
"""
|
|
3251
3882
|
|
|
3252
|
-
headers = {
|
|
3883
|
+
headers = {
|
|
3884
|
+
"Accept": "application/json",
|
|
3885
|
+
}
|
|
3253
3886
|
|
|
3254
|
-
op_response = self._api.do(
|
|
3255
|
-
return Wait(
|
|
3256
|
-
|
|
3257
|
-
|
|
3887
|
+
op_response = self._api.do("POST", f"/api/2.0/pipelines/{pipeline_id}/stop", headers=headers)
|
|
3888
|
+
return Wait(
|
|
3889
|
+
self.wait_get_pipeline_idle, response=StopPipelineResponse.from_dict(op_response), pipeline_id=pipeline_id
|
|
3890
|
+
)
|
|
3258
3891
|
|
|
3259
3892
|
def stop_and_wait(self, pipeline_id: str, timeout=timedelta(minutes=20)) -> GetPipelineResponse:
|
|
3260
3893
|
return self.stop(pipeline_id=pipeline_id).result(timeout=timeout)
|
|
3261
3894
|
|
|
3262
|
-
def update(
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3895
|
+
def update(
|
|
3896
|
+
self,
|
|
3897
|
+
pipeline_id: str,
|
|
3898
|
+
*,
|
|
3899
|
+
allow_duplicate_names: Optional[bool] = None,
|
|
3900
|
+
budget_policy_id: Optional[str] = None,
|
|
3901
|
+
catalog: Optional[str] = None,
|
|
3902
|
+
channel: Optional[str] = None,
|
|
3903
|
+
clusters: Optional[List[PipelineCluster]] = None,
|
|
3904
|
+
configuration: Optional[Dict[str, str]] = None,
|
|
3905
|
+
continuous: Optional[bool] = None,
|
|
3906
|
+
deployment: Optional[PipelineDeployment] = None,
|
|
3907
|
+
development: Optional[bool] = None,
|
|
3908
|
+
edition: Optional[str] = None,
|
|
3909
|
+
expected_last_modified: Optional[int] = None,
|
|
3910
|
+
filters: Optional[Filters] = None,
|
|
3911
|
+
gateway_definition: Optional[IngestionGatewayPipelineDefinition] = None,
|
|
3912
|
+
id: Optional[str] = None,
|
|
3913
|
+
ingestion_definition: Optional[IngestionPipelineDefinition] = None,
|
|
3914
|
+
libraries: Optional[List[PipelineLibrary]] = None,
|
|
3915
|
+
name: Optional[str] = None,
|
|
3916
|
+
notifications: Optional[List[Notifications]] = None,
|
|
3917
|
+
photon: Optional[bool] = None,
|
|
3918
|
+
restart_window: Optional[RestartWindow] = None,
|
|
3919
|
+
run_as: Optional[RunAs] = None,
|
|
3920
|
+
schema: Optional[str] = None,
|
|
3921
|
+
serverless: Optional[bool] = None,
|
|
3922
|
+
storage: Optional[str] = None,
|
|
3923
|
+
target: Optional[str] = None,
|
|
3924
|
+
trigger: Optional[PipelineTrigger] = None,
|
|
3925
|
+
):
|
|
3291
3926
|
"""Edit a pipeline.
|
|
3292
|
-
|
|
3927
|
+
|
|
3293
3928
|
Updates a pipeline with the supplied configuration.
|
|
3294
|
-
|
|
3929
|
+
|
|
3295
3930
|
:param pipeline_id: str
|
|
3296
3931
|
Unique identifier for this pipeline.
|
|
3297
3932
|
:param allow_duplicate_names: bool (optional)
|
|
@@ -3341,7 +3976,7 @@ class PipelinesAPI:
|
|
|
3341
3976
|
:param run_as: :class:`RunAs` (optional)
|
|
3342
3977
|
Write-only setting, available only in Create/Update calls. Specifies the user or service principal
|
|
3343
3978
|
that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline.
|
|
3344
|
-
|
|
3979
|
+
|
|
3345
3980
|
Only `user_name` or `service_principal_name` can be specified. If both are specified, an error is
|
|
3346
3981
|
thrown.
|
|
3347
3982
|
:param schema: str (optional)
|
|
@@ -3356,62 +3991,89 @@ class PipelinesAPI:
|
|
|
3356
3991
|
to the Hive metastore or Unity Catalog. To publish to Unity Catalog, also specify `catalog`.
|
|
3357
3992
|
:param trigger: :class:`PipelineTrigger` (optional)
|
|
3358
3993
|
Which pipeline trigger to use. Deprecated: Use `continuous` instead.
|
|
3359
|
-
|
|
3360
|
-
|
|
3994
|
+
|
|
3995
|
+
|
|
3361
3996
|
"""
|
|
3362
3997
|
body = {}
|
|
3363
|
-
if allow_duplicate_names is not None:
|
|
3364
|
-
|
|
3365
|
-
if
|
|
3366
|
-
|
|
3367
|
-
if
|
|
3368
|
-
|
|
3369
|
-
if
|
|
3370
|
-
|
|
3371
|
-
if
|
|
3372
|
-
|
|
3373
|
-
if
|
|
3374
|
-
|
|
3375
|
-
if
|
|
3376
|
-
|
|
3377
|
-
if
|
|
3378
|
-
|
|
3379
|
-
if
|
|
3380
|
-
|
|
3381
|
-
if
|
|
3382
|
-
|
|
3383
|
-
if
|
|
3384
|
-
|
|
3385
|
-
if
|
|
3386
|
-
|
|
3387
|
-
if
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3998
|
+
if allow_duplicate_names is not None:
|
|
3999
|
+
body["allow_duplicate_names"] = allow_duplicate_names
|
|
4000
|
+
if budget_policy_id is not None:
|
|
4001
|
+
body["budget_policy_id"] = budget_policy_id
|
|
4002
|
+
if catalog is not None:
|
|
4003
|
+
body["catalog"] = catalog
|
|
4004
|
+
if channel is not None:
|
|
4005
|
+
body["channel"] = channel
|
|
4006
|
+
if clusters is not None:
|
|
4007
|
+
body["clusters"] = [v.as_dict() for v in clusters]
|
|
4008
|
+
if configuration is not None:
|
|
4009
|
+
body["configuration"] = configuration
|
|
4010
|
+
if continuous is not None:
|
|
4011
|
+
body["continuous"] = continuous
|
|
4012
|
+
if deployment is not None:
|
|
4013
|
+
body["deployment"] = deployment.as_dict()
|
|
4014
|
+
if development is not None:
|
|
4015
|
+
body["development"] = development
|
|
4016
|
+
if edition is not None:
|
|
4017
|
+
body["edition"] = edition
|
|
4018
|
+
if expected_last_modified is not None:
|
|
4019
|
+
body["expected_last_modified"] = expected_last_modified
|
|
4020
|
+
if filters is not None:
|
|
4021
|
+
body["filters"] = filters.as_dict()
|
|
4022
|
+
if gateway_definition is not None:
|
|
4023
|
+
body["gateway_definition"] = gateway_definition.as_dict()
|
|
4024
|
+
if id is not None:
|
|
4025
|
+
body["id"] = id
|
|
4026
|
+
if ingestion_definition is not None:
|
|
4027
|
+
body["ingestion_definition"] = ingestion_definition.as_dict()
|
|
4028
|
+
if libraries is not None:
|
|
4029
|
+
body["libraries"] = [v.as_dict() for v in libraries]
|
|
4030
|
+
if name is not None:
|
|
4031
|
+
body["name"] = name
|
|
4032
|
+
if notifications is not None:
|
|
4033
|
+
body["notifications"] = [v.as_dict() for v in notifications]
|
|
4034
|
+
if photon is not None:
|
|
4035
|
+
body["photon"] = photon
|
|
4036
|
+
if restart_window is not None:
|
|
4037
|
+
body["restart_window"] = restart_window.as_dict()
|
|
4038
|
+
if run_as is not None:
|
|
4039
|
+
body["run_as"] = run_as.as_dict()
|
|
4040
|
+
if schema is not None:
|
|
4041
|
+
body["schema"] = schema
|
|
4042
|
+
if serverless is not None:
|
|
4043
|
+
body["serverless"] = serverless
|
|
4044
|
+
if storage is not None:
|
|
4045
|
+
body["storage"] = storage
|
|
4046
|
+
if target is not None:
|
|
4047
|
+
body["target"] = target
|
|
4048
|
+
if trigger is not None:
|
|
4049
|
+
body["trigger"] = trigger.as_dict()
|
|
4050
|
+
headers = {
|
|
4051
|
+
"Accept": "application/json",
|
|
4052
|
+
"Content-Type": "application/json",
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
self._api.do("PUT", f"/api/2.0/pipelines/{pipeline_id}", body=body, headers=headers)
|
|
3392
4056
|
|
|
3393
4057
|
def update_permissions(
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
*,
|
|
3397
|
-
access_control_list: Optional[List[PipelineAccessControlRequest]] = None) -> PipelinePermissions:
|
|
4058
|
+
self, pipeline_id: str, *, access_control_list: Optional[List[PipelineAccessControlRequest]] = None
|
|
4059
|
+
) -> PipelinePermissions:
|
|
3398
4060
|
"""Update pipeline permissions.
|
|
3399
|
-
|
|
4061
|
+
|
|
3400
4062
|
Updates the permissions on a pipeline. Pipelines can inherit permissions from their root object.
|
|
3401
|
-
|
|
4063
|
+
|
|
3402
4064
|
:param pipeline_id: str
|
|
3403
4065
|
The pipeline for which to get or manage permissions.
|
|
3404
4066
|
:param access_control_list: List[:class:`PipelineAccessControlRequest`] (optional)
|
|
3405
|
-
|
|
4067
|
+
|
|
3406
4068
|
:returns: :class:`PipelinePermissions`
|
|
3407
4069
|
"""
|
|
3408
4070
|
body = {}
|
|
3409
4071
|
if access_control_list is not None:
|
|
3410
|
-
body[
|
|
3411
|
-
headers = {
|
|
4072
|
+
body["access_control_list"] = [v.as_dict() for v in access_control_list]
|
|
4073
|
+
headers = {
|
|
4074
|
+
"Accept": "application/json",
|
|
4075
|
+
"Content-Type": "application/json",
|
|
4076
|
+
}
|
|
3412
4077
|
|
|
3413
|
-
res = self._api.do(
|
|
3414
|
-
f'/api/2.0/permissions/pipelines/{pipeline_id}',
|
|
3415
|
-
body=body,
|
|
3416
|
-
headers=headers)
|
|
4078
|
+
res = self._api.do("PATCH", f"/api/2.0/permissions/pipelines/{pipeline_id}", body=body, headers=headers)
|
|
3417
4079
|
return PipelinePermissions.from_dict(res)
|