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.
- unitycatalog/client/__init__.py +102 -0
- unitycatalog/client/api/__init__.py +13 -0
- unitycatalog/client/api/catalogs_api.py +1404 -0
- unitycatalog/client/api/functions_api.py +1135 -0
- unitycatalog/client/api/grants_api.py +630 -0
- unitycatalog/client/api/model_versions_api.py +1748 -0
- unitycatalog/client/api/registered_models_api.py +1438 -0
- unitycatalog/client/api/schemas_api.py +1421 -0
- unitycatalog/client/api/tables_api.py +1135 -0
- unitycatalog/client/api/temporary_credentials_api.py +1109 -0
- unitycatalog/client/api/volumes_api.py +1421 -0
- unitycatalog/client/api_client.py +773 -0
- unitycatalog/client/api_response.py +21 -0
- unitycatalog/client/configuration.py +432 -0
- unitycatalog/client/exceptions.py +199 -0
- unitycatalog/client/models/__init__.py +77 -0
- unitycatalog/client/models/aws_credentials.py +91 -0
- unitycatalog/client/models/azure_user_delegation_sas.py +87 -0
- unitycatalog/client/models/catalog_info.py +103 -0
- unitycatalog/client/models/column_info.py +108 -0
- unitycatalog/client/models/column_type_name.py +56 -0
- unitycatalog/client/models/create_catalog.py +91 -0
- unitycatalog/client/models/create_function.py +163 -0
- unitycatalog/client/models/create_function_request.py +91 -0
- unitycatalog/client/models/create_model_version.py +97 -0
- unitycatalog/client/models/create_registered_model.py +93 -0
- unitycatalog/client/models/create_schema.py +93 -0
- unitycatalog/client/models/create_table.py +113 -0
- unitycatalog/client/models/create_volume_request_content.py +99 -0
- unitycatalog/client/models/data_source_format.py +42 -0
- unitycatalog/client/models/dependency.py +97 -0
- unitycatalog/client/models/dependency_list.py +95 -0
- unitycatalog/client/models/finalize_model_version.py +89 -0
- unitycatalog/client/models/function_dependency.py +87 -0
- unitycatalog/client/models/function_info.py +189 -0
- unitycatalog/client/models/function_parameter_info.py +112 -0
- unitycatalog/client/models/function_parameter_infos.py +95 -0
- unitycatalog/client/models/function_parameter_mode.py +36 -0
- unitycatalog/client/models/function_parameter_type.py +37 -0
- unitycatalog/client/models/gcp_oauth_token.py +87 -0
- unitycatalog/client/models/generate_temporary_model_version_credential.py +96 -0
- unitycatalog/client/models/generate_temporary_path_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_table_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_volume_credential.py +90 -0
- unitycatalog/client/models/list_catalogs_response.py +97 -0
- unitycatalog/client/models/list_functions_response.py +97 -0
- unitycatalog/client/models/list_model_versions_response.py +97 -0
- unitycatalog/client/models/list_registered_models_response.py +97 -0
- unitycatalog/client/models/list_schemas_response.py +97 -0
- unitycatalog/client/models/list_tables_response.py +97 -0
- unitycatalog/client/models/list_volumes_response_content.py +97 -0
- unitycatalog/client/models/model_version_info.py +114 -0
- unitycatalog/client/models/model_version_operation.py +38 -0
- unitycatalog/client/models/model_version_status.py +39 -0
- unitycatalog/client/models/path_operation.py +39 -0
- unitycatalog/client/models/permissions_change.py +92 -0
- unitycatalog/client/models/permissions_list.py +95 -0
- unitycatalog/client/models/principal_type.py +37 -0
- unitycatalog/client/models/privilege.py +47 -0
- unitycatalog/client/models/privilege_assignment.py +90 -0
- unitycatalog/client/models/registered_model_info.py +109 -0
- unitycatalog/client/models/schema_info.py +107 -0
- unitycatalog/client/models/securable_type.py +42 -0
- unitycatalog/client/models/table_dependency.py +87 -0
- unitycatalog/client/models/table_info.py +125 -0
- unitycatalog/client/models/table_operation.py +38 -0
- unitycatalog/client/models/table_type.py +37 -0
- unitycatalog/client/models/temporary_credentials.py +105 -0
- unitycatalog/client/models/update_catalog.py +91 -0
- unitycatalog/client/models/update_model_version.py +87 -0
- unitycatalog/client/models/update_permissions.py +95 -0
- unitycatalog/client/models/update_registered_model.py +89 -0
- unitycatalog/client/models/update_schema.py +91 -0
- unitycatalog/client/models/update_volume_request_content.py +90 -0
- unitycatalog/client/models/volume_info.py +113 -0
- unitycatalog/client/models/volume_operation.py +38 -0
- unitycatalog/client/models/volume_type.py +37 -0
- unitycatalog/client/py.typed +0 -0
- unitycatalog/client/rest.py +215 -0
- unitycatalog_client-0.2.1.dist-info/METADATA +199 -0
- unitycatalog_client-0.2.1.dist-info/RECORD +82 -0
- unitycatalog_client-0.2.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Any, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from unitycatalog.client.models.create_function_request import CreateFunctionRequest
|
|
23
|
+
from unitycatalog.client.models.function_info import FunctionInfo
|
|
24
|
+
from unitycatalog.client.models.list_functions_response import ListFunctionsResponse
|
|
25
|
+
|
|
26
|
+
from unitycatalog.client.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from unitycatalog.client.api_response import ApiResponse
|
|
28
|
+
from unitycatalog.client.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class FunctionsApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
async def create_function(
|
|
46
|
+
self,
|
|
47
|
+
create_function_request: Optional[CreateFunctionRequest] = None,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> FunctionInfo:
|
|
61
|
+
"""Create a function. WARNING: This API is experimental and will change in future versions.
|
|
62
|
+
|
|
63
|
+
Creates a new function instance. WARNING: This API is experimental and will change in future versions.
|
|
64
|
+
|
|
65
|
+
:param create_function_request:
|
|
66
|
+
:type create_function_request: CreateFunctionRequest
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._create_function_serialize(
|
|
90
|
+
create_function_request=create_function_request,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "FunctionInfo",
|
|
99
|
+
}
|
|
100
|
+
response_data = await self.api_client.call_api(
|
|
101
|
+
*_param,
|
|
102
|
+
_request_timeout=_request_timeout
|
|
103
|
+
)
|
|
104
|
+
await response_data.read()
|
|
105
|
+
return self.api_client.response_deserialize(
|
|
106
|
+
response_data=response_data,
|
|
107
|
+
response_types_map=_response_types_map,
|
|
108
|
+
).data
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@validate_call
|
|
112
|
+
async def create_function_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
create_function_request: Optional[CreateFunctionRequest] = None,
|
|
115
|
+
_request_timeout: Union[
|
|
116
|
+
None,
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Tuple[
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
+
]
|
|
122
|
+
] = None,
|
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
+
) -> ApiResponse[FunctionInfo]:
|
|
128
|
+
"""Create a function. WARNING: This API is experimental and will change in future versions.
|
|
129
|
+
|
|
130
|
+
Creates a new function instance. WARNING: This API is experimental and will change in future versions.
|
|
131
|
+
|
|
132
|
+
:param create_function_request:
|
|
133
|
+
:type create_function_request: CreateFunctionRequest
|
|
134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
135
|
+
number provided, it will be total request
|
|
136
|
+
timeout. It can also be a pair (tuple) of
|
|
137
|
+
(connection, read) timeouts.
|
|
138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
140
|
+
request; this effectively ignores the
|
|
141
|
+
authentication in the spec for a single request.
|
|
142
|
+
:type _request_auth: dict, optional
|
|
143
|
+
:param _content_type: force content-type for the request.
|
|
144
|
+
:type _content_type: str, Optional
|
|
145
|
+
:param _headers: set to override the headers for a single
|
|
146
|
+
request; this effectively ignores the headers
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _headers: dict, optional
|
|
149
|
+
:param _host_index: set to override the host_index for a single
|
|
150
|
+
request; this effectively ignores the host_index
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _host_index: int, optional
|
|
153
|
+
:return: Returns the result object.
|
|
154
|
+
""" # noqa: E501
|
|
155
|
+
|
|
156
|
+
_param = self._create_function_serialize(
|
|
157
|
+
create_function_request=create_function_request,
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "FunctionInfo",
|
|
166
|
+
}
|
|
167
|
+
response_data = await self.api_client.call_api(
|
|
168
|
+
*_param,
|
|
169
|
+
_request_timeout=_request_timeout
|
|
170
|
+
)
|
|
171
|
+
await response_data.read()
|
|
172
|
+
return self.api_client.response_deserialize(
|
|
173
|
+
response_data=response_data,
|
|
174
|
+
response_types_map=_response_types_map,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@validate_call
|
|
179
|
+
async def create_function_without_preload_content(
|
|
180
|
+
self,
|
|
181
|
+
create_function_request: Optional[CreateFunctionRequest] = None,
|
|
182
|
+
_request_timeout: Union[
|
|
183
|
+
None,
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
+
Tuple[
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
188
|
+
]
|
|
189
|
+
] = None,
|
|
190
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_content_type: Optional[StrictStr] = None,
|
|
192
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
194
|
+
) -> RESTResponseType:
|
|
195
|
+
"""Create a function. WARNING: This API is experimental and will change in future versions.
|
|
196
|
+
|
|
197
|
+
Creates a new function instance. WARNING: This API is experimental and will change in future versions.
|
|
198
|
+
|
|
199
|
+
:param create_function_request:
|
|
200
|
+
:type create_function_request: CreateFunctionRequest
|
|
201
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
202
|
+
number provided, it will be total request
|
|
203
|
+
timeout. It can also be a pair (tuple) of
|
|
204
|
+
(connection, read) timeouts.
|
|
205
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
206
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
207
|
+
request; this effectively ignores the
|
|
208
|
+
authentication in the spec for a single request.
|
|
209
|
+
:type _request_auth: dict, optional
|
|
210
|
+
:param _content_type: force content-type for the request.
|
|
211
|
+
:type _content_type: str, Optional
|
|
212
|
+
:param _headers: set to override the headers for a single
|
|
213
|
+
request; this effectively ignores the headers
|
|
214
|
+
in the spec for a single request.
|
|
215
|
+
:type _headers: dict, optional
|
|
216
|
+
:param _host_index: set to override the host_index for a single
|
|
217
|
+
request; this effectively ignores the host_index
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _host_index: int, optional
|
|
220
|
+
:return: Returns the result object.
|
|
221
|
+
""" # noqa: E501
|
|
222
|
+
|
|
223
|
+
_param = self._create_function_serialize(
|
|
224
|
+
create_function_request=create_function_request,
|
|
225
|
+
_request_auth=_request_auth,
|
|
226
|
+
_content_type=_content_type,
|
|
227
|
+
_headers=_headers,
|
|
228
|
+
_host_index=_host_index
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
232
|
+
'200': "FunctionInfo",
|
|
233
|
+
}
|
|
234
|
+
response_data = await self.api_client.call_api(
|
|
235
|
+
*_param,
|
|
236
|
+
_request_timeout=_request_timeout
|
|
237
|
+
)
|
|
238
|
+
return response_data.response
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _create_function_serialize(
|
|
242
|
+
self,
|
|
243
|
+
create_function_request,
|
|
244
|
+
_request_auth,
|
|
245
|
+
_content_type,
|
|
246
|
+
_headers,
|
|
247
|
+
_host_index,
|
|
248
|
+
) -> RequestSerialized:
|
|
249
|
+
|
|
250
|
+
_host = None
|
|
251
|
+
|
|
252
|
+
_collection_formats: Dict[str, str] = {
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
_path_params: Dict[str, str] = {}
|
|
256
|
+
_query_params: List[Tuple[str, str]] = []
|
|
257
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
258
|
+
_form_params: List[Tuple[str, str]] = []
|
|
259
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
260
|
+
_body_params: Optional[bytes] = None
|
|
261
|
+
|
|
262
|
+
# process the path parameters
|
|
263
|
+
# process the query parameters
|
|
264
|
+
# process the header parameters
|
|
265
|
+
# process the form parameters
|
|
266
|
+
# process the body parameter
|
|
267
|
+
if create_function_request is not None:
|
|
268
|
+
_body_params = create_function_request
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# set the HTTP header `Accept`
|
|
272
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
273
|
+
[
|
|
274
|
+
'application/json'
|
|
275
|
+
]
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
# set the HTTP header `Content-Type`
|
|
279
|
+
if _content_type:
|
|
280
|
+
_header_params['Content-Type'] = _content_type
|
|
281
|
+
else:
|
|
282
|
+
_default_content_type = (
|
|
283
|
+
self.api_client.select_header_content_type(
|
|
284
|
+
[
|
|
285
|
+
'application/json'
|
|
286
|
+
]
|
|
287
|
+
)
|
|
288
|
+
)
|
|
289
|
+
if _default_content_type is not None:
|
|
290
|
+
_header_params['Content-Type'] = _default_content_type
|
|
291
|
+
|
|
292
|
+
# authentication setting
|
|
293
|
+
_auth_settings: List[str] = [
|
|
294
|
+
]
|
|
295
|
+
|
|
296
|
+
return self.api_client.param_serialize(
|
|
297
|
+
method='POST',
|
|
298
|
+
resource_path='/functions',
|
|
299
|
+
path_params=_path_params,
|
|
300
|
+
query_params=_query_params,
|
|
301
|
+
header_params=_header_params,
|
|
302
|
+
body=_body_params,
|
|
303
|
+
post_params=_form_params,
|
|
304
|
+
files=_files,
|
|
305
|
+
auth_settings=_auth_settings,
|
|
306
|
+
collection_formats=_collection_formats,
|
|
307
|
+
_host=_host,
|
|
308
|
+
_request_auth=_request_auth
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
@validate_call
|
|
315
|
+
async def delete_function(
|
|
316
|
+
self,
|
|
317
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
318
|
+
_request_timeout: Union[
|
|
319
|
+
None,
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
321
|
+
Tuple[
|
|
322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
324
|
+
]
|
|
325
|
+
] = None,
|
|
326
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
327
|
+
_content_type: Optional[StrictStr] = None,
|
|
328
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
330
|
+
) -> object:
|
|
331
|
+
"""Delete a function
|
|
332
|
+
|
|
333
|
+
Deletes the function that matches the supplied name.
|
|
334
|
+
|
|
335
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
336
|
+
:type name: str
|
|
337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
338
|
+
number provided, it will be total request
|
|
339
|
+
timeout. It can also be a pair (tuple) of
|
|
340
|
+
(connection, read) timeouts.
|
|
341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
343
|
+
request; this effectively ignores the
|
|
344
|
+
authentication in the spec for a single request.
|
|
345
|
+
:type _request_auth: dict, optional
|
|
346
|
+
:param _content_type: force content-type for the request.
|
|
347
|
+
:type _content_type: str, Optional
|
|
348
|
+
:param _headers: set to override the headers for a single
|
|
349
|
+
request; this effectively ignores the headers
|
|
350
|
+
in the spec for a single request.
|
|
351
|
+
:type _headers: dict, optional
|
|
352
|
+
:param _host_index: set to override the host_index for a single
|
|
353
|
+
request; this effectively ignores the host_index
|
|
354
|
+
in the spec for a single request.
|
|
355
|
+
:type _host_index: int, optional
|
|
356
|
+
:return: Returns the result object.
|
|
357
|
+
""" # noqa: E501
|
|
358
|
+
|
|
359
|
+
_param = self._delete_function_serialize(
|
|
360
|
+
name=name,
|
|
361
|
+
_request_auth=_request_auth,
|
|
362
|
+
_content_type=_content_type,
|
|
363
|
+
_headers=_headers,
|
|
364
|
+
_host_index=_host_index
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
368
|
+
'200': "object",
|
|
369
|
+
}
|
|
370
|
+
response_data = await self.api_client.call_api(
|
|
371
|
+
*_param,
|
|
372
|
+
_request_timeout=_request_timeout
|
|
373
|
+
)
|
|
374
|
+
await response_data.read()
|
|
375
|
+
return self.api_client.response_deserialize(
|
|
376
|
+
response_data=response_data,
|
|
377
|
+
response_types_map=_response_types_map,
|
|
378
|
+
).data
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
@validate_call
|
|
382
|
+
async def delete_function_with_http_info(
|
|
383
|
+
self,
|
|
384
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
385
|
+
_request_timeout: Union[
|
|
386
|
+
None,
|
|
387
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
388
|
+
Tuple[
|
|
389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
390
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
391
|
+
]
|
|
392
|
+
] = None,
|
|
393
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
394
|
+
_content_type: Optional[StrictStr] = None,
|
|
395
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
396
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
397
|
+
) -> ApiResponse[object]:
|
|
398
|
+
"""Delete a function
|
|
399
|
+
|
|
400
|
+
Deletes the function that matches the supplied name.
|
|
401
|
+
|
|
402
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
403
|
+
:type name: str
|
|
404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
405
|
+
number provided, it will be total request
|
|
406
|
+
timeout. It can also be a pair (tuple) of
|
|
407
|
+
(connection, read) timeouts.
|
|
408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
410
|
+
request; this effectively ignores the
|
|
411
|
+
authentication in the spec for a single request.
|
|
412
|
+
:type _request_auth: dict, optional
|
|
413
|
+
:param _content_type: force content-type for the request.
|
|
414
|
+
:type _content_type: str, Optional
|
|
415
|
+
:param _headers: set to override the headers for a single
|
|
416
|
+
request; this effectively ignores the headers
|
|
417
|
+
in the spec for a single request.
|
|
418
|
+
:type _headers: dict, optional
|
|
419
|
+
:param _host_index: set to override the host_index for a single
|
|
420
|
+
request; this effectively ignores the host_index
|
|
421
|
+
in the spec for a single request.
|
|
422
|
+
:type _host_index: int, optional
|
|
423
|
+
:return: Returns the result object.
|
|
424
|
+
""" # noqa: E501
|
|
425
|
+
|
|
426
|
+
_param = self._delete_function_serialize(
|
|
427
|
+
name=name,
|
|
428
|
+
_request_auth=_request_auth,
|
|
429
|
+
_content_type=_content_type,
|
|
430
|
+
_headers=_headers,
|
|
431
|
+
_host_index=_host_index
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
435
|
+
'200': "object",
|
|
436
|
+
}
|
|
437
|
+
response_data = await self.api_client.call_api(
|
|
438
|
+
*_param,
|
|
439
|
+
_request_timeout=_request_timeout
|
|
440
|
+
)
|
|
441
|
+
await response_data.read()
|
|
442
|
+
return self.api_client.response_deserialize(
|
|
443
|
+
response_data=response_data,
|
|
444
|
+
response_types_map=_response_types_map,
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
@validate_call
|
|
449
|
+
async def delete_function_without_preload_content(
|
|
450
|
+
self,
|
|
451
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
452
|
+
_request_timeout: Union[
|
|
453
|
+
None,
|
|
454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
455
|
+
Tuple[
|
|
456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
457
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
458
|
+
]
|
|
459
|
+
] = None,
|
|
460
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
461
|
+
_content_type: Optional[StrictStr] = None,
|
|
462
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
463
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
464
|
+
) -> RESTResponseType:
|
|
465
|
+
"""Delete a function
|
|
466
|
+
|
|
467
|
+
Deletes the function that matches the supplied name.
|
|
468
|
+
|
|
469
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
470
|
+
:type name: str
|
|
471
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
472
|
+
number provided, it will be total request
|
|
473
|
+
timeout. It can also be a pair (tuple) of
|
|
474
|
+
(connection, read) timeouts.
|
|
475
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
476
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
477
|
+
request; this effectively ignores the
|
|
478
|
+
authentication in the spec for a single request.
|
|
479
|
+
:type _request_auth: dict, optional
|
|
480
|
+
:param _content_type: force content-type for the request.
|
|
481
|
+
:type _content_type: str, Optional
|
|
482
|
+
:param _headers: set to override the headers for a single
|
|
483
|
+
request; this effectively ignores the headers
|
|
484
|
+
in the spec for a single request.
|
|
485
|
+
:type _headers: dict, optional
|
|
486
|
+
:param _host_index: set to override the host_index for a single
|
|
487
|
+
request; this effectively ignores the host_index
|
|
488
|
+
in the spec for a single request.
|
|
489
|
+
:type _host_index: int, optional
|
|
490
|
+
:return: Returns the result object.
|
|
491
|
+
""" # noqa: E501
|
|
492
|
+
|
|
493
|
+
_param = self._delete_function_serialize(
|
|
494
|
+
name=name,
|
|
495
|
+
_request_auth=_request_auth,
|
|
496
|
+
_content_type=_content_type,
|
|
497
|
+
_headers=_headers,
|
|
498
|
+
_host_index=_host_index
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
502
|
+
'200': "object",
|
|
503
|
+
}
|
|
504
|
+
response_data = await self.api_client.call_api(
|
|
505
|
+
*_param,
|
|
506
|
+
_request_timeout=_request_timeout
|
|
507
|
+
)
|
|
508
|
+
return response_data.response
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
def _delete_function_serialize(
|
|
512
|
+
self,
|
|
513
|
+
name,
|
|
514
|
+
_request_auth,
|
|
515
|
+
_content_type,
|
|
516
|
+
_headers,
|
|
517
|
+
_host_index,
|
|
518
|
+
) -> RequestSerialized:
|
|
519
|
+
|
|
520
|
+
_host = None
|
|
521
|
+
|
|
522
|
+
_collection_formats: Dict[str, str] = {
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
_path_params: Dict[str, str] = {}
|
|
526
|
+
_query_params: List[Tuple[str, str]] = []
|
|
527
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
528
|
+
_form_params: List[Tuple[str, str]] = []
|
|
529
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
530
|
+
_body_params: Optional[bytes] = None
|
|
531
|
+
|
|
532
|
+
# process the path parameters
|
|
533
|
+
if name is not None:
|
|
534
|
+
_path_params['name'] = name
|
|
535
|
+
# process the query parameters
|
|
536
|
+
# process the header parameters
|
|
537
|
+
# process the form parameters
|
|
538
|
+
# process the body parameter
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
# set the HTTP header `Accept`
|
|
542
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
543
|
+
[
|
|
544
|
+
'application/json'
|
|
545
|
+
]
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
# authentication setting
|
|
550
|
+
_auth_settings: List[str] = [
|
|
551
|
+
]
|
|
552
|
+
|
|
553
|
+
return self.api_client.param_serialize(
|
|
554
|
+
method='DELETE',
|
|
555
|
+
resource_path='/functions/{name}',
|
|
556
|
+
path_params=_path_params,
|
|
557
|
+
query_params=_query_params,
|
|
558
|
+
header_params=_header_params,
|
|
559
|
+
body=_body_params,
|
|
560
|
+
post_params=_form_params,
|
|
561
|
+
files=_files,
|
|
562
|
+
auth_settings=_auth_settings,
|
|
563
|
+
collection_formats=_collection_formats,
|
|
564
|
+
_host=_host,
|
|
565
|
+
_request_auth=_request_auth
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
@validate_call
|
|
572
|
+
async def get_function(
|
|
573
|
+
self,
|
|
574
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
575
|
+
_request_timeout: Union[
|
|
576
|
+
None,
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
578
|
+
Tuple[
|
|
579
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
580
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
581
|
+
]
|
|
582
|
+
] = None,
|
|
583
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
584
|
+
_content_type: Optional[StrictStr] = None,
|
|
585
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
586
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
587
|
+
) -> FunctionInfo:
|
|
588
|
+
"""Get a function
|
|
589
|
+
|
|
590
|
+
Gets a function from within a parent catalog and schema.
|
|
591
|
+
|
|
592
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
593
|
+
:type name: str
|
|
594
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
595
|
+
number provided, it will be total request
|
|
596
|
+
timeout. It can also be a pair (tuple) of
|
|
597
|
+
(connection, read) timeouts.
|
|
598
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
599
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
600
|
+
request; this effectively ignores the
|
|
601
|
+
authentication in the spec for a single request.
|
|
602
|
+
:type _request_auth: dict, optional
|
|
603
|
+
:param _content_type: force content-type for the request.
|
|
604
|
+
:type _content_type: str, Optional
|
|
605
|
+
:param _headers: set to override the headers for a single
|
|
606
|
+
request; this effectively ignores the headers
|
|
607
|
+
in the spec for a single request.
|
|
608
|
+
:type _headers: dict, optional
|
|
609
|
+
:param _host_index: set to override the host_index for a single
|
|
610
|
+
request; this effectively ignores the host_index
|
|
611
|
+
in the spec for a single request.
|
|
612
|
+
:type _host_index: int, optional
|
|
613
|
+
:return: Returns the result object.
|
|
614
|
+
""" # noqa: E501
|
|
615
|
+
|
|
616
|
+
_param = self._get_function_serialize(
|
|
617
|
+
name=name,
|
|
618
|
+
_request_auth=_request_auth,
|
|
619
|
+
_content_type=_content_type,
|
|
620
|
+
_headers=_headers,
|
|
621
|
+
_host_index=_host_index
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
625
|
+
'200': "FunctionInfo",
|
|
626
|
+
}
|
|
627
|
+
response_data = await self.api_client.call_api(
|
|
628
|
+
*_param,
|
|
629
|
+
_request_timeout=_request_timeout
|
|
630
|
+
)
|
|
631
|
+
await response_data.read()
|
|
632
|
+
return self.api_client.response_deserialize(
|
|
633
|
+
response_data=response_data,
|
|
634
|
+
response_types_map=_response_types_map,
|
|
635
|
+
).data
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
@validate_call
|
|
639
|
+
async def get_function_with_http_info(
|
|
640
|
+
self,
|
|
641
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
642
|
+
_request_timeout: Union[
|
|
643
|
+
None,
|
|
644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
645
|
+
Tuple[
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
647
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
648
|
+
]
|
|
649
|
+
] = None,
|
|
650
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
651
|
+
_content_type: Optional[StrictStr] = None,
|
|
652
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
653
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
654
|
+
) -> ApiResponse[FunctionInfo]:
|
|
655
|
+
"""Get a function
|
|
656
|
+
|
|
657
|
+
Gets a function from within a parent catalog and schema.
|
|
658
|
+
|
|
659
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
660
|
+
:type name: str
|
|
661
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
662
|
+
number provided, it will be total request
|
|
663
|
+
timeout. It can also be a pair (tuple) of
|
|
664
|
+
(connection, read) timeouts.
|
|
665
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
666
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
667
|
+
request; this effectively ignores the
|
|
668
|
+
authentication in the spec for a single request.
|
|
669
|
+
:type _request_auth: dict, optional
|
|
670
|
+
:param _content_type: force content-type for the request.
|
|
671
|
+
:type _content_type: str, Optional
|
|
672
|
+
:param _headers: set to override the headers for a single
|
|
673
|
+
request; this effectively ignores the headers
|
|
674
|
+
in the spec for a single request.
|
|
675
|
+
:type _headers: dict, optional
|
|
676
|
+
:param _host_index: set to override the host_index for a single
|
|
677
|
+
request; this effectively ignores the host_index
|
|
678
|
+
in the spec for a single request.
|
|
679
|
+
:type _host_index: int, optional
|
|
680
|
+
:return: Returns the result object.
|
|
681
|
+
""" # noqa: E501
|
|
682
|
+
|
|
683
|
+
_param = self._get_function_serialize(
|
|
684
|
+
name=name,
|
|
685
|
+
_request_auth=_request_auth,
|
|
686
|
+
_content_type=_content_type,
|
|
687
|
+
_headers=_headers,
|
|
688
|
+
_host_index=_host_index
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
692
|
+
'200': "FunctionInfo",
|
|
693
|
+
}
|
|
694
|
+
response_data = await self.api_client.call_api(
|
|
695
|
+
*_param,
|
|
696
|
+
_request_timeout=_request_timeout
|
|
697
|
+
)
|
|
698
|
+
await response_data.read()
|
|
699
|
+
return self.api_client.response_deserialize(
|
|
700
|
+
response_data=response_data,
|
|
701
|
+
response_types_map=_response_types_map,
|
|
702
|
+
)
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
@validate_call
|
|
706
|
+
async def get_function_without_preload_content(
|
|
707
|
+
self,
|
|
708
|
+
name: Annotated[StrictStr, Field(description="The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__).")],
|
|
709
|
+
_request_timeout: Union[
|
|
710
|
+
None,
|
|
711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
712
|
+
Tuple[
|
|
713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
714
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
715
|
+
]
|
|
716
|
+
] = None,
|
|
717
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
718
|
+
_content_type: Optional[StrictStr] = None,
|
|
719
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
721
|
+
) -> RESTResponseType:
|
|
722
|
+
"""Get a function
|
|
723
|
+
|
|
724
|
+
Gets a function from within a parent catalog and schema.
|
|
725
|
+
|
|
726
|
+
:param name: The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). (required)
|
|
727
|
+
:type name: str
|
|
728
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
729
|
+
number provided, it will be total request
|
|
730
|
+
timeout. It can also be a pair (tuple) of
|
|
731
|
+
(connection, read) timeouts.
|
|
732
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
733
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
734
|
+
request; this effectively ignores the
|
|
735
|
+
authentication in the spec for a single request.
|
|
736
|
+
:type _request_auth: dict, optional
|
|
737
|
+
:param _content_type: force content-type for the request.
|
|
738
|
+
:type _content_type: str, Optional
|
|
739
|
+
:param _headers: set to override the headers for a single
|
|
740
|
+
request; this effectively ignores the headers
|
|
741
|
+
in the spec for a single request.
|
|
742
|
+
:type _headers: dict, optional
|
|
743
|
+
:param _host_index: set to override the host_index for a single
|
|
744
|
+
request; this effectively ignores the host_index
|
|
745
|
+
in the spec for a single request.
|
|
746
|
+
:type _host_index: int, optional
|
|
747
|
+
:return: Returns the result object.
|
|
748
|
+
""" # noqa: E501
|
|
749
|
+
|
|
750
|
+
_param = self._get_function_serialize(
|
|
751
|
+
name=name,
|
|
752
|
+
_request_auth=_request_auth,
|
|
753
|
+
_content_type=_content_type,
|
|
754
|
+
_headers=_headers,
|
|
755
|
+
_host_index=_host_index
|
|
756
|
+
)
|
|
757
|
+
|
|
758
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
759
|
+
'200': "FunctionInfo",
|
|
760
|
+
}
|
|
761
|
+
response_data = await self.api_client.call_api(
|
|
762
|
+
*_param,
|
|
763
|
+
_request_timeout=_request_timeout
|
|
764
|
+
)
|
|
765
|
+
return response_data.response
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
def _get_function_serialize(
|
|
769
|
+
self,
|
|
770
|
+
name,
|
|
771
|
+
_request_auth,
|
|
772
|
+
_content_type,
|
|
773
|
+
_headers,
|
|
774
|
+
_host_index,
|
|
775
|
+
) -> RequestSerialized:
|
|
776
|
+
|
|
777
|
+
_host = None
|
|
778
|
+
|
|
779
|
+
_collection_formats: Dict[str, str] = {
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
_path_params: Dict[str, str] = {}
|
|
783
|
+
_query_params: List[Tuple[str, str]] = []
|
|
784
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
785
|
+
_form_params: List[Tuple[str, str]] = []
|
|
786
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
787
|
+
_body_params: Optional[bytes] = None
|
|
788
|
+
|
|
789
|
+
# process the path parameters
|
|
790
|
+
if name is not None:
|
|
791
|
+
_path_params['name'] = name
|
|
792
|
+
# process the query parameters
|
|
793
|
+
# process the header parameters
|
|
794
|
+
# process the form parameters
|
|
795
|
+
# process the body parameter
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
# set the HTTP header `Accept`
|
|
799
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
800
|
+
[
|
|
801
|
+
'application/json'
|
|
802
|
+
]
|
|
803
|
+
)
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
# authentication setting
|
|
807
|
+
_auth_settings: List[str] = [
|
|
808
|
+
]
|
|
809
|
+
|
|
810
|
+
return self.api_client.param_serialize(
|
|
811
|
+
method='GET',
|
|
812
|
+
resource_path='/functions/{name}',
|
|
813
|
+
path_params=_path_params,
|
|
814
|
+
query_params=_query_params,
|
|
815
|
+
header_params=_header_params,
|
|
816
|
+
body=_body_params,
|
|
817
|
+
post_params=_form_params,
|
|
818
|
+
files=_files,
|
|
819
|
+
auth_settings=_auth_settings,
|
|
820
|
+
collection_formats=_collection_formats,
|
|
821
|
+
_host=_host,
|
|
822
|
+
_request_auth=_request_auth
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
@validate_call
|
|
829
|
+
async def list_functions(
|
|
830
|
+
self,
|
|
831
|
+
catalog_name: Annotated[StrictStr, Field(description="Name of parent catalog for functions of interest.")],
|
|
832
|
+
schema_name: Annotated[StrictStr, Field(description="Parent schema of functions.")],
|
|
833
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of functions 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,
|
|
834
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query.")] = None,
|
|
835
|
+
_request_timeout: Union[
|
|
836
|
+
None,
|
|
837
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
838
|
+
Tuple[
|
|
839
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
840
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
841
|
+
]
|
|
842
|
+
] = None,
|
|
843
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
844
|
+
_content_type: Optional[StrictStr] = None,
|
|
845
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
846
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
847
|
+
) -> ListFunctionsResponse:
|
|
848
|
+
"""List functions
|
|
849
|
+
|
|
850
|
+
List functions within the specified parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
851
|
+
|
|
852
|
+
:param catalog_name: Name of parent catalog for functions of interest. (required)
|
|
853
|
+
:type catalog_name: str
|
|
854
|
+
:param schema_name: Parent schema of functions. (required)
|
|
855
|
+
:type schema_name: str
|
|
856
|
+
:param max_results: Maximum number of functions 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;
|
|
857
|
+
:type max_results: int
|
|
858
|
+
:param page_token: Opaque pagination token to go to next page based on previous query.
|
|
859
|
+
:type page_token: str
|
|
860
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
861
|
+
number provided, it will be total request
|
|
862
|
+
timeout. It can also be a pair (tuple) of
|
|
863
|
+
(connection, read) timeouts.
|
|
864
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
865
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
866
|
+
request; this effectively ignores the
|
|
867
|
+
authentication in the spec for a single request.
|
|
868
|
+
:type _request_auth: dict, optional
|
|
869
|
+
:param _content_type: force content-type for the request.
|
|
870
|
+
:type _content_type: str, Optional
|
|
871
|
+
:param _headers: set to override the headers for a single
|
|
872
|
+
request; this effectively ignores the headers
|
|
873
|
+
in the spec for a single request.
|
|
874
|
+
:type _headers: dict, optional
|
|
875
|
+
:param _host_index: set to override the host_index for a single
|
|
876
|
+
request; this effectively ignores the host_index
|
|
877
|
+
in the spec for a single request.
|
|
878
|
+
:type _host_index: int, optional
|
|
879
|
+
:return: Returns the result object.
|
|
880
|
+
""" # noqa: E501
|
|
881
|
+
|
|
882
|
+
_param = self._list_functions_serialize(
|
|
883
|
+
catalog_name=catalog_name,
|
|
884
|
+
schema_name=schema_name,
|
|
885
|
+
max_results=max_results,
|
|
886
|
+
page_token=page_token,
|
|
887
|
+
_request_auth=_request_auth,
|
|
888
|
+
_content_type=_content_type,
|
|
889
|
+
_headers=_headers,
|
|
890
|
+
_host_index=_host_index
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
894
|
+
'200': "ListFunctionsResponse",
|
|
895
|
+
}
|
|
896
|
+
response_data = await self.api_client.call_api(
|
|
897
|
+
*_param,
|
|
898
|
+
_request_timeout=_request_timeout
|
|
899
|
+
)
|
|
900
|
+
await response_data.read()
|
|
901
|
+
return self.api_client.response_deserialize(
|
|
902
|
+
response_data=response_data,
|
|
903
|
+
response_types_map=_response_types_map,
|
|
904
|
+
).data
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
@validate_call
|
|
908
|
+
async def list_functions_with_http_info(
|
|
909
|
+
self,
|
|
910
|
+
catalog_name: Annotated[StrictStr, Field(description="Name of parent catalog for functions of interest.")],
|
|
911
|
+
schema_name: Annotated[StrictStr, Field(description="Parent schema of functions.")],
|
|
912
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of functions 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,
|
|
913
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query.")] = None,
|
|
914
|
+
_request_timeout: Union[
|
|
915
|
+
None,
|
|
916
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
917
|
+
Tuple[
|
|
918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
919
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
920
|
+
]
|
|
921
|
+
] = None,
|
|
922
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
923
|
+
_content_type: Optional[StrictStr] = None,
|
|
924
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
925
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
926
|
+
) -> ApiResponse[ListFunctionsResponse]:
|
|
927
|
+
"""List functions
|
|
928
|
+
|
|
929
|
+
List functions within the specified parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
930
|
+
|
|
931
|
+
:param catalog_name: Name of parent catalog for functions of interest. (required)
|
|
932
|
+
:type catalog_name: str
|
|
933
|
+
:param schema_name: Parent schema of functions. (required)
|
|
934
|
+
:type schema_name: str
|
|
935
|
+
:param max_results: Maximum number of functions 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;
|
|
936
|
+
:type max_results: int
|
|
937
|
+
:param page_token: Opaque pagination token to go to next page based on previous query.
|
|
938
|
+
:type page_token: str
|
|
939
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
940
|
+
number provided, it will be total request
|
|
941
|
+
timeout. It can also be a pair (tuple) of
|
|
942
|
+
(connection, read) timeouts.
|
|
943
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
944
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
945
|
+
request; this effectively ignores the
|
|
946
|
+
authentication in the spec for a single request.
|
|
947
|
+
:type _request_auth: dict, optional
|
|
948
|
+
:param _content_type: force content-type for the request.
|
|
949
|
+
:type _content_type: str, Optional
|
|
950
|
+
:param _headers: set to override the headers for a single
|
|
951
|
+
request; this effectively ignores the headers
|
|
952
|
+
in the spec for a single request.
|
|
953
|
+
:type _headers: dict, optional
|
|
954
|
+
:param _host_index: set to override the host_index for a single
|
|
955
|
+
request; this effectively ignores the host_index
|
|
956
|
+
in the spec for a single request.
|
|
957
|
+
:type _host_index: int, optional
|
|
958
|
+
:return: Returns the result object.
|
|
959
|
+
""" # noqa: E501
|
|
960
|
+
|
|
961
|
+
_param = self._list_functions_serialize(
|
|
962
|
+
catalog_name=catalog_name,
|
|
963
|
+
schema_name=schema_name,
|
|
964
|
+
max_results=max_results,
|
|
965
|
+
page_token=page_token,
|
|
966
|
+
_request_auth=_request_auth,
|
|
967
|
+
_content_type=_content_type,
|
|
968
|
+
_headers=_headers,
|
|
969
|
+
_host_index=_host_index
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
973
|
+
'200': "ListFunctionsResponse",
|
|
974
|
+
}
|
|
975
|
+
response_data = await self.api_client.call_api(
|
|
976
|
+
*_param,
|
|
977
|
+
_request_timeout=_request_timeout
|
|
978
|
+
)
|
|
979
|
+
await response_data.read()
|
|
980
|
+
return self.api_client.response_deserialize(
|
|
981
|
+
response_data=response_data,
|
|
982
|
+
response_types_map=_response_types_map,
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
@validate_call
|
|
987
|
+
async def list_functions_without_preload_content(
|
|
988
|
+
self,
|
|
989
|
+
catalog_name: Annotated[StrictStr, Field(description="Name of parent catalog for functions of interest.")],
|
|
990
|
+
schema_name: Annotated[StrictStr, Field(description="Parent schema of functions.")],
|
|
991
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Maximum number of functions 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,
|
|
992
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque pagination token to go to next page based on previous query.")] = None,
|
|
993
|
+
_request_timeout: Union[
|
|
994
|
+
None,
|
|
995
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
996
|
+
Tuple[
|
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
998
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
999
|
+
]
|
|
1000
|
+
] = None,
|
|
1001
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1002
|
+
_content_type: Optional[StrictStr] = None,
|
|
1003
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1005
|
+
) -> RESTResponseType:
|
|
1006
|
+
"""List functions
|
|
1007
|
+
|
|
1008
|
+
List functions within the specified parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
1009
|
+
|
|
1010
|
+
:param catalog_name: Name of parent catalog for functions of interest. (required)
|
|
1011
|
+
:type catalog_name: str
|
|
1012
|
+
:param schema_name: Parent schema of functions. (required)
|
|
1013
|
+
:type schema_name: str
|
|
1014
|
+
:param max_results: Maximum number of functions 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;
|
|
1015
|
+
:type max_results: int
|
|
1016
|
+
:param page_token: Opaque pagination token to go to next page based on previous query.
|
|
1017
|
+
:type page_token: str
|
|
1018
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1019
|
+
number provided, it will be total request
|
|
1020
|
+
timeout. It can also be a pair (tuple) of
|
|
1021
|
+
(connection, read) timeouts.
|
|
1022
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1023
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1024
|
+
request; this effectively ignores the
|
|
1025
|
+
authentication in the spec for a single request.
|
|
1026
|
+
:type _request_auth: dict, optional
|
|
1027
|
+
:param _content_type: force content-type for the request.
|
|
1028
|
+
:type _content_type: str, Optional
|
|
1029
|
+
:param _headers: set to override the headers for a single
|
|
1030
|
+
request; this effectively ignores the headers
|
|
1031
|
+
in the spec for a single request.
|
|
1032
|
+
:type _headers: dict, optional
|
|
1033
|
+
:param _host_index: set to override the host_index for a single
|
|
1034
|
+
request; this effectively ignores the host_index
|
|
1035
|
+
in the spec for a single request.
|
|
1036
|
+
:type _host_index: int, optional
|
|
1037
|
+
:return: Returns the result object.
|
|
1038
|
+
""" # noqa: E501
|
|
1039
|
+
|
|
1040
|
+
_param = self._list_functions_serialize(
|
|
1041
|
+
catalog_name=catalog_name,
|
|
1042
|
+
schema_name=schema_name,
|
|
1043
|
+
max_results=max_results,
|
|
1044
|
+
page_token=page_token,
|
|
1045
|
+
_request_auth=_request_auth,
|
|
1046
|
+
_content_type=_content_type,
|
|
1047
|
+
_headers=_headers,
|
|
1048
|
+
_host_index=_host_index
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1052
|
+
'200': "ListFunctionsResponse",
|
|
1053
|
+
}
|
|
1054
|
+
response_data = await self.api_client.call_api(
|
|
1055
|
+
*_param,
|
|
1056
|
+
_request_timeout=_request_timeout
|
|
1057
|
+
)
|
|
1058
|
+
return response_data.response
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
def _list_functions_serialize(
|
|
1062
|
+
self,
|
|
1063
|
+
catalog_name,
|
|
1064
|
+
schema_name,
|
|
1065
|
+
max_results,
|
|
1066
|
+
page_token,
|
|
1067
|
+
_request_auth,
|
|
1068
|
+
_content_type,
|
|
1069
|
+
_headers,
|
|
1070
|
+
_host_index,
|
|
1071
|
+
) -> RequestSerialized:
|
|
1072
|
+
|
|
1073
|
+
_host = None
|
|
1074
|
+
|
|
1075
|
+
_collection_formats: Dict[str, str] = {
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
_path_params: Dict[str, str] = {}
|
|
1079
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1080
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1081
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1082
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1083
|
+
_body_params: Optional[bytes] = None
|
|
1084
|
+
|
|
1085
|
+
# process the path parameters
|
|
1086
|
+
# process the query parameters
|
|
1087
|
+
if catalog_name is not None:
|
|
1088
|
+
|
|
1089
|
+
_query_params.append(('catalog_name', catalog_name))
|
|
1090
|
+
|
|
1091
|
+
if schema_name is not None:
|
|
1092
|
+
|
|
1093
|
+
_query_params.append(('schema_name', schema_name))
|
|
1094
|
+
|
|
1095
|
+
if max_results is not None:
|
|
1096
|
+
|
|
1097
|
+
_query_params.append(('max_results', max_results))
|
|
1098
|
+
|
|
1099
|
+
if page_token is not None:
|
|
1100
|
+
|
|
1101
|
+
_query_params.append(('page_token', page_token))
|
|
1102
|
+
|
|
1103
|
+
# process the header parameters
|
|
1104
|
+
# process the form parameters
|
|
1105
|
+
# process the body parameter
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
# set the HTTP header `Accept`
|
|
1109
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1110
|
+
[
|
|
1111
|
+
'application/json'
|
|
1112
|
+
]
|
|
1113
|
+
)
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
# authentication setting
|
|
1117
|
+
_auth_settings: List[str] = [
|
|
1118
|
+
]
|
|
1119
|
+
|
|
1120
|
+
return self.api_client.param_serialize(
|
|
1121
|
+
method='GET',
|
|
1122
|
+
resource_path='/functions',
|
|
1123
|
+
path_params=_path_params,
|
|
1124
|
+
query_params=_query_params,
|
|
1125
|
+
header_params=_header_params,
|
|
1126
|
+
body=_body_params,
|
|
1127
|
+
post_params=_form_params,
|
|
1128
|
+
files=_files,
|
|
1129
|
+
auth_settings=_auth_settings,
|
|
1130
|
+
collection_formats=_collection_formats,
|
|
1131
|
+
_host=_host,
|
|
1132
|
+
_request_auth=_request_auth
|
|
1133
|
+
)
|
|
1134
|
+
|
|
1135
|
+
|