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