unitycatalog-client 0.2.1__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.
Files changed (82) hide show
  1. unitycatalog/client/__init__.py +102 -0
  2. unitycatalog/client/api/__init__.py +13 -0
  3. unitycatalog/client/api/catalogs_api.py +1404 -0
  4. unitycatalog/client/api/functions_api.py +1135 -0
  5. unitycatalog/client/api/grants_api.py +630 -0
  6. unitycatalog/client/api/model_versions_api.py +1748 -0
  7. unitycatalog/client/api/registered_models_api.py +1438 -0
  8. unitycatalog/client/api/schemas_api.py +1421 -0
  9. unitycatalog/client/api/tables_api.py +1135 -0
  10. unitycatalog/client/api/temporary_credentials_api.py +1109 -0
  11. unitycatalog/client/api/volumes_api.py +1421 -0
  12. unitycatalog/client/api_client.py +773 -0
  13. unitycatalog/client/api_response.py +21 -0
  14. unitycatalog/client/configuration.py +432 -0
  15. unitycatalog/client/exceptions.py +199 -0
  16. unitycatalog/client/models/__init__.py +77 -0
  17. unitycatalog/client/models/aws_credentials.py +91 -0
  18. unitycatalog/client/models/azure_user_delegation_sas.py +87 -0
  19. unitycatalog/client/models/catalog_info.py +103 -0
  20. unitycatalog/client/models/column_info.py +108 -0
  21. unitycatalog/client/models/column_type_name.py +56 -0
  22. unitycatalog/client/models/create_catalog.py +91 -0
  23. unitycatalog/client/models/create_function.py +163 -0
  24. unitycatalog/client/models/create_function_request.py +91 -0
  25. unitycatalog/client/models/create_model_version.py +97 -0
  26. unitycatalog/client/models/create_registered_model.py +93 -0
  27. unitycatalog/client/models/create_schema.py +93 -0
  28. unitycatalog/client/models/create_table.py +113 -0
  29. unitycatalog/client/models/create_volume_request_content.py +99 -0
  30. unitycatalog/client/models/data_source_format.py +42 -0
  31. unitycatalog/client/models/dependency.py +97 -0
  32. unitycatalog/client/models/dependency_list.py +95 -0
  33. unitycatalog/client/models/finalize_model_version.py +89 -0
  34. unitycatalog/client/models/function_dependency.py +87 -0
  35. unitycatalog/client/models/function_info.py +189 -0
  36. unitycatalog/client/models/function_parameter_info.py +112 -0
  37. unitycatalog/client/models/function_parameter_infos.py +95 -0
  38. unitycatalog/client/models/function_parameter_mode.py +36 -0
  39. unitycatalog/client/models/function_parameter_type.py +37 -0
  40. unitycatalog/client/models/gcp_oauth_token.py +87 -0
  41. unitycatalog/client/models/generate_temporary_model_version_credential.py +96 -0
  42. unitycatalog/client/models/generate_temporary_path_credential.py +90 -0
  43. unitycatalog/client/models/generate_temporary_table_credential.py +90 -0
  44. unitycatalog/client/models/generate_temporary_volume_credential.py +90 -0
  45. unitycatalog/client/models/list_catalogs_response.py +97 -0
  46. unitycatalog/client/models/list_functions_response.py +97 -0
  47. unitycatalog/client/models/list_model_versions_response.py +97 -0
  48. unitycatalog/client/models/list_registered_models_response.py +97 -0
  49. unitycatalog/client/models/list_schemas_response.py +97 -0
  50. unitycatalog/client/models/list_tables_response.py +97 -0
  51. unitycatalog/client/models/list_volumes_response_content.py +97 -0
  52. unitycatalog/client/models/model_version_info.py +114 -0
  53. unitycatalog/client/models/model_version_operation.py +38 -0
  54. unitycatalog/client/models/model_version_status.py +39 -0
  55. unitycatalog/client/models/path_operation.py +39 -0
  56. unitycatalog/client/models/permissions_change.py +92 -0
  57. unitycatalog/client/models/permissions_list.py +95 -0
  58. unitycatalog/client/models/principal_type.py +37 -0
  59. unitycatalog/client/models/privilege.py +47 -0
  60. unitycatalog/client/models/privilege_assignment.py +90 -0
  61. unitycatalog/client/models/registered_model_info.py +109 -0
  62. unitycatalog/client/models/schema_info.py +107 -0
  63. unitycatalog/client/models/securable_type.py +42 -0
  64. unitycatalog/client/models/table_dependency.py +87 -0
  65. unitycatalog/client/models/table_info.py +125 -0
  66. unitycatalog/client/models/table_operation.py +38 -0
  67. unitycatalog/client/models/table_type.py +37 -0
  68. unitycatalog/client/models/temporary_credentials.py +105 -0
  69. unitycatalog/client/models/update_catalog.py +91 -0
  70. unitycatalog/client/models/update_model_version.py +87 -0
  71. unitycatalog/client/models/update_permissions.py +95 -0
  72. unitycatalog/client/models/update_registered_model.py +89 -0
  73. unitycatalog/client/models/update_schema.py +91 -0
  74. unitycatalog/client/models/update_volume_request_content.py +90 -0
  75. unitycatalog/client/models/volume_info.py +113 -0
  76. unitycatalog/client/models/volume_operation.py +38 -0
  77. unitycatalog/client/models/volume_type.py +37 -0
  78. unitycatalog/client/py.typed +0 -0
  79. unitycatalog/client/rest.py +215 -0
  80. unitycatalog_client-0.2.1.dist-info/METADATA +199 -0
  81. unitycatalog_client-0.2.1.dist-info/RECORD +82 -0
  82. unitycatalog_client-0.2.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,630 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Unity Catalog API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from unitycatalog.client.models.permissions_list import PermissionsList
