foxinternalclient 5.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. foxinternalclient/__init__.py +83 -0
  2. foxinternalclient/api/__init__.py +10 -0
  3. foxinternalclient/api/device_api.py +1305 -0
  4. foxinternalclient/api/fox_factory_api.py +1906 -0
  5. foxinternalclient/api/gitlab_api.py +314 -0
  6. foxinternalclient/api/internal_api.py +4956 -0
  7. foxinternalclient/api/release_api.py +1511 -0
  8. foxinternalclient/api/stats_api.py +285 -0
  9. foxinternalclient/api_client.py +801 -0
  10. foxinternalclient/api_response.py +21 -0
  11. foxinternalclient/configuration.py +591 -0
  12. foxinternalclient/exceptions.py +217 -0
  13. foxinternalclient/models/__init__.py +61 -0
  14. foxinternalclient/models/body_change_password_profile_change_password_post.py +90 -0
  15. foxinternalclient/models/build_status_enum.py +42 -0
  16. foxinternalclient/models/build_task_response.py +116 -0
  17. foxinternalclient/models/build_task_short_response.py +107 -0
  18. foxinternalclient/models/device_internal_response.py +143 -0
  19. foxinternalclient/models/device_response.py +130 -0
  20. foxinternalclient/models/device_stats_response.py +92 -0
  21. foxinternalclient/models/device_update_body.py +128 -0
  22. foxinternalclient/models/ff_status_enum.py +39 -0
  23. foxinternalclient/models/ff_status_response.py +89 -0
  24. foxinternalclient/models/global_stats_aggregation_model.py +94 -0
  25. foxinternalclient/models/http_validation_error.py +96 -0
  26. foxinternalclient/models/list_response_release_response.py +100 -0
  27. foxinternalclient/models/list_response_short_device_response.py +100 -0
  28. foxinternalclient/models/list_response_short_release_response.py +100 -0
  29. foxinternalclient/models/list_response_str.py +92 -0
  30. foxinternalclient/models/list_response_user_short_response.py +100 -0
  31. foxinternalclient/models/log_list_response.py +102 -0
  32. foxinternalclient/models/log_response.py +134 -0
  33. foxinternalclient/models/maintainer_short_model.py +94 -0
  34. foxinternalclient/models/new_build_task_body.py +112 -0
  35. foxinternalclient/models/new_device_body.py +99 -0
  36. foxinternalclient/models/recovery_img_response.py +90 -0
  37. foxinternalclient/models/release_groups_response.py +105 -0
  38. foxinternalclient/models/release_internal_response.py +191 -0
  39. foxinternalclient/models/release_internal_response_prop_value.py +156 -0
  40. foxinternalclient/models/release_response.py +154 -0
  41. foxinternalclient/models/release_stats_response.py +92 -0
  42. foxinternalclient/models/release_type.py +39 -0
  43. foxinternalclient/models/release_update_body.py +114 -0
  44. foxinternalclient/models/releases_sort.py +38 -0
  45. foxinternalclient/models/response_get_releases_releases_get.py +135 -0
  46. foxinternalclient/models/short_device_response.py +110 -0
  47. foxinternalclient/models/short_release_response.py +124 -0
  48. foxinternalclient/models/task_update_body.py +101 -0
  49. foxinternalclient/models/token_response.py +90 -0
  50. foxinternalclient/models/user_gitlab.py +88 -0
  51. foxinternalclient/models/user_internal_response.py +146 -0
  52. foxinternalclient/models/user_mail.py +88 -0
  53. foxinternalclient/models/user_short_response.py +94 -0
  54. foxinternalclient/models/user_telegram.py +88 -0
  55. foxinternalclient/models/user_update_body.py +121 -0
  56. foxinternalclient/models/validation_error.py +100 -0
  57. foxinternalclient/models/validation_error_loc_inner.py +139 -0
  58. foxinternalclient/py.typed +0 -0
  59. foxinternalclient/rest.py +214 -0
  60. foxinternalclient-5.2.0.dist-info/METADATA +25 -0
  61. foxinternalclient-5.2.0.dist-info/RECORD +63 -0
  62. foxinternalclient-5.2.0.dist-info/WHEEL +5 -0
  63. foxinternalclient-5.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1305 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Fox API
