databricks-sdk 0.58.0__py3-none-any.whl → 0.60.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 +18 -10
- databricks/sdk/credentials_provider.py +2 -2
- databricks/sdk/mixins/files.py +43 -15
- databricks/sdk/mixins/open_ai_client.py +28 -7
- databricks/sdk/oidc.py +6 -2
- databricks/sdk/service/{aibuilder.py → agentbricks.py} +5 -132
- databricks/sdk/service/apps.py +52 -46
- databricks/sdk/service/billing.py +9 -200
- databricks/sdk/service/catalog.py +5501 -7697
- databricks/sdk/service/cleanrooms.py +24 -54
- databricks/sdk/service/compute.py +456 -2515
- databricks/sdk/service/dashboards.py +1 -177
- databricks/sdk/service/database.py +34 -53
- databricks/sdk/service/files.py +2 -218
- databricks/sdk/service/iam.py +16 -295
- databricks/sdk/service/jobs.py +108 -1171
- databricks/sdk/service/marketplace.py +0 -573
- databricks/sdk/service/ml.py +76 -2445
- databricks/sdk/service/oauth2.py +122 -237
- databricks/sdk/service/pipelines.py +180 -752
- databricks/sdk/service/provisioning.py +0 -603
- databricks/sdk/service/serving.py +5 -577
- databricks/sdk/service/settings.py +192 -1560
- databricks/sdk/service/sharing.py +5 -470
- databricks/sdk/service/sql.py +117 -1704
- databricks/sdk/service/vectorsearch.py +0 -391
- databricks/sdk/service/workspace.py +250 -721
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/RECORD +34 -34
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/top_level.txt +0 -0
|
@@ -55,191 +55,6 @@ class ColumnTypeName(Enum):
|
|
|
55
55
|
VARIANT = "VARIANT"
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
@dataclass
|
|
59
|
-
class CreateProvider:
|
|
60
|
-
name: str
|
|
61
|
-
"""The name of the Provider."""
|
|
62
|
-
|
|
63
|
-
authentication_type: AuthenticationType
|
|
64
|
-
|
|
65
|
-
comment: Optional[str] = None
|
|
66
|
-
"""Description about the provider."""
|
|
67
|
-
|
|
68
|
-
recipient_profile_str: Optional[str] = None
|
|
69
|
-
"""This field is required when the __authentication_type__ is **TOKEN**,
|
|
70
|
-
**OAUTH_CLIENT_CREDENTIALS** or not provided."""
|
|
71
|
-
|
|
72
|
-
def as_dict(self) -> dict:
|
|
73
|
-
"""Serializes the CreateProvider into a dictionary suitable for use as a JSON request body."""
|
|
74
|
-
body = {}
|
|
75
|
-
if self.authentication_type is not None:
|
|
76
|
-
body["authentication_type"] = self.authentication_type.value
|
|
77
|
-
if self.comment is not None:
|
|
78
|
-
body["comment"] = self.comment
|
|
79
|
-
if self.name is not None:
|
|
80
|
-
body["name"] = self.name
|
|
81
|
-
if self.recipient_profile_str is not None:
|
|
82
|
-
body["recipient_profile_str"] = self.recipient_profile_str
|
|
83
|
-
return body
|
|
84
|
-
|
|
85
|
-
def as_shallow_dict(self) -> dict:
|
|
86
|
-
"""Serializes the CreateProvider into a shallow dictionary of its immediate attributes."""
|
|
87
|
-
body = {}
|
|
88
|
-
if self.authentication_type is not None:
|
|
89
|
-
body["authentication_type"] = self.authentication_type
|
|
90
|
-
if self.comment is not None:
|
|
91
|
-
body["comment"] = self.comment
|
|
92
|
-
if self.name is not None:
|
|
93
|
-
body["name"] = self.name
|
|
94
|
-
if self.recipient_profile_str is not None:
|
|
95
|
-
body["recipient_profile_str"] = self.recipient_profile_str
|
|
96
|
-
return body
|
|
97
|
-
|
|
98
|
-
@classmethod
|
|
99
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateProvider:
|
|
100
|
-
"""Deserializes the CreateProvider from a dictionary."""
|
|
101
|
-
return cls(
|
|
102
|
-
authentication_type=_enum(d, "authentication_type", AuthenticationType),
|
|
103
|
-
comment=d.get("comment", None),
|
|
104
|
-
name=d.get("name", None),
|
|
105
|
-
recipient_profile_str=d.get("recipient_profile_str", None),
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@dataclass
|
|
110
|
-
class CreateRecipient:
|
|
111
|
-
name: str
|
|
112
|
-
"""Name of Recipient."""
|
|
113
|
-
|
|
114
|
-
authentication_type: AuthenticationType
|
|
115
|
-
|
|
116
|
-
comment: Optional[str] = None
|
|
117
|
-
"""Description about the recipient."""
|
|
118
|
-
|
|
119
|
-
data_recipient_global_metastore_id: Optional[str] = None
|
|
120
|
-
"""The global Unity Catalog metastore id provided by the data recipient. This field is only present
|
|
121
|
-
when the __authentication_type__ is **DATABRICKS**. The identifier is of format
|
|
122
|
-
__cloud__:__region__:__metastore-uuid__."""
|
|
123
|
-
|
|
124
|
-
expiration_time: Optional[int] = None
|
|
125
|
-
"""Expiration timestamp of the token, in epoch milliseconds."""
|
|
126
|
-
|
|
127
|
-
ip_access_list: Optional[IpAccessList] = None
|
|
128
|
-
"""IP Access List"""
|
|
129
|
-
|
|
130
|
-
owner: Optional[str] = None
|
|
131
|
-
"""Username of the recipient owner."""
|
|
132
|
-
|
|
133
|
-
properties_kvpairs: Optional[SecurablePropertiesKvPairs] = None
|
|
134
|
-
"""Recipient properties as map of string key-value pairs. When provided in update request, the
|
|
135
|
-
specified properties will override the existing properties. To add and remove properties, one
|
|
136
|
-
would need to perform a read-modify-write."""
|
|
137
|
-
|
|
138
|
-
sharing_code: Optional[str] = None
|
|
139
|
-
"""The one-time sharing code provided by the data recipient. This field is only present when the
|
|
140
|
-
__authentication_type__ is **DATABRICKS**."""
|
|
141
|
-
|
|
142
|
-
def as_dict(self) -> dict:
|
|
143
|
-
"""Serializes the CreateRecipient into a dictionary suitable for use as a JSON request body."""
|
|
144
|
-
body = {}
|
|
145
|
-
if self.authentication_type is not None:
|
|
146
|
-
body["authentication_type"] = self.authentication_type.value
|
|
147
|
-
if self.comment is not None:
|
|
148
|
-
body["comment"] = self.comment
|
|
149
|
-
if self.data_recipient_global_metastore_id is not None:
|
|
150
|
-
body["data_recipient_global_metastore_id"] = self.data_recipient_global_metastore_id
|
|
151
|
-
if self.expiration_time is not None:
|
|
152
|
-
body["expiration_time"] = self.expiration_time
|
|
153
|
-
if self.ip_access_list:
|
|
154
|
-
body["ip_access_list"] = self.ip_access_list.as_dict()
|
|
155
|
-
if self.name is not None:
|
|
156
|
-
body["name"] = self.name
|
|
157
|
-
if self.owner is not None:
|
|
158
|
-
body["owner"] = self.owner
|
|
159
|
-
if self.properties_kvpairs:
|
|
160
|
-
body["properties_kvpairs"] = self.properties_kvpairs.as_dict()
|
|
161
|
-
if self.sharing_code is not None:
|
|
162
|
-
body["sharing_code"] = self.sharing_code
|
|
163
|
-
return body
|
|
164
|
-
|
|
165
|
-
def as_shallow_dict(self) -> dict:
|
|
166
|
-
"""Serializes the CreateRecipient into a shallow dictionary of its immediate attributes."""
|
|
167
|
-
body = {}
|
|
168
|
-
if self.authentication_type is not None:
|
|
169
|
-
body["authentication_type"] = self.authentication_type
|
|
170
|
-
if self.comment is not None:
|
|
171
|
-
body["comment"] = self.comment
|
|
172
|
-
if self.data_recipient_global_metastore_id is not None:
|
|
173
|
-
body["data_recipient_global_metastore_id"] = self.data_recipient_global_metastore_id
|
|
174
|
-
if self.expiration_time is not None:
|
|
175
|
-
body["expiration_time"] = self.expiration_time
|
|
176
|
-
if self.ip_access_list:
|
|
177
|
-
body["ip_access_list"] = self.ip_access_list
|
|
178
|
-
if self.name is not None:
|
|
179
|
-
body["name"] = self.name
|
|
180
|
-
if self.owner is not None:
|
|
181
|
-
body["owner"] = self.owner
|
|
182
|
-
if self.properties_kvpairs:
|
|
183
|
-
body["properties_kvpairs"] = self.properties_kvpairs
|
|
184
|
-
if self.sharing_code is not None:
|
|
185
|
-
body["sharing_code"] = self.sharing_code
|
|
186
|
-
return body
|
|
187
|
-
|
|
188
|
-
@classmethod
|
|
189
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateRecipient:
|
|
190
|
-
"""Deserializes the CreateRecipient from a dictionary."""
|
|
191
|
-
return cls(
|
|
192
|
-
authentication_type=_enum(d, "authentication_type", AuthenticationType),
|
|
193
|
-
comment=d.get("comment", None),
|
|
194
|
-
data_recipient_global_metastore_id=d.get("data_recipient_global_metastore_id", None),
|
|
195
|
-
expiration_time=d.get("expiration_time", None),
|
|
196
|
-
ip_access_list=_from_dict(d, "ip_access_list", IpAccessList),
|
|
197
|
-
name=d.get("name", None),
|
|
198
|
-
owner=d.get("owner", None),
|
|
199
|
-
properties_kvpairs=_from_dict(d, "properties_kvpairs", SecurablePropertiesKvPairs),
|
|
200
|
-
sharing_code=d.get("sharing_code", None),
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
@dataclass
|
|
205
|
-
class CreateShare:
|
|
206
|
-
name: str
|
|
207
|
-
"""Name of the share."""
|
|
208
|
-
|
|
209
|
-
comment: Optional[str] = None
|
|
210
|
-
"""User-provided free-form text description."""
|
|
211
|
-
|
|
212
|
-
storage_root: Optional[str] = None
|
|
213
|
-
"""Storage root URL for the share."""
|
|
214
|
-
|
|
215
|
-
def as_dict(self) -> dict:
|
|
216
|
-
"""Serializes the CreateShare into a dictionary suitable for use as a JSON request body."""
|
|
217
|
-
body = {}
|
|
218
|
-
if self.comment is not None:
|
|
219
|
-
body["comment"] = self.comment
|
|
220
|
-
if self.name is not None:
|
|
221
|
-
body["name"] = self.name
|
|
222
|
-
if self.storage_root is not None:
|
|
223
|
-
body["storage_root"] = self.storage_root
|
|
224
|
-
return body
|
|
225
|
-
|
|
226
|
-
def as_shallow_dict(self) -> dict:
|
|
227
|
-
"""Serializes the CreateShare into a shallow dictionary of its immediate attributes."""
|
|
228
|
-
body = {}
|
|
229
|
-
if self.comment is not None:
|
|
230
|
-
body["comment"] = self.comment
|
|
231
|
-
if self.name is not None:
|
|
232
|
-
body["name"] = self.name
|
|
233
|
-
if self.storage_root is not None:
|
|
234
|
-
body["storage_root"] = self.storage_root
|
|
235
|
-
return body
|
|
236
|
-
|
|
237
|
-
@classmethod
|
|
238
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateShare:
|
|
239
|
-
"""Deserializes the CreateShare from a dictionary."""
|
|
240
|
-
return cls(comment=d.get("comment", None), name=d.get("name", None), storage_root=d.get("storage_root", None))
|
|
241
|
-
|
|
242
|
-
|
|
243
58
|
@dataclass
|
|
244
59
|
class DeleteResponse:
|
|
245
60
|
def as_dict(self) -> dict:
|
|
@@ -1316,7 +1131,8 @@ class PermissionsChange:
|
|
|
1316
1131
|
"""The set of privileges to add."""
|
|
1317
1132
|
|
|
1318
1133
|
principal: Optional[str] = None
|
|
1319
|
-
"""The principal whose privileges we are changing.
|
|
1134
|
+
"""The principal whose privileges we are changing. Only one of principal or principal_id should be
|
|
1135
|
+
specified, never both at the same time."""
|
|
1320
1136
|
|
|
1321
1137
|
remove: Optional[List[str]] = None
|
|
1322
1138
|
"""The set of privileges to remove."""
|
|
@@ -1974,42 +1790,6 @@ class RetrieveTokenResponse:
|
|
|
1974
1790
|
)
|
|
1975
1791
|
|
|
1976
1792
|
|
|
1977
|
-
@dataclass
|
|
1978
|
-
class RotateRecipientToken:
|
|
1979
|
-
existing_token_expire_in_seconds: int
|
|
1980
|
-
"""The expiration time of the bearer token in ISO 8601 format. This will set the expiration_time of
|
|
1981
|
-
existing token only to a smaller timestamp, it cannot extend the expiration_time. Use 0 to
|
|
1982
|
-
expire the existing token immediately, negative number will return an error."""
|
|
1983
|
-
|
|
1984
|
-
name: Optional[str] = None
|
|
1985
|
-
"""The name of the Recipient."""
|
|
1986
|
-
|
|
1987
|
-
def as_dict(self) -> dict:
|
|
1988
|
-
"""Serializes the RotateRecipientToken into a dictionary suitable for use as a JSON request body."""
|
|
1989
|
-
body = {}
|
|
1990
|
-
if self.existing_token_expire_in_seconds is not None:
|
|
1991
|
-
body["existing_token_expire_in_seconds"] = self.existing_token_expire_in_seconds
|
|
1992
|
-
if self.name is not None:
|
|
1993
|
-
body["name"] = self.name
|
|
1994
|
-
return body
|
|
1995
|
-
|
|
1996
|
-
def as_shallow_dict(self) -> dict:
|
|
1997
|
-
"""Serializes the RotateRecipientToken into a shallow dictionary of its immediate attributes."""
|
|
1998
|
-
body = {}
|
|
1999
|
-
if self.existing_token_expire_in_seconds is not None:
|
|
2000
|
-
body["existing_token_expire_in_seconds"] = self.existing_token_expire_in_seconds
|
|
2001
|
-
if self.name is not None:
|
|
2002
|
-
body["name"] = self.name
|
|
2003
|
-
return body
|
|
2004
|
-
|
|
2005
|
-
@classmethod
|
|
2006
|
-
def from_dict(cls, d: Dict[str, Any]) -> RotateRecipientToken:
|
|
2007
|
-
"""Deserializes the RotateRecipientToken from a dictionary."""
|
|
2008
|
-
return cls(
|
|
2009
|
-
existing_token_expire_in_seconds=d.get("existing_token_expire_in_seconds", None), name=d.get("name", None)
|
|
2010
|
-
)
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
1793
|
@dataclass
|
|
2014
1794
|
class SecurablePropertiesKvPairs:
|
|
2015
1795
|
"""An object with __properties__ containing map of key-value properties attached to the securable."""
|
|
@@ -2341,7 +2121,8 @@ class SharedDataObjectUpdate:
|
|
|
2341
2121
|
"""One of: **ADD**, **REMOVE**, **UPDATE**."""
|
|
2342
2122
|
|
|
2343
2123
|
data_object: Optional[SharedDataObject] = None
|
|
2344
|
-
"""The data object that is being added, removed, or updated.
|
|
2124
|
+
"""The data object that is being added, removed, or updated. The maximum number update data objects
|
|
2125
|
+
allowed is a 100."""
|
|
2345
2126
|
|
|
2346
2127
|
def as_dict(self) -> dict:
|
|
2347
2128
|
"""Serializes the SharedDataObjectUpdate into a dictionary suitable for use as a JSON request body."""
|
|
@@ -2544,6 +2325,7 @@ class TableInternalAttributes:
|
|
|
2544
2325
|
|
|
2545
2326
|
class TableInternalAttributesSharedTableType(Enum):
|
|
2546
2327
|
|
|
2328
|
+
DELTA_ICEBERG_TABLE = "DELTA_ICEBERG_TABLE"
|
|
2547
2329
|
DIRECTORY_BASED_TABLE = "DIRECTORY_BASED_TABLE"
|
|
2548
2330
|
FILE_BASED_TABLE = "FILE_BASED_TABLE"
|
|
2549
2331
|
FOREIGN_TABLE = "FOREIGN_TABLE"
|
|
@@ -2552,253 +2334,6 @@ class TableInternalAttributesSharedTableType(Enum):
|
|
|
2552
2334
|
VIEW = "VIEW"
|
|
2553
2335
|
|
|
2554
2336
|
|
|
2555
|
-
@dataclass
|
|
2556
|
-
class UpdateProvider:
|
|
2557
|
-
comment: Optional[str] = None
|
|
2558
|
-
"""Description about the provider."""
|
|
2559
|
-
|
|
2560
|
-
name: Optional[str] = None
|
|
2561
|
-
"""Name of the provider."""
|
|
2562
|
-
|
|
2563
|
-
new_name: Optional[str] = None
|
|
2564
|
-
"""New name for the provider."""
|
|
2565
|
-
|
|
2566
|
-
owner: Optional[str] = None
|
|
2567
|
-
"""Username of Provider owner."""
|
|
2568
|
-
|
|
2569
|
-
recipient_profile_str: Optional[str] = None
|
|
2570
|
-
"""This field is required when the __authentication_type__ is **TOKEN**,
|
|
2571
|
-
**OAUTH_CLIENT_CREDENTIALS** or not provided."""
|
|
2572
|
-
|
|
2573
|
-
def as_dict(self) -> dict:
|
|
2574
|
-
"""Serializes the UpdateProvider into a dictionary suitable for use as a JSON request body."""
|
|
2575
|
-
body = {}
|
|
2576
|
-
if self.comment is not None:
|
|
2577
|
-
body["comment"] = self.comment
|
|
2578
|
-
if self.name is not None:
|
|
2579
|
-
body["name"] = self.name
|
|
2580
|
-
if self.new_name is not None:
|
|
2581
|
-
body["new_name"] = self.new_name
|
|
2582
|
-
if self.owner is not None:
|
|
2583
|
-
body["owner"] = self.owner
|
|
2584
|
-
if self.recipient_profile_str is not None:
|
|
2585
|
-
body["recipient_profile_str"] = self.recipient_profile_str
|
|
2586
|
-
return body
|
|
2587
|
-
|
|
2588
|
-
def as_shallow_dict(self) -> dict:
|
|
2589
|
-
"""Serializes the UpdateProvider into a shallow dictionary of its immediate attributes."""
|
|
2590
|
-
body = {}
|
|
2591
|
-
if self.comment is not None:
|
|
2592
|
-
body["comment"] = self.comment
|
|
2593
|
-
if self.name is not None:
|
|
2594
|
-
body["name"] = self.name
|
|
2595
|
-
if self.new_name is not None:
|
|
2596
|
-
body["new_name"] = self.new_name
|
|
2597
|
-
if self.owner is not None:
|
|
2598
|
-
body["owner"] = self.owner
|
|
2599
|
-
if self.recipient_profile_str is not None:
|
|
2600
|
-
body["recipient_profile_str"] = self.recipient_profile_str
|
|
2601
|
-
return body
|
|
2602
|
-
|
|
2603
|
-
@classmethod
|
|
2604
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateProvider:
|
|
2605
|
-
"""Deserializes the UpdateProvider from a dictionary."""
|
|
2606
|
-
return cls(
|
|
2607
|
-
comment=d.get("comment", None),
|
|
2608
|
-
name=d.get("name", None),
|
|
2609
|
-
new_name=d.get("new_name", None),
|
|
2610
|
-
owner=d.get("owner", None),
|
|
2611
|
-
recipient_profile_str=d.get("recipient_profile_str", None),
|
|
2612
|
-
)
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
@dataclass
|
|
2616
|
-
class UpdateRecipient:
|
|
2617
|
-
comment: Optional[str] = None
|
|
2618
|
-
"""Description about the recipient."""
|
|
2619
|
-
|
|
2620
|
-
expiration_time: Optional[int] = None
|
|
2621
|
-
"""Expiration timestamp of the token, in epoch milliseconds."""
|
|
2622
|
-
|
|
2623
|
-
ip_access_list: Optional[IpAccessList] = None
|
|
2624
|
-
"""IP Access List"""
|
|
2625
|
-
|
|
2626
|
-
name: Optional[str] = None
|
|
2627
|
-
"""Name of the recipient."""
|
|
2628
|
-
|
|
2629
|
-
new_name: Optional[str] = None
|
|
2630
|
-
"""New name for the recipient. ."""
|
|
2631
|
-
|
|
2632
|
-
owner: Optional[str] = None
|
|
2633
|
-
"""Username of the recipient owner."""
|
|
2634
|
-
|
|
2635
|
-
properties_kvpairs: Optional[SecurablePropertiesKvPairs] = None
|
|
2636
|
-
"""Recipient properties as map of string key-value pairs. When provided in update request, the
|
|
2637
|
-
specified properties will override the existing properties. To add and remove properties, one
|
|
2638
|
-
would need to perform a read-modify-write."""
|
|
2639
|
-
|
|
2640
|
-
def as_dict(self) -> dict:
|
|
2641
|
-
"""Serializes the UpdateRecipient into a dictionary suitable for use as a JSON request body."""
|
|
2642
|
-
body = {}
|
|
2643
|
-
if self.comment is not None:
|
|
2644
|
-
body["comment"] = self.comment
|
|
2645
|
-
if self.expiration_time is not None:
|
|
2646
|
-
body["expiration_time"] = self.expiration_time
|
|
2647
|
-
if self.ip_access_list:
|
|
2648
|
-
body["ip_access_list"] = self.ip_access_list.as_dict()
|
|
2649
|
-
if self.name is not None:
|
|
2650
|
-
body["name"] = self.name
|
|
2651
|
-
if self.new_name is not None:
|
|
2652
|
-
body["new_name"] = self.new_name
|
|
2653
|
-
if self.owner is not None:
|
|
2654
|
-
body["owner"] = self.owner
|
|
2655
|
-
if self.properties_kvpairs:
|
|
2656
|
-
body["properties_kvpairs"] = self.properties_kvpairs.as_dict()
|
|
2657
|
-
return body
|
|
2658
|
-
|
|
2659
|
-
def as_shallow_dict(self) -> dict:
|
|
2660
|
-
"""Serializes the UpdateRecipient into a shallow dictionary of its immediate attributes."""
|
|
2661
|
-
body = {}
|
|
2662
|
-
if self.comment is not None:
|
|
2663
|
-
body["comment"] = self.comment
|
|
2664
|
-
if self.expiration_time is not None:
|
|
2665
|
-
body["expiration_time"] = self.expiration_time
|
|
2666
|
-
if self.ip_access_list:
|
|
2667
|
-
body["ip_access_list"] = self.ip_access_list
|
|
2668
|
-
if self.name is not None:
|
|
2669
|
-
body["name"] = self.name
|
|
2670
|
-
if self.new_name is not None:
|
|
2671
|
-
body["new_name"] = self.new_name
|
|
2672
|
-
if self.owner is not None:
|
|
2673
|
-
body["owner"] = self.owner
|
|
2674
|
-
if self.properties_kvpairs:
|
|
2675
|
-
body["properties_kvpairs"] = self.properties_kvpairs
|
|
2676
|
-
return body
|
|
2677
|
-
|
|
2678
|
-
@classmethod
|
|
2679
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateRecipient:
|
|
2680
|
-
"""Deserializes the UpdateRecipient from a dictionary."""
|
|
2681
|
-
return cls(
|
|
2682
|
-
comment=d.get("comment", None),
|
|
2683
|
-
expiration_time=d.get("expiration_time", None),
|
|
2684
|
-
ip_access_list=_from_dict(d, "ip_access_list", IpAccessList),
|
|
2685
|
-
name=d.get("name", None),
|
|
2686
|
-
new_name=d.get("new_name", None),
|
|
2687
|
-
owner=d.get("owner", None),
|
|
2688
|
-
properties_kvpairs=_from_dict(d, "properties_kvpairs", SecurablePropertiesKvPairs),
|
|
2689
|
-
)
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
@dataclass
|
|
2693
|
-
class UpdateShare:
|
|
2694
|
-
comment: Optional[str] = None
|
|
2695
|
-
"""User-provided free-form text description."""
|
|
2696
|
-
|
|
2697
|
-
name: Optional[str] = None
|
|
2698
|
-
"""The name of the share."""
|
|
2699
|
-
|
|
2700
|
-
new_name: Optional[str] = None
|
|
2701
|
-
"""New name for the share."""
|
|
2702
|
-
|
|
2703
|
-
owner: Optional[str] = None
|
|
2704
|
-
"""Username of current owner of share."""
|
|
2705
|
-
|
|
2706
|
-
storage_root: Optional[str] = None
|
|
2707
|
-
"""Storage root URL for the share."""
|
|
2708
|
-
|
|
2709
|
-
updates: Optional[List[SharedDataObjectUpdate]] = None
|
|
2710
|
-
"""Array of shared data object updates."""
|
|
2711
|
-
|
|
2712
|
-
def as_dict(self) -> dict:
|
|
2713
|
-
"""Serializes the UpdateShare into a dictionary suitable for use as a JSON request body."""
|
|
2714
|
-
body = {}
|
|
2715
|
-
if self.comment is not None:
|
|
2716
|
-
body["comment"] = self.comment
|
|
2717
|
-
if self.name is not None:
|
|
2718
|
-
body["name"] = self.name
|
|
2719
|
-
if self.new_name is not None:
|
|
2720
|
-
body["new_name"] = self.new_name
|
|
2721
|
-
if self.owner is not None:
|
|
2722
|
-
body["owner"] = self.owner
|
|
2723
|
-
if self.storage_root is not None:
|
|
2724
|
-
body["storage_root"] = self.storage_root
|
|
2725
|
-
if self.updates:
|
|
2726
|
-
body["updates"] = [v.as_dict() for v in self.updates]
|
|
2727
|
-
return body
|
|
2728
|
-
|
|
2729
|
-
def as_shallow_dict(self) -> dict:
|
|
2730
|
-
"""Serializes the UpdateShare into a shallow dictionary of its immediate attributes."""
|
|
2731
|
-
body = {}
|
|
2732
|
-
if self.comment is not None:
|
|
2733
|
-
body["comment"] = self.comment
|
|
2734
|
-
if self.name is not None:
|
|
2735
|
-
body["name"] = self.name
|
|
2736
|
-
if self.new_name is not None:
|
|
2737
|
-
body["new_name"] = self.new_name
|
|
2738
|
-
if self.owner is not None:
|
|
2739
|
-
body["owner"] = self.owner
|
|
2740
|
-
if self.storage_root is not None:
|
|
2741
|
-
body["storage_root"] = self.storage_root
|
|
2742
|
-
if self.updates:
|
|
2743
|
-
body["updates"] = self.updates
|
|
2744
|
-
return body
|
|
2745
|
-
|
|
2746
|
-
@classmethod
|
|
2747
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateShare:
|
|
2748
|
-
"""Deserializes the UpdateShare from a dictionary."""
|
|
2749
|
-
return cls(
|
|
2750
|
-
comment=d.get("comment", None),
|
|
2751
|
-
name=d.get("name", None),
|
|
2752
|
-
new_name=d.get("new_name", None),
|
|
2753
|
-
owner=d.get("owner", None),
|
|
2754
|
-
storage_root=d.get("storage_root", None),
|
|
2755
|
-
updates=_repeated_dict(d, "updates", SharedDataObjectUpdate),
|
|
2756
|
-
)
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
@dataclass
|
|
2760
|
-
class UpdateSharePermissions:
|
|
2761
|
-
changes: Optional[List[PermissionsChange]] = None
|
|
2762
|
-
"""Array of permissions change objects."""
|
|
2763
|
-
|
|
2764
|
-
name: Optional[str] = None
|
|
2765
|
-
"""The name of the share."""
|
|
2766
|
-
|
|
2767
|
-
omit_permissions_list: Optional[bool] = None
|
|
2768
|
-
"""Optional. Whether to return the latest permissions list of the share in the response."""
|
|
2769
|
-
|
|
2770
|
-
def as_dict(self) -> dict:
|
|
2771
|
-
"""Serializes the UpdateSharePermissions into a dictionary suitable for use as a JSON request body."""
|
|
2772
|
-
body = {}
|
|
2773
|
-
if self.changes:
|
|
2774
|
-
body["changes"] = [v.as_dict() for v in self.changes]
|
|
2775
|
-
if self.name is not None:
|
|
2776
|
-
body["name"] = self.name
|
|
2777
|
-
if self.omit_permissions_list is not None:
|
|
2778
|
-
body["omit_permissions_list"] = self.omit_permissions_list
|
|
2779
|
-
return body
|
|
2780
|
-
|
|
2781
|
-
def as_shallow_dict(self) -> dict:
|
|
2782
|
-
"""Serializes the UpdateSharePermissions into a shallow dictionary of its immediate attributes."""
|
|
2783
|
-
body = {}
|
|
2784
|
-
if self.changes:
|
|
2785
|
-
body["changes"] = self.changes
|
|
2786
|
-
if self.name is not None:
|
|
2787
|
-
body["name"] = self.name
|
|
2788
|
-
if self.omit_permissions_list is not None:
|
|
2789
|
-
body["omit_permissions_list"] = self.omit_permissions_list
|
|
2790
|
-
return body
|
|
2791
|
-
|
|
2792
|
-
@classmethod
|
|
2793
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateSharePermissions:
|
|
2794
|
-
"""Deserializes the UpdateSharePermissions from a dictionary."""
|
|
2795
|
-
return cls(
|
|
2796
|
-
changes=_repeated_dict(d, "changes", PermissionsChange),
|
|
2797
|
-
name=d.get("name", None),
|
|
2798
|
-
omit_permissions_list=d.get("omit_permissions_list", None),
|
|
2799
|
-
)
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
2337
|
@dataclass
|
|
2803
2338
|
class UpdateSharePermissionsResponse:
|
|
2804
2339
|
privilege_assignments: Optional[List[PrivilegeAssignment]] = None
|