23
+ from unitycatalog.client.models.securable_type import SecurableType
24
+ from unitycatalog.client.models.update_permissions import UpdatePermissions
25
+
26
+ from unitycatalog.client.api_client import ApiClient, RequestSerialized
27
+ from unitycatalog.client.api_response import ApiResponse
28
+ from unitycatalog.client.rest import RESTResponseType
29
+
30
+
31
+ class GrantsApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def get(
46
+ self,
47
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
48
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
49
+ principal: Annotated[Optional[StrictStr], Field(description="If provided, only the permissions for the specified principal (user or group) are returned. ")] = None,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> PermissionsList:
63
+ """Get permissions
64
+
65
+ Gets the permissions for a securable.
66
+
67
+ :param securable_type: Type of securable. (required)
68
+ :type securable_type: SecurableType
69
+ :param full_name: Full name of securable. (required)
70
+ :type full_name: str
71
+ :param principal: If provided, only the permissions for the specified principal (user or group) are returned.
72
+ :type principal: str
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._get_serialize(
96
+ securable_type=securable_type,
97
+ full_name=full_name,
98
+ principal=principal,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '200': "PermissionsList",
107
+ }
108
+ response_data = await self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ await response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ async def get_with_http_info(
121
+ self,
122
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
123
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
124
+ principal: Annotated[Optional[StrictStr], Field(description="If provided, only the permissions for the specified principal (user or group) are returned. ")] = None,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[PermissionsList]:
138
+ """Get permissions
139
+
140
+ Gets the permissions for a securable.
141
+
142
+ :param securable_type: Type of securable. (required)
143
+ :type securable_type: SecurableType
144
+ :param full_name: Full name of securable. (required)
145
+ :type full_name: str
146
+ :param principal: If provided, only the permissions for the specified principal (user or group) are returned.
147
+ :type principal: str
148
+ :param _request_timeout: timeout setting for this request. If one
149
+ number provided, it will be total request
150
+ timeout. It can also be a pair (tuple) of
151
+ (connection, read) timeouts.
152
+ :type _request_timeout: int, tuple(int, int), optional
153
+ :param _request_auth: set to override the auth_settings for an a single
154
+ request; this effectively ignores the
155
+ authentication in the spec for a single request.
156
+ :type _request_auth: dict, optional
157
+ :param _content_type: force content-type for the request.
158
+ :type _content_type: str, Optional
159
+ :param _headers: set to override the headers for a single
160
+ request; this effectively ignores the headers
161
+ in the spec for a single request.
162
+ :type _headers: dict, optional
163
+ :param _host_index: set to override the host_index for a single
164
+ request; this effectively ignores the host_index
165
+ in the spec for a single request.
166
+ :type _host_index: int, optional
167
+ :return: Returns the result object.
168
+ """ # noqa: E501
169
+
170
+ _param = self._get_serialize(
171
+ securable_type=securable_type,
172
+ full_name=full_name,
173
+ principal=principal,
174
+ _request_auth=_request_auth,
175
+ _content_type=_content_type,
176
+ _headers=_headers,
177
+ _host_index=_host_index
178
+ )
179
+
180
+ _response_types_map: Dict[str, Optional[str]] = {
181
+ '200': "PermissionsList",
182
+ }
183
+ response_data = await self.api_client.call_api(
184
+ *_param,
185
+ _request_timeout=_request_timeout
186
+ )
187
+ await response_data.read()
188
+ return self.api_client.response_deserialize(
189
+ response_data=response_data,
190
+ response_types_map=_response_types_map,
191
+ )
192
+
193
+
194
+ @validate_call
195
+ async def get_without_preload_content(
196
+ self,
197
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
198
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
199
+ principal: Annotated[Optional[StrictStr], Field(description="If provided, only the permissions for the specified principal (user or group) are returned. ")] = None,
200
+ _request_timeout: Union[
201
+ None,
202
+ Annotated[StrictFloat, Field(gt=0)],
203
+ Tuple[
204
+ Annotated[StrictFloat, Field(gt=0)],
205
+ Annotated[StrictFloat, Field(gt=0)]
206
+ ]
207
+ ] = None,
208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
209
+ _content_type: Optional[StrictStr] = None,
210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
212
+ ) -> RESTResponseType:
213
+ """Get permissions
214
+
215
+ Gets the permissions for a securable.
216
+
217
+ :param securable_type: Type of securable. (required)
218
+ :type securable_type: SecurableType
219
+ :param full_name: Full name of securable. (required)
220
+ :type full_name: str
221
+ :param principal: If provided, only the permissions for the specified principal (user or group) are returned.
222
+ :type principal: str
223
+ :param _request_timeout: timeout setting for this request. If one
224
+ number provided, it will be total request
225
+ timeout. It can also be a pair (tuple) of
226
+ (connection, read) timeouts.
227
+ :type _request_timeout: int, tuple(int, int), optional
228
+ :param _request_auth: set to override the auth_settings for an a single
229
+ request; this effectively ignores the
230
+ authentication in the spec for a single request.
231
+ :type _request_auth: dict, optional
232
+ :param _content_type: force content-type for the request.
233
+ :type _content_type: str, Optional
234
+ :param _headers: set to override the headers for a single
235
+ request; this effectively ignores the headers
236
+ in the spec for a single request.
237
+ :type _headers: dict, optional
238
+ :param _host_index: set to override the host_index for a single
239
+ request; this effectively ignores the host_index
240
+ in the spec for a single request.
241
+ :type _host_index: int, optional
242
+ :return: Returns the result object.
243
+ """ # noqa: E501
244
+
245
+ _param = self._get_serialize(
246
+ securable_type=securable_type,
247
+ full_name=full_name,
248
+ principal=principal,
249
+ _request_auth=_request_auth,
250
+ _content_type=_content_type,
251
+ _headers=_headers,
252
+ _host_index=_host_index
253
+ )
254
+
255
+ _response_types_map: Dict[str, Optional[str]] = {
256
+ '200': "PermissionsList",
257
+ }
258
+ response_data = await self.api_client.call_api(
259
+ *_param,
260
+ _request_timeout=_request_timeout
261
+ )
262
+ return response_data.response
263
+
264
+
265
+ def _get_serialize(
266
+ self,
267
+ securable_type,
268
+ full_name,
269
+ principal,
270
+ _request_auth,
271
+ _content_type,
272
+ _headers,
273
+ _host_index,
274
+ ) -> RequestSerialized:
275
+
276
+ _host = None
277
+
278
+ _collection_formats: Dict[str, str] = {
279
+ }
280
+
281
+ _path_params: Dict[str, str] = {}
282
+ _query_params: List[Tuple[str, str]] = []
283
+ _header_params: Dict[str, Optional[str]] = _headers or {}
284
+ _form_params: List[Tuple[str, str]] = []
285
+ _files: Dict[str, Union[str, bytes]] = {}
286
+ _body_params: Optional[bytes] = None
287
+
288
+ # process the path parameters
289
+ if securable_type is not None:
290
+ _path_params['securable_type'] = securable_type.value
291
+ if full_name is not None:
292
+ _path_params['full_name'] = full_name
293
+ # process the query parameters
294
+ if principal is not None:
295
+
296
+ _query_params.append(('principal', principal))
297
+
298
+ # process the header parameters
299
+ # process the form parameters
300
+ # process the body parameter
301
+
302
+
303
+ # set the HTTP header `Accept`
304
+ _header_params['Accept'] = self.api_client.select_header_accept(
305
+ [
306
+ 'application/json'
307
+ ]
308
+ )
309
+
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = [
313
+ ]
314
+
315
+ return self.api_client.param_serialize(
316
+ method='GET',
317
+ resource_path='/permissions/{securable_type}/{full_name}',
318
+ path_params=_path_params,
319
+ query_params=_query_params,
320
+ header_params=_header_params,
321
+ body=_body_params,
322
+ post_params=_form_params,
323
+ files=_files,
324
+ auth_settings=_auth_settings,
325
+ collection_formats=_collection_formats,
326
+ _host=_host,
327
+ _request_auth=_request_auth
328
+ )
329
+
330
+
331
+
332
+
333
+ @validate_call
334
+ async def update(
335
+ self,
336
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
337
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
338
+ update_permissions: Optional[UpdatePermissions] = None,
339
+ _request_timeout: Union[
340
+ None,
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Tuple[
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Annotated[StrictFloat, Field(gt=0)]
345
+ ]
346
+ ] = None,
347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
348
+ _content_type: Optional[StrictStr] = None,
349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
351
+ ) -> PermissionsList:
352
+ """Update a permission
353
+
354
+ Updates the permissions for a securable.
355
+
356
+ :param securable_type: Type of securable. (required)
357
+ :type securable_type: SecurableType
358
+ :param full_name: Full name of securable. (required)
359
+ :type full_name: str
360
+ :param update_permissions:
361
+ :type update_permissions: UpdatePermissions
362
+ :param _request_timeout: timeout setting for this request. If one
363
+ number provided, it will be total request
364
+ timeout. It can also be a pair (tuple) of
365
+ (connection, read) timeouts.
366
+ :type _request_timeout: int, tuple(int, int), optional
367
+ :param _request_auth: set to override the auth_settings for an a single
368
+ request; this effectively ignores the
369
+ authentication in the spec for a single request.
370
+ :type _request_auth: dict, optional
371
+ :param _content_type: force content-type for the request.
372
+ :type _content_type: str, Optional
373
+ :param _headers: set to override the headers for a single
374
+ request; this effectively ignores the headers
375
+ in the spec for a single request.
376
+ :type _headers: dict, optional
377
+ :param _host_index: set to override the host_index for a single
378
+ request; this effectively ignores the host_index
379
+ in the spec for a single request.
380
+ :type _host_index: int, optional
381
+ :return: Returns the result object.
382
+ """ # noqa: E501
383
+
384
+ _param = self._update_serialize(
385
+ securable_type=securable_type,
386
+ full_name=full_name,
387
+ update_permissions=update_permissions,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ '200': "PermissionsList",
396
+ }
397
+ response_data = await self.api_client.call_api(
398
+ *_param,
399
+ _request_timeout=_request_timeout
400
+ )
401
+ await response_data.read()
402
+ return self.api_client.response_deserialize(
403
+ response_data=response_data,
404
+ response_types_map=_response_types_map,
405
+ ).data
406
+
407
+
408
+ @validate_call
409
+ async def update_with_http_info(
410
+ self,
411
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
412
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
413
+ update_permissions: Optional[UpdatePermissions] = None,
414
+ _request_timeout: Union[
415
+ None,
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Tuple[
418
+ Annotated[StrictFloat, Field(gt=0)],
419
+ Annotated[StrictFloat, Field(gt=0)]
420
+ ]
421
+ ] = None,
422
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
423
+ _content_type: Optional[StrictStr] = None,
424
+ _headers: Optional[Dict[StrictStr, Any]] = None,
425
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
426
+ ) -> ApiResponse[PermissionsList]:
427
+ """Update a permission
428
+
429
+ Updates the permissions for a securable.
430
+
431
+ :param securable_type: Type of securable. (required)
432
+ :type securable_type: SecurableType
433
+ :param full_name: Full name of securable. (required)
434
+ :type full_name: str
435
+ :param update_permissions:
436
+ :type update_permissions: UpdatePermissions
437
+ :param _request_timeout: timeout setting for this request. If one
438
+ number provided, it will be total request
439
+ timeout. It can also be a pair (tuple) of
440
+ (connection, read) timeouts.
441
+ :type _request_timeout: int, tuple(int, int), optional
442
+ :param _request_auth: set to override the auth_settings for an a single
443
+ request; this effectively ignores the
444
+ authentication in the spec for a single request.
445
+ :type _request_auth: dict, optional
446
+ :param _content_type: force content-type for the request.
447
+ :type _content_type: str, Optional
448
+ :param _headers: set to override the headers for a single
449
+ request; this effectively ignores the headers
450
+ in the spec for a single request.
451
+ :type _headers: dict, optional
452
+ :param _host_index: set to override the host_index for a single
453
+ request; this effectively ignores the host_index
454
+ in the spec for a single request.
455
+ :type _host_index: int, optional
456
+ :return: Returns the result object.
457
+ """ # noqa: E501
458
+
459
+ _param = self._update_serialize(
460
+ securable_type=securable_type,
461
+ full_name=full_name,
462
+ update_permissions=update_permissions,
463
+ _request_auth=_request_auth,
464
+ _content_type=_content_type,
465
+ _headers=_headers,
466
+ _host_index=_host_index
467
+ )
468
+
469
+ _response_types_map: Dict[str, Optional[str]] = {
470
+ '200': "PermissionsList",
471
+ }
472
+ response_data = await self.api_client.call_api(
473
+ *_param,
474
+ _request_timeout=_request_timeout
475
+ )
476
+ await response_data.read()
477
+ return self.api_client.response_deserialize(
478
+ response_data=response_data,
479
+ response_types_map=_response_types_map,
480
+ )
481
+
482
+
483
+ @validate_call
484
+ async def update_without_preload_content(
485
+ self,
486
+ securable_type: Annotated[SecurableType, Field(description="Type of securable.")],
487
+ full_name: Annotated[StrictStr, Field(description="Full name of securable.")],
488
+ update_permissions: Optional[UpdatePermissions] = None,
489
+ _request_timeout: Union[
490
+ None,
491
+ Annotated[StrictFloat, Field(gt=0)],
492
+ Tuple[
493
+ Annotated[StrictFloat, Field(gt=0)],
494
+ Annotated[StrictFloat, Field(gt=0)]
495
+ ]
496
+ ] = None,
497
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
498
+ _content_type: Optional[StrictStr] = None,
499
+ _headers: Optional[Dict[StrictStr, Any]] = None,
500
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
501
+ ) -> RESTResponseType:
502
+ """Update a permission
503
+
504
+ Updates the permissions for a securable.
505
+
506
+ :param securable_type: Type of securable. (required)
507
+ :type securable_type: SecurableType
508
+ :param full_name: Full name of securable. (required)
509
+ :type full_name: str
510
+ :param update_permissions:
511
+ :type update_permissions: UpdatePermissions
512
+ :param _request_timeout: timeout setting for this request. If one
513
+ number provided, it will be total request
514
+ timeout. It can also be a pair (tuple) of
515
+ (connection, read) timeouts.
516
+ :type _request_timeout: int, tuple(int, int), optional
517
+ :param _request_auth: set to override the auth_settings for an a single
518
+ request; this effectively ignores the
519
+ authentication in the spec for a single request.
520
+ :type _request_auth: dict, optional
521
+ :param _content_type: force content-type for the request.
522
+ :type _content_type: str, Optional
523
+ :param _headers: set to override the headers for a single
524
+ request; this effectively ignores the headers
525
+ in the spec for a single request.
526
+ :type _headers: dict, optional
527
+ :param _host_index: set to override the host_index for a single
528
+ request; this effectively ignores the host_index
529
+ in the spec for a single request.
530
+ :type _host_index: int, optional
531
+ :return: Returns the result object.
532
+ """ # noqa: E501
533
+
534
+ _param = self._update_serialize(
535
+ securable_type=securable_type,
536
+ full_name=full_name,
537
+ update_permissions=update_permissions,
538
+ _request_auth=_request_auth,
539
+ _content_type=_content_type,
540
+ _headers=_headers,
541
+ _host_index=_host_index
542
+ )
543
+
544
+ _response_types_map: Dict[str, Optional[str]] = {
545
+ '200': "PermissionsList",
546
+ }
547
+ response_data = await self.api_client.call_api(
548
+ *_param,
549
+ _request_timeout=_request_timeout
550
+ )
551
+ return response_data.response
552
+
553
+
554
+ def _update_serialize(
555
+ self,
556
+ securable_type,
557
+ full_name,
558
+ update_permissions,
559
+ _request_auth,
560
+ _content_type,
561
+ _headers,
562
+ _host_index,
563
+ ) -> RequestSerialized:
564
+
565
+ _host = None
566
+
567
+ _collection_formats: Dict[str, str] = {
568
+ }
569
+
570
+ _path_params: Dict[str, str] = {}
571
+ _query_params: List[Tuple[str, str]] = []
572
+ _header_params: Dict[str, Optional[str]] = _headers or {}
573
+ _form_params: List[Tuple[str, str]] = []
574
+ _files: Dict[str, Union[str, bytes]] = {}
575
+ _body_params: Optional[bytes] = None
576
+
577
+ # process the path parameters
578
+ if securable_type is not None:
579
+ _path_params['securable_type'] = securable_type.value
580
+ if full_name is not None:
581
+ _path_params['full_name'] = full_name
582
+ # process the query parameters
583
+ # process the header parameters
584
+ # process the form parameters
585
+ # process the body parameter
586
+ if update_permissions is not None:
587
+ _body_params = update_permissions
588
+
589
+
590
+ # set the HTTP header `Accept`
591
+ _header_params['Accept'] = self.api_client.select_header_accept(
592
+ [
593
+ 'application/json'
594
+ ]
595
+ )
596
+
597
+ # set the HTTP header `Content-Type`
598
+ if _content_type:
599
+ _header_params['Content-Type'] = _content_type
600
+ else:
601
+ _default_content_type = (
602
+ self.api_client.select_header_content_type(
603
+ [
604
+ 'application/json'
605
+ ]
606
+ )
607
+ )
608
+ if _default_content_type is not None:
609
+ _header_params['Content-Type'] = _default_content_type
610
+
611
+ # authentication setting
612
+ _auth_settings: List[str] = [
613
+ ]
614
+
615
+ return self.api_client.param_serialize(
616
+ method='PATCH',
617
+ resource_path='/permissions/{securable_type}/{full_name}',
618
+ path_params=_path_params,
619
+ query_params=_query_params,
620
+ header_params=_header_params,
621
+ body=_body_params,
622
+ post_params=_form_params,
623
+ files=_files,
624
+ auth_settings=_auth_settings,
625
+ collection_formats=_collection_formats,
626
+ _host=_host,
627
+ _request_auth=_request_auth
628
+ )
629
+
630
+