crypticorn 2.15.0__py3-none-any.whl → 2.17.0__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 (168) hide show
  1. crypticorn/__init__.py +2 -2
  2. crypticorn/auth/client/api/admin_api.py +397 -13
  3. crypticorn/auth/client/api/auth_api.py +3610 -341
  4. crypticorn/auth/client/api/service_api.py +249 -7
  5. crypticorn/auth/client/api/user_api.py +2295 -179
  6. crypticorn/auth/client/api/wallet_api.py +1468 -81
  7. crypticorn/auth/client/configuration.py +2 -2
  8. crypticorn/auth/client/models/create_api_key_request.py +2 -1
  9. crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
  10. crypticorn/auth/client/rest.py +23 -4
  11. crypticorn/auth/main.py +8 -5
  12. crypticorn/cli/init.py +1 -1
  13. crypticorn/cli/templates/.env.docker.temp +3 -0
  14. crypticorn/cli/templates/.env.example.temp +4 -0
  15. crypticorn/cli/templates/Dockerfile +5 -2
  16. crypticorn/client.py +226 -59
  17. crypticorn/common/__init__.py +1 -0
  18. crypticorn/common/auth.py +45 -14
  19. crypticorn/common/decorators.py +1 -2
  20. crypticorn/common/enums.py +0 -2
  21. crypticorn/common/errors.py +10 -0
  22. crypticorn/common/metrics.py +30 -0
  23. crypticorn/common/middleware.py +94 -1
  24. crypticorn/common/pagination.py +252 -18
  25. crypticorn/common/router/admin_router.py +2 -2
  26. crypticorn/common/router/status_router.py +40 -2
  27. crypticorn/common/scopes.py +2 -0
  28. crypticorn/common/warnings.py +8 -0
  29. crypticorn/dex/__init__.py +6 -0
  30. crypticorn/dex/client/__init__.py +49 -0
  31. crypticorn/dex/client/api/__init__.py +6 -0
  32. crypticorn/dex/client/api/admin_api.py +2986 -0
  33. crypticorn/dex/client/api/signals_api.py +1798 -0
  34. crypticorn/dex/client/api/status_api.py +892 -0
  35. crypticorn/dex/client/api_client.py +758 -0
  36. crypticorn/dex/client/api_response.py +20 -0
  37. crypticorn/dex/client/configuration.py +620 -0
  38. crypticorn/dex/client/exceptions.py +220 -0
  39. crypticorn/dex/client/models/__init__.py +30 -0
  40. crypticorn/dex/client/models/api_error_identifier.py +121 -0
  41. crypticorn/dex/client/models/api_error_level.py +37 -0
  42. crypticorn/dex/client/models/api_error_type.py +37 -0
  43. crypticorn/dex/client/models/exception_detail.py +117 -0
  44. crypticorn/dex/client/models/log_level.py +38 -0
  45. crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
  46. crypticorn/dex/client/models/risk.py +86 -0
  47. crypticorn/dex/client/models/signal_overview_stats.py +158 -0
  48. crypticorn/dex/client/models/signal_volume.py +84 -0
  49. crypticorn/dex/client/models/signal_with_token.py +163 -0
  50. crypticorn/dex/client/models/token_data.py +127 -0
  51. crypticorn/dex/client/models/token_detail.py +116 -0
  52. crypticorn/dex/client/py.typed +0 -0
  53. crypticorn/dex/client/rest.py +217 -0
  54. crypticorn/dex/main.py +1 -0
  55. crypticorn/hive/client/api/admin_api.py +1173 -47
  56. crypticorn/hive/client/api/data_api.py +499 -17
  57. crypticorn/hive/client/api/models_api.py +1595 -87
  58. crypticorn/hive/client/api/status_api.py +397 -16
  59. crypticorn/hive/client/api_client.py +0 -5
  60. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  61. crypticorn/hive/client/models/coin_info.py +1 -1
  62. crypticorn/hive/client/models/exception_detail.py +1 -1
  63. crypticorn/hive/client/models/target_info.py +1 -1
  64. crypticorn/hive/client/rest.py +23 -4
  65. crypticorn/hive/main.py +99 -25
  66. crypticorn/hive/utils.py +2 -2
  67. crypticorn/klines/client/api/admin_api.py +1173 -47
  68. crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
  69. crypticorn/klines/client/api/funding_rates_api.py +315 -11
  70. crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
  71. crypticorn/klines/client/api/status_api.py +397 -16
  72. crypticorn/klines/client/api/symbols_api.py +216 -11
  73. crypticorn/klines/client/api/udf_api.py +1268 -51
  74. crypticorn/klines/client/api_client.py +0 -5
  75. crypticorn/klines/client/models/api_error_identifier.py +3 -1
  76. crypticorn/klines/client/models/exception_detail.py +1 -1
  77. crypticorn/klines/client/models/ohlcv.py +1 -1
  78. crypticorn/klines/client/models/symbol_group.py +1 -1
  79. crypticorn/klines/client/models/udf_config.py +1 -1
  80. crypticorn/klines/client/rest.py +23 -4
  81. crypticorn/klines/main.py +89 -12
  82. crypticorn/metrics/client/api/admin_api.py +1173 -47
  83. crypticorn/metrics/client/api/exchanges_api.py +1370 -145
  84. crypticorn/metrics/client/api/indicators_api.py +622 -17
  85. crypticorn/metrics/client/api/logs_api.py +296 -11
  86. crypticorn/metrics/client/api/marketcap_api.py +1207 -67
  87. crypticorn/metrics/client/api/markets_api.py +343 -11
  88. crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
  89. crypticorn/metrics/client/api/status_api.py +397 -16
  90. crypticorn/metrics/client/api/tokens_api.py +382 -15
  91. crypticorn/metrics/client/api_client.py +0 -5
  92. crypticorn/metrics/client/configuration.py +4 -2
  93. crypticorn/metrics/client/models/exception_detail.py +1 -1
  94. crypticorn/metrics/client/models/exchange_mapping.py +1 -1
  95. crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
  96. crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
  97. crypticorn/metrics/client/models/ohlcv.py +1 -1
  98. crypticorn/metrics/client/rest.py +23 -4
  99. crypticorn/metrics/main.py +113 -19
  100. crypticorn/pay/client/api/admin_api.py +1585 -57
  101. crypticorn/pay/client/api/now_payments_api.py +961 -39
  102. crypticorn/pay/client/api/payments_api.py +562 -17
  103. crypticorn/pay/client/api/products_api.py +880 -30
  104. crypticorn/pay/client/api/status_api.py +397 -16
  105. crypticorn/pay/client/api_client.py +0 -5
  106. crypticorn/pay/client/configuration.py +2 -2
  107. crypticorn/pay/client/models/api_error_identifier.py +7 -7
  108. crypticorn/pay/client/models/exception_detail.py +1 -1
  109. crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
  110. crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
  111. crypticorn/pay/client/models/product.py +1 -1
  112. crypticorn/pay/client/models/product_create.py +1 -1
  113. crypticorn/pay/client/models/product_update.py +1 -1
  114. crypticorn/pay/client/models/scope.py +1 -0
  115. crypticorn/pay/client/rest.py +23 -4
  116. crypticorn/pay/main.py +10 -6
  117. crypticorn/trade/client/__init__.py +11 -1
  118. crypticorn/trade/client/api/__init__.py +0 -1
  119. crypticorn/trade/client/api/admin_api.py +1184 -55
  120. crypticorn/trade/client/api/api_keys_api.py +1678 -162
  121. crypticorn/trade/client/api/bots_api.py +7563 -187
  122. crypticorn/trade/client/api/exchanges_api.py +565 -19
  123. crypticorn/trade/client/api/notifications_api.py +1290 -116
  124. crypticorn/trade/client/api/orders_api.py +393 -55
  125. crypticorn/trade/client/api/status_api.py +397 -13
  126. crypticorn/trade/client/api/strategies_api.py +1133 -77
  127. crypticorn/trade/client/api/trading_actions_api.py +786 -65
  128. crypticorn/trade/client/models/__init__.py +11 -0
  129. crypticorn/trade/client/models/actions_count.py +88 -0
  130. crypticorn/trade/client/models/api_error_identifier.py +8 -7
  131. crypticorn/trade/client/models/bot.py +7 -18
  132. crypticorn/trade/client/models/bot_create.py +17 -1
  133. crypticorn/trade/client/models/bot_update.py +17 -1
  134. crypticorn/trade/client/models/exchange.py +6 -1
  135. crypticorn/trade/client/models/exchange_key.py +1 -1
  136. crypticorn/trade/client/models/exchange_key_balance.py +111 -0
  137. crypticorn/trade/client/models/exchange_key_create.py +17 -1
  138. crypticorn/trade/client/models/exchange_key_update.py +17 -1
  139. crypticorn/trade/client/models/execution_ids.py +1 -1
  140. crypticorn/trade/client/models/futures_balance.py +27 -25
  141. crypticorn/trade/client/models/futures_trading_action.py +6 -28
  142. crypticorn/trade/client/models/futures_trading_action_create.py +10 -13
  143. crypticorn/trade/client/models/notification.py +17 -1
  144. crypticorn/trade/client/models/notification_create.py +18 -2
  145. crypticorn/trade/client/models/notification_update.py +17 -1
  146. crypticorn/trade/client/models/order.py +2 -14
  147. crypticorn/trade/client/models/orders_count.py +88 -0
  148. crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
  149. crypticorn/trade/client/models/paginated_response_order.py +134 -0
  150. crypticorn/trade/client/models/pn_l.py +95 -0
  151. crypticorn/trade/client/models/post_futures_action.py +1 -1
  152. crypticorn/trade/client/models/spot_balance.py +109 -0
  153. crypticorn/trade/client/models/spot_trading_action_create.py +4 -1
  154. crypticorn/trade/client/models/strategy.py +22 -4
  155. crypticorn/trade/client/models/strategy_create.py +23 -5
  156. crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
  157. crypticorn/trade/client/models/strategy_update.py +19 -3
  158. crypticorn/trade/client/models/tpsl.py +4 -27
  159. crypticorn/trade/client/models/tpsl_create.py +6 -19
  160. crypticorn/trade/client/rest.py +23 -4
  161. crypticorn/trade/main.py +15 -12
  162. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
  163. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +167 -132
  164. crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
  165. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
  166. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
  167. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
  168. {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2986 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ DEX AI API
5
+
6
+ API for DEX AI
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
20
+ from typing import Any, Dict, List, Optional, Union
21
+ from typing_extensions import Annotated
22
+ from crypticorn.dex.client.models.log_level import LogLevel
23
+
24
+ from crypticorn.dex.client.api_client import ApiClient, RequestSerialized
25
+ from crypticorn.dex.client.api_response import ApiResponse
26
+ from crypticorn.dex.client.rest import RESTResponseType
27
+
28
+ # Import async_to_sync for sync methods
29
+ try:
30
+ from asgiref.sync import async_to_sync
31
+
32
+ _HAS_ASGIREF = True
33
+ except ImportError:
34
+ _HAS_ASGIREF = False
35
+
36
+ def async_to_sync(async_func):
37
+ """Fallback decorator that raises an error if asgiref is not available."""
38
+
39
+ def wrapper(*args, **kwargs):
40
+ raise ImportError(
41
+ "asgiref is required for sync methods. Install with: pip install asgiref"
42
+ )
43
+
44
+ return wrapper
45
+
46
+
47
+ class AdminApi:
48
+ """NOTE: This class is auto generated by OpenAPI Generator
49
+ Ref: https://openapi-generator.tech
50
+
51
+ Do not edit the class manually.
52
+ """
53
+
54
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
55
+ if api_client is None:
56
+ api_client = ApiClient.get_default()
57
+ self.api_client = api_client
58
+ self.is_sync = is_sync
59
+
60
+ @validate_call
61
+ def get_container_limits(
62
+ self,
63
+ _request_timeout: Union[
64
+ None,
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Tuple[
67
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
68
+ ],
69
+ ] = None,
70
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
71
+ _content_type: Optional[StrictStr] = None,
72
+ _headers: Optional[Dict[StrictStr, Any]] = None,
73
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
74
+ ) -> Dict[str, object]:
75
+ """Get Container Limits"""
76
+ if self.is_sync:
77
+ return self._get_container_limits_sync(
78
+ _request_timeout=_request_timeout,
79
+ _request_auth=_request_auth,
80
+ _content_type=_content_type,
81
+ _headers=_headers,
82
+ _host_index=_host_index,
83
+ )
84
+
85
+ else:
86
+ return self._get_container_limits_async(
87
+ _request_timeout=_request_timeout,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index,
92
+ )
93
+
94
+ @validate_call
95
+ def get_container_limits_with_http_info(
96
+ self,
97
+ _request_timeout: Union[
98
+ None,
99
+ Annotated[StrictFloat, Field(gt=0)],
100
+ Tuple[
101
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
102
+ ],
103
+ ] = None,
104
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
105
+ _content_type: Optional[StrictStr] = None,
106
+ _headers: Optional[Dict[StrictStr, Any]] = None,
107
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
108
+ ) -> ApiResponse[Dict[str, object]]:
109
+ """Get Container Limits with HTTP info"""
110
+ if self.is_sync:
111
+ return self._get_container_limits_sync_with_http_info(
112
+ _request_timeout=_request_timeout,
113
+ _request_auth=_request_auth,
114
+ _content_type=_content_type,
115
+ _headers=_headers,
116
+ _host_index=_host_index,
117
+ )
118
+
119
+ else:
120
+ return self._get_container_limits_async_with_http_info(
121
+ _request_timeout=_request_timeout,
122
+ _request_auth=_request_auth,
123
+ _content_type=_content_type,
124
+ _headers=_headers,
125
+ _host_index=_host_index,
126
+ )
127
+
128
+ @validate_call
129
+ def get_container_limits_without_preload_content(
130
+ self,
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[
135
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
136
+ ],
137
+ ] = None,
138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
139
+ _content_type: Optional[StrictStr] = None,
140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
142
+ ) -> RESTResponseType:
143
+ """Get Container Limits without preloading content"""
144
+ if self.is_sync:
145
+ return self._get_container_limits_sync_without_preload_content(
146
+ _request_timeout=_request_timeout,
147
+ _request_auth=_request_auth,
148
+ _content_type=_content_type,
149
+ _headers=_headers,
150
+ _host_index=_host_index,
151
+ )
152
+
153
+ else:
154
+ return self._get_container_limits_async_without_preload_content(
155
+ _request_timeout=_request_timeout,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index,
160
+ )
161
+
162
+ # Private async implementation methods
163
+ @validate_call
164
+ async def _get_container_limits_async(
165
+ self,
166
+ _request_timeout: Union[
167
+ None,
168
+ Annotated[StrictFloat, Field(gt=0)],
169
+ Tuple[
170
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
171
+ ],
172
+ ] = None,
173
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
174
+ _content_type: Optional[StrictStr] = None,
175
+ _headers: Optional[Dict[StrictStr, Any]] = None,
176
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
177
+ ) -> Dict[str, object]:
178
+ """Get Container Limits
179
+
180
+ Return container resource limits from cgroup.
181
+
182
+ :param _request_timeout: timeout setting for this request. If one
183
+ number provided, it will be total request
184
+ timeout. It can also be a pair (tuple) of
185
+ (connection, read) timeouts.
186
+ :type _request_timeout: int, tuple(int, int), optional
187
+ :param _request_auth: set to override the auth_settings for an a single
188
+ request; this effectively ignores the
189
+ authentication in the spec for a single request.
190
+ :type _request_auth: dict, optional
191
+ :param _content_type: force content-type for the request.
192
+ :type _content_type: str, Optional
193
+ :param _headers: set to override the headers for a single
194
+ request; this effectively ignores the headers
195
+ in the spec for a single request.
196
+ :type _headers: dict, optional
197
+ :param _host_index: set to override the host_index for a single
198
+ request; this effectively ignores the host_index
199
+ in the spec for a single request.
200
+ :type _host_index: int, optional
201
+ :return: Returns the result object.
202
+ """ # noqa: E501
203
+
204
+ _param = self._get_container_limits_serialize(
205
+ _request_auth=_request_auth,
206
+ _content_type=_content_type,
207
+ _headers=_headers,
208
+ _host_index=_host_index,
209
+ )
210
+
211
+ _response_types_map: Dict[str, Optional[str]] = {
212
+ "200": "Dict[str, object]",
213
+ }
214
+ response_data = await self.api_client.call_api(
215
+ *_param, _request_timeout=_request_timeout
216
+ )
217
+ await response_data.read()
218
+ return self.api_client.response_deserialize(
219
+ response_data=response_data,
220
+ response_types_map=_response_types_map,
221
+ ).data
222
+
223
+ @validate_call
224
+ async def _get_container_limits_async_with_http_info(
225
+ self,
226
+ _request_timeout: Union[
227
+ None,
228
+ Annotated[StrictFloat, Field(gt=0)],
229
+ Tuple[
230
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
231
+ ],
232
+ ] = None,
233
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
234
+ _content_type: Optional[StrictStr] = None,
235
+ _headers: Optional[Dict[StrictStr, Any]] = None,
236
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
237
+ ) -> ApiResponse[Dict[str, object]]:
238
+ """Get Container Limits
239
+
240
+ Return container resource limits from cgroup.
241
+
242
+ :param _request_timeout: timeout setting for this request. If one
243
+ number provided, it will be total request
244
+ timeout. It can also be a pair (tuple) of
245
+ (connection, read) timeouts.
246
+ :type _request_timeout: int, tuple(int, int), optional
247
+ :param _request_auth: set to override the auth_settings for an a single
248
+ request; this effectively ignores the
249
+ authentication in the spec for a single request.
250
+ :type _request_auth: dict, optional
251
+ :param _content_type: force content-type for the request.
252
+ :type _content_type: str, Optional
253
+ :param _headers: set to override the headers for a single
254
+ request; this effectively ignores the headers
255
+ in the spec for a single request.
256
+ :type _headers: dict, optional
257
+ :param _host_index: set to override the host_index for a single
258
+ request; this effectively ignores the host_index
259
+ in the spec for a single request.
260
+ :type _host_index: int, optional
261
+ :return: Returns the result object.
262
+ """ # noqa: E501
263
+
264
+ _param = self._get_container_limits_serialize(
265
+ _request_auth=_request_auth,
266
+ _content_type=_content_type,
267
+ _headers=_headers,
268
+ _host_index=_host_index,
269
+ )
270
+
271
+ _response_types_map: Dict[str, Optional[str]] = {
272
+ "200": "Dict[str, object]",
273
+ }
274
+ response_data = await self.api_client.call_api(
275
+ *_param, _request_timeout=_request_timeout
276
+ )
277
+ await response_data.read()
278
+ return self.api_client.response_deserialize(
279
+ response_data=response_data, response_types_map=_response_types_map
280
+ )
281
+
282
+ @validate_call
283
+ async def _get_container_limits_async_without_preload_content(
284
+ self,
285
+ _request_timeout: Union[
286
+ None,
287
+ Annotated[StrictFloat, Field(gt=0)],
288
+ Tuple[
289
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
290
+ ],
291
+ ] = None,
292
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
293
+ _content_type: Optional[StrictStr] = None,
294
+ _headers: Optional[Dict[StrictStr, Any]] = None,
295
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
296
+ ) -> RESTResponseType:
297
+ """Get Container Limits
298
+
299
+ Return container resource limits from cgroup.
300
+
301
+ :param _request_timeout: timeout setting for this request. If one
302
+ number provided, it will be total request
303
+ timeout. It can also be a pair (tuple) of
304
+ (connection, read) timeouts.
305
+ :type _request_timeout: int, tuple(int, int), optional
306
+ :param _request_auth: set to override the auth_settings for an a single
307
+ request; this effectively ignores the
308
+ authentication in the spec for a single request.
309
+ :type _request_auth: dict, optional
310
+ :param _content_type: force content-type for the request.
311
+ :type _content_type: str, Optional
312
+ :param _headers: set to override the headers for a single
313
+ request; this effectively ignores the headers
314
+ in the spec for a single request.
315
+ :type _headers: dict, optional
316
+ :param _host_index: set to override the host_index for a single
317
+ request; this effectively ignores the host_index
318
+ in the spec for a single request.
319
+ :type _host_index: int, optional
320
+ :return: Returns the result object.
321
+ """ # noqa: E501
322
+
323
+ _param = self._get_container_limits_serialize(
324
+ _request_auth=_request_auth,
325
+ _content_type=_content_type,
326
+ _headers=_headers,
327
+ _host_index=_host_index,
328
+ )
329
+
330
+ _response_types_map: Dict[str, Optional[str]] = {
331
+ "200": "Dict[str, object]",
332
+ }
333
+ response_data = await self.api_client.call_api(
334
+ *_param, _request_timeout=_request_timeout
335
+ )
336
+ return response_data
337
+
338
+ # Private sync implementation methods
339
+ @validate_call
340
+ def _get_container_limits_sync(
341
+ self,
342
+ _request_timeout: Union[
343
+ None,
344
+ Annotated[StrictFloat, Field(gt=0)],
345
+ Tuple[
346
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
347
+ ],
348
+ ] = None,
349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
350
+ _content_type: Optional[StrictStr] = None,
351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
353
+ ) -> Dict[str, object]:
354
+ """Synchronous version of get_container_limits"""
355
+ return async_to_sync(self._get_container_limits_async)(
356
+ _request_timeout=_request_timeout,
357
+ _request_auth=_request_auth,
358
+ _content_type=_content_type,
359
+ _headers=_headers,
360
+ _host_index=_host_index,
361
+ )
362
+
363
+ @validate_call
364
+ def _get_container_limits_sync_with_http_info(
365
+ self,
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
371
+ ],
372
+ ] = None,
373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
374
+ _content_type: Optional[StrictStr] = None,
375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
377
+ ) -> ApiResponse[Dict[str, object]]:
378
+ """Synchronous version of get_container_limits_with_http_info"""
379
+ return async_to_sync(self._get_container_limits_async_with_http_info)(
380
+ _request_timeout=_request_timeout,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index,
385
+ )
386
+
387
+ @validate_call
388
+ def _get_container_limits_sync_without_preload_content(
389
+ self,
390
+ _request_timeout: Union[
391
+ None,
392
+ Annotated[StrictFloat, Field(gt=0)],
393
+ Tuple[
394
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
395
+ ],
396
+ ] = None,
397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
398
+ _content_type: Optional[StrictStr] = None,
399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
401
+ ) -> RESTResponseType:
402
+ """Synchronous version of get_container_limits_without_preload_content"""
403
+ return async_to_sync(self._get_container_limits_async_without_preload_content)(
404
+ _request_timeout=_request_timeout,
405
+ _request_auth=_request_auth,
406
+ _content_type=_content_type,
407
+ _headers=_headers,
408
+ _host_index=_host_index,
409
+ )
410
+
411
+ def _get_container_limits_serialize(
412
+ self,
413
+ _request_auth,
414
+ _content_type,
415
+ _headers,
416
+ _host_index,
417
+ ) -> RequestSerialized:
418
+
419
+ _host = None
420
+
421
+ _collection_formats: Dict[str, str] = {}
422
+
423
+ _path_params: Dict[str, str] = {}
424
+ _query_params: List[Tuple[str, str]] = []
425
+ _header_params: Dict[str, Optional[str]] = _headers or {}
426
+ _form_params: List[Tuple[str, str]] = []
427
+ _files: Dict[
428
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
429
+ ] = {}
430
+ _body_params: Optional[bytes] = None
431
+
432
+ # process the path parameters
433
+ # process the query parameters
434
+ # process the header parameters
435
+ # process the form parameters
436
+ # process the body parameter
437
+
438
+ # set the HTTP header `Accept`
439
+ if "Accept" not in _header_params:
440
+ _header_params["Accept"] = self.api_client.select_header_accept(
441
+ ["application/json"]
442
+ )
443
+
444
+ # authentication setting
445
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
446
+
447
+ return self.api_client.param_serialize(
448
+ method="GET",
449
+ resource_path="/admin/limits",
450
+ path_params=_path_params,
451
+ query_params=_query_params,
452
+ header_params=_header_params,
453
+ body=_body_params,
454
+ post_params=_form_params,
455
+ files=_files,
456
+ auth_settings=_auth_settings,
457
+ collection_formats=_collection_formats,
458
+ _host=_host,
459
+ _request_auth=_request_auth,
460
+ )
461
+
462
+ @validate_call
463
+ def get_dependencies(
464
+ self,
465
+ include: Annotated[
466
+ Optional[List[Optional[StrictStr]]],
467
+ Field(
468
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
469
+ ),
470
+ ] = None,
471
+ _request_timeout: Union[
472
+ None,
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Tuple[
475
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
476
+ ],
477
+ ] = None,
478
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
479
+ _content_type: Optional[StrictStr] = None,
480
+ _headers: Optional[Dict[StrictStr, Any]] = None,
481
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
482
+ ) -> Dict[str, Optional[str]]:
483
+ """List Installed Packages"""
484
+ if self.is_sync:
485
+ return self._get_dependencies_sync(
486
+ include=include,
487
+ _request_timeout=_request_timeout,
488
+ _request_auth=_request_auth,
489
+ _content_type=_content_type,
490
+ _headers=_headers,
491
+ _host_index=_host_index,
492
+ )
493
+
494
+ else:
495
+ return self._get_dependencies_async(
496
+ include=include,
497
+ _request_timeout=_request_timeout,
498
+ _request_auth=_request_auth,
499
+ _content_type=_content_type,
500
+ _headers=_headers,
501
+ _host_index=_host_index,
502
+ )
503
+
504
+ @validate_call
505
+ def get_dependencies_with_http_info(
506
+ self,
507
+ include: Annotated[
508
+ Optional[List[Optional[StrictStr]]],
509
+ Field(
510
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
511
+ ),
512
+ ] = None,
513
+ _request_timeout: Union[
514
+ None,
515
+ Annotated[StrictFloat, Field(gt=0)],
516
+ Tuple[
517
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
518
+ ],
519
+ ] = None,
520
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
521
+ _content_type: Optional[StrictStr] = None,
522
+ _headers: Optional[Dict[StrictStr, Any]] = None,
523
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
524
+ ) -> ApiResponse[Dict[str, Optional[str]]]:
525
+ """List Installed Packages with HTTP info"""
526
+ if self.is_sync:
527
+ return self._get_dependencies_sync_with_http_info(
528
+ include=include,
529
+ _request_timeout=_request_timeout,
530
+ _request_auth=_request_auth,
531
+ _content_type=_content_type,
532
+ _headers=_headers,
533
+ _host_index=_host_index,
534
+ )
535
+
536
+ else:
537
+ return self._get_dependencies_async_with_http_info(
538
+ include=include,
539
+ _request_timeout=_request_timeout,
540
+ _request_auth=_request_auth,
541
+ _content_type=_content_type,
542
+ _headers=_headers,
543
+ _host_index=_host_index,
544
+ )
545
+
546
+ @validate_call
547
+ def get_dependencies_without_preload_content(
548
+ self,
549
+ include: Annotated[
550
+ Optional[List[Optional[StrictStr]]],
551
+ Field(
552
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
553
+ ),
554
+ ] = None,
555
+ _request_timeout: Union[
556
+ None,
557
+ Annotated[StrictFloat, Field(gt=0)],
558
+ Tuple[
559
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
560
+ ],
561
+ ] = None,
562
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
563
+ _content_type: Optional[StrictStr] = None,
564
+ _headers: Optional[Dict[StrictStr, Any]] = None,
565
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
566
+ ) -> RESTResponseType:
567
+ """List Installed Packages without preloading content"""
568
+ if self.is_sync:
569
+ return self._get_dependencies_sync_without_preload_content(
570
+ include=include,
571
+ _request_timeout=_request_timeout,
572
+ _request_auth=_request_auth,
573
+ _content_type=_content_type,
574
+ _headers=_headers,
575
+ _host_index=_host_index,
576
+ )
577
+
578
+ else:
579
+ return self._get_dependencies_async_without_preload_content(
580
+ include=include,
581
+ _request_timeout=_request_timeout,
582
+ _request_auth=_request_auth,
583
+ _content_type=_content_type,
584
+ _headers=_headers,
585
+ _host_index=_host_index,
586
+ )
587
+
588
+ # Private async implementation methods
589
+ @validate_call
590
+ async def _get_dependencies_async(
591
+ self,
592
+ include: Annotated[
593
+ Optional[List[Optional[StrictStr]]],
594
+ Field(
595
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
596
+ ),
597
+ ] = None,
598
+ _request_timeout: Union[
599
+ None,
600
+ Annotated[StrictFloat, Field(gt=0)],
601
+ Tuple[
602
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
603
+ ],
604
+ ] = None,
605
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
606
+ _content_type: Optional[StrictStr] = None,
607
+ _headers: Optional[Dict[StrictStr, Any]] = None,
608
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
609
+ ) -> Dict[str, Optional[str]]:
610
+ """List Installed Packages
611
+
612
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
613
+
614
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
615
+ :type include: List[Optional[str]]
616
+ :param _request_timeout: timeout setting for this request. If one
617
+ number provided, it will be total request
618
+ timeout. It can also be a pair (tuple) of
619
+ (connection, read) timeouts.
620
+ :type _request_timeout: int, tuple(int, int), optional
621
+ :param _request_auth: set to override the auth_settings for an a single
622
+ request; this effectively ignores the
623
+ authentication in the spec for a single request.
624
+ :type _request_auth: dict, optional
625
+ :param _content_type: force content-type for the request.
626
+ :type _content_type: str, Optional
627
+ :param _headers: set to override the headers for a single
628
+ request; this effectively ignores the headers
629
+ in the spec for a single request.
630
+ :type _headers: dict, optional
631
+ :param _host_index: set to override the host_index for a single
632
+ request; this effectively ignores the host_index
633
+ in the spec for a single request.
634
+ :type _host_index: int, optional
635
+ :return: Returns the result object.
636
+ """ # noqa: E501
637
+
638
+ _param = self._get_dependencies_serialize(
639
+ include=include,
640
+ _request_auth=_request_auth,
641
+ _content_type=_content_type,
642
+ _headers=_headers,
643
+ _host_index=_host_index,
644
+ )
645
+
646
+ _response_types_map: Dict[str, Optional[str]] = {
647
+ "200": "Dict[str, Optional[str]]",
648
+ }
649
+ response_data = await self.api_client.call_api(
650
+ *_param, _request_timeout=_request_timeout
651
+ )
652
+ await response_data.read()
653
+ return self.api_client.response_deserialize(
654
+ response_data=response_data,
655
+ response_types_map=_response_types_map,
656
+ ).data
657
+
658
+ @validate_call
659
+ async def _get_dependencies_async_with_http_info(
660
+ self,
661
+ include: Annotated[
662
+ Optional[List[Optional[StrictStr]]],
663
+ Field(
664
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
665
+ ),
666
+ ] = None,
667
+ _request_timeout: Union[
668
+ None,
669
+ Annotated[StrictFloat, Field(gt=0)],
670
+ Tuple[
671
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
672
+ ],
673
+ ] = None,
674
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
675
+ _content_type: Optional[StrictStr] = None,
676
+ _headers: Optional[Dict[StrictStr, Any]] = None,
677
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
678
+ ) -> ApiResponse[Dict[str, Optional[str]]]:
679
+ """List Installed Packages
680
+
681
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
682
+
683
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
684
+ :type include: List[Optional[str]]
685
+ :param _request_timeout: timeout setting for this request. If one
686
+ number provided, it will be total request
687
+ timeout. It can also be a pair (tuple) of
688
+ (connection, read) timeouts.
689
+ :type _request_timeout: int, tuple(int, int), optional
690
+ :param _request_auth: set to override the auth_settings for an a single
691
+ request; this effectively ignores the
692
+ authentication in the spec for a single request.
693
+ :type _request_auth: dict, optional
694
+ :param _content_type: force content-type for the request.
695
+ :type _content_type: str, Optional
696
+ :param _headers: set to override the headers for a single
697
+ request; this effectively ignores the headers
698
+ in the spec for a single request.
699
+ :type _headers: dict, optional
700
+ :param _host_index: set to override the host_index for a single
701
+ request; this effectively ignores the host_index
702
+ in the spec for a single request.
703
+ :type _host_index: int, optional
704
+ :return: Returns the result object.
705
+ """ # noqa: E501
706
+
707
+ _param = self._get_dependencies_serialize(
708
+ include=include,
709
+ _request_auth=_request_auth,
710
+ _content_type=_content_type,
711
+ _headers=_headers,
712
+ _host_index=_host_index,
713
+ )
714
+
715
+ _response_types_map: Dict[str, Optional[str]] = {
716
+ "200": "Dict[str, Optional[str]]",
717
+ }
718
+ response_data = await self.api_client.call_api(
719
+ *_param, _request_timeout=_request_timeout
720
+ )
721
+ await response_data.read()
722
+ return self.api_client.response_deserialize(
723
+ response_data=response_data, response_types_map=_response_types_map
724
+ )
725
+
726
+ @validate_call
727
+ async def _get_dependencies_async_without_preload_content(
728
+ self,
729
+ include: Annotated[
730
+ Optional[List[Optional[StrictStr]]],
731
+ Field(
732
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
733
+ ),
734
+ ] = None,
735
+ _request_timeout: Union[
736
+ None,
737
+ Annotated[StrictFloat, Field(gt=0)],
738
+ Tuple[
739
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
740
+ ],
741
+ ] = None,
742
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
743
+ _content_type: Optional[StrictStr] = None,
744
+ _headers: Optional[Dict[StrictStr, Any]] = None,
745
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
746
+ ) -> RESTResponseType:
747
+ """List Installed Packages
748
+
749
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
750
+
751
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
752
+ :type include: List[Optional[str]]
753
+ :param _request_timeout: timeout setting for this request. If one
754
+ number provided, it will be total request
755
+ timeout. It can also be a pair (tuple) of
756
+ (connection, read) timeouts.
757
+ :type _request_timeout: int, tuple(int, int), optional
758
+ :param _request_auth: set to override the auth_settings for an a single
759
+ request; this effectively ignores the
760
+ authentication in the spec for a single request.
761
+ :type _request_auth: dict, optional
762
+ :param _content_type: force content-type for the request.
763
+ :type _content_type: str, Optional
764
+ :param _headers: set to override the headers for a single
765
+ request; this effectively ignores the headers
766
+ in the spec for a single request.
767
+ :type _headers: dict, optional
768
+ :param _host_index: set to override the host_index for a single
769
+ request; this effectively ignores the host_index
770
+ in the spec for a single request.
771
+ :type _host_index: int, optional
772
+ :return: Returns the result object.
773
+ """ # noqa: E501
774
+
775
+ _param = self._get_dependencies_serialize(
776
+ include=include,
777
+ _request_auth=_request_auth,
778
+ _content_type=_content_type,
779
+ _headers=_headers,
780
+ _host_index=_host_index,
781
+ )
782
+
783
+ _response_types_map: Dict[str, Optional[str]] = {
784
+ "200": "Dict[str, Optional[str]]",
785
+ }
786
+ response_data = await self.api_client.call_api(
787
+ *_param, _request_timeout=_request_timeout
788
+ )
789
+ return response_data
790
+
791
+ # Private sync implementation methods
792
+ @validate_call
793
+ def _get_dependencies_sync(
794
+ self,
795
+ include: Annotated[
796
+ Optional[List[Optional[StrictStr]]],
797
+ Field(
798
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
799
+ ),
800
+ ] = None,
801
+ _request_timeout: Union[
802
+ None,
803
+ Annotated[StrictFloat, Field(gt=0)],
804
+ Tuple[
805
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
806
+ ],
807
+ ] = None,
808
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
809
+ _content_type: Optional[StrictStr] = None,
810
+ _headers: Optional[Dict[StrictStr, Any]] = None,
811
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
812
+ ) -> Dict[str, Optional[str]]:
813
+ """Synchronous version of get_dependencies"""
814
+ return async_to_sync(self._get_dependencies_async)(
815
+ include=include,
816
+ _request_timeout=_request_timeout,
817
+ _request_auth=_request_auth,
818
+ _content_type=_content_type,
819
+ _headers=_headers,
820
+ _host_index=_host_index,
821
+ )
822
+
823
+ @validate_call
824
+ def _get_dependencies_sync_with_http_info(
825
+ self,
826
+ include: Annotated[
827
+ Optional[List[Optional[StrictStr]]],
828
+ Field(
829
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
830
+ ),
831
+ ] = None,
832
+ _request_timeout: Union[
833
+ None,
834
+ Annotated[StrictFloat, Field(gt=0)],
835
+ Tuple[
836
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
837
+ ],
838
+ ] = None,
839
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
840
+ _content_type: Optional[StrictStr] = None,
841
+ _headers: Optional[Dict[StrictStr, Any]] = None,
842
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
843
+ ) -> ApiResponse[Dict[str, Optional[str]]]:
844
+ """Synchronous version of get_dependencies_with_http_info"""
845
+ return async_to_sync(self._get_dependencies_async_with_http_info)(
846
+ include=include,
847
+ _request_timeout=_request_timeout,
848
+ _request_auth=_request_auth,
849
+ _content_type=_content_type,
850
+ _headers=_headers,
851
+ _host_index=_host_index,
852
+ )
853
+
854
+ @validate_call
855
+ def _get_dependencies_sync_without_preload_content(
856
+ self,
857
+ include: Annotated[
858
+ Optional[List[Optional[StrictStr]]],
859
+ Field(
860
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
861
+ ),
862
+ ] = None,
863
+ _request_timeout: Union[
864
+ None,
865
+ Annotated[StrictFloat, Field(gt=0)],
866
+ Tuple[
867
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
868
+ ],
869
+ ] = None,
870
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
871
+ _content_type: Optional[StrictStr] = None,
872
+ _headers: Optional[Dict[StrictStr, Any]] = None,
873
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
874
+ ) -> RESTResponseType:
875
+ """Synchronous version of get_dependencies_without_preload_content"""
876
+ return async_to_sync(self._get_dependencies_async_without_preload_content)(
877
+ include=include,
878
+ _request_timeout=_request_timeout,
879
+ _request_auth=_request_auth,
880
+ _content_type=_content_type,
881
+ _headers=_headers,
882
+ _host_index=_host_index,
883
+ )
884
+
885
+ def _get_dependencies_serialize(
886
+ self,
887
+ include,
888
+ _request_auth,
889
+ _content_type,
890
+ _headers,
891
+ _host_index,
892
+ ) -> RequestSerialized:
893
+
894
+ _host = None
895
+
896
+ _collection_formats: Dict[str, str] = {
897
+ "include": "multi",
898
+ }
899
+
900
+ _path_params: Dict[str, str] = {}
901
+ _query_params: List[Tuple[str, str]] = []
902
+ _header_params: Dict[str, Optional[str]] = _headers or {}
903
+ _form_params: List[Tuple[str, str]] = []
904
+ _files: Dict[
905
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
906
+ ] = {}
907
+ _body_params: Optional[bytes] = None
908
+
909
+ # process the path parameters
910
+ # process the query parameters
911
+ if include is not None:
912
+
913
+ _query_params.append(("include", include))
914
+
915
+ # process the header parameters
916
+ # process the form parameters
917
+ # process the body parameter
918
+
919
+ # set the HTTP header `Accept`
920
+ if "Accept" not in _header_params:
921
+ _header_params["Accept"] = self.api_client.select_header_accept(
922
+ ["application/json"]
923
+ )
924
+
925
+ # authentication setting
926
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
927
+
928
+ return self.api_client.param_serialize(
929
+ method="GET",
930
+ resource_path="/admin/dependencies",
931
+ path_params=_path_params,
932
+ query_params=_query_params,
933
+ header_params=_header_params,
934
+ body=_body_params,
935
+ post_params=_form_params,
936
+ files=_files,
937
+ auth_settings=_auth_settings,
938
+ collection_formats=_collection_formats,
939
+ _host=_host,
940
+ _request_auth=_request_auth,
941
+ )
942
+
943
+ @validate_call
944
+ def get_log_level(
945
+ self,
946
+ _request_timeout: Union[
947
+ None,
948
+ Annotated[StrictFloat, Field(gt=0)],
949
+ Tuple[
950
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
951
+ ],
952
+ ] = None,
953
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
954
+ _content_type: Optional[StrictStr] = None,
955
+ _headers: Optional[Dict[StrictStr, Any]] = None,
956
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
957
+ ) -> LogLevel:
958
+ """Get Logging Level"""
959
+ if self.is_sync:
960
+ return self._get_log_level_sync(
961
+ _request_timeout=_request_timeout,
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index,
966
+ )
967
+
968
+ else:
969
+ return self._get_log_level_async(
970
+ _request_timeout=_request_timeout,
971
+ _request_auth=_request_auth,
972
+ _content_type=_content_type,
973
+ _headers=_headers,
974
+ _host_index=_host_index,
975
+ )
976
+
977
+ @validate_call
978
+ def get_log_level_with_http_info(
979
+ self,
980
+ _request_timeout: Union[
981
+ None,
982
+ Annotated[StrictFloat, Field(gt=0)],
983
+ Tuple[
984
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
985
+ ],
986
+ ] = None,
987
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
988
+ _content_type: Optional[StrictStr] = None,
989
+ _headers: Optional[Dict[StrictStr, Any]] = None,
990
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
991
+ ) -> ApiResponse[LogLevel]:
992
+ """Get Logging Level with HTTP info"""
993
+ if self.is_sync:
994
+ return self._get_log_level_sync_with_http_info(
995
+ _request_timeout=_request_timeout,
996
+ _request_auth=_request_auth,
997
+ _content_type=_content_type,
998
+ _headers=_headers,
999
+ _host_index=_host_index,
1000
+ )
1001
+
1002
+ else:
1003
+ return self._get_log_level_async_with_http_info(
1004
+ _request_timeout=_request_timeout,
1005
+ _request_auth=_request_auth,
1006
+ _content_type=_content_type,
1007
+ _headers=_headers,
1008
+ _host_index=_host_index,
1009
+ )
1010
+
1011
+ @validate_call
1012
+ def get_log_level_without_preload_content(
1013
+ self,
1014
+ _request_timeout: Union[
1015
+ None,
1016
+ Annotated[StrictFloat, Field(gt=0)],
1017
+ Tuple[
1018
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1019
+ ],
1020
+ ] = None,
1021
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1022
+ _content_type: Optional[StrictStr] = None,
1023
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1024
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1025
+ ) -> RESTResponseType:
1026
+ """Get Logging Level without preloading content"""
1027
+ if self.is_sync:
1028
+ return self._get_log_level_sync_without_preload_content(
1029
+ _request_timeout=_request_timeout,
1030
+ _request_auth=_request_auth,
1031
+ _content_type=_content_type,
1032
+ _headers=_headers,
1033
+ _host_index=_host_index,
1034
+ )
1035
+
1036
+ else:
1037
+ return self._get_log_level_async_without_preload_content(
1038
+ _request_timeout=_request_timeout,
1039
+ _request_auth=_request_auth,
1040
+ _content_type=_content_type,
1041
+ _headers=_headers,
1042
+ _host_index=_host_index,
1043
+ )
1044
+
1045
+ # Private async implementation methods
1046
+ @validate_call
1047
+ async def _get_log_level_async(
1048
+ self,
1049
+ _request_timeout: Union[
1050
+ None,
1051
+ Annotated[StrictFloat, Field(gt=0)],
1052
+ Tuple[
1053
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1054
+ ],
1055
+ ] = None,
1056
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1057
+ _content_type: Optional[StrictStr] = None,
1058
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1059
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1060
+ ) -> LogLevel:
1061
+ """(Deprecated) Get Logging Level
1062
+
1063
+ Get the log level of the server logger. Will be removed in a future release.
1064
+
1065
+ :param _request_timeout: timeout setting for this request. If one
1066
+ number provided, it will be total request
1067
+ timeout. It can also be a pair (tuple) of
1068
+ (connection, read) timeouts.
1069
+ :type _request_timeout: int, tuple(int, int), optional
1070
+ :param _request_auth: set to override the auth_settings for an a single
1071
+ request; this effectively ignores the
1072
+ authentication in the spec for a single request.
1073
+ :type _request_auth: dict, optional
1074
+ :param _content_type: force content-type for the request.
1075
+ :type _content_type: str, Optional
1076
+ :param _headers: set to override the headers for a single
1077
+ request; this effectively ignores the headers
1078
+ in the spec for a single request.
1079
+ :type _headers: dict, optional
1080
+ :param _host_index: set to override the host_index for a single
1081
+ request; this effectively ignores the host_index
1082
+ in the spec for a single request.
1083
+ :type _host_index: int, optional
1084
+ :return: Returns the result object.
1085
+ """ # noqa: E501
1086
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
1087
+
1088
+ _param = self._get_log_level_serialize(
1089
+ _request_auth=_request_auth,
1090
+ _content_type=_content_type,
1091
+ _headers=_headers,
1092
+ _host_index=_host_index,
1093
+ )
1094
+
1095
+ _response_types_map: Dict[str, Optional[str]] = {
1096
+ "200": "LogLevel",
1097
+ }
1098
+ response_data = await self.api_client.call_api(
1099
+ *_param, _request_timeout=_request_timeout
1100
+ )
1101
+ await response_data.read()
1102
+ return self.api_client.response_deserialize(
1103
+ response_data=response_data,
1104
+ response_types_map=_response_types_map,
1105
+ ).data
1106
+
1107
+ @validate_call
1108
+ async def _get_log_level_async_with_http_info(
1109
+ self,
1110
+ _request_timeout: Union[
1111
+ None,
1112
+ Annotated[StrictFloat, Field(gt=0)],
1113
+ Tuple[
1114
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1115
+ ],
1116
+ ] = None,
1117
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1118
+ _content_type: Optional[StrictStr] = None,
1119
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1120
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1121
+ ) -> ApiResponse[LogLevel]:
1122
+ """(Deprecated) Get Logging Level
1123
+
1124
+ Get the log level of the server logger. Will be removed in a future release.
1125
+
1126
+ :param _request_timeout: timeout setting for this request. If one
1127
+ number provided, it will be total request
1128
+ timeout. It can also be a pair (tuple) of
1129
+ (connection, read) timeouts.
1130
+ :type _request_timeout: int, tuple(int, int), optional
1131
+ :param _request_auth: set to override the auth_settings for an a single
1132
+ request; this effectively ignores the
1133
+ authentication in the spec for a single request.
1134
+ :type _request_auth: dict, optional
1135
+ :param _content_type: force content-type for the request.
1136
+ :type _content_type: str, Optional
1137
+ :param _headers: set to override the headers for a single
1138
+ request; this effectively ignores the headers
1139
+ in the spec for a single request.
1140
+ :type _headers: dict, optional
1141
+ :param _host_index: set to override the host_index for a single
1142
+ request; this effectively ignores the host_index
1143
+ in the spec for a single request.
1144
+ :type _host_index: int, optional
1145
+ :return: Returns the result object.
1146
+ """ # noqa: E501
1147
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
1148
+
1149
+ _param = self._get_log_level_serialize(
1150
+ _request_auth=_request_auth,
1151
+ _content_type=_content_type,
1152
+ _headers=_headers,
1153
+ _host_index=_host_index,
1154
+ )
1155
+
1156
+ _response_types_map: Dict[str, Optional[str]] = {
1157
+ "200": "LogLevel",
1158
+ }
1159
+ response_data = await self.api_client.call_api(
1160
+ *_param, _request_timeout=_request_timeout
1161
+ )
1162
+ await response_data.read()
1163
+ return self.api_client.response_deserialize(
1164
+ response_data=response_data, response_types_map=_response_types_map
1165
+ )
1166
+
1167
+ @validate_call
1168
+ async def _get_log_level_async_without_preload_content(
1169
+ self,
1170
+ _request_timeout: Union[
1171
+ None,
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Tuple[
1174
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1175
+ ],
1176
+ ] = None,
1177
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1178
+ _content_type: Optional[StrictStr] = None,
1179
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1180
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1181
+ ) -> RESTResponseType:
1182
+ """(Deprecated) Get Logging Level
1183
+
1184
+ Get the log level of the server logger. Will be removed in a future release.
1185
+
1186
+ :param _request_timeout: timeout setting for this request. If one
1187
+ number provided, it will be total request
1188
+ timeout. It can also be a pair (tuple) of
1189
+ (connection, read) timeouts.
1190
+ :type _request_timeout: int, tuple(int, int), optional
1191
+ :param _request_auth: set to override the auth_settings for an a single
1192
+ request; this effectively ignores the
1193
+ authentication in the spec for a single request.
1194
+ :type _request_auth: dict, optional
1195
+ :param _content_type: force content-type for the request.
1196
+ :type _content_type: str, Optional
1197
+ :param _headers: set to override the headers for a single
1198
+ request; this effectively ignores the headers
1199
+ in the spec for a single request.
1200
+ :type _headers: dict, optional
1201
+ :param _host_index: set to override the host_index for a single
1202
+ request; this effectively ignores the host_index
1203
+ in the spec for a single request.
1204
+ :type _host_index: int, optional
1205
+ :return: Returns the result object.
1206
+ """ # noqa: E501
1207
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
1208
+
1209
+ _param = self._get_log_level_serialize(
1210
+ _request_auth=_request_auth,
1211
+ _content_type=_content_type,
1212
+ _headers=_headers,
1213
+ _host_index=_host_index,
1214
+ )
1215
+
1216
+ _response_types_map: Dict[str, Optional[str]] = {
1217
+ "200": "LogLevel",
1218
+ }
1219
+ response_data = await self.api_client.call_api(
1220
+ *_param, _request_timeout=_request_timeout
1221
+ )
1222
+ return response_data
1223
+
1224
+ # Private sync implementation methods
1225
+ @validate_call
1226
+ def _get_log_level_sync(
1227
+ self,
1228
+ _request_timeout: Union[
1229
+ None,
1230
+ Annotated[StrictFloat, Field(gt=0)],
1231
+ Tuple[
1232
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1233
+ ],
1234
+ ] = None,
1235
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1236
+ _content_type: Optional[StrictStr] = None,
1237
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1238
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1239
+ ) -> LogLevel:
1240
+ """Synchronous version of get_log_level"""
1241
+ return async_to_sync(self._get_log_level_async)(
1242
+ _request_timeout=_request_timeout,
1243
+ _request_auth=_request_auth,
1244
+ _content_type=_content_type,
1245
+ _headers=_headers,
1246
+ _host_index=_host_index,
1247
+ )
1248
+
1249
+ @validate_call
1250
+ def _get_log_level_sync_with_http_info(
1251
+ self,
1252
+ _request_timeout: Union[
1253
+ None,
1254
+ Annotated[StrictFloat, Field(gt=0)],
1255
+ Tuple[
1256
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1257
+ ],
1258
+ ] = None,
1259
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1260
+ _content_type: Optional[StrictStr] = None,
1261
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1262
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1263
+ ) -> ApiResponse[LogLevel]:
1264
+ """Synchronous version of get_log_level_with_http_info"""
1265
+ return async_to_sync(self._get_log_level_async_with_http_info)(
1266
+ _request_timeout=_request_timeout,
1267
+ _request_auth=_request_auth,
1268
+ _content_type=_content_type,
1269
+ _headers=_headers,
1270
+ _host_index=_host_index,
1271
+ )
1272
+
1273
+ @validate_call
1274
+ def _get_log_level_sync_without_preload_content(
1275
+ self,
1276
+ _request_timeout: Union[
1277
+ None,
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Tuple[
1280
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1281
+ ],
1282
+ ] = None,
1283
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1284
+ _content_type: Optional[StrictStr] = None,
1285
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1286
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1287
+ ) -> RESTResponseType:
1288
+ """Synchronous version of get_log_level_without_preload_content"""
1289
+ return async_to_sync(self._get_log_level_async_without_preload_content)(
1290
+ _request_timeout=_request_timeout,
1291
+ _request_auth=_request_auth,
1292
+ _content_type=_content_type,
1293
+ _headers=_headers,
1294
+ _host_index=_host_index,
1295
+ )
1296
+
1297
+ def _get_log_level_serialize(
1298
+ self,
1299
+ _request_auth,
1300
+ _content_type,
1301
+ _headers,
1302
+ _host_index,
1303
+ ) -> RequestSerialized:
1304
+
1305
+ _host = None
1306
+
1307
+ _collection_formats: Dict[str, str] = {}
1308
+
1309
+ _path_params: Dict[str, str] = {}
1310
+ _query_params: List[Tuple[str, str]] = []
1311
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1312
+ _form_params: List[Tuple[str, str]] = []
1313
+ _files: Dict[
1314
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1315
+ ] = {}
1316
+ _body_params: Optional[bytes] = None
1317
+
1318
+ # process the path parameters
1319
+ # process the query parameters
1320
+ # process the header parameters
1321
+ # process the form parameters
1322
+ # process the body parameter
1323
+
1324
+ # set the HTTP header `Accept`
1325
+ if "Accept" not in _header_params:
1326
+ _header_params["Accept"] = self.api_client.select_header_accept(
1327
+ ["application/json"]
1328
+ )
1329
+
1330
+ # authentication setting
1331
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1332
+
1333
+ return self.api_client.param_serialize(
1334
+ method="GET",
1335
+ resource_path="/admin/log-level",
1336
+ path_params=_path_params,
1337
+ query_params=_query_params,
1338
+ header_params=_header_params,
1339
+ body=_body_params,
1340
+ post_params=_form_params,
1341
+ files=_files,
1342
+ auth_settings=_auth_settings,
1343
+ collection_formats=_collection_formats,
1344
+ _host=_host,
1345
+ _request_auth=_request_auth,
1346
+ )
1347
+
1348
+ @validate_call
1349
+ def get_memory_usage(
1350
+ self,
1351
+ _request_timeout: Union[
1352
+ None,
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Tuple[
1355
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1356
+ ],
1357
+ ] = None,
1358
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1359
+ _content_type: Optional[StrictStr] = None,
1360
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1361
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1362
+ ) -> float:
1363
+ """Get Memory Usage"""
1364
+ if self.is_sync:
1365
+ return self._get_memory_usage_sync(
1366
+ _request_timeout=_request_timeout,
1367
+ _request_auth=_request_auth,
1368
+ _content_type=_content_type,
1369
+ _headers=_headers,
1370
+ _host_index=_host_index,
1371
+ )
1372
+
1373
+ else:
1374
+ return self._get_memory_usage_async(
1375
+ _request_timeout=_request_timeout,
1376
+ _request_auth=_request_auth,
1377
+ _content_type=_content_type,
1378
+ _headers=_headers,
1379
+ _host_index=_host_index,
1380
+ )
1381
+
1382
+ @validate_call
1383
+ def get_memory_usage_with_http_info(
1384
+ self,
1385
+ _request_timeout: Union[
1386
+ None,
1387
+ Annotated[StrictFloat, Field(gt=0)],
1388
+ Tuple[
1389
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1390
+ ],
1391
+ ] = None,
1392
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1393
+ _content_type: Optional[StrictStr] = None,
1394
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1395
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1396
+ ) -> ApiResponse[float]:
1397
+ """Get Memory Usage with HTTP info"""
1398
+ if self.is_sync:
1399
+ return self._get_memory_usage_sync_with_http_info(
1400
+ _request_timeout=_request_timeout,
1401
+ _request_auth=_request_auth,
1402
+ _content_type=_content_type,
1403
+ _headers=_headers,
1404
+ _host_index=_host_index,
1405
+ )
1406
+
1407
+ else:
1408
+ return self._get_memory_usage_async_with_http_info(
1409
+ _request_timeout=_request_timeout,
1410
+ _request_auth=_request_auth,
1411
+ _content_type=_content_type,
1412
+ _headers=_headers,
1413
+ _host_index=_host_index,
1414
+ )
1415
+
1416
+ @validate_call
1417
+ def get_memory_usage_without_preload_content(
1418
+ self,
1419
+ _request_timeout: Union[
1420
+ None,
1421
+ Annotated[StrictFloat, Field(gt=0)],
1422
+ Tuple[
1423
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1424
+ ],
1425
+ ] = None,
1426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1427
+ _content_type: Optional[StrictStr] = None,
1428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1430
+ ) -> RESTResponseType:
1431
+ """Get Memory Usage without preloading content"""
1432
+ if self.is_sync:
1433
+ return self._get_memory_usage_sync_without_preload_content(
1434
+ _request_timeout=_request_timeout,
1435
+ _request_auth=_request_auth,
1436
+ _content_type=_content_type,
1437
+ _headers=_headers,
1438
+ _host_index=_host_index,
1439
+ )
1440
+
1441
+ else:
1442
+ return self._get_memory_usage_async_without_preload_content(
1443
+ _request_timeout=_request_timeout,
1444
+ _request_auth=_request_auth,
1445
+ _content_type=_content_type,
1446
+ _headers=_headers,
1447
+ _host_index=_host_index,
1448
+ )
1449
+
1450
+ # Private async implementation methods
1451
+ @validate_call
1452
+ async def _get_memory_usage_async(
1453
+ self,
1454
+ _request_timeout: Union[
1455
+ None,
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Tuple[
1458
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1459
+ ],
1460
+ ] = None,
1461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1462
+ _content_type: Optional[StrictStr] = None,
1463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1465
+ ) -> float:
1466
+ """Get Memory Usage
1467
+
1468
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
1469
+
1470
+ :param _request_timeout: timeout setting for this request. If one
1471
+ number provided, it will be total request
1472
+ timeout. It can also be a pair (tuple) of
1473
+ (connection, read) timeouts.
1474
+ :type _request_timeout: int, tuple(int, int), optional
1475
+ :param _request_auth: set to override the auth_settings for an a single
1476
+ request; this effectively ignores the
1477
+ authentication in the spec for a single request.
1478
+ :type _request_auth: dict, optional
1479
+ :param _content_type: force content-type for the request.
1480
+ :type _content_type: str, Optional
1481
+ :param _headers: set to override the headers for a single
1482
+ request; this effectively ignores the headers
1483
+ in the spec for a single request.
1484
+ :type _headers: dict, optional
1485
+ :param _host_index: set to override the host_index for a single
1486
+ request; this effectively ignores the host_index
1487
+ in the spec for a single request.
1488
+ :type _host_index: int, optional
1489
+ :return: Returns the result object.
1490
+ """ # noqa: E501
1491
+
1492
+ _param = self._get_memory_usage_serialize(
1493
+ _request_auth=_request_auth,
1494
+ _content_type=_content_type,
1495
+ _headers=_headers,
1496
+ _host_index=_host_index,
1497
+ )
1498
+
1499
+ _response_types_map: Dict[str, Optional[str]] = {
1500
+ "200": "float",
1501
+ }
1502
+ response_data = await self.api_client.call_api(
1503
+ *_param, _request_timeout=_request_timeout
1504
+ )
1505
+ await response_data.read()
1506
+ return self.api_client.response_deserialize(
1507
+ response_data=response_data,
1508
+ response_types_map=_response_types_map,
1509
+ ).data
1510
+
1511
+ @validate_call
1512
+ async def _get_memory_usage_async_with_http_info(
1513
+ self,
1514
+ _request_timeout: Union[
1515
+ None,
1516
+ Annotated[StrictFloat, Field(gt=0)],
1517
+ Tuple[
1518
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1519
+ ],
1520
+ ] = None,
1521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1522
+ _content_type: Optional[StrictStr] = None,
1523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1525
+ ) -> ApiResponse[float]:
1526
+ """Get Memory Usage
1527
+
1528
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
1529
+
1530
+ :param _request_timeout: timeout setting for this request. If one
1531
+ number provided, it will be total request
1532
+ timeout. It can also be a pair (tuple) of
1533
+ (connection, read) timeouts.
1534
+ :type _request_timeout: int, tuple(int, int), optional
1535
+ :param _request_auth: set to override the auth_settings for an a single
1536
+ request; this effectively ignores the
1537
+ authentication in the spec for a single request.
1538
+ :type _request_auth: dict, optional
1539
+ :param _content_type: force content-type for the request.
1540
+ :type _content_type: str, Optional
1541
+ :param _headers: set to override the headers for a single
1542
+ request; this effectively ignores the headers
1543
+ in the spec for a single request.
1544
+ :type _headers: dict, optional
1545
+ :param _host_index: set to override the host_index for a single
1546
+ request; this effectively ignores the host_index
1547
+ in the spec for a single request.
1548
+ :type _host_index: int, optional
1549
+ :return: Returns the result object.
1550
+ """ # noqa: E501
1551
+
1552
+ _param = self._get_memory_usage_serialize(
1553
+ _request_auth=_request_auth,
1554
+ _content_type=_content_type,
1555
+ _headers=_headers,
1556
+ _host_index=_host_index,
1557
+ )
1558
+
1559
+ _response_types_map: Dict[str, Optional[str]] = {
1560
+ "200": "float",
1561
+ }
1562
+ response_data = await self.api_client.call_api(
1563
+ *_param, _request_timeout=_request_timeout
1564
+ )
1565
+ await response_data.read()
1566
+ return self.api_client.response_deserialize(
1567
+ response_data=response_data, response_types_map=_response_types_map
1568
+ )
1569
+
1570
+ @validate_call
1571
+ async def _get_memory_usage_async_without_preload_content(
1572
+ self,
1573
+ _request_timeout: Union[
1574
+ None,
1575
+ Annotated[StrictFloat, Field(gt=0)],
1576
+ Tuple[
1577
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1578
+ ],
1579
+ ] = None,
1580
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1581
+ _content_type: Optional[StrictStr] = None,
1582
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1583
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1584
+ ) -> RESTResponseType:
1585
+ """Get Memory Usage
1586
+
1587
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
1588
+
1589
+ :param _request_timeout: timeout setting for this request. If one
1590
+ number provided, it will be total request
1591
+ timeout. It can also be a pair (tuple) of
1592
+ (connection, read) timeouts.
1593
+ :type _request_timeout: int, tuple(int, int), optional
1594
+ :param _request_auth: set to override the auth_settings for an a single
1595
+ request; this effectively ignores the
1596
+ authentication in the spec for a single request.
1597
+ :type _request_auth: dict, optional
1598
+ :param _content_type: force content-type for the request.
1599
+ :type _content_type: str, Optional
1600
+ :param _headers: set to override the headers for a single
1601
+ request; this effectively ignores the headers
1602
+ in the spec for a single request.
1603
+ :type _headers: dict, optional
1604
+ :param _host_index: set to override the host_index for a single
1605
+ request; this effectively ignores the host_index
1606
+ in the spec for a single request.
1607
+ :type _host_index: int, optional
1608
+ :return: Returns the result object.
1609
+ """ # noqa: E501
1610
+
1611
+ _param = self._get_memory_usage_serialize(
1612
+ _request_auth=_request_auth,
1613
+ _content_type=_content_type,
1614
+ _headers=_headers,
1615
+ _host_index=_host_index,
1616
+ )
1617
+
1618
+ _response_types_map: Dict[str, Optional[str]] = {
1619
+ "200": "float",
1620
+ }
1621
+ response_data = await self.api_client.call_api(
1622
+ *_param, _request_timeout=_request_timeout
1623
+ )
1624
+ return response_data
1625
+
1626
+ # Private sync implementation methods
1627
+ @validate_call
1628
+ def _get_memory_usage_sync(
1629
+ self,
1630
+ _request_timeout: Union[
1631
+ None,
1632
+ Annotated[StrictFloat, Field(gt=0)],
1633
+ Tuple[
1634
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1635
+ ],
1636
+ ] = None,
1637
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1638
+ _content_type: Optional[StrictStr] = None,
1639
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1640
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1641
+ ) -> float:
1642
+ """Synchronous version of get_memory_usage"""
1643
+ return async_to_sync(self._get_memory_usage_async)(
1644
+ _request_timeout=_request_timeout,
1645
+ _request_auth=_request_auth,
1646
+ _content_type=_content_type,
1647
+ _headers=_headers,
1648
+ _host_index=_host_index,
1649
+ )
1650
+
1651
+ @validate_call
1652
+ def _get_memory_usage_sync_with_http_info(
1653
+ self,
1654
+ _request_timeout: Union[
1655
+ None,
1656
+ Annotated[StrictFloat, Field(gt=0)],
1657
+ Tuple[
1658
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1659
+ ],
1660
+ ] = None,
1661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1662
+ _content_type: Optional[StrictStr] = None,
1663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1665
+ ) -> ApiResponse[float]:
1666
+ """Synchronous version of get_memory_usage_with_http_info"""
1667
+ return async_to_sync(self._get_memory_usage_async_with_http_info)(
1668
+ _request_timeout=_request_timeout,
1669
+ _request_auth=_request_auth,
1670
+ _content_type=_content_type,
1671
+ _headers=_headers,
1672
+ _host_index=_host_index,
1673
+ )
1674
+
1675
+ @validate_call
1676
+ def _get_memory_usage_sync_without_preload_content(
1677
+ self,
1678
+ _request_timeout: Union[
1679
+ None,
1680
+ Annotated[StrictFloat, Field(gt=0)],
1681
+ Tuple[
1682
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1683
+ ],
1684
+ ] = None,
1685
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1686
+ _content_type: Optional[StrictStr] = None,
1687
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1688
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1689
+ ) -> RESTResponseType:
1690
+ """Synchronous version of get_memory_usage_without_preload_content"""
1691
+ return async_to_sync(self._get_memory_usage_async_without_preload_content)(
1692
+ _request_timeout=_request_timeout,
1693
+ _request_auth=_request_auth,
1694
+ _content_type=_content_type,
1695
+ _headers=_headers,
1696
+ _host_index=_host_index,
1697
+ )
1698
+
1699
+ def _get_memory_usage_serialize(
1700
+ self,
1701
+ _request_auth,
1702
+ _content_type,
1703
+ _headers,
1704
+ _host_index,
1705
+ ) -> RequestSerialized:
1706
+
1707
+ _host = None
1708
+
1709
+ _collection_formats: Dict[str, str] = {}
1710
+
1711
+ _path_params: Dict[str, str] = {}
1712
+ _query_params: List[Tuple[str, str]] = []
1713
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1714
+ _form_params: List[Tuple[str, str]] = []
1715
+ _files: Dict[
1716
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1717
+ ] = {}
1718
+ _body_params: Optional[bytes] = None
1719
+
1720
+ # process the path parameters
1721
+ # process the query parameters
1722
+ # process the header parameters
1723
+ # process the form parameters
1724
+ # process the body parameter
1725
+
1726
+ # set the HTTP header `Accept`
1727
+ if "Accept" not in _header_params:
1728
+ _header_params["Accept"] = self.api_client.select_header_accept(
1729
+ ["application/json"]
1730
+ )
1731
+
1732
+ # authentication setting
1733
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1734
+
1735
+ return self.api_client.param_serialize(
1736
+ method="GET",
1737
+ resource_path="/admin/memory",
1738
+ path_params=_path_params,
1739
+ query_params=_query_params,
1740
+ header_params=_header_params,
1741
+ body=_body_params,
1742
+ post_params=_form_params,
1743
+ files=_files,
1744
+ auth_settings=_auth_settings,
1745
+ collection_formats=_collection_formats,
1746
+ _host=_host,
1747
+ _request_auth=_request_auth,
1748
+ )
1749
+
1750
+ @validate_call
1751
+ def get_metrics(
1752
+ self,
1753
+ _request_timeout: Union[
1754
+ None,
1755
+ Annotated[StrictFloat, Field(gt=0)],
1756
+ Tuple[
1757
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1758
+ ],
1759
+ ] = None,
1760
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1761
+ _content_type: Optional[StrictStr] = None,
1762
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1763
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1764
+ ) -> object:
1765
+ """Metrics"""
1766
+ if self.is_sync:
1767
+ return self._get_metrics_sync(
1768
+ _request_timeout=_request_timeout,
1769
+ _request_auth=_request_auth,
1770
+ _content_type=_content_type,
1771
+ _headers=_headers,
1772
+ _host_index=_host_index,
1773
+ )
1774
+
1775
+ else:
1776
+ return self._get_metrics_async(
1777
+ _request_timeout=_request_timeout,
1778
+ _request_auth=_request_auth,
1779
+ _content_type=_content_type,
1780
+ _headers=_headers,
1781
+ _host_index=_host_index,
1782
+ )
1783
+
1784
+ @validate_call
1785
+ def get_metrics_with_http_info(
1786
+ self,
1787
+ _request_timeout: Union[
1788
+ None,
1789
+ Annotated[StrictFloat, Field(gt=0)],
1790
+ Tuple[
1791
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1792
+ ],
1793
+ ] = None,
1794
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1795
+ _content_type: Optional[StrictStr] = None,
1796
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1797
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1798
+ ) -> ApiResponse[object]:
1799
+ """Metrics with HTTP info"""
1800
+ if self.is_sync:
1801
+ return self._get_metrics_sync_with_http_info(
1802
+ _request_timeout=_request_timeout,
1803
+ _request_auth=_request_auth,
1804
+ _content_type=_content_type,
1805
+ _headers=_headers,
1806
+ _host_index=_host_index,
1807
+ )
1808
+
1809
+ else:
1810
+ return self._get_metrics_async_with_http_info(
1811
+ _request_timeout=_request_timeout,
1812
+ _request_auth=_request_auth,
1813
+ _content_type=_content_type,
1814
+ _headers=_headers,
1815
+ _host_index=_host_index,
1816
+ )
1817
+
1818
+ @validate_call
1819
+ def get_metrics_without_preload_content(
1820
+ self,
1821
+ _request_timeout: Union[
1822
+ None,
1823
+ Annotated[StrictFloat, Field(gt=0)],
1824
+ Tuple[
1825
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1826
+ ],
1827
+ ] = None,
1828
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1829
+ _content_type: Optional[StrictStr] = None,
1830
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1831
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1832
+ ) -> RESTResponseType:
1833
+ """Metrics without preloading content"""
1834
+ if self.is_sync:
1835
+ return self._get_metrics_sync_without_preload_content(
1836
+ _request_timeout=_request_timeout,
1837
+ _request_auth=_request_auth,
1838
+ _content_type=_content_type,
1839
+ _headers=_headers,
1840
+ _host_index=_host_index,
1841
+ )
1842
+
1843
+ else:
1844
+ return self._get_metrics_async_without_preload_content(
1845
+ _request_timeout=_request_timeout,
1846
+ _request_auth=_request_auth,
1847
+ _content_type=_content_type,
1848
+ _headers=_headers,
1849
+ _host_index=_host_index,
1850
+ )
1851
+
1852
+ # Private async implementation methods
1853
+ @validate_call
1854
+ async def _get_metrics_async(
1855
+ self,
1856
+ _request_timeout: Union[
1857
+ None,
1858
+ Annotated[StrictFloat, Field(gt=0)],
1859
+ Tuple[
1860
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1861
+ ],
1862
+ ] = None,
1863
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1864
+ _content_type: Optional[StrictStr] = None,
1865
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1866
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1867
+ ) -> object:
1868
+ """Metrics
1869
+
1870
+ Get Prometheus metrics for the application. Returns plain text.
1871
+
1872
+ :param _request_timeout: timeout setting for this request. If one
1873
+ number provided, it will be total request
1874
+ timeout. It can also be a pair (tuple) of
1875
+ (connection, read) timeouts.
1876
+ :type _request_timeout: int, tuple(int, int), optional
1877
+ :param _request_auth: set to override the auth_settings for an a single
1878
+ request; this effectively ignores the
1879
+ authentication in the spec for a single request.
1880
+ :type _request_auth: dict, optional
1881
+ :param _content_type: force content-type for the request.
1882
+ :type _content_type: str, Optional
1883
+ :param _headers: set to override the headers for a single
1884
+ request; this effectively ignores the headers
1885
+ in the spec for a single request.
1886
+ :type _headers: dict, optional
1887
+ :param _host_index: set to override the host_index for a single
1888
+ request; this effectively ignores the host_index
1889
+ in the spec for a single request.
1890
+ :type _host_index: int, optional
1891
+ :return: Returns the result object.
1892
+ """ # noqa: E501
1893
+
1894
+ _param = self._get_metrics_serialize(
1895
+ _request_auth=_request_auth,
1896
+ _content_type=_content_type,
1897
+ _headers=_headers,
1898
+ _host_index=_host_index,
1899
+ )
1900
+
1901
+ _response_types_map: Dict[str, Optional[str]] = {
1902
+ "200": "object",
1903
+ }
1904
+ response_data = await self.api_client.call_api(
1905
+ *_param, _request_timeout=_request_timeout
1906
+ )
1907
+ await response_data.read()
1908
+ return self.api_client.response_deserialize(
1909
+ response_data=response_data,
1910
+ response_types_map=_response_types_map,
1911
+ ).data
1912
+
1913
+ @validate_call
1914
+ async def _get_metrics_async_with_http_info(
1915
+ self,
1916
+ _request_timeout: Union[
1917
+ None,
1918
+ Annotated[StrictFloat, Field(gt=0)],
1919
+ Tuple[
1920
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1921
+ ],
1922
+ ] = None,
1923
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1924
+ _content_type: Optional[StrictStr] = None,
1925
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1926
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1927
+ ) -> ApiResponse[object]:
1928
+ """Metrics
1929
+
1930
+ Get Prometheus metrics for the application. Returns plain text.
1931
+
1932
+ :param _request_timeout: timeout setting for this request. If one
1933
+ number provided, it will be total request
1934
+ timeout. It can also be a pair (tuple) of
1935
+ (connection, read) timeouts.
1936
+ :type _request_timeout: int, tuple(int, int), optional
1937
+ :param _request_auth: set to override the auth_settings for an a single
1938
+ request; this effectively ignores the
1939
+ authentication in the spec for a single request.
1940
+ :type _request_auth: dict, optional
1941
+ :param _content_type: force content-type for the request.
1942
+ :type _content_type: str, Optional
1943
+ :param _headers: set to override the headers for a single
1944
+ request; this effectively ignores the headers
1945
+ in the spec for a single request.
1946
+ :type _headers: dict, optional
1947
+ :param _host_index: set to override the host_index for a single
1948
+ request; this effectively ignores the host_index
1949
+ in the spec for a single request.
1950
+ :type _host_index: int, optional
1951
+ :return: Returns the result object.
1952
+ """ # noqa: E501
1953
+
1954
+ _param = self._get_metrics_serialize(
1955
+ _request_auth=_request_auth,
1956
+ _content_type=_content_type,
1957
+ _headers=_headers,
1958
+ _host_index=_host_index,
1959
+ )
1960
+
1961
+ _response_types_map: Dict[str, Optional[str]] = {
1962
+ "200": "object",
1963
+ }
1964
+ response_data = await self.api_client.call_api(
1965
+ *_param, _request_timeout=_request_timeout
1966
+ )
1967
+ await response_data.read()
1968
+ return self.api_client.response_deserialize(
1969
+ response_data=response_data, response_types_map=_response_types_map
1970
+ )
1971
+
1972
+ @validate_call
1973
+ async def _get_metrics_async_without_preload_content(
1974
+ self,
1975
+ _request_timeout: Union[
1976
+ None,
1977
+ Annotated[StrictFloat, Field(gt=0)],
1978
+ Tuple[
1979
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1980
+ ],
1981
+ ] = None,
1982
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1983
+ _content_type: Optional[StrictStr] = None,
1984
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1985
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1986
+ ) -> RESTResponseType:
1987
+ """Metrics
1988
+
1989
+ Get Prometheus metrics for the application. Returns plain text.
1990
+
1991
+ :param _request_timeout: timeout setting for this request. If one
1992
+ number provided, it will be total request
1993
+ timeout. It can also be a pair (tuple) of
1994
+ (connection, read) timeouts.
1995
+ :type _request_timeout: int, tuple(int, int), optional
1996
+ :param _request_auth: set to override the auth_settings for an a single
1997
+ request; this effectively ignores the
1998
+ authentication in the spec for a single request.
1999
+ :type _request_auth: dict, optional
2000
+ :param _content_type: force content-type for the request.
2001
+ :type _content_type: str, Optional
2002
+ :param _headers: set to override the headers for a single
2003
+ request; this effectively ignores the headers
2004
+ in the spec for a single request.
2005
+ :type _headers: dict, optional
2006
+ :param _host_index: set to override the host_index for a single
2007
+ request; this effectively ignores the host_index
2008
+ in the spec for a single request.
2009
+ :type _host_index: int, optional
2010
+ :return: Returns the result object.
2011
+ """ # noqa: E501
2012
+
2013
+ _param = self._get_metrics_serialize(
2014
+ _request_auth=_request_auth,
2015
+ _content_type=_content_type,
2016
+ _headers=_headers,
2017
+ _host_index=_host_index,
2018
+ )
2019
+
2020
+ _response_types_map: Dict[str, Optional[str]] = {
2021
+ "200": "object",
2022
+ }
2023
+ response_data = await self.api_client.call_api(
2024
+ *_param, _request_timeout=_request_timeout
2025
+ )
2026
+ return response_data
2027
+
2028
+ # Private sync implementation methods
2029
+ @validate_call
2030
+ def _get_metrics_sync(
2031
+ self,
2032
+ _request_timeout: Union[
2033
+ None,
2034
+ Annotated[StrictFloat, Field(gt=0)],
2035
+ Tuple[
2036
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2037
+ ],
2038
+ ] = None,
2039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2040
+ _content_type: Optional[StrictStr] = None,
2041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2043
+ ) -> object:
2044
+ """Synchronous version of get_metrics"""
2045
+ return async_to_sync(self._get_metrics_async)(
2046
+ _request_timeout=_request_timeout,
2047
+ _request_auth=_request_auth,
2048
+ _content_type=_content_type,
2049
+ _headers=_headers,
2050
+ _host_index=_host_index,
2051
+ )
2052
+
2053
+ @validate_call
2054
+ def _get_metrics_sync_with_http_info(
2055
+ self,
2056
+ _request_timeout: Union[
2057
+ None,
2058
+ Annotated[StrictFloat, Field(gt=0)],
2059
+ Tuple[
2060
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2061
+ ],
2062
+ ] = None,
2063
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2064
+ _content_type: Optional[StrictStr] = None,
2065
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2066
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2067
+ ) -> ApiResponse[object]:
2068
+ """Synchronous version of get_metrics_with_http_info"""
2069
+ return async_to_sync(self._get_metrics_async_with_http_info)(
2070
+ _request_timeout=_request_timeout,
2071
+ _request_auth=_request_auth,
2072
+ _content_type=_content_type,
2073
+ _headers=_headers,
2074
+ _host_index=_host_index,
2075
+ )
2076
+
2077
+ @validate_call
2078
+ def _get_metrics_sync_without_preload_content(
2079
+ self,
2080
+ _request_timeout: Union[
2081
+ None,
2082
+ Annotated[StrictFloat, Field(gt=0)],
2083
+ Tuple[
2084
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2085
+ ],
2086
+ ] = None,
2087
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2088
+ _content_type: Optional[StrictStr] = None,
2089
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2090
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2091
+ ) -> RESTResponseType:
2092
+ """Synchronous version of get_metrics_without_preload_content"""
2093
+ return async_to_sync(self._get_metrics_async_without_preload_content)(
2094
+ _request_timeout=_request_timeout,
2095
+ _request_auth=_request_auth,
2096
+ _content_type=_content_type,
2097
+ _headers=_headers,
2098
+ _host_index=_host_index,
2099
+ )
2100
+
2101
+ def _get_metrics_serialize(
2102
+ self,
2103
+ _request_auth,
2104
+ _content_type,
2105
+ _headers,
2106
+ _host_index,
2107
+ ) -> RequestSerialized:
2108
+
2109
+ _host = None
2110
+
2111
+ _collection_formats: Dict[str, str] = {}
2112
+
2113
+ _path_params: Dict[str, str] = {}
2114
+ _query_params: List[Tuple[str, str]] = []
2115
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2116
+ _form_params: List[Tuple[str, str]] = []
2117
+ _files: Dict[
2118
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2119
+ ] = {}
2120
+ _body_params: Optional[bytes] = None
2121
+
2122
+ # process the path parameters
2123
+ # process the query parameters
2124
+ # process the header parameters
2125
+ # process the form parameters
2126
+ # process the body parameter
2127
+
2128
+ # set the HTTP header `Accept`
2129
+ if "Accept" not in _header_params:
2130
+ _header_params["Accept"] = self.api_client.select_header_accept(
2131
+ ["application/json"]
2132
+ )
2133
+
2134
+ # authentication setting
2135
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
2136
+
2137
+ return self.api_client.param_serialize(
2138
+ method="GET",
2139
+ resource_path="/admin/metrics",
2140
+ path_params=_path_params,
2141
+ query_params=_query_params,
2142
+ header_params=_header_params,
2143
+ body=_body_params,
2144
+ post_params=_form_params,
2145
+ files=_files,
2146
+ auth_settings=_auth_settings,
2147
+ collection_formats=_collection_formats,
2148
+ _host=_host,
2149
+ _request_auth=_request_auth,
2150
+ )
2151
+
2152
+ @validate_call
2153
+ def get_threads(
2154
+ self,
2155
+ _request_timeout: Union[
2156
+ None,
2157
+ Annotated[StrictFloat, Field(gt=0)],
2158
+ Tuple[
2159
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2160
+ ],
2161
+ ] = None,
2162
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2163
+ _content_type: Optional[StrictStr] = None,
2164
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2165
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2166
+ ) -> Dict[str, object]:
2167
+ """Get Threads"""
2168
+ if self.is_sync:
2169
+ return self._get_threads_sync(
2170
+ _request_timeout=_request_timeout,
2171
+ _request_auth=_request_auth,
2172
+ _content_type=_content_type,
2173
+ _headers=_headers,
2174
+ _host_index=_host_index,
2175
+ )
2176
+
2177
+ else:
2178
+ return self._get_threads_async(
2179
+ _request_timeout=_request_timeout,
2180
+ _request_auth=_request_auth,
2181
+ _content_type=_content_type,
2182
+ _headers=_headers,
2183
+ _host_index=_host_index,
2184
+ )
2185
+
2186
+ @validate_call
2187
+ def get_threads_with_http_info(
2188
+ self,
2189
+ _request_timeout: Union[
2190
+ None,
2191
+ Annotated[StrictFloat, Field(gt=0)],
2192
+ Tuple[
2193
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2194
+ ],
2195
+ ] = None,
2196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2197
+ _content_type: Optional[StrictStr] = None,
2198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2200
+ ) -> ApiResponse[Dict[str, object]]:
2201
+ """Get Threads with HTTP info"""
2202
+ if self.is_sync:
2203
+ return self._get_threads_sync_with_http_info(
2204
+ _request_timeout=_request_timeout,
2205
+ _request_auth=_request_auth,
2206
+ _content_type=_content_type,
2207
+ _headers=_headers,
2208
+ _host_index=_host_index,
2209
+ )
2210
+
2211
+ else:
2212
+ return self._get_threads_async_with_http_info(
2213
+ _request_timeout=_request_timeout,
2214
+ _request_auth=_request_auth,
2215
+ _content_type=_content_type,
2216
+ _headers=_headers,
2217
+ _host_index=_host_index,
2218
+ )
2219
+
2220
+ @validate_call
2221
+ def get_threads_without_preload_content(
2222
+ self,
2223
+ _request_timeout: Union[
2224
+ None,
2225
+ Annotated[StrictFloat, Field(gt=0)],
2226
+ Tuple[
2227
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2228
+ ],
2229
+ ] = None,
2230
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2231
+ _content_type: Optional[StrictStr] = None,
2232
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2233
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2234
+ ) -> RESTResponseType:
2235
+ """Get Threads without preloading content"""
2236
+ if self.is_sync:
2237
+ return self._get_threads_sync_without_preload_content(
2238
+ _request_timeout=_request_timeout,
2239
+ _request_auth=_request_auth,
2240
+ _content_type=_content_type,
2241
+ _headers=_headers,
2242
+ _host_index=_host_index,
2243
+ )
2244
+
2245
+ else:
2246
+ return self._get_threads_async_without_preload_content(
2247
+ _request_timeout=_request_timeout,
2248
+ _request_auth=_request_auth,
2249
+ _content_type=_content_type,
2250
+ _headers=_headers,
2251
+ _host_index=_host_index,
2252
+ )
2253
+
2254
+ # Private async implementation methods
2255
+ @validate_call
2256
+ async def _get_threads_async(
2257
+ self,
2258
+ _request_timeout: Union[
2259
+ None,
2260
+ Annotated[StrictFloat, Field(gt=0)],
2261
+ Tuple[
2262
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2263
+ ],
2264
+ ] = None,
2265
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2266
+ _content_type: Optional[StrictStr] = None,
2267
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2268
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2269
+ ) -> Dict[str, object]:
2270
+ """Get Threads
2271
+
2272
+ Return count and names of active threads.
2273
+
2274
+ :param _request_timeout: timeout setting for this request. If one
2275
+ number provided, it will be total request
2276
+ timeout. It can also be a pair (tuple) of
2277
+ (connection, read) timeouts.
2278
+ :type _request_timeout: int, tuple(int, int), optional
2279
+ :param _request_auth: set to override the auth_settings for an a single
2280
+ request; this effectively ignores the
2281
+ authentication in the spec for a single request.
2282
+ :type _request_auth: dict, optional
2283
+ :param _content_type: force content-type for the request.
2284
+ :type _content_type: str, Optional
2285
+ :param _headers: set to override the headers for a single
2286
+ request; this effectively ignores the headers
2287
+ in the spec for a single request.
2288
+ :type _headers: dict, optional
2289
+ :param _host_index: set to override the host_index for a single
2290
+ request; this effectively ignores the host_index
2291
+ in the spec for a single request.
2292
+ :type _host_index: int, optional
2293
+ :return: Returns the result object.
2294
+ """ # noqa: E501
2295
+
2296
+ _param = self._get_threads_serialize(
2297
+ _request_auth=_request_auth,
2298
+ _content_type=_content_type,
2299
+ _headers=_headers,
2300
+ _host_index=_host_index,
2301
+ )
2302
+
2303
+ _response_types_map: Dict[str, Optional[str]] = {
2304
+ "200": "Dict[str, object]",
2305
+ }
2306
+ response_data = await self.api_client.call_api(
2307
+ *_param, _request_timeout=_request_timeout
2308
+ )
2309
+ await response_data.read()
2310
+ return self.api_client.response_deserialize(
2311
+ response_data=response_data,
2312
+ response_types_map=_response_types_map,
2313
+ ).data
2314
+
2315
+ @validate_call
2316
+ async def _get_threads_async_with_http_info(
2317
+ self,
2318
+ _request_timeout: Union[
2319
+ None,
2320
+ Annotated[StrictFloat, Field(gt=0)],
2321
+ Tuple[
2322
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2323
+ ],
2324
+ ] = None,
2325
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2326
+ _content_type: Optional[StrictStr] = None,
2327
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2328
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2329
+ ) -> ApiResponse[Dict[str, object]]:
2330
+ """Get Threads
2331
+
2332
+ Return count and names of active threads.
2333
+
2334
+ :param _request_timeout: timeout setting for this request. If one
2335
+ number provided, it will be total request
2336
+ timeout. It can also be a pair (tuple) of
2337
+ (connection, read) timeouts.
2338
+ :type _request_timeout: int, tuple(int, int), optional
2339
+ :param _request_auth: set to override the auth_settings for an a single
2340
+ request; this effectively ignores the
2341
+ authentication in the spec for a single request.
2342
+ :type _request_auth: dict, optional
2343
+ :param _content_type: force content-type for the request.
2344
+ :type _content_type: str, Optional
2345
+ :param _headers: set to override the headers for a single
2346
+ request; this effectively ignores the headers
2347
+ in the spec for a single request.
2348
+ :type _headers: dict, optional
2349
+ :param _host_index: set to override the host_index for a single
2350
+ request; this effectively ignores the host_index
2351
+ in the spec for a single request.
2352
+ :type _host_index: int, optional
2353
+ :return: Returns the result object.
2354
+ """ # noqa: E501
2355
+
2356
+ _param = self._get_threads_serialize(
2357
+ _request_auth=_request_auth,
2358
+ _content_type=_content_type,
2359
+ _headers=_headers,
2360
+ _host_index=_host_index,
2361
+ )
2362
+
2363
+ _response_types_map: Dict[str, Optional[str]] = {
2364
+ "200": "Dict[str, object]",
2365
+ }
2366
+ response_data = await self.api_client.call_api(
2367
+ *_param, _request_timeout=_request_timeout
2368
+ )
2369
+ await response_data.read()
2370
+ return self.api_client.response_deserialize(
2371
+ response_data=response_data, response_types_map=_response_types_map
2372
+ )
2373
+
2374
+ @validate_call
2375
+ async def _get_threads_async_without_preload_content(
2376
+ self,
2377
+ _request_timeout: Union[
2378
+ None,
2379
+ Annotated[StrictFloat, Field(gt=0)],
2380
+ Tuple[
2381
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2382
+ ],
2383
+ ] = None,
2384
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2385
+ _content_type: Optional[StrictStr] = None,
2386
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2387
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2388
+ ) -> RESTResponseType:
2389
+ """Get Threads
2390
+
2391
+ Return count and names of active threads.
2392
+
2393
+ :param _request_timeout: timeout setting for this request. If one
2394
+ number provided, it will be total request
2395
+ timeout. It can also be a pair (tuple) of
2396
+ (connection, read) timeouts.
2397
+ :type _request_timeout: int, tuple(int, int), optional
2398
+ :param _request_auth: set to override the auth_settings for an a single
2399
+ request; this effectively ignores the
2400
+ authentication in the spec for a single request.
2401
+ :type _request_auth: dict, optional
2402
+ :param _content_type: force content-type for the request.
2403
+ :type _content_type: str, Optional
2404
+ :param _headers: set to override the headers for a single
2405
+ request; this effectively ignores the headers
2406
+ in the spec for a single request.
2407
+ :type _headers: dict, optional
2408
+ :param _host_index: set to override the host_index for a single
2409
+ request; this effectively ignores the host_index
2410
+ in the spec for a single request.
2411
+ :type _host_index: int, optional
2412
+ :return: Returns the result object.
2413
+ """ # noqa: E501
2414
+
2415
+ _param = self._get_threads_serialize(
2416
+ _request_auth=_request_auth,
2417
+ _content_type=_content_type,
2418
+ _headers=_headers,
2419
+ _host_index=_host_index,
2420
+ )
2421
+
2422
+ _response_types_map: Dict[str, Optional[str]] = {
2423
+ "200": "Dict[str, object]",
2424
+ }
2425
+ response_data = await self.api_client.call_api(
2426
+ *_param, _request_timeout=_request_timeout
2427
+ )
2428
+ return response_data
2429
+
2430
+ # Private sync implementation methods
2431
+ @validate_call
2432
+ def _get_threads_sync(
2433
+ self,
2434
+ _request_timeout: Union[
2435
+ None,
2436
+ Annotated[StrictFloat, Field(gt=0)],
2437
+ Tuple[
2438
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2439
+ ],
2440
+ ] = None,
2441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2442
+ _content_type: Optional[StrictStr] = None,
2443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2445
+ ) -> Dict[str, object]:
2446
+ """Synchronous version of get_threads"""
2447
+ return async_to_sync(self._get_threads_async)(
2448
+ _request_timeout=_request_timeout,
2449
+ _request_auth=_request_auth,
2450
+ _content_type=_content_type,
2451
+ _headers=_headers,
2452
+ _host_index=_host_index,
2453
+ )
2454
+
2455
+ @validate_call
2456
+ def _get_threads_sync_with_http_info(
2457
+ self,
2458
+ _request_timeout: Union[
2459
+ None,
2460
+ Annotated[StrictFloat, Field(gt=0)],
2461
+ Tuple[
2462
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2463
+ ],
2464
+ ] = None,
2465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2466
+ _content_type: Optional[StrictStr] = None,
2467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2469
+ ) -> ApiResponse[Dict[str, object]]:
2470
+ """Synchronous version of get_threads_with_http_info"""
2471
+ return async_to_sync(self._get_threads_async_with_http_info)(
2472
+ _request_timeout=_request_timeout,
2473
+ _request_auth=_request_auth,
2474
+ _content_type=_content_type,
2475
+ _headers=_headers,
2476
+ _host_index=_host_index,
2477
+ )
2478
+
2479
+ @validate_call
2480
+ def _get_threads_sync_without_preload_content(
2481
+ self,
2482
+ _request_timeout: Union[
2483
+ None,
2484
+ Annotated[StrictFloat, Field(gt=0)],
2485
+ Tuple[
2486
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2487
+ ],
2488
+ ] = None,
2489
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2490
+ _content_type: Optional[StrictStr] = None,
2491
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2492
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2493
+ ) -> RESTResponseType:
2494
+ """Synchronous version of get_threads_without_preload_content"""
2495
+ return async_to_sync(self._get_threads_async_without_preload_content)(
2496
+ _request_timeout=_request_timeout,
2497
+ _request_auth=_request_auth,
2498
+ _content_type=_content_type,
2499
+ _headers=_headers,
2500
+ _host_index=_host_index,
2501
+ )
2502
+
2503
+ def _get_threads_serialize(
2504
+ self,
2505
+ _request_auth,
2506
+ _content_type,
2507
+ _headers,
2508
+ _host_index,
2509
+ ) -> RequestSerialized:
2510
+
2511
+ _host = None
2512
+
2513
+ _collection_formats: Dict[str, str] = {}
2514
+
2515
+ _path_params: Dict[str, str] = {}
2516
+ _query_params: List[Tuple[str, str]] = []
2517
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2518
+ _form_params: List[Tuple[str, str]] = []
2519
+ _files: Dict[
2520
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2521
+ ] = {}
2522
+ _body_params: Optional[bytes] = None
2523
+
2524
+ # process the path parameters
2525
+ # process the query parameters
2526
+ # process the header parameters
2527
+ # process the form parameters
2528
+ # process the body parameter
2529
+
2530
+ # set the HTTP header `Accept`
2531
+ if "Accept" not in _header_params:
2532
+ _header_params["Accept"] = self.api_client.select_header_accept(
2533
+ ["application/json"]
2534
+ )
2535
+
2536
+ # authentication setting
2537
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
2538
+
2539
+ return self.api_client.param_serialize(
2540
+ method="GET",
2541
+ resource_path="/admin/threads",
2542
+ path_params=_path_params,
2543
+ query_params=_query_params,
2544
+ header_params=_header_params,
2545
+ body=_body_params,
2546
+ post_params=_form_params,
2547
+ files=_files,
2548
+ auth_settings=_auth_settings,
2549
+ collection_formats=_collection_formats,
2550
+ _host=_host,
2551
+ _request_auth=_request_auth,
2552
+ )
2553
+
2554
+ @validate_call
2555
+ def get_uptime(
2556
+ self,
2557
+ type: Optional[StrictStr] = None,
2558
+ _request_timeout: Union[
2559
+ None,
2560
+ Annotated[StrictFloat, Field(gt=0)],
2561
+ Tuple[
2562
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2563
+ ],
2564
+ ] = None,
2565
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2566
+ _content_type: Optional[StrictStr] = None,
2567
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2568
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2569
+ ) -> str:
2570
+ """Get Uptime"""
2571
+ if self.is_sync:
2572
+ return self._get_uptime_sync(
2573
+ type=type,
2574
+ _request_timeout=_request_timeout,
2575
+ _request_auth=_request_auth,
2576
+ _content_type=_content_type,
2577
+ _headers=_headers,
2578
+ _host_index=_host_index,
2579
+ )
2580
+
2581
+ else:
2582
+ return self._get_uptime_async(
2583
+ type=type,
2584
+ _request_timeout=_request_timeout,
2585
+ _request_auth=_request_auth,
2586
+ _content_type=_content_type,
2587
+ _headers=_headers,
2588
+ _host_index=_host_index,
2589
+ )
2590
+
2591
+ @validate_call
2592
+ def get_uptime_with_http_info(
2593
+ self,
2594
+ type: Optional[StrictStr] = None,
2595
+ _request_timeout: Union[
2596
+ None,
2597
+ Annotated[StrictFloat, Field(gt=0)],
2598
+ Tuple[
2599
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2600
+ ],
2601
+ ] = None,
2602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2603
+ _content_type: Optional[StrictStr] = None,
2604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2606
+ ) -> ApiResponse[str]:
2607
+ """Get Uptime with HTTP info"""
2608
+ if self.is_sync:
2609
+ return self._get_uptime_sync_with_http_info(
2610
+ type=type,
2611
+ _request_timeout=_request_timeout,
2612
+ _request_auth=_request_auth,
2613
+ _content_type=_content_type,
2614
+ _headers=_headers,
2615
+ _host_index=_host_index,
2616
+ )
2617
+
2618
+ else:
2619
+ return self._get_uptime_async_with_http_info(
2620
+ type=type,
2621
+ _request_timeout=_request_timeout,
2622
+ _request_auth=_request_auth,
2623
+ _content_type=_content_type,
2624
+ _headers=_headers,
2625
+ _host_index=_host_index,
2626
+ )
2627
+
2628
+ @validate_call
2629
+ def get_uptime_without_preload_content(
2630
+ self,
2631
+ type: Optional[StrictStr] = None,
2632
+ _request_timeout: Union[
2633
+ None,
2634
+ Annotated[StrictFloat, Field(gt=0)],
2635
+ Tuple[
2636
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2637
+ ],
2638
+ ] = None,
2639
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2640
+ _content_type: Optional[StrictStr] = None,
2641
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2642
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2643
+ ) -> RESTResponseType:
2644
+ """Get Uptime without preloading content"""
2645
+ if self.is_sync:
2646
+ return self._get_uptime_sync_without_preload_content(
2647
+ type=type,
2648
+ _request_timeout=_request_timeout,
2649
+ _request_auth=_request_auth,
2650
+ _content_type=_content_type,
2651
+ _headers=_headers,
2652
+ _host_index=_host_index,
2653
+ )
2654
+
2655
+ else:
2656
+ return self._get_uptime_async_without_preload_content(
2657
+ type=type,
2658
+ _request_timeout=_request_timeout,
2659
+ _request_auth=_request_auth,
2660
+ _content_type=_content_type,
2661
+ _headers=_headers,
2662
+ _host_index=_host_index,
2663
+ )
2664
+
2665
+ # Private async implementation methods
2666
+ @validate_call
2667
+ async def _get_uptime_async(
2668
+ self,
2669
+ type: Optional[StrictStr] = None,
2670
+ _request_timeout: Union[
2671
+ None,
2672
+ Annotated[StrictFloat, Field(gt=0)],
2673
+ Tuple[
2674
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2675
+ ],
2676
+ ] = None,
2677
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2678
+ _content_type: Optional[StrictStr] = None,
2679
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2680
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2681
+ ) -> str:
2682
+ """Get Uptime
2683
+
2684
+ Return the server uptime in seconds or human-readable form.
2685
+
2686
+ :param type:
2687
+ :type type: str
2688
+ :param _request_timeout: timeout setting for this request. If one
2689
+ number provided, it will be total request
2690
+ timeout. It can also be a pair (tuple) of
2691
+ (connection, read) timeouts.
2692
+ :type _request_timeout: int, tuple(int, int), optional
2693
+ :param _request_auth: set to override the auth_settings for an a single
2694
+ request; this effectively ignores the
2695
+ authentication in the spec for a single request.
2696
+ :type _request_auth: dict, optional
2697
+ :param _content_type: force content-type for the request.
2698
+ :type _content_type: str, Optional
2699
+ :param _headers: set to override the headers for a single
2700
+ request; this effectively ignores the headers
2701
+ in the spec for a single request.
2702
+ :type _headers: dict, optional
2703
+ :param _host_index: set to override the host_index for a single
2704
+ request; this effectively ignores the host_index
2705
+ in the spec for a single request.
2706
+ :type _host_index: int, optional
2707
+ :return: Returns the result object.
2708
+ """ # noqa: E501
2709
+
2710
+ _param = self._get_uptime_serialize(
2711
+ type=type,
2712
+ _request_auth=_request_auth,
2713
+ _content_type=_content_type,
2714
+ _headers=_headers,
2715
+ _host_index=_host_index,
2716
+ )
2717
+
2718
+ _response_types_map: Dict[str, Optional[str]] = {
2719
+ "200": "str",
2720
+ }
2721
+ response_data = await self.api_client.call_api(
2722
+ *_param, _request_timeout=_request_timeout
2723
+ )
2724
+ await response_data.read()
2725
+ return self.api_client.response_deserialize(
2726
+ response_data=response_data,
2727
+ response_types_map=_response_types_map,
2728
+ ).data
2729
+
2730
+ @validate_call
2731
+ async def _get_uptime_async_with_http_info(
2732
+ self,
2733
+ type: Optional[StrictStr] = None,
2734
+ _request_timeout: Union[
2735
+ None,
2736
+ Annotated[StrictFloat, Field(gt=0)],
2737
+ Tuple[
2738
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2739
+ ],
2740
+ ] = None,
2741
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2742
+ _content_type: Optional[StrictStr] = None,
2743
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2744
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2745
+ ) -> ApiResponse[str]:
2746
+ """Get Uptime
2747
+
2748
+ Return the server uptime in seconds or human-readable form.
2749
+
2750
+ :param type:
2751
+ :type type: str
2752
+ :param _request_timeout: timeout setting for this request. If one
2753
+ number provided, it will be total request
2754
+ timeout. It can also be a pair (tuple) of
2755
+ (connection, read) timeouts.
2756
+ :type _request_timeout: int, tuple(int, int), optional
2757
+ :param _request_auth: set to override the auth_settings for an a single
2758
+ request; this effectively ignores the
2759
+ authentication in the spec for a single request.
2760
+ :type _request_auth: dict, optional
2761
+ :param _content_type: force content-type for the request.
2762
+ :type _content_type: str, Optional
2763
+ :param _headers: set to override the headers for a single
2764
+ request; this effectively ignores the headers
2765
+ in the spec for a single request.
2766
+ :type _headers: dict, optional
2767
+ :param _host_index: set to override the host_index for a single
2768
+ request; this effectively ignores the host_index
2769
+ in the spec for a single request.
2770
+ :type _host_index: int, optional
2771
+ :return: Returns the result object.
2772
+ """ # noqa: E501
2773
+
2774
+ _param = self._get_uptime_serialize(
2775
+ type=type,
2776
+ _request_auth=_request_auth,
2777
+ _content_type=_content_type,
2778
+ _headers=_headers,
2779
+ _host_index=_host_index,
2780
+ )
2781
+
2782
+ _response_types_map: Dict[str, Optional[str]] = {
2783
+ "200": "str",
2784
+ }
2785
+ response_data = await self.api_client.call_api(
2786
+ *_param, _request_timeout=_request_timeout
2787
+ )
2788
+ await response_data.read()
2789
+ return self.api_client.response_deserialize(
2790
+ response_data=response_data, response_types_map=_response_types_map
2791
+ )
2792
+
2793
+ @validate_call
2794
+ async def _get_uptime_async_without_preload_content(
2795
+ self,
2796
+ type: Optional[StrictStr] = None,
2797
+ _request_timeout: Union[
2798
+ None,
2799
+ Annotated[StrictFloat, Field(gt=0)],
2800
+ Tuple[
2801
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2802
+ ],
2803
+ ] = None,
2804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2805
+ _content_type: Optional[StrictStr] = None,
2806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2808
+ ) -> RESTResponseType:
2809
+ """Get Uptime
2810
+
2811
+ Return the server uptime in seconds or human-readable form.
2812
+
2813
+ :param type:
2814
+ :type type: str
2815
+ :param _request_timeout: timeout setting for this request. If one
2816
+ number provided, it will be total request
2817
+ timeout. It can also be a pair (tuple) of
2818
+ (connection, read) timeouts.
2819
+ :type _request_timeout: int, tuple(int, int), optional
2820
+ :param _request_auth: set to override the auth_settings for an a single
2821
+ request; this effectively ignores the
2822
+ authentication in the spec for a single request.
2823
+ :type _request_auth: dict, optional
2824
+ :param _content_type: force content-type for the request.
2825
+ :type _content_type: str, Optional
2826
+ :param _headers: set to override the headers for a single
2827
+ request; this effectively ignores the headers
2828
+ in the spec for a single request.
2829
+ :type _headers: dict, optional
2830
+ :param _host_index: set to override the host_index for a single
2831
+ request; this effectively ignores the host_index
2832
+ in the spec for a single request.
2833
+ :type _host_index: int, optional
2834
+ :return: Returns the result object.
2835
+ """ # noqa: E501
2836
+
2837
+ _param = self._get_uptime_serialize(
2838
+ type=type,
2839
+ _request_auth=_request_auth,
2840
+ _content_type=_content_type,
2841
+ _headers=_headers,
2842
+ _host_index=_host_index,
2843
+ )
2844
+
2845
+ _response_types_map: Dict[str, Optional[str]] = {
2846
+ "200": "str",
2847
+ }
2848
+ response_data = await self.api_client.call_api(
2849
+ *_param, _request_timeout=_request_timeout
2850
+ )
2851
+ return response_data
2852
+
2853
+ # Private sync implementation methods
2854
+ @validate_call
2855
+ def _get_uptime_sync(
2856
+ self,
2857
+ type: Optional[StrictStr] = None,
2858
+ _request_timeout: Union[
2859
+ None,
2860
+ Annotated[StrictFloat, Field(gt=0)],
2861
+ Tuple[
2862
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2863
+ ],
2864
+ ] = None,
2865
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2866
+ _content_type: Optional[StrictStr] = None,
2867
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2868
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2869
+ ) -> str:
2870
+ """Synchronous version of get_uptime"""
2871
+ return async_to_sync(self._get_uptime_async)(
2872
+ type=type,
2873
+ _request_timeout=_request_timeout,
2874
+ _request_auth=_request_auth,
2875
+ _content_type=_content_type,
2876
+ _headers=_headers,
2877
+ _host_index=_host_index,
2878
+ )
2879
+
2880
+ @validate_call
2881
+ def _get_uptime_sync_with_http_info(
2882
+ self,
2883
+ type: Optional[StrictStr] = None,
2884
+ _request_timeout: Union[
2885
+ None,
2886
+ Annotated[StrictFloat, Field(gt=0)],
2887
+ Tuple[
2888
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2889
+ ],
2890
+ ] = None,
2891
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2892
+ _content_type: Optional[StrictStr] = None,
2893
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2894
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2895
+ ) -> ApiResponse[str]:
2896
+ """Synchronous version of get_uptime_with_http_info"""
2897
+ return async_to_sync(self._get_uptime_async_with_http_info)(
2898
+ type=type,
2899
+ _request_timeout=_request_timeout,
2900
+ _request_auth=_request_auth,
2901
+ _content_type=_content_type,
2902
+ _headers=_headers,
2903
+ _host_index=_host_index,
2904
+ )
2905
+
2906
+ @validate_call
2907
+ def _get_uptime_sync_without_preload_content(
2908
+ self,
2909
+ type: Optional[StrictStr] = None,
2910
+ _request_timeout: Union[
2911
+ None,
2912
+ Annotated[StrictFloat, Field(gt=0)],
2913
+ Tuple[
2914
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2915
+ ],
2916
+ ] = None,
2917
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2918
+ _content_type: Optional[StrictStr] = None,
2919
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2920
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2921
+ ) -> RESTResponseType:
2922
+ """Synchronous version of get_uptime_without_preload_content"""
2923
+ return async_to_sync(self._get_uptime_async_without_preload_content)(
2924
+ type=type,
2925
+ _request_timeout=_request_timeout,
2926
+ _request_auth=_request_auth,
2927
+ _content_type=_content_type,
2928
+ _headers=_headers,
2929
+ _host_index=_host_index,
2930
+ )
2931
+
2932
+ def _get_uptime_serialize(
2933
+ self,
2934
+ type,
2935
+ _request_auth,
2936
+ _content_type,
2937
+ _headers,
2938
+ _host_index,
2939
+ ) -> RequestSerialized:
2940
+
2941
+ _host = None
2942
+
2943
+ _collection_formats: Dict[str, str] = {}
2944
+
2945
+ _path_params: Dict[str, str] = {}
2946
+ _query_params: List[Tuple[str, str]] = []
2947
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2948
+ _form_params: List[Tuple[str, str]] = []
2949
+ _files: Dict[
2950
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2951
+ ] = {}
2952
+ _body_params: Optional[bytes] = None
2953
+
2954
+ # process the path parameters
2955
+ # process the query parameters
2956
+ if type is not None:
2957
+
2958
+ _query_params.append(("type", type))
2959
+
2960
+ # process the header parameters
2961
+ # process the form parameters
2962
+ # process the body parameter
2963
+
2964
+ # set the HTTP header `Accept`
2965
+ if "Accept" not in _header_params:
2966
+ _header_params["Accept"] = self.api_client.select_header_accept(
2967
+ ["application/json"]
2968
+ )
2969
+
2970
+ # authentication setting
2971
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
2972
+
2973
+ return self.api_client.param_serialize(
2974
+ method="GET",
2975
+ resource_path="/admin/uptime",
2976
+ path_params=_path_params,
2977
+ query_params=_query_params,
2978
+ header_params=_header_params,
2979
+ body=_body_params,
2980
+ post_params=_form_params,
2981
+ files=_files,
2982
+ auth_settings=_auth_settings,
2983
+ collection_formats=_collection_formats,
2984
+ _host=_host,
2985
+ _request_auth=_request_auth,
2986
+ )