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,1438 @@
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.create_registered_model import CreateRegisteredModel
23
+ from unitycatalog.client.models.list_registered_models_response import ListRegisteredModelsResponse
24
+ from unitycatalog.client.models.registered_model_info import RegisteredModelInfo
25
+ from unitycatalog.client.models.update_registered_model import UpdateRegisteredModel
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 RegisteredModelsApi:
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_registered_model(
47
+ self,
48
+ create_registered_model: Optional[CreateRegisteredModel] = 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
+ ) -> RegisteredModelInfo:
62
+ """Create a model. WARNING: This API is experimental and will change in future versions.
63
+
64
+ Creates a new model instance. WARNING: This API is experimental and will change in future versions.
65
+
66
+ :param create_registered_model:
67
+ :type create_registered_model: CreateRegisteredModel
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_registered_model_serialize(
91
+ create_registered_model=create_registered_model,
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': "RegisteredModelInfo",
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_registered_model_with_http_info(
114
+ self,
115
+ create_registered_model: Optional[CreateRegisteredModel] = 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[RegisteredModelInfo]:
129
+ """Create a model. WARNING: This API is experimental and will change in future versions.
130
+
131
+ Creates a new model instance. WARNING: This API is experimental and will change in future versions.
132
+
133
+ :param create_registered_model:
134
+ :type create_registered_model: CreateRegisteredModel
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_registered_model_serialize(
158
+ create_registered_model=create_registered_model,
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': "RegisteredModelInfo",
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_registered_model_without_preload_content(
181
+ self,
182
+ create_registered_model: Optional[CreateRegisteredModel] = 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 model. WARNING: This API is experimental and will change in future versions.
197
+
198
+ Creates a new model instance. WARNING: This API is experimental and will change in future versions.
199
+
200
+ :param create_registered_model:
201
+ :type create_registered_model: CreateRegisteredModel
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_registered_model_serialize(
225
+ create_registered_model=create_registered_model,
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': "RegisteredModelInfo",
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_registered_model_serialize(
243
+ self,
244
+ create_registered_model,
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_registered_model is not None:
269
+ _body_params = create_registered_model
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='/models',
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_registered_model(
317
+ self,
318
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
319
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the registered model still has model versions.")] = 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 specified registered model.
334
+
335
+ Deletes a fully specified registered model. All versions of the model must have already been deleted.
336
+
337
+ :param full_name: Full name of the model. (required)
338
+ :type full_name: str
339
+ :param force: Force deletion even if the registered model still has model versions.
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_registered_model_serialize(
364
+ full_name=full_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_registered_model_with_http_info(
388
+ self,
389
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
390
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the registered model still has model versions.")] = 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 specified registered model.
405
+
406
+ Deletes a fully specified registered model. All versions of the model must have already been deleted.
407
+
408
+ :param full_name: Full name of the model. (required)
409
+ :type full_name: str
410
+ :param force: Force deletion even if the registered model still has model versions.
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_registered_model_serialize(
435
+ full_name=full_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_registered_model_without_preload_content(
459
+ self,
460
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
461
+ force: Annotated[Optional[StrictBool], Field(description="Force deletion even if the registered model still has model versions.")] = 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 specified registered model.
476
+
477
+ Deletes a fully specified registered model. All versions of the model must have already been deleted.
478
+
479
+ :param full_name: Full name of the model. (required)
480
+ :type full_name: str
481
+ :param force: Force deletion even if the registered model still has model versions.
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_registered_model_serialize(
506
+ full_name=full_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_registered_model_serialize(
525
+ self,
526
+ full_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 full_name is not None:
548
+ _path_params['full_name'] = full_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='/models/{full_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_registered_model(
591
+ self,
592
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
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
+ ) -> RegisteredModelInfo:
606
+ """Get a specified registered model
607
+
608
+ Gets a fully specified registered model.
609
+
610
+ :param full_name: Full name of the model. (required)
611
+ :type full_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_registered_model_serialize(
635
+ full_name=full_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': "RegisteredModelInfo",
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_registered_model_with_http_info(
658
+ self,
659
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
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[RegisteredModelInfo]:
673
+ """Get a specified registered model
674
+
675
+ Gets a fully specified registered model.
676
+
677
+ :param full_name: Full name of the model. (required)
678
+ :type full_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_registered_model_serialize(
702
+ full_name=full_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': "RegisteredModelInfo",
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_registered_model_without_preload_content(
725
+ self,
726
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
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 specified registered model
741
+
742
+ Gets a fully specified registered model.
743
+
744
+ :param full_name: Full name of the model. (required)
745
+ :type full_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_registered_model_serialize(
769
+ full_name=full_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': "RegisteredModelInfo",
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_registered_model_serialize(
787
+ self,
788
+ full_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 full_name is not None:
809
+ _path_params['full_name'] = full_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='/models/{full_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_registered_models(
848
+ self,
849
+ catalog_name: Annotated[Optional[StrictStr], Field(description="Name of parent catalog for models of interest.")] = None,
850
+ schema_name: Annotated[Optional[StrictStr], Field(description="Name of parent schema for models of interest.")] = None,
851
+ max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True)]], Field(description="Maximum number of models 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,
852
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque token to send for the next page of results (pagination).")] = None,
853
+ _request_timeout: Union[
854
+ None,
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Tuple[
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Annotated[StrictFloat, Field(gt=0)]
859
+ ]
860
+ ] = None,
861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
862
+ _content_type: Optional[StrictStr] = None,
863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
865
+ ) -> ListRegisteredModelsResponse:
866
+ """List models
867
+
868
+ Gets a paginated list of all available models either under the specified parent catalog and schema, or all models stored in UC. There is no guarantee of a specific ordering of the elements in the array.
869
+
870
+ :param catalog_name: Name of parent catalog for models of interest.
871
+ :type catalog_name: str
872
+ :param schema_name: Name of parent schema for models of interest.
873
+ :type schema_name: str
874
+ :param max_results: Maximum number of models 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;
875
+ :type max_results: int
876
+ :param page_token: Opaque token to send for the next page of results (pagination).
877
+ :type page_token: str
878
+ :param _request_timeout: timeout setting for this request. If one
879
+ number provided, it will be total request
880
+ timeout. It can also be a pair (tuple) of
881
+ (connection, read) timeouts.
882
+ :type _request_timeout: int, tuple(int, int), optional
883
+ :param _request_auth: set to override the auth_settings for an a single
884
+ request; this effectively ignores the
885
+ authentication in the spec for a single request.
886
+ :type _request_auth: dict, optional
887
+ :param _content_type: force content-type for the request.
888
+ :type _content_type: str, Optional
889
+ :param _headers: set to override the headers for a single
890
+ request; this effectively ignores the headers
891
+ in the spec for a single request.
892
+ :type _headers: dict, optional
893
+ :param _host_index: set to override the host_index for a single
894
+ request; this effectively ignores the host_index
895
+ in the spec for a single request.
896
+ :type _host_index: int, optional
897
+ :return: Returns the result object.
898
+ """ # noqa: E501
899
+
900
+ _param = self._list_registered_models_serialize(
901
+ catalog_name=catalog_name,
902
+ schema_name=schema_name,
903
+ max_results=max_results,
904
+ page_token=page_token,
905
+ _request_auth=_request_auth,
906
+ _content_type=_content_type,
907
+ _headers=_headers,
908
+ _host_index=_host_index
909
+ )
910
+
911
+ _response_types_map: Dict[str, Optional[str]] = {
912
+ '200': "ListRegisteredModelsResponse",
913
+ }
914
+ response_data = await self.api_client.call_api(
915
+ *_param,
916
+ _request_timeout=_request_timeout
917
+ )
918
+ await response_data.read()
919
+ return self.api_client.response_deserialize(
920
+ response_data=response_data,
921
+ response_types_map=_response_types_map,
922
+ ).data
923
+
924
+
925
+ @validate_call
926
+ async def list_registered_models_with_http_info(
927
+ self,
928
+ catalog_name: Annotated[Optional[StrictStr], Field(description="Name of parent catalog for models of interest.")] = None,
929
+ schema_name: Annotated[Optional[StrictStr], Field(description="Name of parent schema for models of interest.")] = None,
930
+ max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True)]], Field(description="Maximum number of models 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,
931
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque token to send for the next page of results (pagination).")] = None,
932
+ _request_timeout: Union[
933
+ None,
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Tuple[
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Annotated[StrictFloat, Field(gt=0)]
938
+ ]
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> ApiResponse[ListRegisteredModelsResponse]:
945
+ """List models
946
+
947
+ Gets a paginated list of all available models either under the specified parent catalog and schema, or all models stored in UC. There is no guarantee of a specific ordering of the elements in the array.
948
+
949
+ :param catalog_name: Name of parent catalog for models of interest.
950
+ :type catalog_name: str
951
+ :param schema_name: Name of parent schema for models of interest.
952
+ :type schema_name: str
953
+ :param max_results: Maximum number of models 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;
954
+ :type max_results: int
955
+ :param page_token: Opaque token to send for the next page of results (pagination).
956
+ :type page_token: str
957
+ :param _request_timeout: timeout setting for this request. If one
958
+ number provided, it will be total request
959
+ timeout. It can also be a pair (tuple) of
960
+ (connection, read) timeouts.
961
+ :type _request_timeout: int, tuple(int, int), optional
962
+ :param _request_auth: set to override the auth_settings for an a single
963
+ request; this effectively ignores the
964
+ authentication in the spec for a single request.
965
+ :type _request_auth: dict, optional
966
+ :param _content_type: force content-type for the request.
967
+ :type _content_type: str, Optional
968
+ :param _headers: set to override the headers for a single
969
+ request; this effectively ignores the headers
970
+ in the spec for a single request.
971
+ :type _headers: dict, optional
972
+ :param _host_index: set to override the host_index for a single
973
+ request; this effectively ignores the host_index
974
+ in the spec for a single request.
975
+ :type _host_index: int, optional
976
+ :return: Returns the result object.
977
+ """ # noqa: E501
978
+
979
+ _param = self._list_registered_models_serialize(
980
+ catalog_name=catalog_name,
981
+ schema_name=schema_name,
982
+ max_results=max_results,
983
+ page_token=page_token,
984
+ _request_auth=_request_auth,
985
+ _content_type=_content_type,
986
+ _headers=_headers,
987
+ _host_index=_host_index
988
+ )
989
+
990
+ _response_types_map: Dict[str, Optional[str]] = {
991
+ '200': "ListRegisteredModelsResponse",
992
+ }
993
+ response_data = await self.api_client.call_api(
994
+ *_param,
995
+ _request_timeout=_request_timeout
996
+ )
997
+ await response_data.read()
998
+ return self.api_client.response_deserialize(
999
+ response_data=response_data,
1000
+ response_types_map=_response_types_map,
1001
+ )
1002
+
1003
+
1004
+ @validate_call
1005
+ async def list_registered_models_without_preload_content(
1006
+ self,
1007
+ catalog_name: Annotated[Optional[StrictStr], Field(description="Name of parent catalog for models of interest.")] = None,
1008
+ schema_name: Annotated[Optional[StrictStr], Field(description="Name of parent schema for models of interest.")] = None,
1009
+ max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True)]], Field(description="Maximum number of models 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,
1010
+ page_token: Annotated[Optional[StrictStr], Field(description="Opaque token to send for the next page of results (pagination).")] = None,
1011
+ _request_timeout: Union[
1012
+ None,
1013
+ Annotated[StrictFloat, Field(gt=0)],
1014
+ Tuple[
1015
+ Annotated[StrictFloat, Field(gt=0)],
1016
+ Annotated[StrictFloat, Field(gt=0)]
1017
+ ]
1018
+ ] = None,
1019
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1020
+ _content_type: Optional[StrictStr] = None,
1021
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1022
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1023
+ ) -> RESTResponseType:
1024
+ """List models
1025
+
1026
+ Gets a paginated list of all available models either under the specified parent catalog and schema, or all models stored in UC. There is no guarantee of a specific ordering of the elements in the array.
1027
+
1028
+ :param catalog_name: Name of parent catalog for models of interest.
1029
+ :type catalog_name: str
1030
+ :param schema_name: Name of parent schema for models of interest.
1031
+ :type schema_name: str
1032
+ :param max_results: Maximum number of models 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;
1033
+ :type max_results: int
1034
+ :param page_token: Opaque token to send for the next page of results (pagination).
1035
+ :type page_token: str
1036
+ :param _request_timeout: timeout setting for this request. If one
1037
+ number provided, it will be total request
1038
+ timeout. It can also be a pair (tuple) of
1039
+ (connection, read) timeouts.
1040
+ :type _request_timeout: int, tuple(int, int), optional
1041
+ :param _request_auth: set to override the auth_settings for an a single
1042
+ request; this effectively ignores the
1043
+ authentication in the spec for a single request.
1044
+ :type _request_auth: dict, optional
1045
+ :param _content_type: force content-type for the request.
1046
+ :type _content_type: str, Optional
1047
+ :param _headers: set to override the headers for a single
1048
+ request; this effectively ignores the headers
1049
+ in the spec for a single request.
1050
+ :type _headers: dict, optional
1051
+ :param _host_index: set to override the host_index for a single
1052
+ request; this effectively ignores the host_index
1053
+ in the spec for a single request.
1054
+ :type _host_index: int, optional
1055
+ :return: Returns the result object.
1056
+ """ # noqa: E501
1057
+
1058
+ _param = self._list_registered_models_serialize(
1059
+ catalog_name=catalog_name,
1060
+ schema_name=schema_name,
1061
+ max_results=max_results,
1062
+ page_token=page_token,
1063
+ _request_auth=_request_auth,
1064
+ _content_type=_content_type,
1065
+ _headers=_headers,
1066
+ _host_index=_host_index
1067
+ )
1068
+
1069
+ _response_types_map: Dict[str, Optional[str]] = {
1070
+ '200': "ListRegisteredModelsResponse",
1071
+ }
1072
+ response_data = await self.api_client.call_api(
1073
+ *_param,
1074
+ _request_timeout=_request_timeout
1075
+ )
1076
+ return response_data.response
1077
+
1078
+
1079
+ def _list_registered_models_serialize(
1080
+ self,
1081
+ catalog_name,
1082
+ schema_name,
1083
+ max_results,
1084
+ page_token,
1085
+ _request_auth,
1086
+ _content_type,
1087
+ _headers,
1088
+ _host_index,
1089
+ ) -> RequestSerialized:
1090
+
1091
+ _host = None
1092
+
1093
+ _collection_formats: Dict[str, str] = {
1094
+ }
1095
+
1096
+ _path_params: Dict[str, str] = {}
1097
+ _query_params: List[Tuple[str, str]] = []
1098
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1099
+ _form_params: List[Tuple[str, str]] = []
1100
+ _files: Dict[str, Union[str, bytes]] = {}
1101
+ _body_params: Optional[bytes] = None
1102
+
1103
+ # process the path parameters
1104
+ # process the query parameters
1105
+ if catalog_name is not None:
1106
+
1107
+ _query_params.append(('catalog_name', catalog_name))
1108
+
1109
+ if schema_name is not None:
1110
+
1111
+ _query_params.append(('schema_name', schema_name))
1112
+
1113
+ if max_results is not None:
1114
+
1115
+ _query_params.append(('max_results', max_results))
1116
+
1117
+ if page_token is not None:
1118
+
1119
+ _query_params.append(('page_token', page_token))
1120
+
1121
+ # process the header parameters
1122
+ # process the form parameters
1123
+ # process the body parameter
1124
+
1125
+
1126
+ # set the HTTP header `Accept`
1127
+ _header_params['Accept'] = self.api_client.select_header_accept(
1128
+ [
1129
+ 'application/json'
1130
+ ]
1131
+ )
1132
+
1133
+
1134
+ # authentication setting
1135
+ _auth_settings: List[str] = [
1136
+ ]
1137
+
1138
+ return self.api_client.param_serialize(
1139
+ method='GET',
1140
+ resource_path='/models',
1141
+ path_params=_path_params,
1142
+ query_params=_query_params,
1143
+ header_params=_header_params,
1144
+ body=_body_params,
1145
+ post_params=_form_params,
1146
+ files=_files,
1147
+ auth_settings=_auth_settings,
1148
+ collection_formats=_collection_formats,
1149
+ _host=_host,
1150
+ _request_auth=_request_auth
1151
+ )
1152
+
1153
+
1154
+
1155
+
1156
+ @validate_call
1157
+ async def update_registered_model(
1158
+ self,
1159
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
1160
+ update_registered_model: Optional[UpdateRegisteredModel] = None,
1161
+ _request_timeout: Union[
1162
+ None,
1163
+ Annotated[StrictFloat, Field(gt=0)],
1164
+ Tuple[
1165
+ Annotated[StrictFloat, Field(gt=0)],
1166
+ Annotated[StrictFloat, Field(gt=0)]
1167
+ ]
1168
+ ] = None,
1169
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1170
+ _content_type: Optional[StrictStr] = None,
1171
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1172
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1173
+ ) -> RegisteredModelInfo:
1174
+ """Update a registered model
1175
+
1176
+ Updates the specified registered model.
1177
+
1178
+ :param full_name: Full name of the model. (required)
1179
+ :type full_name: str
1180
+ :param update_registered_model:
1181
+ :type update_registered_model: UpdateRegisteredModel
1182
+ :param _request_timeout: timeout setting for this request. If one
1183
+ number provided, it will be total request
1184
+ timeout. It can also be a pair (tuple) of
1185
+ (connection, read) timeouts.
1186
+ :type _request_timeout: int, tuple(int, int), optional
1187
+ :param _request_auth: set to override the auth_settings for an a single
1188
+ request; this effectively ignores the
1189
+ authentication in the spec for a single request.
1190
+ :type _request_auth: dict, optional
1191
+ :param _content_type: force content-type for the request.
1192
+ :type _content_type: str, Optional
1193
+ :param _headers: set to override the headers for a single
1194
+ request; this effectively ignores the headers
1195
+ in the spec for a single request.
1196
+ :type _headers: dict, optional
1197
+ :param _host_index: set to override the host_index for a single
1198
+ request; this effectively ignores the host_index
1199
+ in the spec for a single request.
1200
+ :type _host_index: int, optional
1201
+ :return: Returns the result object.
1202
+ """ # noqa: E501
1203
+
1204
+ _param = self._update_registered_model_serialize(
1205
+ full_name=full_name,
1206
+ update_registered_model=update_registered_model,
1207
+ _request_auth=_request_auth,
1208
+ _content_type=_content_type,
1209
+ _headers=_headers,
1210
+ _host_index=_host_index
1211
+ )
1212
+
1213
+ _response_types_map: Dict[str, Optional[str]] = {
1214
+ '200': "RegisteredModelInfo",
1215
+ }
1216
+ response_data = await self.api_client.call_api(
1217
+ *_param,
1218
+ _request_timeout=_request_timeout
1219
+ )
1220
+ await response_data.read()
1221
+ return self.api_client.response_deserialize(
1222
+ response_data=response_data,
1223
+ response_types_map=_response_types_map,
1224
+ ).data
1225
+
1226
+
1227
+ @validate_call
1228
+ async def update_registered_model_with_http_info(
1229
+ self,
1230
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
1231
+ update_registered_model: Optional[UpdateRegisteredModel] = None,
1232
+ _request_timeout: Union[
1233
+ None,
1234
+ Annotated[StrictFloat, Field(gt=0)],
1235
+ Tuple[
1236
+ Annotated[StrictFloat, Field(gt=0)],
1237
+ Annotated[StrictFloat, Field(gt=0)]
1238
+ ]
1239
+ ] = None,
1240
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1241
+ _content_type: Optional[StrictStr] = None,
1242
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1243
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1244
+ ) -> ApiResponse[RegisteredModelInfo]:
1245
+ """Update a registered model
1246
+
1247
+ Updates the specified registered model.
1248
+
1249
+ :param full_name: Full name of the model. (required)
1250
+ :type full_name: str
1251
+ :param update_registered_model:
1252
+ :type update_registered_model: UpdateRegisteredModel
1253
+ :param _request_timeout: timeout setting for this request. If one
1254
+ number provided, it will be total request
1255
+ timeout. It can also be a pair (tuple) of
1256
+ (connection, read) timeouts.
1257
+ :type _request_timeout: int, tuple(int, int), optional
1258
+ :param _request_auth: set to override the auth_settings for an a single
1259
+ request; this effectively ignores the
1260
+ authentication in the spec for a single request.
1261
+ :type _request_auth: dict, optional
1262
+ :param _content_type: force content-type for the request.
1263
+ :type _content_type: str, Optional
1264
+ :param _headers: set to override the headers for a single
1265
+ request; this effectively ignores the headers
1266
+ in the spec for a single request.
1267
+ :type _headers: dict, optional
1268
+ :param _host_index: set to override the host_index for a single
1269
+ request; this effectively ignores the host_index
1270
+ in the spec for a single request.
1271
+ :type _host_index: int, optional
1272
+ :return: Returns the result object.
1273
+ """ # noqa: E501
1274
+
1275
+ _param = self._update_registered_model_serialize(
1276
+ full_name=full_name,
1277
+ update_registered_model=update_registered_model,
1278
+ _request_auth=_request_auth,
1279
+ _content_type=_content_type,
1280
+ _headers=_headers,
1281
+ _host_index=_host_index
1282
+ )
1283
+
1284
+ _response_types_map: Dict[str, Optional[str]] = {
1285
+ '200': "RegisteredModelInfo",
1286
+ }
1287
+ response_data = await self.api_client.call_api(
1288
+ *_param,
1289
+ _request_timeout=_request_timeout
1290
+ )
1291
+ await response_data.read()
1292
+ return self.api_client.response_deserialize(
1293
+ response_data=response_data,
1294
+ response_types_map=_response_types_map,
1295
+ )
1296
+
1297
+
1298
+ @validate_call
1299
+ async def update_registered_model_without_preload_content(
1300
+ self,
1301
+ full_name: Annotated[StrictStr, Field(description="Full name of the model.")],
1302
+ update_registered_model: Optional[UpdateRegisteredModel] = None,
1303
+ _request_timeout: Union[
1304
+ None,
1305
+ Annotated[StrictFloat, Field(gt=0)],
1306
+ Tuple[
1307
+ Annotated[StrictFloat, Field(gt=0)],
1308
+ Annotated[StrictFloat, Field(gt=0)]
1309
+ ]
1310
+ ] = None,
1311
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1312
+ _content_type: Optional[StrictStr] = None,
1313
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1314
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1315
+ ) -> RESTResponseType:
1316
+ """Update a registered model
1317
+
1318
+ Updates the specified registered model.
1319
+
1320
+ :param full_name: Full name of the model. (required)
1321
+ :type full_name: str
1322
+ :param update_registered_model:
1323
+ :type update_registered_model: UpdateRegisteredModel
1324
+ :param _request_timeout: timeout setting for this request. If one
1325
+ number provided, it will be total request
1326
+ timeout. It can also be a pair (tuple) of
1327
+ (connection, read) timeouts.
1328
+ :type _request_timeout: int, tuple(int, int), optional
1329
+ :param _request_auth: set to override the auth_settings for an a single
1330
+ request; this effectively ignores the
1331
+ authentication in the spec for a single request.
1332
+ :type _request_auth: dict, optional
1333
+ :param _content_type: force content-type for the request.
1334
+ :type _content_type: str, Optional
1335
+ :param _headers: set to override the headers for a single
1336
+ request; this effectively ignores the headers
1337
+ in the spec for a single request.
1338
+ :type _headers: dict, optional
1339
+ :param _host_index: set to override the host_index for a single
1340
+ request; this effectively ignores the host_index
1341
+ in the spec for a single request.
1342
+ :type _host_index: int, optional
1343
+ :return: Returns the result object.
1344
+ """ # noqa: E501
1345
+
1346
+ _param = self._update_registered_model_serialize(
1347
+ full_name=full_name,
1348
+ update_registered_model=update_registered_model,
1349
+ _request_auth=_request_auth,
1350
+ _content_type=_content_type,
1351
+ _headers=_headers,
1352
+ _host_index=_host_index
1353
+ )
1354
+
1355
+ _response_types_map: Dict[str, Optional[str]] = {
1356
+ '200': "RegisteredModelInfo",
1357
+ }
1358
+ response_data = await self.api_client.call_api(
1359
+ *_param,
1360
+ _request_timeout=_request_timeout
1361
+ )
1362
+ return response_data.response
1363
+
1364
+
1365
+ def _update_registered_model_serialize(
1366
+ self,
1367
+ full_name,
1368
+ update_registered_model,
1369
+ _request_auth,
1370
+ _content_type,
1371
+ _headers,
1372
+ _host_index,
1373
+ ) -> RequestSerialized:
1374
+
1375
+ _host = None
1376
+
1377
+ _collection_formats: Dict[str, str] = {
1378
+ }
1379
+
1380
+ _path_params: Dict[str, str] = {}
1381
+ _query_params: List[Tuple[str, str]] = []
1382
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1383
+ _form_params: List[Tuple[str, str]] = []
1384
+ _files: Dict[str, Union[str, bytes]] = {}
1385
+ _body_params: Optional[bytes] = None
1386
+
1387
+ # process the path parameters
1388
+ if full_name is not None:
1389
+ _path_params['full_name'] = full_name
1390
+ # process the query parameters
1391
+ # process the header parameters
1392
+ # process the form parameters
1393
+ # process the body parameter
1394
+ if update_registered_model is not None:
1395
+ _body_params = update_registered_model
1396
+
1397
+
1398
+ # set the HTTP header `Accept`
1399
+ _header_params['Accept'] = self.api_client.select_header_accept(
1400
+ [
1401
+ 'application/json'
1402
+ ]
1403
+ )
1404
+
1405
+ # set the HTTP header `Content-Type`
1406
+ if _content_type:
1407
+ _header_params['Content-Type'] = _content_type
1408
+ else:
1409
+ _default_content_type = (
1410
+ self.api_client.select_header_content_type(
1411
+ [
1412
+ 'application/json'
1413
+ ]
1414
+ )
1415
+ )
1416
+ if _default_content_type is not None:
1417
+ _header_params['Content-Type'] = _default_content_type
1418
+
1419
+ # authentication setting
1420
+ _auth_settings: List[str] = [
1421
+ ]
1422
+
1423
+ return self.api_client.param_serialize(
1424
+ method='PATCH',
1425
+ resource_path='/models/{full_name}',
1426
+ path_params=_path_params,
1427
+ query_params=_query_params,
1428
+ header_params=_header_params,
1429
+ body=_body_params,
1430
+ post_params=_form_params,
1431
+ files=_files,
1432
+ auth_settings=_auth_settings,
1433
+ collection_formats=_collection_formats,
1434
+ _host=_host,
1435
+ _request_auth=_request_auth
1436
+ )
1437
+
1438
+