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.

Files changed (63) hide show
  1. databricks/sdk/__init__.py +135 -116
  2. databricks/sdk/_base_client.py +112 -88
  3. databricks/sdk/_property.py +12 -7
  4. databricks/sdk/_widgets/__init__.py +13 -2
  5. databricks/sdk/_widgets/default_widgets_utils.py +21 -15
  6. databricks/sdk/_widgets/ipywidgets_utils.py +47 -24
  7. databricks/sdk/azure.py +8 -6
  8. databricks/sdk/casing.py +5 -5
  9. databricks/sdk/config.py +156 -99
  10. databricks/sdk/core.py +57 -47
  11. databricks/sdk/credentials_provider.py +306 -206
  12. databricks/sdk/data_plane.py +75 -50
  13. databricks/sdk/dbutils.py +123 -87
  14. databricks/sdk/environments.py +52 -35
  15. databricks/sdk/errors/base.py +61 -35
  16. databricks/sdk/errors/customizer.py +3 -3
  17. databricks/sdk/errors/deserializer.py +38 -25
  18. databricks/sdk/errors/details.py +417 -0
  19. databricks/sdk/errors/mapper.py +1 -1
  20. databricks/sdk/errors/overrides.py +27 -24
  21. databricks/sdk/errors/parser.py +26 -14
  22. databricks/sdk/errors/platform.py +10 -10
  23. databricks/sdk/errors/private_link.py +24 -24
  24. databricks/sdk/logger/round_trip_logger.py +28 -20
  25. databricks/sdk/mixins/compute.py +90 -60
  26. databricks/sdk/mixins/files.py +815 -145
  27. databricks/sdk/mixins/jobs.py +191 -16
  28. databricks/sdk/mixins/open_ai_client.py +26 -20
  29. databricks/sdk/mixins/workspace.py +45 -34
  30. databricks/sdk/oauth.py +379 -198
  31. databricks/sdk/retries.py +14 -12
  32. databricks/sdk/runtime/__init__.py +34 -17
  33. databricks/sdk/runtime/dbutils_stub.py +52 -39
  34. databricks/sdk/service/_internal.py +12 -7
  35. databricks/sdk/service/apps.py +618 -418
  36. databricks/sdk/service/billing.py +827 -604
  37. databricks/sdk/service/catalog.py +6552 -4474
  38. databricks/sdk/service/cleanrooms.py +550 -388
  39. databricks/sdk/service/compute.py +5263 -3536
  40. databricks/sdk/service/dashboards.py +1331 -924
  41. databricks/sdk/service/files.py +446 -309
  42. databricks/sdk/service/iam.py +2115 -1483
  43. databricks/sdk/service/jobs.py +4151 -2588
  44. databricks/sdk/service/marketplace.py +2210 -1517
  45. databricks/sdk/service/ml.py +3839 -2256
  46. databricks/sdk/service/oauth2.py +910 -584
  47. databricks/sdk/service/pipelines.py +1865 -1203
  48. databricks/sdk/service/provisioning.py +1435 -1029
  49. databricks/sdk/service/serving.py +2060 -1290
  50. databricks/sdk/service/settings.py +2846 -1929
  51. databricks/sdk/service/sharing.py +2201 -877
  52. databricks/sdk/service/sql.py +4650 -3103
  53. databricks/sdk/service/vectorsearch.py +816 -550
  54. databricks/sdk/service/workspace.py +1330 -906
  55. databricks/sdk/useragent.py +36 -22
  56. databricks/sdk/version.py +1 -1
  57. {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/METADATA +31 -31
  58. databricks_sdk-0.46.0.dist-info/RECORD +70 -0
  59. {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/WHEEL +1 -1
  60. databricks_sdk-0.44.1.dist-info/RECORD +0 -69
  61. {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/LICENSE +0 -0
  62. {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/NOTICE +0 -0
  63. {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/top_level.txt +0 -0
@@ -5,11 +5,12 @@ from __future__ import annotations
5
5
  import logging
6
6
  from dataclasses import dataclass
7
7
  from enum import Enum
8
- from typing import Dict, Iterator, List, Optional
8
+ from typing import Any, Dict, Iterator, List, Optional
9
9
 
10
10
  from ._internal import _enum, _from_dict, _repeated_dict
11
11
 
12
- _LOG = logging.getLogger('databricks.sdk')
12
+ _LOG = logging.getLogger("databricks.sdk")
13
+
13
14
 
14
15
  from databricks.sdk.service import catalog, jobs, settings, sharing
15
16
 
@@ -57,54 +58,74 @@ class CleanRoom:
57
58
  def as_dict(self) -> dict:
58
59
  """Serializes the CleanRoom into a dictionary suitable for use as a JSON request body."""
59
60
  body = {}
60
- if self.access_restricted is not None: body['access_restricted'] = self.access_restricted.value
61
- if self.comment is not None: body['comment'] = self.comment
62
- if self.created_at is not None: body['created_at'] = self.created_at
61
+ if self.access_restricted is not None:
62
+ body["access_restricted"] = self.access_restricted.value
63
+ if self.comment is not None:
64
+ body["comment"] = self.comment
65
+ if self.created_at is not None:
66
+ body["created_at"] = self.created_at
63
67
  if self.local_collaborator_alias is not None:
64
- body['local_collaborator_alias'] = self.local_collaborator_alias
65
- if self.name is not None: body['name'] = self.name
66
- if self.output_catalog: body['output_catalog'] = self.output_catalog.as_dict()
67
- if self.owner is not None: body['owner'] = self.owner
68
- if self.remote_detailed_info: body['remote_detailed_info'] = self.remote_detailed_info.as_dict()
69
- if self.status is not None: body['status'] = self.status.value
70
- if self.updated_at is not None: body['updated_at'] = self.updated_at
68
+ body["local_collaborator_alias"] = self.local_collaborator_alias
69
+ if self.name is not None:
70
+ body["name"] = self.name
71
+ if self.output_catalog:
72
+ body["output_catalog"] = self.output_catalog.as_dict()
73
+ if self.owner is not None:
74
+ body["owner"] = self.owner
75
+ if self.remote_detailed_info:
76
+ body["remote_detailed_info"] = self.remote_detailed_info.as_dict()
77
+ if self.status is not None:
78
+ body["status"] = self.status.value
79
+ if self.updated_at is not None:
80
+ body["updated_at"] = self.updated_at
71
81
  return body
72
82
 
73
83
  def as_shallow_dict(self) -> dict:
74
84
  """Serializes the CleanRoom into a shallow dictionary of its immediate attributes."""
75
85
  body = {}
76
- if self.access_restricted is not None: body['access_restricted'] = self.access_restricted
77
- if self.comment is not None: body['comment'] = self.comment
78
- if self.created_at is not None: body['created_at'] = self.created_at
86
+ if self.access_restricted is not None:
87
+ body["access_restricted"] = self.access_restricted
88
+ if self.comment is not None:
89
+ body["comment"] = self.comment
90
+ if self.created_at is not None:
91
+ body["created_at"] = self.created_at
79
92
  if self.local_collaborator_alias is not None:
80
- body['local_collaborator_alias'] = self.local_collaborator_alias
81
- if self.name is not None: body['name'] = self.name
82
- if self.output_catalog: body['output_catalog'] = self.output_catalog
83
- if self.owner is not None: body['owner'] = self.owner
84
- if self.remote_detailed_info: body['remote_detailed_info'] = self.remote_detailed_info
85
- if self.status is not None: body['status'] = self.status
86
- if self.updated_at is not None: body['updated_at'] = self.updated_at
93
+ body["local_collaborator_alias"] = self.local_collaborator_alias
94
+ if self.name is not None:
95
+ body["name"] = self.name
96
+ if self.output_catalog:
97
+ body["output_catalog"] = self.output_catalog
98
+ if self.owner is not None:
99
+ body["owner"] = self.owner
100
+ if self.remote_detailed_info:
101
+ body["remote_detailed_info"] = self.remote_detailed_info
102
+ if self.status is not None:
103
+ body["status"] = self.status
104
+ if self.updated_at is not None:
105
+ body["updated_at"] = self.updated_at
87
106
  return body
88
107
 
89
108
  @classmethod
90
- def from_dict(cls, d: Dict[str, any]) -> CleanRoom:
109
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoom:
91
110
  """Deserializes the CleanRoom from a dictionary."""
92
- return cls(access_restricted=_enum(d, 'access_restricted', CleanRoomAccessRestricted),
93
- comment=d.get('comment', None),
94
- created_at=d.get('created_at', None),
95
- local_collaborator_alias=d.get('local_collaborator_alias', None),
96
- name=d.get('name', None),
97
- output_catalog=_from_dict(d, 'output_catalog', CleanRoomOutputCatalog),
98
- owner=d.get('owner', None),
99
- remote_detailed_info=_from_dict(d, 'remote_detailed_info', CleanRoomRemoteDetail),
100
- status=_enum(d, 'status', CleanRoomStatusEnum),
101
- updated_at=d.get('updated_at', None))
111
+ return cls(
112
+ access_restricted=_enum(d, "access_restricted", CleanRoomAccessRestricted),
113
+ comment=d.get("comment", None),
114
+ created_at=d.get("created_at", None),
115
+ local_collaborator_alias=d.get("local_collaborator_alias", None),
116
+ name=d.get("name", None),
117
+ output_catalog=_from_dict(d, "output_catalog", CleanRoomOutputCatalog),
118
+ owner=d.get("owner", None),
119
+ remote_detailed_info=_from_dict(d, "remote_detailed_info", CleanRoomRemoteDetail),
120
+ status=_enum(d, "status", CleanRoomStatusEnum),
121
+ updated_at=d.get("updated_at", None),
122
+ )
102
123
 
103
124
 
104
125
  class CleanRoomAccessRestricted(Enum):
105
126
 
106
- CSP_MISMATCH = 'CSP_MISMATCH'
107
- NO_RESTRICTION = 'NO_RESTRICTION'
127
+ CSP_MISMATCH = "CSP_MISMATCH"
128
+ NO_RESTRICTION = "NO_RESTRICTION"
108
129
 
109
130
 
110
131
  @dataclass
@@ -167,70 +188,94 @@ class CleanRoomAsset:
167
188
  def as_dict(self) -> dict:
168
189
  """Serializes the CleanRoomAsset into a dictionary suitable for use as a JSON request body."""
169
190
  body = {}
170
- if self.added_at is not None: body['added_at'] = self.added_at
171
- if self.asset_type is not None: body['asset_type'] = self.asset_type.value
172
- if self.foreign_table: body['foreign_table'] = self.foreign_table.as_dict()
191
+ if self.added_at is not None:
192
+ body["added_at"] = self.added_at
193
+ if self.asset_type is not None:
194
+ body["asset_type"] = self.asset_type.value
195
+ if self.foreign_table:
196
+ body["foreign_table"] = self.foreign_table.as_dict()
173
197
  if self.foreign_table_local_details:
174
- body['foreign_table_local_details'] = self.foreign_table_local_details.as_dict()
175
- if self.name is not None: body['name'] = self.name
176
- if self.notebook: body['notebook'] = self.notebook.as_dict()
198
+ body["foreign_table_local_details"] = self.foreign_table_local_details.as_dict()
199
+ if self.name is not None:
200
+ body["name"] = self.name
201
+ if self.notebook:
202
+ body["notebook"] = self.notebook.as_dict()
177
203
  if self.owner_collaborator_alias is not None:
178
- body['owner_collaborator_alias'] = self.owner_collaborator_alias
179
- if self.status is not None: body['status'] = self.status.value
180
- if self.table: body['table'] = self.table.as_dict()
181
- if self.table_local_details: body['table_local_details'] = self.table_local_details.as_dict()
182
- if self.view: body['view'] = self.view.as_dict()
183
- if self.view_local_details: body['view_local_details'] = self.view_local_details.as_dict()
184
- if self.volume_local_details: body['volume_local_details'] = self.volume_local_details.as_dict()
204
+ body["owner_collaborator_alias"] = self.owner_collaborator_alias
205
+ if self.status is not None:
206
+ body["status"] = self.status.value
207
+ if self.table:
208
+ body["table"] = self.table.as_dict()
209
+ if self.table_local_details:
210
+ body["table_local_details"] = self.table_local_details.as_dict()
211
+ if self.view:
212
+ body["view"] = self.view.as_dict()
213
+ if self.view_local_details:
214
+ body["view_local_details"] = self.view_local_details.as_dict()
215
+ if self.volume_local_details:
216
+ body["volume_local_details"] = self.volume_local_details.as_dict()
185
217
  return body
186
218
 
187
219
  def as_shallow_dict(self) -> dict:
188
220
  """Serializes the CleanRoomAsset into a shallow dictionary of its immediate attributes."""
189
221
  body = {}
190
- if self.added_at is not None: body['added_at'] = self.added_at
191
- if self.asset_type is not None: body['asset_type'] = self.asset_type
192
- if self.foreign_table: body['foreign_table'] = self.foreign_table
222
+ if self.added_at is not None:
223
+ body["added_at"] = self.added_at
224
+ if self.asset_type is not None:
225
+ body["asset_type"] = self.asset_type
226
+ if self.foreign_table:
227
+ body["foreign_table"] = self.foreign_table
193
228
  if self.foreign_table_local_details:
194
- body['foreign_table_local_details'] = self.foreign_table_local_details
195
- if self.name is not None: body['name'] = self.name
196
- if self.notebook: body['notebook'] = self.notebook
229
+ body["foreign_table_local_details"] = self.foreign_table_local_details
230
+ if self.name is not None:
231
+ body["name"] = self.name
232
+ if self.notebook:
233
+ body["notebook"] = self.notebook
197
234
  if self.owner_collaborator_alias is not None:
198
- body['owner_collaborator_alias'] = self.owner_collaborator_alias
199
- if self.status is not None: body['status'] = self.status
200
- if self.table: body['table'] = self.table
201
- if self.table_local_details: body['table_local_details'] = self.table_local_details
202
- if self.view: body['view'] = self.view
203
- if self.view_local_details: body['view_local_details'] = self.view_local_details
204
- if self.volume_local_details: body['volume_local_details'] = self.volume_local_details
235
+ body["owner_collaborator_alias"] = self.owner_collaborator_alias
236
+ if self.status is not None:
237
+ body["status"] = self.status
238
+ if self.table:
239
+ body["table"] = self.table
240
+ if self.table_local_details:
241
+ body["table_local_details"] = self.table_local_details
242
+ if self.view:
243
+ body["view"] = self.view
244
+ if self.view_local_details:
245
+ body["view_local_details"] = self.view_local_details
246
+ if self.volume_local_details:
247
+ body["volume_local_details"] = self.volume_local_details
205
248
  return body
206
249
 
207
250
  @classmethod
208
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAsset:
251
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAsset:
209
252
  """Deserializes the CleanRoomAsset from a dictionary."""
210
- return cls(added_at=d.get('added_at', None),
211
- asset_type=_enum(d, 'asset_type', CleanRoomAssetAssetType),
212
- foreign_table=_from_dict(d, 'foreign_table', CleanRoomAssetForeignTable),
213
- foreign_table_local_details=_from_dict(d, 'foreign_table_local_details',
214
- CleanRoomAssetForeignTableLocalDetails),
215
- name=d.get('name', None),
216
- notebook=_from_dict(d, 'notebook', CleanRoomAssetNotebook),
217
- owner_collaborator_alias=d.get('owner_collaborator_alias', None),
218
- status=_enum(d, 'status', CleanRoomAssetStatusEnum),
219
- table=_from_dict(d, 'table', CleanRoomAssetTable),
220
- table_local_details=_from_dict(d, 'table_local_details', CleanRoomAssetTableLocalDetails),
221
- view=_from_dict(d, 'view', CleanRoomAssetView),
222
- view_local_details=_from_dict(d, 'view_local_details', CleanRoomAssetViewLocalDetails),
223
- volume_local_details=_from_dict(d, 'volume_local_details',
224
- CleanRoomAssetVolumeLocalDetails))
253
+ return cls(
254
+ added_at=d.get("added_at", None),
255
+ asset_type=_enum(d, "asset_type", CleanRoomAssetAssetType),
256
+ foreign_table=_from_dict(d, "foreign_table", CleanRoomAssetForeignTable),
257
+ foreign_table_local_details=_from_dict(
258
+ d, "foreign_table_local_details", CleanRoomAssetForeignTableLocalDetails
259
+ ),
260
+ name=d.get("name", None),
261
+ notebook=_from_dict(d, "notebook", CleanRoomAssetNotebook),
262
+ owner_collaborator_alias=d.get("owner_collaborator_alias", None),
263
+ status=_enum(d, "status", CleanRoomAssetStatusEnum),
264
+ table=_from_dict(d, "table", CleanRoomAssetTable),
265
+ table_local_details=_from_dict(d, "table_local_details", CleanRoomAssetTableLocalDetails),
266
+ view=_from_dict(d, "view", CleanRoomAssetView),
267
+ view_local_details=_from_dict(d, "view_local_details", CleanRoomAssetViewLocalDetails),
268
+ volume_local_details=_from_dict(d, "volume_local_details", CleanRoomAssetVolumeLocalDetails),
269
+ )
225
270
 
226
271
 
227
272
  class CleanRoomAssetAssetType(Enum):
228
273
 
229
- FOREIGN_TABLE = 'FOREIGN_TABLE'
230
- NOTEBOOK_FILE = 'NOTEBOOK_FILE'
231
- TABLE = 'TABLE'
232
- VIEW = 'VIEW'
233
- VOLUME = 'VOLUME'
274
+ FOREIGN_TABLE = "FOREIGN_TABLE"
275
+ NOTEBOOK_FILE = "NOTEBOOK_FILE"
276
+ TABLE = "TABLE"
277
+ VIEW = "VIEW"
278
+ VOLUME = "VOLUME"
234
279
 
235
280
 
236
281
  @dataclass
@@ -241,19 +286,21 @@ class CleanRoomAssetForeignTable:
241
286
  def as_dict(self) -> dict:
242
287
  """Serializes the CleanRoomAssetForeignTable into a dictionary suitable for use as a JSON request body."""
243
288
  body = {}
244
- if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
289
+ if self.columns:
290
+ body["columns"] = [v.as_dict() for v in self.columns]
245
291
  return body
246
292
 
247
293
  def as_shallow_dict(self) -> dict:
248
294
  """Serializes the CleanRoomAssetForeignTable into a shallow dictionary of its immediate attributes."""
249
295
  body = {}
250
- if self.columns: body['columns'] = self.columns
296
+ if self.columns:
297
+ body["columns"] = self.columns
251
298
  return body
252
299
 
253
300
  @classmethod
254
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetForeignTable:
301
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetForeignTable:
255
302
  """Deserializes the CleanRoomAssetForeignTable from a dictionary."""
256
- return cls(columns=_repeated_dict(d, 'columns', catalog.ColumnInfo))
303
+ return cls(columns=_repeated_dict(d, "columns", catalog.ColumnInfo))
257
304
 
258
305
 
259
306
  @dataclass
@@ -265,19 +312,21 @@ class CleanRoomAssetForeignTableLocalDetails:
265
312
  def as_dict(self) -> dict:
266
313
  """Serializes the CleanRoomAssetForeignTableLocalDetails into a dictionary suitable for use as a JSON request body."""
267
314
  body = {}
268
- if self.local_name is not None: body['local_name'] = self.local_name
315
+ if self.local_name is not None:
316
+ body["local_name"] = self.local_name
269
317
  return body
270
318
 
271
319
  def as_shallow_dict(self) -> dict:
272
320
  """Serializes the CleanRoomAssetForeignTableLocalDetails into a shallow dictionary of its immediate attributes."""
273
321
  body = {}
274
- if self.local_name is not None: body['local_name'] = self.local_name
322
+ if self.local_name is not None:
323
+ body["local_name"] = self.local_name
275
324
  return body
276
325
 
277
326
  @classmethod
278
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetForeignTableLocalDetails:
327
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetForeignTableLocalDetails:
279
328
  """Deserializes the CleanRoomAssetForeignTableLocalDetails from a dictionary."""
280
- return cls(local_name=d.get('local_name', None))
329
+ return cls(local_name=d.get("local_name", None))
281
330
 
282
331
 
283
332
  @dataclass
@@ -292,28 +341,32 @@ class CleanRoomAssetNotebook:
292
341
  def as_dict(self) -> dict:
293
342
  """Serializes the CleanRoomAssetNotebook into a dictionary suitable for use as a JSON request body."""
294
343
  body = {}
295
- if self.etag is not None: body['etag'] = self.etag
296
- if self.notebook_content is not None: body['notebook_content'] = self.notebook_content
344
+ if self.etag is not None:
345
+ body["etag"] = self.etag
346
+ if self.notebook_content is not None:
347
+ body["notebook_content"] = self.notebook_content
297
348
  return body
298
349
 
299
350
  def as_shallow_dict(self) -> dict:
300
351
  """Serializes the CleanRoomAssetNotebook into a shallow dictionary of its immediate attributes."""
301
352
  body = {}
302
- if self.etag is not None: body['etag'] = self.etag
303
- if self.notebook_content is not None: body['notebook_content'] = self.notebook_content
353
+ if self.etag is not None:
354
+ body["etag"] = self.etag
355
+ if self.notebook_content is not None:
356
+ body["notebook_content"] = self.notebook_content
304
357
  return body
305
358
 
306
359
  @classmethod
307
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetNotebook:
360
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetNotebook:
308
361
  """Deserializes the CleanRoomAssetNotebook from a dictionary."""
309
- return cls(etag=d.get('etag', None), notebook_content=d.get('notebook_content', None))
362
+ return cls(etag=d.get("etag", None), notebook_content=d.get("notebook_content", None))
310
363
 
311
364
 
312
365
  class CleanRoomAssetStatusEnum(Enum):
313
366
 
314
- ACTIVE = 'ACTIVE'
315
- PENDING = 'PENDING'
316
- PERMISSION_DENIED = 'PERMISSION_DENIED'
367
+ ACTIVE = "ACTIVE"
368
+ PENDING = "PENDING"
369
+ PERMISSION_DENIED = "PERMISSION_DENIED"
317
370
 
318
371
 
319
372
  @dataclass
@@ -324,19 +377,21 @@ class CleanRoomAssetTable:
324
377
  def as_dict(self) -> dict:
325
378
  """Serializes the CleanRoomAssetTable into a dictionary suitable for use as a JSON request body."""
326
379
  body = {}
327
- if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
380
+ if self.columns:
381
+ body["columns"] = [v.as_dict() for v in self.columns]
328
382
  return body
329
383
 
330
384
  def as_shallow_dict(self) -> dict:
331
385
  """Serializes the CleanRoomAssetTable into a shallow dictionary of its immediate attributes."""
332
386
  body = {}
333
- if self.columns: body['columns'] = self.columns
387
+ if self.columns:
388
+ body["columns"] = self.columns
334
389
  return body
335
390
 
336
391
  @classmethod
337
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetTable:
392
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetTable:
338
393
  """Deserializes the CleanRoomAssetTable from a dictionary."""
339
- return cls(columns=_repeated_dict(d, 'columns', catalog.ColumnInfo))
394
+ return cls(columns=_repeated_dict(d, "columns", catalog.ColumnInfo))
340
395
 
341
396
 
342
397
  @dataclass
@@ -345,28 +400,31 @@ class CleanRoomAssetTableLocalDetails:
345
400
  """The fully qualified name of the table in its owner's local metastore, in the format of
346
401
  *catalog*.*schema*.*table_name*"""
347
402
 
348
- partitions: Optional[List[sharing.PartitionSpecificationPartition]] = None
403
+ partitions: Optional[List[sharing.Partition]] = None
349
404
  """Partition filtering specification for a shared table."""
350
405
 
351
406
  def as_dict(self) -> dict:
352
407
  """Serializes the CleanRoomAssetTableLocalDetails into a dictionary suitable for use as a JSON request body."""
353
408
  body = {}
354
- if self.local_name is not None: body['local_name'] = self.local_name
355
- if self.partitions: body['partitions'] = [v.as_dict() for v in self.partitions]
409
+ if self.local_name is not None:
410
+ body["local_name"] = self.local_name
411
+ if self.partitions:
412
+ body["partitions"] = [v.as_dict() for v in self.partitions]
356
413
  return body
357
414
 
358
415
  def as_shallow_dict(self) -> dict:
359
416
  """Serializes the CleanRoomAssetTableLocalDetails into a shallow dictionary of its immediate attributes."""
360
417
  body = {}
361
- if self.local_name is not None: body['local_name'] = self.local_name
362
- if self.partitions: body['partitions'] = self.partitions
418
+ if self.local_name is not None:
419
+ body["local_name"] = self.local_name
420
+ if self.partitions:
421
+ body["partitions"] = self.partitions
363
422
  return body
364
423
 
365
424
  @classmethod
366
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetTableLocalDetails:
425
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetTableLocalDetails:
367
426
  """Deserializes the CleanRoomAssetTableLocalDetails from a dictionary."""
368
- return cls(local_name=d.get('local_name', None),
369
- partitions=_repeated_dict(d, 'partitions', sharing.PartitionSpecificationPartition))
427
+ return cls(local_name=d.get("local_name", None), partitions=_repeated_dict(d, "partitions", sharing.Partition))
370
428
 
371
429
 
372
430
  @dataclass
@@ -377,19 +435,21 @@ class CleanRoomAssetView:
377
435
  def as_dict(self) -> dict:
378
436
  """Serializes the CleanRoomAssetView into a dictionary suitable for use as a JSON request body."""
379
437
  body = {}
380
- if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
438
+ if self.columns:
439
+ body["columns"] = [v.as_dict() for v in self.columns]
381
440
  return body
382
441
 
383
442
  def as_shallow_dict(self) -> dict:
384
443
  """Serializes the CleanRoomAssetView into a shallow dictionary of its immediate attributes."""
385
444
  body = {}
386
- if self.columns: body['columns'] = self.columns
445
+ if self.columns:
446
+ body["columns"] = self.columns
387
447
  return body
388
448
 
389
449
  @classmethod
390
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetView:
450
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetView:
391
451
  """Deserializes the CleanRoomAssetView from a dictionary."""
392
- return cls(columns=_repeated_dict(d, 'columns', catalog.ColumnInfo))
452
+ return cls(columns=_repeated_dict(d, "columns", catalog.ColumnInfo))
393
453
 
394
454
 
395
455
  @dataclass
@@ -401,19 +461,21 @@ class CleanRoomAssetViewLocalDetails:
401
461
  def as_dict(self) -> dict:
402
462
  """Serializes the CleanRoomAssetViewLocalDetails into a dictionary suitable for use as a JSON request body."""
403
463
  body = {}
404
- if self.local_name is not None: body['local_name'] = self.local_name
464
+ if self.local_name is not None:
465
+ body["local_name"] = self.local_name
405
466
  return body
406
467
 
407
468
  def as_shallow_dict(self) -> dict:
408
469
  """Serializes the CleanRoomAssetViewLocalDetails into a shallow dictionary of its immediate attributes."""
409
470
  body = {}
410
- if self.local_name is not None: body['local_name'] = self.local_name
471
+ if self.local_name is not None:
472
+ body["local_name"] = self.local_name
411
473
  return body
412
474
 
413
475
  @classmethod
414
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetViewLocalDetails:
476
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetViewLocalDetails:
415
477
  """Deserializes the CleanRoomAssetViewLocalDetails from a dictionary."""
416
- return cls(local_name=d.get('local_name', None))
478
+ return cls(local_name=d.get("local_name", None))
417
479
 
418
480
 
419
481
  @dataclass
@@ -425,19 +487,21 @@ class CleanRoomAssetVolumeLocalDetails:
425
487
  def as_dict(self) -> dict:
426
488
  """Serializes the CleanRoomAssetVolumeLocalDetails into a dictionary suitable for use as a JSON request body."""
427
489
  body = {}
428
- if self.local_name is not None: body['local_name'] = self.local_name
490
+ if self.local_name is not None:
491
+ body["local_name"] = self.local_name
429
492
  return body
430
493
 
431
494
  def as_shallow_dict(self) -> dict:
432
495
  """Serializes the CleanRoomAssetVolumeLocalDetails into a shallow dictionary of its immediate attributes."""
433
496
  body = {}
434
- if self.local_name is not None: body['local_name'] = self.local_name
497
+ if self.local_name is not None:
498
+ body["local_name"] = self.local_name
435
499
  return body
436
500
 
437
501
  @classmethod
438
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomAssetVolumeLocalDetails:
502
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomAssetVolumeLocalDetails:
439
503
  """Deserializes the CleanRoomAssetVolumeLocalDetails from a dictionary."""
440
- return cls(local_name=d.get('local_name', None))
504
+ return cls(local_name=d.get("local_name", None))
441
505
 
442
506
 
443
507
  @dataclass
@@ -477,38 +541,48 @@ class CleanRoomCollaborator:
477
541
  def as_dict(self) -> dict:
478
542
  """Serializes the CleanRoomCollaborator into a dictionary suitable for use as a JSON request body."""
479
543
  body = {}
480
- if self.collaborator_alias is not None: body['collaborator_alias'] = self.collaborator_alias
481
- if self.display_name is not None: body['display_name'] = self.display_name
482
- if self.global_metastore_id is not None: body['global_metastore_id'] = self.global_metastore_id
544
+ if self.collaborator_alias is not None:
545
+ body["collaborator_alias"] = self.collaborator_alias
546
+ if self.display_name is not None:
547
+ body["display_name"] = self.display_name
548
+ if self.global_metastore_id is not None:
549
+ body["global_metastore_id"] = self.global_metastore_id
483
550
  if self.invite_recipient_email is not None:
484
- body['invite_recipient_email'] = self.invite_recipient_email
551
+ body["invite_recipient_email"] = self.invite_recipient_email
485
552
  if self.invite_recipient_workspace_id is not None:
486
- body['invite_recipient_workspace_id'] = self.invite_recipient_workspace_id
487
- if self.organization_name is not None: body['organization_name'] = self.organization_name
553
+ body["invite_recipient_workspace_id"] = self.invite_recipient_workspace_id
554
+ if self.organization_name is not None:
555
+ body["organization_name"] = self.organization_name
488
556
  return body
489
557
 
490
558
  def as_shallow_dict(self) -> dict:
491
559
  """Serializes the CleanRoomCollaborator into a shallow dictionary of its immediate attributes."""
492
560
  body = {}
493
- if self.collaborator_alias is not None: body['collaborator_alias'] = self.collaborator_alias
494
- if self.display_name is not None: body['display_name'] = self.display_name
495
- if self.global_metastore_id is not None: body['global_metastore_id'] = self.global_metastore_id
561
+ if self.collaborator_alias is not None:
562
+ body["collaborator_alias"] = self.collaborator_alias
563
+ if self.display_name is not None:
564
+ body["display_name"] = self.display_name
565
+ if self.global_metastore_id is not None:
566
+ body["global_metastore_id"] = self.global_metastore_id
496
567
  if self.invite_recipient_email is not None:
497
- body['invite_recipient_email'] = self.invite_recipient_email
568
+ body["invite_recipient_email"] = self.invite_recipient_email
498
569
  if self.invite_recipient_workspace_id is not None:
499
- body['invite_recipient_workspace_id'] = self.invite_recipient_workspace_id
500
- if self.organization_name is not None: body['organization_name'] = self.organization_name
570
+ body["invite_recipient_workspace_id"] = self.invite_recipient_workspace_id
571
+ if self.organization_name is not None:
572
+ body["organization_name"] = self.organization_name
501
573
  return body
502
574
 
503
575
  @classmethod
504
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomCollaborator:
576
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomCollaborator:
505
577
  """Deserializes the CleanRoomCollaborator from a dictionary."""
506
- return cls(collaborator_alias=d.get('collaborator_alias', None),
507
- display_name=d.get('display_name', None),
508
- global_metastore_id=d.get('global_metastore_id', None),
509
- invite_recipient_email=d.get('invite_recipient_email', None),
510
- invite_recipient_workspace_id=d.get('invite_recipient_workspace_id', None),
511
- organization_name=d.get('organization_name', None))
578
+ return cls(
579
+ collaborator_alias=d.get("collaborator_alias", None),
580
+ display_name=d.get("display_name", None),
581
+ global_metastore_id=d.get("global_metastore_id", None),
582
+ invite_recipient_email=d.get("invite_recipient_email", None),
583
+ invite_recipient_workspace_id=d.get("invite_recipient_workspace_id", None),
584
+ organization_name=d.get("organization_name", None),
585
+ )
512
586
 
513
587
 
514
588
  @dataclass
@@ -542,40 +616,52 @@ class CleanRoomNotebookTaskRun:
542
616
  """Serializes the CleanRoomNotebookTaskRun into a dictionary suitable for use as a JSON request body."""
543
617
  body = {}
544
618
  if self.collaborator_job_run_info:
545
- body['collaborator_job_run_info'] = self.collaborator_job_run_info.as_dict()
546
- if self.notebook_job_run_state: body['notebook_job_run_state'] = self.notebook_job_run_state.as_dict()
547
- if self.notebook_name is not None: body['notebook_name'] = self.notebook_name
619
+ body["collaborator_job_run_info"] = self.collaborator_job_run_info.as_dict()
620
+ if self.notebook_job_run_state:
621
+ body["notebook_job_run_state"] = self.notebook_job_run_state.as_dict()
622
+ if self.notebook_name is not None:
623
+ body["notebook_name"] = self.notebook_name
548
624
  if self.output_schema_expiration_time is not None:
549
- body['output_schema_expiration_time'] = self.output_schema_expiration_time
550
- if self.output_schema_name is not None: body['output_schema_name'] = self.output_schema_name
551
- if self.run_duration is not None: body['run_duration'] = self.run_duration
552
- if self.start_time is not None: body['start_time'] = self.start_time
625
+ body["output_schema_expiration_time"] = self.output_schema_expiration_time
626
+ if self.output_schema_name is not None:
627
+ body["output_schema_name"] = self.output_schema_name
628
+ if self.run_duration is not None:
629
+ body["run_duration"] = self.run_duration
630
+ if self.start_time is not None:
631
+ body["start_time"] = self.start_time
553
632
  return body
554
633
 
555
634
  def as_shallow_dict(self) -> dict:
556
635
  """Serializes the CleanRoomNotebookTaskRun into a shallow dictionary of its immediate attributes."""
557
636
  body = {}
558
- if self.collaborator_job_run_info: body['collaborator_job_run_info'] = self.collaborator_job_run_info
559
- if self.notebook_job_run_state: body['notebook_job_run_state'] = self.notebook_job_run_state
560
- if self.notebook_name is not None: body['notebook_name'] = self.notebook_name
637
+ if self.collaborator_job_run_info:
638
+ body["collaborator_job_run_info"] = self.collaborator_job_run_info
639
+ if self.notebook_job_run_state:
640
+ body["notebook_job_run_state"] = self.notebook_job_run_state
641
+ if self.notebook_name is not None:
642
+ body["notebook_name"] = self.notebook_name
561
643
  if self.output_schema_expiration_time is not None:
562
- body['output_schema_expiration_time'] = self.output_schema_expiration_time
563
- if self.output_schema_name is not None: body['output_schema_name'] = self.output_schema_name
564
- if self.run_duration is not None: body['run_duration'] = self.run_duration
565
- if self.start_time is not None: body['start_time'] = self.start_time
644
+ body["output_schema_expiration_time"] = self.output_schema_expiration_time
645
+ if self.output_schema_name is not None:
646
+ body["output_schema_name"] = self.output_schema_name
647
+ if self.run_duration is not None:
648
+ body["run_duration"] = self.run_duration
649
+ if self.start_time is not None:
650
+ body["start_time"] = self.start_time
566
651
  return body
567
652
 
568
653
  @classmethod
569
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomNotebookTaskRun:
654
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomNotebookTaskRun:
570
655
  """Deserializes the CleanRoomNotebookTaskRun from a dictionary."""
571
- return cls(collaborator_job_run_info=_from_dict(d, 'collaborator_job_run_info',
572
- CollaboratorJobRunInfo),
573
- notebook_job_run_state=_from_dict(d, 'notebook_job_run_state', jobs.CleanRoomTaskRunState),
574
- notebook_name=d.get('notebook_name', None),
575
- output_schema_expiration_time=d.get('output_schema_expiration_time', None),
576
- output_schema_name=d.get('output_schema_name', None),
577
- run_duration=d.get('run_duration', None),
578
- start_time=d.get('start_time', None))
656
+ return cls(
657
+ collaborator_job_run_info=_from_dict(d, "collaborator_job_run_info", CollaboratorJobRunInfo),
658
+ notebook_job_run_state=_from_dict(d, "notebook_job_run_state", jobs.CleanRoomTaskRunState),
659
+ notebook_name=d.get("notebook_name", None),
660
+ output_schema_expiration_time=d.get("output_schema_expiration_time", None),
661
+ output_schema_name=d.get("output_schema_name", None),
662
+ run_duration=d.get("run_duration", None),
663
+ start_time=d.get("start_time", None),
664
+ )
579
665
 
580
666
 
581
667
  @dataclass
@@ -591,29 +677,35 @@ class CleanRoomOutputCatalog:
591
677
  def as_dict(self) -> dict:
592
678
  """Serializes the CleanRoomOutputCatalog into a dictionary suitable for use as a JSON request body."""
593
679
  body = {}
594
- if self.catalog_name is not None: body['catalog_name'] = self.catalog_name
595
- if self.status is not None: body['status'] = self.status.value
680
+ if self.catalog_name is not None:
681
+ body["catalog_name"] = self.catalog_name
682
+ if self.status is not None:
683
+ body["status"] = self.status.value
596
684
  return body
597
685
 
598
686
  def as_shallow_dict(self) -> dict:
599
687
  """Serializes the CleanRoomOutputCatalog into a shallow dictionary of its immediate attributes."""
600
688
  body = {}
601
- if self.catalog_name is not None: body['catalog_name'] = self.catalog_name
602
- if self.status is not None: body['status'] = self.status
689
+ if self.catalog_name is not None:
690
+ body["catalog_name"] = self.catalog_name
691
+ if self.status is not None:
692
+ body["status"] = self.status
603
693
  return body
604
694
 
605
695
  @classmethod
606
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomOutputCatalog:
696
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomOutputCatalog:
607
697
  """Deserializes the CleanRoomOutputCatalog from a dictionary."""
608
- return cls(catalog_name=d.get('catalog_name', None),
609
- status=_enum(d, 'status', CleanRoomOutputCatalogOutputCatalogStatus))
698
+ return cls(
699
+ catalog_name=d.get("catalog_name", None),
700
+ status=_enum(d, "status", CleanRoomOutputCatalogOutputCatalogStatus),
701
+ )
610
702
 
611
703
 
612
704
  class CleanRoomOutputCatalogOutputCatalogStatus(Enum):
613
705
 
614
- CREATED = 'CREATED'
615
- NOT_CREATED = 'NOT_CREATED'
616
- NOT_ELIGIBLE = 'NOT_ELIGIBLE'
706
+ CREATED = "CREATED"
707
+ NOT_CREATED = "NOT_CREATED"
708
+ NOT_ELIGIBLE = "NOT_ELIGIBLE"
617
709
 
618
710
 
619
711
  @dataclass
@@ -649,48 +741,61 @@ class CleanRoomRemoteDetail:
649
741
  def as_dict(self) -> dict:
650
742
  """Serializes the CleanRoomRemoteDetail into a dictionary suitable for use as a JSON request body."""
651
743
  body = {}
652
- if self.central_clean_room_id is not None: body['central_clean_room_id'] = self.central_clean_room_id
653
- if self.cloud_vendor is not None: body['cloud_vendor'] = self.cloud_vendor
654
- if self.collaborators: body['collaborators'] = [v.as_dict() for v in self.collaborators]
744
+ if self.central_clean_room_id is not None:
745
+ body["central_clean_room_id"] = self.central_clean_room_id
746
+ if self.cloud_vendor is not None:
747
+ body["cloud_vendor"] = self.cloud_vendor
748
+ if self.collaborators:
749
+ body["collaborators"] = [v.as_dict() for v in self.collaborators]
655
750
  if self.compliance_security_profile:
656
- body['compliance_security_profile'] = self.compliance_security_profile.as_dict()
657
- if self.creator: body['creator'] = self.creator.as_dict()
658
- if self.egress_network_policy: body['egress_network_policy'] = self.egress_network_policy.as_dict()
659
- if self.region is not None: body['region'] = self.region
751
+ body["compliance_security_profile"] = self.compliance_security_profile.as_dict()
752
+ if self.creator:
753
+ body["creator"] = self.creator.as_dict()
754
+ if self.egress_network_policy:
755
+ body["egress_network_policy"] = self.egress_network_policy.as_dict()
756
+ if self.region is not None:
757
+ body["region"] = self.region
660
758
  return body
661
759
 
662
760
  def as_shallow_dict(self) -> dict:
663
761
  """Serializes the CleanRoomRemoteDetail into a shallow dictionary of its immediate attributes."""
664
762
  body = {}
665
- if self.central_clean_room_id is not None: body['central_clean_room_id'] = self.central_clean_room_id
666
- if self.cloud_vendor is not None: body['cloud_vendor'] = self.cloud_vendor
667
- if self.collaborators: body['collaborators'] = self.collaborators
763
+ if self.central_clean_room_id is not None:
764
+ body["central_clean_room_id"] = self.central_clean_room_id
765
+ if self.cloud_vendor is not None:
766
+ body["cloud_vendor"] = self.cloud_vendor
767
+ if self.collaborators:
768
+ body["collaborators"] = self.collaborators
668
769
  if self.compliance_security_profile:
669
- body['compliance_security_profile'] = self.compliance_security_profile
670
- if self.creator: body['creator'] = self.creator
671
- if self.egress_network_policy: body['egress_network_policy'] = self.egress_network_policy
672
- if self.region is not None: body['region'] = self.region
770
+ body["compliance_security_profile"] = self.compliance_security_profile
771
+ if self.creator:
772
+ body["creator"] = self.creator
773
+ if self.egress_network_policy:
774
+ body["egress_network_policy"] = self.egress_network_policy
775
+ if self.region is not None:
776
+ body["region"] = self.region
673
777
  return body
674
778
 
675
779
  @classmethod
676
- def from_dict(cls, d: Dict[str, any]) -> CleanRoomRemoteDetail:
780
+ def from_dict(cls, d: Dict[str, Any]) -> CleanRoomRemoteDetail:
677
781
  """Deserializes the CleanRoomRemoteDetail from a dictionary."""
678
- return cls(central_clean_room_id=d.get('central_clean_room_id', None),
679
- cloud_vendor=d.get('cloud_vendor', None),
680
- collaborators=_repeated_dict(d, 'collaborators', CleanRoomCollaborator),
681
- compliance_security_profile=_from_dict(d, 'compliance_security_profile',
682
- ComplianceSecurityProfile),
683
- creator=_from_dict(d, 'creator', CleanRoomCollaborator),
684
- egress_network_policy=_from_dict(d, 'egress_network_policy', settings.EgressNetworkPolicy),
685
- region=d.get('region', None))
782
+ return cls(
783
+ central_clean_room_id=d.get("central_clean_room_id", None),
784
+ cloud_vendor=d.get("cloud_vendor", None),
785
+ collaborators=_repeated_dict(d, "collaborators", CleanRoomCollaborator),
786
+ compliance_security_profile=_from_dict(d, "compliance_security_profile", ComplianceSecurityProfile),
787
+ creator=_from_dict(d, "creator", CleanRoomCollaborator),
788
+ egress_network_policy=_from_dict(d, "egress_network_policy", settings.EgressNetworkPolicy),
789
+ region=d.get("region", None),
790
+ )
686
791
 
687
792
 
688
793
  class CleanRoomStatusEnum(Enum):
689
794
 
690
- ACTIVE = 'ACTIVE'
691
- DELETED = 'DELETED'
692
- FAILED = 'FAILED'
693
- PROVISIONING = 'PROVISIONING'
795
+ ACTIVE = "ACTIVE"
796
+ DELETED = "DELETED"
797
+ FAILED = "FAILED"
798
+ PROVISIONING = "PROVISIONING"
694
799
 
695
800
 
696
801
  @dataclass
@@ -713,37 +818,43 @@ class CollaboratorJobRunInfo:
713
818
  def as_dict(self) -> dict:
714
819
  """Serializes the CollaboratorJobRunInfo into a dictionary suitable for use as a JSON request body."""
715
820
  body = {}
716
- if self.collaborator_alias is not None: body['collaborator_alias'] = self.collaborator_alias
717
- if self.collaborator_job_id is not None: body['collaborator_job_id'] = self.collaborator_job_id
821
+ if self.collaborator_alias is not None:
822
+ body["collaborator_alias"] = self.collaborator_alias
823
+ if self.collaborator_job_id is not None:
824
+ body["collaborator_job_id"] = self.collaborator_job_id
718
825
  if self.collaborator_job_run_id is not None:
719
- body['collaborator_job_run_id'] = self.collaborator_job_run_id
826
+ body["collaborator_job_run_id"] = self.collaborator_job_run_id
720
827
  if self.collaborator_task_run_id is not None:
721
- body['collaborator_task_run_id'] = self.collaborator_task_run_id
828
+ body["collaborator_task_run_id"] = self.collaborator_task_run_id
722
829
  if self.collaborator_workspace_id is not None:
723
- body['collaborator_workspace_id'] = self.collaborator_workspace_id
830
+ body["collaborator_workspace_id"] = self.collaborator_workspace_id
724
831
  return body
725
832
 
726
833
  def as_shallow_dict(self) -> dict:
727
834
  """Serializes the CollaboratorJobRunInfo into a shallow dictionary of its immediate attributes."""
728
835
  body = {}
729
- if self.collaborator_alias is not None: body['collaborator_alias'] = self.collaborator_alias
730
- if self.collaborator_job_id is not None: body['collaborator_job_id'] = self.collaborator_job_id
836
+ if self.collaborator_alias is not None:
837
+ body["collaborator_alias"] = self.collaborator_alias
838
+ if self.collaborator_job_id is not None:
839
+ body["collaborator_job_id"] = self.collaborator_job_id
731
840
  if self.collaborator_job_run_id is not None:
732
- body['collaborator_job_run_id'] = self.collaborator_job_run_id
841
+ body["collaborator_job_run_id"] = self.collaborator_job_run_id
733
842
  if self.collaborator_task_run_id is not None:
734
- body['collaborator_task_run_id'] = self.collaborator_task_run_id
843
+ body["collaborator_task_run_id"] = self.collaborator_task_run_id
735
844
  if self.collaborator_workspace_id is not None:
736
- body['collaborator_workspace_id'] = self.collaborator_workspace_id
845
+ body["collaborator_workspace_id"] = self.collaborator_workspace_id
737
846
  return body
738
847
 
739
848
  @classmethod
740
- def from_dict(cls, d: Dict[str, any]) -> CollaboratorJobRunInfo:
849
+ def from_dict(cls, d: Dict[str, Any]) -> CollaboratorJobRunInfo:
741
850
  """Deserializes the CollaboratorJobRunInfo from a dictionary."""
742
- return cls(collaborator_alias=d.get('collaborator_alias', None),
743
- collaborator_job_id=d.get('collaborator_job_id', None),
744
- collaborator_job_run_id=d.get('collaborator_job_run_id', None),
745
- collaborator_task_run_id=d.get('collaborator_task_run_id', None),
746
- collaborator_workspace_id=d.get('collaborator_workspace_id', None))
851
+ return cls(
852
+ collaborator_alias=d.get("collaborator_alias", None),
853
+ collaborator_job_id=d.get("collaborator_job_id", None),
854
+ collaborator_job_run_id=d.get("collaborator_job_run_id", None),
855
+ collaborator_task_run_id=d.get("collaborator_task_run_id", None),
856
+ collaborator_workspace_id=d.get("collaborator_workspace_id", None),
857
+ )
747
858
 
748
859
 
749
860
  @dataclass
@@ -760,23 +871,27 @@ class ComplianceSecurityProfile:
760
871
  """Serializes the ComplianceSecurityProfile into a dictionary suitable for use as a JSON request body."""
761
872
  body = {}
762
873
  if self.compliance_standards:
763
- body['compliance_standards'] = [v.as_dict() for v in self.compliance_standards]
764
- if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
874
+ body["compliance_standards"] = [v.as_dict() for v in self.compliance_standards]
875
+ if self.is_enabled is not None:
876
+ body["is_enabled"] = self.is_enabled
765
877
  return body
766
878
 
767
879
  def as_shallow_dict(self) -> dict:
768
880
  """Serializes the ComplianceSecurityProfile into a shallow dictionary of its immediate attributes."""
769
881
  body = {}
770
- if self.compliance_standards: body['compliance_standards'] = self.compliance_standards
771
- if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
882
+ if self.compliance_standards:
883
+ body["compliance_standards"] = self.compliance_standards
884
+ if self.is_enabled is not None:
885
+ body["is_enabled"] = self.is_enabled
772
886
  return body
773
887
 
774
888
  @classmethod
775
- def from_dict(cls, d: Dict[str, any]) -> ComplianceSecurityProfile:
889
+ def from_dict(cls, d: Dict[str, Any]) -> ComplianceSecurityProfile:
776
890
  """Deserializes the ComplianceSecurityProfile from a dictionary."""
777
- return cls(compliance_standards=_repeated_dict(d, 'compliance_standards',
778
- settings.ComplianceStandard),
779
- is_enabled=d.get('is_enabled', None))
891
+ return cls(
892
+ compliance_standards=_repeated_dict(d, "compliance_standards", settings.ComplianceStandard),
893
+ is_enabled=d.get("is_enabled", None),
894
+ )
780
895
 
781
896
 
782
897
  @dataclass
@@ -786,19 +901,21 @@ class CreateCleanRoomOutputCatalogResponse:
786
901
  def as_dict(self) -> dict:
787
902
  """Serializes the CreateCleanRoomOutputCatalogResponse into a dictionary suitable for use as a JSON request body."""
788
903
  body = {}
789
- if self.output_catalog: body['output_catalog'] = self.output_catalog.as_dict()
904
+ if self.output_catalog:
905
+ body["output_catalog"] = self.output_catalog.as_dict()
790
906
  return body
791
907
 
792
908
  def as_shallow_dict(self) -> dict:
793
909
  """Serializes the CreateCleanRoomOutputCatalogResponse into a shallow dictionary of its immediate attributes."""
794
910
  body = {}
795
- if self.output_catalog: body['output_catalog'] = self.output_catalog
911
+ if self.output_catalog:
912
+ body["output_catalog"] = self.output_catalog
796
913
  return body
797
914
 
798
915
  @classmethod
799
- def from_dict(cls, d: Dict[str, any]) -> CreateCleanRoomOutputCatalogResponse:
916
+ def from_dict(cls, d: Dict[str, Any]) -> CreateCleanRoomOutputCatalogResponse:
800
917
  """Deserializes the CreateCleanRoomOutputCatalogResponse from a dictionary."""
801
- return cls(output_catalog=_from_dict(d, 'output_catalog', CleanRoomOutputCatalog))
918
+ return cls(output_catalog=_from_dict(d, "output_catalog", CleanRoomOutputCatalog))
802
919
 
803
920
 
804
921
  @dataclass
@@ -817,14 +934,13 @@ class DeleteCleanRoomAssetResponse:
817
934
  return body
818
935
 
819
936
  @classmethod
820
- def from_dict(cls, d: Dict[str, any]) -> DeleteCleanRoomAssetResponse:
937
+ def from_dict(cls, d: Dict[str, Any]) -> DeleteCleanRoomAssetResponse:
821
938
  """Deserializes the DeleteCleanRoomAssetResponse from a dictionary."""
822
939
  return cls()
823
940
 
824
941
 
825
942
  @dataclass
826
943
  class DeleteResponse:
827
-
828
944
  def as_dict(self) -> dict:
829
945
  """Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
830
946
  body = {}
@@ -836,7 +952,7 @@ class DeleteResponse:
836
952
  return body
837
953
 
838
954
  @classmethod
839
- def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
955
+ def from_dict(cls, d: Dict[str, Any]) -> DeleteResponse:
840
956
  """Deserializes the DeleteResponse from a dictionary."""
841
957
  return cls()
842
958
 
@@ -853,22 +969,25 @@ class ListCleanRoomAssetsResponse:
853
969
  def as_dict(self) -> dict:
854
970
  """Serializes the ListCleanRoomAssetsResponse into a dictionary suitable for use as a JSON request body."""
855
971
  body = {}
856
- if self.assets: body['assets'] = [v.as_dict() for v in self.assets]
857
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
972
+ if self.assets:
973
+ body["assets"] = [v.as_dict() for v in self.assets]
974
+ if self.next_page_token is not None:
975
+ body["next_page_token"] = self.next_page_token
858
976
  return body
859
977
 
860
978
  def as_shallow_dict(self) -> dict:
861
979
  """Serializes the ListCleanRoomAssetsResponse into a shallow dictionary of its immediate attributes."""
862
980
  body = {}
863
- if self.assets: body['assets'] = self.assets
864
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
981
+ if self.assets:
982
+ body["assets"] = self.assets
983
+ if self.next_page_token is not None:
984
+ body["next_page_token"] = self.next_page_token
865
985
  return body
866
986
 
867
987
  @classmethod
868
- def from_dict(cls, d: Dict[str, any]) -> ListCleanRoomAssetsResponse:
988
+ def from_dict(cls, d: Dict[str, Any]) -> ListCleanRoomAssetsResponse:
869
989
  """Deserializes the ListCleanRoomAssetsResponse from a dictionary."""
870
- return cls(assets=_repeated_dict(d, 'assets', CleanRoomAsset),
871
- next_page_token=d.get('next_page_token', None))
990
+ return cls(assets=_repeated_dict(d, "assets", CleanRoomAsset), next_page_token=d.get("next_page_token", None))
872
991
 
873
992
 
874
993
  @dataclass
@@ -883,22 +1002,27 @@ class ListCleanRoomNotebookTaskRunsResponse:
883
1002
  def as_dict(self) -> dict:
884
1003
  """Serializes the ListCleanRoomNotebookTaskRunsResponse into a dictionary suitable for use as a JSON request body."""
885
1004
  body = {}
886
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
887
- if self.runs: body['runs'] = [v.as_dict() for v in self.runs]
1005
+ if self.next_page_token is not None:
1006
+ body["next_page_token"] = self.next_page_token
1007
+ if self.runs:
1008
+ body["runs"] = [v.as_dict() for v in self.runs]
888
1009
  return body
889
1010
 
890
1011
  def as_shallow_dict(self) -> dict:
891
1012
  """Serializes the ListCleanRoomNotebookTaskRunsResponse into a shallow dictionary of its immediate attributes."""
892
1013
  body = {}
893
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
894
- if self.runs: body['runs'] = self.runs
1014
+ if self.next_page_token is not None:
1015
+ body["next_page_token"] = self.next_page_token
1016
+ if self.runs:
1017
+ body["runs"] = self.runs
895
1018
  return body
896
1019
 
897
1020
  @classmethod
898
- def from_dict(cls, d: Dict[str, any]) -> ListCleanRoomNotebookTaskRunsResponse:
1021
+ def from_dict(cls, d: Dict[str, Any]) -> ListCleanRoomNotebookTaskRunsResponse:
899
1022
  """Deserializes the ListCleanRoomNotebookTaskRunsResponse from a dictionary."""
900
- return cls(next_page_token=d.get('next_page_token', None),
901
- runs=_repeated_dict(d, 'runs', CleanRoomNotebookTaskRun))
1023
+ return cls(
1024
+ next_page_token=d.get("next_page_token", None), runs=_repeated_dict(d, "runs", CleanRoomNotebookTaskRun)
1025
+ )
902
1026
 
903
1027
 
904
1028
  @dataclass
@@ -912,22 +1036,27 @@ class ListCleanRoomsResponse:
912
1036
  def as_dict(self) -> dict:
913
1037
  """Serializes the ListCleanRoomsResponse into a dictionary suitable for use as a JSON request body."""
914
1038
  body = {}
915
- if self.clean_rooms: body['clean_rooms'] = [v.as_dict() for v in self.clean_rooms]
916
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
1039
+ if self.clean_rooms:
1040
+ body["clean_rooms"] = [v.as_dict() for v in self.clean_rooms]
1041
+ if self.next_page_token is not None:
1042
+ body["next_page_token"] = self.next_page_token
917
1043
  return body
918
1044
 
919
1045
  def as_shallow_dict(self) -> dict:
920
1046
  """Serializes the ListCleanRoomsResponse into a shallow dictionary of its immediate attributes."""
921
1047
  body = {}
922
- if self.clean_rooms: body['clean_rooms'] = self.clean_rooms
923
- if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
1048
+ if self.clean_rooms:
1049
+ body["clean_rooms"] = self.clean_rooms
1050
+ if self.next_page_token is not None:
1051
+ body["next_page_token"] = self.next_page_token
924
1052
  return body
925
1053
 
926
1054
  @classmethod
927
- def from_dict(cls, d: Dict[str, any]) -> ListCleanRoomsResponse:
1055
+ def from_dict(cls, d: Dict[str, Any]) -> ListCleanRoomsResponse:
928
1056
  """Deserializes the ListCleanRoomsResponse from a dictionary."""
929
- return cls(clean_rooms=_repeated_dict(d, 'clean_rooms', CleanRoom),
930
- next_page_token=d.get('next_page_token', None))
1057
+ return cls(
1058
+ clean_rooms=_repeated_dict(d, "clean_rooms", CleanRoom), next_page_token=d.get("next_page_token", None)
1059
+ )
931
1060
 
932
1061
 
933
1062
  @dataclass
@@ -940,21 +1069,25 @@ class UpdateCleanRoomRequest:
940
1069
  def as_dict(self) -> dict:
941
1070
  """Serializes the UpdateCleanRoomRequest into a dictionary suitable for use as a JSON request body."""
942
1071
  body = {}
943
- if self.clean_room: body['clean_room'] = self.clean_room.as_dict()
944
- if self.name is not None: body['name'] = self.name
1072
+ if self.clean_room:
1073
+ body["clean_room"] = self.clean_room.as_dict()
1074
+ if self.name is not None:
1075
+ body["name"] = self.name
945
1076
  return body
946
1077
 
947
1078
  def as_shallow_dict(self) -> dict:
948
1079
  """Serializes the UpdateCleanRoomRequest into a shallow dictionary of its immediate attributes."""
949
1080
  body = {}
950
- if self.clean_room: body['clean_room'] = self.clean_room
951
- if self.name is not None: body['name'] = self.name
1081
+ if self.clean_room:
1082
+ body["clean_room"] = self.clean_room
1083
+ if self.name is not None:
1084
+ body["name"] = self.name
952
1085
  return body
953
1086
 
954
1087
  @classmethod
955
- def from_dict(cls, d: Dict[str, any]) -> UpdateCleanRoomRequest:
1088
+ def from_dict(cls, d: Dict[str, Any]) -> UpdateCleanRoomRequest:
956
1089
  """Deserializes the UpdateCleanRoomRequest from a dictionary."""
957
- return cls(clean_room=_from_dict(d, 'clean_room', CleanRoom), name=d.get('name', None))
1090
+ return cls(clean_room=_from_dict(d, "clean_room", CleanRoom), name=d.get("name", None))
958
1091
 
959
1092
 
960
1093
  class CleanRoomAssetsAPI:
@@ -966,111 +1099,119 @@ class CleanRoomAssetsAPI:
966
1099
 
967
1100
  def create(self, clean_room_name: str, *, asset: Optional[CleanRoomAsset] = None) -> CleanRoomAsset:
968
1101
  """Create an asset.
969
-
1102
+
970
1103
  Create a clean room asset —share an asset like a notebook or table into the clean room. For each UC
971
1104
  asset that is added through this method, the clean room owner must also have enough privilege on the
972
1105
  asset to consume it. The privilege must be maintained indefinitely for the clean room to be able to
973
1106
  access the asset. Typically, you should use a group as the clean room owner.
974
-
1107
+
975
1108
  :param clean_room_name: str
976
1109
  Name of the clean room.
977
1110
  :param asset: :class:`CleanRoomAsset` (optional)
978
1111
  Metadata of the clean room asset
979
-
1112
+
980
1113
  :returns: :class:`CleanRoomAsset`
981
1114
  """
982
1115
  body = asset.as_dict()
983
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1116
+ headers = {
1117
+ "Accept": "application/json",
1118
+ "Content-Type": "application/json",
1119
+ }
984
1120
 
985
- res = self._api.do('POST',
986
- f'/api/2.0/clean-rooms/{clean_room_name}/assets',
987
- body=body,
988
- headers=headers)
1121
+ res = self._api.do("POST", f"/api/2.0/clean-rooms/{clean_room_name}/assets", body=body, headers=headers)
989
1122
  return CleanRoomAsset.from_dict(res)
990
1123
 
991
1124
  def delete(self, clean_room_name: str, asset_type: CleanRoomAssetAssetType, asset_full_name: str):
992
1125
  """Delete an asset.
993
-
1126
+
994
1127
  Delete a clean room asset - unshare/remove the asset from the clean room
995
-
1128
+
996
1129
  :param clean_room_name: str
997
1130
  Name of the clean room.
998
1131
  :param asset_type: :class:`CleanRoomAssetAssetType`
999
1132
  The type of the asset.
1000
1133
  :param asset_full_name: str
1001
1134
  The fully qualified name of the asset, it is same as the name field in CleanRoomAsset.
1002
-
1003
-
1135
+
1136
+
1004
1137
  """
1005
1138
 
1006
- headers = {'Accept': 'application/json', }
1139
+ headers = {
1140
+ "Accept": "application/json",
1141
+ }
1007
1142
 
1008
- self._api.do('DELETE',
1009
- f'/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{asset_full_name}',
1010
- headers=headers)
1143
+ self._api.do(
1144
+ "DELETE",
1145
+ f"/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{asset_full_name}",
1146
+ headers=headers,
1147
+ )
1011
1148
 
1012
- def get(self, clean_room_name: str, asset_type: CleanRoomAssetAssetType,
1013
- asset_full_name: str) -> CleanRoomAsset:
1149
+ def get(self, clean_room_name: str, asset_type: CleanRoomAssetAssetType, asset_full_name: str) -> CleanRoomAsset:
1014
1150
  """Get an asset.
1015
-
1151
+
1016
1152
  Get the details of a clean room asset by its type and full name.
1017
-
1153
+
1018
1154
  :param clean_room_name: str
1019
1155
  Name of the clean room.
1020
1156
  :param asset_type: :class:`CleanRoomAssetAssetType`
1021
1157
  The type of the asset.
1022
1158
  :param asset_full_name: str
1023
1159
  The fully qualified name of the asset, it is same as the name field in CleanRoomAsset.
1024
-
1160
+
1025
1161
  :returns: :class:`CleanRoomAsset`
1026
1162
  """
1027
1163
 
1028
- headers = {'Accept': 'application/json', }
1164
+ headers = {
1165
+ "Accept": "application/json",
1166
+ }
1029
1167
 
1030
1168
  res = self._api.do(
1031
- 'GET',
1032
- f'/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{asset_full_name}',
1033
- headers=headers)
1169
+ "GET",
1170
+ f"/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{asset_full_name}",
1171
+ headers=headers,
1172
+ )
1034
1173
  return CleanRoomAsset.from_dict(res)
1035
1174
 
1036
1175
  def list(self, clean_room_name: str, *, page_token: Optional[str] = None) -> Iterator[CleanRoomAsset]:
1037
1176
  """List assets.
1038
-
1177
+
1039
1178
  :param clean_room_name: str
1040
1179
  Name of the clean room.
1041
1180
  :param page_token: str (optional)
1042
1181
  Opaque pagination token to go to next page based on previous query.
1043
-
1182
+
1044
1183
  :returns: Iterator over :class:`CleanRoomAsset`
1045
1184
  """
1046
1185
 
1047
1186
  query = {}
1048
- if page_token is not None: query['page_token'] = page_token
1049
- headers = {'Accept': 'application/json', }
1187
+ if page_token is not None:
1188
+ query["page_token"] = page_token
1189
+ headers = {
1190
+ "Accept": "application/json",
1191
+ }
1050
1192
 
1051
1193
  while True:
1052
- json = self._api.do('GET',
1053
- f'/api/2.0/clean-rooms/{clean_room_name}/assets',
1054
- query=query,
1055
- headers=headers)
1056
- if 'assets' in json:
1057
- for v in json['assets']:
1194
+ json = self._api.do("GET", f"/api/2.0/clean-rooms/{clean_room_name}/assets", query=query, headers=headers)
1195
+ if "assets" in json:
1196
+ for v in json["assets"]:
1058
1197
  yield CleanRoomAsset.from_dict(v)
1059
- if 'next_page_token' not in json or not json['next_page_token']:
1198
+ if "next_page_token" not in json or not json["next_page_token"]:
1060
1199
  return
1061
- query['page_token'] = json['next_page_token']
1062
-
1063
- def update(self,
1064
- clean_room_name: str,
1065
- asset_type: CleanRoomAssetAssetType,
1066
- name: str,
1067
- *,
1068
- asset: Optional[CleanRoomAsset] = None) -> CleanRoomAsset:
1200
+ query["page_token"] = json["next_page_token"]
1201
+
1202
+ def update(
1203
+ self,
1204
+ clean_room_name: str,
1205
+ asset_type: CleanRoomAssetAssetType,
1206
+ name: str,
1207
+ *,
1208
+ asset: Optional[CleanRoomAsset] = None,
1209
+ ) -> CleanRoomAsset:
1069
1210
  """Update an asset.
1070
-
1211
+
1071
1212
  Update a clean room asset. For example, updating the content of a notebook; changing the shared
1072
1213
  partitions of a table; etc.
1073
-
1214
+
1074
1215
  :param clean_room_name: str
1075
1216
  Name of the clean room.
1076
1217
  :param asset_type: :class:`CleanRoomAssetAssetType`
@@ -1078,23 +1219,28 @@ class CleanRoomAssetsAPI:
1078
1219
  :param name: str
1079
1220
  A fully qualified name that uniquely identifies the asset within the clean room. This is also the
1080
1221
  name displayed in the clean room UI.
1081
-
1222
+
1082
1223
  For UC securable assets (tables, volumes, etc.), the format is
1083
1224
  *shared_catalog*.*shared_schema*.*asset_name*
1084
-
1225
+
1085
1226
  For notebooks, the name is the notebook file name.
1086
1227
  :param asset: :class:`CleanRoomAsset` (optional)
1087
1228
  Metadata of the clean room asset
1088
-
1229
+
1089
1230
  :returns: :class:`CleanRoomAsset`
1090
1231
  """
1091
1232
  body = asset.as_dict()
1092
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1233
+ headers = {
1234
+ "Accept": "application/json",
1235
+ "Content-Type": "application/json",
1236
+ }
1093
1237
 
1094
- res = self._api.do('PATCH',
1095
- f'/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{name}',
1096
- body=body,
1097
- headers=headers)
1238
+ res = self._api.do(
1239
+ "PATCH",
1240
+ f"/api/2.0/clean-rooms/{clean_room_name}/assets/{asset_type.value}/{name}",
1241
+ body=body,
1242
+ headers=headers,
1243
+ )
1098
1244
  return CleanRoomAsset.from_dict(res)
1099
1245
 
1100
1246
 
@@ -1104,45 +1250,49 @@ class CleanRoomTaskRunsAPI:
1104
1250
  def __init__(self, api_client):
1105
1251
  self._api = api_client
1106
1252
 
1107
- def list(self,
1108
- clean_room_name: str,
1109
- *,
1110
- notebook_name: Optional[str] = None,
1111
- page_size: Optional[int] = None,
1112
- page_token: Optional[str] = None) -> Iterator[CleanRoomNotebookTaskRun]:
1253
+ def list(
1254
+ self,
1255
+ clean_room_name: str,
1256
+ *,
1257
+ notebook_name: Optional[str] = None,
1258
+ page_size: Optional[int] = None,
1259
+ page_token: Optional[str] = None,
1260
+ ) -> Iterator[CleanRoomNotebookTaskRun]:
1113
1261
  """List notebook task runs.
1114
-
1262
+
1115
1263
  List all the historical notebook task runs in a clean room.
1116
-
1264
+
1117
1265
  :param clean_room_name: str
1118
1266
  Name of the clean room.
1119
1267
  :param notebook_name: str (optional)
1120
1268
  Notebook name
1121
1269
  :param page_size: int (optional)
1122
- The maximum number of task runs to return
1270
+ The maximum number of task runs to return. Currently ignored - all runs will be returned.
1123
1271
  :param page_token: str (optional)
1124
1272
  Opaque pagination token to go to next page based on previous query.
1125
-
1273
+
1126
1274
  :returns: Iterator over :class:`CleanRoomNotebookTaskRun`
1127
1275
  """
1128
1276
 
1129
1277
  query = {}
1130
- if notebook_name is not None: query['notebook_name'] = notebook_name
1131
- if page_size is not None: query['page_size'] = page_size
1132
- if page_token is not None: query['page_token'] = page_token
1133
- headers = {'Accept': 'application/json', }
1278
+ if notebook_name is not None:
1279
+ query["notebook_name"] = notebook_name
1280
+ if page_size is not None:
1281
+ query["page_size"] = page_size
1282
+ if page_token is not None:
1283
+ query["page_token"] = page_token
1284
+ headers = {
1285
+ "Accept": "application/json",
1286
+ }
1134
1287
 
1135
1288
  while True:
1136
- json = self._api.do('GET',
1137
- f'/api/2.0/clean-rooms/{clean_room_name}/runs',
1138
- query=query,
1139
- headers=headers)
1140
- if 'runs' in json:
1141
- for v in json['runs']:
1289
+ json = self._api.do("GET", f"/api/2.0/clean-rooms/{clean_room_name}/runs", query=query, headers=headers)
1290
+ if "runs" in json:
1291
+ for v in json["runs"]:
1142
1292
  yield CleanRoomNotebookTaskRun.from_dict(v)
1143
- if 'next_page_token' not in json or not json['next_page_token']:
1293
+ if "next_page_token" not in json or not json["next_page_token"]:
1144
1294
  return
1145
- query['page_token'] = json['next_page_token']
1295
+ query["page_token"] = json["next_page_token"]
1146
1296
 
1147
1297
 
1148
1298
  class CleanRoomsAPI:
@@ -1155,129 +1305,141 @@ class CleanRoomsAPI:
1155
1305
 
1156
1306
  def create(self, *, clean_room: Optional[CleanRoom] = None) -> CleanRoom:
1157
1307
  """Create a clean room.
1158
-
1308
+
1159
1309
  Create a new clean room with the specified collaborators. This method is asynchronous; the returned
1160
1310
  name field inside the clean_room field can be used to poll the clean room status, using the
1161
1311
  :method:cleanrooms/get method. When this method returns, the clean room will be in a PROVISIONING
1162
1312
  state, with only name, owner, comment, created_at and status populated. The clean room will be usable
1163
1313
  once it enters an ACTIVE state.
1164
-
1314
+
1165
1315
  The caller must be a metastore admin or have the **CREATE_CLEAN_ROOM** privilege on the metastore.
1166
-
1316
+
1167
1317
  :param clean_room: :class:`CleanRoom` (optional)
1168
-
1318
+
1169
1319
  :returns: :class:`CleanRoom`
1170
1320
  """
1171
1321
  body = clean_room.as_dict()
1172
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1322
+ headers = {
1323
+ "Accept": "application/json",
1324
+ "Content-Type": "application/json",
1325
+ }
1173
1326
 
1174
- res = self._api.do('POST', '/api/2.0/clean-rooms', body=body, headers=headers)
1327
+ res = self._api.do("POST", "/api/2.0/clean-rooms", body=body, headers=headers)
1175
1328
  return CleanRoom.from_dict(res)
1176
1329
 
1177
1330
  def create_output_catalog(
1178
- self,
1179
- clean_room_name: str,
1180
- *,
1181
- output_catalog: Optional[CleanRoomOutputCatalog] = None) -> CreateCleanRoomOutputCatalogResponse:
1331
+ self, clean_room_name: str, *, output_catalog: Optional[CleanRoomOutputCatalog] = None
1332
+ ) -> CreateCleanRoomOutputCatalogResponse:
1182
1333
  """Create an output catalog.
1183
-
1334
+
1184
1335
  Create the output catalog of the clean room.
1185
-
1336
+
1186
1337
  :param clean_room_name: str
1187
1338
  Name of the clean room.
1188
1339
  :param output_catalog: :class:`CleanRoomOutputCatalog` (optional)
1189
-
1340
+
1190
1341
  :returns: :class:`CreateCleanRoomOutputCatalogResponse`
1191
1342
  """
1192
1343
  body = output_catalog.as_dict()
1193
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1344
+ headers = {
1345
+ "Accept": "application/json",
1346
+ "Content-Type": "application/json",
1347
+ }
1194
1348
 
1195
- res = self._api.do('POST',
1196
- f'/api/2.0/clean-rooms/{clean_room_name}/output-catalogs',
1197
- body=body,
1198
- headers=headers)
1349
+ res = self._api.do(
1350
+ "POST", f"/api/2.0/clean-rooms/{clean_room_name}/output-catalogs", body=body, headers=headers
1351
+ )
1199
1352
  return CreateCleanRoomOutputCatalogResponse.from_dict(res)
1200
1353
 
1201
1354
  def delete(self, name: str):
1202
1355
  """Delete a clean room.
1203
-
1356
+
1204
1357
  Delete a clean room. After deletion, the clean room will be removed from the metastore. If the other
1205
1358
  collaborators have not deleted the clean room, they will still have the clean room in their metastore,
1206
1359
  but it will be in a DELETED state and no operations other than deletion can be performed on it.
1207
-
1360
+
1208
1361
  :param name: str
1209
1362
  Name of the clean room.
1210
-
1211
-
1363
+
1364
+
1212
1365
  """
1213
1366
 
1214
- headers = {'Accept': 'application/json', }
1367
+ headers = {
1368
+ "Accept": "application/json",
1369
+ }
1215
1370
 
1216
- self._api.do('DELETE', f'/api/2.0/clean-rooms/{name}', headers=headers)
1371
+ self._api.do("DELETE", f"/api/2.0/clean-rooms/{name}", headers=headers)
1217
1372
 
1218
1373
  def get(self, name: str) -> CleanRoom:
1219
1374
  """Get a clean room.
1220
-
1375
+
1221
1376
  Get the details of a clean room given its name.
1222
-
1377
+
1223
1378
  :param name: str
1224
-
1379
+
1225
1380
  :returns: :class:`CleanRoom`
1226
1381
  """
1227
1382
 
1228
- headers = {'Accept': 'application/json', }
1383
+ headers = {
1384
+ "Accept": "application/json",
1385
+ }
1229
1386
 
1230
- res = self._api.do('GET', f'/api/2.0/clean-rooms/{name}', headers=headers)
1387
+ res = self._api.do("GET", f"/api/2.0/clean-rooms/{name}", headers=headers)
1231
1388
  return CleanRoom.from_dict(res)
1232
1389
 
1233
- def list(self,
1234
- *,
1235
- page_size: Optional[int] = None,
1236
- page_token: Optional[str] = None) -> Iterator[CleanRoom]:
1390
+ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[CleanRoom]:
1237
1391
  """List clean rooms.
1238
-
1392
+
1239
1393
  Get a list of all clean rooms of the metastore. Only clean rooms the caller has access to are
1240
1394
  returned.
1241
-
1395
+
1242
1396
  :param page_size: int (optional)
1243
1397
  Maximum number of clean rooms to return (i.e., the page length). Defaults to 100.
1244
1398
  :param page_token: str (optional)
1245
1399
  Opaque pagination token to go to next page based on previous query.
1246
-
1400
+
1247
1401
  :returns: Iterator over :class:`CleanRoom`
1248
1402
  """
1249
1403
 
1250
1404
  query = {}
1251
- if page_size is not None: query['page_size'] = page_size
1252
- if page_token is not None: query['page_token'] = page_token
1253
- headers = {'Accept': 'application/json', }
1405
+ if page_size is not None:
1406
+ query["page_size"] = page_size
1407
+ if page_token is not None:
1408
+ query["page_token"] = page_token
1409
+ headers = {
1410
+ "Accept": "application/json",
1411
+ }
1254
1412
 
1255
1413
  while True:
1256
- json = self._api.do('GET', '/api/2.0/clean-rooms', query=query, headers=headers)
1257
- if 'clean_rooms' in json:
1258
- for v in json['clean_rooms']:
1414
+ json = self._api.do("GET", "/api/2.0/clean-rooms", query=query, headers=headers)
1415
+ if "clean_rooms" in json:
1416
+ for v in json["clean_rooms"]:
1259
1417
  yield CleanRoom.from_dict(v)
1260
- if 'next_page_token' not in json or not json['next_page_token']:
1418
+ if "next_page_token" not in json or not json["next_page_token"]:
1261
1419
  return
1262
- query['page_token'] = json['next_page_token']
1420
+ query["page_token"] = json["next_page_token"]
1263
1421
 
1264
1422
  def update(self, name: str, *, clean_room: Optional[CleanRoom] = None) -> CleanRoom:
1265
1423
  """Update a clean room.
1266
-
1424
+
1267
1425
  Update a clean room. The caller must be the owner of the clean room, have **MODIFY_CLEAN_ROOM**
1268
1426
  privilege, or be metastore admin.
1269
-
1427
+
1270
1428
  When the caller is a metastore admin, only the __owner__ field can be updated.
1271
-
1429
+
1272
1430
  :param name: str
1273
1431
  Name of the clean room.
1274
1432
  :param clean_room: :class:`CleanRoom` (optional)
1275
-
1433
+
1276
1434
  :returns: :class:`CleanRoom`
1277
1435
  """
1278
1436
  body = {}
1279
- if clean_room is not None: body['clean_room'] = clean_room.as_dict()
1280
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1281
-
1282
- res = self._api.do('PATCH', f'/api/2.0/clean-rooms/{name}', body=body, headers=headers)
1437
+ if clean_room is not None:
1438
+ body["clean_room"] = clean_room.as_dict()
1439
+ headers = {
1440
+ "Accept": "application/json",
1441
+ "Content-Type": "application/json",
1442
+ }
1443
+
1444
+ res = self._api.do("PATCH", f"/api/2.0/clean-rooms/{name}", body=body, headers=headers)
1283
1445
  return CleanRoom.from_dict(res)