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.
- foxinternalclient/__init__.py +83 -0
- foxinternalclient/api/__init__.py +10 -0
- foxinternalclient/api/device_api.py +1305 -0
- foxinternalclient/api/fox_factory_api.py +1906 -0
- foxinternalclient/api/gitlab_api.py +314 -0
- foxinternalclient/api/internal_api.py +4956 -0
- foxinternalclient/api/release_api.py +1511 -0
- foxinternalclient/api/stats_api.py +285 -0
- foxinternalclient/api_client.py +801 -0
- foxinternalclient/api_response.py +21 -0
- foxinternalclient/configuration.py +591 -0
- foxinternalclient/exceptions.py +217 -0
- foxinternalclient/models/__init__.py +61 -0
- foxinternalclient/models/body_change_password_profile_change_password_post.py +90 -0
- foxinternalclient/models/build_status_enum.py +42 -0
- foxinternalclient/models/build_task_response.py +116 -0
- foxinternalclient/models/build_task_short_response.py +107 -0
- foxinternalclient/models/device_internal_response.py +143 -0
- foxinternalclient/models/device_response.py +130 -0
- foxinternalclient/models/device_stats_response.py +92 -0
- foxinternalclient/models/device_update_body.py +128 -0
- foxinternalclient/models/ff_status_enum.py +39 -0
- foxinternalclient/models/ff_status_response.py +89 -0
- foxinternalclient/models/global_stats_aggregation_model.py +94 -0
- foxinternalclient/models/http_validation_error.py +96 -0
- foxinternalclient/models/list_response_release_response.py +100 -0
- foxinternalclient/models/list_response_short_device_response.py +100 -0
- foxinternalclient/models/list_response_short_release_response.py +100 -0
- foxinternalclient/models/list_response_str.py +92 -0
- foxinternalclient/models/list_response_user_short_response.py +100 -0
- foxinternalclient/models/log_list_response.py +102 -0
- foxinternalclient/models/log_response.py +134 -0
- foxinternalclient/models/maintainer_short_model.py +94 -0
- foxinternalclient/models/new_build_task_body.py +112 -0
- foxinternalclient/models/new_device_body.py +99 -0
- foxinternalclient/models/recovery_img_response.py +90 -0
- foxinternalclient/models/release_groups_response.py +105 -0
- foxinternalclient/models/release_internal_response.py +191 -0
- foxinternalclient/models/release_internal_response_prop_value.py +156 -0
- foxinternalclient/models/release_response.py +154 -0
- foxinternalclient/models/release_stats_response.py +92 -0
- foxinternalclient/models/release_type.py +39 -0
- foxinternalclient/models/release_update_body.py +114 -0
- foxinternalclient/models/releases_sort.py +38 -0
- foxinternalclient/models/response_get_releases_releases_get.py +135 -0
- foxinternalclient/models/short_device_response.py +110 -0
- foxinternalclient/models/short_release_response.py +124 -0
- foxinternalclient/models/task_update_body.py +101 -0
- foxinternalclient/models/token_response.py +90 -0
- foxinternalclient/models/user_gitlab.py +88 -0
- foxinternalclient/models/user_internal_response.py +146 -0
- foxinternalclient/models/user_mail.py +88 -0
- foxinternalclient/models/user_short_response.py +94 -0
- foxinternalclient/models/user_telegram.py +88 -0
- foxinternalclient/models/user_update_body.py +121 -0
- foxinternalclient/models/validation_error.py +100 -0
- foxinternalclient/models/validation_error_loc_inner.py +139 -0
- foxinternalclient/py.typed +0 -0
- foxinternalclient/rest.py +214 -0
- foxinternalclient-5.2.0.dist-info/METADATA +25 -0
- foxinternalclient-5.2.0.dist-info/RECORD +63 -0
- foxinternalclient-5.2.0.dist-info/WHEEL +5 -0
- foxinternalclient-5.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1906 @@
|
|
|
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 StrictBool
|
|
21
|
+
from typing import Any, List, Optional
|
|
22
|
+
from foxinternalclient.models.build_task_response import BuildTaskResponse
|
|
23
|
+
from foxinternalclient.models.build_task_short_response import BuildTaskShortResponse
|
|
24
|
+
from foxinternalclient.models.ff_status_response import FFStatusResponse
|
|
25
|
+
from foxinternalclient.models.new_build_task_body import NewBuildTaskBody
|
|
26
|
+
from foxinternalclient.models.task_update_body import TaskUpdateBody
|
|
27
|
+
|
|
28
|
+
from foxinternalclient.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from foxinternalclient.api_response import ApiResponse
|
|
30
|
+
from foxinternalclient.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class FoxFactoryApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
async def cancel_task_factory_task_id_cancel_post(
|
|
48
|
+
self,
|
|
49
|
+
task_id: Any,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> BuildTaskResponse:
|
|
63
|
+
"""Cancel Task
|
|
64
|
+
|
|
65
|
+
Cancels a build task given its identifier. The task's status is updated to indicate that it is in the process of cancellation. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
66
|
+
|
|
67
|
+
:param task_id: (required)
|
|
68
|
+
:type task_id: object
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._cancel_task_factory_task_id_cancel_post_serialize(
|
|
92
|
+
task_id=task_id,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'200': "BuildTaskResponse",
|
|
101
|
+
'422': "HTTPValidationError",
|
|
102
|
+
}
|
|
103
|
+
response_data = await self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
await response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
async def cancel_task_factory_task_id_cancel_post_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
task_id: Any,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[BuildTaskResponse]:
|
|
131
|
+
"""Cancel Task
|
|
132
|
+
|
|
133
|
+
Cancels a build task given its identifier. The task's status is updated to indicate that it is in the process of cancellation. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
134
|
+
|
|
135
|
+
:param task_id: (required)
|
|
136
|
+
:type task_id: object
|
|
137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
138
|
+
number provided, it will be total request
|
|
139
|
+
timeout. It can also be a pair (tuple) of
|
|
140
|
+
(connection, read) timeouts.
|
|
141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
143
|
+
request; this effectively ignores the
|
|
144
|
+
authentication in the spec for a single request.
|
|
145
|
+
:type _request_auth: dict, optional
|
|
146
|
+
:param _content_type: force content-type for the request.
|
|
147
|
+
:type _content_type: str, Optional
|
|
148
|
+
:param _headers: set to override the headers for a single
|
|
149
|
+
request; this effectively ignores the headers
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _headers: dict, optional
|
|
152
|
+
:param _host_index: set to override the host_index for a single
|
|
153
|
+
request; this effectively ignores the host_index
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _host_index: int, optional
|
|
156
|
+
:return: Returns the result object.
|
|
157
|
+
""" # noqa: E501
|
|
158
|
+
|
|
159
|
+
_param = self._cancel_task_factory_task_id_cancel_post_serialize(
|
|
160
|
+
task_id=task_id,
|
|
161
|
+
_request_auth=_request_auth,
|
|
162
|
+
_content_type=_content_type,
|
|
163
|
+
_headers=_headers,
|
|
164
|
+
_host_index=_host_index
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
|
+
'200': "BuildTaskResponse",
|
|
169
|
+
'422': "HTTPValidationError",
|
|
170
|
+
}
|
|
171
|
+
response_data = await self.api_client.call_api(
|
|
172
|
+
*_param,
|
|
173
|
+
_request_timeout=_request_timeout
|
|
174
|
+
)
|
|
175
|
+
await response_data.read()
|
|
176
|
+
return self.api_client.response_deserialize(
|
|
177
|
+
response_data=response_data,
|
|
178
|
+
response_types_map=_response_types_map,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@validate_call
|
|
183
|
+
async def cancel_task_factory_task_id_cancel_post_without_preload_content(
|
|
184
|
+
self,
|
|
185
|
+
task_id: Any,
|
|
186
|
+
_request_timeout: Union[
|
|
187
|
+
None,
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Tuple[
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
192
|
+
]
|
|
193
|
+
] = None,
|
|
194
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_content_type: Optional[StrictStr] = None,
|
|
196
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
198
|
+
) -> RESTResponseType:
|
|
199
|
+
"""Cancel Task
|
|
200
|
+
|
|
201
|
+
Cancels a build task given its identifier. The task's status is updated to indicate that it is in the process of cancellation. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
202
|
+
|
|
203
|
+
:param task_id: (required)
|
|
204
|
+
:type task_id: object
|
|
205
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
206
|
+
number provided, it will be total request
|
|
207
|
+
timeout. It can also be a pair (tuple) of
|
|
208
|
+
(connection, read) timeouts.
|
|
209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
211
|
+
request; this effectively ignores the
|
|
212
|
+
authentication in the spec for a single request.
|
|
213
|
+
:type _request_auth: dict, optional
|
|
214
|
+
:param _content_type: force content-type for the request.
|
|
215
|
+
:type _content_type: str, Optional
|
|
216
|
+
:param _headers: set to override the headers for a single
|
|
217
|
+
request; this effectively ignores the headers
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _headers: dict, optional
|
|
220
|
+
:param _host_index: set to override the host_index for a single
|
|
221
|
+
request; this effectively ignores the host_index
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _host_index: int, optional
|
|
224
|
+
:return: Returns the result object.
|
|
225
|
+
""" # noqa: E501
|
|
226
|
+
|
|
227
|
+
_param = self._cancel_task_factory_task_id_cancel_post_serialize(
|
|
228
|
+
task_id=task_id,
|
|
229
|
+
_request_auth=_request_auth,
|
|
230
|
+
_content_type=_content_type,
|
|
231
|
+
_headers=_headers,
|
|
232
|
+
_host_index=_host_index
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
236
|
+
'200': "BuildTaskResponse",
|
|
237
|
+
'422': "HTTPValidationError",
|
|
238
|
+
}
|
|
239
|
+
response_data = await self.api_client.call_api(
|
|
240
|
+
*_param,
|
|
241
|
+
_request_timeout=_request_timeout
|
|
242
|
+
)
|
|
243
|
+
return response_data.response
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _cancel_task_factory_task_id_cancel_post_serialize(
|
|
247
|
+
self,
|
|
248
|
+
task_id,
|
|
249
|
+
_request_auth,
|
|
250
|
+
_content_type,
|
|
251
|
+
_headers,
|
|
252
|
+
_host_index,
|
|
253
|
+
) -> RequestSerialized:
|
|
254
|
+
|
|
255
|
+
_host = None
|
|
256
|
+
|
|
257
|
+
_collection_formats: Dict[str, str] = {
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
_path_params: Dict[str, str] = {}
|
|
261
|
+
_query_params: List[Tuple[str, str]] = []
|
|
262
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
263
|
+
_form_params: List[Tuple[str, str]] = []
|
|
264
|
+
_files: Dict[
|
|
265
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
266
|
+
] = {}
|
|
267
|
+
_body_params: Optional[bytes] = None
|
|
268
|
+
|
|
269
|
+
# process the path parameters
|
|
270
|
+
if task_id is not None:
|
|
271
|
+
_path_params['task_id'] = task_id
|
|
272
|
+
# process the query parameters
|
|
273
|
+
# process the header parameters
|
|
274
|
+
# process the form parameters
|
|
275
|
+
# process the body parameter
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# set the HTTP header `Accept`
|
|
279
|
+
if 'Accept' not in _header_params:
|
|
280
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
281
|
+
[
|
|
282
|
+
'application/json'
|
|
283
|
+
]
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
# authentication setting
|
|
288
|
+
_auth_settings: List[str] = [
|
|
289
|
+
]
|
|
290
|
+
|
|
291
|
+
return self.api_client.param_serialize(
|
|
292
|
+
method='POST',
|
|
293
|
+
resource_path='/factory/{task_id}/cancel',
|
|
294
|
+
path_params=_path_params,
|
|
295
|
+
query_params=_query_params,
|
|
296
|
+
header_params=_header_params,
|
|
297
|
+
body=_body_params,
|
|
298
|
+
post_params=_form_params,
|
|
299
|
+
files=_files,
|
|
300
|
+
auth_settings=_auth_settings,
|
|
301
|
+
collection_formats=_collection_formats,
|
|
302
|
+
_host=_host,
|
|
303
|
+
_request_auth=_request_auth
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
@validate_call
|
|
310
|
+
async def delete_task_factory_task_id_delete(
|
|
311
|
+
self,
|
|
312
|
+
task_id: Any,
|
|
313
|
+
_request_timeout: Union[
|
|
314
|
+
None,
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
+
Tuple[
|
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
319
|
+
]
|
|
320
|
+
] = None,
|
|
321
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
+
_content_type: Optional[StrictStr] = None,
|
|
323
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
325
|
+
) -> bool:
|
|
326
|
+
"""Delete Task
|
|
327
|
+
|
|
328
|
+
Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
329
|
+
|
|
330
|
+
:param task_id: (required)
|
|
331
|
+
:type task_id: object
|
|
332
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
333
|
+
number provided, it will be total request
|
|
334
|
+
timeout. It can also be a pair (tuple) of
|
|
335
|
+
(connection, read) timeouts.
|
|
336
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
337
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
338
|
+
request; this effectively ignores the
|
|
339
|
+
authentication in the spec for a single request.
|
|
340
|
+
:type _request_auth: dict, optional
|
|
341
|
+
:param _content_type: force content-type for the request.
|
|
342
|
+
:type _content_type: str, Optional
|
|
343
|
+
:param _headers: set to override the headers for a single
|
|
344
|
+
request; this effectively ignores the headers
|
|
345
|
+
in the spec for a single request.
|
|
346
|
+
:type _headers: dict, optional
|
|
347
|
+
:param _host_index: set to override the host_index for a single
|
|
348
|
+
request; this effectively ignores the host_index
|
|
349
|
+
in the spec for a single request.
|
|
350
|
+
:type _host_index: int, optional
|
|
351
|
+
:return: Returns the result object.
|
|
352
|
+
""" # noqa: E501
|
|
353
|
+
|
|
354
|
+
_param = self._delete_task_factory_task_id_delete_serialize(
|
|
355
|
+
task_id=task_id,
|
|
356
|
+
_request_auth=_request_auth,
|
|
357
|
+
_content_type=_content_type,
|
|
358
|
+
_headers=_headers,
|
|
359
|
+
_host_index=_host_index
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
363
|
+
'200': "bool",
|
|
364
|
+
'422': "HTTPValidationError",
|
|
365
|
+
}
|
|
366
|
+
response_data = await self.api_client.call_api(
|
|
367
|
+
*_param,
|
|
368
|
+
_request_timeout=_request_timeout
|
|
369
|
+
)
|
|
370
|
+
await response_data.read()
|
|
371
|
+
return self.api_client.response_deserialize(
|
|
372
|
+
response_data=response_data,
|
|
373
|
+
response_types_map=_response_types_map,
|
|
374
|
+
).data
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
@validate_call
|
|
378
|
+
async def delete_task_factory_task_id_delete_with_http_info(
|
|
379
|
+
self,
|
|
380
|
+
task_id: Any,
|
|
381
|
+
_request_timeout: Union[
|
|
382
|
+
None,
|
|
383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
384
|
+
Tuple[
|
|
385
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
386
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
387
|
+
]
|
|
388
|
+
] = None,
|
|
389
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
390
|
+
_content_type: Optional[StrictStr] = None,
|
|
391
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
392
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
393
|
+
) -> ApiResponse[bool]:
|
|
394
|
+
"""Delete Task
|
|
395
|
+
|
|
396
|
+
Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
397
|
+
|
|
398
|
+
:param task_id: (required)
|
|
399
|
+
:type task_id: object
|
|
400
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
401
|
+
number provided, it will be total request
|
|
402
|
+
timeout. It can also be a pair (tuple) of
|
|
403
|
+
(connection, read) timeouts.
|
|
404
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
405
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
406
|
+
request; this effectively ignores the
|
|
407
|
+
authentication in the spec for a single request.
|
|
408
|
+
:type _request_auth: dict, optional
|
|
409
|
+
:param _content_type: force content-type for the request.
|
|
410
|
+
:type _content_type: str, Optional
|
|
411
|
+
:param _headers: set to override the headers for a single
|
|
412
|
+
request; this effectively ignores the headers
|
|
413
|
+
in the spec for a single request.
|
|
414
|
+
:type _headers: dict, optional
|
|
415
|
+
:param _host_index: set to override the host_index for a single
|
|
416
|
+
request; this effectively ignores the host_index
|
|
417
|
+
in the spec for a single request.
|
|
418
|
+
:type _host_index: int, optional
|
|
419
|
+
:return: Returns the result object.
|
|
420
|
+
""" # noqa: E501
|
|
421
|
+
|
|
422
|
+
_param = self._delete_task_factory_task_id_delete_serialize(
|
|
423
|
+
task_id=task_id,
|
|
424
|
+
_request_auth=_request_auth,
|
|
425
|
+
_content_type=_content_type,
|
|
426
|
+
_headers=_headers,
|
|
427
|
+
_host_index=_host_index
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
431
|
+
'200': "bool",
|
|
432
|
+
'422': "HTTPValidationError",
|
|
433
|
+
}
|
|
434
|
+
response_data = await self.api_client.call_api(
|
|
435
|
+
*_param,
|
|
436
|
+
_request_timeout=_request_timeout
|
|
437
|
+
)
|
|
438
|
+
await response_data.read()
|
|
439
|
+
return self.api_client.response_deserialize(
|
|
440
|
+
response_data=response_data,
|
|
441
|
+
response_types_map=_response_types_map,
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
@validate_call
|
|
446
|
+
async def delete_task_factory_task_id_delete_without_preload_content(
|
|
447
|
+
self,
|
|
448
|
+
task_id: Any,
|
|
449
|
+
_request_timeout: Union[
|
|
450
|
+
None,
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
452
|
+
Tuple[
|
|
453
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
454
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
455
|
+
]
|
|
456
|
+
] = None,
|
|
457
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
458
|
+
_content_type: Optional[StrictStr] = None,
|
|
459
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
460
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
461
|
+
) -> RESTResponseType:
|
|
462
|
+
"""Delete Task
|
|
463
|
+
|
|
464
|
+
Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
465
|
+
|
|
466
|
+
:param task_id: (required)
|
|
467
|
+
:type task_id: object
|
|
468
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
469
|
+
number provided, it will be total request
|
|
470
|
+
timeout. It can also be a pair (tuple) of
|
|
471
|
+
(connection, read) timeouts.
|
|
472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
474
|
+
request; this effectively ignores the
|
|
475
|
+
authentication in the spec for a single request.
|
|
476
|
+
:type _request_auth: dict, optional
|
|
477
|
+
:param _content_type: force content-type for the request.
|
|
478
|
+
:type _content_type: str, Optional
|
|
479
|
+
:param _headers: set to override the headers for a single
|
|
480
|
+
request; this effectively ignores the headers
|
|
481
|
+
in the spec for a single request.
|
|
482
|
+
:type _headers: dict, optional
|
|
483
|
+
:param _host_index: set to override the host_index for a single
|
|
484
|
+
request; this effectively ignores the host_index
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _host_index: int, optional
|
|
487
|
+
:return: Returns the result object.
|
|
488
|
+
""" # noqa: E501
|
|
489
|
+
|
|
490
|
+
_param = self._delete_task_factory_task_id_delete_serialize(
|
|
491
|
+
task_id=task_id,
|
|
492
|
+
_request_auth=_request_auth,
|
|
493
|
+
_content_type=_content_type,
|
|
494
|
+
_headers=_headers,
|
|
495
|
+
_host_index=_host_index
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
499
|
+
'200': "bool",
|
|
500
|
+
'422': "HTTPValidationError",
|
|
501
|
+
}
|
|
502
|
+
response_data = await self.api_client.call_api(
|
|
503
|
+
*_param,
|
|
504
|
+
_request_timeout=_request_timeout
|
|
505
|
+
)
|
|
506
|
+
return response_data.response
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
def _delete_task_factory_task_id_delete_serialize(
|
|
510
|
+
self,
|
|
511
|
+
task_id,
|
|
512
|
+
_request_auth,
|
|
513
|
+
_content_type,
|
|
514
|
+
_headers,
|
|
515
|
+
_host_index,
|
|
516
|
+
) -> RequestSerialized:
|
|
517
|
+
|
|
518
|
+
_host = None
|
|
519
|
+
|
|
520
|
+
_collection_formats: Dict[str, str] = {
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
_path_params: Dict[str, str] = {}
|
|
524
|
+
_query_params: List[Tuple[str, str]] = []
|
|
525
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
526
|
+
_form_params: List[Tuple[str, str]] = []
|
|
527
|
+
_files: Dict[
|
|
528
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
529
|
+
] = {}
|
|
530
|
+
_body_params: Optional[bytes] = None
|
|
531
|
+
|
|
532
|
+
# process the path parameters
|
|
533
|
+
if task_id is not None:
|
|
534
|
+
_path_params['task_id'] = task_id
|
|
535
|
+
# process the query parameters
|
|
536
|
+
# process the header parameters
|
|
537
|
+
# process the form parameters
|
|
538
|
+
# process the body parameter
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
# set the HTTP header `Accept`
|
|
542
|
+
if 'Accept' not in _header_params:
|
|
543
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
544
|
+
[
|
|
545
|
+
'application/json'
|
|
546
|
+
]
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
# authentication setting
|
|
551
|
+
_auth_settings: List[str] = [
|
|
552
|
+
]
|
|
553
|
+
|
|
554
|
+
return self.api_client.param_serialize(
|
|
555
|
+
method='DELETE',
|
|
556
|
+
resource_path='/factory/{task_id}',
|
|
557
|
+
path_params=_path_params,
|
|
558
|
+
query_params=_query_params,
|
|
559
|
+
header_params=_header_params,
|
|
560
|
+
body=_body_params,
|
|
561
|
+
post_params=_form_params,
|
|
562
|
+
files=_files,
|
|
563
|
+
auth_settings=_auth_settings,
|
|
564
|
+
collection_formats=_collection_formats,
|
|
565
|
+
_host=_host,
|
|
566
|
+
_request_auth=_request_auth
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
@validate_call
|
|
573
|
+
async def factory_status_factory_status_get(
|
|
574
|
+
self,
|
|
575
|
+
_request_timeout: Union[
|
|
576
|
+
None,
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
578
|
+
Tuple[
|
|
579
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
580
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
581
|
+
]
|
|
582
|
+
] = None,
|
|
583
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
584
|
+
_content_type: Optional[StrictStr] = None,
|
|
585
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
586
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
587
|
+
) -> FFStatusResponse:
|
|
588
|
+
"""Factory Status
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
592
|
+
number provided, it will be total request
|
|
593
|
+
timeout. It can also be a pair (tuple) of
|
|
594
|
+
(connection, read) timeouts.
|
|
595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
597
|
+
request; this effectively ignores the
|
|
598
|
+
authentication in the spec for a single request.
|
|
599
|
+
:type _request_auth: dict, optional
|
|
600
|
+
:param _content_type: force content-type for the request.
|
|
601
|
+
:type _content_type: str, Optional
|
|
602
|
+
:param _headers: set to override the headers for a single
|
|
603
|
+
request; this effectively ignores the headers
|
|
604
|
+
in the spec for a single request.
|
|
605
|
+
:type _headers: dict, optional
|
|
606
|
+
:param _host_index: set to override the host_index for a single
|
|
607
|
+
request; this effectively ignores the host_index
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _host_index: int, optional
|
|
610
|
+
:return: Returns the result object.
|
|
611
|
+
""" # noqa: E501
|
|
612
|
+
|
|
613
|
+
_param = self._factory_status_factory_status_get_serialize(
|
|
614
|
+
_request_auth=_request_auth,
|
|
615
|
+
_content_type=_content_type,
|
|
616
|
+
_headers=_headers,
|
|
617
|
+
_host_index=_host_index
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
621
|
+
'200': "FFStatusResponse",
|
|
622
|
+
}
|
|
623
|
+
response_data = await self.api_client.call_api(
|
|
624
|
+
*_param,
|
|
625
|
+
_request_timeout=_request_timeout
|
|
626
|
+
)
|
|
627
|
+
await response_data.read()
|
|
628
|
+
return self.api_client.response_deserialize(
|
|
629
|
+
response_data=response_data,
|
|
630
|
+
response_types_map=_response_types_map,
|
|
631
|
+
).data
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
@validate_call
|
|
635
|
+
async def factory_status_factory_status_get_with_http_info(
|
|
636
|
+
self,
|
|
637
|
+
_request_timeout: Union[
|
|
638
|
+
None,
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Tuple[
|
|
641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
643
|
+
]
|
|
644
|
+
] = None,
|
|
645
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_content_type: Optional[StrictStr] = None,
|
|
647
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
648
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
649
|
+
) -> ApiResponse[FFStatusResponse]:
|
|
650
|
+
"""Factory Status
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
654
|
+
number provided, it will be total request
|
|
655
|
+
timeout. It can also be a pair (tuple) of
|
|
656
|
+
(connection, read) timeouts.
|
|
657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
659
|
+
request; this effectively ignores the
|
|
660
|
+
authentication in the spec for a single request.
|
|
661
|
+
:type _request_auth: dict, optional
|
|
662
|
+
:param _content_type: force content-type for the request.
|
|
663
|
+
:type _content_type: str, Optional
|
|
664
|
+
:param _headers: set to override the headers for a single
|
|
665
|
+
request; this effectively ignores the headers
|
|
666
|
+
in the spec for a single request.
|
|
667
|
+
:type _headers: dict, optional
|
|
668
|
+
:param _host_index: set to override the host_index for a single
|
|
669
|
+
request; this effectively ignores the host_index
|
|
670
|
+
in the spec for a single request.
|
|
671
|
+
:type _host_index: int, optional
|
|
672
|
+
:return: Returns the result object.
|
|
673
|
+
""" # noqa: E501
|
|
674
|
+
|
|
675
|
+
_param = self._factory_status_factory_status_get_serialize(
|
|
676
|
+
_request_auth=_request_auth,
|
|
677
|
+
_content_type=_content_type,
|
|
678
|
+
_headers=_headers,
|
|
679
|
+
_host_index=_host_index
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
683
|
+
'200': "FFStatusResponse",
|
|
684
|
+
}
|
|
685
|
+
response_data = await self.api_client.call_api(
|
|
686
|
+
*_param,
|
|
687
|
+
_request_timeout=_request_timeout
|
|
688
|
+
)
|
|
689
|
+
await response_data.read()
|
|
690
|
+
return self.api_client.response_deserialize(
|
|
691
|
+
response_data=response_data,
|
|
692
|
+
response_types_map=_response_types_map,
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
@validate_call
|
|
697
|
+
async def factory_status_factory_status_get_without_preload_content(
|
|
698
|
+
self,
|
|
699
|
+
_request_timeout: Union[
|
|
700
|
+
None,
|
|
701
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
702
|
+
Tuple[
|
|
703
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
705
|
+
]
|
|
706
|
+
] = None,
|
|
707
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
708
|
+
_content_type: Optional[StrictStr] = None,
|
|
709
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
710
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
711
|
+
) -> RESTResponseType:
|
|
712
|
+
"""Factory Status
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
716
|
+
number provided, it will be total request
|
|
717
|
+
timeout. It can also be a pair (tuple) of
|
|
718
|
+
(connection, read) timeouts.
|
|
719
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
720
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
721
|
+
request; this effectively ignores the
|
|
722
|
+
authentication in the spec for a single request.
|
|
723
|
+
:type _request_auth: dict, optional
|
|
724
|
+
:param _content_type: force content-type for the request.
|
|
725
|
+
:type _content_type: str, Optional
|
|
726
|
+
:param _headers: set to override the headers for a single
|
|
727
|
+
request; this effectively ignores the headers
|
|
728
|
+
in the spec for a single request.
|
|
729
|
+
:type _headers: dict, optional
|
|
730
|
+
:param _host_index: set to override the host_index for a single
|
|
731
|
+
request; this effectively ignores the host_index
|
|
732
|
+
in the spec for a single request.
|
|
733
|
+
:type _host_index: int, optional
|
|
734
|
+
:return: Returns the result object.
|
|
735
|
+
""" # noqa: E501
|
|
736
|
+
|
|
737
|
+
_param = self._factory_status_factory_status_get_serialize(
|
|
738
|
+
_request_auth=_request_auth,
|
|
739
|
+
_content_type=_content_type,
|
|
740
|
+
_headers=_headers,
|
|
741
|
+
_host_index=_host_index
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
745
|
+
'200': "FFStatusResponse",
|
|
746
|
+
}
|
|
747
|
+
response_data = await self.api_client.call_api(
|
|
748
|
+
*_param,
|
|
749
|
+
_request_timeout=_request_timeout
|
|
750
|
+
)
|
|
751
|
+
return response_data.response
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
def _factory_status_factory_status_get_serialize(
|
|
755
|
+
self,
|
|
756
|
+
_request_auth,
|
|
757
|
+
_content_type,
|
|
758
|
+
_headers,
|
|
759
|
+
_host_index,
|
|
760
|
+
) -> RequestSerialized:
|
|
761
|
+
|
|
762
|
+
_host = None
|
|
763
|
+
|
|
764
|
+
_collection_formats: Dict[str, str] = {
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
_path_params: Dict[str, str] = {}
|
|
768
|
+
_query_params: List[Tuple[str, str]] = []
|
|
769
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
770
|
+
_form_params: List[Tuple[str, str]] = []
|
|
771
|
+
_files: Dict[
|
|
772
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
773
|
+
] = {}
|
|
774
|
+
_body_params: Optional[bytes] = None
|
|
775
|
+
|
|
776
|
+
# process the path parameters
|
|
777
|
+
# process the query parameters
|
|
778
|
+
# process the header parameters
|
|
779
|
+
# process the form parameters
|
|
780
|
+
# process the body parameter
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
# set the HTTP header `Accept`
|
|
784
|
+
if 'Accept' not in _header_params:
|
|
785
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
786
|
+
[
|
|
787
|
+
'application/json'
|
|
788
|
+
]
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
# authentication setting
|
|
793
|
+
_auth_settings: List[str] = [
|
|
794
|
+
]
|
|
795
|
+
|
|
796
|
+
return self.api_client.param_serialize(
|
|
797
|
+
method='GET',
|
|
798
|
+
resource_path='/factory/status',
|
|
799
|
+
path_params=_path_params,
|
|
800
|
+
query_params=_query_params,
|
|
801
|
+
header_params=_header_params,
|
|
802
|
+
body=_body_params,
|
|
803
|
+
post_params=_form_params,
|
|
804
|
+
files=_files,
|
|
805
|
+
auth_settings=_auth_settings,
|
|
806
|
+
collection_formats=_collection_formats,
|
|
807
|
+
_host=_host,
|
|
808
|
+
_request_auth=_request_auth
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
@validate_call
|
|
815
|
+
async def get_task_factory_task_id_get(
|
|
816
|
+
self,
|
|
817
|
+
task_id: Any,
|
|
818
|
+
_request_timeout: Union[
|
|
819
|
+
None,
|
|
820
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
821
|
+
Tuple[
|
|
822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
823
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
824
|
+
]
|
|
825
|
+
] = None,
|
|
826
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
827
|
+
_content_type: Optional[StrictStr] = None,
|
|
828
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
829
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
830
|
+
) -> BuildTaskResponse:
|
|
831
|
+
"""Get Task
|
|
832
|
+
|
|
833
|
+
Retrieves the details of a specific build task. This endpoint allows a user to fetch detailed information about a build task by its ID. Access to this endpoint is restricted to users with the 'maintainer' or 'foxworker' roles. Depending on the user's roles, returned task details may differ. Admin users will receive all task details, while others will have some fields excluded.
|
|
834
|
+
|
|
835
|
+
:param task_id: (required)
|
|
836
|
+
:type task_id: object
|
|
837
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
838
|
+
number provided, it will be total request
|
|
839
|
+
timeout. It can also be a pair (tuple) of
|
|
840
|
+
(connection, read) timeouts.
|
|
841
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
842
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
843
|
+
request; this effectively ignores the
|
|
844
|
+
authentication in the spec for a single request.
|
|
845
|
+
:type _request_auth: dict, optional
|
|
846
|
+
:param _content_type: force content-type for the request.
|
|
847
|
+
:type _content_type: str, Optional
|
|
848
|
+
:param _headers: set to override the headers for a single
|
|
849
|
+
request; this effectively ignores the headers
|
|
850
|
+
in the spec for a single request.
|
|
851
|
+
:type _headers: dict, optional
|
|
852
|
+
:param _host_index: set to override the host_index for a single
|
|
853
|
+
request; this effectively ignores the host_index
|
|
854
|
+
in the spec for a single request.
|
|
855
|
+
:type _host_index: int, optional
|
|
856
|
+
:return: Returns the result object.
|
|
857
|
+
""" # noqa: E501
|
|
858
|
+
|
|
859
|
+
_param = self._get_task_factory_task_id_get_serialize(
|
|
860
|
+
task_id=task_id,
|
|
861
|
+
_request_auth=_request_auth,
|
|
862
|
+
_content_type=_content_type,
|
|
863
|
+
_headers=_headers,
|
|
864
|
+
_host_index=_host_index
|
|
865
|
+
)
|
|
866
|
+
|
|
867
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
868
|
+
'200': "BuildTaskResponse",
|
|
869
|
+
'422': "HTTPValidationError",
|
|
870
|
+
}
|
|
871
|
+
response_data = await self.api_client.call_api(
|
|
872
|
+
*_param,
|
|
873
|
+
_request_timeout=_request_timeout
|
|
874
|
+
)
|
|
875
|
+
await response_data.read()
|
|
876
|
+
return self.api_client.response_deserialize(
|
|
877
|
+
response_data=response_data,
|
|
878
|
+
response_types_map=_response_types_map,
|
|
879
|
+
).data
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
@validate_call
|
|
883
|
+
async def get_task_factory_task_id_get_with_http_info(
|
|
884
|
+
self,
|
|
885
|
+
task_id: Any,
|
|
886
|
+
_request_timeout: Union[
|
|
887
|
+
None,
|
|
888
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
889
|
+
Tuple[
|
|
890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
892
|
+
]
|
|
893
|
+
] = None,
|
|
894
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
895
|
+
_content_type: Optional[StrictStr] = None,
|
|
896
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
897
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
898
|
+
) -> ApiResponse[BuildTaskResponse]:
|
|
899
|
+
"""Get Task
|
|
900
|
+
|
|
901
|
+
Retrieves the details of a specific build task. This endpoint allows a user to fetch detailed information about a build task by its ID. Access to this endpoint is restricted to users with the 'maintainer' or 'foxworker' roles. Depending on the user's roles, returned task details may differ. Admin users will receive all task details, while others will have some fields excluded.
|
|
902
|
+
|
|
903
|
+
:param task_id: (required)
|
|
904
|
+
:type task_id: object
|
|
905
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
906
|
+
number provided, it will be total request
|
|
907
|
+
timeout. It can also be a pair (tuple) of
|
|
908
|
+
(connection, read) timeouts.
|
|
909
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
910
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
911
|
+
request; this effectively ignores the
|
|
912
|
+
authentication in the spec for a single request.
|
|
913
|
+
:type _request_auth: dict, optional
|
|
914
|
+
:param _content_type: force content-type for the request.
|
|
915
|
+
:type _content_type: str, Optional
|
|
916
|
+
:param _headers: set to override the headers for a single
|
|
917
|
+
request; this effectively ignores the headers
|
|
918
|
+
in the spec for a single request.
|
|
919
|
+
:type _headers: dict, optional
|
|
920
|
+
:param _host_index: set to override the host_index for a single
|
|
921
|
+
request; this effectively ignores the host_index
|
|
922
|
+
in the spec for a single request.
|
|
923
|
+
:type _host_index: int, optional
|
|
924
|
+
:return: Returns the result object.
|
|
925
|
+
""" # noqa: E501
|
|
926
|
+
|
|
927
|
+
_param = self._get_task_factory_task_id_get_serialize(
|
|
928
|
+
task_id=task_id,
|
|
929
|
+
_request_auth=_request_auth,
|
|
930
|
+
_content_type=_content_type,
|
|
931
|
+
_headers=_headers,
|
|
932
|
+
_host_index=_host_index
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
936
|
+
'200': "BuildTaskResponse",
|
|
937
|
+
'422': "HTTPValidationError",
|
|
938
|
+
}
|
|
939
|
+
response_data = await self.api_client.call_api(
|
|
940
|
+
*_param,
|
|
941
|
+
_request_timeout=_request_timeout
|
|
942
|
+
)
|
|
943
|
+
await response_data.read()
|
|
944
|
+
return self.api_client.response_deserialize(
|
|
945
|
+
response_data=response_data,
|
|
946
|
+
response_types_map=_response_types_map,
|
|
947
|
+
)
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
@validate_call
|
|
951
|
+
async def get_task_factory_task_id_get_without_preload_content(
|
|
952
|
+
self,
|
|
953
|
+
task_id: Any,
|
|
954
|
+
_request_timeout: Union[
|
|
955
|
+
None,
|
|
956
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
957
|
+
Tuple[
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
960
|
+
]
|
|
961
|
+
] = None,
|
|
962
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
963
|
+
_content_type: Optional[StrictStr] = None,
|
|
964
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
966
|
+
) -> RESTResponseType:
|
|
967
|
+
"""Get Task
|
|
968
|
+
|
|
969
|
+
Retrieves the details of a specific build task. This endpoint allows a user to fetch detailed information about a build task by its ID. Access to this endpoint is restricted to users with the 'maintainer' or 'foxworker' roles. Depending on the user's roles, returned task details may differ. Admin users will receive all task details, while others will have some fields excluded.
|
|
970
|
+
|
|
971
|
+
:param task_id: (required)
|
|
972
|
+
:type task_id: object
|
|
973
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
974
|
+
number provided, it will be total request
|
|
975
|
+
timeout. It can also be a pair (tuple) of
|
|
976
|
+
(connection, read) timeouts.
|
|
977
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
978
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
979
|
+
request; this effectively ignores the
|
|
980
|
+
authentication in the spec for a single request.
|
|
981
|
+
:type _request_auth: dict, optional
|
|
982
|
+
:param _content_type: force content-type for the request.
|
|
983
|
+
:type _content_type: str, Optional
|
|
984
|
+
:param _headers: set to override the headers for a single
|
|
985
|
+
request; this effectively ignores the headers
|
|
986
|
+
in the spec for a single request.
|
|
987
|
+
:type _headers: dict, optional
|
|
988
|
+
:param _host_index: set to override the host_index for a single
|
|
989
|
+
request; this effectively ignores the host_index
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _host_index: int, optional
|
|
992
|
+
:return: Returns the result object.
|
|
993
|
+
""" # noqa: E501
|
|
994
|
+
|
|
995
|
+
_param = self._get_task_factory_task_id_get_serialize(
|
|
996
|
+
task_id=task_id,
|
|
997
|
+
_request_auth=_request_auth,
|
|
998
|
+
_content_type=_content_type,
|
|
999
|
+
_headers=_headers,
|
|
1000
|
+
_host_index=_host_index
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1004
|
+
'200': "BuildTaskResponse",
|
|
1005
|
+
'422': "HTTPValidationError",
|
|
1006
|
+
}
|
|
1007
|
+
response_data = await self.api_client.call_api(
|
|
1008
|
+
*_param,
|
|
1009
|
+
_request_timeout=_request_timeout
|
|
1010
|
+
)
|
|
1011
|
+
return response_data.response
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
def _get_task_factory_task_id_get_serialize(
|
|
1015
|
+
self,
|
|
1016
|
+
task_id,
|
|
1017
|
+
_request_auth,
|
|
1018
|
+
_content_type,
|
|
1019
|
+
_headers,
|
|
1020
|
+
_host_index,
|
|
1021
|
+
) -> RequestSerialized:
|
|
1022
|
+
|
|
1023
|
+
_host = None
|
|
1024
|
+
|
|
1025
|
+
_collection_formats: Dict[str, str] = {
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
_path_params: Dict[str, str] = {}
|
|
1029
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1030
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1031
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1032
|
+
_files: Dict[
|
|
1033
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1034
|
+
] = {}
|
|
1035
|
+
_body_params: Optional[bytes] = None
|
|
1036
|
+
|
|
1037
|
+
# process the path parameters
|
|
1038
|
+
if task_id is not None:
|
|
1039
|
+
_path_params['task_id'] = task_id
|
|
1040
|
+
# process the query parameters
|
|
1041
|
+
# process the header parameters
|
|
1042
|
+
# process the form parameters
|
|
1043
|
+
# process the body parameter
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
# set the HTTP header `Accept`
|
|
1047
|
+
if 'Accept' not in _header_params:
|
|
1048
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1049
|
+
[
|
|
1050
|
+
'application/json'
|
|
1051
|
+
]
|
|
1052
|
+
)
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
# authentication setting
|
|
1056
|
+
_auth_settings: List[str] = [
|
|
1057
|
+
]
|
|
1058
|
+
|
|
1059
|
+
return self.api_client.param_serialize(
|
|
1060
|
+
method='GET',
|
|
1061
|
+
resource_path='/factory/{task_id}',
|
|
1062
|
+
path_params=_path_params,
|
|
1063
|
+
query_params=_query_params,
|
|
1064
|
+
header_params=_header_params,
|
|
1065
|
+
body=_body_params,
|
|
1066
|
+
post_params=_form_params,
|
|
1067
|
+
files=_files,
|
|
1068
|
+
auth_settings=_auth_settings,
|
|
1069
|
+
collection_formats=_collection_formats,
|
|
1070
|
+
_host=_host,
|
|
1071
|
+
_request_auth=_request_auth
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
@validate_call
|
|
1078
|
+
async def list_tasks_factory_get(
|
|
1079
|
+
self,
|
|
1080
|
+
device_id: Optional[Any] = None,
|
|
1081
|
+
_request_timeout: Union[
|
|
1082
|
+
None,
|
|
1083
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1084
|
+
Tuple[
|
|
1085
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1086
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1087
|
+
]
|
|
1088
|
+
] = None,
|
|
1089
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1090
|
+
_content_type: Optional[StrictStr] = None,
|
|
1091
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1092
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1093
|
+
) -> List[BuildTaskShortResponse]:
|
|
1094
|
+
"""List Tasks
|
|
1095
|
+
|
|
1096
|
+
Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
|
|
1097
|
+
|
|
1098
|
+
:param device_id:
|
|
1099
|
+
:type device_id: AnyOf
|
|
1100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1101
|
+
number provided, it will be total request
|
|
1102
|
+
timeout. It can also be a pair (tuple) of
|
|
1103
|
+
(connection, read) timeouts.
|
|
1104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1106
|
+
request; this effectively ignores the
|
|
1107
|
+
authentication in the spec for a single request.
|
|
1108
|
+
:type _request_auth: dict, optional
|
|
1109
|
+
:param _content_type: force content-type for the request.
|
|
1110
|
+
:type _content_type: str, Optional
|
|
1111
|
+
:param _headers: set to override the headers for a single
|
|
1112
|
+
request; this effectively ignores the headers
|
|
1113
|
+
in the spec for a single request.
|
|
1114
|
+
:type _headers: dict, optional
|
|
1115
|
+
:param _host_index: set to override the host_index for a single
|
|
1116
|
+
request; this effectively ignores the host_index
|
|
1117
|
+
in the spec for a single request.
|
|
1118
|
+
:type _host_index: int, optional
|
|
1119
|
+
:return: Returns the result object.
|
|
1120
|
+
""" # noqa: E501
|
|
1121
|
+
|
|
1122
|
+
_param = self._list_tasks_factory_get_serialize(
|
|
1123
|
+
device_id=device_id,
|
|
1124
|
+
_request_auth=_request_auth,
|
|
1125
|
+
_content_type=_content_type,
|
|
1126
|
+
_headers=_headers,
|
|
1127
|
+
_host_index=_host_index
|
|
1128
|
+
)
|
|
1129
|
+
|
|
1130
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1131
|
+
'200': "List[BuildTaskShortResponse]",
|
|
1132
|
+
'422': "HTTPValidationError",
|
|
1133
|
+
}
|
|
1134
|
+
response_data = await self.api_client.call_api(
|
|
1135
|
+
*_param,
|
|
1136
|
+
_request_timeout=_request_timeout
|
|
1137
|
+
)
|
|
1138
|
+
await response_data.read()
|
|
1139
|
+
return self.api_client.response_deserialize(
|
|
1140
|
+
response_data=response_data,
|
|
1141
|
+
response_types_map=_response_types_map,
|
|
1142
|
+
).data
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
@validate_call
|
|
1146
|
+
async def list_tasks_factory_get_with_http_info(
|
|
1147
|
+
self,
|
|
1148
|
+
device_id: Optional[Any] = None,
|
|
1149
|
+
_request_timeout: Union[
|
|
1150
|
+
None,
|
|
1151
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1152
|
+
Tuple[
|
|
1153
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1154
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1155
|
+
]
|
|
1156
|
+
] = None,
|
|
1157
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1158
|
+
_content_type: Optional[StrictStr] = None,
|
|
1159
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1160
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1161
|
+
) -> ApiResponse[List[BuildTaskShortResponse]]:
|
|
1162
|
+
"""List Tasks
|
|
1163
|
+
|
|
1164
|
+
Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
|
|
1165
|
+
|
|
1166
|
+
:param device_id:
|
|
1167
|
+
:type device_id: AnyOf
|
|
1168
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1169
|
+
number provided, it will be total request
|
|
1170
|
+
timeout. It can also be a pair (tuple) of
|
|
1171
|
+
(connection, read) timeouts.
|
|
1172
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1173
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1174
|
+
request; this effectively ignores the
|
|
1175
|
+
authentication in the spec for a single request.
|
|
1176
|
+
:type _request_auth: dict, optional
|
|
1177
|
+
:param _content_type: force content-type for the request.
|
|
1178
|
+
:type _content_type: str, Optional
|
|
1179
|
+
:param _headers: set to override the headers for a single
|
|
1180
|
+
request; this effectively ignores the headers
|
|
1181
|
+
in the spec for a single request.
|
|
1182
|
+
:type _headers: dict, optional
|
|
1183
|
+
:param _host_index: set to override the host_index for a single
|
|
1184
|
+
request; this effectively ignores the host_index
|
|
1185
|
+
in the spec for a single request.
|
|
1186
|
+
:type _host_index: int, optional
|
|
1187
|
+
:return: Returns the result object.
|
|
1188
|
+
""" # noqa: E501
|
|
1189
|
+
|
|
1190
|
+
_param = self._list_tasks_factory_get_serialize(
|
|
1191
|
+
device_id=device_id,
|
|
1192
|
+
_request_auth=_request_auth,
|
|
1193
|
+
_content_type=_content_type,
|
|
1194
|
+
_headers=_headers,
|
|
1195
|
+
_host_index=_host_index
|
|
1196
|
+
)
|
|
1197
|
+
|
|
1198
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1199
|
+
'200': "List[BuildTaskShortResponse]",
|
|
1200
|
+
'422': "HTTPValidationError",
|
|
1201
|
+
}
|
|
1202
|
+
response_data = await self.api_client.call_api(
|
|
1203
|
+
*_param,
|
|
1204
|
+
_request_timeout=_request_timeout
|
|
1205
|
+
)
|
|
1206
|
+
await response_data.read()
|
|
1207
|
+
return self.api_client.response_deserialize(
|
|
1208
|
+
response_data=response_data,
|
|
1209
|
+
response_types_map=_response_types_map,
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@validate_call
|
|
1214
|
+
async def list_tasks_factory_get_without_preload_content(
|
|
1215
|
+
self,
|
|
1216
|
+
device_id: Optional[Any] = None,
|
|
1217
|
+
_request_timeout: Union[
|
|
1218
|
+
None,
|
|
1219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1220
|
+
Tuple[
|
|
1221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1222
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1223
|
+
]
|
|
1224
|
+
] = None,
|
|
1225
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1226
|
+
_content_type: Optional[StrictStr] = None,
|
|
1227
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1228
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1229
|
+
) -> RESTResponseType:
|
|
1230
|
+
"""List Tasks
|
|
1231
|
+
|
|
1232
|
+
Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
|
|
1233
|
+
|
|
1234
|
+
:param device_id:
|
|
1235
|
+
:type device_id: AnyOf
|
|
1236
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1237
|
+
number provided, it will be total request
|
|
1238
|
+
timeout. It can also be a pair (tuple) of
|
|
1239
|
+
(connection, read) timeouts.
|
|
1240
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1241
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1242
|
+
request; this effectively ignores the
|
|
1243
|
+
authentication in the spec for a single request.
|
|
1244
|
+
:type _request_auth: dict, optional
|
|
1245
|
+
:param _content_type: force content-type for the request.
|
|
1246
|
+
:type _content_type: str, Optional
|
|
1247
|
+
:param _headers: set to override the headers for a single
|
|
1248
|
+
request; this effectively ignores the headers
|
|
1249
|
+
in the spec for a single request.
|
|
1250
|
+
:type _headers: dict, optional
|
|
1251
|
+
:param _host_index: set to override the host_index for a single
|
|
1252
|
+
request; this effectively ignores the host_index
|
|
1253
|
+
in the spec for a single request.
|
|
1254
|
+
:type _host_index: int, optional
|
|
1255
|
+
:return: Returns the result object.
|
|
1256
|
+
""" # noqa: E501
|
|
1257
|
+
|
|
1258
|
+
_param = self._list_tasks_factory_get_serialize(
|
|
1259
|
+
device_id=device_id,
|
|
1260
|
+
_request_auth=_request_auth,
|
|
1261
|
+
_content_type=_content_type,
|
|
1262
|
+
_headers=_headers,
|
|
1263
|
+
_host_index=_host_index
|
|
1264
|
+
)
|
|
1265
|
+
|
|
1266
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1267
|
+
'200': "List[BuildTaskShortResponse]",
|
|
1268
|
+
'422': "HTTPValidationError",
|
|
1269
|
+
}
|
|
1270
|
+
response_data = await self.api_client.call_api(
|
|
1271
|
+
*_param,
|
|
1272
|
+
_request_timeout=_request_timeout
|
|
1273
|
+
)
|
|
1274
|
+
return response_data.response
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
def _list_tasks_factory_get_serialize(
|
|
1278
|
+
self,
|
|
1279
|
+
device_id,
|
|
1280
|
+
_request_auth,
|
|
1281
|
+
_content_type,
|
|
1282
|
+
_headers,
|
|
1283
|
+
_host_index,
|
|
1284
|
+
) -> RequestSerialized:
|
|
1285
|
+
|
|
1286
|
+
_host = None
|
|
1287
|
+
|
|
1288
|
+
_collection_formats: Dict[str, str] = {
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
_path_params: Dict[str, str] = {}
|
|
1292
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1293
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1294
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1295
|
+
_files: Dict[
|
|
1296
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1297
|
+
] = {}
|
|
1298
|
+
_body_params: Optional[bytes] = None
|
|
1299
|
+
|
|
1300
|
+
# process the path parameters
|
|
1301
|
+
# process the query parameters
|
|
1302
|
+
if device_id is not None:
|
|
1303
|
+
|
|
1304
|
+
_query_params.append(('device_id', device_id))
|
|
1305
|
+
|
|
1306
|
+
# process the header parameters
|
|
1307
|
+
# process the form parameters
|
|
1308
|
+
# process the body parameter
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
# set the HTTP header `Accept`
|
|
1312
|
+
if 'Accept' not in _header_params:
|
|
1313
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1314
|
+
[
|
|
1315
|
+
'application/json'
|
|
1316
|
+
]
|
|
1317
|
+
)
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
# authentication setting
|
|
1321
|
+
_auth_settings: List[str] = [
|
|
1322
|
+
]
|
|
1323
|
+
|
|
1324
|
+
return self.api_client.param_serialize(
|
|
1325
|
+
method='GET',
|
|
1326
|
+
resource_path='/factory/',
|
|
1327
|
+
path_params=_path_params,
|
|
1328
|
+
query_params=_query_params,
|
|
1329
|
+
header_params=_header_params,
|
|
1330
|
+
body=_body_params,
|
|
1331
|
+
post_params=_form_params,
|
|
1332
|
+
files=_files,
|
|
1333
|
+
auth_settings=_auth_settings,
|
|
1334
|
+
collection_formats=_collection_formats,
|
|
1335
|
+
_host=_host,
|
|
1336
|
+
_request_auth=_request_auth
|
|
1337
|
+
)
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
@validate_call
|
|
1343
|
+
async def new_task_factory_post(
|
|
1344
|
+
self,
|
|
1345
|
+
new_build_task_body: NewBuildTaskBody,
|
|
1346
|
+
_request_timeout: Union[
|
|
1347
|
+
None,
|
|
1348
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1349
|
+
Tuple[
|
|
1350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1351
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1352
|
+
]
|
|
1353
|
+
] = None,
|
|
1354
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1355
|
+
_content_type: Optional[StrictStr] = None,
|
|
1356
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1357
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1358
|
+
) -> bool:
|
|
1359
|
+
"""New Task
|
|
1360
|
+
|
|
1361
|
+
Handles the creation of a new build task including validations for the device existence and its connection to GitLab. It initializes a new task with a pending status and the required details, then saves it to the database before returning the task model.
|
|
1362
|
+
|
|
1363
|
+
:param new_build_task_body: (required)
|
|
1364
|
+
:type new_build_task_body: NewBuildTaskBody
|
|
1365
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1366
|
+
number provided, it will be total request
|
|
1367
|
+
timeout. It can also be a pair (tuple) of
|
|
1368
|
+
(connection, read) timeouts.
|
|
1369
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1370
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1371
|
+
request; this effectively ignores the
|
|
1372
|
+
authentication in the spec for a single request.
|
|
1373
|
+
:type _request_auth: dict, optional
|
|
1374
|
+
:param _content_type: force content-type for the request.
|
|
1375
|
+
:type _content_type: str, Optional
|
|
1376
|
+
:param _headers: set to override the headers for a single
|
|
1377
|
+
request; this effectively ignores the headers
|
|
1378
|
+
in the spec for a single request.
|
|
1379
|
+
:type _headers: dict, optional
|
|
1380
|
+
:param _host_index: set to override the host_index for a single
|
|
1381
|
+
request; this effectively ignores the host_index
|
|
1382
|
+
in the spec for a single request.
|
|
1383
|
+
:type _host_index: int, optional
|
|
1384
|
+
:return: Returns the result object.
|
|
1385
|
+
""" # noqa: E501
|
|
1386
|
+
|
|
1387
|
+
_param = self._new_task_factory_post_serialize(
|
|
1388
|
+
new_build_task_body=new_build_task_body,
|
|
1389
|
+
_request_auth=_request_auth,
|
|
1390
|
+
_content_type=_content_type,
|
|
1391
|
+
_headers=_headers,
|
|
1392
|
+
_host_index=_host_index
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1395
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1396
|
+
'200': "bool",
|
|
1397
|
+
'422': "HTTPValidationError",
|
|
1398
|
+
}
|
|
1399
|
+
response_data = await self.api_client.call_api(
|
|
1400
|
+
*_param,
|
|
1401
|
+
_request_timeout=_request_timeout
|
|
1402
|
+
)
|
|
1403
|
+
await response_data.read()
|
|
1404
|
+
return self.api_client.response_deserialize(
|
|
1405
|
+
response_data=response_data,
|
|
1406
|
+
response_types_map=_response_types_map,
|
|
1407
|
+
).data
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
@validate_call
|
|
1411
|
+
async def new_task_factory_post_with_http_info(
|
|
1412
|
+
self,
|
|
1413
|
+
new_build_task_body: NewBuildTaskBody,
|
|
1414
|
+
_request_timeout: Union[
|
|
1415
|
+
None,
|
|
1416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1417
|
+
Tuple[
|
|
1418
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1419
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1420
|
+
]
|
|
1421
|
+
] = None,
|
|
1422
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1423
|
+
_content_type: Optional[StrictStr] = None,
|
|
1424
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1425
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1426
|
+
) -> ApiResponse[bool]:
|
|
1427
|
+
"""New Task
|
|
1428
|
+
|
|
1429
|
+
Handles the creation of a new build task including validations for the device existence and its connection to GitLab. It initializes a new task with a pending status and the required details, then saves it to the database before returning the task model.
|
|
1430
|
+
|
|
1431
|
+
:param new_build_task_body: (required)
|
|
1432
|
+
:type new_build_task_body: NewBuildTaskBody
|
|
1433
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1434
|
+
number provided, it will be total request
|
|
1435
|
+
timeout. It can also be a pair (tuple) of
|
|
1436
|
+
(connection, read) timeouts.
|
|
1437
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1438
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1439
|
+
request; this effectively ignores the
|
|
1440
|
+
authentication in the spec for a single request.
|
|
1441
|
+
:type _request_auth: dict, optional
|
|
1442
|
+
:param _content_type: force content-type for the request.
|
|
1443
|
+
:type _content_type: str, Optional
|
|
1444
|
+
:param _headers: set to override the headers for a single
|
|
1445
|
+
request; this effectively ignores the headers
|
|
1446
|
+
in the spec for a single request.
|
|
1447
|
+
:type _headers: dict, optional
|
|
1448
|
+
:param _host_index: set to override the host_index for a single
|
|
1449
|
+
request; this effectively ignores the host_index
|
|
1450
|
+
in the spec for a single request.
|
|
1451
|
+
:type _host_index: int, optional
|
|
1452
|
+
:return: Returns the result object.
|
|
1453
|
+
""" # noqa: E501
|
|
1454
|
+
|
|
1455
|
+
_param = self._new_task_factory_post_serialize(
|
|
1456
|
+
new_build_task_body=new_build_task_body,
|
|
1457
|
+
_request_auth=_request_auth,
|
|
1458
|
+
_content_type=_content_type,
|
|
1459
|
+
_headers=_headers,
|
|
1460
|
+
_host_index=_host_index
|
|
1461
|
+
)
|
|
1462
|
+
|
|
1463
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1464
|
+
'200': "bool",
|
|
1465
|
+
'422': "HTTPValidationError",
|
|
1466
|
+
}
|
|
1467
|
+
response_data = await self.api_client.call_api(
|
|
1468
|
+
*_param,
|
|
1469
|
+
_request_timeout=_request_timeout
|
|
1470
|
+
)
|
|
1471
|
+
await response_data.read()
|
|
1472
|
+
return self.api_client.response_deserialize(
|
|
1473
|
+
response_data=response_data,
|
|
1474
|
+
response_types_map=_response_types_map,
|
|
1475
|
+
)
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
@validate_call
|
|
1479
|
+
async def new_task_factory_post_without_preload_content(
|
|
1480
|
+
self,
|
|
1481
|
+
new_build_task_body: NewBuildTaskBody,
|
|
1482
|
+
_request_timeout: Union[
|
|
1483
|
+
None,
|
|
1484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1485
|
+
Tuple[
|
|
1486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1488
|
+
]
|
|
1489
|
+
] = None,
|
|
1490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1491
|
+
_content_type: Optional[StrictStr] = None,
|
|
1492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1494
|
+
) -> RESTResponseType:
|
|
1495
|
+
"""New Task
|
|
1496
|
+
|
|
1497
|
+
Handles the creation of a new build task including validations for the device existence and its connection to GitLab. It initializes a new task with a pending status and the required details, then saves it to the database before returning the task model.
|
|
1498
|
+
|
|
1499
|
+
:param new_build_task_body: (required)
|
|
1500
|
+
:type new_build_task_body: NewBuildTaskBody
|
|
1501
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1502
|
+
number provided, it will be total request
|
|
1503
|
+
timeout. It can also be a pair (tuple) of
|
|
1504
|
+
(connection, read) timeouts.
|
|
1505
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1506
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1507
|
+
request; this effectively ignores the
|
|
1508
|
+
authentication in the spec for a single request.
|
|
1509
|
+
:type _request_auth: dict, optional
|
|
1510
|
+
:param _content_type: force content-type for the request.
|
|
1511
|
+
:type _content_type: str, Optional
|
|
1512
|
+
:param _headers: set to override the headers for a single
|
|
1513
|
+
request; this effectively ignores the headers
|
|
1514
|
+
in the spec for a single request.
|
|
1515
|
+
:type _headers: dict, optional
|
|
1516
|
+
:param _host_index: set to override the host_index for a single
|
|
1517
|
+
request; this effectively ignores the host_index
|
|
1518
|
+
in the spec for a single request.
|
|
1519
|
+
:type _host_index: int, optional
|
|
1520
|
+
:return: Returns the result object.
|
|
1521
|
+
""" # noqa: E501
|
|
1522
|
+
|
|
1523
|
+
_param = self._new_task_factory_post_serialize(
|
|
1524
|
+
new_build_task_body=new_build_task_body,
|
|
1525
|
+
_request_auth=_request_auth,
|
|
1526
|
+
_content_type=_content_type,
|
|
1527
|
+
_headers=_headers,
|
|
1528
|
+
_host_index=_host_index
|
|
1529
|
+
)
|
|
1530
|
+
|
|
1531
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1532
|
+
'200': "bool",
|
|
1533
|
+
'422': "HTTPValidationError",
|
|
1534
|
+
}
|
|
1535
|
+
response_data = await self.api_client.call_api(
|
|
1536
|
+
*_param,
|
|
1537
|
+
_request_timeout=_request_timeout
|
|
1538
|
+
)
|
|
1539
|
+
return response_data.response
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
def _new_task_factory_post_serialize(
|
|
1543
|
+
self,
|
|
1544
|
+
new_build_task_body,
|
|
1545
|
+
_request_auth,
|
|
1546
|
+
_content_type,
|
|
1547
|
+
_headers,
|
|
1548
|
+
_host_index,
|
|
1549
|
+
) -> RequestSerialized:
|
|
1550
|
+
|
|
1551
|
+
_host = None
|
|
1552
|
+
|
|
1553
|
+
_collection_formats: Dict[str, str] = {
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
_path_params: Dict[str, str] = {}
|
|
1557
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1558
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1559
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1560
|
+
_files: Dict[
|
|
1561
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1562
|
+
] = {}
|
|
1563
|
+
_body_params: Optional[bytes] = None
|
|
1564
|
+
|
|
1565
|
+
# process the path parameters
|
|
1566
|
+
# process the query parameters
|
|
1567
|
+
# process the header parameters
|
|
1568
|
+
# process the form parameters
|
|
1569
|
+
# process the body parameter
|
|
1570
|
+
if new_build_task_body is not None:
|
|
1571
|
+
_body_params = new_build_task_body
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
# set the HTTP header `Accept`
|
|
1575
|
+
if 'Accept' not in _header_params:
|
|
1576
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1577
|
+
[
|
|
1578
|
+
'application/json'
|
|
1579
|
+
]
|
|
1580
|
+
)
|
|
1581
|
+
|
|
1582
|
+
# set the HTTP header `Content-Type`
|
|
1583
|
+
if _content_type:
|
|
1584
|
+
_header_params['Content-Type'] = _content_type
|
|
1585
|
+
else:
|
|
1586
|
+
_default_content_type = (
|
|
1587
|
+
self.api_client.select_header_content_type(
|
|
1588
|
+
[
|
|
1589
|
+
'application/json'
|
|
1590
|
+
]
|
|
1591
|
+
)
|
|
1592
|
+
)
|
|
1593
|
+
if _default_content_type is not None:
|
|
1594
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1595
|
+
|
|
1596
|
+
# authentication setting
|
|
1597
|
+
_auth_settings: List[str] = [
|
|
1598
|
+
]
|
|
1599
|
+
|
|
1600
|
+
return self.api_client.param_serialize(
|
|
1601
|
+
method='POST',
|
|
1602
|
+
resource_path='/factory/',
|
|
1603
|
+
path_params=_path_params,
|
|
1604
|
+
query_params=_query_params,
|
|
1605
|
+
header_params=_header_params,
|
|
1606
|
+
body=_body_params,
|
|
1607
|
+
post_params=_form_params,
|
|
1608
|
+
files=_files,
|
|
1609
|
+
auth_settings=_auth_settings,
|
|
1610
|
+
collection_formats=_collection_formats,
|
|
1611
|
+
_host=_host,
|
|
1612
|
+
_request_auth=_request_auth
|
|
1613
|
+
)
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
@validate_call
|
|
1619
|
+
async def update_task_factory_task_id_patch(
|
|
1620
|
+
self,
|
|
1621
|
+
task_id: Any,
|
|
1622
|
+
task_update_body: TaskUpdateBody,
|
|
1623
|
+
_request_timeout: Union[
|
|
1624
|
+
None,
|
|
1625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1626
|
+
Tuple[
|
|
1627
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1628
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1629
|
+
]
|
|
1630
|
+
] = None,
|
|
1631
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1632
|
+
_content_type: Optional[StrictStr] = None,
|
|
1633
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1634
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1635
|
+
) -> bool:
|
|
1636
|
+
"""Update Task
|
|
1637
|
+
|
|
1638
|
+
Updates an existing build task by its unique identifier. The function allows updates to the task's status and logs. If the task's status is set to a value indicating completion, the finished timestamp is also updated. Allowed only for foxworker users.
|
|
1639
|
+
|
|
1640
|
+
:param task_id: (required)
|
|
1641
|
+
:type task_id: object
|
|
1642
|
+
:param task_update_body: (required)
|
|
1643
|
+
:type task_update_body: TaskUpdateBody
|
|
1644
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1645
|
+
number provided, it will be total request
|
|
1646
|
+
timeout. It can also be a pair (tuple) of
|
|
1647
|
+
(connection, read) timeouts.
|
|
1648
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1649
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1650
|
+
request; this effectively ignores the
|
|
1651
|
+
authentication in the spec for a single request.
|
|
1652
|
+
:type _request_auth: dict, optional
|
|
1653
|
+
:param _content_type: force content-type for the request.
|
|
1654
|
+
:type _content_type: str, Optional
|
|
1655
|
+
:param _headers: set to override the headers for a single
|
|
1656
|
+
request; this effectively ignores the headers
|
|
1657
|
+
in the spec for a single request.
|
|
1658
|
+
:type _headers: dict, optional
|
|
1659
|
+
:param _host_index: set to override the host_index for a single
|
|
1660
|
+
request; this effectively ignores the host_index
|
|
1661
|
+
in the spec for a single request.
|
|
1662
|
+
:type _host_index: int, optional
|
|
1663
|
+
:return: Returns the result object.
|
|
1664
|
+
""" # noqa: E501
|
|
1665
|
+
|
|
1666
|
+
_param = self._update_task_factory_task_id_patch_serialize(
|
|
1667
|
+
task_id=task_id,
|
|
1668
|
+
task_update_body=task_update_body,
|
|
1669
|
+
_request_auth=_request_auth,
|
|
1670
|
+
_content_type=_content_type,
|
|
1671
|
+
_headers=_headers,
|
|
1672
|
+
_host_index=_host_index
|
|
1673
|
+
)
|
|
1674
|
+
|
|
1675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1676
|
+
'200': "bool",
|
|
1677
|
+
'422': "HTTPValidationError",
|
|
1678
|
+
}
|
|
1679
|
+
response_data = await self.api_client.call_api(
|
|
1680
|
+
*_param,
|
|
1681
|
+
_request_timeout=_request_timeout
|
|
1682
|
+
)
|
|
1683
|
+
await response_data.read()
|
|
1684
|
+
return self.api_client.response_deserialize(
|
|
1685
|
+
response_data=response_data,
|
|
1686
|
+
response_types_map=_response_types_map,
|
|
1687
|
+
).data
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
@validate_call
|
|
1691
|
+
async def update_task_factory_task_id_patch_with_http_info(
|
|
1692
|
+
self,
|
|
1693
|
+
task_id: Any,
|
|
1694
|
+
task_update_body: TaskUpdateBody,
|
|
1695
|
+
_request_timeout: Union[
|
|
1696
|
+
None,
|
|
1697
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1698
|
+
Tuple[
|
|
1699
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1700
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1701
|
+
]
|
|
1702
|
+
] = None,
|
|
1703
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1704
|
+
_content_type: Optional[StrictStr] = None,
|
|
1705
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1706
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1707
|
+
) -> ApiResponse[bool]:
|
|
1708
|
+
"""Update Task
|
|
1709
|
+
|
|
1710
|
+
Updates an existing build task by its unique identifier. The function allows updates to the task's status and logs. If the task's status is set to a value indicating completion, the finished timestamp is also updated. Allowed only for foxworker users.
|
|
1711
|
+
|
|
1712
|
+
:param task_id: (required)
|
|
1713
|
+
:type task_id: object
|
|
1714
|
+
:param task_update_body: (required)
|
|
1715
|
+
:type task_update_body: TaskUpdateBody
|
|
1716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1717
|
+
number provided, it will be total request
|
|
1718
|
+
timeout. It can also be a pair (tuple) of
|
|
1719
|
+
(connection, read) timeouts.
|
|
1720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1722
|
+
request; this effectively ignores the
|
|
1723
|
+
authentication in the spec for a single request.
|
|
1724
|
+
:type _request_auth: dict, optional
|
|
1725
|
+
:param _content_type: force content-type for the request.
|
|
1726
|
+
:type _content_type: str, Optional
|
|
1727
|
+
:param _headers: set to override the headers for a single
|
|
1728
|
+
request; this effectively ignores the headers
|
|
1729
|
+
in the spec for a single request.
|
|
1730
|
+
:type _headers: dict, optional
|
|
1731
|
+
:param _host_index: set to override the host_index for a single
|
|
1732
|
+
request; this effectively ignores the host_index
|
|
1733
|
+
in the spec for a single request.
|
|
1734
|
+
:type _host_index: int, optional
|
|
1735
|
+
:return: Returns the result object.
|
|
1736
|
+
""" # noqa: E501
|
|
1737
|
+
|
|
1738
|
+
_param = self._update_task_factory_task_id_patch_serialize(
|
|
1739
|
+
task_id=task_id,
|
|
1740
|
+
task_update_body=task_update_body,
|
|
1741
|
+
_request_auth=_request_auth,
|
|
1742
|
+
_content_type=_content_type,
|
|
1743
|
+
_headers=_headers,
|
|
1744
|
+
_host_index=_host_index
|
|
1745
|
+
)
|
|
1746
|
+
|
|
1747
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1748
|
+
'200': "bool",
|
|
1749
|
+
'422': "HTTPValidationError",
|
|
1750
|
+
}
|
|
1751
|
+
response_data = await self.api_client.call_api(
|
|
1752
|
+
*_param,
|
|
1753
|
+
_request_timeout=_request_timeout
|
|
1754
|
+
)
|
|
1755
|
+
await response_data.read()
|
|
1756
|
+
return self.api_client.response_deserialize(
|
|
1757
|
+
response_data=response_data,
|
|
1758
|
+
response_types_map=_response_types_map,
|
|
1759
|
+
)
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
@validate_call
|
|
1763
|
+
async def update_task_factory_task_id_patch_without_preload_content(
|
|
1764
|
+
self,
|
|
1765
|
+
task_id: Any,
|
|
1766
|
+
task_update_body: TaskUpdateBody,
|
|
1767
|
+
_request_timeout: Union[
|
|
1768
|
+
None,
|
|
1769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1770
|
+
Tuple[
|
|
1771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1772
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1773
|
+
]
|
|
1774
|
+
] = None,
|
|
1775
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1776
|
+
_content_type: Optional[StrictStr] = None,
|
|
1777
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1778
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1779
|
+
) -> RESTResponseType:
|
|
1780
|
+
"""Update Task
|
|
1781
|
+
|
|
1782
|
+
Updates an existing build task by its unique identifier. The function allows updates to the task's status and logs. If the task's status is set to a value indicating completion, the finished timestamp is also updated. Allowed only for foxworker users.
|
|
1783
|
+
|
|
1784
|
+
:param task_id: (required)
|
|
1785
|
+
:type task_id: object
|
|
1786
|
+
:param task_update_body: (required)
|
|
1787
|
+
:type task_update_body: TaskUpdateBody
|
|
1788
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1789
|
+
number provided, it will be total request
|
|
1790
|
+
timeout. It can also be a pair (tuple) of
|
|
1791
|
+
(connection, read) timeouts.
|
|
1792
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1793
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1794
|
+
request; this effectively ignores the
|
|
1795
|
+
authentication in the spec for a single request.
|
|
1796
|
+
:type _request_auth: dict, optional
|
|
1797
|
+
:param _content_type: force content-type for the request.
|
|
1798
|
+
:type _content_type: str, Optional
|
|
1799
|
+
:param _headers: set to override the headers for a single
|
|
1800
|
+
request; this effectively ignores the headers
|
|
1801
|
+
in the spec for a single request.
|
|
1802
|
+
:type _headers: dict, optional
|
|
1803
|
+
:param _host_index: set to override the host_index for a single
|
|
1804
|
+
request; this effectively ignores the host_index
|
|
1805
|
+
in the spec for a single request.
|
|
1806
|
+
:type _host_index: int, optional
|
|
1807
|
+
:return: Returns the result object.
|
|
1808
|
+
""" # noqa: E501
|
|
1809
|
+
|
|
1810
|
+
_param = self._update_task_factory_task_id_patch_serialize(
|
|
1811
|
+
task_id=task_id,
|
|
1812
|
+
task_update_body=task_update_body,
|
|
1813
|
+
_request_auth=_request_auth,
|
|
1814
|
+
_content_type=_content_type,
|
|
1815
|
+
_headers=_headers,
|
|
1816
|
+
_host_index=_host_index
|
|
1817
|
+
)
|
|
1818
|
+
|
|
1819
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1820
|
+
'200': "bool",
|
|
1821
|
+
'422': "HTTPValidationError",
|
|
1822
|
+
}
|
|
1823
|
+
response_data = await self.api_client.call_api(
|
|
1824
|
+
*_param,
|
|
1825
|
+
_request_timeout=_request_timeout
|
|
1826
|
+
)
|
|
1827
|
+
return response_data.response
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
def _update_task_factory_task_id_patch_serialize(
|
|
1831
|
+
self,
|
|
1832
|
+
task_id,
|
|
1833
|
+
task_update_body,
|
|
1834
|
+
_request_auth,
|
|
1835
|
+
_content_type,
|
|
1836
|
+
_headers,
|
|
1837
|
+
_host_index,
|
|
1838
|
+
) -> RequestSerialized:
|
|
1839
|
+
|
|
1840
|
+
_host = None
|
|
1841
|
+
|
|
1842
|
+
_collection_formats: Dict[str, str] = {
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
_path_params: Dict[str, str] = {}
|
|
1846
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1847
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1848
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1849
|
+
_files: Dict[
|
|
1850
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1851
|
+
] = {}
|
|
1852
|
+
_body_params: Optional[bytes] = None
|
|
1853
|
+
|
|
1854
|
+
# process the path parameters
|
|
1855
|
+
if task_id is not None:
|
|
1856
|
+
_path_params['task_id'] = task_id
|
|
1857
|
+
# process the query parameters
|
|
1858
|
+
# process the header parameters
|
|
1859
|
+
# process the form parameters
|
|
1860
|
+
# process the body parameter
|
|
1861
|
+
if task_update_body is not None:
|
|
1862
|
+
_body_params = task_update_body
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
# set the HTTP header `Accept`
|
|
1866
|
+
if 'Accept' not in _header_params:
|
|
1867
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1868
|
+
[
|
|
1869
|
+
'application/json'
|
|
1870
|
+
]
|
|
1871
|
+
)
|
|
1872
|
+
|
|
1873
|
+
# set the HTTP header `Content-Type`
|
|
1874
|
+
if _content_type:
|
|
1875
|
+
_header_params['Content-Type'] = _content_type
|
|
1876
|
+
else:
|
|
1877
|
+
_default_content_type = (
|
|
1878
|
+
self.api_client.select_header_content_type(
|
|
1879
|
+
[
|
|
1880
|
+
'application/json'
|
|
1881
|
+
]
|
|
1882
|
+
)
|
|
1883
|
+
)
|
|
1884
|
+
if _default_content_type is not None:
|
|
1885
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1886
|
+
|
|
1887
|
+
# authentication setting
|
|
1888
|
+
_auth_settings: List[str] = [
|
|
1889
|
+
]
|
|
1890
|
+
|
|
1891
|
+
return self.api_client.param_serialize(
|
|
1892
|
+
method='PATCH',
|
|
1893
|
+
resource_path='/factory/{task_id}',
|
|
1894
|
+
path_params=_path_params,
|
|
1895
|
+
query_params=_query_params,
|
|
1896
|
+
header_params=_header_params,
|
|
1897
|
+
body=_body_params,
|
|
1898
|
+
post_params=_form_params,
|
|
1899
|
+
files=_files,
|
|
1900
|
+
auth_settings=_auth_settings,
|
|
1901
|
+
collection_formats=_collection_formats,
|
|
1902
|
+
_host=_host,
|
|
1903
|
+
_request_auth=_request_auth
|
|
1904
|
+
)
|
|
1905
|
+
|
|
1906
|
+
|