rapidata 2.32.0__py3-none-any.whl → 2.33.1__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.
- rapidata/__init__.py +1 -1
- rapidata/api_client/__init__.py +6 -0
- rapidata/api_client/api/benchmark_api.py +194 -200
- rapidata/api_client/api/order_api.py +68 -6
- rapidata/api_client/api/participant_api.py +945 -130
- rapidata/api_client/api/validation_set_api.py +1106 -253
- rapidata/api_client/models/__init__.py +6 -0
- rapidata/api_client/models/benchmark_query_result.py +4 -2
- rapidata/api_client/models/preview_order_model.py +87 -0
- rapidata/api_client/models/prompt_by_benchmark_result.py +4 -2
- rapidata/api_client/models/sample_by_participant.py +120 -0
- rapidata/api_client/models/sample_by_participant_paged_result.py +105 -0
- rapidata/api_client/models/submit_order_model.py +87 -0
- rapidata/api_client/models/submit_prompt_model.py +9 -2
- rapidata/api_client/models/update_participant_name_model.py +87 -0
- rapidata/api_client/models/update_should_alert_model.py +87 -0
- rapidata/api_client_README.md +13 -1
- rapidata/rapidata_client/exceptions/failed_upload_exception.py +35 -1
- rapidata/rapidata_client/order/_rapidata_order_builder.py +20 -7
- rapidata/rapidata_client/order/rapidata_order.py +4 -2
- rapidata/rapidata_client/order/rapidata_order_manager.py +14 -0
- rapidata/rapidata_client/validation/rapidata_validation_set.py +17 -1
- {rapidata-2.32.0.dist-info → rapidata-2.33.1.dist-info}/METADATA +1 -1
- {rapidata-2.32.0.dist-info → rapidata-2.33.1.dist-info}/RECORD +26 -20
- {rapidata-2.32.0.dist-info → rapidata-2.33.1.dist-info}/LICENSE +0 -0
- {rapidata-2.32.0.dist-info → rapidata-2.33.1.dist-info}/WHEEL +0 -0
|
@@ -21,7 +21,10 @@ from typing import List, Optional, Tuple, Union
|
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.create_sample_model import CreateSampleModel
|
|
23
23
|
from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
|
|
24
|
+
from rapidata.api_client.models.query_model import QueryModel
|
|
25
|
+
from rapidata.api_client.models.sample_by_participant_paged_result import SampleByParticipantPagedResult
|
|
24
26
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
27
|
+
from rapidata.api_client.models.update_participant_name_model import UpdateParticipantNameModel
|
|
25
28
|
|
|
26
29
|
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
27
30
|
from rapidata.api_client.api_response import ApiResponse
|
|
@@ -293,10 +296,809 @@ class ParticipantApi:
|
|
|
293
296
|
|
|
294
297
|
|
|
295
298
|
|
|
299
|
+
@validate_call
|
|
300
|
+
def participant_participant_id_disable_post(
|
|
301
|
+
self,
|
|
302
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
303
|
+
_request_timeout: Union[
|
|
304
|
+
None,
|
|
305
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
306
|
+
Tuple[
|
|
307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
308
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
309
|
+
]
|
|
310
|
+
] = None,
|
|
311
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
312
|
+
_content_type: Optional[StrictStr] = None,
|
|
313
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
314
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
315
|
+
) -> None:
|
|
316
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
320
|
+
:type participant_id: str
|
|
321
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
322
|
+
number provided, it will be total request
|
|
323
|
+
timeout. It can also be a pair (tuple) of
|
|
324
|
+
(connection, read) timeouts.
|
|
325
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
326
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
327
|
+
request; this effectively ignores the
|
|
328
|
+
authentication in the spec for a single request.
|
|
329
|
+
:type _request_auth: dict, optional
|
|
330
|
+
:param _content_type: force content-type for the request.
|
|
331
|
+
:type _content_type: str, Optional
|
|
332
|
+
:param _headers: set to override the headers for a single
|
|
333
|
+
request; this effectively ignores the headers
|
|
334
|
+
in the spec for a single request.
|
|
335
|
+
:type _headers: dict, optional
|
|
336
|
+
:param _host_index: set to override the host_index for a single
|
|
337
|
+
request; this effectively ignores the host_index
|
|
338
|
+
in the spec for a single request.
|
|
339
|
+
:type _host_index: int, optional
|
|
340
|
+
:return: Returns the result object.
|
|
341
|
+
""" # noqa: E501
|
|
342
|
+
|
|
343
|
+
_param = self._participant_participant_id_disable_post_serialize(
|
|
344
|
+
participant_id=participant_id,
|
|
345
|
+
_request_auth=_request_auth,
|
|
346
|
+
_content_type=_content_type,
|
|
347
|
+
_headers=_headers,
|
|
348
|
+
_host_index=_host_index
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
352
|
+
'200': None,
|
|
353
|
+
}
|
|
354
|
+
response_data = self.api_client.call_api(
|
|
355
|
+
*_param,
|
|
356
|
+
_request_timeout=_request_timeout
|
|
357
|
+
)
|
|
358
|
+
response_data.read()
|
|
359
|
+
return self.api_client.response_deserialize(
|
|
360
|
+
response_data=response_data,
|
|
361
|
+
response_types_map=_response_types_map,
|
|
362
|
+
).data
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
@validate_call
|
|
366
|
+
def participant_participant_id_disable_post_with_http_info(
|
|
367
|
+
self,
|
|
368
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
369
|
+
_request_timeout: Union[
|
|
370
|
+
None,
|
|
371
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
372
|
+
Tuple[
|
|
373
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
374
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
375
|
+
]
|
|
376
|
+
] = None,
|
|
377
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
378
|
+
_content_type: Optional[StrictStr] = None,
|
|
379
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
380
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
381
|
+
) -> ApiResponse[None]:
|
|
382
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
386
|
+
:type participant_id: str
|
|
387
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
388
|
+
number provided, it will be total request
|
|
389
|
+
timeout. It can also be a pair (tuple) of
|
|
390
|
+
(connection, read) timeouts.
|
|
391
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
392
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
393
|
+
request; this effectively ignores the
|
|
394
|
+
authentication in the spec for a single request.
|
|
395
|
+
:type _request_auth: dict, optional
|
|
396
|
+
:param _content_type: force content-type for the request.
|
|
397
|
+
:type _content_type: str, Optional
|
|
398
|
+
:param _headers: set to override the headers for a single
|
|
399
|
+
request; this effectively ignores the headers
|
|
400
|
+
in the spec for a single request.
|
|
401
|
+
:type _headers: dict, optional
|
|
402
|
+
:param _host_index: set to override the host_index for a single
|
|
403
|
+
request; this effectively ignores the host_index
|
|
404
|
+
in the spec for a single request.
|
|
405
|
+
:type _host_index: int, optional
|
|
406
|
+
:return: Returns the result object.
|
|
407
|
+
""" # noqa: E501
|
|
408
|
+
|
|
409
|
+
_param = self._participant_participant_id_disable_post_serialize(
|
|
410
|
+
participant_id=participant_id,
|
|
411
|
+
_request_auth=_request_auth,
|
|
412
|
+
_content_type=_content_type,
|
|
413
|
+
_headers=_headers,
|
|
414
|
+
_host_index=_host_index
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
418
|
+
'200': None,
|
|
419
|
+
}
|
|
420
|
+
response_data = self.api_client.call_api(
|
|
421
|
+
*_param,
|
|
422
|
+
_request_timeout=_request_timeout
|
|
423
|
+
)
|
|
424
|
+
response_data.read()
|
|
425
|
+
return self.api_client.response_deserialize(
|
|
426
|
+
response_data=response_data,
|
|
427
|
+
response_types_map=_response_types_map,
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
@validate_call
|
|
432
|
+
def participant_participant_id_disable_post_without_preload_content(
|
|
433
|
+
self,
|
|
434
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
435
|
+
_request_timeout: Union[
|
|
436
|
+
None,
|
|
437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
438
|
+
Tuple[
|
|
439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
441
|
+
]
|
|
442
|
+
] = None,
|
|
443
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
444
|
+
_content_type: Optional[StrictStr] = None,
|
|
445
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
446
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
447
|
+
) -> RESTResponseType:
|
|
448
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
452
|
+
:type participant_id: str
|
|
453
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
454
|
+
number provided, it will be total request
|
|
455
|
+
timeout. It can also be a pair (tuple) of
|
|
456
|
+
(connection, read) timeouts.
|
|
457
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
458
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
459
|
+
request; this effectively ignores the
|
|
460
|
+
authentication in the spec for a single request.
|
|
461
|
+
:type _request_auth: dict, optional
|
|
462
|
+
:param _content_type: force content-type for the request.
|
|
463
|
+
:type _content_type: str, Optional
|
|
464
|
+
:param _headers: set to override the headers for a single
|
|
465
|
+
request; this effectively ignores the headers
|
|
466
|
+
in the spec for a single request.
|
|
467
|
+
:type _headers: dict, optional
|
|
468
|
+
:param _host_index: set to override the host_index for a single
|
|
469
|
+
request; this effectively ignores the host_index
|
|
470
|
+
in the spec for a single request.
|
|
471
|
+
:type _host_index: int, optional
|
|
472
|
+
:return: Returns the result object.
|
|
473
|
+
""" # noqa: E501
|
|
474
|
+
|
|
475
|
+
_param = self._participant_participant_id_disable_post_serialize(
|
|
476
|
+
participant_id=participant_id,
|
|
477
|
+
_request_auth=_request_auth,
|
|
478
|
+
_content_type=_content_type,
|
|
479
|
+
_headers=_headers,
|
|
480
|
+
_host_index=_host_index
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
484
|
+
'200': None,
|
|
485
|
+
}
|
|
486
|
+
response_data = self.api_client.call_api(
|
|
487
|
+
*_param,
|
|
488
|
+
_request_timeout=_request_timeout
|
|
489
|
+
)
|
|
490
|
+
return response_data.response
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def _participant_participant_id_disable_post_serialize(
|
|
494
|
+
self,
|
|
495
|
+
participant_id,
|
|
496
|
+
_request_auth,
|
|
497
|
+
_content_type,
|
|
498
|
+
_headers,
|
|
499
|
+
_host_index,
|
|
500
|
+
) -> RequestSerialized:
|
|
501
|
+
|
|
502
|
+
_host = None
|
|
503
|
+
|
|
504
|
+
_collection_formats: Dict[str, str] = {
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
_path_params: Dict[str, str] = {}
|
|
508
|
+
_query_params: List[Tuple[str, str]] = []
|
|
509
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
510
|
+
_form_params: List[Tuple[str, str]] = []
|
|
511
|
+
_files: Dict[
|
|
512
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
513
|
+
] = {}
|
|
514
|
+
_body_params: Optional[bytes] = None
|
|
515
|
+
|
|
516
|
+
# process the path parameters
|
|
517
|
+
if participant_id is not None:
|
|
518
|
+
_path_params['participantId'] = participant_id
|
|
519
|
+
# process the query parameters
|
|
520
|
+
# process the header parameters
|
|
521
|
+
# process the form parameters
|
|
522
|
+
# process the body parameter
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
# authentication setting
|
|
528
|
+
_auth_settings: List[str] = [
|
|
529
|
+
'bearer',
|
|
530
|
+
'oauth2'
|
|
531
|
+
]
|
|
532
|
+
|
|
533
|
+
return self.api_client.param_serialize(
|
|
534
|
+
method='POST',
|
|
535
|
+
resource_path='/participant/{participantId}/disable',
|
|
536
|
+
path_params=_path_params,
|
|
537
|
+
query_params=_query_params,
|
|
538
|
+
header_params=_header_params,
|
|
539
|
+
body=_body_params,
|
|
540
|
+
post_params=_form_params,
|
|
541
|
+
files=_files,
|
|
542
|
+
auth_settings=_auth_settings,
|
|
543
|
+
collection_formats=_collection_formats,
|
|
544
|
+
_host=_host,
|
|
545
|
+
_request_auth=_request_auth
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
296
551
|
@validate_call
|
|
297
552
|
def participant_participant_id_get(
|
|
298
553
|
self,
|
|
299
|
-
participant_id: StrictStr,
|
|
554
|
+
participant_id: StrictStr,
|
|
555
|
+
_request_timeout: Union[
|
|
556
|
+
None,
|
|
557
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
558
|
+
Tuple[
|
|
559
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
560
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
561
|
+
]
|
|
562
|
+
] = None,
|
|
563
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
564
|
+
_content_type: Optional[StrictStr] = None,
|
|
565
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
566
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
567
|
+
) -> GetParticipantByIdResult:
|
|
568
|
+
"""Gets a participant by it's Id.
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
:param participant_id: (required)
|
|
572
|
+
:type participant_id: str
|
|
573
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
574
|
+
number provided, it will be total request
|
|
575
|
+
timeout. It can also be a pair (tuple) of
|
|
576
|
+
(connection, read) timeouts.
|
|
577
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
578
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
579
|
+
request; this effectively ignores the
|
|
580
|
+
authentication in the spec for a single request.
|
|
581
|
+
:type _request_auth: dict, optional
|
|
582
|
+
:param _content_type: force content-type for the request.
|
|
583
|
+
:type _content_type: str, Optional
|
|
584
|
+
:param _headers: set to override the headers for a single
|
|
585
|
+
request; this effectively ignores the headers
|
|
586
|
+
in the spec for a single request.
|
|
587
|
+
:type _headers: dict, optional
|
|
588
|
+
:param _host_index: set to override the host_index for a single
|
|
589
|
+
request; this effectively ignores the host_index
|
|
590
|
+
in the spec for a single request.
|
|
591
|
+
:type _host_index: int, optional
|
|
592
|
+
:return: Returns the result object.
|
|
593
|
+
""" # noqa: E501
|
|
594
|
+
|
|
595
|
+
_param = self._participant_participant_id_get_serialize(
|
|
596
|
+
participant_id=participant_id,
|
|
597
|
+
_request_auth=_request_auth,
|
|
598
|
+
_content_type=_content_type,
|
|
599
|
+
_headers=_headers,
|
|
600
|
+
_host_index=_host_index
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
604
|
+
'200': "GetParticipantByIdResult",
|
|
605
|
+
}
|
|
606
|
+
response_data = self.api_client.call_api(
|
|
607
|
+
*_param,
|
|
608
|
+
_request_timeout=_request_timeout
|
|
609
|
+
)
|
|
610
|
+
response_data.read()
|
|
611
|
+
return self.api_client.response_deserialize(
|
|
612
|
+
response_data=response_data,
|
|
613
|
+
response_types_map=_response_types_map,
|
|
614
|
+
).data
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
@validate_call
|
|
618
|
+
def participant_participant_id_get_with_http_info(
|
|
619
|
+
self,
|
|
620
|
+
participant_id: StrictStr,
|
|
621
|
+
_request_timeout: Union[
|
|
622
|
+
None,
|
|
623
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
624
|
+
Tuple[
|
|
625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
626
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
627
|
+
]
|
|
628
|
+
] = None,
|
|
629
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
630
|
+
_content_type: Optional[StrictStr] = None,
|
|
631
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
632
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
633
|
+
) -> ApiResponse[GetParticipantByIdResult]:
|
|
634
|
+
"""Gets a participant by it's Id.
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
:param participant_id: (required)
|
|
638
|
+
:type participant_id: str
|
|
639
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
640
|
+
number provided, it will be total request
|
|
641
|
+
timeout. It can also be a pair (tuple) of
|
|
642
|
+
(connection, read) timeouts.
|
|
643
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
644
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
645
|
+
request; this effectively ignores the
|
|
646
|
+
authentication in the spec for a single request.
|
|
647
|
+
:type _request_auth: dict, optional
|
|
648
|
+
:param _content_type: force content-type for the request.
|
|
649
|
+
:type _content_type: str, Optional
|
|
650
|
+
:param _headers: set to override the headers for a single
|
|
651
|
+
request; this effectively ignores the headers
|
|
652
|
+
in the spec for a single request.
|
|
653
|
+
:type _headers: dict, optional
|
|
654
|
+
:param _host_index: set to override the host_index for a single
|
|
655
|
+
request; this effectively ignores the host_index
|
|
656
|
+
in the spec for a single request.
|
|
657
|
+
:type _host_index: int, optional
|
|
658
|
+
:return: Returns the result object.
|
|
659
|
+
""" # noqa: E501
|
|
660
|
+
|
|
661
|
+
_param = self._participant_participant_id_get_serialize(
|
|
662
|
+
participant_id=participant_id,
|
|
663
|
+
_request_auth=_request_auth,
|
|
664
|
+
_content_type=_content_type,
|
|
665
|
+
_headers=_headers,
|
|
666
|
+
_host_index=_host_index
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
670
|
+
'200': "GetParticipantByIdResult",
|
|
671
|
+
}
|
|
672
|
+
response_data = self.api_client.call_api(
|
|
673
|
+
*_param,
|
|
674
|
+
_request_timeout=_request_timeout
|
|
675
|
+
)
|
|
676
|
+
response_data.read()
|
|
677
|
+
return self.api_client.response_deserialize(
|
|
678
|
+
response_data=response_data,
|
|
679
|
+
response_types_map=_response_types_map,
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
@validate_call
|
|
684
|
+
def participant_participant_id_get_without_preload_content(
|
|
685
|
+
self,
|
|
686
|
+
participant_id: StrictStr,
|
|
687
|
+
_request_timeout: Union[
|
|
688
|
+
None,
|
|
689
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
690
|
+
Tuple[
|
|
691
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
692
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
693
|
+
]
|
|
694
|
+
] = None,
|
|
695
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
696
|
+
_content_type: Optional[StrictStr] = None,
|
|
697
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
698
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
699
|
+
) -> RESTResponseType:
|
|
700
|
+
"""Gets a participant by it's Id.
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
:param participant_id: (required)
|
|
704
|
+
:type participant_id: str
|
|
705
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
706
|
+
number provided, it will be total request
|
|
707
|
+
timeout. It can also be a pair (tuple) of
|
|
708
|
+
(connection, read) timeouts.
|
|
709
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
710
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
711
|
+
request; this effectively ignores the
|
|
712
|
+
authentication in the spec for a single request.
|
|
713
|
+
:type _request_auth: dict, optional
|
|
714
|
+
:param _content_type: force content-type for the request.
|
|
715
|
+
:type _content_type: str, Optional
|
|
716
|
+
:param _headers: set to override the headers for a single
|
|
717
|
+
request; this effectively ignores the headers
|
|
718
|
+
in the spec for a single request.
|
|
719
|
+
:type _headers: dict, optional
|
|
720
|
+
:param _host_index: set to override the host_index for a single
|
|
721
|
+
request; this effectively ignores the host_index
|
|
722
|
+
in the spec for a single request.
|
|
723
|
+
:type _host_index: int, optional
|
|
724
|
+
:return: Returns the result object.
|
|
725
|
+
""" # noqa: E501
|
|
726
|
+
|
|
727
|
+
_param = self._participant_participant_id_get_serialize(
|
|
728
|
+
participant_id=participant_id,
|
|
729
|
+
_request_auth=_request_auth,
|
|
730
|
+
_content_type=_content_type,
|
|
731
|
+
_headers=_headers,
|
|
732
|
+
_host_index=_host_index
|
|
733
|
+
)
|
|
734
|
+
|
|
735
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
736
|
+
'200': "GetParticipantByIdResult",
|
|
737
|
+
}
|
|
738
|
+
response_data = self.api_client.call_api(
|
|
739
|
+
*_param,
|
|
740
|
+
_request_timeout=_request_timeout
|
|
741
|
+
)
|
|
742
|
+
return response_data.response
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
def _participant_participant_id_get_serialize(
|
|
746
|
+
self,
|
|
747
|
+
participant_id,
|
|
748
|
+
_request_auth,
|
|
749
|
+
_content_type,
|
|
750
|
+
_headers,
|
|
751
|
+
_host_index,
|
|
752
|
+
) -> RequestSerialized:
|
|
753
|
+
|
|
754
|
+
_host = None
|
|
755
|
+
|
|
756
|
+
_collection_formats: Dict[str, str] = {
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
_path_params: Dict[str, str] = {}
|
|
760
|
+
_query_params: List[Tuple[str, str]] = []
|
|
761
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
762
|
+
_form_params: List[Tuple[str, str]] = []
|
|
763
|
+
_files: Dict[
|
|
764
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
765
|
+
] = {}
|
|
766
|
+
_body_params: Optional[bytes] = None
|
|
767
|
+
|
|
768
|
+
# process the path parameters
|
|
769
|
+
if participant_id is not None:
|
|
770
|
+
_path_params['participantId'] = participant_id
|
|
771
|
+
# process the query parameters
|
|
772
|
+
# process the header parameters
|
|
773
|
+
# process the form parameters
|
|
774
|
+
# process the body parameter
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
# set the HTTP header `Accept`
|
|
778
|
+
if 'Accept' not in _header_params:
|
|
779
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
780
|
+
[
|
|
781
|
+
'text/plain',
|
|
782
|
+
'application/json',
|
|
783
|
+
'text/json'
|
|
784
|
+
]
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
# authentication setting
|
|
789
|
+
_auth_settings: List[str] = [
|
|
790
|
+
'bearer',
|
|
791
|
+
'oauth2'
|
|
792
|
+
]
|
|
793
|
+
|
|
794
|
+
return self.api_client.param_serialize(
|
|
795
|
+
method='GET',
|
|
796
|
+
resource_path='/participant/{participantId}',
|
|
797
|
+
path_params=_path_params,
|
|
798
|
+
query_params=_query_params,
|
|
799
|
+
header_params=_header_params,
|
|
800
|
+
body=_body_params,
|
|
801
|
+
post_params=_form_params,
|
|
802
|
+
files=_files,
|
|
803
|
+
auth_settings=_auth_settings,
|
|
804
|
+
collection_formats=_collection_formats,
|
|
805
|
+
_host=_host,
|
|
806
|
+
_request_auth=_request_auth
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
@validate_call
|
|
813
|
+
def participant_participant_id_name_put(
|
|
814
|
+
self,
|
|
815
|
+
participant_id: StrictStr,
|
|
816
|
+
update_participant_name_model: Optional[UpdateParticipantNameModel] = None,
|
|
817
|
+
_request_timeout: Union[
|
|
818
|
+
None,
|
|
819
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
820
|
+
Tuple[
|
|
821
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
822
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
823
|
+
]
|
|
824
|
+
] = None,
|
|
825
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
826
|
+
_content_type: Optional[StrictStr] = None,
|
|
827
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
828
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
829
|
+
) -> None:
|
|
830
|
+
"""Updates the name of a participant
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
:param participant_id: (required)
|
|
834
|
+
:type participant_id: str
|
|
835
|
+
:param update_participant_name_model:
|
|
836
|
+
:type update_participant_name_model: UpdateParticipantNameModel
|
|
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._participant_participant_id_name_put_serialize(
|
|
860
|
+
participant_id=participant_id,
|
|
861
|
+
update_participant_name_model=update_participant_name_model,
|
|
862
|
+
_request_auth=_request_auth,
|
|
863
|
+
_content_type=_content_type,
|
|
864
|
+
_headers=_headers,
|
|
865
|
+
_host_index=_host_index
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
869
|
+
'204': None,
|
|
870
|
+
}
|
|
871
|
+
response_data = self.api_client.call_api(
|
|
872
|
+
*_param,
|
|
873
|
+
_request_timeout=_request_timeout
|
|
874
|
+
)
|
|
875
|
+
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
|
+
def participant_participant_id_name_put_with_http_info(
|
|
884
|
+
self,
|
|
885
|
+
participant_id: StrictStr,
|
|
886
|
+
update_participant_name_model: Optional[UpdateParticipantNameModel] = None,
|
|
887
|
+
_request_timeout: Union[
|
|
888
|
+
None,
|
|
889
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
890
|
+
Tuple[
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
893
|
+
]
|
|
894
|
+
] = None,
|
|
895
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
896
|
+
_content_type: Optional[StrictStr] = None,
|
|
897
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
898
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
899
|
+
) -> ApiResponse[None]:
|
|
900
|
+
"""Updates the name of a participant
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
:param participant_id: (required)
|
|
904
|
+
:type participant_id: str
|
|
905
|
+
:param update_participant_name_model:
|
|
906
|
+
:type update_participant_name_model: UpdateParticipantNameModel
|
|
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_participant_id_name_put_serialize(
|
|
930
|
+
participant_id=participant_id,
|
|
931
|
+
update_participant_name_model=update_participant_name_model,
|
|
932
|
+
_request_auth=_request_auth,
|
|
933
|
+
_content_type=_content_type,
|
|
934
|
+
_headers=_headers,
|
|
935
|
+
_host_index=_host_index
|
|
936
|
+
)
|
|
937
|
+
|
|
938
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
939
|
+
'204': None,
|
|
940
|
+
}
|
|
941
|
+
response_data = self.api_client.call_api(
|
|
942
|
+
*_param,
|
|
943
|
+
_request_timeout=_request_timeout
|
|
944
|
+
)
|
|
945
|
+
response_data.read()
|
|
946
|
+
return self.api_client.response_deserialize(
|
|
947
|
+
response_data=response_data,
|
|
948
|
+
response_types_map=_response_types_map,
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
@validate_call
|
|
953
|
+
def participant_participant_id_name_put_without_preload_content(
|
|
954
|
+
self,
|
|
955
|
+
participant_id: StrictStr,
|
|
956
|
+
update_participant_name_model: Optional[UpdateParticipantNameModel] = None,
|
|
957
|
+
_request_timeout: Union[
|
|
958
|
+
None,
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
960
|
+
Tuple[
|
|
961
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
962
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
963
|
+
]
|
|
964
|
+
] = None,
|
|
965
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
966
|
+
_content_type: Optional[StrictStr] = None,
|
|
967
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
968
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
969
|
+
) -> RESTResponseType:
|
|
970
|
+
"""Updates the name of a participant
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
:param participant_id: (required)
|
|
974
|
+
:type participant_id: str
|
|
975
|
+
:param update_participant_name_model:
|
|
976
|
+
:type update_participant_name_model: UpdateParticipantNameModel
|
|
977
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
978
|
+
number provided, it will be total request
|
|
979
|
+
timeout. It can also be a pair (tuple) of
|
|
980
|
+
(connection, read) timeouts.
|
|
981
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
982
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
983
|
+
request; this effectively ignores the
|
|
984
|
+
authentication in the spec for a single request.
|
|
985
|
+
:type _request_auth: dict, optional
|
|
986
|
+
:param _content_type: force content-type for the request.
|
|
987
|
+
:type _content_type: str, Optional
|
|
988
|
+
:param _headers: set to override the headers for a single
|
|
989
|
+
request; this effectively ignores the headers
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _headers: dict, optional
|
|
992
|
+
:param _host_index: set to override the host_index for a single
|
|
993
|
+
request; this effectively ignores the host_index
|
|
994
|
+
in the spec for a single request.
|
|
995
|
+
:type _host_index: int, optional
|
|
996
|
+
:return: Returns the result object.
|
|
997
|
+
""" # noqa: E501
|
|
998
|
+
|
|
999
|
+
_param = self._participant_participant_id_name_put_serialize(
|
|
1000
|
+
participant_id=participant_id,
|
|
1001
|
+
update_participant_name_model=update_participant_name_model,
|
|
1002
|
+
_request_auth=_request_auth,
|
|
1003
|
+
_content_type=_content_type,
|
|
1004
|
+
_headers=_headers,
|
|
1005
|
+
_host_index=_host_index
|
|
1006
|
+
)
|
|
1007
|
+
|
|
1008
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1009
|
+
'204': None,
|
|
1010
|
+
}
|
|
1011
|
+
response_data = self.api_client.call_api(
|
|
1012
|
+
*_param,
|
|
1013
|
+
_request_timeout=_request_timeout
|
|
1014
|
+
)
|
|
1015
|
+
return response_data.response
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
def _participant_participant_id_name_put_serialize(
|
|
1019
|
+
self,
|
|
1020
|
+
participant_id,
|
|
1021
|
+
update_participant_name_model,
|
|
1022
|
+
_request_auth,
|
|
1023
|
+
_content_type,
|
|
1024
|
+
_headers,
|
|
1025
|
+
_host_index,
|
|
1026
|
+
) -> RequestSerialized:
|
|
1027
|
+
|
|
1028
|
+
_host = None
|
|
1029
|
+
|
|
1030
|
+
_collection_formats: Dict[str, str] = {
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
_path_params: Dict[str, str] = {}
|
|
1034
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1035
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1036
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1037
|
+
_files: Dict[
|
|
1038
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1039
|
+
] = {}
|
|
1040
|
+
_body_params: Optional[bytes] = None
|
|
1041
|
+
|
|
1042
|
+
# process the path parameters
|
|
1043
|
+
if participant_id is not None:
|
|
1044
|
+
_path_params['participantId'] = participant_id
|
|
1045
|
+
# process the query parameters
|
|
1046
|
+
# process the header parameters
|
|
1047
|
+
# process the form parameters
|
|
1048
|
+
# process the body parameter
|
|
1049
|
+
if update_participant_name_model is not None:
|
|
1050
|
+
_body_params = update_participant_name_model
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
# set the HTTP header `Content-Type`
|
|
1055
|
+
if _content_type:
|
|
1056
|
+
_header_params['Content-Type'] = _content_type
|
|
1057
|
+
else:
|
|
1058
|
+
_default_content_type = (
|
|
1059
|
+
self.api_client.select_header_content_type(
|
|
1060
|
+
[
|
|
1061
|
+
'application/json',
|
|
1062
|
+
'text/json',
|
|
1063
|
+
'application/*+json'
|
|
1064
|
+
]
|
|
1065
|
+
)
|
|
1066
|
+
)
|
|
1067
|
+
if _default_content_type is not None:
|
|
1068
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1069
|
+
|
|
1070
|
+
# authentication setting
|
|
1071
|
+
_auth_settings: List[str] = [
|
|
1072
|
+
'bearer',
|
|
1073
|
+
'oauth2'
|
|
1074
|
+
]
|
|
1075
|
+
|
|
1076
|
+
return self.api_client.param_serialize(
|
|
1077
|
+
method='PUT',
|
|
1078
|
+
resource_path='/participant/{participantId}/name',
|
|
1079
|
+
path_params=_path_params,
|
|
1080
|
+
query_params=_query_params,
|
|
1081
|
+
header_params=_header_params,
|
|
1082
|
+
body=_body_params,
|
|
1083
|
+
post_params=_form_params,
|
|
1084
|
+
files=_files,
|
|
1085
|
+
auth_settings=_auth_settings,
|
|
1086
|
+
collection_formats=_collection_formats,
|
|
1087
|
+
_host=_host,
|
|
1088
|
+
_request_auth=_request_auth
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
@validate_call
|
|
1095
|
+
def participant_participant_id_sample_post(
|
|
1096
|
+
self,
|
|
1097
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1098
|
+
model: Optional[CreateSampleModel] = None,
|
|
1099
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1100
|
+
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1101
|
+
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
300
1102
|
_request_timeout: Union[
|
|
301
1103
|
None,
|
|
302
1104
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -309,12 +1111,20 @@ class ParticipantApi:
|
|
|
309
1111
|
_content_type: Optional[StrictStr] = None,
|
|
310
1112
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
311
1113
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
312
|
-
) ->
|
|
313
|
-
"""
|
|
1114
|
+
) -> None:
|
|
1115
|
+
"""Adds a sample to a participant.
|
|
314
1116
|
|
|
315
1117
|
|
|
316
|
-
:param participant_id:
|
|
1118
|
+
:param participant_id: The id of the participant to add the sample to (required)
|
|
317
1119
|
:type participant_id: str
|
|
1120
|
+
:param model:
|
|
1121
|
+
:type model: CreateSampleModel
|
|
1122
|
+
:param files:
|
|
1123
|
+
:type files: List[bytearray]
|
|
1124
|
+
:param texts: If files aren't applicable texts can be used instead
|
|
1125
|
+
:type texts: List[str]
|
|
1126
|
+
:param urls: Exposed assets can be added via urls.
|
|
1127
|
+
:type urls: List[str]
|
|
318
1128
|
:param _request_timeout: timeout setting for this request. If one
|
|
319
1129
|
number provided, it will be total request
|
|
320
1130
|
timeout. It can also be a pair (tuple) of
|
|
@@ -337,8 +1147,12 @@ class ParticipantApi:
|
|
|
337
1147
|
:return: Returns the result object.
|
|
338
1148
|
""" # noqa: E501
|
|
339
1149
|
|
|
340
|
-
_param = self.
|
|
1150
|
+
_param = self._participant_participant_id_sample_post_serialize(
|
|
341
1151
|
participant_id=participant_id,
|
|
1152
|
+
model=model,
|
|
1153
|
+
files=files,
|
|
1154
|
+
texts=texts,
|
|
1155
|
+
urls=urls,
|
|
342
1156
|
_request_auth=_request_auth,
|
|
343
1157
|
_content_type=_content_type,
|
|
344
1158
|
_headers=_headers,
|
|
@@ -346,7 +1160,7 @@ class ParticipantApi:
|
|
|
346
1160
|
)
|
|
347
1161
|
|
|
348
1162
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
349
|
-
'200':
|
|
1163
|
+
'200': None,
|
|
350
1164
|
}
|
|
351
1165
|
response_data = self.api_client.call_api(
|
|
352
1166
|
*_param,
|
|
@@ -360,9 +1174,13 @@ class ParticipantApi:
|
|
|
360
1174
|
|
|
361
1175
|
|
|
362
1176
|
@validate_call
|
|
363
|
-
def
|
|
1177
|
+
def participant_participant_id_sample_post_with_http_info(
|
|
364
1178
|
self,
|
|
365
|
-
participant_id: StrictStr,
|
|
1179
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1180
|
+
model: Optional[CreateSampleModel] = None,
|
|
1181
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1182
|
+
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1183
|
+
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
366
1184
|
_request_timeout: Union[
|
|
367
1185
|
None,
|
|
368
1186
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -375,12 +1193,20 @@ class ParticipantApi:
|
|
|
375
1193
|
_content_type: Optional[StrictStr] = None,
|
|
376
1194
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
377
1195
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
378
|
-
) -> ApiResponse[
|
|
379
|
-
"""
|
|
1196
|
+
) -> ApiResponse[None]:
|
|
1197
|
+
"""Adds a sample to a participant.
|
|
380
1198
|
|
|
381
1199
|
|
|
382
|
-
:param participant_id:
|
|
1200
|
+
:param participant_id: The id of the participant to add the sample to (required)
|
|
383
1201
|
:type participant_id: str
|
|
1202
|
+
:param model:
|
|
1203
|
+
:type model: CreateSampleModel
|
|
1204
|
+
:param files:
|
|
1205
|
+
:type files: List[bytearray]
|
|
1206
|
+
:param texts: If files aren't applicable texts can be used instead
|
|
1207
|
+
:type texts: List[str]
|
|
1208
|
+
:param urls: Exposed assets can be added via urls.
|
|
1209
|
+
:type urls: List[str]
|
|
384
1210
|
:param _request_timeout: timeout setting for this request. If one
|
|
385
1211
|
number provided, it will be total request
|
|
386
1212
|
timeout. It can also be a pair (tuple) of
|
|
@@ -403,8 +1229,12 @@ class ParticipantApi:
|
|
|
403
1229
|
:return: Returns the result object.
|
|
404
1230
|
""" # noqa: E501
|
|
405
1231
|
|
|
406
|
-
_param = self.
|
|
1232
|
+
_param = self._participant_participant_id_sample_post_serialize(
|
|
407
1233
|
participant_id=participant_id,
|
|
1234
|
+
model=model,
|
|
1235
|
+
files=files,
|
|
1236
|
+
texts=texts,
|
|
1237
|
+
urls=urls,
|
|
408
1238
|
_request_auth=_request_auth,
|
|
409
1239
|
_content_type=_content_type,
|
|
410
1240
|
_headers=_headers,
|
|
@@ -412,7 +1242,7 @@ class ParticipantApi:
|
|
|
412
1242
|
)
|
|
413
1243
|
|
|
414
1244
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
415
|
-
'200':
|
|
1245
|
+
'200': None,
|
|
416
1246
|
}
|
|
417
1247
|
response_data = self.api_client.call_api(
|
|
418
1248
|
*_param,
|
|
@@ -426,9 +1256,13 @@ class ParticipantApi:
|
|
|
426
1256
|
|
|
427
1257
|
|
|
428
1258
|
@validate_call
|
|
429
|
-
def
|
|
1259
|
+
def participant_participant_id_sample_post_without_preload_content(
|
|
430
1260
|
self,
|
|
431
|
-
participant_id: StrictStr,
|
|
1261
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1262
|
+
model: Optional[CreateSampleModel] = None,
|
|
1263
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1264
|
+
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1265
|
+
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
432
1266
|
_request_timeout: Union[
|
|
433
1267
|
None,
|
|
434
1268
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -442,11 +1276,19 @@ class ParticipantApi:
|
|
|
442
1276
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
443
1277
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
444
1278
|
) -> RESTResponseType:
|
|
445
|
-
"""
|
|
1279
|
+
"""Adds a sample to a participant.
|
|
446
1280
|
|
|
447
1281
|
|
|
448
|
-
:param participant_id:
|
|
1282
|
+
:param participant_id: The id of the participant to add the sample to (required)
|
|
449
1283
|
:type participant_id: str
|
|
1284
|
+
:param model:
|
|
1285
|
+
:type model: CreateSampleModel
|
|
1286
|
+
:param files:
|
|
1287
|
+
:type files: List[bytearray]
|
|
1288
|
+
:param texts: If files aren't applicable texts can be used instead
|
|
1289
|
+
:type texts: List[str]
|
|
1290
|
+
:param urls: Exposed assets can be added via urls.
|
|
1291
|
+
:type urls: List[str]
|
|
450
1292
|
:param _request_timeout: timeout setting for this request. If one
|
|
451
1293
|
number provided, it will be total request
|
|
452
1294
|
timeout. It can also be a pair (tuple) of
|
|
@@ -469,8 +1311,12 @@ class ParticipantApi:
|
|
|
469
1311
|
:return: Returns the result object.
|
|
470
1312
|
""" # noqa: E501
|
|
471
1313
|
|
|
472
|
-
_param = self.
|
|
1314
|
+
_param = self._participant_participant_id_sample_post_serialize(
|
|
473
1315
|
participant_id=participant_id,
|
|
1316
|
+
model=model,
|
|
1317
|
+
files=files,
|
|
1318
|
+
texts=texts,
|
|
1319
|
+
urls=urls,
|
|
474
1320
|
_request_auth=_request_auth,
|
|
475
1321
|
_content_type=_content_type,
|
|
476
1322
|
_headers=_headers,
|
|
@@ -478,7 +1324,7 @@ class ParticipantApi:
|
|
|
478
1324
|
)
|
|
479
1325
|
|
|
480
1326
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
481
|
-
'200':
|
|
1327
|
+
'200': None,
|
|
482
1328
|
}
|
|
483
1329
|
response_data = self.api_client.call_api(
|
|
484
1330
|
*_param,
|
|
@@ -487,9 +1333,13 @@ class ParticipantApi:
|
|
|
487
1333
|
return response_data.response
|
|
488
1334
|
|
|
489
1335
|
|
|
490
|
-
def
|
|
1336
|
+
def _participant_participant_id_sample_post_serialize(
|
|
491
1337
|
self,
|
|
492
1338
|
participant_id,
|
|
1339
|
+
model,
|
|
1340
|
+
files,
|
|
1341
|
+
texts,
|
|
1342
|
+
urls,
|
|
493
1343
|
_request_auth,
|
|
494
1344
|
_content_type,
|
|
495
1345
|
_headers,
|
|
@@ -499,6 +1349,9 @@ class ParticipantApi:
|
|
|
499
1349
|
_host = None
|
|
500
1350
|
|
|
501
1351
|
_collection_formats: Dict[str, str] = {
|
|
1352
|
+
'files': 'multi',
|
|
1353
|
+
'texts': 'multi',
|
|
1354
|
+
'urls': 'multi',
|
|
502
1355
|
}
|
|
503
1356
|
|
|
504
1357
|
_path_params: Dict[str, str] = {}
|
|
@@ -516,19 +1369,31 @@ class ParticipantApi:
|
|
|
516
1369
|
# process the query parameters
|
|
517
1370
|
# process the header parameters
|
|
518
1371
|
# process the form parameters
|
|
1372
|
+
if model is not None:
|
|
1373
|
+
_form_params.append(('model', model))
|
|
1374
|
+
if files is not None:
|
|
1375
|
+
_files['files'] = files
|
|
1376
|
+
if texts is not None:
|
|
1377
|
+
_form_params.append(('texts', texts))
|
|
1378
|
+
if urls is not None:
|
|
1379
|
+
_form_params.append(('urls', urls))
|
|
519
1380
|
# process the body parameter
|
|
520
1381
|
|
|
521
1382
|
|
|
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
1383
|
|
|
1384
|
+
# set the HTTP header `Content-Type`
|
|
1385
|
+
if _content_type:
|
|
1386
|
+
_header_params['Content-Type'] = _content_type
|
|
1387
|
+
else:
|
|
1388
|
+
_default_content_type = (
|
|
1389
|
+
self.api_client.select_header_content_type(
|
|
1390
|
+
[
|
|
1391
|
+
'multipart/form-data'
|
|
1392
|
+
]
|
|
1393
|
+
)
|
|
1394
|
+
)
|
|
1395
|
+
if _default_content_type is not None:
|
|
1396
|
+
_header_params['Content-Type'] = _default_content_type
|
|
532
1397
|
|
|
533
1398
|
# authentication setting
|
|
534
1399
|
_auth_settings: List[str] = [
|
|
@@ -537,8 +1402,8 @@ class ParticipantApi:
|
|
|
537
1402
|
]
|
|
538
1403
|
|
|
539
1404
|
return self.api_client.param_serialize(
|
|
540
|
-
method='
|
|
541
|
-
resource_path='/participant/{participantId}',
|
|
1405
|
+
method='POST',
|
|
1406
|
+
resource_path='/participant/{participantId}/sample',
|
|
542
1407
|
path_params=_path_params,
|
|
543
1408
|
query_params=_query_params,
|
|
544
1409
|
header_params=_header_params,
|
|
@@ -555,13 +1420,10 @@ class ParticipantApi:
|
|
|
555
1420
|
|
|
556
1421
|
|
|
557
1422
|
@validate_call
|
|
558
|
-
def
|
|
1423
|
+
def participant_participant_id_samples_get(
|
|
559
1424
|
self,
|
|
560
|
-
participant_id:
|
|
561
|
-
|
|
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,
|
|
1425
|
+
participant_id: StrictStr,
|
|
1426
|
+
request: Optional[QueryModel] = None,
|
|
565
1427
|
_request_timeout: Union[
|
|
566
1428
|
None,
|
|
567
1429
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -574,20 +1436,14 @@ class ParticipantApi:
|
|
|
574
1436
|
_content_type: Optional[StrictStr] = None,
|
|
575
1437
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
576
1438
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
577
|
-
) ->
|
|
578
|
-
"""
|
|
1439
|
+
) -> SampleByParticipantPagedResult:
|
|
1440
|
+
"""Queries all samples of a participant.
|
|
579
1441
|
|
|
580
1442
|
|
|
581
|
-
:param participant_id:
|
|
1443
|
+
:param participant_id: (required)
|
|
582
1444
|
:type participant_id: str
|
|
583
|
-
:param
|
|
584
|
-
:type
|
|
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]
|
|
1445
|
+
:param request:
|
|
1446
|
+
:type request: QueryModel
|
|
591
1447
|
:param _request_timeout: timeout setting for this request. If one
|
|
592
1448
|
number provided, it will be total request
|
|
593
1449
|
timeout. It can also be a pair (tuple) of
|
|
@@ -610,12 +1466,9 @@ class ParticipantApi:
|
|
|
610
1466
|
:return: Returns the result object.
|
|
611
1467
|
""" # noqa: E501
|
|
612
1468
|
|
|
613
|
-
_param = self.
|
|
1469
|
+
_param = self._participant_participant_id_samples_get_serialize(
|
|
614
1470
|
participant_id=participant_id,
|
|
615
|
-
|
|
616
|
-
files=files,
|
|
617
|
-
texts=texts,
|
|
618
|
-
urls=urls,
|
|
1471
|
+
request=request,
|
|
619
1472
|
_request_auth=_request_auth,
|
|
620
1473
|
_content_type=_content_type,
|
|
621
1474
|
_headers=_headers,
|
|
@@ -623,7 +1476,7 @@ class ParticipantApi:
|
|
|
623
1476
|
)
|
|
624
1477
|
|
|
625
1478
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
626
|
-
'200':
|
|
1479
|
+
'200': "SampleByParticipantPagedResult",
|
|
627
1480
|
}
|
|
628
1481
|
response_data = self.api_client.call_api(
|
|
629
1482
|
*_param,
|
|
@@ -637,13 +1490,10 @@ class ParticipantApi:
|
|
|
637
1490
|
|
|
638
1491
|
|
|
639
1492
|
@validate_call
|
|
640
|
-
def
|
|
1493
|
+
def participant_participant_id_samples_get_with_http_info(
|
|
641
1494
|
self,
|
|
642
|
-
participant_id:
|
|
643
|
-
|
|
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,
|
|
1495
|
+
participant_id: StrictStr,
|
|
1496
|
+
request: Optional[QueryModel] = None,
|
|
647
1497
|
_request_timeout: Union[
|
|
648
1498
|
None,
|
|
649
1499
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -656,20 +1506,14 @@ class ParticipantApi:
|
|
|
656
1506
|
_content_type: Optional[StrictStr] = None,
|
|
657
1507
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
658
1508
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
659
|
-
) -> ApiResponse[
|
|
660
|
-
"""
|
|
1509
|
+
) -> ApiResponse[SampleByParticipantPagedResult]:
|
|
1510
|
+
"""Queries all samples of a participant.
|
|
661
1511
|
|
|
662
1512
|
|
|
663
|
-
:param participant_id:
|
|
1513
|
+
:param participant_id: (required)
|
|
664
1514
|
:type participant_id: str
|
|
665
|
-
:param
|
|
666
|
-
:type
|
|
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]
|
|
1515
|
+
:param request:
|
|
1516
|
+
:type request: QueryModel
|
|
673
1517
|
:param _request_timeout: timeout setting for this request. If one
|
|
674
1518
|
number provided, it will be total request
|
|
675
1519
|
timeout. It can also be a pair (tuple) of
|
|
@@ -692,12 +1536,9 @@ class ParticipantApi:
|
|
|
692
1536
|
:return: Returns the result object.
|
|
693
1537
|
""" # noqa: E501
|
|
694
1538
|
|
|
695
|
-
_param = self.
|
|
1539
|
+
_param = self._participant_participant_id_samples_get_serialize(
|
|
696
1540
|
participant_id=participant_id,
|
|
697
|
-
|
|
698
|
-
files=files,
|
|
699
|
-
texts=texts,
|
|
700
|
-
urls=urls,
|
|
1541
|
+
request=request,
|
|
701
1542
|
_request_auth=_request_auth,
|
|
702
1543
|
_content_type=_content_type,
|
|
703
1544
|
_headers=_headers,
|
|
@@ -705,7 +1546,7 @@ class ParticipantApi:
|
|
|
705
1546
|
)
|
|
706
1547
|
|
|
707
1548
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
708
|
-
'200':
|
|
1549
|
+
'200': "SampleByParticipantPagedResult",
|
|
709
1550
|
}
|
|
710
1551
|
response_data = self.api_client.call_api(
|
|
711
1552
|
*_param,
|
|
@@ -719,13 +1560,10 @@ class ParticipantApi:
|
|
|
719
1560
|
|
|
720
1561
|
|
|
721
1562
|
@validate_call
|
|
722
|
-
def
|
|
1563
|
+
def participant_participant_id_samples_get_without_preload_content(
|
|
723
1564
|
self,
|
|
724
|
-
participant_id:
|
|
725
|
-
|
|
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,
|
|
1565
|
+
participant_id: StrictStr,
|
|
1566
|
+
request: Optional[QueryModel] = None,
|
|
729
1567
|
_request_timeout: Union[
|
|
730
1568
|
None,
|
|
731
1569
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -739,19 +1577,13 @@ class ParticipantApi:
|
|
|
739
1577
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
740
1578
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
741
1579
|
) -> RESTResponseType:
|
|
742
|
-
"""
|
|
1580
|
+
"""Queries all samples of a participant.
|
|
743
1581
|
|
|
744
1582
|
|
|
745
|
-
:param participant_id:
|
|
1583
|
+
:param participant_id: (required)
|
|
746
1584
|
:type participant_id: str
|
|
747
|
-
:param
|
|
748
|
-
:type
|
|
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]
|
|
1585
|
+
:param request:
|
|
1586
|
+
:type request: QueryModel
|
|
755
1587
|
:param _request_timeout: timeout setting for this request. If one
|
|
756
1588
|
number provided, it will be total request
|
|
757
1589
|
timeout. It can also be a pair (tuple) of
|
|
@@ -774,12 +1606,9 @@ class ParticipantApi:
|
|
|
774
1606
|
:return: Returns the result object.
|
|
775
1607
|
""" # noqa: E501
|
|
776
1608
|
|
|
777
|
-
_param = self.
|
|
1609
|
+
_param = self._participant_participant_id_samples_get_serialize(
|
|
778
1610
|
participant_id=participant_id,
|
|
779
|
-
|
|
780
|
-
files=files,
|
|
781
|
-
texts=texts,
|
|
782
|
-
urls=urls,
|
|
1611
|
+
request=request,
|
|
783
1612
|
_request_auth=_request_auth,
|
|
784
1613
|
_content_type=_content_type,
|
|
785
1614
|
_headers=_headers,
|
|
@@ -787,7 +1616,7 @@ class ParticipantApi:
|
|
|
787
1616
|
)
|
|
788
1617
|
|
|
789
1618
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
790
|
-
'200':
|
|
1619
|
+
'200': "SampleByParticipantPagedResult",
|
|
791
1620
|
}
|
|
792
1621
|
response_data = self.api_client.call_api(
|
|
793
1622
|
*_param,
|
|
@@ -796,13 +1625,10 @@ class ParticipantApi:
|
|
|
796
1625
|
return response_data.response
|
|
797
1626
|
|
|
798
1627
|
|
|
799
|
-
def
|
|
1628
|
+
def _participant_participant_id_samples_get_serialize(
|
|
800
1629
|
self,
|
|
801
1630
|
participant_id,
|
|
802
|
-
|
|
803
|
-
files,
|
|
804
|
-
texts,
|
|
805
|
-
urls,
|
|
1631
|
+
request,
|
|
806
1632
|
_request_auth,
|
|
807
1633
|
_content_type,
|
|
808
1634
|
_headers,
|
|
@@ -812,9 +1638,6 @@ class ParticipantApi:
|
|
|
812
1638
|
_host = None
|
|
813
1639
|
|
|
814
1640
|
_collection_formats: Dict[str, str] = {
|
|
815
|
-
'files': 'multi',
|
|
816
|
-
'texts': 'multi',
|
|
817
|
-
'urls': 'multi',
|
|
818
1641
|
}
|
|
819
1642
|
|
|
820
1643
|
_path_params: Dict[str, str] = {}
|
|
@@ -830,33 +1653,25 @@ class ParticipantApi:
|
|
|
830
1653
|
if participant_id is not None:
|
|
831
1654
|
_path_params['participantId'] = participant_id
|
|
832
1655
|
# process the query parameters
|
|
1656
|
+
if request is not None:
|
|
1657
|
+
|
|
1658
|
+
_query_params.append(('request', request))
|
|
1659
|
+
|
|
833
1660
|
# process the header parameters
|
|
834
1661
|
# 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
1662
|
# process the body parameter
|
|
844
1663
|
|
|
845
1664
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
'multipart/form-data'
|
|
855
|
-
]
|
|
856
|
-
)
|
|
1665
|
+
# set the HTTP header `Accept`
|
|
1666
|
+
if 'Accept' not in _header_params:
|
|
1667
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1668
|
+
[
|
|
1669
|
+
'text/plain',
|
|
1670
|
+
'application/json',
|
|
1671
|
+
'text/json'
|
|
1672
|
+
]
|
|
857
1673
|
)
|
|
858
|
-
|
|
859
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1674
|
+
|
|
860
1675
|
|
|
861
1676
|
# authentication setting
|
|
862
1677
|
_auth_settings: List[str] = [
|
|
@@ -865,8 +1680,8 @@ class ParticipantApi:
|
|
|
865
1680
|
]
|
|
866
1681
|
|
|
867
1682
|
return self.api_client.param_serialize(
|
|
868
|
-
method='
|
|
869
|
-
resource_path='/participant/{participantId}/
|
|
1683
|
+
method='GET',
|
|
1684
|
+
resource_path='/participant/{participantId}/samples',
|
|
870
1685
|
path_params=_path_params,
|
|
871
1686
|
query_params=_query_params,
|
|
872
1687
|
header_params=_header_params,
|