hotdata 0.0.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 (142) hide show
  1. hotdata/__init__.py +300 -0
  2. hotdata/api/__init__.py +20 -0
  3. hotdata/api/connection_types_api.py +549 -0
  4. hotdata/api/connections_api.py +2213 -0
  5. hotdata/api/datasets_api.py +1711 -0
  6. hotdata/api/embedding_providers_api.py +1380 -0
  7. hotdata/api/indexes_api.py +977 -0
  8. hotdata/api/information_schema_api.py +390 -0
  9. hotdata/api/jobs_api.py +619 -0
  10. hotdata/api/query_api.py +320 -0
  11. hotdata/api/query_runs_api.py +615 -0
  12. hotdata/api/refresh_api.py +317 -0
  13. hotdata/api/results_api.py +581 -0
  14. hotdata/api/saved_queries_api.py +2003 -0
  15. hotdata/api/secrets_api.py +1380 -0
  16. hotdata/api/uploads_api.py +595 -0
  17. hotdata/api/workspace_context_api.py +828 -0
  18. hotdata/api/workspaces_api.py +602 -0
  19. hotdata/api_client.py +806 -0
  20. hotdata/api_response.py +21 -0
  21. hotdata/configuration.py +620 -0
  22. hotdata/exceptions.py +219 -0
  23. hotdata/models/__init__.py +125 -0
  24. hotdata/models/api_error_detail.py +90 -0
  25. hotdata/models/api_error_response.py +92 -0
  26. hotdata/models/async_query_response.py +99 -0
  27. hotdata/models/boolean_profile_detail.py +91 -0
  28. hotdata/models/categorical_profile_detail.py +96 -0
  29. hotdata/models/category_value_info.py +96 -0
  30. hotdata/models/column_definition.py +140 -0
  31. hotdata/models/column_info.py +92 -0
  32. hotdata/models/column_profile_detail.py +180 -0
  33. hotdata/models/column_profile_detail_one_of.py +105 -0
  34. hotdata/models/column_profile_detail_one_of1.py +102 -0
  35. hotdata/models/column_profile_detail_one_of2.py +101 -0
  36. hotdata/models/column_profile_detail_one_of3.py +99 -0
  37. hotdata/models/column_profile_detail_one_of4.py +100 -0
  38. hotdata/models/column_profile_info.py +108 -0
  39. hotdata/models/column_type_spec.py +117 -0
  40. hotdata/models/connection_health_response.py +100 -0
  41. hotdata/models/connection_info.py +92 -0
  42. hotdata/models/connection_refresh_result.py +117 -0
  43. hotdata/models/connection_schema_error.py +90 -0
  44. hotdata/models/connection_type_detail.py +104 -0
  45. hotdata/models/connection_type_summary.py +90 -0
  46. hotdata/models/create_connection_request.py +108 -0
  47. hotdata/models/create_connection_response.py +105 -0
  48. hotdata/models/create_dataset_request.py +101 -0
  49. hotdata/models/create_dataset_response.py +99 -0
  50. hotdata/models/create_embedding_provider_request.py +111 -0
  51. hotdata/models/create_embedding_provider_response.py +102 -0
  52. hotdata/models/create_index_request.py +130 -0
  53. hotdata/models/create_saved_query_request.py +104 -0
  54. hotdata/models/create_secret_request.py +90 -0
  55. hotdata/models/create_secret_response.py +93 -0
  56. hotdata/models/create_workspace201_response.py +93 -0
  57. hotdata/models/create_workspace_request.py +90 -0
  58. hotdata/models/create_workspace_response.py +94 -0
  59. hotdata/models/dataset_source.py +180 -0
  60. hotdata/models/dataset_source_one_of.py +109 -0
  61. hotdata/models/dataset_source_one_of1.py +91 -0
  62. hotdata/models/dataset_summary.py +108 -0
  63. hotdata/models/dataset_version_summary.py +95 -0
  64. hotdata/models/discovery_status.py +39 -0
  65. hotdata/models/embedding_provider_response.py +108 -0
  66. hotdata/models/error.py +88 -0
  67. hotdata/models/execute_saved_query_request.py +93 -0
  68. hotdata/models/get_connection_response.py +97 -0
  69. hotdata/models/get_dataset_response.py +120 -0
  70. hotdata/models/get_result_response.py +126 -0
  71. hotdata/models/get_secret_response.py +93 -0
  72. hotdata/models/get_workspace_context_response.py +92 -0
  73. hotdata/models/index_info_response.py +107 -0
  74. hotdata/models/index_status.py +38 -0
  75. hotdata/models/information_schema_response.py +110 -0
  76. hotdata/models/inline_data.py +92 -0
  77. hotdata/models/inline_dataset_source.py +92 -0
  78. hotdata/models/job_result.py +152 -0
  79. hotdata/models/job_status.py +41 -0
  80. hotdata/models/job_status_response.py +124 -0
  81. hotdata/models/job_type.py +40 -0
  82. hotdata/models/list_connection_types_response.py +96 -0
  83. hotdata/models/list_connections_response.py +96 -0
  84. hotdata/models/list_dataset_versions_response.py +107 -0
  85. hotdata/models/list_datasets_response.py +105 -0
  86. hotdata/models/list_embedding_providers_response.py +96 -0
  87. hotdata/models/list_indexes_response.py +96 -0
  88. hotdata/models/list_jobs_response.py +96 -0
  89. hotdata/models/list_query_runs_response.py +110 -0
  90. hotdata/models/list_results_response.py +105 -0
  91. hotdata/models/list_saved_queries_response.py +105 -0
  92. hotdata/models/list_saved_query_versions_response.py +107 -0
  93. hotdata/models/list_secrets_response.py +96 -0
  94. hotdata/models/list_uploads_response.py +96 -0
  95. hotdata/models/list_workspace_contexts_response.py +96 -0
  96. hotdata/models/list_workspaces200_response.py +97 -0
  97. hotdata/models/list_workspaces_response.py +98 -0
  98. hotdata/models/numeric_profile_detail.py +92 -0
  99. hotdata/models/query_request.py +98 -0
  100. hotdata/models/query_response.py +113 -0
  101. hotdata/models/query_run_info.py +176 -0
  102. hotdata/models/refresh_dataset_response.py +95 -0
  103. hotdata/models/refresh_request.py +120 -0
  104. hotdata/models/refresh_response.py +180 -0
  105. hotdata/models/refresh_warning.py +102 -0
  106. hotdata/models/result_info.py +100 -0
  107. hotdata/models/saved_query_dataset_source.py +95 -0
  108. hotdata/models/saved_query_detail.py +168 -0
  109. hotdata/models/saved_query_summary.py +101 -0
  110. hotdata/models/saved_query_version_info.py +158 -0
  111. hotdata/models/schema_refresh_result.py +107 -0
  112. hotdata/models/secret_metadata_response.py +93 -0
  113. hotdata/models/sql_query_dataset_source.py +102 -0
  114. hotdata/models/submit_job_response.py +93 -0
  115. hotdata/models/table_info.py +116 -0
  116. hotdata/models/table_profile_response.py +112 -0
  117. hotdata/models/table_refresh_error.py +92 -0
  118. hotdata/models/table_refresh_result.py +107 -0
  119. hotdata/models/temporal_profile_detail.py +90 -0
  120. hotdata/models/text_profile_detail.py +93 -0
  121. hotdata/models/update_dataset_request.py +107 -0
  122. hotdata/models/update_dataset_response.py +104 -0
  123. hotdata/models/update_embedding_provider_request.py +114 -0
  124. hotdata/models/update_embedding_provider_response.py +93 -0
  125. hotdata/models/update_saved_query_request.py +128 -0
  126. hotdata/models/update_secret_request.py +88 -0
  127. hotdata/models/update_secret_response.py +91 -0
  128. hotdata/models/upload_dataset_source.py +97 -0
  129. hotdata/models/upload_info.py +102 -0
  130. hotdata/models/upload_response.py +102 -0
  131. hotdata/models/upsert_workspace_context_request.py +90 -0
  132. hotdata/models/upsert_workspace_context_response.py +92 -0
  133. hotdata/models/url_dataset_source.py +97 -0
  134. hotdata/models/workspace_context_entry.py +93 -0
  135. hotdata/models/workspace_detail.py +94 -0
  136. hotdata/models/workspace_list_item.py +98 -0
  137. hotdata/py.typed +0 -0
  138. hotdata/rest.py +264 -0
  139. hotdata-0.0.1.dist-info/METADATA +93 -0
  140. hotdata-0.0.1.dist-info/RECORD +142 -0
  141. hotdata-0.0.1.dist-info/WHEEL +5 -0
  142. hotdata-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,977 @@
