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,1404 @@
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, StrictBool, StrictStr
20
+ from typing import Any, Optional
21
+ from typing_extensions import Annotated
22
+ from unitycatalog.client.models.catalog_info import CatalogInfo
23
+ from unitycatalog.client.models.create_catalog import CreateCatalog
24
+ from unitycatalog.client.models.list_catalogs_response import ListCatalogsResponse
25
+ from unitycatalog.client.models.update_catalog import UpdateCatalog
26
+
27
+ from unitycatalog.client.api_client import ApiClient, RequestSerialized
28
+ from unitycatalog.client.api_response import ApiResponse
29
+ from unitycatalog.client.rest import RESTResponseType
30
+
31
+
32
+ class CatalogsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def create_catalog(
47
+ self,
48
+ create_catalog: Optional[CreateCatalog] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> CatalogInfo:
62
+ """Create a catalog
63
+
64
+ Creates a new catalog instance.
65
+
66
+ :param create_catalog:
67
+ :type create_catalog: CreateCatalog
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._create_catalog_serialize(
91
+ create_catalog=create_catalog,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "CatalogInfo",
100
+ }
101
+ response_data = await self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ await response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ async def create_catalog_with_http_info(
114
+ self,
115
+ create_catalog: Optional[CreateCatalog] = None,
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[CatalogInfo]:
129
+ """Create a catalog
130
+
131
+ Creates a new catalog instance.
132
+
133
+ :param create_catalog:
134
+ :type create_catalog: CreateCatalog
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._create_catalog_serialize(
158
+ create_catalog=create_catalog,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "CatalogInfo",
167
+ }
168
+ response_data = await self.api_client.call_api(
169
+ *_param,
170
+ _request_timeout=_request_timeout
171
+ )
172
+ await response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+
179
+ @validate_call
180
+ async def create_catalog_without_preload_content(
181
+ self,
182
+ create_catalog: Optional[CreateCatalog] = None,
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Annotated[StrictFloat, Field(gt=0)]
189
+ ]
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Create a catalog
197
+
198
+ Creates a new catalog instance.
199
+
200
+ :param create_catalog:
201
+ :type create_catalog: CreateCatalog
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._create_catalog_serialize(
225
+ create_catalog=create_catalog,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ '200': "CatalogInfo",
234
+ }
235
+ response_data = await self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _create_catalog_serialize(
243
+ self,
244
+ create_catalog,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[str, Union[str, bytes]] = {}
261
+ _body_params: Optional[bytes] = None
262
+
263
+ # process the path parameters
264
+ # process the query parameters
265
+ # process the header parameters
266
+ # process the form parameters
267
+ # process the body parameter
268
+ if create_catalog is not None:
269
+ _body_params = create_catalog
270
+
271
+
272
+ # set the HTTP header `Accept`
273
+ _header_params['Accept'] = self.api_client.select_header_accept(
274
+ [
275
+ 'application/json'
276
+ ]
277
+ )
278
+
279
+ # set the HTTP header `Content-Type`
280
+ if _content_type:
281
+ _header_params['Content-Type'] = _content_type
282
+ else:
283
+ _default_content_type = (
284
+ self.api_client.select_header_content_type(
285
+ [
286
+ 'application/json'
287
+ ]
288
+ )
289
+ )
290
+ if _default_content_type is not None:
291
+ _header_params['Content-Type'] = _default_content_type
292
+
293
+ # authentication setting
294
+ _auth_settings: List[str] = [
295
+ ]
296
+
297
+ return self.api_client.param_serialize(
298
+ method='POST',
299
+ resource_path='/catalogs',
300
+ path_params=_path_params,
301
+ query_params=_query_params,
302
+ header_params=_header_params,
303
+ body=_body_params,
304
+ post_params=_form_params,
305
+ files=_files,
306
+ auth_settings=_auth_settings,
307
+ collection_formats=_collection_formats,
308
+ _host=_host,
309
+ _request_auth=_request_auth
310
+ )
311
+
312
+
313
+
314
+
315
+ @validate_call
316
+ async def delete_catalog(
317
+ self,
318
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
319
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the catalog is not empty.")] = None,
320
+ _request_timeout: Union[
321
+ None,
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Tuple[
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Annotated[StrictFloat, Field(gt=0)]
326
+ ]
327
+ ] = None,
328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
329
+ _content_type: Optional[StrictStr] = None,
330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
332
+ ) -> object:
333
+ """Delete a catalog
334
+
335
+ Deletes the catalog that matches the supplied name.
336
+
337
+ :param name: The name of the catalog. (required)
338
+ :type name: str
339
+ :param force: Force deletion even if the catalog is not empty.
340
+ :type force: bool
341
+ :param _request_timeout: timeout setting for this request. If one
342
+ number provided, it will be total request
343
+ timeout. It can also be a pair (tuple) of
344
+ (connection, read) timeouts.
345
+ :type _request_timeout: int, tuple(int, int), optional
346
+ :param _request_auth: set to override the auth_settings for an a single
347
+ request; this effectively ignores the
348
+ authentication in the spec for a single request.
349
+ :type _request_auth: dict, optional
350
+ :param _content_type: force content-type for the request.
351
+ :type _content_type: str, Optional
352
+ :param _headers: set to override the headers for a single
353
+ request; this effectively ignores the headers
354
+ in the spec for a single request.
355
+ :type _headers: dict, optional
356
+ :param _host_index: set to override the host_index for a single
357
+ request; this effectively ignores the host_index
358
+ in the spec for a single request.
359
+ :type _host_index: int, optional
360
+ :return: Returns the result object.
361
+ """ # noqa: E501
362
+
363
+ _param = self._delete_catalog_serialize(
364
+ name=name,
365
+ force=force,
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ '200': "object",
374
+ }
375
+ response_data = await self.api_client.call_api(
376
+ *_param,
377
+ _request_timeout=_request_timeout
378
+ )
379
+ await response_data.read()
380
+ return self.api_client.response_deserialize(
381
+ response_data=response_data,
382
+ response_types_map=_response_types_map,
383
+ ).data
384
+
385
+
386
+ @validate_call
387
+ async def delete_catalog_with_http_info(
388
+ self,
389
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
390
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the catalog is not empty.")] = None,
391
+ _request_timeout: Union[
392
+ None,
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Tuple[
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Annotated[StrictFloat, Field(gt=0)]
397
+ ]
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> ApiResponse[object]:
404
+ """Delete a catalog
405
+
406
+ Deletes the catalog that matches the supplied name.
407
+
408
+ :param name: The name of the catalog. (required)
409
+ :type name: str
410
+ :param force: Force deletion even if the catalog is not empty.
411
+ :type force: bool
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._delete_catalog_serialize(
435
+ name=name,
436
+ force=force,
437
+ _request_auth=_request_auth,
438
+ _content_type=_content_type,
439
+ _headers=_headers,
440
+ _host_index=_host_index
441
+ )
442
+
443
+ _response_types_map: Dict[str, Optional[str]] = {
444
+ '200': "object",
445
+ }
446
+ response_data = await self.api_client.call_api(
447
+ *_param,
448
+ _request_timeout=_request_timeout
449
+ )
450
+ await response_data.read()
451
+ return self.api_client.response_deserialize(
452
+ response_data=response_data,
453
+ response_types_map=_response_types_map,
454
+ )
455
+
456
+
457
+ @validate_call
458
+ async def delete_catalog_without_preload_content(
459
+ self,
460
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
461
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the catalog is not empty.")] = None,
462
+ _request_timeout: Union[
463
+ None,
464
+ Annotated[StrictFloat, Field(gt=0)],
465
+ Tuple[
466
+ Annotated[StrictFloat, Field(gt=0)],
467
+ Annotated[StrictFloat, Field(gt=0)]
468
+ ]
469
+ ] = None,
470
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
471
+ _content_type: Optional[StrictStr] = None,
472
+ _headers: Optional[Dict[StrictStr, Any]] = None,
473
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
474
+ ) -> RESTResponseType:
475
+ """Delete a catalog
476
+
477
+ Deletes the catalog that matches the supplied name.
478
+
479
+ :param name: The name of the catalog. (required)
480
+ :type name: str
481
+ :param force: Force deletion even if the catalog is not empty.
482
+ :type force: bool
483
+ :param _request_timeout: timeout setting for this request. If one
484
+ number provided, it will be total request
485
+ timeout. It can also be a pair (tuple) of
486
+ (connection, read) timeouts.
487
+ :type _request_timeout: int, tuple(int, int), optional
488
+ :param _request_auth: set to override the auth_settings for an a single
489
+ request; this effectively ignores the
490
+ authentication in the spec for a single request.
491
+ :type _request_auth: dict, optional
492
+ :param _content_type: force content-type for the request.
493
+ :type _content_type: str, Optional
494
+ :param _headers: set to override the headers for a single
495
+ request; this effectively ignores the headers
496
+ in the spec for a single request.
497
+ :type _headers: dict, optional
498
+ :param _host_index: set to override the host_index for a single
499
+ request; this effectively ignores the host_index
500
+ in the spec for a single request.
501
+ :type _host_index: int, optional
502
+ :return: Returns the result object.
503
+ """ # noqa: E501
504
+
505
+ _param = self._delete_catalog_serialize(
506
+ name=name,
507
+ force=force,
508
+ _request_auth=_request_auth,
509
+ _content_type=_content_type,
510
+ _headers=_headers,
511
+ _host_index=_host_index
512
+ )
513
+
514
+ _response_types_map: Dict[str, Optional[str]] = {
515
+ '200': "object",
516
+ }
517
+ response_data = await self.api_client.call_api(
518
+ *_param,
519
+ _request_timeout=_request_timeout
520
+ )
521
+ return response_data.response
522
+
523
+
524
+ def _delete_catalog_serialize(
525
+ self,
526
+ name,
527
+ force,
528
+ _request_auth,
529
+ _content_type,
530
+ _headers,
531
+ _host_index,
532
+ ) -> RequestSerialized:
533
+
534
+ _host = None
535
+
536
+ _collection_formats: Dict[str, str] = {
537
+ }
538
+
539
+ _path_params: Dict[str, str] = {}
540
+ _query_params: List[Tuple[str, str]] = []
541
+ _header_params: Dict[str, Optional[str]] = _headers or {}
542
+ _form_params: List[Tuple[str, str]] = []
543
+ _files: Dict[str, Union[str, bytes]] = {}
544
+ _body_params: Optional[bytes] = None
545
+
546
+ # process the path parameters
547
+ if name is not None:
548
+ _path_params['name'] = name
549
+ # process the query parameters
550
+ if force is not None:
551
+
552
+ _query_params.append(('force', force))
553
+
554
+ # process the header parameters
555
+ # process the form parameters
556
+ # process the body parameter
557
+
558
+
559
+ # set the HTTP header `Accept`
560
+ _header_params['Accept'] = self.api_client.select_header_accept(
561
+ [
562
+ 'application/json'
563
+ ]
564
+ )
565
+
566
+
567
+ # authentication setting
568
+ _auth_settings: List[str] = [
569
+ ]
570
+
571
+ return self.api_client.param_serialize(
572
+ method='DELETE',
573
+ resource_path='/catalogs/{name}',
574
+ path_params=_path_params,
575
+ query_params=_query_params,
576
+ header_params=_header_params,
577
+ body=_body_params,
578
+ post_params=_form_params,
579
+ files=_files,
580
+ auth_settings=_auth_settings,
581
+ collection_formats=_collection_formats,
582
+ _host=_host,
583
+ _request_auth=_request_auth
584
+ )
585
+
586
+
587
+
588
+
589
+ @validate_call
590
+ async def get_catalog(
591
+ self,
592
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> CatalogInfo:
606
+ """Get a catalog
607
+
608
+ Gets the specified catalog.
609
+
610
+ :param name: The name of the catalog. (required)
611
+ :type name: str
612
+ :param _request_timeout: timeout setting for this request. If one
613
+ number provided, it will be total request
614
+ timeout. It can also be a pair (tuple) of
615
+ (connection, read) timeouts.
616
+ :type _request_timeout: int, tuple(int, int), optional
617
+ :param _request_auth: set to override the auth_settings for an a single
618
+ request; this effectively ignores the
619
+ authentication in the spec for a single request.
620
+ :type _request_auth: dict, optional
621
+ :param _content_type: force content-type for the request.
622
+ :type _content_type: str, Optional
623
+ :param _headers: set to override the headers for a single
624
+ request; this effectively ignores the headers
625
+ in the spec for a single request.
626
+ :type _headers: dict, optional
627
+ :param _host_index: set to override the host_index for a single
628
+ request; this effectively ignores the host_index
629
+ in the spec for a single request.
630
+ :type _host_index: int, optional
631
+ :return: Returns the result object.
632
+ """ # noqa: E501
633
+
634
+ _param = self._get_catalog_serialize(
635
+ name=name,
636
+ _request_auth=_request_auth,
637
+ _content_type=_content_type,
638
+ _headers=_headers,
639
+ _host_index=_host_index
640
+ )
641
+
642
+ _response_types_map: Dict[str, Optional[str]] = {
643
+ '200': "CatalogInfo",
644
+ }
645
+ response_data = await self.api_client.call_api(
646
+ *_param,
647
+ _request_timeout=_request_timeout
648
+ )
649
+ await response_data.read()
650
+ return self.api_client.response_deserialize(
651
+ response_data=response_data,
652
+ response_types_map=_response_types_map,
653
+ ).data
654
+
655
+
656
+ @validate_call
657
+ async def get_catalog_with_http_info(
658
+ self,
659
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
660
+ _request_timeout: Union[
661
+ None,
662
+ Annotated[StrictFloat, Field(gt=0)],
663
+ Tuple[
664
+ Annotated[StrictFloat, Field(gt=0)],
665
+ Annotated[StrictFloat, Field(gt=0)]
666
+ ]
667
+ ] = None,
668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
669
+ _content_type: Optional[StrictStr] = None,
670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
672
+ ) -> ApiResponse[CatalogInfo]:
673
+ """Get a catalog
674
+
675
+ Gets the specified catalog.
676
+
677
+ :param name: The name of the catalog. (required)
678
+ :type name: str
679
+ :param _request_timeout: timeout setting for this request. If one
680
+ number provided, it will be total request
681
+ timeout. It can also be a pair (tuple) of
682
+ (connection, read) timeouts.
683
+ :type _request_timeout: int, tuple(int, int), optional
684
+ :param _request_auth: set to override the auth_settings for an a single
685
+ request; this effectively ignores the
686
+ authentication in the spec for a single request.
687
+ :type _request_auth: dict, optional
688
+ :param _content_type: force content-type for the request.
689
+ :type _content_type: str, Optional
690
+ :param _headers: set to override the headers for a single
691
+ request; this effectively ignores the headers
692
+ in the spec for a single request.
693
+ :type _headers: dict, optional
694
+ :param _host_index: set to override the host_index for a single
695
+ request; this effectively ignores the host_index
696
+ in the spec for a single request.
697
+ :type _host_index: int, optional
698
+ :return: Returns the result object.
699
+ """ # noqa: E501
700
+
701
+ _param = self._get_catalog_serialize(
702
+ name=name,
703
+ _request_auth=_request_auth,
704
+ _content_type=_content_type,
705
+ _headers=_headers,
706
+ _host_index=_host_index
707
+ )
708
+
709
+ _response_types_map: Dict[str, Optional[str]] = {
710
+ '200': "CatalogInfo",
711
+ }
712
+ response_data = await self.api_client.call_api(
713
+ *_param,
714
+ _request_timeout=_request_timeout
715
+ )
716
+ await response_data.read()
717
+ return self.api_client.response_deserialize(
718
+ response_data=response_data,
719
+ response_types_map=_response_types_map,
720
+ )
721
+
722
+
723
+ @validate_call
724
+ async def get_catalog_without_preload_content(
725
+ self,
726
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
727
+ _request_timeout: Union[
728
+ None,
729
+ Annotated[StrictFloat, Field(gt=0)],
730
+ Tuple[
731
+ Annotated[StrictFloat, Field(gt=0)],
732
+ Annotated[StrictFloat, Field(gt=0)]
733
+ ]
734
+ ] = None,
735
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
736
+ _content_type: Optional[StrictStr] = None,
737
+ _headers: Optional[Dict[StrictStr, Any]] = None,
738
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
739
+ ) -> RESTResponseType:
740
+ """Get a catalog
741
+
742
+ Gets the specified catalog.
743
+
744
+ :param name: The name of the catalog. (required)
745
+ :type name: str
746
+ :param _request_timeout: timeout setting for this request. If one
747
+ number provided, it will be total request
748
+ timeout. It can also be a pair (tuple) of
749
+ (connection, read) timeouts.
750
+ :type _request_timeout: int, tuple(int, int), optional
751
+ :param _request_auth: set to override the auth_settings for an a single
752
+ request; this effectively ignores the
753
+ authentication in the spec for a single request.
754
+ :type _request_auth: dict, optional
755
+ :param _content_type: force content-type for the request.
756
+ :type _content_type: str, Optional
757
+ :param _headers: set to override the headers for a single
758
+ request; this effectively ignores the headers
759
+ in the spec for a single request.
760
+ :type _headers: dict, optional
761
+ :param _host_index: set to override the host_index for a single
762
+ request; this effectively ignores the host_index
763
+ in the spec for a single request.
764
+ :type _host_index: int, optional
765
+ :return: Returns the result object.
766
+ """ # noqa: E501
767
+
768
+ _param = self._get_catalog_serialize(
769
+ name=name,
770
+ _request_auth=_request_auth,
771
+ _content_type=_content_type,
772
+ _headers=_headers,
773
+ _host_index=_host_index
774
+ )
775
+
776
+ _response_types_map: Dict[str, Optional[str]] = {
777
+ '200': "CatalogInfo",
778
+ }
779
+ response_data = await self.api_client.call_api(
780
+ *_param,
781
+ _request_timeout=_request_timeout
782
+ )
783
+ return response_data.response
784
+
785
+
786
+ def _get_catalog_serialize(
787
+ self,
788
+ name,
789
+ _request_auth,
790
+ _content_type,
791
+ _headers,
792
+ _host_index,
793
+ ) -> RequestSerialized:
794
+
795
+ _host = None
796
+
797
+ _collection_formats: Dict[str, str] = {
798
+ }
799
+
800
+ _path_params: Dict[str, str] = {}
801
+ _query_params: List[Tuple[str, str]] = []
802
+ _header_params: Dict[str, Optional[str]] = _headers or {}
803
+ _form_params: List[Tuple[str, str]] = []
804
+ _files: Dict[str, Union[str, bytes]] = {}
805
+ _body_params: Optional[bytes] = None
806
+
807
+ # process the path parameters
808
+ if name is not None:
809
+ _path_params['name'] = name
810
+ # process the query parameters
811
+ # process the header parameters
812
+ # process the form parameters
813
+ # process the body parameter
814
+
815
+
816
+ # set the HTTP header `Accept`
817
+ _header_params['Accept'] = self.api_client.select_header_accept(
818
+ [
819
+ 'application/json'
820
+ ]
821
+ )
822
+
823
+
824
+ # authentication setting
825
+ _auth_settings: List[str] = [
826
+ ]
827
+
828
+ return self.api_client.param_serialize(
829
+ method='GET',
830
+ resource_path='/catalogs/{name}',
831
+ path_params=_path_params,
832
+ query_params=_query_params,
833
+ header_params=_header_params,
834
+ body=_body_params,
835
+ post_params=_form_params,
836
+ files=_files,
837
+ auth_settings=_auth_settings,
838
+ collection_formats=_collection_formats,
839
+ _host=_host,
840
+ _request_auth=_request_auth
841
+ )
842
+
843
+
844
+
845
+
846
+ @validate_call
847
+ async def list_catalogs(
848
+ self,
849
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query. ")] = None,
850
+ max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; ")] = None,
851
+ _request_timeout: Union[
852
+ None,
853
+ Annotated[StrictFloat, Field(gt=0)],
854
+ Tuple[
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Annotated[StrictFloat, Field(gt=0)]
857
+ ]
858
+ ] = None,
859
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
860
+ _content_type: Optional[StrictStr] = None,
861
+ _headers: Optional[Dict[StrictStr, Any]] = None,
862
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
863
+ ) -> ListCatalogsResponse:
864
+ """List catalogs
865
+
866
+ Lists the available catalogs. There is no guarantee of a specific ordering of the elements in the list.
867
+
868
+ :param page_token: Opaque pagination token to go to next page based on previous query.
869
+ :type page_token: str
870
+ :param max_results: Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned;
871
+ :type max_results: int
872
+ :param _request_timeout: timeout setting for this request. If one
873
+ number provided, it will be total request
874
+ timeout. It can also be a pair (tuple) of
875
+ (connection, read) timeouts.
876
+ :type _request_timeout: int, tuple(int, int), optional
877
+ :param _request_auth: set to override the auth_settings for an a single
878
+ request; this effectively ignores the
879
+ authentication in the spec for a single request.
880
+ :type _request_auth: dict, optional
881
+ :param _content_type: force content-type for the request.
882
+ :type _content_type: str, Optional
883
+ :param _headers: set to override the headers for a single
884
+ request; this effectively ignores the headers
885
+ in the spec for a single request.
886
+ :type _headers: dict, optional
887
+ :param _host_index: set to override the host_index for a single
888
+ request; this effectively ignores the host_index
889
+ in the spec for a single request.
890
+ :type _host_index: int, optional
891
+ :return: Returns the result object.
892
+ """ # noqa: E501
893
+
894
+ _param = self._list_catalogs_serialize(
895
+ page_token=page_token,
896
+ max_results=max_results,
897
+ _request_auth=_request_auth,
898
+ _content_type=_content_type,
899
+ _headers=_headers,
900
+ _host_index=_host_index
901
+ )
902
+
903
+ _response_types_map: Dict[str, Optional[str]] = {
904
+ '200': "ListCatalogsResponse",
905
+ }
906
+ response_data = await self.api_client.call_api(
907
+ *_param,
908
+ _request_timeout=_request_timeout
909
+ )
910
+ await response_data.read()
911
+ return self.api_client.response_deserialize(
912
+ response_data=response_data,
913
+ response_types_map=_response_types_map,
914
+ ).data
915
+
916
+
917
+ @validate_call
918
+ async def list_catalogs_with_http_info(
919
+ self,
920
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query. ")] = None,
921
+ max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; ")] = None,
922
+ _request_timeout: Union[
923
+ None,
924
+ Annotated[StrictFloat, Field(gt=0)],
925
+ Tuple[
926
+ Annotated[StrictFloat, Field(gt=0)],
927
+ Annotated[StrictFloat, Field(gt=0)]
928
+ ]
929
+ ] = None,
930
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
931
+ _content_type: Optional[StrictStr] = None,
932
+ _headers: Optional[Dict[StrictStr, Any]] = None,
933
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
934
+ ) -> ApiResponse[ListCatalogsResponse]:
935
+ """List catalogs
936
+
937
+ Lists the available catalogs. There is no guarantee of a specific ordering of the elements in the list.
938
+
939
+ :param page_token: Opaque pagination token to go to next page based on previous query.
940
+ :type page_token: str
941
+ :param max_results: Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned;
942
+ :type max_results: int
943
+ :param _request_timeout: timeout setting for this request. If one
944
+ number provided, it will be total request
945
+ timeout. It can also be a pair (tuple) of
946
+ (connection, read) timeouts.
947
+ :type _request_timeout: int, tuple(int, int), optional
948
+ :param _request_auth: set to override the auth_settings for an a single
949
+ request; this effectively ignores the
950
+ authentication in the spec for a single request.
951
+ :type _request_auth: dict, optional
952
+ :param _content_type: force content-type for the request.
953
+ :type _content_type: str, Optional
954
+ :param _headers: set to override the headers for a single
955
+ request; this effectively ignores the headers
956
+ in the spec for a single request.
957
+ :type _headers: dict, optional
958
+ :param _host_index: set to override the host_index for a single
959
+ request; this effectively ignores the host_index
960
+ in the spec for a single request.
961
+ :type _host_index: int, optional
962
+ :return: Returns the result object.
963
+ """ # noqa: E501
964
+
965
+ _param = self._list_catalogs_serialize(
966
+ page_token=page_token,
967
+ max_results=max_results,
968
+ _request_auth=_request_auth,
969
+ _content_type=_content_type,
970
+ _headers=_headers,
971
+ _host_index=_host_index
972
+ )
973
+
974
+ _response_types_map: Dict[str, Optional[str]] = {
975
+ '200': "ListCatalogsResponse",
976
+ }
977
+ response_data = await self.api_client.call_api(
978
+ *_param,
979
+ _request_timeout=_request_timeout
980
+ )
981
+ await response_data.read()
982
+ return self.api_client.response_deserialize(
983
+ response_data=response_data,
984
+ response_types_map=_response_types_map,
985
+ )
986
+
987
+
988
+ @validate_call
989
+ async def list_catalogs_without_preload_content(
990
+ self,
991
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query. ")] = None,
992
+ max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; ")] = None,
993
+ _request_timeout: Union[
994
+ None,
995
+ Annotated[StrictFloat, Field(gt=0)],
996
+ Tuple[
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Annotated[StrictFloat, Field(gt=0)]
999
+ ]
1000
+ ] = None,
1001
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1002
+ _content_type: Optional[StrictStr] = None,
1003
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1004
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1005
+ ) -> RESTResponseType:
1006
+ """List catalogs
1007
+
1008
+ Lists the available catalogs. There is no guarantee of a specific ordering of the elements in the list.
1009
+
1010
+ :param page_token: Opaque pagination token to go to next page based on previous query.
1011
+ :type page_token: str
1012
+ :param max_results: Maximum number of catalogs to return. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned;
1013
+ :type max_results: int
1014
+ :param _request_timeout: timeout setting for this request. If one
1015
+ number provided, it will be total request
1016
+ timeout. It can also be a pair (tuple) of
1017
+ (connection, read) timeouts.
1018
+ :type _request_timeout: int, tuple(int, int), optional
1019
+ :param _request_auth: set to override the auth_settings for an a single
1020
+ request; this effectively ignores the
1021
+ authentication in the spec for a single request.
1022
+ :type _request_auth: dict, optional
1023
+ :param _content_type: force content-type for the request.
1024
+ :type _content_type: str, Optional
1025
+ :param _headers: set to override the headers for a single
1026
+ request; this effectively ignores the headers
1027
+ in the spec for a single request.
1028
+ :type _headers: dict, optional
1029
+ :param _host_index: set to override the host_index for a single
1030
+ request; this effectively ignores the host_index
1031
+ in the spec for a single request.
1032
+ :type _host_index: int, optional
1033
+ :return: Returns the result object.
1034
+ """ # noqa: E501
1035
+
1036
+ _param = self._list_catalogs_serialize(
1037
+ page_token=page_token,
1038
+ max_results=max_results,
1039
+ _request_auth=_request_auth,
1040
+ _content_type=_content_type,
1041
+ _headers=_headers,
1042
+ _host_index=_host_index
1043
+ )
1044
+
1045
+ _response_types_map: Dict[str, Optional[str]] = {
1046
+ '200': "ListCatalogsResponse",
1047
+ }
1048
+ response_data = await self.api_client.call_api(
1049
+ *_param,
1050
+ _request_timeout=_request_timeout
1051
+ )
1052
+ return response_data.response
1053
+
1054
+
1055
+ def _list_catalogs_serialize(
1056
+ self,
1057
+ page_token,
1058
+ max_results,
1059
+ _request_auth,
1060
+ _content_type,
1061
+ _headers,
1062
+ _host_index,
1063
+ ) -> RequestSerialized:
1064
+
1065
+ _host = None
1066
+
1067
+ _collection_formats: Dict[str, str] = {
1068
+ }
1069
+
1070
+ _path_params: Dict[str, str] = {}
1071
+ _query_params: List[Tuple[str, str]] = []
1072
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1073
+ _form_params: List[Tuple[str, str]] = []
1074
+ _files: Dict[str, Union[str, bytes]] = {}
1075
+ _body_params: Optional[bytes] = None
1076
+
1077
+ # process the path parameters
1078
+ # process the query parameters
1079
+ if page_token is not None:
1080
+
1081
+ _query_params.append(('page_token', page_token))
1082
+
1083
+ if max_results is not None:
1084
+
1085
+ _query_params.append(('max_results', max_results))
1086
+
1087
+ # process the header parameters
1088
+ # process the form parameters
1089
+ # process the body parameter
1090
+
1091
+
1092
+ # set the HTTP header `Accept`
1093
+ _header_params['Accept'] = self.api_client.select_header_accept(
1094
+ [
1095
+ 'application/json'
1096
+ ]
1097
+ )
1098
+
1099
+
1100
+ # authentication setting
1101
+ _auth_settings: List[str] = [
1102
+ ]
1103
+
1104
+ return self.api_client.param_serialize(
1105
+ method='GET',
1106
+ resource_path='/catalogs',
1107
+ path_params=_path_params,
1108
+ query_params=_query_params,
1109
+ header_params=_header_params,
1110
+ body=_body_params,
1111
+ post_params=_form_params,
1112
+ files=_files,
1113
+ auth_settings=_auth_settings,
1114
+ collection_formats=_collection_formats,
1115
+ _host=_host,
1116
+ _request_auth=_request_auth
1117
+ )
1118
+
1119
+
1120
+
1121
+
1122
+ @validate_call
1123
+ async def update_catalog(
1124
+ self,
1125
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
1126
+ update_catalog: Optional[UpdateCatalog] = None,
1127
+ _request_timeout: Union[
1128
+ None,
1129
+ Annotated[StrictFloat, Field(gt=0)],
1130
+ Tuple[
1131
+ Annotated[StrictFloat, Field(gt=0)],
1132
+ Annotated[StrictFloat, Field(gt=0)]
1133
+ ]
1134
+ ] = None,
1135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1136
+ _content_type: Optional[StrictStr] = None,
1137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1139
+ ) -> CatalogInfo:
1140
+ """Update a catalog
1141
+
1142
+ Updates the catalog that matches the supplied name.
1143
+
1144
+ :param name: The name of the catalog. (required)
1145
+ :type name: str
1146
+ :param update_catalog:
1147
+ :type update_catalog: UpdateCatalog
1148
+ :param _request_timeout: timeout setting for this request. If one
1149
+ number provided, it will be total request
1150
+ timeout. It can also be a pair (tuple) of
1151
+ (connection, read) timeouts.
1152
+ :type _request_timeout: int, tuple(int, int), optional
1153
+ :param _request_auth: set to override the auth_settings for an a single
1154
+ request; this effectively ignores the
1155
+ authentication in the spec for a single request.
1156
+ :type _request_auth: dict, optional
1157
+ :param _content_type: force content-type for the request.
1158
+ :type _content_type: str, Optional
1159
+ :param _headers: set to override the headers for a single
1160
+ request; this effectively ignores the headers
1161
+ in the spec for a single request.
1162
+ :type _headers: dict, optional
1163
+ :param _host_index: set to override the host_index for a single
1164
+ request; this effectively ignores the host_index
1165
+ in the spec for a single request.
1166
+ :type _host_index: int, optional
1167
+ :return: Returns the result object.
1168
+ """ # noqa: E501
1169
+
1170
+ _param = self._update_catalog_serialize(
1171
+ name=name,
1172
+ update_catalog=update_catalog,
1173
+ _request_auth=_request_auth,
1174
+ _content_type=_content_type,
1175
+ _headers=_headers,
1176
+ _host_index=_host_index
1177
+ )
1178
+
1179
+ _response_types_map: Dict[str, Optional[str]] = {
1180
+ '200': "CatalogInfo",
1181
+ }
1182
+ response_data = await self.api_client.call_api(
1183
+ *_param,
1184
+ _request_timeout=_request_timeout
1185
+ )
1186
+ await response_data.read()
1187
+ return self.api_client.response_deserialize(
1188
+ response_data=response_data,
1189
+ response_types_map=_response_types_map,
1190
+ ).data
1191
+
1192
+
1193
+ @validate_call
1194
+ async def update_catalog_with_http_info(
1195
+ self,
1196
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
1197
+ update_catalog: Optional[UpdateCatalog] = None,
1198
+ _request_timeout: Union[
1199
+ None,
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Tuple[
1202
+ Annotated[StrictFloat, Field(gt=0)],
1203
+ Annotated[StrictFloat, Field(gt=0)]
1204
+ ]
1205
+ ] = None,
1206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1207
+ _content_type: Optional[StrictStr] = None,
1208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1210
+ ) -> ApiResponse[CatalogInfo]:
1211
+ """Update a catalog
1212
+
1213
+ Updates the catalog that matches the supplied name.
1214
+
1215
+ :param name: The name of the catalog. (required)
1216
+ :type name: str
1217
+ :param update_catalog:
1218
+ :type update_catalog: UpdateCatalog
1219
+ :param _request_timeout: timeout setting for this request. If one
1220
+ number provided, it will be total request
1221
+ timeout. It can also be a pair (tuple) of
1222
+ (connection, read) timeouts.
1223
+ :type _request_timeout: int, tuple(int, int), optional
1224
+ :param _request_auth: set to override the auth_settings for an a single
1225
+ request; this effectively ignores the
1226
+ authentication in the spec for a single request.
1227
+ :type _request_auth: dict, optional
1228
+ :param _content_type: force content-type for the request.
1229
+ :type _content_type: str, Optional
1230
+ :param _headers: set to override the headers for a single
1231
+ request; this effectively ignores the headers
1232
+ in the spec for a single request.
1233
+ :type _headers: dict, optional
1234
+ :param _host_index: set to override the host_index for a single
1235
+ request; this effectively ignores the host_index
1236
+ in the spec for a single request.
1237
+ :type _host_index: int, optional
1238
+ :return: Returns the result object.
1239
+ """ # noqa: E501
1240
+
1241
+ _param = self._update_catalog_serialize(
1242
+ name=name,
1243
+ update_catalog=update_catalog,
1244
+ _request_auth=_request_auth,
1245
+ _content_type=_content_type,
1246
+ _headers=_headers,
1247
+ _host_index=_host_index
1248
+ )
1249
+
1250
+ _response_types_map: Dict[str, Optional[str]] = {
1251
+ '200': "CatalogInfo",
1252
+ }
1253
+ response_data = await self.api_client.call_api(
1254
+ *_param,
1255
+ _request_timeout=_request_timeout
1256
+ )
1257
+ await response_data.read()
1258
+ return self.api_client.response_deserialize(
1259
+ response_data=response_data,
1260
+ response_types_map=_response_types_map,
1261
+ )
1262
+
1263
+
1264
+ @validate_call
1265
+ async def update_catalog_without_preload_content(
1266
+ self,
1267
+ name: Annotated[StrictStr, Field(description="The name of the catalog.")],
1268
+ update_catalog: Optional[UpdateCatalog] = None,
1269
+ _request_timeout: Union[
1270
+ None,
1271
+ Annotated[StrictFloat, Field(gt=0)],
1272
+ Tuple[
1273
+ Annotated[StrictFloat, Field(gt=0)],
1274
+ Annotated[StrictFloat, Field(gt=0)]
1275
+ ]
1276
+ ] = None,
1277
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1278
+ _content_type: Optional[StrictStr] = None,
1279
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1280
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1281
+ ) -> RESTResponseType:
1282
+ """Update a catalog
1283
+
1284
+ Updates the catalog that matches the supplied name.
1285
+
1286
+ :param name: The name of the catalog. (required)
1287
+ :type name: str
1288
+ :param update_catalog:
1289
+ :type update_catalog: UpdateCatalog
1290
+ :param _request_timeout: timeout setting for this request. If one
1291
+ number provided, it will be total request
1292
+ timeout. It can also be a pair (tuple) of
1293
+ (connection, read) timeouts.
1294
+ :type _request_timeout: int, tuple(int, int), optional
1295
+ :param _request_auth: set to override the auth_settings for an a single
1296
+ request; this effectively ignores the
1297
+ authentication in the spec for a single request.
1298
+ :type _request_auth: dict, optional
1299
+ :param _content_type: force content-type for the request.
1300
+ :type _content_type: str, Optional
1301
+ :param _headers: set to override the headers for a single
1302
+ request; this effectively ignores the headers
1303
+ in the spec for a single request.
1304
+ :type _headers: dict, optional
1305
+ :param _host_index: set to override the host_index for a single
1306
+ request; this effectively ignores the host_index
1307
+ in the spec for a single request.
1308
+ :type _host_index: int, optional
1309
+ :return: Returns the result object.
1310
+ """ # noqa: E501
1311
+
1312
+ _param = self._update_catalog_serialize(
1313
+ name=name,
1314
+ update_catalog=update_catalog,
1315
+ _request_auth=_request_auth,
1316
+ _content_type=_content_type,
1317
+ _headers=_headers,
1318
+ _host_index=_host_index
1319
+ )
1320
+
1321
+ _response_types_map: Dict[str, Optional[str]] = {
1322
+ '200': "CatalogInfo",
1323
+ }
1324
+ response_data = await self.api_client.call_api(
1325
+ *_param,
1326
+ _request_timeout=_request_timeout
1327
+ )
1328
+ return response_data.response
1329
+
1330
+
1331
+ def _update_catalog_serialize(
1332
+ self,
1333
+ name,
1334
+ update_catalog,
1335
+ _request_auth,
1336
+ _content_type,
1337
+ _headers,
1338
+ _host_index,
1339
+ ) -> RequestSerialized:
1340
+
1341
+ _host = None
1342
+
1343
+ _collection_formats: Dict[str, str] = {
1344
+ }
1345
+
1346
+ _path_params: Dict[str, str] = {}
1347
+ _query_params: List[Tuple[str, str]] = []
1348
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1349
+ _form_params: List[Tuple[str, str]] = []
1350
+ _files: Dict[str, Union[str, bytes]] = {}
1351
+ _body_params: Optional[bytes] = None
1352
+
1353
+ # process the path parameters
1354
+ if name is not None:
1355
+ _path_params['name'] = name
1356
+ # process the query parameters
1357
+ # process the header parameters
1358
+ # process the form parameters
1359
+ # process the body parameter
1360
+ if update_catalog is not None:
1361
+ _body_params = update_catalog
1362
+
1363
+
1364
+ # set the HTTP header `Accept`
1365
+ _header_params['Accept'] = self.api_client.select_header_accept(
1366
+ [
1367
+ 'application/json'
1368
+ ]
1369
+ )
1370
+
1371
+ # set the HTTP header `Content-Type`
1372
+ if _content_type:
1373
+ _header_params['Content-Type'] = _content_type
1374
+ else:
1375
+ _default_content_type = (
1376
+ self.api_client.select_header_content_type(
1377
+ [
1378
+ 'application/json'
1379
+ ]
1380
+ )
1381
+ )
1382
+ if _default_content_type is not None:
1383
+ _header_params['Content-Type'] = _default_content_type
1384
+
1385
+ # authentication setting
1386
+ _auth_settings: List[str] = [
1387
+ ]
1388
+
1389
+ return self.api_client.param_serialize(
1390
+ method='PATCH',
1391
+ resource_path='/catalogs/{name}',
1392
+ path_params=_path_params,
1393
+ query_params=_query_params,
1394
+ header_params=_header_params,
1395
+ body=_body_params,
1396
+ post_params=_form_params,
1397
+ files=_files,
1398
+ auth_settings=_auth_settings,
1399
+ collection_formats=_collection_formats,
1400
+ _host=_host,
1401
+ _request_auth=_request_auth
1402
+ )
1403
+
1404
+