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,1380 @@
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_secret_request import CreateSecretRequest
22
+ from hotdata.models.create_secret_response import CreateSecretResponse
23
+ from hotdata.models.get_secret_response import GetSecretResponse
24
+ from hotdata.models.list_secrets_response import ListSecretsResponse
25
+ from hotdata.models.update_secret_request import UpdateSecretRequest
26
+ from hotdata.models.update_secret_response import UpdateSecretResponse
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 SecretsApi:
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 create_secret(
48
+ self,
49
+ create_secret_request: CreateSecretRequest,
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
+ ) -> CreateSecretResponse:
63
+ """Create secret
64
+
65
+ Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique.
66
+
67
+ :param create_secret_request: (required)
68
+ :type create_secret_request: CreateSecretRequest
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._create_secret_serialize(
92
+ create_secret_request=create_secret_request,
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
+ '201': "CreateSecretResponse",
101
+ '409': "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 create_secret_with_http_info(
116
+ self,
117
+ create_secret_request: CreateSecretRequest,
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[CreateSecretResponse]:
131
+ """Create secret
132
+
133
+ Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique.
134
+
135
+ :param create_secret_request: (required)
136
+ :type create_secret_request: CreateSecretRequest
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._create_secret_serialize(
160
+ create_secret_request=create_secret_request,
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
+ '201': "CreateSecretResponse",
169
+ '409': "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 create_secret_without_preload_content(
184
+ self,
185
+ create_secret_request: CreateSecretRequest,
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
+ """Create secret
200
+
201
+ Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique.
202
+
203
+ :param create_secret_request: (required)
204
+ :type create_secret_request: CreateSecretRequest
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._create_secret_serialize(
228
+ create_secret_request=create_secret_request,
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
+ '201': "CreateSecretResponse",
237
+ '409': "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 _create_secret_serialize(
247
+ self,
248
+ create_secret_request,
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
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+ if create_secret_request is not None:
275
+ _body_params = create_secret_request
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
+ # set the HTTP header `Content-Type`
287
+ if _content_type:
288
+ _header_params['Content-Type'] = _content_type
289
+ else:
290
+ _default_content_type = (
291
+ self.api_client.select_header_content_type(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+ )
297
+ if _default_content_type is not None:
298
+ _header_params['Content-Type'] = _default_content_type
299
+
300
+ # authentication setting
301
+ _auth_settings: List[str] = [
302
+ 'BearerAuth'
303
+ ]
304
+
305
+ return self.api_client.param_serialize(
306
+ method='POST',
307
+ resource_path='/v1/secrets',
308
+ path_params=_path_params,
309
+ query_params=_query_params,
310
+ header_params=_header_params,
311
+ body=_body_params,
312
+ post_params=_form_params,
313
+ files=_files,
314
+ auth_settings=_auth_settings,
315
+ collection_formats=_collection_formats,
316
+ _host=_host,
317
+ _request_auth=_request_auth
318
+ )
319
+
320
+
321
+
322
+
323
+ @validate_call
324
+ def delete_secret(
325
+ self,
326
+ name: Annotated[StrictStr, Field(description="Secret name")],
327
+ _request_timeout: Union[
328
+ None,
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Tuple[
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Annotated[StrictFloat, Field(gt=0)]
333
+ ]
334
+ ] = None,
335
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
336
+ _content_type: Optional[StrictStr] = None,
337
+ _headers: Optional[Dict[StrictStr, Any]] = None,
338
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
339
+ ) -> None:
340
+ """Delete secret
341
+
342
+
343
+ :param name: Secret name (required)
344
+ :type name: str
345
+ :param _request_timeout: timeout setting for this request. If one
346
+ number provided, it will be total request
347
+ timeout. It can also be a pair (tuple) of
348
+ (connection, read) timeouts.
349
+ :type _request_timeout: int, tuple(int, int), optional
350
+ :param _request_auth: set to override the auth_settings for an a single
351
+ request; this effectively ignores the
352
+ authentication in the spec for a single request.
353
+ :type _request_auth: dict, optional
354
+ :param _content_type: force content-type for the request.
355
+ :type _content_type: str, Optional
356
+ :param _headers: set to override the headers for a single
357
+ request; this effectively ignores the headers
358
+ in the spec for a single request.
359
+ :type _headers: dict, optional
360
+ :param _host_index: set to override the host_index for a single
361
+ request; this effectively ignores the host_index
362
+ in the spec for a single request.
363
+ :type _host_index: int, optional
364
+ :return: Returns the result object.
365
+ """ # noqa: E501
366
+
367
+ _param = self._delete_secret_serialize(
368
+ name=name,
369
+ _request_auth=_request_auth,
370
+ _content_type=_content_type,
371
+ _headers=_headers,
372
+ _host_index=_host_index
373
+ )
374
+
375
+ _response_types_map: Dict[str, Optional[str]] = {
376
+ '204': None,
377
+ '404': "ApiErrorResponse",
378
+ }
379
+ response_data = self.api_client.call_api(
380
+ *_param,
381
+ _request_timeout=_request_timeout
382
+ )
383
+ response_data.read()
384
+ return self.api_client.response_deserialize(
385
+ response_data=response_data,
386
+ response_types_map=_response_types_map,
387
+ ).data
388
+
389
+
390
+ @validate_call
391
+ def delete_secret_with_http_info(
392
+ self,
393
+ name: Annotated[StrictStr, Field(description="Secret name")],
394
+ _request_timeout: Union[
395
+ None,
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Tuple[
398
+ Annotated[StrictFloat, Field(gt=0)],
399
+ Annotated[StrictFloat, Field(gt=0)]
400
+ ]
401
+ ] = None,
402
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
403
+ _content_type: Optional[StrictStr] = None,
404
+ _headers: Optional[Dict[StrictStr, Any]] = None,
405
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
406
+ ) -> ApiResponse[None]:
407
+ """Delete secret
408
+
409
+
410
+ :param name: Secret name (required)
411
+ :type name: str
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._delete_secret_serialize(
435
+ name=name,
436
+ _request_auth=_request_auth,
437
+ _content_type=_content_type,
438
+ _headers=_headers,
439
+ _host_index=_host_index
440
+ )
441
+
442
+ _response_types_map: Dict[str, Optional[str]] = {
443
+ '204': None,
444
+ '404': "ApiErrorResponse",
445
+ }
446
+ response_data = self.api_client.call_api(
447
+ *_param,
448
+ _request_timeout=_request_timeout
449
+ )
450
+ response_data.read()
451
+ return self.api_client.response_deserialize(
452
+ response_data=response_data,
453
+ response_types_map=_response_types_map,
454
+ )
455
+
456
+
457
+ @validate_call
458
+ def delete_secret_without_preload_content(
459
+ self,
460
+ name: Annotated[StrictStr, Field(description="Secret name")],
461
+ _request_timeout: Union[
462
+ None,
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Tuple[
465
+ Annotated[StrictFloat, Field(gt=0)],
466
+ Annotated[StrictFloat, Field(gt=0)]
467
+ ]
468
+ ] = None,
469
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
470
+ _content_type: Optional[StrictStr] = None,
471
+ _headers: Optional[Dict[StrictStr, Any]] = None,
472
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
473
+ ) -> RESTResponseType:
474
+ """Delete secret
475
+
476
+
477
+ :param name: Secret name (required)
478
+ :type name: str
479
+ :param _request_timeout: timeout setting for this request. If one
480
+ number provided, it will be total request
481
+ timeout. It can also be a pair (tuple) of
482
+ (connection, read) timeouts.
483
+ :type _request_timeout: int, tuple(int, int), optional
484
+ :param _request_auth: set to override the auth_settings for an a single
485
+ request; this effectively ignores the
486
+ authentication in the spec for a single request.
487
+ :type _request_auth: dict, optional
488
+ :param _content_type: force content-type for the request.
489
+ :type _content_type: str, Optional
490
+ :param _headers: set to override the headers for a single
491
+ request; this effectively ignores the headers
492
+ in the spec for a single request.
493
+ :type _headers: dict, optional
494
+ :param _host_index: set to override the host_index for a single
495
+ request; this effectively ignores the host_index
496
+ in the spec for a single request.
497
+ :type _host_index: int, optional
498
+ :return: Returns the result object.
499
+ """ # noqa: E501
500
+
501
+ _param = self._delete_secret_serialize(
502
+ name=name,
503
+ _request_auth=_request_auth,
504
+ _content_type=_content_type,
505
+ _headers=_headers,
506
+ _host_index=_host_index
507
+ )
508
+
509
+ _response_types_map: Dict[str, Optional[str]] = {
510
+ '204': None,
511
+ '404': "ApiErrorResponse",
512
+ }
513
+ response_data = self.api_client.call_api(
514
+ *_param,
515
+ _request_timeout=_request_timeout
516
+ )
517
+ return response_data.response
518
+
519
+
520
+ def _delete_secret_serialize(
521
+ self,
522
+ name,
523
+ _request_auth,
524
+ _content_type,
525
+ _headers,
526
+ _host_index,
527
+ ) -> RequestSerialized:
528
+
529
+ _host = None
530
+
531
+ _collection_formats: Dict[str, str] = {
532
+ }
533
+
534
+ _path_params: Dict[str, str] = {}
535
+ _query_params: List[Tuple[str, str]] = []
536
+ _header_params: Dict[str, Optional[str]] = _headers or {}
537
+ _form_params: List[Tuple[str, str]] = []
538
+ _files: Dict[
539
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
540
+ ] = {}
541
+ _body_params: Optional[bytes] = None
542
+
543
+ # process the path parameters
544
+ if name is not None:
545
+ _path_params['name'] = name
546
+ # process the query parameters
547
+ # process the header parameters
548
+ # process the form parameters
549
+ # process the body parameter
550
+
551
+
552
+ # set the HTTP header `Accept`
553
+ if 'Accept' not in _header_params:
554
+ _header_params['Accept'] = self.api_client.select_header_accept(
555
+ [
556
+ 'application/json'
557
+ ]
558
+ )
559
+
560
+
561
+ # authentication setting
562
+ _auth_settings: List[str] = [
563
+ 'BearerAuth'
564
+ ]
565
+
566
+ return self.api_client.param_serialize(
567
+ method='DELETE',
568
+ resource_path='/v1/secrets/{name}',
569
+ path_params=_path_params,
570
+ query_params=_query_params,
571
+ header_params=_header_params,
572
+ body=_body_params,
573
+ post_params=_form_params,
574
+ files=_files,
575
+ auth_settings=_auth_settings,
576
+ collection_formats=_collection_formats,
577
+ _host=_host,
578
+ _request_auth=_request_auth
579
+ )
580
+
581
+
582
+
583
+
584
+ @validate_call
585
+ def get_secret(
586
+ self,
587
+ name: Annotated[StrictStr, Field(description="Secret name")],
588
+ _request_timeout: Union[
589
+ None,
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Tuple[
592
+ Annotated[StrictFloat, Field(gt=0)],
593
+ Annotated[StrictFloat, Field(gt=0)]
594
+ ]
595
+ ] = None,
596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
597
+ _content_type: Optional[StrictStr] = None,
598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
600
+ ) -> GetSecretResponse:
601
+ """Get secret
602
+
603
+ Get metadata for a secret. The secret value is never returned.
604
+
605
+ :param name: Secret name (required)
606
+ :type name: str
607
+ :param _request_timeout: timeout setting for this request. If one
608
+ number provided, it will be total request
609
+ timeout. It can also be a pair (tuple) of
610
+ (connection, read) timeouts.
611
+ :type _request_timeout: int, tuple(int, int), optional
612
+ :param _request_auth: set to override the auth_settings for an a single
613
+ request; this effectively ignores the
614
+ authentication in the spec for a single request.
615
+ :type _request_auth: dict, optional
616
+ :param _content_type: force content-type for the request.
617
+ :type _content_type: str, Optional
618
+ :param _headers: set to override the headers for a single
619
+ request; this effectively ignores the headers
620
+ in the spec for a single request.
621
+ :type _headers: dict, optional
622
+ :param _host_index: set to override the host_index for a single
623
+ request; this effectively ignores the host_index
624
+ in the spec for a single request.
625
+ :type _host_index: int, optional
626
+ :return: Returns the result object.
627
+ """ # noqa: E501
628
+
629
+ _param = self._get_secret_serialize(
630
+ name=name,
631
+ _request_auth=_request_auth,
632
+ _content_type=_content_type,
633
+ _headers=_headers,
634
+ _host_index=_host_index
635
+ )
636
+
637
+ _response_types_map: Dict[str, Optional[str]] = {
638
+ '200': "GetSecretResponse",
639
+ '404': "ApiErrorResponse",
640
+ }
641
+ response_data = self.api_client.call_api(
642
+ *_param,
643
+ _request_timeout=_request_timeout
644
+ )
645
+ response_data.read()
646
+ return self.api_client.response_deserialize(
647
+ response_data=response_data,
648
+ response_types_map=_response_types_map,
649
+ ).data
650
+
651
+
652
+ @validate_call
653
+ def get_secret_with_http_info(
654
+ self,
655
+ name: Annotated[StrictStr, Field(description="Secret name")],
656
+ _request_timeout: Union[
657
+ None,
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Tuple[
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Annotated[StrictFloat, Field(gt=0)]
662
+ ]
663
+ ] = None,
664
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
665
+ _content_type: Optional[StrictStr] = None,
666
+ _headers: Optional[Dict[StrictStr, Any]] = None,
667
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
668
+ ) -> ApiResponse[GetSecretResponse]:
669
+ """Get secret
670
+
671
+ Get metadata for a secret. The secret value is never returned.
672
+
673
+ :param name: Secret name (required)
674
+ :type name: str
675
+ :param _request_timeout: timeout setting for this request. If one
676
+ number provided, it will be total request
677
+ timeout. It can also be a pair (tuple) of
678
+ (connection, read) timeouts.
679
+ :type _request_timeout: int, tuple(int, int), optional
680
+ :param _request_auth: set to override the auth_settings for an a single
681
+ request; this effectively ignores the
682
+ authentication in the spec for a single request.
683
+ :type _request_auth: dict, optional
684
+ :param _content_type: force content-type for the request.
685
+ :type _content_type: str, Optional
686
+ :param _headers: set to override the headers for a single
687
+ request; this effectively ignores the headers
688
+ in the spec for a single request.
689
+ :type _headers: dict, optional
690
+ :param _host_index: set to override the host_index for a single
691
+ request; this effectively ignores the host_index
692
+ in the spec for a single request.
693
+ :type _host_index: int, optional
694
+ :return: Returns the result object.
695
+ """ # noqa: E501
696
+
697
+ _param = self._get_secret_serialize(
698
+ name=name,
699
+ _request_auth=_request_auth,
700
+ _content_type=_content_type,
701
+ _headers=_headers,
702
+ _host_index=_host_index
703
+ )
704
+
705
+ _response_types_map: Dict[str, Optional[str]] = {
706
+ '200': "GetSecretResponse",
707
+ '404': "ApiErrorResponse",
708
+ }
709
+ response_data = self.api_client.call_api(
710
+ *_param,
711
+ _request_timeout=_request_timeout
712
+ )
713
+ response_data.read()
714
+ return self.api_client.response_deserialize(
715
+ response_data=response_data,
716
+ response_types_map=_response_types_map,
717
+ )
718
+
719
+
720
+ @validate_call
721
+ def get_secret_without_preload_content(
722
+ self,
723
+ name: Annotated[StrictStr, Field(description="Secret name")],
724
+ _request_timeout: Union[
725
+ None,
726
+ Annotated[StrictFloat, Field(gt=0)],
727
+ Tuple[
728
+ Annotated[StrictFloat, Field(gt=0)],
729
+ Annotated[StrictFloat, Field(gt=0)]
730
+ ]
731
+ ] = None,
732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
733
+ _content_type: Optional[StrictStr] = None,
734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
736
+ ) -> RESTResponseType:
737
+ """Get secret
738
+
739
+ Get metadata for a secret. The secret value is never returned.
740
+
741
+ :param name: Secret name (required)
742
+ :type name: str
743
+ :param _request_timeout: timeout setting for this request. If one
744
+ number provided, it will be total request
745
+ timeout. It can also be a pair (tuple) of
746
+ (connection, read) timeouts.
747
+ :type _request_timeout: int, tuple(int, int), optional
748
+ :param _request_auth: set to override the auth_settings for an a single
749
+ request; this effectively ignores the
750
+ authentication in the spec for a single request.
751
+ :type _request_auth: dict, optional
752
+ :param _content_type: force content-type for the request.
753
+ :type _content_type: str, Optional
754
+ :param _headers: set to override the headers for a single
755
+ request; this effectively ignores the headers
756
+ in the spec for a single request.
757
+ :type _headers: dict, optional
758
+ :param _host_index: set to override the host_index for a single
759
+ request; this effectively ignores the host_index
760
+ in the spec for a single request.
761
+ :type _host_index: int, optional
762
+ :return: Returns the result object.
763
+ """ # noqa: E501
764
+
765
+ _param = self._get_secret_serialize(
766
+ name=name,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "GetSecretResponse",
775
+ '404': "ApiErrorResponse",
776
+ }
777
+ response_data = self.api_client.call_api(
778
+ *_param,
779
+ _request_timeout=_request_timeout
780
+ )
781
+ return response_data.response
782
+
783
+
784
+ def _get_secret_serialize(
785
+ self,
786
+ name,
787
+ _request_auth,
788
+ _content_type,
789
+ _headers,
790
+ _host_index,
791
+ ) -> RequestSerialized:
792
+
793
+ _host = None
794
+
795
+ _collection_formats: Dict[str, str] = {
796
+ }
797
+
798
+ _path_params: Dict[str, str] = {}
799
+ _query_params: List[Tuple[str, str]] = []
800
+ _header_params: Dict[str, Optional[str]] = _headers or {}
801
+ _form_params: List[Tuple[str, str]] = []
802
+ _files: Dict[
803
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
804
+ ] = {}
805
+ _body_params: Optional[bytes] = None
806
+
807
+ # process the path parameters
808
+ if name is not None:
809
+ _path_params['name'] = name
810
+ # process the query parameters
811
+ # process the header parameters
812
+ # process the form parameters
813
+ # process the body parameter
814
+
815
+
816
+ # set the HTTP header `Accept`
817
+ if 'Accept' not in _header_params:
818
+ _header_params['Accept'] = self.api_client.select_header_accept(
819
+ [
820
+ 'application/json'
821
+ ]
822
+ )
823
+
824
+
825
+ # authentication setting
826
+ _auth_settings: List[str] = [
827
+ 'BearerAuth'
828
+ ]
829
+
830
+ return self.api_client.param_serialize(
831
+ method='GET',
832
+ resource_path='/v1/secrets/{name}',
833
+ path_params=_path_params,
834
+ query_params=_query_params,
835
+ header_params=_header_params,
836
+ body=_body_params,
837
+ post_params=_form_params,
838
+ files=_files,
839
+ auth_settings=_auth_settings,
840
+ collection_formats=_collection_formats,
841
+ _host=_host,
842
+ _request_auth=_request_auth
843
+ )
844
+
845
+
846
+
847
+
848
+ @validate_call
849
+ def list_secrets(
850
+ self,
851
+ _request_timeout: Union[
852
+ None,
853
+ Annotated[StrictFloat, Field(gt=0)],
854
+ Tuple[
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Annotated[StrictFloat, Field(gt=0)]
857
+ ]
858
+ ] = None,
859
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
860
+ _content_type: Optional[StrictStr] = None,
861
+ _headers: Optional[Dict[StrictStr, Any]] = None,
862
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
863
+ ) -> ListSecretsResponse:
864
+ """List secrets
865
+
866
+ List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed.
867
+
868
+ :param _request_timeout: timeout setting for this request. If one
869
+ number provided, it will be total request
870
+ timeout. It can also be a pair (tuple) of
871
+ (connection, read) timeouts.
872
+ :type _request_timeout: int, tuple(int, int), optional
873
+ :param _request_auth: set to override the auth_settings for an a single
874
+ request; this effectively ignores the
875
+ authentication in the spec for a single request.
876
+ :type _request_auth: dict, optional
877
+ :param _content_type: force content-type for the request.
878
+ :type _content_type: str, Optional
879
+ :param _headers: set to override the headers for a single
880
+ request; this effectively ignores the headers
881
+ in the spec for a single request.
882
+ :type _headers: dict, optional
883
+ :param _host_index: set to override the host_index for a single
884
+ request; this effectively ignores the host_index
885
+ in the spec for a single request.
886
+ :type _host_index: int, optional
887
+ :return: Returns the result object.
888
+ """ # noqa: E501
889
+
890
+ _param = self._list_secrets_serialize(
891
+ _request_auth=_request_auth,
892
+ _content_type=_content_type,
893
+ _headers=_headers,
894
+ _host_index=_host_index
895
+ )
896
+
897
+ _response_types_map: Dict[str, Optional[str]] = {
898
+ '200': "ListSecretsResponse",
899
+ }
900
+ response_data = self.api_client.call_api(
901
+ *_param,
902
+ _request_timeout=_request_timeout
903
+ )
904
+ response_data.read()
905
+ return self.api_client.response_deserialize(
906
+ response_data=response_data,
907
+ response_types_map=_response_types_map,
908
+ ).data
909
+
910
+
911
+ @validate_call
912
+ def list_secrets_with_http_info(
913
+ self,
914
+ _request_timeout: Union[
915
+ None,
916
+ Annotated[StrictFloat, Field(gt=0)],
917
+ Tuple[
918
+ Annotated[StrictFloat, Field(gt=0)],
919
+ Annotated[StrictFloat, Field(gt=0)]
920
+ ]
921
+ ] = None,
922
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
923
+ _content_type: Optional[StrictStr] = None,
924
+ _headers: Optional[Dict[StrictStr, Any]] = None,
925
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
926
+ ) -> ApiResponse[ListSecretsResponse]:
927
+ """List secrets
928
+
929
+ List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed.
930
+
931
+ :param _request_timeout: timeout setting for this request. If one
932
+ number provided, it will be total request
933
+ timeout. It can also be a pair (tuple) of
934
+ (connection, read) timeouts.
935
+ :type _request_timeout: int, tuple(int, int), optional
936
+ :param _request_auth: set to override the auth_settings for an a single
937
+ request; this effectively ignores the
938
+ authentication in the spec for a single request.
939
+ :type _request_auth: dict, optional
940
+ :param _content_type: force content-type for the request.
941
+ :type _content_type: str, Optional
942
+ :param _headers: set to override the headers for a single
943
+ request; this effectively ignores the headers
944
+ in the spec for a single request.
945
+ :type _headers: dict, optional
946
+ :param _host_index: set to override the host_index for a single
947
+ request; this effectively ignores the host_index
948
+ in the spec for a single request.
949
+ :type _host_index: int, optional
950
+ :return: Returns the result object.
951
+ """ # noqa: E501
952
+
953
+ _param = self._list_secrets_serialize(
954
+ _request_auth=_request_auth,
955
+ _content_type=_content_type,
956
+ _headers=_headers,
957
+ _host_index=_host_index
958
+ )
959
+
960
+ _response_types_map: Dict[str, Optional[str]] = {
961
+ '200': "ListSecretsResponse",
962
+ }
963
+ response_data = self.api_client.call_api(
964
+ *_param,
965
+ _request_timeout=_request_timeout
966
+ )
967
+ response_data.read()
968
+ return self.api_client.response_deserialize(
969
+ response_data=response_data,
970
+ response_types_map=_response_types_map,
971
+ )
972
+
973
+
974
+ @validate_call
975
+ def list_secrets_without_preload_content(
976
+ self,
977
+ _request_timeout: Union[
978
+ None,
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Tuple[
981
+ Annotated[StrictFloat, Field(gt=0)],
982
+ Annotated[StrictFloat, Field(gt=0)]
983
+ ]
984
+ ] = None,
985
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
986
+ _content_type: Optional[StrictStr] = None,
987
+ _headers: Optional[Dict[StrictStr, Any]] = None,
988
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
989
+ ) -> RESTResponseType:
990
+ """List secrets
991
+
992
+ List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed.
993
+
994
+ :param _request_timeout: timeout setting for this request. If one
995
+ number provided, it will be total request
996
+ timeout. It can also be a pair (tuple) of
997
+ (connection, read) timeouts.
998
+ :type _request_timeout: int, tuple(int, int), optional
999
+ :param _request_auth: set to override the auth_settings for an a single
1000
+ request; this effectively ignores the
1001
+ authentication in the spec for a single request.
1002
+ :type _request_auth: dict, optional
1003
+ :param _content_type: force content-type for the request.
1004
+ :type _content_type: str, Optional
1005
+ :param _headers: set to override the headers for a single
1006
+ request; this effectively ignores the headers
1007
+ in the spec for a single request.
1008
+ :type _headers: dict, optional
1009
+ :param _host_index: set to override the host_index for a single
1010
+ request; this effectively ignores the host_index
1011
+ in the spec for a single request.
1012
+ :type _host_index: int, optional
1013
+ :return: Returns the result object.
1014
+ """ # noqa: E501
1015
+
1016
+ _param = self._list_secrets_serialize(
1017
+ _request_auth=_request_auth,
1018
+ _content_type=_content_type,
1019
+ _headers=_headers,
1020
+ _host_index=_host_index
1021
+ )
1022
+
1023
+ _response_types_map: Dict[str, Optional[str]] = {
1024
+ '200': "ListSecretsResponse",
1025
+ }
1026
+ response_data = self.api_client.call_api(
1027
+ *_param,
1028
+ _request_timeout=_request_timeout
1029
+ )
1030
+ return response_data.response
1031
+
1032
+
1033
+ def _list_secrets_serialize(
1034
+ self,
1035
+ _request_auth,
1036
+ _content_type,
1037
+ _headers,
1038
+ _host_index,
1039
+ ) -> RequestSerialized:
1040
+
1041
+ _host = None
1042
+
1043
+ _collection_formats: Dict[str, str] = {
1044
+ }
1045
+
1046
+ _path_params: Dict[str, str] = {}
1047
+ _query_params: List[Tuple[str, str]] = []
1048
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1049
+ _form_params: List[Tuple[str, str]] = []
1050
+ _files: Dict[
1051
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1052
+ ] = {}
1053
+ _body_params: Optional[bytes] = None
1054
+
1055
+ # process the path parameters
1056
+ # process the query parameters
1057
+ # process the header parameters
1058
+ # process the form parameters
1059
+ # process the body parameter
1060
+
1061
+
1062
+ # set the HTTP header `Accept`
1063
+ if 'Accept' not in _header_params:
1064
+ _header_params['Accept'] = self.api_client.select_header_accept(
1065
+ [
1066
+ 'application/json'
1067
+ ]
1068
+ )
1069
+
1070
+
1071
+ # authentication setting
1072
+ _auth_settings: List[str] = [
1073
+ 'BearerAuth'
1074
+ ]
1075
+
1076
+ return self.api_client.param_serialize(
1077
+ method='GET',
1078
+ resource_path='/v1/secrets',
1079
+ path_params=_path_params,
1080
+ query_params=_query_params,
1081
+ header_params=_header_params,
1082
+ body=_body_params,
1083
+ post_params=_form_params,
1084
+ files=_files,
1085
+ auth_settings=_auth_settings,
1086
+ collection_formats=_collection_formats,
1087
+ _host=_host,
1088
+ _request_auth=_request_auth
1089
+ )
1090
+
1091
+
1092
+
1093
+
1094
+ @validate_call
1095
+ def update_secret(
1096
+ self,
1097
+ name: Annotated[StrictStr, Field(description="Secret name")],
1098
+ update_secret_request: UpdateSecretRequest,
1099
+ _request_timeout: Union[
1100
+ None,
1101
+ Annotated[StrictFloat, Field(gt=0)],
1102
+ Tuple[
1103
+ Annotated[StrictFloat, Field(gt=0)],
1104
+ Annotated[StrictFloat, Field(gt=0)]
1105
+ ]
1106
+ ] = None,
1107
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1108
+ _content_type: Optional[StrictStr] = None,
1109
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1110
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1111
+ ) -> UpdateSecretResponse:
1112
+ """Update secret
1113
+
1114
+
1115
+ :param name: Secret name (required)
1116
+ :type name: str
1117
+ :param update_secret_request: (required)
1118
+ :type update_secret_request: UpdateSecretRequest
1119
+ :param _request_timeout: timeout setting for this request. If one
1120
+ number provided, it will be total request
1121
+ timeout. It can also be a pair (tuple) of
1122
+ (connection, read) timeouts.
1123
+ :type _request_timeout: int, tuple(int, int), optional
1124
+ :param _request_auth: set to override the auth_settings for an a single
1125
+ request; this effectively ignores the
1126
+ authentication in the spec for a single request.
1127
+ :type _request_auth: dict, optional
1128
+ :param _content_type: force content-type for the request.
1129
+ :type _content_type: str, Optional
1130
+ :param _headers: set to override the headers for a single
1131
+ request; this effectively ignores the headers
1132
+ in the spec for a single request.
1133
+ :type _headers: dict, optional
1134
+ :param _host_index: set to override the host_index for a single
1135
+ request; this effectively ignores the host_index
1136
+ in the spec for a single request.
1137
+ :type _host_index: int, optional
1138
+ :return: Returns the result object.
1139
+ """ # noqa: E501
1140
+
1141
+ _param = self._update_secret_serialize(
1142
+ name=name,
1143
+ update_secret_request=update_secret_request,
1144
+ _request_auth=_request_auth,
1145
+ _content_type=_content_type,
1146
+ _headers=_headers,
1147
+ _host_index=_host_index
1148
+ )
1149
+
1150
+ _response_types_map: Dict[str, Optional[str]] = {
1151
+ '200': "UpdateSecretResponse",
1152
+ '404': "ApiErrorResponse",
1153
+ }
1154
+ response_data = self.api_client.call_api(
1155
+ *_param,
1156
+ _request_timeout=_request_timeout
1157
+ )
1158
+ response_data.read()
1159
+ return self.api_client.response_deserialize(
1160
+ response_data=response_data,
1161
+ response_types_map=_response_types_map,
1162
+ ).data
1163
+
1164
+
1165
+ @validate_call
1166
+ def update_secret_with_http_info(
1167
+ self,
1168
+ name: Annotated[StrictStr, Field(description="Secret name")],
1169
+ update_secret_request: UpdateSecretRequest,
1170
+ _request_timeout: Union[
1171
+ None,
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Tuple[
1174
+ Annotated[StrictFloat, Field(gt=0)],
1175
+ Annotated[StrictFloat, Field(gt=0)]
1176
+ ]
1177
+ ] = None,
1178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1179
+ _content_type: Optional[StrictStr] = None,
1180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1182
+ ) -> ApiResponse[UpdateSecretResponse]:
1183
+ """Update secret
1184
+
1185
+
1186
+ :param name: Secret name (required)
1187
+ :type name: str
1188
+ :param update_secret_request: (required)
1189
+ :type update_secret_request: UpdateSecretRequest
1190
+ :param _request_timeout: timeout setting for this request. If one
1191
+ number provided, it will be total request
1192
+ timeout. It can also be a pair (tuple) of
1193
+ (connection, read) timeouts.
1194
+ :type _request_timeout: int, tuple(int, int), optional
1195
+ :param _request_auth: set to override the auth_settings for an a single
1196
+ request; this effectively ignores the
1197
+ authentication in the spec for a single request.
1198
+ :type _request_auth: dict, optional
1199
+ :param _content_type: force content-type for the request.
1200
+ :type _content_type: str, Optional
1201
+ :param _headers: set to override the headers for a single
1202
+ request; this effectively ignores the headers
1203
+ in the spec for a single request.
1204
+ :type _headers: dict, optional
1205
+ :param _host_index: set to override the host_index for a single
1206
+ request; this effectively ignores the host_index
1207
+ in the spec for a single request.
1208
+ :type _host_index: int, optional
1209
+ :return: Returns the result object.
1210
+ """ # noqa: E501
1211
+
1212
+ _param = self._update_secret_serialize(
1213
+ name=name,
1214
+ update_secret_request=update_secret_request,
1215
+ _request_auth=_request_auth,
1216
+ _content_type=_content_type,
1217
+ _headers=_headers,
1218
+ _host_index=_host_index
1219
+ )
1220
+
1221
+ _response_types_map: Dict[str, Optional[str]] = {
1222
+ '200': "UpdateSecretResponse",
1223
+ '404': "ApiErrorResponse",
1224
+ }
1225
+ response_data = self.api_client.call_api(
1226
+ *_param,
1227
+ _request_timeout=_request_timeout
1228
+ )
1229
+ response_data.read()
1230
+ return self.api_client.response_deserialize(
1231
+ response_data=response_data,
1232
+ response_types_map=_response_types_map,
1233
+ )
1234
+
1235
+
1236
+ @validate_call
1237
+ def update_secret_without_preload_content(
1238
+ self,
1239
+ name: Annotated[StrictStr, Field(description="Secret name")],
1240
+ update_secret_request: UpdateSecretRequest,
1241
+ _request_timeout: Union[
1242
+ None,
1243
+ Annotated[StrictFloat, Field(gt=0)],
1244
+ Tuple[
1245
+ Annotated[StrictFloat, Field(gt=0)],
1246
+ Annotated[StrictFloat, Field(gt=0)]
1247
+ ]
1248
+ ] = None,
1249
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1250
+ _content_type: Optional[StrictStr] = None,
1251
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1252
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1253
+ ) -> RESTResponseType:
1254
+ """Update secret
1255
+
1256
+
1257
+ :param name: Secret name (required)
1258
+ :type name: str
1259
+ :param update_secret_request: (required)
1260
+ :type update_secret_request: UpdateSecretRequest
1261
+ :param _request_timeout: timeout setting for this request. If one
1262
+ number provided, it will be total request
1263
+ timeout. It can also be a pair (tuple) of
1264
+ (connection, read) timeouts.
1265
+ :type _request_timeout: int, tuple(int, int), optional
1266
+ :param _request_auth: set to override the auth_settings for an a single
1267
+ request; this effectively ignores the
1268
+ authentication in the spec for a single request.
1269
+ :type _request_auth: dict, optional
1270
+ :param _content_type: force content-type for the request.
1271
+ :type _content_type: str, Optional
1272
+ :param _headers: set to override the headers for a single
1273
+ request; this effectively ignores the headers
1274
+ in the spec for a single request.
1275
+ :type _headers: dict, optional
1276
+ :param _host_index: set to override the host_index for a single
1277
+ request; this effectively ignores the host_index
1278
+ in the spec for a single request.
1279
+ :type _host_index: int, optional
1280
+ :return: Returns the result object.
1281
+ """ # noqa: E501
1282
+
1283
+ _param = self._update_secret_serialize(
1284
+ name=name,
1285
+ update_secret_request=update_secret_request,
1286
+ _request_auth=_request_auth,
1287
+ _content_type=_content_type,
1288
+ _headers=_headers,
1289
+ _host_index=_host_index
1290
+ )
1291
+
1292
+ _response_types_map: Dict[str, Optional[str]] = {
1293
+ '200': "UpdateSecretResponse",
1294
+ '404': "ApiErrorResponse",
1295
+ }
1296
+ response_data = self.api_client.call_api(
1297
+ *_param,
1298
+ _request_timeout=_request_timeout
1299
+ )
1300
+ return response_data.response
1301
+
1302
+
1303
+ def _update_secret_serialize(
1304
+ self,
1305
+ name,
1306
+ update_secret_request,
1307
+ _request_auth,
1308
+ _content_type,
1309
+ _headers,
1310
+ _host_index,
1311
+ ) -> RequestSerialized:
1312
+
1313
+ _host = None
1314
+
1315
+ _collection_formats: Dict[str, str] = {
1316
+ }
1317
+
1318
+ _path_params: Dict[str, str] = {}
1319
+ _query_params: List[Tuple[str, str]] = []
1320
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1321
+ _form_params: List[Tuple[str, str]] = []
1322
+ _files: Dict[
1323
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1324
+ ] = {}
1325
+ _body_params: Optional[bytes] = None
1326
+
1327
+ # process the path parameters
1328
+ if name is not None:
1329
+ _path_params['name'] = name
1330
+ # process the query parameters
1331
+ # process the header parameters
1332
+ # process the form parameters
1333
+ # process the body parameter
1334
+ if update_secret_request is not None:
1335
+ _body_params = update_secret_request
1336
+
1337
+
1338
+ # set the HTTP header `Accept`
1339
+ if 'Accept' not in _header_params:
1340
+ _header_params['Accept'] = self.api_client.select_header_accept(
1341
+ [
1342
+ 'application/json'
1343
+ ]
1344
+ )
1345
+
1346
+ # set the HTTP header `Content-Type`
1347
+ if _content_type:
1348
+ _header_params['Content-Type'] = _content_type
1349
+ else:
1350
+ _default_content_type = (
1351
+ self.api_client.select_header_content_type(
1352
+ [
1353
+ 'application/json'
1354
+ ]
1355
+ )
1356
+ )
1357
+ if _default_content_type is not None:
1358
+ _header_params['Content-Type'] = _default_content_type
1359
+
1360
+ # authentication setting
1361
+ _auth_settings: List[str] = [
1362
+ 'BearerAuth'
1363
+ ]
1364
+
1365
+ return self.api_client.param_serialize(
1366
+ method='PUT',
1367
+ resource_path='/v1/secrets/{name}',
1368
+ path_params=_path_params,
1369
+ query_params=_query_params,
1370
+ header_params=_header_params,
1371
+ body=_body_params,
1372
+ post_params=_form_params,
1373
+ files=_files,
1374
+ auth_settings=_auth_settings,
1375
+ collection_formats=_collection_formats,
1376
+ _host=_host,
1377
+ _request_auth=_request_auth
1378
+ )
1379
+
1380
+