1
+ """
2
+ Hotdata API
3
+
4
+ Powerful data platform API for datasets, queries, and analytics.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: developers@hotdata.dev
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
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_extensions import Annotated
21
+ from hotdata.models.create_index_request import CreateIndexRequest
22
+ from hotdata.models.index_info_response import IndexInfoResponse
23
+ from hotdata.models.list_indexes_response import ListIndexesResponse
24
+
25
+ from hotdata.api_client import ApiClient, RequestSerialized
26
+ from hotdata.api_response import ApiResponse
27
+ from hotdata.rest import RESTResponseType
28
+
29
+
30
+ class IndexesApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def create_index(
45
+ self,
46
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
47
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
48
+ table: Annotated[StrictStr, Field(description="Table name")],
49
+ create_index_request: CreateIndexRequest,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> IndexInfoResponse:
63
+ """Create an index on a table
64
+
65
+ Create a sorted or BM25 full-text index on a cached table.
66
+
67
+ :param connection_id: Connection identifier (required)
68
+ :type connection_id: str
69
+ :param var_schema: Schema name (required)
70
+ :type var_schema: str
71
+ :param table: Table name (required)
72
+ :type table: str
73
+ :param create_index_request: (required)
74
+ :type create_index_request: CreateIndexRequest
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._create_index_serialize(
98
+ connection_id=connection_id,
99
+ var_schema=var_schema,
100
+ table=table,
101
+ create_index_request=create_index_request,
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ '201': "IndexInfoResponse",
110
+ '400': "ApiErrorResponse",
111
+ '404': "ApiErrorResponse",
112
+ '500': "ApiErrorResponse",
113
+ }
114
+ response_data = self.api_client.call_api(
115
+ *_param,
116
+ _request_timeout=_request_timeout
117
+ )
118
+ response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+
125
+ @validate_call
126
+ def create_index_with_http_info(
127
+ self,
128
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
129
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
130
+ table: Annotated[StrictStr, Field(description="Table name")],
131
+ create_index_request: CreateIndexRequest,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Annotated[StrictFloat, Field(gt=0)]
138
+ ]
139
+ ] = None,
140
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
141
+ _content_type: Optional[StrictStr] = None,
142
+ _headers: Optional[Dict[StrictStr, Any]] = None,
143
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
144
+ ) -> ApiResponse[IndexInfoResponse]:
145
+ """Create an index on a table
146
+
147
+ Create a sorted or BM25 full-text index on a cached table.
148
+
149
+ :param connection_id: Connection identifier (required)
150
+ :type connection_id: str
151
+ :param var_schema: Schema name (required)
152
+ :type var_schema: str
153
+ :param table: Table name (required)
154
+ :type table: str
155
+ :param create_index_request: (required)
156
+ :type create_index_request: CreateIndexRequest
157
+ :param _request_timeout: timeout setting for this request. If one
158
+ number provided, it will be total request
159
+ timeout. It can also be a pair (tuple) of
160
+ (connection, read) timeouts.
161
+ :type _request_timeout: int, tuple(int, int), optional
162
+ :param _request_auth: set to override the auth_settings for an a single
163
+ request; this effectively ignores the
164
+ authentication in the spec for a single request.
165
+ :type _request_auth: dict, optional
166
+ :param _content_type: force content-type for the request.
167
+ :type _content_type: str, Optional
168
+ :param _headers: set to override the headers for a single
169
+ request; this effectively ignores the headers
170
+ in the spec for a single request.
171
+ :type _headers: dict, optional
172
+ :param _host_index: set to override the host_index for a single
173
+ request; this effectively ignores the host_index
174
+ in the spec for a single request.
175
+ :type _host_index: int, optional
176
+ :return: Returns the result object.
177
+ """ # noqa: E501
178
+
179
+ _param = self._create_index_serialize(
180
+ connection_id=connection_id,
181
+ var_schema=var_schema,
182
+ table=table,
183
+ create_index_request=create_index_request,
184
+ _request_auth=_request_auth,
185
+ _content_type=_content_type,
186
+ _headers=_headers,
187
+ _host_index=_host_index
188
+ )
189
+
190
+ _response_types_map: Dict[str, Optional[str]] = {
191
+ '201': "IndexInfoResponse",
192
+ '400': "ApiErrorResponse",
193
+ '404': "ApiErrorResponse",
194
+ '500': "ApiErrorResponse",
195
+ }
196
+ response_data = self.api_client.call_api(
197
+ *_param,
198
+ _request_timeout=_request_timeout
199
+ )
200
+ response_data.read()
201
+ return self.api_client.response_deserialize(
202
+ response_data=response_data,
203
+ response_types_map=_response_types_map,
204
+ )
205
+
206
+
207
+ @validate_call
208
+ def create_index_without_preload_content(
209
+ self,
210
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
211
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
212
+ table: Annotated[StrictStr, Field(description="Table name")],
213
+ create_index_request: CreateIndexRequest,
214
+ _request_timeout: Union[
215
+ None,
216
+ Annotated[StrictFloat, Field(gt=0)],
217
+ Tuple[
218
+ Annotated[StrictFloat, Field(gt=0)],
219
+ Annotated[StrictFloat, Field(gt=0)]
220
+ ]
221
+ ] = None,
222
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
223
+ _content_type: Optional[StrictStr] = None,
224
+ _headers: Optional[Dict[StrictStr, Any]] = None,
225
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
226
+ ) -> RESTResponseType:
227
+ """Create an index on a table
228
+
229
+ Create a sorted or BM25 full-text index on a cached table.
230
+
231
+ :param connection_id: Connection identifier (required)
232
+ :type connection_id: str
233
+ :param var_schema: Schema name (required)
234
+ :type var_schema: str
235
+ :param table: Table name (required)
236
+ :type table: str
237
+ :param create_index_request: (required)
238
+ :type create_index_request: CreateIndexRequest
239
+ :param _request_timeout: timeout setting for this request. If one
240
+ number provided, it will be total request
241
+ timeout. It can also be a pair (tuple) of
242
+ (connection, read) timeouts.
243
+ :type _request_timeout: int, tuple(int, int), optional
244
+ :param _request_auth: set to override the auth_settings for an a single
245
+ request; this effectively ignores the
246
+ authentication in the spec for a single request.
247
+ :type _request_auth: dict, optional
248
+ :param _content_type: force content-type for the request.
249
+ :type _content_type: str, Optional
250
+ :param _headers: set to override the headers for a single
251
+ request; this effectively ignores the headers
252
+ in the spec for a single request.
253
+ :type _headers: dict, optional
254
+ :param _host_index: set to override the host_index for a single
255
+ request; this effectively ignores the host_index
256
+ in the spec for a single request.
257
+ :type _host_index: int, optional
258
+ :return: Returns the result object.
259
+ """ # noqa: E501
260
+
261
+ _param = self._create_index_serialize(
262
+ connection_id=connection_id,
263
+ var_schema=var_schema,
264
+ table=table,
265
+ create_index_request=create_index_request,
266
+ _request_auth=_request_auth,
267
+ _content_type=_content_type,
268
+ _headers=_headers,
269
+ _host_index=_host_index
270
+ )
271
+
272
+ _response_types_map: Dict[str, Optional[str]] = {
273
+ '201': "IndexInfoResponse",
274
+ '400': "ApiErrorResponse",
275
+ '404': "ApiErrorResponse",
276
+ '500': "ApiErrorResponse",
277
+ }
278
+ response_data = self.api_client.call_api(
279
+ *_param,
280
+ _request_timeout=_request_timeout
281
+ )
282
+ return response_data.response
283
+
284
+
285
+ def _create_index_serialize(
286
+ self,
287
+ connection_id,
288
+ var_schema,
289
+ table,
290
+ create_index_request,
291
+ _request_auth,
292
+ _content_type,
293
+ _headers,
294
+ _host_index,
295
+ ) -> RequestSerialized:
296
+
297
+ _host = None
298
+
299
+ _collection_formats: Dict[str, str] = {
300
+ }
301
+
302
+ _path_params: Dict[str, str] = {}
303
+ _query_params: List[Tuple[str, str]] = []
304
+ _header_params: Dict[str, Optional[str]] = _headers or {}
305
+ _form_params: List[Tuple[str, str]] = []
306
+ _files: Dict[
307
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
308
+ ] = {}
309
+ _body_params: Optional[bytes] = None
310
+
311
+ # process the path parameters
312
+ if connection_id is not None:
313
+ _path_params['connection_id'] = connection_id
314
+ if var_schema is not None:
315
+ _path_params['schema'] = var_schema
316
+ if table is not None:
317
+ _path_params['table'] = table
318
+ # process the query parameters
319
+ # process the header parameters
320
+ # process the form parameters
321
+ # process the body parameter
322
+ if create_index_request is not None:
323
+ _body_params = create_index_request
324
+
325
+
326
+ # set the HTTP header `Accept`
327
+ if 'Accept' not in _header_params:
328
+ _header_params['Accept'] = self.api_client.select_header_accept(
329
+ [
330
+ 'application/json'
331
+ ]
332
+ )
333
+
334
+ # set the HTTP header `Content-Type`
335
+ if _content_type:
336
+ _header_params['Content-Type'] = _content_type
337
+ else:
338
+ _default_content_type = (
339
+ self.api_client.select_header_content_type(
340
+ [
341
+ 'application/json'
342
+ ]
343
+ )
344
+ )
345
+ if _default_content_type is not None:
346
+ _header_params['Content-Type'] = _default_content_type
347
+
348
+ # authentication setting
349
+ _auth_settings: List[str] = [
350
+ 'BearerAuth'
351
+ ]
352
+
353
+ return self.api_client.param_serialize(
354
+ method='POST',
355
+ resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes',
356
+ path_params=_path_params,
357
+ query_params=_query_params,
358
+ header_params=_header_params,
359
+ body=_body_params,
360
+ post_params=_form_params,
361
+ files=_files,
362
+ auth_settings=_auth_settings,
363
+ collection_formats=_collection_formats,
364
+ _host=_host,
365
+ _request_auth=_request_auth
366
+ )
367
+
368
+
369
+
370
+
371
+ @validate_call
372
+ def delete_index(
373
+ self,
374
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
375
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
376
+ table: Annotated[StrictStr, Field(description="Table name")],
377
+ index_name: Annotated[StrictStr, Field(description="Index name")],
378
+ _request_timeout: Union[
379
+ None,
380
+ Annotated[StrictFloat, Field(gt=0)],
381
+ Tuple[
382
+ Annotated[StrictFloat, Field(gt=0)],
383
+ Annotated[StrictFloat, Field(gt=0)]
384
+ ]
385
+ ] = None,
386
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
387
+ _content_type: Optional[StrictStr] = None,
388
+ _headers: Optional[Dict[StrictStr, Any]] = None,
389
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
390
+ ) -> None:
391
+ """Delete an index
392
+
393
+ Delete a specific index from a cached table.
394
+
395
+ :param connection_id: Connection identifier (required)
396
+ :type connection_id: str
397
+ :param var_schema: Schema name (required)
398
+ :type var_schema: str
399
+ :param table: Table name (required)
400
+ :type table: str
401
+ :param index_name: Index name (required)
402
+ :type index_name: str
403
+ :param _request_timeout: timeout setting for this request. If one
404
+ number provided, it will be total request
405
+ timeout. It can also be a pair (tuple) of
406
+ (connection, read) timeouts.
407
+ :type _request_timeout: int, tuple(int, int), optional
408
+ :param _request_auth: set to override the auth_settings for an a single
409
+ request; this effectively ignores the
410
+ authentication in the spec for a single request.
411
+ :type _request_auth: dict, optional
412
+ :param _content_type: force content-type for the request.
413
+ :type _content_type: str, Optional
414
+ :param _headers: set to override the headers for a single
415
+ request; this effectively ignores the headers
416
+ in the spec for a single request.
417
+ :type _headers: dict, optional
418
+ :param _host_index: set to override the host_index for a single
419
+ request; this effectively ignores the host_index
420
+ in the spec for a single request.
421
+ :type _host_index: int, optional
422
+ :return: Returns the result object.
423
+ """ # noqa: E501
424
+
425
+ _param = self._delete_index_serialize(
426
+ connection_id=connection_id,
427
+ var_schema=var_schema,
428
+ table=table,
429
+ index_name=index_name,
430
+ _request_auth=_request_auth,
431
+ _content_type=_content_type,
432
+ _headers=_headers,
433
+ _host_index=_host_index
434
+ )
435
+
436
+ _response_types_map: Dict[str, Optional[str]] = {
437
+ '204': None,
438
+ '404': "ApiErrorResponse",
439
+ '500': "ApiErrorResponse",
440
+ }
441
+ response_data = self.api_client.call_api(
442
+ *_param,
443
+ _request_timeout=_request_timeout
444
+ )
445
+ response_data.read()
446
+ return self.api_client.response_deserialize(
447
+ response_data=response_data,
448
+ response_types_map=_response_types_map,
449
+ ).data
450
+
451
+
452
+ @validate_call
453
+ def delete_index_with_http_info(
454
+ self,
455
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
456
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
457
+ table: Annotated[StrictStr, Field(description="Table name")],
458
+ index_name: Annotated[StrictStr, Field(description="Index name")],
459
+ _request_timeout: Union[
460
+ None,
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Tuple[
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Annotated[StrictFloat, Field(gt=0)]
465
+ ]
466
+ ] = None,
467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
468
+ _content_type: Optional[StrictStr] = None,
469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
471
+ ) -> ApiResponse[None]:
472
+ """Delete an index
473
+
474
+ Delete a specific index from a cached table.
475
+
476
+ :param connection_id: Connection identifier (required)
477
+ :type connection_id: str
478
+ :param var_schema: Schema name (required)
479
+ :type var_schema: str
480
+ :param table: Table name (required)
481
+ :type table: str
482
+ :param index_name: Index name (required)
483
+ :type index_name: str
484
+ :param _request_timeout: timeout setting for this request. If one
485
+ number provided, it will be total request
486
+ timeout. It can also be a pair (tuple) of
487
+ (connection, read) timeouts.
488
+ :type _request_timeout: int, tuple(int, int), optional
489
+ :param _request_auth: set to override the auth_settings for an a single
490
+ request; this effectively ignores the
491
+ authentication in the spec for a single request.
492
+ :type _request_auth: dict, optional
493
+ :param _content_type: force content-type for the request.
494
+ :type _content_type: str, Optional
495
+ :param _headers: set to override the headers for a single
496
+ request; this effectively ignores the headers
497
+ in the spec for a single request.
498
+ :type _headers: dict, optional
499
+ :param _host_index: set to override the host_index for a single
500
+ request; this effectively ignores the host_index
501
+ in the spec for a single request.
502
+ :type _host_index: int, optional
503
+ :return: Returns the result object.
504
+ """ # noqa: E501
505
+
506
+ _param = self._delete_index_serialize(
507
+ connection_id=connection_id,
508
+ var_schema=var_schema,
509
+ table=table,
510
+ index_name=index_name,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index
515
+ )
516
+
517
+ _response_types_map: Dict[str, Optional[str]] = {
518
+ '204': None,
519
+ '404': "ApiErrorResponse",
520
+ '500': "ApiErrorResponse",
521
+ }
522
+ response_data = self.api_client.call_api(
523
+ *_param,
524
+ _request_timeout=_request_timeout
525
+ )
526
+ response_data.read()
527
+ return self.api_client.response_deserialize(
528
+ response_data=response_data,
529
+ response_types_map=_response_types_map,
530
+ )
531
+
532
+
533
+ @validate_call
534
+ def delete_index_without_preload_content(
535
+ self,
536
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
537
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
538
+ table: Annotated[StrictStr, Field(description="Table name")],
539
+ index_name: Annotated[StrictStr, Field(description="Index name")],
540
+ _request_timeout: Union[
541
+ None,
542
+ Annotated[StrictFloat, Field(gt=0)],
543
+ Tuple[
544
+ Annotated[StrictFloat, Field(gt=0)],
545
+ Annotated[StrictFloat, Field(gt=0)]
546
+ ]
547
+ ] = None,
548
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
549
+ _content_type: Optional[StrictStr] = None,
550
+ _headers: Optional[Dict[StrictStr, Any]] = None,
551
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
552
+ ) -> RESTResponseType:
553
+ """Delete an index
554
+
555
+ Delete a specific index from a cached table.
556
+
557
+ :param connection_id: Connection identifier (required)
558
+ :type connection_id: str
559
+ :param var_schema: Schema name (required)
560
+ :type var_schema: str
561
+ :param table: Table name (required)
562
+ :type table: str
563
+ :param index_name: Index name (required)
564
+ :type index_name: str
565
+ :param _request_timeout: timeout setting for this request. If one
566
+ number provided, it will be total request
567
+ timeout. It can also be a pair (tuple) of
568
+ (connection, read) timeouts.
569
+ :type _request_timeout: int, tuple(int, int), optional
570
+ :param _request_auth: set to override the auth_settings for an a single
571
+ request; this effectively ignores the
572
+ authentication in the spec for a single request.
573
+ :type _request_auth: dict, optional
574
+ :param _content_type: force content-type for the request.
575
+ :type _content_type: str, Optional
576
+ :param _headers: set to override the headers for a single
577
+ request; this effectively ignores the headers
578
+ in the spec for a single request.
579
+ :type _headers: dict, optional
580
+ :param _host_index: set to override the host_index for a single
581
+ request; this effectively ignores the host_index
582
+ in the spec for a single request.
583
+ :type _host_index: int, optional
584
+ :return: Returns the result object.
585
+ """ # noqa: E501
586
+
587
+ _param = self._delete_index_serialize(
588
+ connection_id=connection_id,
589
+ var_schema=var_schema,
590
+ table=table,
591
+ index_name=index_name,
592
+ _request_auth=_request_auth,
593
+ _content_type=_content_type,
594
+ _headers=_headers,
595
+ _host_index=_host_index
596
+ )
597
+
598
+ _response_types_map: Dict[str, Optional[str]] = {
599
+ '204': None,
600
+ '404': "ApiErrorResponse",
601
+ '500': "ApiErrorResponse",
602
+ }
603
+ response_data = self.api_client.call_api(
604
+ *_param,
605
+ _request_timeout=_request_timeout
606
+ )
607
+ return response_data.response
608
+
609
+
610
+ def _delete_index_serialize(
611
+ self,
612
+ connection_id,
613
+ var_schema,
614
+ table,
615
+ index_name,
616
+ _request_auth,
617
+ _content_type,
618
+ _headers,
619
+ _host_index,
620
+ ) -> RequestSerialized:
621
+
622
+ _host = None
623
+
624
+ _collection_formats: Dict[str, str] = {
625
+ }
626
+
627
+ _path_params: Dict[str, str] = {}
628
+ _query_params: List[Tuple[str, str]] = []
629
+ _header_params: Dict[str, Optional[str]] = _headers or {}
630
+ _form_params: List[Tuple[str, str]] = []
631
+ _files: Dict[
632
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
633
+ ] = {}
634
+ _body_params: Optional[bytes] = None
635
+
636
+ # process the path parameters
637
+ if connection_id is not None:
638
+ _path_params['connection_id'] = connection_id
639
+ if var_schema is not None:
640
+ _path_params['schema'] = var_schema
641
+ if table is not None:
642
+ _path_params['table'] = table
643
+ if index_name is not None:
644
+ _path_params['index_name'] = index_name
645
+ # process the query parameters
646
+ # process the header parameters
647
+ # process the form parameters
648
+ # process the body parameter
649
+
650
+
651
+ # set the HTTP header `Accept`
652
+ if 'Accept' not in _header_params:
653
+ _header_params['Accept'] = self.api_client.select_header_accept(
654
+ [
655
+ 'application/json'
656
+ ]
657
+ )
658
+
659
+
660
+ # authentication setting
661
+ _auth_settings: List[str] = [
662
+ 'BearerAuth'
663
+ ]
664
+
665
+ return self.api_client.param_serialize(
666
+ method='DELETE',
667
+ resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name}',
668
+ path_params=_path_params,
669
+ query_params=_query_params,
670
+ header_params=_header_params,
671
+ body=_body_params,
672
+ post_params=_form_params,
673
+ files=_files,
674
+ auth_settings=_auth_settings,
675
+ collection_formats=_collection_formats,
676
+ _host=_host,
677
+ _request_auth=_request_auth
678
+ )
679
+
680
+
681
+
682
+
683
+ @validate_call
684
+ def list_indexes(
685
+ self,
686
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
687
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
688
+ table: Annotated[StrictStr, Field(description="Table name")],
689
+ _request_timeout: Union[
690
+ None,
691
+ Annotated[StrictFloat, Field(gt=0)],
692
+ Tuple[
693
+ Annotated[StrictFloat, Field(gt=0)],
694
+ Annotated[StrictFloat, Field(gt=0)]
695
+ ]
696
+ ] = None,
697
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
698
+ _content_type: Optional[StrictStr] = None,
699
+ _headers: Optional[Dict[StrictStr, Any]] = None,
700
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
701
+ ) -> ListIndexesResponse:
702
+ """List indexes on a table
703
+
704
+ List all indexes created on a cached table.
705
+
706
+ :param connection_id: Connection identifier (required)
707
+ :type connection_id: str
708
+ :param var_schema: Schema name (required)
709
+ :type var_schema: str
710
+ :param table: Table name (required)
711
+ :type table: str
712
+ :param _request_timeout: timeout setting for this request. If one
713
+ number provided, it will be total request
714
+ timeout. It can also be a pair (tuple) of
715
+ (connection, read) timeouts.
716
+ :type _request_timeout: int, tuple(int, int), optional
717
+ :param _request_auth: set to override the auth_settings for an a single
718
+ request; this effectively ignores the
719
+ authentication in the spec for a single request.
720
+ :type _request_auth: dict, optional
721
+ :param _content_type: force content-type for the request.
722
+ :type _content_type: str, Optional
723
+ :param _headers: set to override the headers for a single
724
+ request; this effectively ignores the headers
725
+ in the spec for a single request.
726
+ :type _headers: dict, optional
727
+ :param _host_index: set to override the host_index for a single
728
+ request; this effectively ignores the host_index
729
+ in the spec for a single request.
730
+ :type _host_index: int, optional
731
+ :return: Returns the result object.
732
+ """ # noqa: E501
733
+
734
+ _param = self._list_indexes_serialize(
735
+ connection_id=connection_id,
736
+ var_schema=var_schema,
737
+ table=table,
738
+ _request_auth=_request_auth,
739
+ _content_type=_content_type,
740
+ _headers=_headers,
741
+ _host_index=_host_index
742
+ )
743
+
744
+ _response_types_map: Dict[str, Optional[str]] = {
745
+ '200': "ListIndexesResponse",
746
+ '404': "ApiErrorResponse",
747
+ '500': "ApiErrorResponse",
748
+ }
749
+ response_data = self.api_client.call_api(
750
+ *_param,
751
+ _request_timeout=_request_timeout
752
+ )
753
+ response_data.read()
754
+ return self.api_client.response_deserialize(
755
+ response_data=response_data,
756
+ response_types_map=_response_types_map,
757
+ ).data
758
+
759
+
760
+ @validate_call
761
+ def list_indexes_with_http_info(
762
+ self,
763
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
764
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
765
+ table: Annotated[StrictStr, Field(description="Table name")],
766
+ _request_timeout: Union[
767
+ None,
768
+ Annotated[StrictFloat, Field(gt=0)],
769
+ Tuple[
770
+ Annotated[StrictFloat, Field(gt=0)],
771
+ Annotated[StrictFloat, Field(gt=0)]
772
+ ]
773
+ ] = None,
774
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
775
+ _content_type: Optional[StrictStr] = None,
776
+ _headers: Optional[Dict[StrictStr, Any]] = None,
777
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
778
+ ) -> ApiResponse[ListIndexesResponse]:
779
+ """List indexes on a table
780
+
781
+ List all indexes created on a cached table.
782
+
783
+ :param connection_id: Connection identifier (required)
784
+ :type connection_id: str
785
+ :param var_schema: Schema name (required)
786
+ :type var_schema: str
787
+ :param table: Table name (required)
788
+ :type table: str
789
+ :param _request_timeout: timeout setting for this request. If one
790
+ number provided, it will be total request
791
+ timeout. It can also be a pair (tuple) of
792
+ (connection, read) timeouts.
793
+ :type _request_timeout: int, tuple(int, int), optional
794
+ :param _request_auth: set to override the auth_settings for an a single
795
+ request; this effectively ignores the
796
+ authentication in the spec for a single request.
797
+ :type _request_auth: dict, optional
798
+ :param _content_type: force content-type for the request.
799
+ :type _content_type: str, Optional
800
+ :param _headers: set to override the headers for a single
801
+ request; this effectively ignores the headers
802
+ in the spec for a single request.
803
+ :type _headers: dict, optional
804
+ :param _host_index: set to override the host_index for a single
805
+ request; this effectively ignores the host_index
806
+ in the spec for a single request.
807
+ :type _host_index: int, optional
808
+ :return: Returns the result object.
809
+ """ # noqa: E501
810
+
811
+ _param = self._list_indexes_serialize(
812
+ connection_id=connection_id,
813
+ var_schema=var_schema,
814
+ table=table,
815
+ _request_auth=_request_auth,
816
+ _content_type=_content_type,
817
+ _headers=_headers,
818
+ _host_index=_host_index
819
+ )
820
+
821
+ _response_types_map: Dict[str, Optional[str]] = {
822
+ '200': "ListIndexesResponse",
823
+ '404': "ApiErrorResponse",
824
+ '500': "ApiErrorResponse",
825
+ }
826
+ response_data = self.api_client.call_api(
827
+ *_param,
828
+ _request_timeout=_request_timeout
829
+ )
830
+ response_data.read()
831
+ return self.api_client.response_deserialize(
832
+ response_data=response_data,
833
+ response_types_map=_response_types_map,
834
+ )
835
+
836
+
837
+ @validate_call
838
+ def list_indexes_without_preload_content(
839
+ self,
840
+ connection_id: Annotated[StrictStr, Field(description="Connection identifier")],
841
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
842
+ table: Annotated[StrictStr, Field(description="Table name")],
843
+ _request_timeout: Union[
844
+ None,
845
+ Annotated[StrictFloat, Field(gt=0)],
846
+ Tuple[
847
+ Annotated[StrictFloat, Field(gt=0)],
848
+ Annotated[StrictFloat, Field(gt=0)]
849
+ ]
850
+ ] = None,
851
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
852
+ _content_type: Optional[StrictStr] = None,
853
+ _headers: Optional[Dict[StrictStr, Any]] = None,
854
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
855
+ ) -> RESTResponseType:
856
+ """List indexes on a table
857
+
858
+ List all indexes created on a cached table.
859
+
860
+ :param connection_id: Connection identifier (required)
861
+ :type connection_id: str
862
+ :param var_schema: Schema name (required)
863
+ :type var_schema: str
864
+ :param table: Table name (required)
865
+ :type table: str
866
+ :param _request_timeout: timeout setting for this request. If one
867
+ number provided, it will be total request
868
+ timeout. It can also be a pair (tuple) of
869
+ (connection, read) timeouts.
870
+ :type _request_timeout: int, tuple(int, int), optional
871
+ :param _request_auth: set to override the auth_settings for an a single
872
+ request; this effectively ignores the
873
+ authentication in the spec for a single request.
874
+ :type _request_auth: dict, optional
875
+ :param _content_type: force content-type for the request.
876
+ :type _content_type: str, Optional
877
+ :param _headers: set to override the headers for a single
878
+ request; this effectively ignores the headers
879
+ in the spec for a single request.
880
+ :type _headers: dict, optional
881
+ :param _host_index: set to override the host_index for a single
882
+ request; this effectively ignores the host_index
883
+ in the spec for a single request.
884
+ :type _host_index: int, optional
885
+ :return: Returns the result object.
886
+ """ # noqa: E501
887
+
888
+ _param = self._list_indexes_serialize(
889
+ connection_id=connection_id,
890
+ var_schema=var_schema,
891
+ table=table,
892
+ _request_auth=_request_auth,
893
+ _content_type=_content_type,
894
+ _headers=_headers,
895
+ _host_index=_host_index
896
+ )
897
+
898
+ _response_types_map: Dict[str, Optional[str]] = {
899
+ '200': "ListIndexesResponse",
900
+ '404': "ApiErrorResponse",
901
+ '500': "ApiErrorResponse",
902
+ }
903
+ response_data = self.api_client.call_api(
904
+ *_param,
905
+ _request_timeout=_request_timeout
906
+ )
907
+ return response_data.response
908
+
909
+
910
+ def _list_indexes_serialize(
911
+ self,
912
+ connection_id,
913
+ var_schema,
914
+ table,
915
+ _request_auth,
916
+ _content_type,
917
+ _headers,
918
+ _host_index,
919
+ ) -> RequestSerialized:
920
+
921
+ _host = None
922
+
923
+ _collection_formats: Dict[str, str] = {
924
+ }
925
+
926
+ _path_params: Dict[str, str] = {}
927
+ _query_params: List[Tuple[str, str]] = []
928
+ _header_params: Dict[str, Optional[str]] = _headers or {}
929
+ _form_params: List[Tuple[str, str]] = []
930
+ _files: Dict[
931
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
932
+ ] = {}
933
+ _body_params: Optional[bytes] = None
934
+
935
+ # process the path parameters
936
+ if connection_id is not None:
937
+ _path_params['connection_id'] = connection_id
938
+ if var_schema is not None:
939
+ _path_params['schema'] = var_schema
940
+ if table is not None:
941
+ _path_params['table'] = table
942
+ # process the query parameters
943
+ # process the header parameters
944
+ # process the form parameters
945
+ # process the body parameter
946
+
947
+
948
+ # set the HTTP header `Accept`
949
+ if 'Accept' not in _header_params:
950
+ _header_params['Accept'] = self.api_client.select_header_accept(
951
+ [
952
+ 'application/json'
953
+ ]
954
+ )
955
+
956
+
957
+ # authentication setting
958
+ _auth_settings: List[str] = [
959
+ 'BearerAuth'
960
+ ]
961
+
962
+ return self.api_client.param_serialize(
963
+ method='GET',
964
+ resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes',
965
+ path_params=_path_params,
966
+ query_params=_query_params,
967
+ header_params=_header_params,
968
+ body=_body_params,
969
+ post_params=_form_params,
970
+ files=_files,
971
+ auth_settings=_auth_settings,
972
+ collection_formats=_collection_formats,
973
+ _host=_host,
974
+ _request_auth=_request_auth
975
+ )
976
+
977
+