5
+
6
+ Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 20 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
7
+
8
+ The version of the OpenAPI document: 5.2.0
9
+ Contact: admin@orangefox.tech
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Any, List, Optional
22
+ from typing_extensions import Annotated
23
+ from foxinternalclient.models.device_response import DeviceResponse
24
+ from foxinternalclient.models.list_response_short_device_response import ListResponseShortDeviceResponse
25
+ from foxinternalclient.models.list_response_str import ListResponseStr
26
+
27
+ from foxinternalclient.api_client import ApiClient, RequestSerialized
28
+ from foxinternalclient.api_response import ApiResponse
29
+ from foxinternalclient.rest import RESTResponseType
30
+
31
+
32
+ class DeviceApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def get_device_devices_get_get(
47
+ self,
48
+ device_id: Optional[Any] = None,
49
+ id: Annotated[Optional[Any], Field(description="Filter by Device ID (deprecated)")] = None,
50
+ codename: Annotated[Optional[StrictStr], Field(description="Not recommended to use when you can")] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> DeviceResponse:
64
+ """Get Device
65
+
66
+ Extended get device method, including the ability to get a device using device codename instead of the ID. /device/get?codename=lavender Due to the reasons mentioned in the /device route, identification devices using their codenames are considered unrecommended.
67
+
68
+ :param device_id:
69
+ :type device_id: AnyOf
70
+ :param id: Filter by Device ID (deprecated)
71
+ :type id: AnyOf
72
+ :param codename: Not recommended to use when you can
73
+ :type codename: str
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._get_device_devices_get_get_serialize(
97
+ device_id=device_id,
98
+ id=id,
99
+ codename=codename,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ '200': "DeviceResponse",
108
+ '404': None,
109
+ '400': None,
110
+ '422': "HTTPValidationError",
111
+ }
112
+ response_data = await self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ await response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ async def get_device_devices_get_get_with_http_info(
125
+ self,
126
+ device_id: Optional[Any] = None,
127
+ id: Annotated[Optional[Any], Field(description="Filter by Device ID (deprecated)")] = None,
128
+ codename: Annotated[Optional[StrictStr], Field(description="Not recommended to use when you can")] = None,
129
+ _request_timeout: Union[
130
+ None,
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Tuple[
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Annotated[StrictFloat, Field(gt=0)]
135
+ ]
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> ApiResponse[DeviceResponse]:
142
+ """Get Device
143
+
144
+ Extended get device method, including the ability to get a device using device codename instead of the ID. /device/get?codename=lavender Due to the reasons mentioned in the /device route, identification devices using their codenames are considered unrecommended.
145
+
146
+ :param device_id:
147
+ :type device_id: AnyOf
148
+ :param id: Filter by Device ID (deprecated)
149
+ :type id: AnyOf
150
+ :param codename: Not recommended to use when you can
151
+ :type codename: str
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._get_device_devices_get_get_serialize(
175
+ device_id=device_id,
176
+ id=id,
177
+ codename=codename,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index
182
+ )
183
+
184
+ _response_types_map: Dict[str, Optional[str]] = {
185
+ '200': "DeviceResponse",
186
+ '404': None,
187
+ '400': None,
188
+ '422': "HTTPValidationError",
189
+ }
190
+ response_data = await self.api_client.call_api(
191
+ *_param,
192
+ _request_timeout=_request_timeout
193
+ )
194
+ await response_data.read()
195
+ return self.api_client.response_deserialize(
196
+ response_data=response_data,
197
+ response_types_map=_response_types_map,
198
+ )
199
+
200
+
201
+ @validate_call
202
+ async def get_device_devices_get_get_without_preload_content(
203
+ self,
204
+ device_id: Optional[Any] = None,
205
+ id: Annotated[Optional[Any], Field(description="Filter by Device ID (deprecated)")] = None,
206
+ codename: Annotated[Optional[StrictStr], Field(description="Not recommended to use when you can")] = None,
207
+ _request_timeout: Union[
208
+ None,
209
+ Annotated[StrictFloat, Field(gt=0)],
210
+ Tuple[
211
+ Annotated[StrictFloat, Field(gt=0)],
212
+ Annotated[StrictFloat, Field(gt=0)]
213
+ ]
214
+ ] = None,
215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
216
+ _content_type: Optional[StrictStr] = None,
217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
219
+ ) -> RESTResponseType:
220
+ """Get Device
221
+
222
+ Extended get device method, including the ability to get a device using device codename instead of the ID. /device/get?codename=lavender Due to the reasons mentioned in the /device route, identification devices using their codenames are considered unrecommended.
223
+
224
+ :param device_id:
225
+ :type device_id: AnyOf
226
+ :param id: Filter by Device ID (deprecated)
227
+ :type id: AnyOf
228
+ :param codename: Not recommended to use when you can
229
+ :type codename: str
230
+ :param _request_timeout: timeout setting for this request. If one
231
+ number provided, it will be total request
232
+ timeout. It can also be a pair (tuple) of
233
+ (connection, read) timeouts.
234
+ :type _request_timeout: int, tuple(int, int), optional
235
+ :param _request_auth: set to override the auth_settings for an a single
236
+ request; this effectively ignores the
237
+ authentication in the spec for a single request.
238
+ :type _request_auth: dict, optional
239
+ :param _content_type: force content-type for the request.
240
+ :type _content_type: str, Optional
241
+ :param _headers: set to override the headers for a single
242
+ request; this effectively ignores the headers
243
+ in the spec for a single request.
244
+ :type _headers: dict, optional
245
+ :param _host_index: set to override the host_index for a single
246
+ request; this effectively ignores the host_index
247
+ in the spec for a single request.
248
+ :type _host_index: int, optional
249
+ :return: Returns the result object.
250
+ """ # noqa: E501
251
+
252
+ _param = self._get_device_devices_get_get_serialize(
253
+ device_id=device_id,
254
+ id=id,
255
+ codename=codename,
256
+ _request_auth=_request_auth,
257
+ _content_type=_content_type,
258
+ _headers=_headers,
259
+ _host_index=_host_index
260
+ )
261
+
262
+ _response_types_map: Dict[str, Optional[str]] = {
263
+ '200': "DeviceResponse",
264
+ '404': None,
265
+ '400': None,
266
+ '422': "HTTPValidationError",
267
+ }
268
+ response_data = await self.api_client.call_api(
269
+ *_param,
270
+ _request_timeout=_request_timeout
271
+ )
272
+ return response_data.response
273
+
274
+
275
+ def _get_device_devices_get_get_serialize(
276
+ self,
277
+ device_id,
278
+ id,
279
+ codename,
280
+ _request_auth,
281
+ _content_type,
282
+ _headers,
283
+ _host_index,
284
+ ) -> RequestSerialized:
285
+
286
+ _host = None
287
+
288
+ _collection_formats: Dict[str, str] = {
289
+ }
290
+
291
+ _path_params: Dict[str, str] = {}
292
+ _query_params: List[Tuple[str, str]] = []
293
+ _header_params: Dict[str, Optional[str]] = _headers or {}
294
+ _form_params: List[Tuple[str, str]] = []
295
+ _files: Dict[
296
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
297
+ ] = {}
298
+ _body_params: Optional[bytes] = None
299
+
300
+ # process the path parameters
301
+ # process the query parameters
302
+ if device_id is not None:
303
+
304
+ _query_params.append(('device_id', device_id))
305
+
306
+ if id is not None:
307
+
308
+ _query_params.append(('_id', id))
309
+
310
+ if codename is not None:
311
+
312
+ _query_params.append(('codename', codename))
313
+
314
+ # process the header parameters
315
+ # process the form parameters
316
+ # process the body parameter
317
+
318
+
319
+ # set the HTTP header `Accept`
320
+ if 'Accept' not in _header_params:
321
+ _header_params['Accept'] = self.api_client.select_header_accept(
322
+ [
323
+ 'application/json'
324
+ ]
325
+ )
326
+
327
+
328
+ # authentication setting
329
+ _auth_settings: List[str] = [
330
+ ]
331
+
332
+ return self.api_client.param_serialize(
333
+ method='GET',
334
+ resource_path='/devices/get',
335
+ path_params=_path_params,
336
+ query_params=_query_params,
337
+ header_params=_header_params,
338
+ body=_body_params,
339
+ post_params=_form_params,
340
+ files=_files,
341
+ auth_settings=_auth_settings,
342
+ collection_formats=_collection_formats,
343
+ _host=_host,
344
+ _request_auth=_request_auth
345
+ )
346
+
347
+
348
+
349
+
350
+ @validate_call
351
+ async def get_device_short_devices_device_id_get(
352
+ self,
353
+ device_id: StrictStr,
354
+ _request_timeout: Union[
355
+ None,
356
+ Annotated[StrictFloat, Field(gt=0)],
357
+ Tuple[
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Annotated[StrictFloat, Field(gt=0)]
360
+ ]
361
+ ] = None,
362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
363
+ _content_type: Optional[StrictStr] = None,
364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
366
+ ) -> DeviceResponse:
367
+ """(Deprecated) Get Device Short
368
+
369
+ Gets device info using device ID.
370
+
371
+ :param device_id: (required)
372
+ :type device_id: str
373
+ :param _request_timeout: timeout setting for this request. If one
374
+ number provided, it will be total request
375
+ timeout. It can also be a pair (tuple) of
376
+ (connection, read) timeouts.
377
+ :type _request_timeout: int, tuple(int, int), optional
378
+ :param _request_auth: set to override the auth_settings for an a single
379
+ request; this effectively ignores the
380
+ authentication in the spec for a single request.
381
+ :type _request_auth: dict, optional
382
+ :param _content_type: force content-type for the request.
383
+ :type _content_type: str, Optional
384
+ :param _headers: set to override the headers for a single
385
+ request; this effectively ignores the headers
386
+ in the spec for a single request.
387
+ :type _headers: dict, optional
388
+ :param _host_index: set to override the host_index for a single
389
+ request; this effectively ignores the host_index
390
+ in the spec for a single request.
391
+ :type _host_index: int, optional
392
+ :return: Returns the result object.
393
+ """ # noqa: E501
394
+ warnings.warn("GET /devices/{device_id} is deprecated.", DeprecationWarning)
395
+
396
+ _param = self._get_device_short_devices_device_id_get_serialize(
397
+ device_id=device_id,
398
+ _request_auth=_request_auth,
399
+ _content_type=_content_type,
400
+ _headers=_headers,
401
+ _host_index=_host_index
402
+ )
403
+
404
+ _response_types_map: Dict[str, Optional[str]] = {
405
+ '200': "DeviceResponse",
406
+ '404': None,
407
+ '422': "HTTPValidationError",
408
+ }
409
+ response_data = await self.api_client.call_api(
410
+ *_param,
411
+ _request_timeout=_request_timeout
412
+ )
413
+ await response_data.read()
414
+ return self.api_client.response_deserialize(
415
+ response_data=response_data,
416
+ response_types_map=_response_types_map,
417
+ ).data
418
+
419
+
420
+ @validate_call
421
+ async def get_device_short_devices_device_id_get_with_http_info(
422
+ self,
423
+ device_id: StrictStr,
424
+ _request_timeout: Union[
425
+ None,
426
+ Annotated[StrictFloat, Field(gt=0)],
427
+ Tuple[
428
+ Annotated[StrictFloat, Field(gt=0)],
429
+ Annotated[StrictFloat, Field(gt=0)]
430
+ ]
431
+ ] = None,
432
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
433
+ _content_type: Optional[StrictStr] = None,
434
+ _headers: Optional[Dict[StrictStr, Any]] = None,
435
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
436
+ ) -> ApiResponse[DeviceResponse]:
437
+ """(Deprecated) Get Device Short
438
+
439
+ Gets device info using device ID.
440
+
441
+ :param device_id: (required)
442
+ :type device_id: str
443
+ :param _request_timeout: timeout setting for this request. If one
444
+ number provided, it will be total request
445
+ timeout. It can also be a pair (tuple) of
446
+ (connection, read) timeouts.
447
+ :type _request_timeout: int, tuple(int, int), optional
448
+ :param _request_auth: set to override the auth_settings for an a single
449
+ request; this effectively ignores the
450
+ authentication in the spec for a single request.
451
+ :type _request_auth: dict, optional
452
+ :param _content_type: force content-type for the request.
453
+ :type _content_type: str, Optional
454
+ :param _headers: set to override the headers for a single
455
+ request; this effectively ignores the headers
456
+ in the spec for a single request.
457
+ :type _headers: dict, optional
458
+ :param _host_index: set to override the host_index for a single
459
+ request; this effectively ignores the host_index
460
+ in the spec for a single request.
461
+ :type _host_index: int, optional
462
+ :return: Returns the result object.
463
+ """ # noqa: E501
464
+ warnings.warn("GET /devices/{device_id} is deprecated.", DeprecationWarning)
465
+
466
+ _param = self._get_device_short_devices_device_id_get_serialize(
467
+ device_id=device_id,
468
+ _request_auth=_request_auth,
469
+ _content_type=_content_type,
470
+ _headers=_headers,
471
+ _host_index=_host_index
472
+ )
473
+
474
+ _response_types_map: Dict[str, Optional[str]] = {
475
+ '200': "DeviceResponse",
476
+ '404': None,
477
+ '422': "HTTPValidationError",
478
+ }
479
+ response_data = await self.api_client.call_api(
480
+ *_param,
481
+ _request_timeout=_request_timeout
482
+ )
483
+ await response_data.read()
484
+ return self.api_client.response_deserialize(
485
+ response_data=response_data,
486
+ response_types_map=_response_types_map,
487
+ )
488
+
489
+
490
+ @validate_call
491
+ async def get_device_short_devices_device_id_get_without_preload_content(
492
+ self,
493
+ device_id: StrictStr,
494
+ _request_timeout: Union[
495
+ None,
496
+ Annotated[StrictFloat, Field(gt=0)],
497
+ Tuple[
498
+ Annotated[StrictFloat, Field(gt=0)],
499
+ Annotated[StrictFloat, Field(gt=0)]
500
+ ]
501
+ ] = None,
502
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
503
+ _content_type: Optional[StrictStr] = None,
504
+ _headers: Optional[Dict[StrictStr, Any]] = None,
505
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
506
+ ) -> RESTResponseType:
507
+ """(Deprecated) Get Device Short
508
+
509
+ Gets device info using device ID.
510
+
511
+ :param device_id: (required)
512
+ :type device_id: str
513
+ :param _request_timeout: timeout setting for this request. If one
514
+ number provided, it will be total request
515
+ timeout. It can also be a pair (tuple) of
516
+ (connection, read) timeouts.
517
+ :type _request_timeout: int, tuple(int, int), optional
518
+ :param _request_auth: set to override the auth_settings for an a single
519
+ request; this effectively ignores the
520
+ authentication in the spec for a single request.
521
+ :type _request_auth: dict, optional
522
+ :param _content_type: force content-type for the request.
523
+ :type _content_type: str, Optional
524
+ :param _headers: set to override the headers for a single
525
+ request; this effectively ignores the headers
526
+ in the spec for a single request.
527
+ :type _headers: dict, optional
528
+ :param _host_index: set to override the host_index for a single
529
+ request; this effectively ignores the host_index
530
+ in the spec for a single request.
531
+ :type _host_index: int, optional
532
+ :return: Returns the result object.
533
+ """ # noqa: E501
534
+ warnings.warn("GET /devices/{device_id} is deprecated.", DeprecationWarning)
535
+
536
+ _param = self._get_device_short_devices_device_id_get_serialize(
537
+ device_id=device_id,
538
+ _request_auth=_request_auth,
539
+ _content_type=_content_type,
540
+ _headers=_headers,
541
+ _host_index=_host_index
542
+ )
543
+
544
+ _response_types_map: Dict[str, Optional[str]] = {
545
+ '200': "DeviceResponse",
546
+ '404': None,
547
+ '422': "HTTPValidationError",
548
+ }
549
+ response_data = await self.api_client.call_api(
550
+ *_param,
551
+ _request_timeout=_request_timeout
552
+ )
553
+ return response_data.response
554
+
555
+
556
+ def _get_device_short_devices_device_id_get_serialize(
557
+ self,
558
+ device_id,
559
+ _request_auth,
560
+ _content_type,
561
+ _headers,
562
+ _host_index,
563
+ ) -> RequestSerialized:
564
+
565
+ _host = None
566
+
567
+ _collection_formats: Dict[str, str] = {
568
+ }
569
+
570
+ _path_params: Dict[str, str] = {}
571
+ _query_params: List[Tuple[str, str]] = []
572
+ _header_params: Dict[str, Optional[str]] = _headers or {}
573
+ _form_params: List[Tuple[str, str]] = []
574
+ _files: Dict[
575
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
576
+ ] = {}
577
+ _body_params: Optional[bytes] = None
578
+
579
+ # process the path parameters
580
+ if device_id is not None:
581
+ _path_params['device_id'] = device_id
582
+ # process the query parameters
583
+ # process the header parameters
584
+ # process the form parameters
585
+ # process the body parameter
586
+
587
+
588
+ # set the HTTP header `Accept`
589
+ if 'Accept' not in _header_params:
590
+ _header_params['Accept'] = self.api_client.select_header_accept(
591
+ [
592
+ 'application/json'
593
+ ]
594
+ )
595
+
596
+
597
+ # authentication setting
598
+ _auth_settings: List[str] = [
599
+ ]
600
+
601
+ return self.api_client.param_serialize(
602
+ method='GET',
603
+ resource_path='/devices/{device_id}',
604
+ path_params=_path_params,
605
+ query_params=_query_params,
606
+ header_params=_header_params,
607
+ body=_body_params,
608
+ post_params=_form_params,
609
+ files=_files,
610
+ auth_settings=_auth_settings,
611
+ collection_formats=_collection_formats,
612
+ _host=_host,
613
+ _request_auth=_request_auth
614
+ )
615
+
616
+
617
+
618
+
619
+ @validate_call
620
+ async def get_devices_devices_get(
621
+ self,
622
+ id: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs")] = None,
623
+ id2: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs (deprecated)")] = None,
624
+ oem_name: Annotated[Optional[List[StrictStr]], Field(description="Filter by OEM names")] = None,
625
+ codename: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by device codenames")] = None,
626
+ model_name: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by model names")] = None,
627
+ supported: Annotated[Optional[StrictBool], Field(description="Supported status")] = None,
628
+ maintainer: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by maintainer ID")] = None,
629
+ freezed: Annotated[Optional[StrictBool], Field(description="Filter by Freezed status")] = None,
630
+ has_releases: Annotated[Optional[StrictBool], Field(description="Filter by has releases status")] = None,
631
+ skip: Annotated[Optional[StrictInt], Field(description="Skip query results")] = None,
632
+ limit: Annotated[Optional[StrictInt], Field(description="Limit query results (0 means unlimited)")] = None,
633
+ _request_timeout: Union[
634
+ None,
635
+ Annotated[StrictFloat, Field(gt=0)],
636
+ Tuple[
637
+ Annotated[StrictFloat, Field(gt=0)],
638
+ Annotated[StrictFloat, Field(gt=0)]
639
+ ]
640
+ ] = None,
641
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
642
+ _content_type: Optional[StrictStr] = None,
643
+ _headers: Optional[Dict[StrictStr, Any]] = None,
644
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
645
+ ) -> ListResponseShortDeviceResponse:
646
+ """Get Devices
647
+
648
+ Get a device list. Device ID is the internal OrangeFox device identifier (https://www.mongodb.com/docs/manual/reference/method/ObjectId/). Please only use it for identification instead of codename or model_name if it's possible. You would find two Device ID query parameters here, the _id one is left deprecated due to historical reasons, please use id instead. Please note that using model_name is unrecommended and considered deprecated as it's very inconsistent around some OEMs that play with the names around. As of the current moment, the API won't support unified model names at all! In short, do not use model_name as device's identification. Be careful using codenames, there are a lot of problems and pain about those. Some OEMs keep releasing new phones with the same hardware as the old ones and may or may not update or change the codename for those. Currently, API doesn't support unified devices; they would have only one codename. Our OEMs database would not include subbrands, they instead would be added to the model name. Like oem_name: \"Xiaomi\" model_name: \"Poco F5 Pro\". The exclusions are merged ones, like OnePlus, as calling those BBK OnePlus is really weird in the respective communities. Note: You will get only a shortened device object with this method, if you want to get a full one, use \"/device/<device_id>\" or \"/device/get\" method instead.
649
+
650
+ :param id: Filter by Device IDs
651
+ :type id: List[object]
652
+ :param id2: Filter by Device IDs (deprecated)
653
+ :type id2: List[object]
654
+ :param oem_name: Filter by OEM names
655
+ :type oem_name: List[str]
656
+ :param codename: Filter by device codenames
657
+ :type codename: List[Optional[str]]
658
+ :param model_name: Filter by model names
659
+ :type model_name: List[Optional[str]]
660
+ :param supported: Supported status
661
+ :type supported: bool
662
+ :param maintainer: Filter by maintainer ID
663
+ :type maintainer: List[Optional[str]]
664
+ :param freezed: Filter by Freezed status
665
+ :type freezed: bool
666
+ :param has_releases: Filter by has releases status
667
+ :type has_releases: bool
668
+ :param skip: Skip query results
669
+ :type skip: int
670
+ :param limit: Limit query results (0 means unlimited)
671
+ :type limit: int
672
+ :param _request_timeout: timeout setting for this request. If one
673
+ number provided, it will be total request
674
+ timeout. It can also be a pair (tuple) of
675
+ (connection, read) timeouts.
676
+ :type _request_timeout: int, tuple(int, int), optional
677
+ :param _request_auth: set to override the auth_settings for an a single
678
+ request; this effectively ignores the
679
+ authentication in the spec for a single request.
680
+ :type _request_auth: dict, optional
681
+ :param _content_type: force content-type for the request.
682
+ :type _content_type: str, Optional
683
+ :param _headers: set to override the headers for a single
684
+ request; this effectively ignores the headers
685
+ in the spec for a single request.
686
+ :type _headers: dict, optional
687
+ :param _host_index: set to override the host_index for a single
688
+ request; this effectively ignores the host_index
689
+ in the spec for a single request.
690
+ :type _host_index: int, optional
691
+ :return: Returns the result object.
692
+ """ # noqa: E501
693
+
694
+ _param = self._get_devices_devices_get_serialize(
695
+ id=id,
696
+ id2=id2,
697
+ oem_name=oem_name,
698
+ codename=codename,
699
+ model_name=model_name,
700
+ supported=supported,
701
+ maintainer=maintainer,
702
+ freezed=freezed,
703
+ has_releases=has_releases,
704
+ skip=skip,
705
+ limit=limit,
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': "ListResponseShortDeviceResponse",
714
+ '404': None,
715
+ '422': "HTTPValidationError",
716
+ }
717
+ response_data = await self.api_client.call_api(
718
+ *_param,
719
+ _request_timeout=_request_timeout
720
+ )
721
+ await response_data.read()
722
+ return self.api_client.response_deserialize(
723
+ response_data=response_data,
724
+ response_types_map=_response_types_map,
725
+ ).data
726
+
727
+
728
+ @validate_call
729
+ async def get_devices_devices_get_with_http_info(
730
+ self,
731
+ id: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs")] = None,
732
+ id2: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs (deprecated)")] = None,
733
+ oem_name: Annotated[Optional[List[StrictStr]], Field(description="Filter by OEM names")] = None,
734
+ codename: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by device codenames")] = None,
735
+ model_name: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by model names")] = None,
736
+ supported: Annotated[Optional[StrictBool], Field(description="Supported status")] = None,
737
+ maintainer: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by maintainer ID")] = None,
738
+ freezed: Annotated[Optional[StrictBool], Field(description="Filter by Freezed status")] = None,
739
+ has_releases: Annotated[Optional[StrictBool], Field(description="Filter by has releases status")] = None,
740
+ skip: Annotated[Optional[StrictInt], Field(description="Skip query results")] = None,
741
+ limit: Annotated[Optional[StrictInt], Field(description="Limit query results (0 means unlimited)")] = None,
742
+ _request_timeout: Union[
743
+ None,
744
+ Annotated[StrictFloat, Field(gt=0)],
745
+ Tuple[
746
+ Annotated[StrictFloat, Field(gt=0)],
747
+ Annotated[StrictFloat, Field(gt=0)]
748
+ ]
749
+ ] = None,
750
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
751
+ _content_type: Optional[StrictStr] = None,
752
+ _headers: Optional[Dict[StrictStr, Any]] = None,
753
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
754
+ ) -> ApiResponse[ListResponseShortDeviceResponse]:
755
+ """Get Devices
756
+
757
+ Get a device list. Device ID is the internal OrangeFox device identifier (https://www.mongodb.com/docs/manual/reference/method/ObjectId/). Please only use it for identification instead of codename or model_name if it's possible. You would find two Device ID query parameters here, the _id one is left deprecated due to historical reasons, please use id instead. Please note that using model_name is unrecommended and considered deprecated as it's very inconsistent around some OEMs that play with the names around. As of the current moment, the API won't support unified model names at all! In short, do not use model_name as device's identification. Be careful using codenames, there are a lot of problems and pain about those. Some OEMs keep releasing new phones with the same hardware as the old ones and may or may not update or change the codename for those. Currently, API doesn't support unified devices; they would have only one codename. Our OEMs database would not include subbrands, they instead would be added to the model name. Like oem_name: \"Xiaomi\" model_name: \"Poco F5 Pro\". The exclusions are merged ones, like OnePlus, as calling those BBK OnePlus is really weird in the respective communities. Note: You will get only a shortened device object with this method, if you want to get a full one, use \"/device/<device_id>\" or \"/device/get\" method instead.
758
+
759
+ :param id: Filter by Device IDs
760
+ :type id: List[object]
761
+ :param id2: Filter by Device IDs (deprecated)
762
+ :type id2: List[object]
763
+ :param oem_name: Filter by OEM names
764
+ :type oem_name: List[str]
765
+ :param codename: Filter by device codenames
766
+ :type codename: List[Optional[str]]
767
+ :param model_name: Filter by model names
768
+ :type model_name: List[Optional[str]]
769
+ :param supported: Supported status
770
+ :type supported: bool
771
+ :param maintainer: Filter by maintainer ID
772
+ :type maintainer: List[Optional[str]]
773
+ :param freezed: Filter by Freezed status
774
+ :type freezed: bool
775
+ :param has_releases: Filter by has releases status
776
+ :type has_releases: bool
777
+ :param skip: Skip query results
778
+ :type skip: int
779
+ :param limit: Limit query results (0 means unlimited)
780
+ :type limit: int
781
+ :param _request_timeout: timeout setting for this request. If one
782
+ number provided, it will be total request
783
+ timeout. It can also be a pair (tuple) of
784
+ (connection, read) timeouts.
785
+ :type _request_timeout: int, tuple(int, int), optional
786
+ :param _request_auth: set to override the auth_settings for an a single
787
+ request; this effectively ignores the
788
+ authentication in the spec for a single request.
789
+ :type _request_auth: dict, optional
790
+ :param _content_type: force content-type for the request.
791
+ :type _content_type: str, Optional
792
+ :param _headers: set to override the headers for a single
793
+ request; this effectively ignores the headers
794
+ in the spec for a single request.
795
+ :type _headers: dict, optional
796
+ :param _host_index: set to override the host_index for a single
797
+ request; this effectively ignores the host_index
798
+ in the spec for a single request.
799
+ :type _host_index: int, optional
800
+ :return: Returns the result object.
801
+ """ # noqa: E501
802
+
803
+ _param = self._get_devices_devices_get_serialize(
804
+ id=id,
805
+ id2=id2,
806
+ oem_name=oem_name,
807
+ codename=codename,
808
+ model_name=model_name,
809
+ supported=supported,
810
+ maintainer=maintainer,
811
+ freezed=freezed,
812
+ has_releases=has_releases,
813
+ skip=skip,
814
+ limit=limit,
815
+ _request_auth=_request_auth,
816
+ _content_type=_content_type,
817
+ _headers=_headers,
818
+ _host_index=_host_index
819
+ )
820
+
821
+ _response_types_map: Dict[str, Optional[str]] = {
822
+ '200': "ListResponseShortDeviceResponse",
823
+ '404': None,
824
+ '422': "HTTPValidationError",
825
+ }
826
+ response_data = await self.api_client.call_api(
827
+ *_param,
828
+ _request_timeout=_request_timeout
829
+ )
830
+ await response_data.read()
831
+ return self.api_client.response_deserialize(
832
+ response_data=response_data,
833
+ response_types_map=_response_types_map,
834
+ )
835
+
836
+
837
+ @validate_call
838
+ async def get_devices_devices_get_without_preload_content(
839
+ self,
840
+ id: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs")] = None,
841
+ id2: Annotated[Optional[List[Any]], Field(description="Filter by Device IDs (deprecated)")] = None,
842
+ oem_name: Annotated[Optional[List[StrictStr]], Field(description="Filter by OEM names")] = None,
843
+ codename: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by device codenames")] = None,
844
+ model_name: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by model names")] = None,
845
+ supported: Annotated[Optional[StrictBool], Field(description="Supported status")] = None,
846
+ maintainer: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Filter by maintainer ID")] = None,
847
+ freezed: Annotated[Optional[StrictBool], Field(description="Filter by Freezed status")] = None,
848
+ has_releases: Annotated[Optional[StrictBool], Field(description="Filter by has releases status")] = None,
849
+ skip: Annotated[Optional[StrictInt], Field(description="Skip query results")] = None,
850
+ limit: Annotated[Optional[StrictInt], Field(description="Limit query results (0 means unlimited)")] = None,
851
+ _request_timeout: Union[
852
+ None,
853
+ Annotated[StrictFloat, Field(gt=0)],
854
+ Tuple[
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Annotated[StrictFloat, Field(gt=0)]
857
+ ]
858
+ ] = None,
859
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
860
+ _content_type: Optional[StrictStr] = None,
861
+ _headers: Optional[Dict[StrictStr, Any]] = None,
862
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
863
+ ) -> RESTResponseType:
864
+ """Get Devices
865
+
866
+ Get a device list. Device ID is the internal OrangeFox device identifier (https://www.mongodb.com/docs/manual/reference/method/ObjectId/). Please only use it for identification instead of codename or model_name if it's possible. You would find two Device ID query parameters here, the _id one is left deprecated due to historical reasons, please use id instead. Please note that using model_name is unrecommended and considered deprecated as it's very inconsistent around some OEMs that play with the names around. As of the current moment, the API won't support unified model names at all! In short, do not use model_name as device's identification. Be careful using codenames, there are a lot of problems and pain about those. Some OEMs keep releasing new phones with the same hardware as the old ones and may or may not update or change the codename for those. Currently, API doesn't support unified devices; they would have only one codename. Our OEMs database would not include subbrands, they instead would be added to the model name. Like oem_name: \"Xiaomi\" model_name: \"Poco F5 Pro\". The exclusions are merged ones, like OnePlus, as calling those BBK OnePlus is really weird in the respective communities. Note: You will get only a shortened device object with this method, if you want to get a full one, use \"/device/<device_id>\" or \"/device/get\" method instead.
867
+
868
+ :param id: Filter by Device IDs
869
+ :type id: List[object]
870
+ :param id2: Filter by Device IDs (deprecated)
871
+ :type id2: List[object]
872
+ :param oem_name: Filter by OEM names
873
+ :type oem_name: List[str]
874
+ :param codename: Filter by device codenames
875
+ :type codename: List[Optional[str]]
876
+ :param model_name: Filter by model names
877
+ :type model_name: List[Optional[str]]
878
+ :param supported: Supported status
879
+ :type supported: bool
880
+ :param maintainer: Filter by maintainer ID
881
+ :type maintainer: List[Optional[str]]
882
+ :param freezed: Filter by Freezed status
883
+ :type freezed: bool
884
+ :param has_releases: Filter by has releases status
885
+ :type has_releases: bool
886
+ :param skip: Skip query results
887
+ :type skip: int
888
+ :param limit: Limit query results (0 means unlimited)
889
+ :type limit: int
890
+ :param _request_timeout: timeout setting for this request. If one
891
+ number provided, it will be total request
892
+ timeout. It can also be a pair (tuple) of
893
+ (connection, read) timeouts.
894
+ :type _request_timeout: int, tuple(int, int), optional
895
+ :param _request_auth: set to override the auth_settings for an a single
896
+ request; this effectively ignores the
897
+ authentication in the spec for a single request.
898
+ :type _request_auth: dict, optional
899
+ :param _content_type: force content-type for the request.
900
+ :type _content_type: str, Optional
901
+ :param _headers: set to override the headers for a single
902
+ request; this effectively ignores the headers
903
+ in the spec for a single request.
904
+ :type _headers: dict, optional
905
+ :param _host_index: set to override the host_index for a single
906
+ request; this effectively ignores the host_index
907
+ in the spec for a single request.
908
+ :type _host_index: int, optional
909
+ :return: Returns the result object.
910
+ """ # noqa: E501
911
+
912
+ _param = self._get_devices_devices_get_serialize(
913
+ id=id,
914
+ id2=id2,
915
+ oem_name=oem_name,
916
+ codename=codename,
917
+ model_name=model_name,
918
+ supported=supported,
919
+ maintainer=maintainer,
920
+ freezed=freezed,
921
+ has_releases=has_releases,
922
+ skip=skip,
923
+ limit=limit,
924
+ _request_auth=_request_auth,
925
+ _content_type=_content_type,
926
+ _headers=_headers,
927
+ _host_index=_host_index
928
+ )
929
+
930
+ _response_types_map: Dict[str, Optional[str]] = {
931
+ '200': "ListResponseShortDeviceResponse",
932
+ '404': None,
933
+ '422': "HTTPValidationError",
934
+ }
935
+ response_data = await self.api_client.call_api(
936
+ *_param,
937
+ _request_timeout=_request_timeout
938
+ )
939
+ return response_data.response
940
+
941
+
942
+ def _get_devices_devices_get_serialize(
943
+ self,
944
+ id,
945
+ id2,
946
+ oem_name,
947
+ codename,
948
+ model_name,
949
+ supported,
950
+ maintainer,
951
+ freezed,
952
+ has_releases,
953
+ skip,
954
+ limit,
955
+ _request_auth,
956
+ _content_type,
957
+ _headers,
958
+ _host_index,
959
+ ) -> RequestSerialized:
960
+
961
+ _host = None
962
+
963
+ _collection_formats: Dict[str, str] = {
964
+ 'id': 'multi',
965
+ '_id': 'multi',
966
+ 'oem_name': 'multi',
967
+ 'codename': 'multi',
968
+ 'model_name': 'multi',
969
+ 'maintainer': 'multi',
970
+ }
971
+
972
+ _path_params: Dict[str, str] = {}
973
+ _query_params: List[Tuple[str, str]] = []
974
+ _header_params: Dict[str, Optional[str]] = _headers or {}
975
+ _form_params: List[Tuple[str, str]] = []
976
+ _files: Dict[
977
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
978
+ ] = {}
979
+ _body_params: Optional[bytes] = None
980
+
981
+ # process the path parameters
982
+ # process the query parameters
983
+ if id is not None:
984
+
985
+ _query_params.append(('id', id))
986
+
987
+ if id2 is not None:
988
+
989
+ _query_params.append(('_id', id2))
990
+
991
+ if oem_name is not None:
992
+
993
+ _query_params.append(('oem_name', oem_name))
994
+
995
+ if codename is not None:
996
+
997
+ _query_params.append(('codename', codename))
998
+
999
+ if model_name is not None:
1000
+
1001
+ _query_params.append(('model_name', model_name))
1002
+
1003
+ if supported is not None:
1004
+
1005
+ _query_params.append(('supported', supported))
1006
+
1007
+ if maintainer is not None:
1008
+
1009
+ _query_params.append(('maintainer', maintainer))
1010
+
1011
+ if freezed is not None:
1012
+
1013
+ _query_params.append(('freezed', freezed))
1014
+
1015
+ if has_releases is not None:
1016
+
1017
+ _query_params.append(('has_releases', has_releases))
1018
+
1019
+ if skip is not None:
1020
+
1021
+ _query_params.append(('skip', skip))
1022
+
1023
+ if limit is not None:
1024
+
1025
+ _query_params.append(('limit', limit))
1026
+
1027
+ # process the header parameters
1028
+ # process the form parameters
1029
+ # process the body parameter
1030
+
1031
+
1032
+ # set the HTTP header `Accept`
1033
+ if 'Accept' not in _header_params:
1034
+ _header_params['Accept'] = self.api_client.select_header_accept(
1035
+ [
1036
+ 'application/json'
1037
+ ]
1038
+ )
1039
+
1040
+
1041
+ # authentication setting
1042
+ _auth_settings: List[str] = [
1043
+ ]
1044
+
1045
+ return self.api_client.param_serialize(
1046
+ method='GET',
1047
+ resource_path='/devices/',
1048
+ path_params=_path_params,
1049
+ query_params=_query_params,
1050
+ header_params=_header_params,
1051
+ body=_body_params,
1052
+ post_params=_form_params,
1053
+ files=_files,
1054
+ auth_settings=_auth_settings,
1055
+ collection_formats=_collection_formats,
1056
+ _host=_host,
1057
+ _request_auth=_request_auth
1058
+ )
1059
+
1060
+
1061
+
1062
+
1063
+ @validate_call
1064
+ async def get_oems_list_oems_get(
1065
+ self,
1066
+ _request_timeout: Union[
1067
+ None,
1068
+ Annotated[StrictFloat, Field(gt=0)],
1069
+ Tuple[
1070
+ Annotated[StrictFloat, Field(gt=0)],
1071
+ Annotated[StrictFloat, Field(gt=0)]
1072
+ ]
1073
+ ] = None,
1074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1075
+ _content_type: Optional[StrictStr] = None,
1076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1078
+ ) -> ListResponseStr:
1079
+ """Get Oems List
1080
+
1081
+ Lists all OEM names
1082
+
1083
+ :param _request_timeout: timeout setting for this request. If one
1084
+ number provided, it will be total request
1085
+ timeout. It can also be a pair (tuple) of
1086
+ (connection, read) timeouts.
1087
+ :type _request_timeout: int, tuple(int, int), optional
1088
+ :param _request_auth: set to override the auth_settings for an a single
1089
+ request; this effectively ignores the
1090
+ authentication in the spec for a single request.
1091
+ :type _request_auth: dict, optional
1092
+ :param _content_type: force content-type for the request.
1093
+ :type _content_type: str, Optional
1094
+ :param _headers: set to override the headers for a single
1095
+ request; this effectively ignores the headers
1096
+ in the spec for a single request.
1097
+ :type _headers: dict, optional
1098
+ :param _host_index: set to override the host_index for a single
1099
+ request; this effectively ignores the host_index
1100
+ in the spec for a single request.
1101
+ :type _host_index: int, optional
1102
+ :return: Returns the result object.
1103
+ """ # noqa: E501
1104
+
1105
+ _param = self._get_oems_list_oems_get_serialize(
1106
+ _request_auth=_request_auth,
1107
+ _content_type=_content_type,
1108
+ _headers=_headers,
1109
+ _host_index=_host_index
1110
+ )
1111
+
1112
+ _response_types_map: Dict[str, Optional[str]] = {
1113
+ '200': "ListResponseStr",
1114
+ }
1115
+ response_data = await self.api_client.call_api(
1116
+ *_param,
1117
+ _request_timeout=_request_timeout
1118
+ )
1119
+ await response_data.read()
1120
+ return self.api_client.response_deserialize(
1121
+ response_data=response_data,
1122
+ response_types_map=_response_types_map,
1123
+ ).data
1124
+
1125
+
1126
+ @validate_call
1127
+ async def get_oems_list_oems_get_with_http_info(
1128
+ self,
1129
+ _request_timeout: Union[
1130
+ None,
1131
+ Annotated[StrictFloat, Field(gt=0)],
1132
+ Tuple[
1133
+ Annotated[StrictFloat, Field(gt=0)],
1134
+ Annotated[StrictFloat, Field(gt=0)]
1135
+ ]
1136
+ ] = None,
1137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1138
+ _content_type: Optional[StrictStr] = None,
1139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1141
+ ) -> ApiResponse[ListResponseStr]:
1142
+ """Get Oems List
1143
+
1144
+ Lists all OEM names
1145
+
1146
+ :param _request_timeout: timeout setting for this request. If one
1147
+ number provided, it will be total request
1148
+ timeout. It can also be a pair (tuple) of
1149
+ (connection, read) timeouts.
1150
+ :type _request_timeout: int, tuple(int, int), optional
1151
+ :param _request_auth: set to override the auth_settings for an a single
1152
+ request; this effectively ignores the
1153
+ authentication in the spec for a single request.
1154
+ :type _request_auth: dict, optional
1155
+ :param _content_type: force content-type for the request.
1156
+ :type _content_type: str, Optional
1157
+ :param _headers: set to override the headers for a single
1158
+ request; this effectively ignores the headers
1159
+ in the spec for a single request.
1160
+ :type _headers: dict, optional
1161
+ :param _host_index: set to override the host_index for a single
1162
+ request; this effectively ignores the host_index
1163
+ in the spec for a single request.
1164
+ :type _host_index: int, optional
1165
+ :return: Returns the result object.
1166
+ """ # noqa: E501
1167
+
1168
+ _param = self._get_oems_list_oems_get_serialize(
1169
+ _request_auth=_request_auth,
1170
+ _content_type=_content_type,
1171
+ _headers=_headers,
1172
+ _host_index=_host_index
1173
+ )
1174
+
1175
+ _response_types_map: Dict[str, Optional[str]] = {
1176
+ '200': "ListResponseStr",
1177
+ }
1178
+ response_data = await self.api_client.call_api(
1179
+ *_param,
1180
+ _request_timeout=_request_timeout
1181
+ )
1182
+ await response_data.read()
1183
+ return self.api_client.response_deserialize(
1184
+ response_data=response_data,
1185
+ response_types_map=_response_types_map,
1186
+ )
1187
+
1188
+
1189
+ @validate_call
1190
+ async def get_oems_list_oems_get_without_preload_content(
1191
+ self,
1192
+ _request_timeout: Union[
1193
+ None,
1194
+ Annotated[StrictFloat, Field(gt=0)],
1195
+ Tuple[
1196
+ Annotated[StrictFloat, Field(gt=0)],
1197
+ Annotated[StrictFloat, Field(gt=0)]
1198
+ ]
1199
+ ] = None,
1200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1201
+ _content_type: Optional[StrictStr] = None,
1202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1204
+ ) -> RESTResponseType:
1205
+ """Get Oems List
1206
+
1207
+ Lists all OEM names
1208
+
1209
+ :param _request_timeout: timeout setting for this request. If one
1210
+ number provided, it will be total request
1211
+ timeout. It can also be a pair (tuple) of
1212
+ (connection, read) timeouts.
1213
+ :type _request_timeout: int, tuple(int, int), optional
1214
+ :param _request_auth: set to override the auth_settings for an a single
1215
+ request; this effectively ignores the
1216
+ authentication in the spec for a single request.
1217
+ :type _request_auth: dict, optional
1218
+ :param _content_type: force content-type for the request.
1219
+ :type _content_type: str, Optional
1220
+ :param _headers: set to override the headers for a single
1221
+ request; this effectively ignores the headers
1222
+ in the spec for a single request.
1223
+ :type _headers: dict, optional
1224
+ :param _host_index: set to override the host_index for a single
1225
+ request; this effectively ignores the host_index
1226
+ in the spec for a single request.
1227
+ :type _host_index: int, optional
1228
+ :return: Returns the result object.
1229
+ """ # noqa: E501
1230
+
1231
+ _param = self._get_oems_list_oems_get_serialize(
1232
+ _request_auth=_request_auth,
1233
+ _content_type=_content_type,
1234
+ _headers=_headers,
1235
+ _host_index=_host_index
1236
+ )
1237
+
1238
+ _response_types_map: Dict[str, Optional[str]] = {
1239
+ '200': "ListResponseStr",
1240
+ }
1241
+ response_data = await self.api_client.call_api(
1242
+ *_param,
1243
+ _request_timeout=_request_timeout
1244
+ )
1245
+ return response_data.response
1246
+
1247
+
1248
+ def _get_oems_list_oems_get_serialize(
1249
+ self,
1250
+ _request_auth,
1251
+ _content_type,
1252
+ _headers,
1253
+ _host_index,
1254
+ ) -> RequestSerialized:
1255
+
1256
+ _host = None
1257
+
1258
+ _collection_formats: Dict[str, str] = {
1259
+ }
1260
+
1261
+ _path_params: Dict[str, str] = {}
1262
+ _query_params: List[Tuple[str, str]] = []
1263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1264
+ _form_params: List[Tuple[str, str]] = []
1265
+ _files: Dict[
1266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1267
+ ] = {}
1268
+ _body_params: Optional[bytes] = None
1269
+
1270
+ # process the path parameters
1271
+ # process the query parameters
1272
+ # process the header parameters
1273
+ # process the form parameters
1274
+ # process the body parameter
1275
+
1276
+
1277
+ # set the HTTP header `Accept`
1278
+ if 'Accept' not in _header_params:
1279
+ _header_params['Accept'] = self.api_client.select_header_accept(
1280
+ [
1281
+ 'application/json'
1282
+ ]
1283
+ )
1284
+
1285
+
1286
+ # authentication setting
1287
+ _auth_settings: List[str] = [
1288
+ ]
1289
+
1290
+ return self.api_client.param_serialize(
1291
+ method='GET',
1292
+ resource_path='/oems/',
1293
+ path_params=_path_params,
1294
+ query_params=_query_params,
1295
+ header_params=_header_params,
1296
+ body=_body_params,
1297
+ post_params=_form_params,
1298
+ files=_files,
1299
+ auth_settings=_auth_settings,
1300
+ collection_formats=_collection_formats,
1301
+ _host=_host,
1302
+ _request_auth=_request_auth
1303
+ )
1304
+
1305
+