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