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,2213 @@
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.connection_health_response import ConnectionHealthResponse
22
+ from hotdata.models.create_connection_request import CreateConnectionRequest
23
+ from hotdata.models.create_connection_response import CreateConnectionResponse
24
+ from hotdata.models.get_connection_response import GetConnectionResponse
25
+ from hotdata.models.list_connections_response import ListConnectionsResponse
26
+ from hotdata.models.table_profile_response import TableProfileResponse
27
+
28
+ from hotdata.api_client import ApiClient, RequestSerialized
29
+ from hotdata.api_response import ApiResponse
30
+ from hotdata.rest import RESTResponseType
31
+
32
+
33
+ class ConnectionsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def check_connection_health(
48
+ self,
49
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
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
+ ) -> ConnectionHealthResponse:
63
+ """Check connection health
64
+
65
+ Test connectivity to the remote database. Returns health status and latency.
66
+
67
+ :param connection_id: Connection ID (required)
68
+ :type connection_id: str
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._check_connection_health_serialize(
92
+ connection_id=connection_id,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "ConnectionHealthResponse",
101
+ '404': "ApiErrorResponse",
102
+ }
103
+ response_data = self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ def check_connection_health_with_http_info(
116
+ self,
117
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[ConnectionHealthResponse]:
131
+ """Check connection health
132
+
133
+ Test connectivity to the remote database. Returns health status and latency.
134
+
135
+ :param connection_id: Connection ID (required)
136
+ :type connection_id: str
137
+ :param _request_timeout: timeout setting for this request. If one
138
+ number provided, it will be total request
139
+ timeout. It can also be a pair (tuple) of
140
+ (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._check_connection_health_serialize(
160
+ connection_id=connection_id,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
166
+
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '200': "ConnectionHealthResponse",
169
+ '404': "ApiErrorResponse",
170
+ }
171
+ response_data = self.api_client.call_api(
172
+ *_param,
173
+ _request_timeout=_request_timeout
174
+ )
175
+ response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+
182
+ @validate_call
183
+ def check_connection_health_without_preload_content(
184
+ self,
185
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Check connection health
200
+
201
+ Test connectivity to the remote database. Returns health status and latency.
202
+
203
+ :param connection_id: Connection ID (required)
204
+ :type connection_id: str
205
+ :param _request_timeout: timeout setting for this request. If one
206
+ number provided, it will be total request
207
+ timeout. It can also be a pair (tuple) of
208
+ (connection, read) timeouts.
209
+ :type _request_timeout: int, tuple(int, int), optional
210
+ :param _request_auth: set to override the auth_settings for an a single
211
+ request; this effectively ignores the
212
+ authentication in the spec for a single request.
213
+ :type _request_auth: dict, optional
214
+ :param _content_type: force content-type for the request.
215
+ :type _content_type: str, Optional
216
+ :param _headers: set to override the headers for a single
217
+ request; this effectively ignores the headers
218
+ in the spec for a single request.
219
+ :type _headers: dict, optional
220
+ :param _host_index: set to override the host_index for a single
221
+ request; this effectively ignores the host_index
222
+ in the spec for a single request.
223
+ :type _host_index: int, optional
224
+ :return: Returns the result object.
225
+ """ # noqa: E501
226
+
227
+ _param = self._check_connection_health_serialize(
228
+ connection_id=connection_id,
229
+ _request_auth=_request_auth,
230
+ _content_type=_content_type,
231
+ _headers=_headers,
232
+ _host_index=_host_index
233
+ )
234
+
235
+ _response_types_map: Dict[str, Optional[str]] = {
236
+ '200': "ConnectionHealthResponse",
237
+ '404': "ApiErrorResponse",
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _check_connection_health_serialize(
247
+ self,
248
+ connection_id,
249
+ _request_auth,
250
+ _content_type,
251
+ _headers,
252
+ _host_index,
253
+ ) -> RequestSerialized:
254
+
255
+ _host = None
256
+
257
+ _collection_formats: Dict[str, str] = {
258
+ }
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[
265
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
266
+ ] = {}
267
+ _body_params: Optional[bytes] = None
268
+
269
+ # process the path parameters
270
+ if connection_id is not None:
271
+ _path_params['connection_id'] = connection_id
272
+ # process the query parameters
273
+ # process the header parameters
274
+ # process the form parameters
275
+ # process the body parameter
276
+
277
+
278
+ # set the HTTP header `Accept`
279
+ if 'Accept' not in _header_params:
280
+ _header_params['Accept'] = self.api_client.select_header_accept(
281
+ [
282
+ 'application/json'
283
+ ]
284
+ )
285
+
286
+
287
+ # authentication setting
288
+ _auth_settings: List[str] = [
289
+ 'BearerAuth'
290
+ ]
291
+
292
+ return self.api_client.param_serialize(
293
+ method='GET',
294
+ resource_path='/v1/connections/{connection_id}/health',
295
+ path_params=_path_params,
296
+ query_params=_query_params,
297
+ header_params=_header_params,
298
+ body=_body_params,
299
+ post_params=_form_params,
300
+ files=_files,
301
+ auth_settings=_auth_settings,
302
+ collection_formats=_collection_formats,
303
+ _host=_host,
304
+ _request_auth=_request_auth
305
+ )
306
+
307
+
308
+
309
+
310
+ @validate_call
311
+ def create_connection(
312
+ self,
313
+ create_connection_request: CreateConnectionRequest,
314
+ _request_timeout: Union[
315
+ None,
316
+ Annotated[StrictFloat, Field(gt=0)],
317
+ Tuple[
318
+ Annotated[StrictFloat, Field(gt=0)],
319
+ Annotated[StrictFloat, Field(gt=0)]
320
+ ]
321
+ ] = None,
322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
323
+ _content_type: Optional[StrictStr] = None,
324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
326
+ ) -> CreateConnectionResponse:
327
+ """Create connection
328
+
329
+ Register a new database connection. Provide the source type and connection config (host, port, database, etc.). Credentials can be supplied inline (password/token fields are auto-converted to secrets) or by referencing an existing secret by name or ID. Schema discovery runs automatically after registration.
330
+
331
+ :param create_connection_request: (required)
332
+ :type create_connection_request: CreateConnectionRequest
333
+ :param _request_timeout: timeout setting for this request. If one
334
+ number provided, it will be total request
335
+ timeout. It can also be a pair (tuple) of
336
+ (connection, read) timeouts.
337
+ :type _request_timeout: int, tuple(int, int), optional
338
+ :param _request_auth: set to override the auth_settings for an a single
339
+ request; this effectively ignores the
340
+ authentication in the spec for a single request.
341
+ :type _request_auth: dict, optional
342
+ :param _content_type: force content-type for the request.
343
+ :type _content_type: str, Optional
344
+ :param _headers: set to override the headers for a single
345
+ request; this effectively ignores the headers
346
+ in the spec for a single request.
347
+ :type _headers: dict, optional
348
+ :param _host_index: set to override the host_index for a single
349
+ request; this effectively ignores the host_index
350
+ in the spec for a single request.
351
+ :type _host_index: int, optional
352
+ :return: Returns the result object.
353
+ """ # noqa: E501
354
+
355
+ _param = self._create_connection_serialize(
356
+ create_connection_request=create_connection_request,
357
+ _request_auth=_request_auth,
358
+ _content_type=_content_type,
359
+ _headers=_headers,
360
+ _host_index=_host_index
361
+ )
362
+
363
+ _response_types_map: Dict[str, Optional[str]] = {
364
+ '201': "CreateConnectionResponse",
365
+ '400': "ApiErrorResponse",
366
+ '409': "ApiErrorResponse",
367
+ }
368
+ response_data = self.api_client.call_api(
369
+ *_param,
370
+ _request_timeout=_request_timeout
371
+ )
372
+ response_data.read()
373
+ return self.api_client.response_deserialize(
374
+ response_data=response_data,
375
+ response_types_map=_response_types_map,
376
+ ).data
377
+
378
+
379
+ @validate_call
380
+ def create_connection_with_http_info(
381
+ self,
382
+ create_connection_request: CreateConnectionRequest,
383
+ _request_timeout: Union[
384
+ None,
385
+ Annotated[StrictFloat, Field(gt=0)],
386
+ Tuple[
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Annotated[StrictFloat, Field(gt=0)]
389
+ ]
390
+ ] = None,
391
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
392
+ _content_type: Optional[StrictStr] = None,
393
+ _headers: Optional[Dict[StrictStr, Any]] = None,
394
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
395
+ ) -> ApiResponse[CreateConnectionResponse]:
396
+ """Create connection
397
+
398
+ Register a new database connection. Provide the source type and connection config (host, port, database, etc.). Credentials can be supplied inline (password/token fields are auto-converted to secrets) or by referencing an existing secret by name or ID. Schema discovery runs automatically after registration.
399
+
400
+ :param create_connection_request: (required)
401
+ :type create_connection_request: CreateConnectionRequest
402
+ :param _request_timeout: timeout setting for this request. If one
403
+ number provided, it will be total request
404
+ timeout. It can also be a pair (tuple) of
405
+ (connection, read) timeouts.
406
+ :type _request_timeout: int, tuple(int, int), optional
407
+ :param _request_auth: set to override the auth_settings for an a single
408
+ request; this effectively ignores the
409
+ authentication in the spec for a single request.
410
+ :type _request_auth: dict, optional
411
+ :param _content_type: force content-type for the request.
412
+ :type _content_type: str, Optional
413
+ :param _headers: set to override the headers for a single
414
+ request; this effectively ignores the headers
415
+ in the spec for a single request.
416
+ :type _headers: dict, optional
417
+ :param _host_index: set to override the host_index for a single
418
+ request; this effectively ignores the host_index
419
+ in the spec for a single request.
420
+ :type _host_index: int, optional
421
+ :return: Returns the result object.
422
+ """ # noqa: E501
423
+
424
+ _param = self._create_connection_serialize(
425
+ create_connection_request=create_connection_request,
426
+ _request_auth=_request_auth,
427
+ _content_type=_content_type,
428
+ _headers=_headers,
429
+ _host_index=_host_index
430
+ )
431
+
432
+ _response_types_map: Dict[str, Optional[str]] = {
433
+ '201': "CreateConnectionResponse",
434
+ '400': "ApiErrorResponse",
435
+ '409': "ApiErrorResponse",
436
+ }
437
+ response_data = self.api_client.call_api(
438
+ *_param,
439
+ _request_timeout=_request_timeout
440
+ )
441
+ 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
+ def create_connection_without_preload_content(
450
+ self,
451
+ create_connection_request: CreateConnectionRequest,
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
+ """Create connection
466
+
467
+ Register a new database connection. Provide the source type and connection config (host, port, database, etc.). Credentials can be supplied inline (password/token fields are auto-converted to secrets) or by referencing an existing secret by name or ID. Schema discovery runs automatically after registration.
468
+
469
+ :param create_connection_request: (required)
470
+ :type create_connection_request: CreateConnectionRequest
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._create_connection_serialize(
494
+ create_connection_request=create_connection_request,
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
+ '201': "CreateConnectionResponse",
503
+ '400': "ApiErrorResponse",
504
+ '409': "ApiErrorResponse",
505
+ }
506
+ response_data = self.api_client.call_api(
507
+ *_param,
508
+ _request_timeout=_request_timeout
509
+ )
510
+ return response_data.response
511
+
512
+
513
+ def _create_connection_serialize(
514
+ self,
515
+ create_connection_request,
516
+ _request_auth,
517
+ _content_type,
518
+ _headers,
519
+ _host_index,
520
+ ) -> RequestSerialized:
521
+
522
+ _host = None
523
+
524
+ _collection_formats: Dict[str, str] = {
525
+ }
526
+
527
+ _path_params: Dict[str, str] = {}
528
+ _query_params: List[Tuple[str, str]] = []
529
+ _header_params: Dict[str, Optional[str]] = _headers or {}
530
+ _form_params: List[Tuple[str, str]] = []
531
+ _files: Dict[
532
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
533
+ ] = {}
534
+ _body_params: Optional[bytes] = None
535
+
536
+ # process the path parameters
537
+ # process the query parameters
538
+ # process the header parameters
539
+ # process the form parameters
540
+ # process the body parameter
541
+ if create_connection_request is not None:
542
+ _body_params = create_connection_request
543
+
544
+
545
+ # set the HTTP header `Accept`
546
+ if 'Accept' not in _header_params:
547
+ _header_params['Accept'] = self.api_client.select_header_accept(
548
+ [
549
+ 'application/json'
550
+ ]
551
+ )
552
+
553
+ # set the HTTP header `Content-Type`
554
+ if _content_type:
555
+ _header_params['Content-Type'] = _content_type
556
+ else:
557
+ _default_content_type = (
558
+ self.api_client.select_header_content_type(
559
+ [
560
+ 'application/json'
561
+ ]
562
+ )
563
+ )
564
+ if _default_content_type is not None:
565
+ _header_params['Content-Type'] = _default_content_type
566
+
567
+ # authentication setting
568
+ _auth_settings: List[str] = [
569
+ 'BearerAuth'
570
+ ]
571
+
572
+ return self.api_client.param_serialize(
573
+ method='POST',
574
+ resource_path='/v1/connections',
575
+ path_params=_path_params,
576
+ query_params=_query_params,
577
+ header_params=_header_params,
578
+ body=_body_params,
579
+ post_params=_form_params,
580
+ files=_files,
581
+ auth_settings=_auth_settings,
582
+ collection_formats=_collection_formats,
583
+ _host=_host,
584
+ _request_auth=_request_auth
585
+ )
586
+
587
+
588
+
589
+
590
+ @validate_call
591
+ def delete_connection(
592
+ self,
593
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
594
+ _request_timeout: Union[
595
+ None,
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Tuple[
598
+ Annotated[StrictFloat, Field(gt=0)],
599
+ Annotated[StrictFloat, Field(gt=0)]
600
+ ]
601
+ ] = None,
602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
603
+ _content_type: Optional[StrictStr] = None,
604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
+ ) -> None:
607
+ """Delete connection
608
+
609
+ Delete a connection and its cached data.
610
+
611
+ :param connection_id: Connection ID (required)
612
+ :type connection_id: str
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._delete_connection_serialize(
636
+ connection_id=connection_id,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ '204': None,
645
+ '404': "ApiErrorResponse",
646
+ }
647
+ response_data = self.api_client.call_api(
648
+ *_param,
649
+ _request_timeout=_request_timeout
650
+ )
651
+ response_data.read()
652
+ return self.api_client.response_deserialize(
653
+ response_data=response_data,
654
+ response_types_map=_response_types_map,
655
+ ).data
656
+
657
+
658
+ @validate_call
659
+ def delete_connection_with_http_info(
660
+ self,
661
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
662
+ _request_timeout: Union[
663
+ None,
664
+ Annotated[StrictFloat, Field(gt=0)],
665
+ Tuple[
666
+ Annotated[StrictFloat, Field(gt=0)],
667
+ Annotated[StrictFloat, Field(gt=0)]
668
+ ]
669
+ ] = None,
670
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
671
+ _content_type: Optional[StrictStr] = None,
672
+ _headers: Optional[Dict[StrictStr, Any]] = None,
673
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
674
+ ) -> ApiResponse[None]:
675
+ """Delete connection
676
+
677
+ Delete a connection and its cached data.
678
+
679
+ :param connection_id: Connection ID (required)
680
+ :type connection_id: str
681
+ :param _request_timeout: timeout setting for this request. If one
682
+ number provided, it will be total request
683
+ timeout. It can also be a pair (tuple) of
684
+ (connection, read) timeouts.
685
+ :type _request_timeout: int, tuple(int, int), optional
686
+ :param _request_auth: set to override the auth_settings for an a single
687
+ request; this effectively ignores the
688
+ authentication in the spec for a single request.
689
+ :type _request_auth: dict, optional
690
+ :param _content_type: force content-type for the request.
691
+ :type _content_type: str, Optional
692
+ :param _headers: set to override the headers for a single
693
+ request; this effectively ignores the headers
694
+ in the spec for a single request.
695
+ :type _headers: dict, optional
696
+ :param _host_index: set to override the host_index for a single
697
+ request; this effectively ignores the host_index
698
+ in the spec for a single request.
699
+ :type _host_index: int, optional
700
+ :return: Returns the result object.
701
+ """ # noqa: E501
702
+
703
+ _param = self._delete_connection_serialize(
704
+ connection_id=connection_id,
705
+ _request_auth=_request_auth,
706
+ _content_type=_content_type,
707
+ _headers=_headers,
708
+ _host_index=_host_index
709
+ )
710
+
711
+ _response_types_map: Dict[str, Optional[str]] = {
712
+ '204': None,
713
+ '404': "ApiErrorResponse",
714
+ }
715
+ response_data = self.api_client.call_api(
716
+ *_param,
717
+ _request_timeout=_request_timeout
718
+ )
719
+ response_data.read()
720
+ return self.api_client.response_deserialize(
721
+ response_data=response_data,
722
+ response_types_map=_response_types_map,
723
+ )
724
+
725
+
726
+ @validate_call
727
+ def delete_connection_without_preload_content(
728
+ self,
729
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
730
+ _request_timeout: Union[
731
+ None,
732
+ Annotated[StrictFloat, Field(gt=0)],
733
+ Tuple[
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Annotated[StrictFloat, Field(gt=0)]
736
+ ]
737
+ ] = None,
738
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
739
+ _content_type: Optional[StrictStr] = None,
740
+ _headers: Optional[Dict[StrictStr, Any]] = None,
741
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
742
+ ) -> RESTResponseType:
743
+ """Delete connection
744
+
745
+ Delete a connection and its cached data.
746
+
747
+ :param connection_id: Connection ID (required)
748
+ :type connection_id: str
749
+ :param _request_timeout: timeout setting for this request. If one
750
+ number provided, it will be total request
751
+ timeout. It can also be a pair (tuple) of
752
+ (connection, read) timeouts.
753
+ :type _request_timeout: int, tuple(int, int), optional
754
+ :param _request_auth: set to override the auth_settings for an a single
755
+ request; this effectively ignores the
756
+ authentication in the spec for a single request.
757
+ :type _request_auth: dict, optional
758
+ :param _content_type: force content-type for the request.
759
+ :type _content_type: str, Optional
760
+ :param _headers: set to override the headers for a single
761
+ request; this effectively ignores the headers
762
+ in the spec for a single request.
763
+ :type _headers: dict, optional
764
+ :param _host_index: set to override the host_index for a single
765
+ request; this effectively ignores the host_index
766
+ in the spec for a single request.
767
+ :type _host_index: int, optional
768
+ :return: Returns the result object.
769
+ """ # noqa: E501
770
+
771
+ _param = self._delete_connection_serialize(
772
+ connection_id=connection_id,
773
+ _request_auth=_request_auth,
774
+ _content_type=_content_type,
775
+ _headers=_headers,
776
+ _host_index=_host_index
777
+ )
778
+
779
+ _response_types_map: Dict[str, Optional[str]] = {
780
+ '204': None,
781
+ '404': "ApiErrorResponse",
782
+ }
783
+ response_data = self.api_client.call_api(
784
+ *_param,
785
+ _request_timeout=_request_timeout
786
+ )
787
+ return response_data.response
788
+
789
+
790
+ def _delete_connection_serialize(
791
+ self,
792
+ connection_id,
793
+ _request_auth,
794
+ _content_type,
795
+ _headers,
796
+ _host_index,
797
+ ) -> RequestSerialized:
798
+
799
+ _host = None
800
+
801
+ _collection_formats: Dict[str, str] = {
802
+ }
803
+
804
+ _path_params: Dict[str, str] = {}
805
+ _query_params: List[Tuple[str, str]] = []
806
+ _header_params: Dict[str, Optional[str]] = _headers or {}
807
+ _form_params: List[Tuple[str, str]] = []
808
+ _files: Dict[
809
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
810
+ ] = {}
811
+ _body_params: Optional[bytes] = None
812
+
813
+ # process the path parameters
814
+ if connection_id is not None:
815
+ _path_params['connection_id'] = connection_id
816
+ # process the query parameters
817
+ # process the header parameters
818
+ # process the form parameters
819
+ # process the body parameter
820
+
821
+
822
+ # set the HTTP header `Accept`
823
+ if 'Accept' not in _header_params:
824
+ _header_params['Accept'] = self.api_client.select_header_accept(
825
+ [
826
+ 'application/json'
827
+ ]
828
+ )
829
+
830
+
831
+ # authentication setting
832
+ _auth_settings: List[str] = [
833
+ 'BearerAuth'
834
+ ]
835
+
836
+ return self.api_client.param_serialize(
837
+ method='DELETE',
838
+ resource_path='/v1/connections/{connection_id}',
839
+ path_params=_path_params,
840
+ query_params=_query_params,
841
+ header_params=_header_params,
842
+ body=_body_params,
843
+ post_params=_form_params,
844
+ files=_files,
845
+ auth_settings=_auth_settings,
846
+ collection_formats=_collection_formats,
847
+ _host=_host,
848
+ _request_auth=_request_auth
849
+ )
850
+
851
+
852
+
853
+
854
+ @validate_call
855
+ def get_connection(
856
+ self,
857
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
858
+ _request_timeout: Union[
859
+ None,
860
+ Annotated[StrictFloat, Field(gt=0)],
861
+ Tuple[
862
+ Annotated[StrictFloat, Field(gt=0)],
863
+ Annotated[StrictFloat, Field(gt=0)]
864
+ ]
865
+ ] = None,
866
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
867
+ _content_type: Optional[StrictStr] = None,
868
+ _headers: Optional[Dict[StrictStr, Any]] = None,
869
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
870
+ ) -> GetConnectionResponse:
871
+ """Get connection
872
+
873
+ Get details for a specific connection, including table and sync counts.
874
+
875
+ :param connection_id: Connection ID (required)
876
+ :type connection_id: str
877
+ :param _request_timeout: timeout setting for this request. If one
878
+ number provided, it will be total request
879
+ timeout. It can also be a pair (tuple) of
880
+ (connection, read) timeouts.
881
+ :type _request_timeout: int, tuple(int, int), optional
882
+ :param _request_auth: set to override the auth_settings for an a single
883
+ request; this effectively ignores the
884
+ authentication in the spec for a single request.
885
+ :type _request_auth: dict, optional
886
+ :param _content_type: force content-type for the request.
887
+ :type _content_type: str, Optional
888
+ :param _headers: set to override the headers for a single
889
+ request; this effectively ignores the headers
890
+ in the spec for a single request.
891
+ :type _headers: dict, optional
892
+ :param _host_index: set to override the host_index for a single
893
+ request; this effectively ignores the host_index
894
+ in the spec for a single request.
895
+ :type _host_index: int, optional
896
+ :return: Returns the result object.
897
+ """ # noqa: E501
898
+
899
+ _param = self._get_connection_serialize(
900
+ connection_id=connection_id,
901
+ _request_auth=_request_auth,
902
+ _content_type=_content_type,
903
+ _headers=_headers,
904
+ _host_index=_host_index
905
+ )
906
+
907
+ _response_types_map: Dict[str, Optional[str]] = {
908
+ '200': "GetConnectionResponse",
909
+ '404': "ApiErrorResponse",
910
+ }
911
+ response_data = self.api_client.call_api(
912
+ *_param,
913
+ _request_timeout=_request_timeout
914
+ )
915
+ response_data.read()
916
+ return self.api_client.response_deserialize(
917
+ response_data=response_data,
918
+ response_types_map=_response_types_map,
919
+ ).data
920
+
921
+
922
+ @validate_call
923
+ def get_connection_with_http_info(
924
+ self,
925
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
926
+ _request_timeout: Union[
927
+ None,
928
+ Annotated[StrictFloat, Field(gt=0)],
929
+ Tuple[
930
+ Annotated[StrictFloat, Field(gt=0)],
931
+ Annotated[StrictFloat, Field(gt=0)]
932
+ ]
933
+ ] = None,
934
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
935
+ _content_type: Optional[StrictStr] = None,
936
+ _headers: Optional[Dict[StrictStr, Any]] = None,
937
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
938
+ ) -> ApiResponse[GetConnectionResponse]:
939
+ """Get connection
940
+
941
+ Get details for a specific connection, including table and sync counts.
942
+
943
+ :param connection_id: Connection ID (required)
944
+ :type connection_id: str
945
+ :param _request_timeout: timeout setting for this request. If one
946
+ number provided, it will be total request
947
+ timeout. It can also be a pair (tuple) of
948
+ (connection, read) timeouts.
949
+ :type _request_timeout: int, tuple(int, int), optional
950
+ :param _request_auth: set to override the auth_settings for an a single
951
+ request; this effectively ignores the
952
+ authentication in the spec for a single request.
953
+ :type _request_auth: dict, optional
954
+ :param _content_type: force content-type for the request.
955
+ :type _content_type: str, Optional
956
+ :param _headers: set to override the headers for a single
957
+ request; this effectively ignores the headers
958
+ in the spec for a single request.
959
+ :type _headers: dict, optional
960
+ :param _host_index: set to override the host_index for a single
961
+ request; this effectively ignores the host_index
962
+ in the spec for a single request.
963
+ :type _host_index: int, optional
964
+ :return: Returns the result object.
965
+ """ # noqa: E501
966
+
967
+ _param = self._get_connection_serialize(
968
+ connection_id=connection_id,
969
+ _request_auth=_request_auth,
970
+ _content_type=_content_type,
971
+ _headers=_headers,
972
+ _host_index=_host_index
973
+ )
974
+
975
+ _response_types_map: Dict[str, Optional[str]] = {
976
+ '200': "GetConnectionResponse",
977
+ '404': "ApiErrorResponse",
978
+ }
979
+ response_data = self.api_client.call_api(
980
+ *_param,
981
+ _request_timeout=_request_timeout
982
+ )
983
+ response_data.read()
984
+ return self.api_client.response_deserialize(
985
+ response_data=response_data,
986
+ response_types_map=_response_types_map,
987
+ )
988
+
989
+
990
+ @validate_call
991
+ def get_connection_without_preload_content(
992
+ self,
993
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> RESTResponseType:
1007
+ """Get connection
1008
+
1009
+ Get details for a specific connection, including table and sync counts.
1010
+
1011
+ :param connection_id: Connection ID (required)
1012
+ :type connection_id: str
1013
+ :param _request_timeout: timeout setting for this request. If one
1014
+ number provided, it will be total request
1015
+ timeout. It can also be a pair (tuple) of
1016
+ (connection, read) timeouts.
1017
+ :type _request_timeout: int, tuple(int, int), optional
1018
+ :param _request_auth: set to override the auth_settings for an a single
1019
+ request; this effectively ignores the
1020
+ authentication in the spec for a single request.
1021
+ :type _request_auth: dict, optional
1022
+ :param _content_type: force content-type for the request.
1023
+ :type _content_type: str, Optional
1024
+ :param _headers: set to override the headers for a single
1025
+ request; this effectively ignores the headers
1026
+ in the spec for a single request.
1027
+ :type _headers: dict, optional
1028
+ :param _host_index: set to override the host_index for a single
1029
+ request; this effectively ignores the host_index
1030
+ in the spec for a single request.
1031
+ :type _host_index: int, optional
1032
+ :return: Returns the result object.
1033
+ """ # noqa: E501
1034
+
1035
+ _param = self._get_connection_serialize(
1036
+ connection_id=connection_id,
1037
+ _request_auth=_request_auth,
1038
+ _content_type=_content_type,
1039
+ _headers=_headers,
1040
+ _host_index=_host_index
1041
+ )
1042
+
1043
+ _response_types_map: Dict[str, Optional[str]] = {
1044
+ '200': "GetConnectionResponse",
1045
+ '404': "ApiErrorResponse",
1046
+ }
1047
+ response_data = self.api_client.call_api(
1048
+ *_param,
1049
+ _request_timeout=_request_timeout
1050
+ )
1051
+ return response_data.response
1052
+
1053
+
1054
+ def _get_connection_serialize(
1055
+ self,
1056
+ connection_id,
1057
+ _request_auth,
1058
+ _content_type,
1059
+ _headers,
1060
+ _host_index,
1061
+ ) -> RequestSerialized:
1062
+
1063
+ _host = None
1064
+
1065
+ _collection_formats: Dict[str, str] = {
1066
+ }
1067
+
1068
+ _path_params: Dict[str, str] = {}
1069
+ _query_params: List[Tuple[str, str]] = []
1070
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1071
+ _form_params: List[Tuple[str, str]] = []
1072
+ _files: Dict[
1073
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1074
+ ] = {}
1075
+ _body_params: Optional[bytes] = None
1076
+
1077
+ # process the path parameters
1078
+ if connection_id is not None:
1079
+ _path_params['connection_id'] = connection_id
1080
+ # process the query parameters
1081
+ # process the header parameters
1082
+ # process the form parameters
1083
+ # process the body parameter
1084
+
1085
+
1086
+ # set the HTTP header `Accept`
1087
+ if 'Accept' not in _header_params:
1088
+ _header_params['Accept'] = self.api_client.select_header_accept(
1089
+ [
1090
+ 'application/json'
1091
+ ]
1092
+ )
1093
+
1094
+
1095
+ # authentication setting
1096
+ _auth_settings: List[str] = [
1097
+ 'BearerAuth'
1098
+ ]
1099
+
1100
+ return self.api_client.param_serialize(
1101
+ method='GET',
1102
+ resource_path='/v1/connections/{connection_id}',
1103
+ path_params=_path_params,
1104
+ query_params=_query_params,
1105
+ header_params=_header_params,
1106
+ body=_body_params,
1107
+ post_params=_form_params,
1108
+ files=_files,
1109
+ auth_settings=_auth_settings,
1110
+ collection_formats=_collection_formats,
1111
+ _host=_host,
1112
+ _request_auth=_request_auth
1113
+ )
1114
+
1115
+
1116
+
1117
+
1118
+ @validate_call
1119
+ def get_table_profile(
1120
+ self,
1121
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1122
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
1123
+ table: Annotated[StrictStr, Field(description="Table name")],
1124
+ _request_timeout: Union[
1125
+ None,
1126
+ Annotated[StrictFloat, Field(gt=0)],
1127
+ Tuple[
1128
+ Annotated[StrictFloat, Field(gt=0)],
1129
+ Annotated[StrictFloat, Field(gt=0)]
1130
+ ]
1131
+ ] = None,
1132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1133
+ _content_type: Optional[StrictStr] = None,
1134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1136
+ ) -> TableProfileResponse:
1137
+ """Get table profile
1138
+
1139
+ Get column-level statistics for a synced table. Returns per-column profiles including cardinality, null counts, and type-specific details (distinct values for categorical columns, min/max for temporal/numeric, length stats for text). Profiles are computed at sync time.
1140
+
1141
+ :param connection_id: Connection ID (required)
1142
+ :type connection_id: str
1143
+ :param var_schema: Schema name (required)
1144
+ :type var_schema: str
1145
+ :param table: Table name (required)
1146
+ :type table: str
1147
+ :param _request_timeout: timeout setting for this request. If one
1148
+ number provided, it will be total request
1149
+ timeout. It can also be a pair (tuple) of
1150
+ (connection, read) timeouts.
1151
+ :type _request_timeout: int, tuple(int, int), optional
1152
+ :param _request_auth: set to override the auth_settings for an a single
1153
+ request; this effectively ignores the
1154
+ authentication in the spec for a single request.
1155
+ :type _request_auth: dict, optional
1156
+ :param _content_type: force content-type for the request.
1157
+ :type _content_type: str, Optional
1158
+ :param _headers: set to override the headers for a single
1159
+ request; this effectively ignores the headers
1160
+ in the spec for a single request.
1161
+ :type _headers: dict, optional
1162
+ :param _host_index: set to override the host_index for a single
1163
+ request; this effectively ignores the host_index
1164
+ in the spec for a single request.
1165
+ :type _host_index: int, optional
1166
+ :return: Returns the result object.
1167
+ """ # noqa: E501
1168
+
1169
+ _param = self._get_table_profile_serialize(
1170
+ connection_id=connection_id,
1171
+ var_schema=var_schema,
1172
+ table=table,
1173
+ _request_auth=_request_auth,
1174
+ _content_type=_content_type,
1175
+ _headers=_headers,
1176
+ _host_index=_host_index
1177
+ )
1178
+
1179
+ _response_types_map: Dict[str, Optional[str]] = {
1180
+ '200': "TableProfileResponse",
1181
+ '404': "ApiErrorResponse",
1182
+ }
1183
+ response_data = self.api_client.call_api(
1184
+ *_param,
1185
+ _request_timeout=_request_timeout
1186
+ )
1187
+ response_data.read()
1188
+ return self.api_client.response_deserialize(
1189
+ response_data=response_data,
1190
+ response_types_map=_response_types_map,
1191
+ ).data
1192
+
1193
+
1194
+ @validate_call
1195
+ def get_table_profile_with_http_info(
1196
+ self,
1197
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1198
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
1199
+ table: Annotated[StrictStr, Field(description="Table name")],
1200
+ _request_timeout: Union[
1201
+ None,
1202
+ Annotated[StrictFloat, Field(gt=0)],
1203
+ Tuple[
1204
+ Annotated[StrictFloat, Field(gt=0)],
1205
+ Annotated[StrictFloat, Field(gt=0)]
1206
+ ]
1207
+ ] = None,
1208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1209
+ _content_type: Optional[StrictStr] = None,
1210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1212
+ ) -> ApiResponse[TableProfileResponse]:
1213
+ """Get table profile
1214
+
1215
+ Get column-level statistics for a synced table. Returns per-column profiles including cardinality, null counts, and type-specific details (distinct values for categorical columns, min/max for temporal/numeric, length stats for text). Profiles are computed at sync time.
1216
+
1217
+ :param connection_id: Connection ID (required)
1218
+ :type connection_id: str
1219
+ :param var_schema: Schema name (required)
1220
+ :type var_schema: str
1221
+ :param table: Table name (required)
1222
+ :type table: str
1223
+ :param _request_timeout: timeout setting for this request. If one
1224
+ number provided, it will be total request
1225
+ timeout. It can also be a pair (tuple) of
1226
+ (connection, read) timeouts.
1227
+ :type _request_timeout: int, tuple(int, int), optional
1228
+ :param _request_auth: set to override the auth_settings for an a single
1229
+ request; this effectively ignores the
1230
+ authentication in the spec for a single request.
1231
+ :type _request_auth: dict, optional
1232
+ :param _content_type: force content-type for the request.
1233
+ :type _content_type: str, Optional
1234
+ :param _headers: set to override the headers for a single
1235
+ request; this effectively ignores the headers
1236
+ in the spec for a single request.
1237
+ :type _headers: dict, optional
1238
+ :param _host_index: set to override the host_index for a single
1239
+ request; this effectively ignores the host_index
1240
+ in the spec for a single request.
1241
+ :type _host_index: int, optional
1242
+ :return: Returns the result object.
1243
+ """ # noqa: E501
1244
+
1245
+ _param = self._get_table_profile_serialize(
1246
+ connection_id=connection_id,
1247
+ var_schema=var_schema,
1248
+ table=table,
1249
+ _request_auth=_request_auth,
1250
+ _content_type=_content_type,
1251
+ _headers=_headers,
1252
+ _host_index=_host_index
1253
+ )
1254
+
1255
+ _response_types_map: Dict[str, Optional[str]] = {
1256
+ '200': "TableProfileResponse",
1257
+ '404': "ApiErrorResponse",
1258
+ }
1259
+ response_data = self.api_client.call_api(
1260
+ *_param,
1261
+ _request_timeout=_request_timeout
1262
+ )
1263
+ response_data.read()
1264
+ return self.api_client.response_deserialize(
1265
+ response_data=response_data,
1266
+ response_types_map=_response_types_map,
1267
+ )
1268
+
1269
+
1270
+ @validate_call
1271
+ def get_table_profile_without_preload_content(
1272
+ self,
1273
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1274
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
1275
+ table: Annotated[StrictStr, Field(description="Table name")],
1276
+ _request_timeout: Union[
1277
+ None,
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Tuple[
1280
+ Annotated[StrictFloat, Field(gt=0)],
1281
+ Annotated[StrictFloat, Field(gt=0)]
1282
+ ]
1283
+ ] = None,
1284
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1285
+ _content_type: Optional[StrictStr] = None,
1286
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1287
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1288
+ ) -> RESTResponseType:
1289
+ """Get table profile
1290
+
1291
+ Get column-level statistics for a synced table. Returns per-column profiles including cardinality, null counts, and type-specific details (distinct values for categorical columns, min/max for temporal/numeric, length stats for text). Profiles are computed at sync time.
1292
+
1293
+ :param connection_id: Connection ID (required)
1294
+ :type connection_id: str
1295
+ :param var_schema: Schema name (required)
1296
+ :type var_schema: str
1297
+ :param table: Table name (required)
1298
+ :type table: str
1299
+ :param _request_timeout: timeout setting for this request. If one
1300
+ number provided, it will be total request
1301
+ timeout. It can also be a pair (tuple) of
1302
+ (connection, read) timeouts.
1303
+ :type _request_timeout: int, tuple(int, int), optional
1304
+ :param _request_auth: set to override the auth_settings for an a single
1305
+ request; this effectively ignores the
1306
+ authentication in the spec for a single request.
1307
+ :type _request_auth: dict, optional
1308
+ :param _content_type: force content-type for the request.
1309
+ :type _content_type: str, Optional
1310
+ :param _headers: set to override the headers for a single
1311
+ request; this effectively ignores the headers
1312
+ in the spec for a single request.
1313
+ :type _headers: dict, optional
1314
+ :param _host_index: set to override the host_index for a single
1315
+ request; this effectively ignores the host_index
1316
+ in the spec for a single request.
1317
+ :type _host_index: int, optional
1318
+ :return: Returns the result object.
1319
+ """ # noqa: E501
1320
+
1321
+ _param = self._get_table_profile_serialize(
1322
+ connection_id=connection_id,
1323
+ var_schema=var_schema,
1324
+ table=table,
1325
+ _request_auth=_request_auth,
1326
+ _content_type=_content_type,
1327
+ _headers=_headers,
1328
+ _host_index=_host_index
1329
+ )
1330
+
1331
+ _response_types_map: Dict[str, Optional[str]] = {
1332
+ '200': "TableProfileResponse",
1333
+ '404': "ApiErrorResponse",
1334
+ }
1335
+ response_data = self.api_client.call_api(
1336
+ *_param,
1337
+ _request_timeout=_request_timeout
1338
+ )
1339
+ return response_data.response
1340
+
1341
+
1342
+ def _get_table_profile_serialize(
1343
+ self,
1344
+ connection_id,
1345
+ var_schema,
1346
+ table,
1347
+ _request_auth,
1348
+ _content_type,
1349
+ _headers,
1350
+ _host_index,
1351
+ ) -> RequestSerialized:
1352
+
1353
+ _host = None
1354
+
1355
+ _collection_formats: Dict[str, str] = {
1356
+ }
1357
+
1358
+ _path_params: Dict[str, str] = {}
1359
+ _query_params: List[Tuple[str, str]] = []
1360
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1361
+ _form_params: List[Tuple[str, str]] = []
1362
+ _files: Dict[
1363
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1364
+ ] = {}
1365
+ _body_params: Optional[bytes] = None
1366
+
1367
+ # process the path parameters
1368
+ if connection_id is not None:
1369
+ _path_params['connection_id'] = connection_id
1370
+ if var_schema is not None:
1371
+ _path_params['schema'] = var_schema
1372
+ if table is not None:
1373
+ _path_params['table'] = table
1374
+ # process the query parameters
1375
+ # process the header parameters
1376
+ # process the form parameters
1377
+ # process the body parameter
1378
+
1379
+
1380
+ # set the HTTP header `Accept`
1381
+ if 'Accept' not in _header_params:
1382
+ _header_params['Accept'] = self.api_client.select_header_accept(
1383
+ [
1384
+ 'application/json'
1385
+ ]
1386
+ )
1387
+
1388
+
1389
+ # authentication setting
1390
+ _auth_settings: List[str] = [
1391
+ 'BearerAuth'
1392
+ ]
1393
+
1394
+ return self.api_client.param_serialize(
1395
+ method='GET',
1396
+ resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/profile',
1397
+ path_params=_path_params,
1398
+ query_params=_query_params,
1399
+ header_params=_header_params,
1400
+ body=_body_params,
1401
+ post_params=_form_params,
1402
+ files=_files,
1403
+ auth_settings=_auth_settings,
1404
+ collection_formats=_collection_formats,
1405
+ _host=_host,
1406
+ _request_auth=_request_auth
1407
+ )
1408
+
1409
+
1410
+
1411
+
1412
+ @validate_call
1413
+ def list_connections(
1414
+ self,
1415
+ _request_timeout: Union[
1416
+ None,
1417
+ Annotated[StrictFloat, Field(gt=0)],
1418
+ Tuple[
1419
+ Annotated[StrictFloat, Field(gt=0)],
1420
+ Annotated[StrictFloat, Field(gt=0)]
1421
+ ]
1422
+ ] = None,
1423
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1424
+ _content_type: Optional[StrictStr] = None,
1425
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1426
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1427
+ ) -> ListConnectionsResponse:
1428
+ """List connections
1429
+
1430
+ List all registered database connections.
1431
+
1432
+ :param _request_timeout: timeout setting for this request. If one
1433
+ number provided, it will be total request
1434
+ timeout. It can also be a pair (tuple) of
1435
+ (connection, read) timeouts.
1436
+ :type _request_timeout: int, tuple(int, int), optional
1437
+ :param _request_auth: set to override the auth_settings for an a single
1438
+ request; this effectively ignores the
1439
+ authentication in the spec for a single request.
1440
+ :type _request_auth: dict, optional
1441
+ :param _content_type: force content-type for the request.
1442
+ :type _content_type: str, Optional
1443
+ :param _headers: set to override the headers for a single
1444
+ request; this effectively ignores the headers
1445
+ in the spec for a single request.
1446
+ :type _headers: dict, optional
1447
+ :param _host_index: set to override the host_index for a single
1448
+ request; this effectively ignores the host_index
1449
+ in the spec for a single request.
1450
+ :type _host_index: int, optional
1451
+ :return: Returns the result object.
1452
+ """ # noqa: E501
1453
+
1454
+ _param = self._list_connections_serialize(
1455
+ _request_auth=_request_auth,
1456
+ _content_type=_content_type,
1457
+ _headers=_headers,
1458
+ _host_index=_host_index
1459
+ )
1460
+
1461
+ _response_types_map: Dict[str, Optional[str]] = {
1462
+ '200': "ListConnectionsResponse",
1463
+ }
1464
+ response_data = self.api_client.call_api(
1465
+ *_param,
1466
+ _request_timeout=_request_timeout
1467
+ )
1468
+ response_data.read()
1469
+ return self.api_client.response_deserialize(
1470
+ response_data=response_data,
1471
+ response_types_map=_response_types_map,
1472
+ ).data
1473
+
1474
+
1475
+ @validate_call
1476
+ def list_connections_with_http_info(
1477
+ self,
1478
+ _request_timeout: Union[
1479
+ None,
1480
+ Annotated[StrictFloat, Field(gt=0)],
1481
+ Tuple[
1482
+ Annotated[StrictFloat, Field(gt=0)],
1483
+ Annotated[StrictFloat, Field(gt=0)]
1484
+ ]
1485
+ ] = None,
1486
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1487
+ _content_type: Optional[StrictStr] = None,
1488
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1489
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1490
+ ) -> ApiResponse[ListConnectionsResponse]:
1491
+ """List connections
1492
+
1493
+ List all registered database connections.
1494
+
1495
+ :param _request_timeout: timeout setting for this request. If one
1496
+ number provided, it will be total request
1497
+ timeout. It can also be a pair (tuple) of
1498
+ (connection, read) timeouts.
1499
+ :type _request_timeout: int, tuple(int, int), optional
1500
+ :param _request_auth: set to override the auth_settings for an a single
1501
+ request; this effectively ignores the
1502
+ authentication in the spec for a single request.
1503
+ :type _request_auth: dict, optional
1504
+ :param _content_type: force content-type for the request.
1505
+ :type _content_type: str, Optional
1506
+ :param _headers: set to override the headers for a single
1507
+ request; this effectively ignores the headers
1508
+ in the spec for a single request.
1509
+ :type _headers: dict, optional
1510
+ :param _host_index: set to override the host_index for a single
1511
+ request; this effectively ignores the host_index
1512
+ in the spec for a single request.
1513
+ :type _host_index: int, optional
1514
+ :return: Returns the result object.
1515
+ """ # noqa: E501
1516
+
1517
+ _param = self._list_connections_serialize(
1518
+ _request_auth=_request_auth,
1519
+ _content_type=_content_type,
1520
+ _headers=_headers,
1521
+ _host_index=_host_index
1522
+ )
1523
+
1524
+ _response_types_map: Dict[str, Optional[str]] = {
1525
+ '200': "ListConnectionsResponse",
1526
+ }
1527
+ response_data = self.api_client.call_api(
1528
+ *_param,
1529
+ _request_timeout=_request_timeout
1530
+ )
1531
+ response_data.read()
1532
+ return self.api_client.response_deserialize(
1533
+ response_data=response_data,
1534
+ response_types_map=_response_types_map,
1535
+ )
1536
+
1537
+
1538
+ @validate_call
1539
+ def list_connections_without_preload_content(
1540
+ self,
1541
+ _request_timeout: Union[
1542
+ None,
1543
+ Annotated[StrictFloat, Field(gt=0)],
1544
+ Tuple[
1545
+ Annotated[StrictFloat, Field(gt=0)],
1546
+ Annotated[StrictFloat, Field(gt=0)]
1547
+ ]
1548
+ ] = None,
1549
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1550
+ _content_type: Optional[StrictStr] = None,
1551
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1552
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1553
+ ) -> RESTResponseType:
1554
+ """List connections
1555
+
1556
+ List all registered database connections.
1557
+
1558
+ :param _request_timeout: timeout setting for this request. If one
1559
+ number provided, it will be total request
1560
+ timeout. It can also be a pair (tuple) of
1561
+ (connection, read) timeouts.
1562
+ :type _request_timeout: int, tuple(int, int), optional
1563
+ :param _request_auth: set to override the auth_settings for an a single
1564
+ request; this effectively ignores the
1565
+ authentication in the spec for a single request.
1566
+ :type _request_auth: dict, optional
1567
+ :param _content_type: force content-type for the request.
1568
+ :type _content_type: str, Optional
1569
+ :param _headers: set to override the headers for a single
1570
+ request; this effectively ignores the headers
1571
+ in the spec for a single request.
1572
+ :type _headers: dict, optional
1573
+ :param _host_index: set to override the host_index for a single
1574
+ request; this effectively ignores the host_index
1575
+ in the spec for a single request.
1576
+ :type _host_index: int, optional
1577
+ :return: Returns the result object.
1578
+ """ # noqa: E501
1579
+
1580
+ _param = self._list_connections_serialize(
1581
+ _request_auth=_request_auth,
1582
+ _content_type=_content_type,
1583
+ _headers=_headers,
1584
+ _host_index=_host_index
1585
+ )
1586
+
1587
+ _response_types_map: Dict[str, Optional[str]] = {
1588
+ '200': "ListConnectionsResponse",
1589
+ }
1590
+ response_data = self.api_client.call_api(
1591
+ *_param,
1592
+ _request_timeout=_request_timeout
1593
+ )
1594
+ return response_data.response
1595
+
1596
+
1597
+ def _list_connections_serialize(
1598
+ self,
1599
+ _request_auth,
1600
+ _content_type,
1601
+ _headers,
1602
+ _host_index,
1603
+ ) -> RequestSerialized:
1604
+
1605
+ _host = None
1606
+
1607
+ _collection_formats: Dict[str, str] = {
1608
+ }
1609
+
1610
+ _path_params: Dict[str, str] = {}
1611
+ _query_params: List[Tuple[str, str]] = []
1612
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1613
+ _form_params: List[Tuple[str, str]] = []
1614
+ _files: Dict[
1615
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1616
+ ] = {}
1617
+ _body_params: Optional[bytes] = None
1618
+
1619
+ # process the path parameters
1620
+ # process the query parameters
1621
+ # process the header parameters
1622
+ # process the form parameters
1623
+ # process the body parameter
1624
+
1625
+
1626
+ # set the HTTP header `Accept`
1627
+ if 'Accept' not in _header_params:
1628
+ _header_params['Accept'] = self.api_client.select_header_accept(
1629
+ [
1630
+ 'application/json'
1631
+ ]
1632
+ )
1633
+
1634
+
1635
+ # authentication setting
1636
+ _auth_settings: List[str] = [
1637
+ 'BearerAuth'
1638
+ ]
1639
+
1640
+ return self.api_client.param_serialize(
1641
+ method='GET',
1642
+ resource_path='/v1/connections',
1643
+ path_params=_path_params,
1644
+ query_params=_query_params,
1645
+ header_params=_header_params,
1646
+ body=_body_params,
1647
+ post_params=_form_params,
1648
+ files=_files,
1649
+ auth_settings=_auth_settings,
1650
+ collection_formats=_collection_formats,
1651
+ _host=_host,
1652
+ _request_auth=_request_auth
1653
+ )
1654
+
1655
+
1656
+
1657
+
1658
+ @validate_call
1659
+ def purge_connection_cache(
1660
+ self,
1661
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1662
+ _request_timeout: Union[
1663
+ None,
1664
+ Annotated[StrictFloat, Field(gt=0)],
1665
+ Tuple[
1666
+ Annotated[StrictFloat, Field(gt=0)],
1667
+ Annotated[StrictFloat, Field(gt=0)]
1668
+ ]
1669
+ ] = None,
1670
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1671
+ _content_type: Optional[StrictStr] = None,
1672
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1673
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1674
+ ) -> None:
1675
+ """Purge connection cache
1676
+
1677
+ Purge all cached data for a connection. The next query against these tables will trigger a fresh sync from the remote source.
1678
+
1679
+ :param connection_id: Connection ID (required)
1680
+ :type connection_id: str
1681
+ :param _request_timeout: timeout setting for this request. If one
1682
+ number provided, it will be total request
1683
+ timeout. It can also be a pair (tuple) of
1684
+ (connection, read) timeouts.
1685
+ :type _request_timeout: int, tuple(int, int), optional
1686
+ :param _request_auth: set to override the auth_settings for an a single
1687
+ request; this effectively ignores the
1688
+ authentication in the spec for a single request.
1689
+ :type _request_auth: dict, optional
1690
+ :param _content_type: force content-type for the request.
1691
+ :type _content_type: str, Optional
1692
+ :param _headers: set to override the headers for a single
1693
+ request; this effectively ignores the headers
1694
+ in the spec for a single request.
1695
+ :type _headers: dict, optional
1696
+ :param _host_index: set to override the host_index for a single
1697
+ request; this effectively ignores the host_index
1698
+ in the spec for a single request.
1699
+ :type _host_index: int, optional
1700
+ :return: Returns the result object.
1701
+ """ # noqa: E501
1702
+
1703
+ _param = self._purge_connection_cache_serialize(
1704
+ connection_id=connection_id,
1705
+ _request_auth=_request_auth,
1706
+ _content_type=_content_type,
1707
+ _headers=_headers,
1708
+ _host_index=_host_index
1709
+ )
1710
+
1711
+ _response_types_map: Dict[str, Optional[str]] = {
1712
+ '204': None,
1713
+ '404': "ApiErrorResponse",
1714
+ }
1715
+ response_data = self.api_client.call_api(
1716
+ *_param,
1717
+ _request_timeout=_request_timeout
1718
+ )
1719
+ response_data.read()
1720
+ return self.api_client.response_deserialize(
1721
+ response_data=response_data,
1722
+ response_types_map=_response_types_map,
1723
+ ).data
1724
+
1725
+
1726
+ @validate_call
1727
+ def purge_connection_cache_with_http_info(
1728
+ self,
1729
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1730
+ _request_timeout: Union[
1731
+ None,
1732
+ Annotated[StrictFloat, Field(gt=0)],
1733
+ Tuple[
1734
+ Annotated[StrictFloat, Field(gt=0)],
1735
+ Annotated[StrictFloat, Field(gt=0)]
1736
+ ]
1737
+ ] = None,
1738
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1739
+ _content_type: Optional[StrictStr] = None,
1740
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1741
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1742
+ ) -> ApiResponse[None]:
1743
+ """Purge connection cache
1744
+
1745
+ Purge all cached data for a connection. The next query against these tables will trigger a fresh sync from the remote source.
1746
+
1747
+ :param connection_id: Connection ID (required)
1748
+ :type connection_id: str
1749
+ :param _request_timeout: timeout setting for this request. If one
1750
+ number provided, it will be total request
1751
+ timeout. It can also be a pair (tuple) of
1752
+ (connection, read) timeouts.
1753
+ :type _request_timeout: int, tuple(int, int), optional
1754
+ :param _request_auth: set to override the auth_settings for an a single
1755
+ request; this effectively ignores the
1756
+ authentication in the spec for a single request.
1757
+ :type _request_auth: dict, optional
1758
+ :param _content_type: force content-type for the request.
1759
+ :type _content_type: str, Optional
1760
+ :param _headers: set to override the headers for a single
1761
+ request; this effectively ignores the headers
1762
+ in the spec for a single request.
1763
+ :type _headers: dict, optional
1764
+ :param _host_index: set to override the host_index for a single
1765
+ request; this effectively ignores the host_index
1766
+ in the spec for a single request.
1767
+ :type _host_index: int, optional
1768
+ :return: Returns the result object.
1769
+ """ # noqa: E501
1770
+
1771
+ _param = self._purge_connection_cache_serialize(
1772
+ connection_id=connection_id,
1773
+ _request_auth=_request_auth,
1774
+ _content_type=_content_type,
1775
+ _headers=_headers,
1776
+ _host_index=_host_index
1777
+ )
1778
+
1779
+ _response_types_map: Dict[str, Optional[str]] = {
1780
+ '204': None,
1781
+ '404': "ApiErrorResponse",
1782
+ }
1783
+ response_data = self.api_client.call_api(
1784
+ *_param,
1785
+ _request_timeout=_request_timeout
1786
+ )
1787
+ response_data.read()
1788
+ return self.api_client.response_deserialize(
1789
+ response_data=response_data,
1790
+ response_types_map=_response_types_map,
1791
+ )
1792
+
1793
+
1794
+ @validate_call
1795
+ def purge_connection_cache_without_preload_content(
1796
+ self,
1797
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1798
+ _request_timeout: Union[
1799
+ None,
1800
+ Annotated[StrictFloat, Field(gt=0)],
1801
+ Tuple[
1802
+ Annotated[StrictFloat, Field(gt=0)],
1803
+ Annotated[StrictFloat, Field(gt=0)]
1804
+ ]
1805
+ ] = None,
1806
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1807
+ _content_type: Optional[StrictStr] = None,
1808
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1809
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1810
+ ) -> RESTResponseType:
1811
+ """Purge connection cache
1812
+
1813
+ Purge all cached data for a connection. The next query against these tables will trigger a fresh sync from the remote source.
1814
+
1815
+ :param connection_id: Connection ID (required)
1816
+ :type connection_id: str
1817
+ :param _request_timeout: timeout setting for this request. If one
1818
+ number provided, it will be total request
1819
+ timeout. It can also be a pair (tuple) of
1820
+ (connection, read) timeouts.
1821
+ :type _request_timeout: int, tuple(int, int), optional
1822
+ :param _request_auth: set to override the auth_settings for an a single
1823
+ request; this effectively ignores the
1824
+ authentication in the spec for a single request.
1825
+ :type _request_auth: dict, optional
1826
+ :param _content_type: force content-type for the request.
1827
+ :type _content_type: str, Optional
1828
+ :param _headers: set to override the headers for a single
1829
+ request; this effectively ignores the headers
1830
+ in the spec for a single request.
1831
+ :type _headers: dict, optional
1832
+ :param _host_index: set to override the host_index for a single
1833
+ request; this effectively ignores the host_index
1834
+ in the spec for a single request.
1835
+ :type _host_index: int, optional
1836
+ :return: Returns the result object.
1837
+ """ # noqa: E501
1838
+
1839
+ _param = self._purge_connection_cache_serialize(
1840
+ connection_id=connection_id,
1841
+ _request_auth=_request_auth,
1842
+ _content_type=_content_type,
1843
+ _headers=_headers,
1844
+ _host_index=_host_index
1845
+ )
1846
+
1847
+ _response_types_map: Dict[str, Optional[str]] = {
1848
+ '204': None,
1849
+ '404': "ApiErrorResponse",
1850
+ }
1851
+ response_data = self.api_client.call_api(
1852
+ *_param,
1853
+ _request_timeout=_request_timeout
1854
+ )
1855
+ return response_data.response
1856
+
1857
+
1858
+ def _purge_connection_cache_serialize(
1859
+ self,
1860
+ connection_id,
1861
+ _request_auth,
1862
+ _content_type,
1863
+ _headers,
1864
+ _host_index,
1865
+ ) -> RequestSerialized:
1866
+
1867
+ _host = None
1868
+
1869
+ _collection_formats: Dict[str, str] = {
1870
+ }
1871
+
1872
+ _path_params: Dict[str, str] = {}
1873
+ _query_params: List[Tuple[str, str]] = []
1874
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1875
+ _form_params: List[Tuple[str, str]] = []
1876
+ _files: Dict[
1877
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1878
+ ] = {}
1879
+ _body_params: Optional[bytes] = None
1880
+
1881
+ # process the path parameters
1882
+ if connection_id is not None:
1883
+ _path_params['connection_id'] = connection_id
1884
+ # process the query parameters
1885
+ # process the header parameters
1886
+ # process the form parameters
1887
+ # process the body parameter
1888
+
1889
+
1890
+ # set the HTTP header `Accept`
1891
+ if 'Accept' not in _header_params:
1892
+ _header_params['Accept'] = self.api_client.select_header_accept(
1893
+ [
1894
+ 'application/json'
1895
+ ]
1896
+ )
1897
+
1898
+
1899
+ # authentication setting
1900
+ _auth_settings: List[str] = [
1901
+ 'BearerAuth'
1902
+ ]
1903
+
1904
+ return self.api_client.param_serialize(
1905
+ method='DELETE',
1906
+ resource_path='/v1/connections/{connection_id}/cache',
1907
+ path_params=_path_params,
1908
+ query_params=_query_params,
1909
+ header_params=_header_params,
1910
+ body=_body_params,
1911
+ post_params=_form_params,
1912
+ files=_files,
1913
+ auth_settings=_auth_settings,
1914
+ collection_formats=_collection_formats,
1915
+ _host=_host,
1916
+ _request_auth=_request_auth
1917
+ )
1918
+
1919
+
1920
+
1921
+
1922
+ @validate_call
1923
+ def purge_table_cache(
1924
+ self,
1925
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
1926
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
1927
+ table: Annotated[StrictStr, Field(description="Table name")],
1928
+ _request_timeout: Union[
1929
+ None,
1930
+ Annotated[StrictFloat, Field(gt=0)],
1931
+ Tuple[
1932
+ Annotated[StrictFloat, Field(gt=0)],
1933
+ Annotated[StrictFloat, Field(gt=0)]
1934
+ ]
1935
+ ] = None,
1936
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1937
+ _content_type: Optional[StrictStr] = None,
1938
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1939
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1940
+ ) -> None:
1941
+ """Purge table cache
1942
+
1943
+ Purge the cached data for a single table. The next query will trigger a fresh sync.
1944
+
1945
+ :param connection_id: Connection ID (required)
1946
+ :type connection_id: str
1947
+ :param var_schema: Schema name (required)
1948
+ :type var_schema: str
1949
+ :param table: Table name (required)
1950
+ :type table: str
1951
+ :param _request_timeout: timeout setting for this request. If one
1952
+ number provided, it will be total request
1953
+ timeout. It can also be a pair (tuple) of
1954
+ (connection, read) timeouts.
1955
+ :type _request_timeout: int, tuple(int, int), optional
1956
+ :param _request_auth: set to override the auth_settings for an a single
1957
+ request; this effectively ignores the
1958
+ authentication in the spec for a single request.
1959
+ :type _request_auth: dict, optional
1960
+ :param _content_type: force content-type for the request.
1961
+ :type _content_type: str, Optional
1962
+ :param _headers: set to override the headers for a single
1963
+ request; this effectively ignores the headers
1964
+ in the spec for a single request.
1965
+ :type _headers: dict, optional
1966
+ :param _host_index: set to override the host_index for a single
1967
+ request; this effectively ignores the host_index
1968
+ in the spec for a single request.
1969
+ :type _host_index: int, optional
1970
+ :return: Returns the result object.
1971
+ """ # noqa: E501
1972
+
1973
+ _param = self._purge_table_cache_serialize(
1974
+ connection_id=connection_id,
1975
+ var_schema=var_schema,
1976
+ table=table,
1977
+ _request_auth=_request_auth,
1978
+ _content_type=_content_type,
1979
+ _headers=_headers,
1980
+ _host_index=_host_index
1981
+ )
1982
+
1983
+ _response_types_map: Dict[str, Optional[str]] = {
1984
+ '204': None,
1985
+ '404': "ApiErrorResponse",
1986
+ }
1987
+ response_data = self.api_client.call_api(
1988
+ *_param,
1989
+ _request_timeout=_request_timeout
1990
+ )
1991
+ response_data.read()
1992
+ return self.api_client.response_deserialize(
1993
+ response_data=response_data,
1994
+ response_types_map=_response_types_map,
1995
+ ).data
1996
+
1997
+
1998
+ @validate_call
1999
+ def purge_table_cache_with_http_info(
2000
+ self,
2001
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
2002
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
2003
+ table: Annotated[StrictStr, Field(description="Table name")],
2004
+ _request_timeout: Union[
2005
+ None,
2006
+ Annotated[StrictFloat, Field(gt=0)],
2007
+ Tuple[
2008
+ Annotated[StrictFloat, Field(gt=0)],
2009
+ Annotated[StrictFloat, Field(gt=0)]
2010
+ ]
2011
+ ] = None,
2012
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2013
+ _content_type: Optional[StrictStr] = None,
2014
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2015
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2016
+ ) -> ApiResponse[None]:
2017
+ """Purge table cache
2018
+
2019
+ Purge the cached data for a single table. The next query will trigger a fresh sync.
2020
+
2021
+ :param connection_id: Connection ID (required)
2022
+ :type connection_id: str
2023
+ :param var_schema: Schema name (required)
2024
+ :type var_schema: str
2025
+ :param table: Table name (required)
2026
+ :type table: str
2027
+ :param _request_timeout: timeout setting for this request. If one
2028
+ number provided, it will be total request
2029
+ timeout. It can also be a pair (tuple) of
2030
+ (connection, read) timeouts.
2031
+ :type _request_timeout: int, tuple(int, int), optional
2032
+ :param _request_auth: set to override the auth_settings for an a single
2033
+ request; this effectively ignores the
2034
+ authentication in the spec for a single request.
2035
+ :type _request_auth: dict, optional
2036
+ :param _content_type: force content-type for the request.
2037
+ :type _content_type: str, Optional
2038
+ :param _headers: set to override the headers for a single
2039
+ request; this effectively ignores the headers
2040
+ in the spec for a single request.
2041
+ :type _headers: dict, optional
2042
+ :param _host_index: set to override the host_index for a single
2043
+ request; this effectively ignores the host_index
2044
+ in the spec for a single request.
2045
+ :type _host_index: int, optional
2046
+ :return: Returns the result object.
2047
+ """ # noqa: E501
2048
+
2049
+ _param = self._purge_table_cache_serialize(
2050
+ connection_id=connection_id,
2051
+ var_schema=var_schema,
2052
+ table=table,
2053
+ _request_auth=_request_auth,
2054
+ _content_type=_content_type,
2055
+ _headers=_headers,
2056
+ _host_index=_host_index
2057
+ )
2058
+
2059
+ _response_types_map: Dict[str, Optional[str]] = {
2060
+ '204': None,
2061
+ '404': "ApiErrorResponse",
2062
+ }
2063
+ response_data = self.api_client.call_api(
2064
+ *_param,
2065
+ _request_timeout=_request_timeout
2066
+ )
2067
+ response_data.read()
2068
+ return self.api_client.response_deserialize(
2069
+ response_data=response_data,
2070
+ response_types_map=_response_types_map,
2071
+ )
2072
+
2073
+
2074
+ @validate_call
2075
+ def purge_table_cache_without_preload_content(
2076
+ self,
2077
+ connection_id: Annotated[StrictStr, Field(description="Connection ID")],
2078
+ var_schema: Annotated[StrictStr, Field(description="Schema name")],
2079
+ table: Annotated[StrictStr, Field(description="Table name")],
2080
+ _request_timeout: Union[
2081
+ None,
2082
+ Annotated[StrictFloat, Field(gt=0)],
2083
+ Tuple[
2084
+ Annotated[StrictFloat, Field(gt=0)],
2085
+ Annotated[StrictFloat, Field(gt=0)]
2086
+ ]
2087
+ ] = None,
2088
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2089
+ _content_type: Optional[StrictStr] = None,
2090
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2091
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2092
+ ) -> RESTResponseType:
2093
+ """Purge table cache
2094
+
2095
+ Purge the cached data for a single table. The next query will trigger a fresh sync.
2096
+
2097
+ :param connection_id: Connection ID (required)
2098
+ :type connection_id: str
2099
+ :param var_schema: Schema name (required)
2100
+ :type var_schema: str
2101
+ :param table: Table name (required)
2102
+ :type table: str
2103
+ :param _request_timeout: timeout setting for this request. If one
2104
+ number provided, it will be total request
2105
+ timeout. It can also be a pair (tuple) of
2106
+ (connection, read) timeouts.
2107
+ :type _request_timeout: int, tuple(int, int), optional
2108
+ :param _request_auth: set to override the auth_settings for an a single
2109
+ request; this effectively ignores the
2110
+ authentication in the spec for a single request.
2111
+ :type _request_auth: dict, optional
2112
+ :param _content_type: force content-type for the request.
2113
+ :type _content_type: str, Optional
2114
+ :param _headers: set to override the headers for a single
2115
+ request; this effectively ignores the headers
2116
+ in the spec for a single request.
2117
+ :type _headers: dict, optional
2118
+ :param _host_index: set to override the host_index for a single
2119
+ request; this effectively ignores the host_index
2120
+ in the spec for a single request.
2121
+ :type _host_index: int, optional
2122
+ :return: Returns the result object.
2123
+ """ # noqa: E501
2124
+
2125
+ _param = self._purge_table_cache_serialize(
2126
+ connection_id=connection_id,
2127
+ var_schema=var_schema,
2128
+ table=table,
2129
+ _request_auth=_request_auth,
2130
+ _content_type=_content_type,
2131
+ _headers=_headers,
2132
+ _host_index=_host_index
2133
+ )
2134
+
2135
+ _response_types_map: Dict[str, Optional[str]] = {
2136
+ '204': None,
2137
+ '404': "ApiErrorResponse",
2138
+ }
2139
+ response_data = self.api_client.call_api(
2140
+ *_param,
2141
+ _request_timeout=_request_timeout
2142
+ )
2143
+ return response_data.response
2144
+
2145
+
2146
+ def _purge_table_cache_serialize(
2147
+ self,
2148
+ connection_id,
2149
+ var_schema,
2150
+ table,
2151
+ _request_auth,
2152
+ _content_type,
2153
+ _headers,
2154
+ _host_index,
2155
+ ) -> RequestSerialized:
2156
+
2157
+ _host = None
2158
+
2159
+ _collection_formats: Dict[str, str] = {
2160
+ }
2161
+
2162
+ _path_params: Dict[str, str] = {}
2163
+ _query_params: List[Tuple[str, str]] = []
2164
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2165
+ _form_params: List[Tuple[str, str]] = []
2166
+ _files: Dict[
2167
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2168
+ ] = {}
2169
+ _body_params: Optional[bytes] = None
2170
+
2171
+ # process the path parameters
2172
+ if connection_id is not None:
2173
+ _path_params['connection_id'] = connection_id
2174
+ if var_schema is not None:
2175
+ _path_params['schema'] = var_schema
2176
+ if table is not None:
2177
+ _path_params['table'] = table
2178
+ # process the query parameters
2179
+ # process the header parameters
2180
+ # process the form parameters
2181
+ # process the body parameter
2182
+
2183
+
2184
+ # set the HTTP header `Accept`
2185
+ if 'Accept' not in _header_params:
2186
+ _header_params['Accept'] = self.api_client.select_header_accept(
2187
+ [
2188
+ 'application/json'
2189
+ ]
2190
+ )
2191
+
2192
+
2193
+ # authentication setting
2194
+ _auth_settings: List[str] = [
2195
+ 'BearerAuth'
2196
+ ]
2197
+
2198
+ return self.api_client.param_serialize(
2199
+ method='DELETE',
2200
+ resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/cache',
2201
+ path_params=_path_params,
2202
+ query_params=_query_params,
2203
+ header_params=_header_params,
2204
+ body=_body_params,
2205
+ post_params=_form_params,
2206
+ files=_files,
2207
+ auth_settings=_auth_settings,
2208
+ collection_formats=_collection_formats,
2209
+ _host=_host,
2210
+ _request_auth=_request_auth
2211
+ )
2212
+
2213
+