rapidata 2.31.1__py3-none-any.whl → 2.31.2__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.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

@@ -0,0 +1,1404 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictStr
20
+ from typing import List, Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from rapidata.api_client.models.create_sample_model import CreateSampleModel
23
+ from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
24
+ from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
25
+
26
+ from rapidata.api_client.api_client import ApiClient, RequestSerialized
27
+ from rapidata.api_client.api_response import ApiResponse
28
+ from rapidata.api_client.rest import RESTResponseType
29
+
30
+
31
+ class ParticipantApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def participant_participant_id_delete(
46
+ self,
47
+ participant_id: StrictStr,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> None:
61
+ """Deletes a participant on a benchmark.
62
+
63
+
64
+ :param participant_id: (required)
65
+ :type participant_id: str
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._participant_participant_id_delete_serialize(
89
+ participant_id=participant_id,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '204': None,
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def participant_participant_id_delete_with_http_info(
112
+ self,
113
+ participant_id: StrictStr,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[None]:
127
+ """Deletes a participant on a benchmark.
128
+
129
+
130
+ :param participant_id: (required)
131
+ :type participant_id: str
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._participant_participant_id_delete_serialize(
155
+ participant_id=participant_id,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '204': None,
164
+ }
165
+ response_data = self.api_client.call_api(
166
+ *_param,
167
+ _request_timeout=_request_timeout
168
+ )
169
+ response_data.read()
170
+ return self.api_client.response_deserialize(
171
+ response_data=response_data,
172
+ response_types_map=_response_types_map,
173
+ )
174
+
175
+
176
+ @validate_call
177
+ def participant_participant_id_delete_without_preload_content(
178
+ self,
179
+ participant_id: StrictStr,
180
+ _request_timeout: Union[
181
+ None,
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Tuple[
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Annotated[StrictFloat, Field(gt=0)]
186
+ ]
187
+ ] = None,
188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
+ _content_type: Optional[StrictStr] = None,
190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
+ ) -> RESTResponseType:
193
+ """Deletes a participant on a benchmark.
194
+
195
+
196
+ :param participant_id: (required)
197
+ :type participant_id: str
198
+ :param _request_timeout: timeout setting for this request. If one
199
+ number provided, it will be total request
200
+ timeout. It can also be a pair (tuple) of
201
+ (connection, read) timeouts.
202
+ :type _request_timeout: int, tuple(int, int), optional
203
+ :param _request_auth: set to override the auth_settings for an a single
204
+ request; this effectively ignores the
205
+ authentication in the spec for a single request.
206
+ :type _request_auth: dict, optional
207
+ :param _content_type: force content-type for the request.
208
+ :type _content_type: str, Optional
209
+ :param _headers: set to override the headers for a single
210
+ request; this effectively ignores the headers
211
+ in the spec for a single request.
212
+ :type _headers: dict, optional
213
+ :param _host_index: set to override the host_index for a single
214
+ request; this effectively ignores the host_index
215
+ in the spec for a single request.
216
+ :type _host_index: int, optional
217
+ :return: Returns the result object.
218
+ """ # noqa: E501
219
+
220
+ _param = self._participant_participant_id_delete_serialize(
221
+ participant_id=participant_id,
222
+ _request_auth=_request_auth,
223
+ _content_type=_content_type,
224
+ _headers=_headers,
225
+ _host_index=_host_index
226
+ )
227
+
228
+ _response_types_map: Dict[str, Optional[str]] = {
229
+ '204': None,
230
+ }
231
+ response_data = self.api_client.call_api(
232
+ *_param,
233
+ _request_timeout=_request_timeout
234
+ )
235
+ return response_data.response
236
+
237
+
238
+ def _participant_participant_id_delete_serialize(
239
+ self,
240
+ participant_id,
241
+ _request_auth,
242
+ _content_type,
243
+ _headers,
244
+ _host_index,
245
+ ) -> RequestSerialized:
246
+
247
+ _host = None
248
+
249
+ _collection_formats: Dict[str, str] = {
250
+ }
251
+
252
+ _path_params: Dict[str, str] = {}
253
+ _query_params: List[Tuple[str, str]] = []
254
+ _header_params: Dict[str, Optional[str]] = _headers or {}
255
+ _form_params: List[Tuple[str, str]] = []
256
+ _files: Dict[
257
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
258
+ ] = {}
259
+ _body_params: Optional[bytes] = None
260
+
261
+ # process the path parameters
262
+ if participant_id is not None:
263
+ _path_params['participantId'] = participant_id
264
+ # process the query parameters
265
+ # process the header parameters
266
+ # process the form parameters
267
+ # process the body parameter
268
+
269
+
270
+
271
+
272
+ # authentication setting
273
+ _auth_settings: List[str] = [
274
+ 'bearer',
275
+ 'oauth2'
276
+ ]
277
+
278
+ return self.api_client.param_serialize(
279
+ method='DELETE',
280
+ resource_path='/participant/{participantId}',
281
+ path_params=_path_params,
282
+ query_params=_query_params,
283
+ header_params=_header_params,
284
+ body=_body_params,
285
+ post_params=_form_params,
286
+ files=_files,
287
+ auth_settings=_auth_settings,
288
+ collection_formats=_collection_formats,
289
+ _host=_host,
290
+ _request_auth=_request_auth
291
+ )
292
+
293
+
294
+
295
+
296
+ @validate_call
297
+ def participant_participant_id_get(
298
+ self,
299
+ participant_id: StrictStr,
300
+ _request_timeout: Union[
301
+ None,
302
+ Annotated[StrictFloat, Field(gt=0)],
303
+ Tuple[
304
+ Annotated[StrictFloat, Field(gt=0)],
305
+ Annotated[StrictFloat, Field(gt=0)]
306
+ ]
307
+ ] = None,
308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
309
+ _content_type: Optional[StrictStr] = None,
310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
312
+ ) -> GetParticipantByIdResult:
313
+ """Gets a participant by it's Id.
314
+
315
+
316
+ :param participant_id: (required)
317
+ :type participant_id: str
318
+ :param _request_timeout: timeout setting for this request. If one
319
+ number provided, it will be total request
320
+ timeout. It can also be a pair (tuple) of
321
+ (connection, read) timeouts.
322
+ :type _request_timeout: int, tuple(int, int), optional
323
+ :param _request_auth: set to override the auth_settings for an a single
324
+ request; this effectively ignores the
325
+ authentication in the spec for a single request.
326
+ :type _request_auth: dict, optional
327
+ :param _content_type: force content-type for the request.
328
+ :type _content_type: str, Optional
329
+ :param _headers: set to override the headers for a single
330
+ request; this effectively ignores the headers
331
+ in the spec for a single request.
332
+ :type _headers: dict, optional
333
+ :param _host_index: set to override the host_index for a single
334
+ request; this effectively ignores the host_index
335
+ in the spec for a single request.
336
+ :type _host_index: int, optional
337
+ :return: Returns the result object.
338
+ """ # noqa: E501
339
+
340
+ _param = self._participant_participant_id_get_serialize(
341
+ participant_id=participant_id,
342
+ _request_auth=_request_auth,
343
+ _content_type=_content_type,
344
+ _headers=_headers,
345
+ _host_index=_host_index
346
+ )
347
+
348
+ _response_types_map: Dict[str, Optional[str]] = {
349
+ '200': "GetParticipantByIdResult",
350
+ }
351
+ response_data = self.api_client.call_api(
352
+ *_param,
353
+ _request_timeout=_request_timeout
354
+ )
355
+ response_data.read()
356
+ return self.api_client.response_deserialize(
357
+ response_data=response_data,
358
+ response_types_map=_response_types_map,
359
+ ).data
360
+
361
+
362
+ @validate_call
363
+ def participant_participant_id_get_with_http_info(
364
+ self,
365
+ participant_id: StrictStr,
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)],
371
+ Annotated[StrictFloat, Field(gt=0)]
372
+ ]
373
+ ] = None,
374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
+ _content_type: Optional[StrictStr] = None,
376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
+ ) -> ApiResponse[GetParticipantByIdResult]:
379
+ """Gets a participant by it's Id.
380
+
381
+
382
+ :param participant_id: (required)
383
+ :type participant_id: str
384
+ :param _request_timeout: timeout setting for this request. If one
385
+ number provided, it will be total request
386
+ timeout. It can also be a pair (tuple) of
387
+ (connection, read) timeouts.
388
+ :type _request_timeout: int, tuple(int, int), optional
389
+ :param _request_auth: set to override the auth_settings for an a single
390
+ request; this effectively ignores the
391
+ authentication in the spec for a single request.
392
+ :type _request_auth: dict, optional
393
+ :param _content_type: force content-type for the request.
394
+ :type _content_type: str, Optional
395
+ :param _headers: set to override the headers for a single
396
+ request; this effectively ignores the headers
397
+ in the spec for a single request.
398
+ :type _headers: dict, optional
399
+ :param _host_index: set to override the host_index for a single
400
+ request; this effectively ignores the host_index
401
+ in the spec for a single request.
402
+ :type _host_index: int, optional
403
+ :return: Returns the result object.
404
+ """ # noqa: E501
405
+
406
+ _param = self._participant_participant_id_get_serialize(
407
+ participant_id=participant_id,
408
+ _request_auth=_request_auth,
409
+ _content_type=_content_type,
410
+ _headers=_headers,
411
+ _host_index=_host_index
412
+ )
413
+
414
+ _response_types_map: Dict[str, Optional[str]] = {
415
+ '200': "GetParticipantByIdResult",
416
+ }
417
+ response_data = self.api_client.call_api(
418
+ *_param,
419
+ _request_timeout=_request_timeout
420
+ )
421
+ response_data.read()
422
+ return self.api_client.response_deserialize(
423
+ response_data=response_data,
424
+ response_types_map=_response_types_map,
425
+ )
426
+
427
+
428
+ @validate_call
429
+ def participant_participant_id_get_without_preload_content(
430
+ self,
431
+ participant_id: StrictStr,
432
+ _request_timeout: Union[
433
+ None,
434
+ Annotated[StrictFloat, Field(gt=0)],
435
+ Tuple[
436
+ Annotated[StrictFloat, Field(gt=0)],
437
+ Annotated[StrictFloat, Field(gt=0)]
438
+ ]
439
+ ] = None,
440
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
441
+ _content_type: Optional[StrictStr] = None,
442
+ _headers: Optional[Dict[StrictStr, Any]] = None,
443
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
444
+ ) -> RESTResponseType:
445
+ """Gets a participant by it's Id.
446
+
447
+
448
+ :param participant_id: (required)
449
+ :type participant_id: str
450
+ :param _request_timeout: timeout setting for this request. If one
451
+ number provided, it will be total request
452
+ timeout. It can also be a pair (tuple) of
453
+ (connection, read) timeouts.
454
+ :type _request_timeout: int, tuple(int, int), optional
455
+ :param _request_auth: set to override the auth_settings for an a single
456
+ request; this effectively ignores the
457
+ authentication in the spec for a single request.
458
+ :type _request_auth: dict, optional
459
+ :param _content_type: force content-type for the request.
460
+ :type _content_type: str, Optional
461
+ :param _headers: set to override the headers for a single
462
+ request; this effectively ignores the headers
463
+ in the spec for a single request.
464
+ :type _headers: dict, optional
465
+ :param _host_index: set to override the host_index for a single
466
+ request; this effectively ignores the host_index
467
+ in the spec for a single request.
468
+ :type _host_index: int, optional
469
+ :return: Returns the result object.
470
+ """ # noqa: E501
471
+
472
+ _param = self._participant_participant_id_get_serialize(
473
+ participant_id=participant_id,
474
+ _request_auth=_request_auth,
475
+ _content_type=_content_type,
476
+ _headers=_headers,
477
+ _host_index=_host_index
478
+ )
479
+
480
+ _response_types_map: Dict[str, Optional[str]] = {
481
+ '200': "GetParticipantByIdResult",
482
+ }
483
+ response_data = self.api_client.call_api(
484
+ *_param,
485
+ _request_timeout=_request_timeout
486
+ )
487
+ return response_data.response
488
+
489
+
490
+ def _participant_participant_id_get_serialize(
491
+ self,
492
+ participant_id,
493
+ _request_auth,
494
+ _content_type,
495
+ _headers,
496
+ _host_index,
497
+ ) -> RequestSerialized:
498
+
499
+ _host = None
500
+
501
+ _collection_formats: Dict[str, str] = {
502
+ }
503
+
504
+ _path_params: Dict[str, str] = {}
505
+ _query_params: List[Tuple[str, str]] = []
506
+ _header_params: Dict[str, Optional[str]] = _headers or {}
507
+ _form_params: List[Tuple[str, str]] = []
508
+ _files: Dict[
509
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
510
+ ] = {}
511
+ _body_params: Optional[bytes] = None
512
+
513
+ # process the path parameters
514
+ if participant_id is not None:
515
+ _path_params['participantId'] = participant_id
516
+ # process the query parameters
517
+ # process the header parameters
518
+ # process the form parameters
519
+ # process the body parameter
520
+
521
+
522
+ # set the HTTP header `Accept`
523
+ if 'Accept' not in _header_params:
524
+ _header_params['Accept'] = self.api_client.select_header_accept(
525
+ [
526
+ 'text/plain',
527
+ 'application/json',
528
+ 'text/json'
529
+ ]
530
+ )
531
+
532
+
533
+ # authentication setting
534
+ _auth_settings: List[str] = [
535
+ 'bearer',
536
+ 'oauth2'
537
+ ]
538
+
539
+ return self.api_client.param_serialize(
540
+ method='GET',
541
+ resource_path='/participant/{participantId}',
542
+ path_params=_path_params,
543
+ query_params=_query_params,
544
+ header_params=_header_params,
545
+ body=_body_params,
546
+ post_params=_form_params,
547
+ files=_files,
548
+ auth_settings=_auth_settings,
549
+ collection_formats=_collection_formats,
550
+ _host=_host,
551
+ _request_auth=_request_auth
552
+ )
553
+
554
+
555
+
556
+
557
+ @validate_call
558
+ def participant_participant_id_sample_post(
559
+ self,
560
+ participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
561
+ model: Optional[CreateSampleModel] = None,
562
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
563
+ texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
564
+ urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
565
+ _request_timeout: Union[
566
+ None,
567
+ Annotated[StrictFloat, Field(gt=0)],
568
+ Tuple[
569
+ Annotated[StrictFloat, Field(gt=0)],
570
+ Annotated[StrictFloat, Field(gt=0)]
571
+ ]
572
+ ] = None,
573
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
574
+ _content_type: Optional[StrictStr] = None,
575
+ _headers: Optional[Dict[StrictStr, Any]] = None,
576
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
577
+ ) -> None:
578
+ """Adds a sample to a participant.
579
+
580
+
581
+ :param participant_id: The id of the participant to add the sample to (required)
582
+ :type participant_id: str
583
+ :param model:
584
+ :type model: CreateSampleModel
585
+ :param files:
586
+ :type files: List[bytearray]
587
+ :param texts: If files aren't applicable texts can be used instead
588
+ :type texts: List[str]
589
+ :param urls: Exposed assets can be added via urls.
590
+ :type urls: List[str]
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._participant_participant_id_sample_post_serialize(
614
+ participant_id=participant_id,
615
+ model=model,
616
+ files=files,
617
+ texts=texts,
618
+ urls=urls,
619
+ _request_auth=_request_auth,
620
+ _content_type=_content_type,
621
+ _headers=_headers,
622
+ _host_index=_host_index
623
+ )
624
+
625
+ _response_types_map: Dict[str, Optional[str]] = {
626
+ '200': None,
627
+ }
628
+ response_data = self.api_client.call_api(
629
+ *_param,
630
+ _request_timeout=_request_timeout
631
+ )
632
+ response_data.read()
633
+ return self.api_client.response_deserialize(
634
+ response_data=response_data,
635
+ response_types_map=_response_types_map,
636
+ ).data
637
+
638
+
639
+ @validate_call
640
+ def participant_participant_id_sample_post_with_http_info(
641
+ self,
642
+ participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
643
+ model: Optional[CreateSampleModel] = None,
644
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
645
+ texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
646
+ urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
647
+ _request_timeout: Union[
648
+ None,
649
+ Annotated[StrictFloat, Field(gt=0)],
650
+ Tuple[
651
+ Annotated[StrictFloat, Field(gt=0)],
652
+ Annotated[StrictFloat, Field(gt=0)]
653
+ ]
654
+ ] = None,
655
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
656
+ _content_type: Optional[StrictStr] = None,
657
+ _headers: Optional[Dict[StrictStr, Any]] = None,
658
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
659
+ ) -> ApiResponse[None]:
660
+ """Adds a sample to a participant.
661
+
662
+
663
+ :param participant_id: The id of the participant to add the sample to (required)
664
+ :type participant_id: str
665
+ :param model:
666
+ :type model: CreateSampleModel
667
+ :param files:
668
+ :type files: List[bytearray]
669
+ :param texts: If files aren't applicable texts can be used instead
670
+ :type texts: List[str]
671
+ :param urls: Exposed assets can be added via urls.
672
+ :type urls: List[str]
673
+ :param _request_timeout: timeout setting for this request. If one
674
+ number provided, it will be total request
675
+ timeout. It can also be a pair (tuple) of
676
+ (connection, read) timeouts.
677
+ :type _request_timeout: int, tuple(int, int), optional
678
+ :param _request_auth: set to override the auth_settings for an a single
679
+ request; this effectively ignores the
680
+ authentication in the spec for a single request.
681
+ :type _request_auth: dict, optional
682
+ :param _content_type: force content-type for the request.
683
+ :type _content_type: str, Optional
684
+ :param _headers: set to override the headers for a single
685
+ request; this effectively ignores the headers
686
+ in the spec for a single request.
687
+ :type _headers: dict, optional
688
+ :param _host_index: set to override the host_index for a single
689
+ request; this effectively ignores the host_index
690
+ in the spec for a single request.
691
+ :type _host_index: int, optional
692
+ :return: Returns the result object.
693
+ """ # noqa: E501
694
+
695
+ _param = self._participant_participant_id_sample_post_serialize(
696
+ participant_id=participant_id,
697
+ model=model,
698
+ files=files,
699
+ texts=texts,
700
+ urls=urls,
701
+ _request_auth=_request_auth,
702
+ _content_type=_content_type,
703
+ _headers=_headers,
704
+ _host_index=_host_index
705
+ )
706
+
707
+ _response_types_map: Dict[str, Optional[str]] = {
708
+ '200': None,
709
+ }
710
+ response_data = self.api_client.call_api(
711
+ *_param,
712
+ _request_timeout=_request_timeout
713
+ )
714
+ response_data.read()
715
+ return self.api_client.response_deserialize(
716
+ response_data=response_data,
717
+ response_types_map=_response_types_map,
718
+ )
719
+
720
+
721
+ @validate_call
722
+ def participant_participant_id_sample_post_without_preload_content(
723
+ self,
724
+ participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
725
+ model: Optional[CreateSampleModel] = None,
726
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
727
+ texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
728
+ urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
729
+ _request_timeout: Union[
730
+ None,
731
+ Annotated[StrictFloat, Field(gt=0)],
732
+ Tuple[
733
+ Annotated[StrictFloat, Field(gt=0)],
734
+ Annotated[StrictFloat, Field(gt=0)]
735
+ ]
736
+ ] = None,
737
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
738
+ _content_type: Optional[StrictStr] = None,
739
+ _headers: Optional[Dict[StrictStr, Any]] = None,
740
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
741
+ ) -> RESTResponseType:
742
+ """Adds a sample to a participant.
743
+
744
+
745
+ :param participant_id: The id of the participant to add the sample to (required)
746
+ :type participant_id: str
747
+ :param model:
748
+ :type model: CreateSampleModel
749
+ :param files:
750
+ :type files: List[bytearray]
751
+ :param texts: If files aren't applicable texts can be used instead
752
+ :type texts: List[str]
753
+ :param urls: Exposed assets can be added via urls.
754
+ :type urls: List[str]
755
+ :param _request_timeout: timeout setting for this request. If one
756
+ number provided, it will be total request
757
+ timeout. It can also be a pair (tuple) of
758
+ (connection, read) timeouts.
759
+ :type _request_timeout: int, tuple(int, int), optional
760
+ :param _request_auth: set to override the auth_settings for an a single
761
+ request; this effectively ignores the
762
+ authentication in the spec for a single request.
763
+ :type _request_auth: dict, optional
764
+ :param _content_type: force content-type for the request.
765
+ :type _content_type: str, Optional
766
+ :param _headers: set to override the headers for a single
767
+ request; this effectively ignores the headers
768
+ in the spec for a single request.
769
+ :type _headers: dict, optional
770
+ :param _host_index: set to override the host_index for a single
771
+ request; this effectively ignores the host_index
772
+ in the spec for a single request.
773
+ :type _host_index: int, optional
774
+ :return: Returns the result object.
775
+ """ # noqa: E501
776
+
777
+ _param = self._participant_participant_id_sample_post_serialize(
778
+ participant_id=participant_id,
779
+ model=model,
780
+ files=files,
781
+ texts=texts,
782
+ urls=urls,
783
+ _request_auth=_request_auth,
784
+ _content_type=_content_type,
785
+ _headers=_headers,
786
+ _host_index=_host_index
787
+ )
788
+
789
+ _response_types_map: Dict[str, Optional[str]] = {
790
+ '200': None,
791
+ }
792
+ response_data = self.api_client.call_api(
793
+ *_param,
794
+ _request_timeout=_request_timeout
795
+ )
796
+ return response_data.response
797
+
798
+
799
+ def _participant_participant_id_sample_post_serialize(
800
+ self,
801
+ participant_id,
802
+ model,
803
+ files,
804
+ texts,
805
+ urls,
806
+ _request_auth,
807
+ _content_type,
808
+ _headers,
809
+ _host_index,
810
+ ) -> RequestSerialized:
811
+
812
+ _host = None
813
+
814
+ _collection_formats: Dict[str, str] = {
815
+ 'files': 'multi',
816
+ 'texts': 'multi',
817
+ 'urls': 'multi',
818
+ }
819
+
820
+ _path_params: Dict[str, str] = {}
821
+ _query_params: List[Tuple[str, str]] = []
822
+ _header_params: Dict[str, Optional[str]] = _headers or {}
823
+ _form_params: List[Tuple[str, str]] = []
824
+ _files: Dict[
825
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
826
+ ] = {}
827
+ _body_params: Optional[bytes] = None
828
+
829
+ # process the path parameters
830
+ if participant_id is not None:
831
+ _path_params['participantId'] = participant_id
832
+ # process the query parameters
833
+ # process the header parameters
834
+ # process the form parameters
835
+ if model is not None:
836
+ _form_params.append(('model', model))
837
+ if files is not None:
838
+ _files['files'] = files
839
+ if texts is not None:
840
+ _form_params.append(('texts', texts))
841
+ if urls is not None:
842
+ _form_params.append(('urls', urls))
843
+ # process the body parameter
844
+
845
+
846
+
847
+ # set the HTTP header `Content-Type`
848
+ if _content_type:
849
+ _header_params['Content-Type'] = _content_type
850
+ else:
851
+ _default_content_type = (
852
+ self.api_client.select_header_content_type(
853
+ [
854
+ 'multipart/form-data'
855
+ ]
856
+ )
857
+ )
858
+ if _default_content_type is not None:
859
+ _header_params['Content-Type'] = _default_content_type
860
+
861
+ # authentication setting
862
+ _auth_settings: List[str] = [
863
+ 'bearer',
864
+ 'oauth2'
865
+ ]
866
+
867
+ return self.api_client.param_serialize(
868
+ method='POST',
869
+ resource_path='/participant/{participantId}/sample',
870
+ path_params=_path_params,
871
+ query_params=_query_params,
872
+ header_params=_header_params,
873
+ body=_body_params,
874
+ post_params=_form_params,
875
+ files=_files,
876
+ auth_settings=_auth_settings,
877
+ collection_formats=_collection_formats,
878
+ _host=_host,
879
+ _request_auth=_request_auth
880
+ )
881
+
882
+
883
+
884
+
885
+ @validate_call
886
+ def participant_sample_sample_id_delete(
887
+ self,
888
+ sample_id: Annotated[StrictStr, Field(description="the id of the sample to be deleted.")],
889
+ _request_timeout: Union[
890
+ None,
891
+ Annotated[StrictFloat, Field(gt=0)],
892
+ Tuple[
893
+ Annotated[StrictFloat, Field(gt=0)],
894
+ Annotated[StrictFloat, Field(gt=0)]
895
+ ]
896
+ ] = None,
897
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
898
+ _content_type: Optional[StrictStr] = None,
899
+ _headers: Optional[Dict[StrictStr, Any]] = None,
900
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
901
+ ) -> GetParticipantByIdResult:
902
+ """Deletes a sample.
903
+
904
+
905
+ :param sample_id: the id of the sample to be deleted. (required)
906
+ :type sample_id: str
907
+ :param _request_timeout: timeout setting for this request. If one
908
+ number provided, it will be total request
909
+ timeout. It can also be a pair (tuple) of
910
+ (connection, read) timeouts.
911
+ :type _request_timeout: int, tuple(int, int), optional
912
+ :param _request_auth: set to override the auth_settings for an a single
913
+ request; this effectively ignores the
914
+ authentication in the spec for a single request.
915
+ :type _request_auth: dict, optional
916
+ :param _content_type: force content-type for the request.
917
+ :type _content_type: str, Optional
918
+ :param _headers: set to override the headers for a single
919
+ request; this effectively ignores the headers
920
+ in the spec for a single request.
921
+ :type _headers: dict, optional
922
+ :param _host_index: set to override the host_index for a single
923
+ request; this effectively ignores the host_index
924
+ in the spec for a single request.
925
+ :type _host_index: int, optional
926
+ :return: Returns the result object.
927
+ """ # noqa: E501
928
+
929
+ _param = self._participant_sample_sample_id_delete_serialize(
930
+ sample_id=sample_id,
931
+ _request_auth=_request_auth,
932
+ _content_type=_content_type,
933
+ _headers=_headers,
934
+ _host_index=_host_index
935
+ )
936
+
937
+ _response_types_map: Dict[str, Optional[str]] = {
938
+ '200': "GetParticipantByIdResult",
939
+ }
940
+ response_data = self.api_client.call_api(
941
+ *_param,
942
+ _request_timeout=_request_timeout
943
+ )
944
+ response_data.read()
945
+ return self.api_client.response_deserialize(
946
+ response_data=response_data,
947
+ response_types_map=_response_types_map,
948
+ ).data
949
+
950
+
951
+ @validate_call
952
+ def participant_sample_sample_id_delete_with_http_info(
953
+ self,
954
+ sample_id: Annotated[StrictStr, Field(description="the id of the sample to be deleted.")],
955
+ _request_timeout: Union[
956
+ None,
957
+ Annotated[StrictFloat, Field(gt=0)],
958
+ Tuple[
959
+ Annotated[StrictFloat, Field(gt=0)],
960
+ Annotated[StrictFloat, Field(gt=0)]
961
+ ]
962
+ ] = None,
963
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
964
+ _content_type: Optional[StrictStr] = None,
965
+ _headers: Optional[Dict[StrictStr, Any]] = None,
966
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
967
+ ) -> ApiResponse[GetParticipantByIdResult]:
968
+ """Deletes a sample.
969
+
970
+
971
+ :param sample_id: the id of the sample to be deleted. (required)
972
+ :type sample_id: str
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._participant_sample_sample_id_delete_serialize(
996
+ sample_id=sample_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': "GetParticipantByIdResult",
1005
+ }
1006
+ response_data = self.api_client.call_api(
1007
+ *_param,
1008
+ _request_timeout=_request_timeout
1009
+ )
1010
+ response_data.read()
1011
+ return self.api_client.response_deserialize(
1012
+ response_data=response_data,
1013
+ response_types_map=_response_types_map,
1014
+ )
1015
+
1016
+
1017
+ @validate_call
1018
+ def participant_sample_sample_id_delete_without_preload_content(
1019
+ self,
1020
+ sample_id: Annotated[StrictStr, Field(description="the id of the sample to be deleted.")],
1021
+ _request_timeout: Union[
1022
+ None,
1023
+ Annotated[StrictFloat, Field(gt=0)],
1024
+ Tuple[
1025
+ Annotated[StrictFloat, Field(gt=0)],
1026
+ Annotated[StrictFloat, Field(gt=0)]
1027
+ ]
1028
+ ] = None,
1029
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1030
+ _content_type: Optional[StrictStr] = None,
1031
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1032
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1033
+ ) -> RESTResponseType:
1034
+ """Deletes a sample.
1035
+
1036
+
1037
+ :param sample_id: the id of the sample to be deleted. (required)
1038
+ :type sample_id: str
1039
+ :param _request_timeout: timeout setting for this request. If one
1040
+ number provided, it will be total request
1041
+ timeout. It can also be a pair (tuple) of
1042
+ (connection, read) timeouts.
1043
+ :type _request_timeout: int, tuple(int, int), optional
1044
+ :param _request_auth: set to override the auth_settings for an a single
1045
+ request; this effectively ignores the
1046
+ authentication in the spec for a single request.
1047
+ :type _request_auth: dict, optional
1048
+ :param _content_type: force content-type for the request.
1049
+ :type _content_type: str, Optional
1050
+ :param _headers: set to override the headers for a single
1051
+ request; this effectively ignores the headers
1052
+ in the spec for a single request.
1053
+ :type _headers: dict, optional
1054
+ :param _host_index: set to override the host_index for a single
1055
+ request; this effectively ignores the host_index
1056
+ in the spec for a single request.
1057
+ :type _host_index: int, optional
1058
+ :return: Returns the result object.
1059
+ """ # noqa: E501
1060
+
1061
+ _param = self._participant_sample_sample_id_delete_serialize(
1062
+ sample_id=sample_id,
1063
+ _request_auth=_request_auth,
1064
+ _content_type=_content_type,
1065
+ _headers=_headers,
1066
+ _host_index=_host_index
1067
+ )
1068
+
1069
+ _response_types_map: Dict[str, Optional[str]] = {
1070
+ '200': "GetParticipantByIdResult",
1071
+ }
1072
+ response_data = self.api_client.call_api(
1073
+ *_param,
1074
+ _request_timeout=_request_timeout
1075
+ )
1076
+ return response_data.response
1077
+
1078
+
1079
+ def _participant_sample_sample_id_delete_serialize(
1080
+ self,
1081
+ sample_id,
1082
+ _request_auth,
1083
+ _content_type,
1084
+ _headers,
1085
+ _host_index,
1086
+ ) -> RequestSerialized:
1087
+
1088
+ _host = None
1089
+
1090
+ _collection_formats: Dict[str, str] = {
1091
+ }
1092
+
1093
+ _path_params: Dict[str, str] = {}
1094
+ _query_params: List[Tuple[str, str]] = []
1095
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1096
+ _form_params: List[Tuple[str, str]] = []
1097
+ _files: Dict[
1098
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1099
+ ] = {}
1100
+ _body_params: Optional[bytes] = None
1101
+
1102
+ # process the path parameters
1103
+ if sample_id is not None:
1104
+ _path_params['sampleId'] = sample_id
1105
+ # process the query parameters
1106
+ # process the header parameters
1107
+ # process the form parameters
1108
+ # process the body parameter
1109
+
1110
+
1111
+ # set the HTTP header `Accept`
1112
+ if 'Accept' not in _header_params:
1113
+ _header_params['Accept'] = self.api_client.select_header_accept(
1114
+ [
1115
+ 'text/plain',
1116
+ 'application/json',
1117
+ 'text/json'
1118
+ ]
1119
+ )
1120
+
1121
+
1122
+ # authentication setting
1123
+ _auth_settings: List[str] = [
1124
+ 'bearer',
1125
+ 'oauth2'
1126
+ ]
1127
+
1128
+ return self.api_client.param_serialize(
1129
+ method='DELETE',
1130
+ resource_path='/participant-sample/{sampleId}',
1131
+ path_params=_path_params,
1132
+ query_params=_query_params,
1133
+ header_params=_header_params,
1134
+ body=_body_params,
1135
+ post_params=_form_params,
1136
+ files=_files,
1137
+ auth_settings=_auth_settings,
1138
+ collection_formats=_collection_formats,
1139
+ _host=_host,
1140
+ _request_auth=_request_auth
1141
+ )
1142
+
1143
+
1144
+
1145
+
1146
+ @validate_call
1147
+ def participants_participant_id_submit_post(
1148
+ self,
1149
+ participant_id: StrictStr,
1150
+ _request_timeout: Union[
1151
+ None,
1152
+ Annotated[StrictFloat, Field(gt=0)],
1153
+ Tuple[
1154
+ Annotated[StrictFloat, Field(gt=0)],
1155
+ Annotated[StrictFloat, Field(gt=0)]
1156
+ ]
1157
+ ] = None,
1158
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1159
+ _content_type: Optional[StrictStr] = None,
1160
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1161
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1162
+ ) -> SubmitParticipantResult:
1163
+ """Submits a participant to a benchmark.
1164
+
1165
+
1166
+ :param participant_id: (required)
1167
+ :type participant_id: str
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._participants_participant_id_submit_post_serialize(
1191
+ participant_id=participant_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': "SubmitParticipantResult",
1200
+ }
1201
+ response_data = self.api_client.call_api(
1202
+ *_param,
1203
+ _request_timeout=_request_timeout
1204
+ )
1205
+ response_data.read()
1206
+ return self.api_client.response_deserialize(
1207
+ response_data=response_data,
1208
+ response_types_map=_response_types_map,
1209
+ ).data
1210
+
1211
+
1212
+ @validate_call
1213
+ def participants_participant_id_submit_post_with_http_info(
1214
+ self,
1215
+ participant_id: StrictStr,
1216
+ _request_timeout: Union[
1217
+ None,
1218
+ Annotated[StrictFloat, Field(gt=0)],
1219
+ Tuple[
1220
+ Annotated[StrictFloat, Field(gt=0)],
1221
+ Annotated[StrictFloat, Field(gt=0)]
1222
+ ]
1223
+ ] = None,
1224
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1225
+ _content_type: Optional[StrictStr] = None,
1226
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1227
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1228
+ ) -> ApiResponse[SubmitParticipantResult]:
1229
+ """Submits a participant to a benchmark.
1230
+
1231
+
1232
+ :param participant_id: (required)
1233
+ :type participant_id: str
1234
+ :param _request_timeout: timeout setting for this request. If one
1235
+ number provided, it will be total request
1236
+ timeout. It can also be a pair (tuple) of
1237
+ (connection, read) timeouts.
1238
+ :type _request_timeout: int, tuple(int, int), optional
1239
+ :param _request_auth: set to override the auth_settings for an a single
1240
+ request; this effectively ignores the
1241
+ authentication in the spec for a single request.
1242
+ :type _request_auth: dict, optional
1243
+ :param _content_type: force content-type for the request.
1244
+ :type _content_type: str, Optional
1245
+ :param _headers: set to override the headers for a single
1246
+ request; this effectively ignores the headers
1247
+ in the spec for a single request.
1248
+ :type _headers: dict, optional
1249
+ :param _host_index: set to override the host_index for a single
1250
+ request; this effectively ignores the host_index
1251
+ in the spec for a single request.
1252
+ :type _host_index: int, optional
1253
+ :return: Returns the result object.
1254
+ """ # noqa: E501
1255
+
1256
+ _param = self._participants_participant_id_submit_post_serialize(
1257
+ participant_id=participant_id,
1258
+ _request_auth=_request_auth,
1259
+ _content_type=_content_type,
1260
+ _headers=_headers,
1261
+ _host_index=_host_index
1262
+ )
1263
+
1264
+ _response_types_map: Dict[str, Optional[str]] = {
1265
+ '200': "SubmitParticipantResult",
1266
+ }
1267
+ response_data = self.api_client.call_api(
1268
+ *_param,
1269
+ _request_timeout=_request_timeout
1270
+ )
1271
+ response_data.read()
1272
+ return self.api_client.response_deserialize(
1273
+ response_data=response_data,
1274
+ response_types_map=_response_types_map,
1275
+ )
1276
+
1277
+
1278
+ @validate_call
1279
+ def participants_participant_id_submit_post_without_preload_content(
1280
+ self,
1281
+ participant_id: StrictStr,
1282
+ _request_timeout: Union[
1283
+ None,
1284
+ Annotated[StrictFloat, Field(gt=0)],
1285
+ Tuple[
1286
+ Annotated[StrictFloat, Field(gt=0)],
1287
+ Annotated[StrictFloat, Field(gt=0)]
1288
+ ]
1289
+ ] = None,
1290
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1291
+ _content_type: Optional[StrictStr] = None,
1292
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1293
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1294
+ ) -> RESTResponseType:
1295
+ """Submits a participant to a benchmark.
1296
+
1297
+
1298
+ :param participant_id: (required)
1299
+ :type participant_id: str
1300
+ :param _request_timeout: timeout setting for this request. If one
1301
+ number provided, it will be total request
1302
+ timeout. It can also be a pair (tuple) of
1303
+ (connection, read) timeouts.
1304
+ :type _request_timeout: int, tuple(int, int), optional
1305
+ :param _request_auth: set to override the auth_settings for an a single
1306
+ request; this effectively ignores the
1307
+ authentication in the spec for a single request.
1308
+ :type _request_auth: dict, optional
1309
+ :param _content_type: force content-type for the request.
1310
+ :type _content_type: str, Optional
1311
+ :param _headers: set to override the headers for a single
1312
+ request; this effectively ignores the headers
1313
+ in the spec for a single request.
1314
+ :type _headers: dict, optional
1315
+ :param _host_index: set to override the host_index for a single
1316
+ request; this effectively ignores the host_index
1317
+ in the spec for a single request.
1318
+ :type _host_index: int, optional
1319
+ :return: Returns the result object.
1320
+ """ # noqa: E501
1321
+
1322
+ _param = self._participants_participant_id_submit_post_serialize(
1323
+ participant_id=participant_id,
1324
+ _request_auth=_request_auth,
1325
+ _content_type=_content_type,
1326
+ _headers=_headers,
1327
+ _host_index=_host_index
1328
+ )
1329
+
1330
+ _response_types_map: Dict[str, Optional[str]] = {
1331
+ '200': "SubmitParticipantResult",
1332
+ }
1333
+ response_data = self.api_client.call_api(
1334
+ *_param,
1335
+ _request_timeout=_request_timeout
1336
+ )
1337
+ return response_data.response
1338
+
1339
+
1340
+ def _participants_participant_id_submit_post_serialize(
1341
+ self,
1342
+ participant_id,
1343
+ _request_auth,
1344
+ _content_type,
1345
+ _headers,
1346
+ _host_index,
1347
+ ) -> RequestSerialized:
1348
+
1349
+ _host = None
1350
+
1351
+ _collection_formats: Dict[str, str] = {
1352
+ }
1353
+
1354
+ _path_params: Dict[str, str] = {}
1355
+ _query_params: List[Tuple[str, str]] = []
1356
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1357
+ _form_params: List[Tuple[str, str]] = []
1358
+ _files: Dict[
1359
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1360
+ ] = {}
1361
+ _body_params: Optional[bytes] = None
1362
+
1363
+ # process the path parameters
1364
+ if participant_id is not None:
1365
+ _path_params['participantId'] = participant_id
1366
+ # process the query parameters
1367
+ # process the header parameters
1368
+ # process the form parameters
1369
+ # process the body parameter
1370
+
1371
+
1372
+ # set the HTTP header `Accept`
1373
+ if 'Accept' not in _header_params:
1374
+ _header_params['Accept'] = self.api_client.select_header_accept(
1375
+ [
1376
+ 'text/plain',
1377
+ 'application/json',
1378
+ 'text/json'
1379
+ ]
1380
+ )
1381
+
1382
+
1383
+ # authentication setting
1384
+ _auth_settings: List[str] = [
1385
+ 'bearer',
1386
+ 'oauth2'
1387
+ ]
1388
+
1389
+ return self.api_client.param_serialize(
1390
+ method='POST',
1391
+ resource_path='/participants/{participantId}/submit',
1392
+ path_params=_path_params,
1393
+ query_params=_query_params,
1394
+ header_params=_header_params,
1395
+ body=_body_params,
1396
+ post_params=_form_params,
1397
+ files=_files,
1398
+ auth_settings=_auth_settings,
1399
+ collection_formats=_collection_formats,
1400
+ _host=_host,
1401
+ _request_auth=_request_auth
1402
+ )
1403
+
1404
+