rapidata 2.28.4__py3-none-any.whl → 2.29.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (108) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +44 -17
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/benchmark_api.py +2766 -0
  5. rapidata/api_client/api/campaign_api.py +0 -780
  6. rapidata/api_client/api/coco_api.py +0 -571
  7. rapidata/api_client/api/customer_rapid_api.py +332 -1
  8. rapidata/api_client/api/datapoint_api.py +0 -524
  9. rapidata/api_client/api/dataset_api.py +595 -2276
  10. rapidata/api_client/api/feedback_api.py +0 -270
  11. rapidata/api_client/api/identity_api.py +74 -888
  12. rapidata/api_client/api/leaderboard_api.py +1642 -259
  13. rapidata/api_client/api/order_api.py +617 -5692
  14. rapidata/api_client/api/pipeline_api.py +31 -334
  15. rapidata/api_client/api/validation_set_api.py +469 -3356
  16. rapidata/api_client/api/workflow_api.py +0 -799
  17. rapidata/api_client/models/__init__.py +43 -17
  18. rapidata/api_client/models/add_campaign_model.py +3 -3
  19. rapidata/api_client/models/add_validation_rapid_model.py +1 -3
  20. rapidata/api_client/models/add_validation_text_rapid_model.py +1 -3
  21. rapidata/api_client/models/and_user_filter_model.py +106 -0
  22. rapidata/api_client/models/and_user_filter_model_filters_inner.py +282 -0
  23. rapidata/api_client/models/benchmark_query_result.py +94 -0
  24. rapidata/api_client/models/benchmark_query_result_paged_result.py +105 -0
  25. rapidata/api_client/models/boost_leaderboard_model.py +89 -0
  26. rapidata/api_client/models/clone_order_model.py +2 -4
  27. rapidata/api_client/models/create_benchmark_model.py +87 -0
  28. rapidata/api_client/models/create_benchmark_participant_model.py +87 -0
  29. rapidata/api_client/models/create_benchmark_participant_result.py +89 -0
  30. rapidata/api_client/models/create_benchmark_result.py +87 -0
  31. rapidata/api_client/models/create_datapoint_result.py +4 -16
  32. rapidata/api_client/models/create_leaderboard_model.py +18 -2
  33. rapidata/api_client/models/create_leaderboard_result.py +5 -3
  34. rapidata/api_client/models/create_order_model.py +3 -3
  35. rapidata/api_client/models/file_asset_input.py +104 -0
  36. rapidata/api_client/models/file_asset_input1.py +104 -0
  37. rapidata/api_client/models/file_asset_input1_file.py +168 -0
  38. rapidata/api_client/models/file_asset_input2.py +104 -0
  39. rapidata/api_client/models/file_asset_input_file.py +182 -0
  40. rapidata/api_client/models/form_file_wrapper.py +120 -0
  41. rapidata/api_client/models/get_benchmark_by_id_query.py +96 -0
  42. rapidata/api_client/models/get_benchmark_by_id_query_result.py +94 -0
  43. rapidata/api_client/models/get_benchmark_by_id_query_result_paged_result.py +105 -0
  44. rapidata/api_client/models/get_benchmark_by_id_result.py +94 -0
  45. rapidata/api_client/models/get_participant_by_id_result.py +6 -22
  46. rapidata/api_client/models/get_standing_by_id_result.py +113 -0
  47. rapidata/api_client/models/get_validation_rapids_result.py +3 -3
  48. rapidata/api_client/models/get_workflow_results_result.py +3 -3
  49. rapidata/api_client/models/local_file_wrapper.py +120 -0
  50. rapidata/api_client/models/multi_asset_input.py +110 -0
  51. rapidata/api_client/models/multi_asset_input1.py +110 -0
  52. rapidata/api_client/models/multi_asset_input1_assets_inner.py +170 -0
  53. rapidata/api_client/models/multi_asset_input2.py +110 -0
  54. rapidata/api_client/models/multi_asset_input_assets_inner.py +170 -0
  55. rapidata/api_client/models/not_user_filter_model.py +3 -3
  56. rapidata/api_client/models/or_user_filter_model.py +3 -3
  57. rapidata/api_client/models/participant_by_benchmark.py +102 -0
  58. rapidata/api_client/models/participant_by_benchmark_paged_result.py +105 -0
  59. rapidata/api_client/models/participant_by_leaderboard.py +6 -2
  60. rapidata/api_client/models/participant_status.py +1 -4
  61. rapidata/api_client/models/pipeline_id_workflow_config_put_request.py +140 -0
  62. rapidata/api_client/models/potential_validation_rapid.py +103 -0
  63. rapidata/api_client/models/potential_validation_rapid_paged_result.py +105 -0
  64. rapidata/api_client/models/potential_validation_rapid_truth.py +280 -0
  65. rapidata/api_client/models/prompt_asset_metadata_input.py +3 -3
  66. rapidata/api_client/models/prompt_asset_metadata_input_asset.py +170 -0
  67. rapidata/api_client/models/prompt_by_benchmark_result.py +92 -0
  68. rapidata/api_client/models/prompt_by_benchmark_result_paged_result.py +105 -0
  69. rapidata/api_client/models/prompt_metadata_input.py +5 -3
  70. rapidata/api_client/models/proxy_file_wrapper.py +114 -0
  71. rapidata/api_client/models/query_validation_model.py +97 -0
  72. rapidata/api_client/models/rapid_model.py +3 -3
  73. rapidata/api_client/models/simple_workflow_config.py +3 -3
  74. rapidata/api_client/models/simple_workflow_model1.py +3 -3
  75. rapidata/api_client/models/standing_by_leaderboard.py +113 -0
  76. rapidata/api_client/models/standing_by_leaderboard_paged_result.py +105 -0
  77. rapidata/api_client/models/standing_status.py +38 -0
  78. rapidata/api_client/models/stream_file_wrapper.py +116 -0
  79. rapidata/api_client/models/submit_coco_model.py +1 -3
  80. rapidata/api_client/models/submit_prompt_model.py +89 -0
  81. rapidata/api_client/models/text_asset_input.py +100 -0
  82. rapidata/api_client/models/transcription_metadata_input.py +5 -3
  83. rapidata/api_client/models/validation_set_zip_post_request_blueprint.py +252 -0
  84. rapidata/api_client/models/zip_entry_file_wrapper.py +120 -0
  85. rapidata/api_client_README.md +67 -76
  86. rapidata/rapidata_client/benchmark/leaderboard/__init__.py +0 -0
  87. rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +62 -0
  88. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +227 -0
  89. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +83 -0
  90. rapidata/rapidata_client/filter/not_filter.py +2 -2
  91. rapidata/rapidata_client/filter/or_filter.py +2 -2
  92. rapidata/rapidata_client/metadata/__init__.py +1 -0
  93. rapidata/rapidata_client/metadata/_media_asset_metadata.py +8 -1
  94. rapidata/rapidata_client/metadata/_prompt_identifier_metadata.py +15 -0
  95. rapidata/rapidata_client/order/_rapidata_dataset.py +6 -6
  96. rapidata/rapidata_client/order/_rapidata_order_builder.py +4 -4
  97. rapidata/rapidata_client/order/rapidata_order.py +1 -1
  98. rapidata/rapidata_client/rapidata_client.py +3 -3
  99. rapidata/rapidata_client/validation/rapidata_validation_set.py +1 -1
  100. rapidata/rapidata_client/validation/rapids/rapids.py +4 -6
  101. rapidata/service/openapi_service.py +5 -0
  102. {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/METADATA +1 -1
  103. {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/RECORD +106 -57
  104. rapidata/rapidata_client/leaderboard/rapidata_leaderboard.py +0 -127
  105. rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py +0 -92
  106. /rapidata/rapidata_client/{leaderboard → benchmark}/__init__.py +0 -0
  107. {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/LICENSE +0 -0
  108. {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,2766 @@
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, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from rapidata.api_client.models.benchmark_query_result_paged_result import BenchmarkQueryResultPagedResult
23
+ from rapidata.api_client.models.create_benchmark_model import CreateBenchmarkModel
24
+ from rapidata.api_client.models.create_benchmark_participant_model import CreateBenchmarkParticipantModel
25
+ from rapidata.api_client.models.create_benchmark_participant_result import CreateBenchmarkParticipantResult
26
+ from rapidata.api_client.models.create_benchmark_result import CreateBenchmarkResult
27
+ from rapidata.api_client.models.get_benchmark_by_id_result import GetBenchmarkByIdResult
28
+ from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
29
+ from rapidata.api_client.models.participant_by_benchmark_paged_result import ParticipantByBenchmarkPagedResult
30
+ from rapidata.api_client.models.prompt_by_benchmark_result_paged_result import PromptByBenchmarkResultPagedResult
31
+ from rapidata.api_client.models.query_model import QueryModel
32
+ from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
33
+ from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
34
+
35
+ from rapidata.api_client.api_client import ApiClient, RequestSerialized
36
+ from rapidata.api_client.api_response import ApiResponse
37
+ from rapidata.api_client.rest import RESTResponseType
38
+
39
+
40
+ class BenchmarkApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, api_client=None) -> None:
48
+ if api_client is None:
49
+ api_client = ApiClient.get_default()
50
+ self.api_client = api_client
51
+
52
+
53
+ @validate_call
54
+ def benchmark_benchmark_id_delete(
55
+ self,
56
+ benchmark_id: StrictStr,
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Annotated[StrictFloat, Field(gt=0)]
63
+ ]
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> None:
70
+ """Deletes a single benchmark.
71
+
72
+
73
+ :param benchmark_id: (required)
74
+ :type benchmark_id: str
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._benchmark_benchmark_id_delete_serialize(
98
+ benchmark_id=benchmark_id,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '204': None,
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def benchmark_benchmark_id_delete_with_http_info(
121
+ self,
122
+ benchmark_id: StrictStr,
123
+ _request_timeout: Union[
124
+ None,
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Tuple[
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Annotated[StrictFloat, Field(gt=0)]
129
+ ]
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[None]:
136
+ """Deletes a single benchmark.
137
+
138
+
139
+ :param benchmark_id: (required)
140
+ :type benchmark_id: str
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._benchmark_benchmark_id_delete_serialize(
164
+ benchmark_id=benchmark_id,
165
+ _request_auth=_request_auth,
166
+ _content_type=_content_type,
167
+ _headers=_headers,
168
+ _host_index=_host_index
169
+ )
170
+
171
+ _response_types_map: Dict[str, Optional[str]] = {
172
+ '204': None,
173
+ }
174
+ response_data = self.api_client.call_api(
175
+ *_param,
176
+ _request_timeout=_request_timeout
177
+ )
178
+ response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+
185
+ @validate_call
186
+ def benchmark_benchmark_id_delete_without_preload_content(
187
+ self,
188
+ benchmark_id: StrictStr,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Deletes a single benchmark.
203
+
204
+
205
+ :param benchmark_id: (required)
206
+ :type benchmark_id: str
207
+ :param _request_timeout: timeout setting for this request. If one
208
+ number provided, it will be total request
209
+ timeout. It can also be a pair (tuple) of
210
+ (connection, read) timeouts.
211
+ :type _request_timeout: int, tuple(int, int), optional
212
+ :param _request_auth: set to override the auth_settings for an a single
213
+ request; this effectively ignores the
214
+ authentication in the spec for a single request.
215
+ :type _request_auth: dict, optional
216
+ :param _content_type: force content-type for the request.
217
+ :type _content_type: str, Optional
218
+ :param _headers: set to override the headers for a single
219
+ request; this effectively ignores the headers
220
+ in the spec for a single request.
221
+ :type _headers: dict, optional
222
+ :param _host_index: set to override the host_index for a single
223
+ request; this effectively ignores the host_index
224
+ in the spec for a single request.
225
+ :type _host_index: int, optional
226
+ :return: Returns the result object.
227
+ """ # noqa: E501
228
+
229
+ _param = self._benchmark_benchmark_id_delete_serialize(
230
+ benchmark_id=benchmark_id,
231
+ _request_auth=_request_auth,
232
+ _content_type=_content_type,
233
+ _headers=_headers,
234
+ _host_index=_host_index
235
+ )
236
+
237
+ _response_types_map: Dict[str, Optional[str]] = {
238
+ '204': None,
239
+ }
240
+ response_data = self.api_client.call_api(
241
+ *_param,
242
+ _request_timeout=_request_timeout
243
+ )
244
+ return response_data.response
245
+
246
+
247
+ def _benchmark_benchmark_id_delete_serialize(
248
+ self,
249
+ benchmark_id,
250
+ _request_auth,
251
+ _content_type,
252
+ _headers,
253
+ _host_index,
254
+ ) -> RequestSerialized:
255
+
256
+ _host = None
257
+
258
+ _collection_formats: Dict[str, str] = {
259
+ }
260
+
261
+ _path_params: Dict[str, str] = {}
262
+ _query_params: List[Tuple[str, str]] = []
263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
264
+ _form_params: List[Tuple[str, str]] = []
265
+ _files: Dict[
266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
267
+ ] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ if benchmark_id is not None:
272
+ _path_params['benchmarkId'] = benchmark_id
273
+ # process the query parameters
274
+ # process the header parameters
275
+ # process the form parameters
276
+ # process the body parameter
277
+
278
+
279
+
280
+
281
+ # authentication setting
282
+ _auth_settings: List[str] = [
283
+ 'bearer',
284
+ 'oauth2'
285
+ ]
286
+
287
+ return self.api_client.param_serialize(
288
+ method='DELETE',
289
+ resource_path='/benchmark/{benchmarkId}',
290
+ path_params=_path_params,
291
+ query_params=_query_params,
292
+ header_params=_header_params,
293
+ body=_body_params,
294
+ post_params=_form_params,
295
+ files=_files,
296
+ auth_settings=_auth_settings,
297
+ collection_formats=_collection_formats,
298
+ _host=_host,
299
+ _request_auth=_request_auth
300
+ )
301
+
302
+
303
+
304
+
305
+ @validate_call
306
+ def benchmark_benchmark_id_get(
307
+ self,
308
+ benchmark_id: StrictStr,
309
+ _request_timeout: Union[
310
+ None,
311
+ Annotated[StrictFloat, Field(gt=0)],
312
+ Tuple[
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Annotated[StrictFloat, Field(gt=0)]
315
+ ]
316
+ ] = None,
317
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
318
+ _content_type: Optional[StrictStr] = None,
319
+ _headers: Optional[Dict[StrictStr, Any]] = None,
320
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
321
+ ) -> GetBenchmarkByIdResult:
322
+ """Returns a single benchmark by its ID.
323
+
324
+
325
+ :param benchmark_id: (required)
326
+ :type benchmark_id: str
327
+ :param _request_timeout: timeout setting for this request. If one
328
+ number provided, it will be total request
329
+ timeout. It can also be a pair (tuple) of
330
+ (connection, read) timeouts.
331
+ :type _request_timeout: int, tuple(int, int), optional
332
+ :param _request_auth: set to override the auth_settings for an a single
333
+ request; this effectively ignores the
334
+ authentication in the spec for a single request.
335
+ :type _request_auth: dict, optional
336
+ :param _content_type: force content-type for the request.
337
+ :type _content_type: str, Optional
338
+ :param _headers: set to override the headers for a single
339
+ request; this effectively ignores the headers
340
+ in the spec for a single request.
341
+ :type _headers: dict, optional
342
+ :param _host_index: set to override the host_index for a single
343
+ request; this effectively ignores the host_index
344
+ in the spec for a single request.
345
+ :type _host_index: int, optional
346
+ :return: Returns the result object.
347
+ """ # noqa: E501
348
+
349
+ _param = self._benchmark_benchmark_id_get_serialize(
350
+ benchmark_id=benchmark_id,
351
+ _request_auth=_request_auth,
352
+ _content_type=_content_type,
353
+ _headers=_headers,
354
+ _host_index=_host_index
355
+ )
356
+
357
+ _response_types_map: Dict[str, Optional[str]] = {
358
+ '200': "GetBenchmarkByIdResult",
359
+ }
360
+ response_data = self.api_client.call_api(
361
+ *_param,
362
+ _request_timeout=_request_timeout
363
+ )
364
+ response_data.read()
365
+ return self.api_client.response_deserialize(
366
+ response_data=response_data,
367
+ response_types_map=_response_types_map,
368
+ ).data
369
+
370
+
371
+ @validate_call
372
+ def benchmark_benchmark_id_get_with_http_info(
373
+ self,
374
+ benchmark_id: StrictStr,
375
+ _request_timeout: Union[
376
+ None,
377
+ Annotated[StrictFloat, Field(gt=0)],
378
+ Tuple[
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Annotated[StrictFloat, Field(gt=0)]
381
+ ]
382
+ ] = None,
383
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
384
+ _content_type: Optional[StrictStr] = None,
385
+ _headers: Optional[Dict[StrictStr, Any]] = None,
386
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
387
+ ) -> ApiResponse[GetBenchmarkByIdResult]:
388
+ """Returns a single benchmark by its ID.
389
+
390
+
391
+ :param benchmark_id: (required)
392
+ :type benchmark_id: str
393
+ :param _request_timeout: timeout setting for this request. If one
394
+ number provided, it will be total request
395
+ timeout. It can also be a pair (tuple) of
396
+ (connection, read) timeouts.
397
+ :type _request_timeout: int, tuple(int, int), optional
398
+ :param _request_auth: set to override the auth_settings for an a single
399
+ request; this effectively ignores the
400
+ authentication in the spec for a single request.
401
+ :type _request_auth: dict, optional
402
+ :param _content_type: force content-type for the request.
403
+ :type _content_type: str, Optional
404
+ :param _headers: set to override the headers for a single
405
+ request; this effectively ignores the headers
406
+ in the spec for a single request.
407
+ :type _headers: dict, optional
408
+ :param _host_index: set to override the host_index for a single
409
+ request; this effectively ignores the host_index
410
+ in the spec for a single request.
411
+ :type _host_index: int, optional
412
+ :return: Returns the result object.
413
+ """ # noqa: E501
414
+
415
+ _param = self._benchmark_benchmark_id_get_serialize(
416
+ benchmark_id=benchmark_id,
417
+ _request_auth=_request_auth,
418
+ _content_type=_content_type,
419
+ _headers=_headers,
420
+ _host_index=_host_index
421
+ )
422
+
423
+ _response_types_map: Dict[str, Optional[str]] = {
424
+ '200': "GetBenchmarkByIdResult",
425
+ }
426
+ response_data = self.api_client.call_api(
427
+ *_param,
428
+ _request_timeout=_request_timeout
429
+ )
430
+ response_data.read()
431
+ return self.api_client.response_deserialize(
432
+ response_data=response_data,
433
+ response_types_map=_response_types_map,
434
+ )
435
+
436
+
437
+ @validate_call
438
+ def benchmark_benchmark_id_get_without_preload_content(
439
+ self,
440
+ benchmark_id: StrictStr,
441
+ _request_timeout: Union[
442
+ None,
443
+ Annotated[StrictFloat, Field(gt=0)],
444
+ Tuple[
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Annotated[StrictFloat, Field(gt=0)]
447
+ ]
448
+ ] = None,
449
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
450
+ _content_type: Optional[StrictStr] = None,
451
+ _headers: Optional[Dict[StrictStr, Any]] = None,
452
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
453
+ ) -> RESTResponseType:
454
+ """Returns a single benchmark by its ID.
455
+
456
+
457
+ :param benchmark_id: (required)
458
+ :type benchmark_id: str
459
+ :param _request_timeout: timeout setting for this request. If one
460
+ number provided, it will be total request
461
+ timeout. It can also be a pair (tuple) of
462
+ (connection, read) timeouts.
463
+ :type _request_timeout: int, tuple(int, int), optional
464
+ :param _request_auth: set to override the auth_settings for an a single
465
+ request; this effectively ignores the
466
+ authentication in the spec for a single request.
467
+ :type _request_auth: dict, optional
468
+ :param _content_type: force content-type for the request.
469
+ :type _content_type: str, Optional
470
+ :param _headers: set to override the headers for a single
471
+ request; this effectively ignores the headers
472
+ in the spec for a single request.
473
+ :type _headers: dict, optional
474
+ :param _host_index: set to override the host_index for a single
475
+ request; this effectively ignores the host_index
476
+ in the spec for a single request.
477
+ :type _host_index: int, optional
478
+ :return: Returns the result object.
479
+ """ # noqa: E501
480
+
481
+ _param = self._benchmark_benchmark_id_get_serialize(
482
+ benchmark_id=benchmark_id,
483
+ _request_auth=_request_auth,
484
+ _content_type=_content_type,
485
+ _headers=_headers,
486
+ _host_index=_host_index
487
+ )
488
+
489
+ _response_types_map: Dict[str, Optional[str]] = {
490
+ '200': "GetBenchmarkByIdResult",
491
+ }
492
+ response_data = self.api_client.call_api(
493
+ *_param,
494
+ _request_timeout=_request_timeout
495
+ )
496
+ return response_data.response
497
+
498
+
499
+ def _benchmark_benchmark_id_get_serialize(
500
+ self,
501
+ benchmark_id,
502
+ _request_auth,
503
+ _content_type,
504
+ _headers,
505
+ _host_index,
506
+ ) -> RequestSerialized:
507
+
508
+ _host = None
509
+
510
+ _collection_formats: Dict[str, str] = {
511
+ }
512
+
513
+ _path_params: Dict[str, str] = {}
514
+ _query_params: List[Tuple[str, str]] = []
515
+ _header_params: Dict[str, Optional[str]] = _headers or {}
516
+ _form_params: List[Tuple[str, str]] = []
517
+ _files: Dict[
518
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
519
+ ] = {}
520
+ _body_params: Optional[bytes] = None
521
+
522
+ # process the path parameters
523
+ if benchmark_id is not None:
524
+ _path_params['benchmarkId'] = benchmark_id
525
+ # process the query parameters
526
+ # process the header parameters
527
+ # process the form parameters
528
+ # process the body parameter
529
+
530
+
531
+ # set the HTTP header `Accept`
532
+ if 'Accept' not in _header_params:
533
+ _header_params['Accept'] = self.api_client.select_header_accept(
534
+ [
535
+ 'text/plain',
536
+ 'application/json',
537
+ 'text/json'
538
+ ]
539
+ )
540
+
541
+
542
+ # authentication setting
543
+ _auth_settings: List[str] = [
544
+ 'bearer',
545
+ 'oauth2'
546
+ ]
547
+
548
+ return self.api_client.param_serialize(
549
+ method='GET',
550
+ resource_path='/benchmark/{benchmarkId}',
551
+ path_params=_path_params,
552
+ query_params=_query_params,
553
+ header_params=_header_params,
554
+ body=_body_params,
555
+ post_params=_form_params,
556
+ files=_files,
557
+ auth_settings=_auth_settings,
558
+ collection_formats=_collection_formats,
559
+ _host=_host,
560
+ _request_auth=_request_auth
561
+ )
562
+
563
+
564
+
565
+
566
+ @validate_call
567
+ def benchmark_benchmark_id_participant_participant_id_get(
568
+ self,
569
+ benchmark_id: StrictStr,
570
+ participant_id: StrictStr,
571
+ _request_timeout: Union[
572
+ None,
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Tuple[
575
+ Annotated[StrictFloat, Field(gt=0)],
576
+ Annotated[StrictFloat, Field(gt=0)]
577
+ ]
578
+ ] = None,
579
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
580
+ _content_type: Optional[StrictStr] = None,
581
+ _headers: Optional[Dict[StrictStr, Any]] = None,
582
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
583
+ ) -> GetParticipantByIdResult:
584
+ """Gets a participant by it's Id.
585
+
586
+
587
+ :param benchmark_id: (required)
588
+ :type benchmark_id: str
589
+ :param participant_id: (required)
590
+ :type participant_id: 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._benchmark_benchmark_id_participant_participant_id_get_serialize(
614
+ benchmark_id=benchmark_id,
615
+ participant_id=participant_id,
616
+ _request_auth=_request_auth,
617
+ _content_type=_content_type,
618
+ _headers=_headers,
619
+ _host_index=_host_index
620
+ )
621
+
622
+ _response_types_map: Dict[str, Optional[str]] = {
623
+ '200': "GetParticipantByIdResult",
624
+ }
625
+ response_data = self.api_client.call_api(
626
+ *_param,
627
+ _request_timeout=_request_timeout
628
+ )
629
+ response_data.read()
630
+ return self.api_client.response_deserialize(
631
+ response_data=response_data,
632
+ response_types_map=_response_types_map,
633
+ ).data
634
+
635
+
636
+ @validate_call
637
+ def benchmark_benchmark_id_participant_participant_id_get_with_http_info(
638
+ self,
639
+ benchmark_id: StrictStr,
640
+ participant_id: StrictStr,
641
+ _request_timeout: Union[
642
+ None,
643
+ Annotated[StrictFloat, Field(gt=0)],
644
+ Tuple[
645
+ Annotated[StrictFloat, Field(gt=0)],
646
+ Annotated[StrictFloat, Field(gt=0)]
647
+ ]
648
+ ] = None,
649
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
650
+ _content_type: Optional[StrictStr] = None,
651
+ _headers: Optional[Dict[StrictStr, Any]] = None,
652
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
653
+ ) -> ApiResponse[GetParticipantByIdResult]:
654
+ """Gets a participant by it's Id.
655
+
656
+
657
+ :param benchmark_id: (required)
658
+ :type benchmark_id: str
659
+ :param participant_id: (required)
660
+ :type participant_id: str
661
+ :param _request_timeout: timeout setting for this request. If one
662
+ number provided, it will be total request
663
+ timeout. It can also be a pair (tuple) of
664
+ (connection, read) timeouts.
665
+ :type _request_timeout: int, tuple(int, int), optional
666
+ :param _request_auth: set to override the auth_settings for an a single
667
+ request; this effectively ignores the
668
+ authentication in the spec for a single request.
669
+ :type _request_auth: dict, optional
670
+ :param _content_type: force content-type for the request.
671
+ :type _content_type: str, Optional
672
+ :param _headers: set to override the headers for a single
673
+ request; this effectively ignores the headers
674
+ in the spec for a single request.
675
+ :type _headers: dict, optional
676
+ :param _host_index: set to override the host_index for a single
677
+ request; this effectively ignores the host_index
678
+ in the spec for a single request.
679
+ :type _host_index: int, optional
680
+ :return: Returns the result object.
681
+ """ # noqa: E501
682
+
683
+ _param = self._benchmark_benchmark_id_participant_participant_id_get_serialize(
684
+ benchmark_id=benchmark_id,
685
+ participant_id=participant_id,
686
+ _request_auth=_request_auth,
687
+ _content_type=_content_type,
688
+ _headers=_headers,
689
+ _host_index=_host_index
690
+ )
691
+
692
+ _response_types_map: Dict[str, Optional[str]] = {
693
+ '200': "GetParticipantByIdResult",
694
+ }
695
+ response_data = self.api_client.call_api(
696
+ *_param,
697
+ _request_timeout=_request_timeout
698
+ )
699
+ response_data.read()
700
+ return self.api_client.response_deserialize(
701
+ response_data=response_data,
702
+ response_types_map=_response_types_map,
703
+ )
704
+
705
+
706
+ @validate_call
707
+ def benchmark_benchmark_id_participant_participant_id_get_without_preload_content(
708
+ self,
709
+ benchmark_id: StrictStr,
710
+ participant_id: StrictStr,
711
+ _request_timeout: Union[
712
+ None,
713
+ Annotated[StrictFloat, Field(gt=0)],
714
+ Tuple[
715
+ Annotated[StrictFloat, Field(gt=0)],
716
+ Annotated[StrictFloat, Field(gt=0)]
717
+ ]
718
+ ] = None,
719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
720
+ _content_type: Optional[StrictStr] = None,
721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
+ ) -> RESTResponseType:
724
+ """Gets a participant by it's Id.
725
+
726
+
727
+ :param benchmark_id: (required)
728
+ :type benchmark_id: str
729
+ :param participant_id: (required)
730
+ :type participant_id: str
731
+ :param _request_timeout: timeout setting for this request. If one
732
+ number provided, it will be total request
733
+ timeout. It can also be a pair (tuple) of
734
+ (connection, read) timeouts.
735
+ :type _request_timeout: int, tuple(int, int), optional
736
+ :param _request_auth: set to override the auth_settings for an a single
737
+ request; this effectively ignores the
738
+ authentication in the spec for a single request.
739
+ :type _request_auth: dict, optional
740
+ :param _content_type: force content-type for the request.
741
+ :type _content_type: str, Optional
742
+ :param _headers: set to override the headers for a single
743
+ request; this effectively ignores the headers
744
+ in the spec for a single request.
745
+ :type _headers: dict, optional
746
+ :param _host_index: set to override the host_index for a single
747
+ request; this effectively ignores the host_index
748
+ in the spec for a single request.
749
+ :type _host_index: int, optional
750
+ :return: Returns the result object.
751
+ """ # noqa: E501
752
+
753
+ _param = self._benchmark_benchmark_id_participant_participant_id_get_serialize(
754
+ benchmark_id=benchmark_id,
755
+ participant_id=participant_id,
756
+ _request_auth=_request_auth,
757
+ _content_type=_content_type,
758
+ _headers=_headers,
759
+ _host_index=_host_index
760
+ )
761
+
762
+ _response_types_map: Dict[str, Optional[str]] = {
763
+ '200': "GetParticipantByIdResult",
764
+ }
765
+ response_data = self.api_client.call_api(
766
+ *_param,
767
+ _request_timeout=_request_timeout
768
+ )
769
+ return response_data.response
770
+
771
+
772
+ def _benchmark_benchmark_id_participant_participant_id_get_serialize(
773
+ self,
774
+ benchmark_id,
775
+ participant_id,
776
+ _request_auth,
777
+ _content_type,
778
+ _headers,
779
+ _host_index,
780
+ ) -> RequestSerialized:
781
+
782
+ _host = None
783
+
784
+ _collection_formats: Dict[str, str] = {
785
+ }
786
+
787
+ _path_params: Dict[str, str] = {}
788
+ _query_params: List[Tuple[str, str]] = []
789
+ _header_params: Dict[str, Optional[str]] = _headers or {}
790
+ _form_params: List[Tuple[str, str]] = []
791
+ _files: Dict[
792
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
793
+ ] = {}
794
+ _body_params: Optional[bytes] = None
795
+
796
+ # process the path parameters
797
+ if benchmark_id is not None:
798
+ _path_params['benchmarkId'] = benchmark_id
799
+ if participant_id is not None:
800
+ _path_params['participantId'] = participant_id
801
+ # process the query parameters
802
+ # process the header parameters
803
+ # process the form parameters
804
+ # process the body parameter
805
+
806
+
807
+ # set the HTTP header `Accept`
808
+ if 'Accept' not in _header_params:
809
+ _header_params['Accept'] = self.api_client.select_header_accept(
810
+ [
811
+ 'text/plain',
812
+ 'application/json',
813
+ 'text/json'
814
+ ]
815
+ )
816
+
817
+
818
+ # authentication setting
819
+ _auth_settings: List[str] = [
820
+ 'bearer',
821
+ 'oauth2'
822
+ ]
823
+
824
+ return self.api_client.param_serialize(
825
+ method='GET',
826
+ resource_path='/benchmark/{benchmarkId}/participant/{participantId}',
827
+ path_params=_path_params,
828
+ query_params=_query_params,
829
+ header_params=_header_params,
830
+ body=_body_params,
831
+ post_params=_form_params,
832
+ files=_files,
833
+ auth_settings=_auth_settings,
834
+ collection_formats=_collection_formats,
835
+ _host=_host,
836
+ _request_auth=_request_auth
837
+ )
838
+
839
+
840
+
841
+
842
+ @validate_call
843
+ def benchmark_benchmark_id_participants_get(
844
+ self,
845
+ benchmark_id: StrictStr,
846
+ _request_timeout: Union[
847
+ None,
848
+ Annotated[StrictFloat, Field(gt=0)],
849
+ Tuple[
850
+ Annotated[StrictFloat, Field(gt=0)],
851
+ Annotated[StrictFloat, Field(gt=0)]
852
+ ]
853
+ ] = None,
854
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
855
+ _content_type: Optional[StrictStr] = None,
856
+ _headers: Optional[Dict[StrictStr, Any]] = None,
857
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
858
+ ) -> ParticipantByBenchmarkPagedResult:
859
+ """Query all participants within a benchmark
860
+
861
+
862
+ :param benchmark_id: (required)
863
+ :type benchmark_id: str
864
+ :param _request_timeout: timeout setting for this request. If one
865
+ number provided, it will be total request
866
+ timeout. It can also be a pair (tuple) of
867
+ (connection, read) timeouts.
868
+ :type _request_timeout: int, tuple(int, int), optional
869
+ :param _request_auth: set to override the auth_settings for an a single
870
+ request; this effectively ignores the
871
+ authentication in the spec for a single request.
872
+ :type _request_auth: dict, optional
873
+ :param _content_type: force content-type for the request.
874
+ :type _content_type: str, Optional
875
+ :param _headers: set to override the headers for a single
876
+ request; this effectively ignores the headers
877
+ in the spec for a single request.
878
+ :type _headers: dict, optional
879
+ :param _host_index: set to override the host_index for a single
880
+ request; this effectively ignores the host_index
881
+ in the spec for a single request.
882
+ :type _host_index: int, optional
883
+ :return: Returns the result object.
884
+ """ # noqa: E501
885
+
886
+ _param = self._benchmark_benchmark_id_participants_get_serialize(
887
+ benchmark_id=benchmark_id,
888
+ _request_auth=_request_auth,
889
+ _content_type=_content_type,
890
+ _headers=_headers,
891
+ _host_index=_host_index
892
+ )
893
+
894
+ _response_types_map: Dict[str, Optional[str]] = {
895
+ '200': "ParticipantByBenchmarkPagedResult",
896
+ }
897
+ response_data = self.api_client.call_api(
898
+ *_param,
899
+ _request_timeout=_request_timeout
900
+ )
901
+ response_data.read()
902
+ return self.api_client.response_deserialize(
903
+ response_data=response_data,
904
+ response_types_map=_response_types_map,
905
+ ).data
906
+
907
+
908
+ @validate_call
909
+ def benchmark_benchmark_id_participants_get_with_http_info(
910
+ self,
911
+ benchmark_id: StrictStr,
912
+ _request_timeout: Union[
913
+ None,
914
+ Annotated[StrictFloat, Field(gt=0)],
915
+ Tuple[
916
+ Annotated[StrictFloat, Field(gt=0)],
917
+ Annotated[StrictFloat, Field(gt=0)]
918
+ ]
919
+ ] = None,
920
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
921
+ _content_type: Optional[StrictStr] = None,
922
+ _headers: Optional[Dict[StrictStr, Any]] = None,
923
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
924
+ ) -> ApiResponse[ParticipantByBenchmarkPagedResult]:
925
+ """Query all participants within a benchmark
926
+
927
+
928
+ :param benchmark_id: (required)
929
+ :type benchmark_id: str
930
+ :param _request_timeout: timeout setting for this request. If one
931
+ number provided, it will be total request
932
+ timeout. It can also be a pair (tuple) of
933
+ (connection, read) timeouts.
934
+ :type _request_timeout: int, tuple(int, int), optional
935
+ :param _request_auth: set to override the auth_settings for an a single
936
+ request; this effectively ignores the
937
+ authentication in the spec for a single request.
938
+ :type _request_auth: dict, optional
939
+ :param _content_type: force content-type for the request.
940
+ :type _content_type: str, Optional
941
+ :param _headers: set to override the headers for a single
942
+ request; this effectively ignores the headers
943
+ in the spec for a single request.
944
+ :type _headers: dict, optional
945
+ :param _host_index: set to override the host_index for a single
946
+ request; this effectively ignores the host_index
947
+ in the spec for a single request.
948
+ :type _host_index: int, optional
949
+ :return: Returns the result object.
950
+ """ # noqa: E501
951
+
952
+ _param = self._benchmark_benchmark_id_participants_get_serialize(
953
+ benchmark_id=benchmark_id,
954
+ _request_auth=_request_auth,
955
+ _content_type=_content_type,
956
+ _headers=_headers,
957
+ _host_index=_host_index
958
+ )
959
+
960
+ _response_types_map: Dict[str, Optional[str]] = {
961
+ '200': "ParticipantByBenchmarkPagedResult",
962
+ }
963
+ response_data = self.api_client.call_api(
964
+ *_param,
965
+ _request_timeout=_request_timeout
966
+ )
967
+ response_data.read()
968
+ return self.api_client.response_deserialize(
969
+ response_data=response_data,
970
+ response_types_map=_response_types_map,
971
+ )
972
+
973
+
974
+ @validate_call
975
+ def benchmark_benchmark_id_participants_get_without_preload_content(
976
+ self,
977
+ benchmark_id: StrictStr,
978
+ _request_timeout: Union[
979
+ None,
980
+ Annotated[StrictFloat, Field(gt=0)],
981
+ Tuple[
982
+ Annotated[StrictFloat, Field(gt=0)],
983
+ Annotated[StrictFloat, Field(gt=0)]
984
+ ]
985
+ ] = None,
986
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
987
+ _content_type: Optional[StrictStr] = None,
988
+ _headers: Optional[Dict[StrictStr, Any]] = None,
989
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
990
+ ) -> RESTResponseType:
991
+ """Query all participants within a benchmark
992
+
993
+
994
+ :param benchmark_id: (required)
995
+ :type benchmark_id: str
996
+ :param _request_timeout: timeout setting for this request. If one
997
+ number provided, it will be total request
998
+ timeout. It can also be a pair (tuple) of
999
+ (connection, read) timeouts.
1000
+ :type _request_timeout: int, tuple(int, int), optional
1001
+ :param _request_auth: set to override the auth_settings for an a single
1002
+ request; this effectively ignores the
1003
+ authentication in the spec for a single request.
1004
+ :type _request_auth: dict, optional
1005
+ :param _content_type: force content-type for the request.
1006
+ :type _content_type: str, Optional
1007
+ :param _headers: set to override the headers for a single
1008
+ request; this effectively ignores the headers
1009
+ in the spec for a single request.
1010
+ :type _headers: dict, optional
1011
+ :param _host_index: set to override the host_index for a single
1012
+ request; this effectively ignores the host_index
1013
+ in the spec for a single request.
1014
+ :type _host_index: int, optional
1015
+ :return: Returns the result object.
1016
+ """ # noqa: E501
1017
+
1018
+ _param = self._benchmark_benchmark_id_participants_get_serialize(
1019
+ benchmark_id=benchmark_id,
1020
+ _request_auth=_request_auth,
1021
+ _content_type=_content_type,
1022
+ _headers=_headers,
1023
+ _host_index=_host_index
1024
+ )
1025
+
1026
+ _response_types_map: Dict[str, Optional[str]] = {
1027
+ '200': "ParticipantByBenchmarkPagedResult",
1028
+ }
1029
+ response_data = self.api_client.call_api(
1030
+ *_param,
1031
+ _request_timeout=_request_timeout
1032
+ )
1033
+ return response_data.response
1034
+
1035
+
1036
+ def _benchmark_benchmark_id_participants_get_serialize(
1037
+ self,
1038
+ benchmark_id,
1039
+ _request_auth,
1040
+ _content_type,
1041
+ _headers,
1042
+ _host_index,
1043
+ ) -> RequestSerialized:
1044
+
1045
+ _host = None
1046
+
1047
+ _collection_formats: Dict[str, str] = {
1048
+ }
1049
+
1050
+ _path_params: Dict[str, str] = {}
1051
+ _query_params: List[Tuple[str, str]] = []
1052
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1053
+ _form_params: List[Tuple[str, str]] = []
1054
+ _files: Dict[
1055
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1056
+ ] = {}
1057
+ _body_params: Optional[bytes] = None
1058
+
1059
+ # process the path parameters
1060
+ if benchmark_id is not None:
1061
+ _path_params['benchmarkId'] = benchmark_id
1062
+ # process the query parameters
1063
+ # process the header parameters
1064
+ # process the form parameters
1065
+ # process the body parameter
1066
+
1067
+
1068
+ # set the HTTP header `Accept`
1069
+ if 'Accept' not in _header_params:
1070
+ _header_params['Accept'] = self.api_client.select_header_accept(
1071
+ [
1072
+ 'text/plain',
1073
+ 'application/json',
1074
+ 'text/json'
1075
+ ]
1076
+ )
1077
+
1078
+
1079
+ # authentication setting
1080
+ _auth_settings: List[str] = [
1081
+ 'bearer',
1082
+ 'oauth2'
1083
+ ]
1084
+
1085
+ return self.api_client.param_serialize(
1086
+ method='GET',
1087
+ resource_path='/benchmark/{benchmarkId}/participants',
1088
+ path_params=_path_params,
1089
+ query_params=_query_params,
1090
+ header_params=_header_params,
1091
+ body=_body_params,
1092
+ post_params=_form_params,
1093
+ files=_files,
1094
+ auth_settings=_auth_settings,
1095
+ collection_formats=_collection_formats,
1096
+ _host=_host,
1097
+ _request_auth=_request_auth
1098
+ )
1099
+
1100
+
1101
+
1102
+
1103
+ @validate_call
1104
+ def benchmark_benchmark_id_participants_participant_id_submit_post(
1105
+ self,
1106
+ benchmark_id: StrictStr,
1107
+ participant_id: StrictStr,
1108
+ _request_timeout: Union[
1109
+ None,
1110
+ Annotated[StrictFloat, Field(gt=0)],
1111
+ Tuple[
1112
+ Annotated[StrictFloat, Field(gt=0)],
1113
+ Annotated[StrictFloat, Field(gt=0)]
1114
+ ]
1115
+ ] = None,
1116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1117
+ _content_type: Optional[StrictStr] = None,
1118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1120
+ ) -> SubmitParticipantResult:
1121
+ """Submits a participant to a benchmark.
1122
+
1123
+
1124
+ :param benchmark_id: (required)
1125
+ :type benchmark_id: str
1126
+ :param participant_id: (required)
1127
+ :type participant_id: str
1128
+ :param _request_timeout: timeout setting for this request. If one
1129
+ number provided, it will be total request
1130
+ timeout. It can also be a pair (tuple) of
1131
+ (connection, read) timeouts.
1132
+ :type _request_timeout: int, tuple(int, int), optional
1133
+ :param _request_auth: set to override the auth_settings for an a single
1134
+ request; this effectively ignores the
1135
+ authentication in the spec for a single request.
1136
+ :type _request_auth: dict, optional
1137
+ :param _content_type: force content-type for the request.
1138
+ :type _content_type: str, Optional
1139
+ :param _headers: set to override the headers for a single
1140
+ request; this effectively ignores the headers
1141
+ in the spec for a single request.
1142
+ :type _headers: dict, optional
1143
+ :param _host_index: set to override the host_index for a single
1144
+ request; this effectively ignores the host_index
1145
+ in the spec for a single request.
1146
+ :type _host_index: int, optional
1147
+ :return: Returns the result object.
1148
+ """ # noqa: E501
1149
+
1150
+ _param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
1151
+ benchmark_id=benchmark_id,
1152
+ participant_id=participant_id,
1153
+ _request_auth=_request_auth,
1154
+ _content_type=_content_type,
1155
+ _headers=_headers,
1156
+ _host_index=_host_index
1157
+ )
1158
+
1159
+ _response_types_map: Dict[str, Optional[str]] = {
1160
+ '200': "SubmitParticipantResult",
1161
+ }
1162
+ response_data = self.api_client.call_api(
1163
+ *_param,
1164
+ _request_timeout=_request_timeout
1165
+ )
1166
+ response_data.read()
1167
+ return self.api_client.response_deserialize(
1168
+ response_data=response_data,
1169
+ response_types_map=_response_types_map,
1170
+ ).data
1171
+
1172
+
1173
+ @validate_call
1174
+ def benchmark_benchmark_id_participants_participant_id_submit_post_with_http_info(
1175
+ self,
1176
+ benchmark_id: StrictStr,
1177
+ participant_id: StrictStr,
1178
+ _request_timeout: Union[
1179
+ None,
1180
+ Annotated[StrictFloat, Field(gt=0)],
1181
+ Tuple[
1182
+ Annotated[StrictFloat, Field(gt=0)],
1183
+ Annotated[StrictFloat, Field(gt=0)]
1184
+ ]
1185
+ ] = None,
1186
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1187
+ _content_type: Optional[StrictStr] = None,
1188
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1189
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1190
+ ) -> ApiResponse[SubmitParticipantResult]:
1191
+ """Submits a participant to a benchmark.
1192
+
1193
+
1194
+ :param benchmark_id: (required)
1195
+ :type benchmark_id: str
1196
+ :param participant_id: (required)
1197
+ :type participant_id: str
1198
+ :param _request_timeout: timeout setting for this request. If one
1199
+ number provided, it will be total request
1200
+ timeout. It can also be a pair (tuple) of
1201
+ (connection, read) timeouts.
1202
+ :type _request_timeout: int, tuple(int, int), optional
1203
+ :param _request_auth: set to override the auth_settings for an a single
1204
+ request; this effectively ignores the
1205
+ authentication in the spec for a single request.
1206
+ :type _request_auth: dict, optional
1207
+ :param _content_type: force content-type for the request.
1208
+ :type _content_type: str, Optional
1209
+ :param _headers: set to override the headers for a single
1210
+ request; this effectively ignores the headers
1211
+ in the spec for a single request.
1212
+ :type _headers: dict, optional
1213
+ :param _host_index: set to override the host_index for a single
1214
+ request; this effectively ignores the host_index
1215
+ in the spec for a single request.
1216
+ :type _host_index: int, optional
1217
+ :return: Returns the result object.
1218
+ """ # noqa: E501
1219
+
1220
+ _param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
1221
+ benchmark_id=benchmark_id,
1222
+ participant_id=participant_id,
1223
+ _request_auth=_request_auth,
1224
+ _content_type=_content_type,
1225
+ _headers=_headers,
1226
+ _host_index=_host_index
1227
+ )
1228
+
1229
+ _response_types_map: Dict[str, Optional[str]] = {
1230
+ '200': "SubmitParticipantResult",
1231
+ }
1232
+ response_data = self.api_client.call_api(
1233
+ *_param,
1234
+ _request_timeout=_request_timeout
1235
+ )
1236
+ response_data.read()
1237
+ return self.api_client.response_deserialize(
1238
+ response_data=response_data,
1239
+ response_types_map=_response_types_map,
1240
+ )
1241
+
1242
+
1243
+ @validate_call
1244
+ def benchmark_benchmark_id_participants_participant_id_submit_post_without_preload_content(
1245
+ self,
1246
+ benchmark_id: StrictStr,
1247
+ participant_id: StrictStr,
1248
+ _request_timeout: Union[
1249
+ None,
1250
+ Annotated[StrictFloat, Field(gt=0)],
1251
+ Tuple[
1252
+ Annotated[StrictFloat, Field(gt=0)],
1253
+ Annotated[StrictFloat, Field(gt=0)]
1254
+ ]
1255
+ ] = None,
1256
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1257
+ _content_type: Optional[StrictStr] = None,
1258
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1259
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1260
+ ) -> RESTResponseType:
1261
+ """Submits a participant to a benchmark.
1262
+
1263
+
1264
+ :param benchmark_id: (required)
1265
+ :type benchmark_id: str
1266
+ :param participant_id: (required)
1267
+ :type participant_id: str
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
1291
+ benchmark_id=benchmark_id,
1292
+ participant_id=participant_id,
1293
+ _request_auth=_request_auth,
1294
+ _content_type=_content_type,
1295
+ _headers=_headers,
1296
+ _host_index=_host_index
1297
+ )
1298
+
1299
+ _response_types_map: Dict[str, Optional[str]] = {
1300
+ '200': "SubmitParticipantResult",
1301
+ }
1302
+ response_data = self.api_client.call_api(
1303
+ *_param,
1304
+ _request_timeout=_request_timeout
1305
+ )
1306
+ return response_data.response
1307
+
1308
+
1309
+ def _benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
1310
+ self,
1311
+ benchmark_id,
1312
+ participant_id,
1313
+ _request_auth,
1314
+ _content_type,
1315
+ _headers,
1316
+ _host_index,
1317
+ ) -> RequestSerialized:
1318
+
1319
+ _host = None
1320
+
1321
+ _collection_formats: Dict[str, str] = {
1322
+ }
1323
+
1324
+ _path_params: Dict[str, str] = {}
1325
+ _query_params: List[Tuple[str, str]] = []
1326
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1327
+ _form_params: List[Tuple[str, str]] = []
1328
+ _files: Dict[
1329
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1330
+ ] = {}
1331
+ _body_params: Optional[bytes] = None
1332
+
1333
+ # process the path parameters
1334
+ if benchmark_id is not None:
1335
+ _path_params['benchmarkId'] = benchmark_id
1336
+ if participant_id is not None:
1337
+ _path_params['participantId'] = participant_id
1338
+ # process the query parameters
1339
+ # process the header parameters
1340
+ # process the form parameters
1341
+ # process the body parameter
1342
+
1343
+
1344
+ # set the HTTP header `Accept`
1345
+ if 'Accept' not in _header_params:
1346
+ _header_params['Accept'] = self.api_client.select_header_accept(
1347
+ [
1348
+ 'text/plain',
1349
+ 'application/json',
1350
+ 'text/json'
1351
+ ]
1352
+ )
1353
+
1354
+
1355
+ # authentication setting
1356
+ _auth_settings: List[str] = [
1357
+ 'bearer',
1358
+ 'oauth2'
1359
+ ]
1360
+
1361
+ return self.api_client.param_serialize(
1362
+ method='POST',
1363
+ resource_path='/benchmark/{benchmarkId}/participants/{participantId}/submit',
1364
+ path_params=_path_params,
1365
+ query_params=_query_params,
1366
+ header_params=_header_params,
1367
+ body=_body_params,
1368
+ post_params=_form_params,
1369
+ files=_files,
1370
+ auth_settings=_auth_settings,
1371
+ collection_formats=_collection_formats,
1372
+ _host=_host,
1373
+ _request_auth=_request_auth
1374
+ )
1375
+
1376
+
1377
+
1378
+
1379
+ @validate_call
1380
+ def benchmark_benchmark_id_participants_post(
1381
+ self,
1382
+ benchmark_id: StrictStr,
1383
+ create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
1384
+ _request_timeout: Union[
1385
+ None,
1386
+ Annotated[StrictFloat, Field(gt=0)],
1387
+ Tuple[
1388
+ Annotated[StrictFloat, Field(gt=0)],
1389
+ Annotated[StrictFloat, Field(gt=0)]
1390
+ ]
1391
+ ] = None,
1392
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1393
+ _content_type: Optional[StrictStr] = None,
1394
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1395
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1396
+ ) -> CreateBenchmarkParticipantResult:
1397
+ """Creates a participant in a benchmark.
1398
+
1399
+
1400
+ :param benchmark_id: (required)
1401
+ :type benchmark_id: str
1402
+ :param create_benchmark_participant_model:
1403
+ :type create_benchmark_participant_model: CreateBenchmarkParticipantModel
1404
+ :param _request_timeout: timeout setting for this request. If one
1405
+ number provided, it will be total request
1406
+ timeout. It can also be a pair (tuple) of
1407
+ (connection, read) timeouts.
1408
+ :type _request_timeout: int, tuple(int, int), optional
1409
+ :param _request_auth: set to override the auth_settings for an a single
1410
+ request; this effectively ignores the
1411
+ authentication in the spec for a single request.
1412
+ :type _request_auth: dict, optional
1413
+ :param _content_type: force content-type for the request.
1414
+ :type _content_type: str, Optional
1415
+ :param _headers: set to override the headers for a single
1416
+ request; this effectively ignores the headers
1417
+ in the spec for a single request.
1418
+ :type _headers: dict, optional
1419
+ :param _host_index: set to override the host_index for a single
1420
+ request; this effectively ignores the host_index
1421
+ in the spec for a single request.
1422
+ :type _host_index: int, optional
1423
+ :return: Returns the result object.
1424
+ """ # noqa: E501
1425
+
1426
+ _param = self._benchmark_benchmark_id_participants_post_serialize(
1427
+ benchmark_id=benchmark_id,
1428
+ create_benchmark_participant_model=create_benchmark_participant_model,
1429
+ _request_auth=_request_auth,
1430
+ _content_type=_content_type,
1431
+ _headers=_headers,
1432
+ _host_index=_host_index
1433
+ )
1434
+
1435
+ _response_types_map: Dict[str, Optional[str]] = {
1436
+ '200': "CreateBenchmarkParticipantResult",
1437
+ }
1438
+ response_data = self.api_client.call_api(
1439
+ *_param,
1440
+ _request_timeout=_request_timeout
1441
+ )
1442
+ response_data.read()
1443
+ return self.api_client.response_deserialize(
1444
+ response_data=response_data,
1445
+ response_types_map=_response_types_map,
1446
+ ).data
1447
+
1448
+
1449
+ @validate_call
1450
+ def benchmark_benchmark_id_participants_post_with_http_info(
1451
+ self,
1452
+ benchmark_id: StrictStr,
1453
+ create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
1454
+ _request_timeout: Union[
1455
+ None,
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Tuple[
1458
+ Annotated[StrictFloat, Field(gt=0)],
1459
+ Annotated[StrictFloat, Field(gt=0)]
1460
+ ]
1461
+ ] = None,
1462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1463
+ _content_type: Optional[StrictStr] = None,
1464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1466
+ ) -> ApiResponse[CreateBenchmarkParticipantResult]:
1467
+ """Creates a participant in a benchmark.
1468
+
1469
+
1470
+ :param benchmark_id: (required)
1471
+ :type benchmark_id: str
1472
+ :param create_benchmark_participant_model:
1473
+ :type create_benchmark_participant_model: CreateBenchmarkParticipantModel
1474
+ :param _request_timeout: timeout setting for this request. If one
1475
+ number provided, it will be total request
1476
+ timeout. It can also be a pair (tuple) of
1477
+ (connection, read) timeouts.
1478
+ :type _request_timeout: int, tuple(int, int), optional
1479
+ :param _request_auth: set to override the auth_settings for an a single
1480
+ request; this effectively ignores the
1481
+ authentication in the spec for a single request.
1482
+ :type _request_auth: dict, optional
1483
+ :param _content_type: force content-type for the request.
1484
+ :type _content_type: str, Optional
1485
+ :param _headers: set to override the headers for a single
1486
+ request; this effectively ignores the headers
1487
+ in the spec for a single request.
1488
+ :type _headers: dict, optional
1489
+ :param _host_index: set to override the host_index for a single
1490
+ request; this effectively ignores the host_index
1491
+ in the spec for a single request.
1492
+ :type _host_index: int, optional
1493
+ :return: Returns the result object.
1494
+ """ # noqa: E501
1495
+
1496
+ _param = self._benchmark_benchmark_id_participants_post_serialize(
1497
+ benchmark_id=benchmark_id,
1498
+ create_benchmark_participant_model=create_benchmark_participant_model,
1499
+ _request_auth=_request_auth,
1500
+ _content_type=_content_type,
1501
+ _headers=_headers,
1502
+ _host_index=_host_index
1503
+ )
1504
+
1505
+ _response_types_map: Dict[str, Optional[str]] = {
1506
+ '200': "CreateBenchmarkParticipantResult",
1507
+ }
1508
+ response_data = self.api_client.call_api(
1509
+ *_param,
1510
+ _request_timeout=_request_timeout
1511
+ )
1512
+ response_data.read()
1513
+ return self.api_client.response_deserialize(
1514
+ response_data=response_data,
1515
+ response_types_map=_response_types_map,
1516
+ )
1517
+
1518
+
1519
+ @validate_call
1520
+ def benchmark_benchmark_id_participants_post_without_preload_content(
1521
+ self,
1522
+ benchmark_id: StrictStr,
1523
+ create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
1524
+ _request_timeout: Union[
1525
+ None,
1526
+ Annotated[StrictFloat, Field(gt=0)],
1527
+ Tuple[
1528
+ Annotated[StrictFloat, Field(gt=0)],
1529
+ Annotated[StrictFloat, Field(gt=0)]
1530
+ ]
1531
+ ] = None,
1532
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1533
+ _content_type: Optional[StrictStr] = None,
1534
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1535
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1536
+ ) -> RESTResponseType:
1537
+ """Creates a participant in a benchmark.
1538
+
1539
+
1540
+ :param benchmark_id: (required)
1541
+ :type benchmark_id: str
1542
+ :param create_benchmark_participant_model:
1543
+ :type create_benchmark_participant_model: CreateBenchmarkParticipantModel
1544
+ :param _request_timeout: timeout setting for this request. If one
1545
+ number provided, it will be total request
1546
+ timeout. It can also be a pair (tuple) of
1547
+ (connection, read) timeouts.
1548
+ :type _request_timeout: int, tuple(int, int), optional
1549
+ :param _request_auth: set to override the auth_settings for an a single
1550
+ request; this effectively ignores the
1551
+ authentication in the spec for a single request.
1552
+ :type _request_auth: dict, optional
1553
+ :param _content_type: force content-type for the request.
1554
+ :type _content_type: str, Optional
1555
+ :param _headers: set to override the headers for a single
1556
+ request; this effectively ignores the headers
1557
+ in the spec for a single request.
1558
+ :type _headers: dict, optional
1559
+ :param _host_index: set to override the host_index for a single
1560
+ request; this effectively ignores the host_index
1561
+ in the spec for a single request.
1562
+ :type _host_index: int, optional
1563
+ :return: Returns the result object.
1564
+ """ # noqa: E501
1565
+
1566
+ _param = self._benchmark_benchmark_id_participants_post_serialize(
1567
+ benchmark_id=benchmark_id,
1568
+ create_benchmark_participant_model=create_benchmark_participant_model,
1569
+ _request_auth=_request_auth,
1570
+ _content_type=_content_type,
1571
+ _headers=_headers,
1572
+ _host_index=_host_index
1573
+ )
1574
+
1575
+ _response_types_map: Dict[str, Optional[str]] = {
1576
+ '200': "CreateBenchmarkParticipantResult",
1577
+ }
1578
+ response_data = self.api_client.call_api(
1579
+ *_param,
1580
+ _request_timeout=_request_timeout
1581
+ )
1582
+ return response_data.response
1583
+
1584
+
1585
+ def _benchmark_benchmark_id_participants_post_serialize(
1586
+ self,
1587
+ benchmark_id,
1588
+ create_benchmark_participant_model,
1589
+ _request_auth,
1590
+ _content_type,
1591
+ _headers,
1592
+ _host_index,
1593
+ ) -> RequestSerialized:
1594
+
1595
+ _host = None
1596
+
1597
+ _collection_formats: Dict[str, str] = {
1598
+ }
1599
+
1600
+ _path_params: Dict[str, str] = {}
1601
+ _query_params: List[Tuple[str, str]] = []
1602
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1603
+ _form_params: List[Tuple[str, str]] = []
1604
+ _files: Dict[
1605
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1606
+ ] = {}
1607
+ _body_params: Optional[bytes] = None
1608
+
1609
+ # process the path parameters
1610
+ if benchmark_id is not None:
1611
+ _path_params['benchmarkId'] = benchmark_id
1612
+ # process the query parameters
1613
+ # process the header parameters
1614
+ # process the form parameters
1615
+ # process the body parameter
1616
+ if create_benchmark_participant_model is not None:
1617
+ _body_params = create_benchmark_participant_model
1618
+
1619
+
1620
+ # set the HTTP header `Accept`
1621
+ if 'Accept' not in _header_params:
1622
+ _header_params['Accept'] = self.api_client.select_header_accept(
1623
+ [
1624
+ 'text/plain',
1625
+ 'application/json',
1626
+ 'text/json'
1627
+ ]
1628
+ )
1629
+
1630
+ # set the HTTP header `Content-Type`
1631
+ if _content_type:
1632
+ _header_params['Content-Type'] = _content_type
1633
+ else:
1634
+ _default_content_type = (
1635
+ self.api_client.select_header_content_type(
1636
+ [
1637
+ 'application/json',
1638
+ 'text/json',
1639
+ 'application/*+json'
1640
+ ]
1641
+ )
1642
+ )
1643
+ if _default_content_type is not None:
1644
+ _header_params['Content-Type'] = _default_content_type
1645
+
1646
+ # authentication setting
1647
+ _auth_settings: List[str] = [
1648
+ 'bearer',
1649
+ 'oauth2'
1650
+ ]
1651
+
1652
+ return self.api_client.param_serialize(
1653
+ method='POST',
1654
+ resource_path='/benchmark/{benchmarkId}/participants',
1655
+ path_params=_path_params,
1656
+ query_params=_query_params,
1657
+ header_params=_header_params,
1658
+ body=_body_params,
1659
+ post_params=_form_params,
1660
+ files=_files,
1661
+ auth_settings=_auth_settings,
1662
+ collection_formats=_collection_formats,
1663
+ _host=_host,
1664
+ _request_auth=_request_auth
1665
+ )
1666
+
1667
+
1668
+
1669
+
1670
+ @validate_call
1671
+ def benchmark_benchmark_id_prompt_post(
1672
+ self,
1673
+ benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
1674
+ submit_prompt_model: Optional[SubmitPromptModel] = None,
1675
+ _request_timeout: Union[
1676
+ None,
1677
+ Annotated[StrictFloat, Field(gt=0)],
1678
+ Tuple[
1679
+ Annotated[StrictFloat, Field(gt=0)],
1680
+ Annotated[StrictFloat, Field(gt=0)]
1681
+ ]
1682
+ ] = None,
1683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1684
+ _content_type: Optional[StrictStr] = None,
1685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1687
+ ) -> None:
1688
+ """Adds a new prompt to a benchmark.
1689
+
1690
+
1691
+ :param benchmark_id: The benchmark id. (required)
1692
+ :type benchmark_id: str
1693
+ :param submit_prompt_model:
1694
+ :type submit_prompt_model: SubmitPromptModel
1695
+ :param _request_timeout: timeout setting for this request. If one
1696
+ number provided, it will be total request
1697
+ timeout. It can also be a pair (tuple) of
1698
+ (connection, read) timeouts.
1699
+ :type _request_timeout: int, tuple(int, int), optional
1700
+ :param _request_auth: set to override the auth_settings for an a single
1701
+ request; this effectively ignores the
1702
+ authentication in the spec for a single request.
1703
+ :type _request_auth: dict, optional
1704
+ :param _content_type: force content-type for the request.
1705
+ :type _content_type: str, Optional
1706
+ :param _headers: set to override the headers for a single
1707
+ request; this effectively ignores the headers
1708
+ in the spec for a single request.
1709
+ :type _headers: dict, optional
1710
+ :param _host_index: set to override the host_index for a single
1711
+ request; this effectively ignores the host_index
1712
+ in the spec for a single request.
1713
+ :type _host_index: int, optional
1714
+ :return: Returns the result object.
1715
+ """ # noqa: E501
1716
+
1717
+ _param = self._benchmark_benchmark_id_prompt_post_serialize(
1718
+ benchmark_id=benchmark_id,
1719
+ submit_prompt_model=submit_prompt_model,
1720
+ _request_auth=_request_auth,
1721
+ _content_type=_content_type,
1722
+ _headers=_headers,
1723
+ _host_index=_host_index
1724
+ )
1725
+
1726
+ _response_types_map: Dict[str, Optional[str]] = {
1727
+ '204': None,
1728
+ }
1729
+ response_data = self.api_client.call_api(
1730
+ *_param,
1731
+ _request_timeout=_request_timeout
1732
+ )
1733
+ response_data.read()
1734
+ return self.api_client.response_deserialize(
1735
+ response_data=response_data,
1736
+ response_types_map=_response_types_map,
1737
+ ).data
1738
+
1739
+
1740
+ @validate_call
1741
+ def benchmark_benchmark_id_prompt_post_with_http_info(
1742
+ self,
1743
+ benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
1744
+ submit_prompt_model: Optional[SubmitPromptModel] = None,
1745
+ _request_timeout: Union[
1746
+ None,
1747
+ Annotated[StrictFloat, Field(gt=0)],
1748
+ Tuple[
1749
+ Annotated[StrictFloat, Field(gt=0)],
1750
+ Annotated[StrictFloat, Field(gt=0)]
1751
+ ]
1752
+ ] = None,
1753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1754
+ _content_type: Optional[StrictStr] = None,
1755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1757
+ ) -> ApiResponse[None]:
1758
+ """Adds a new prompt to a benchmark.
1759
+
1760
+
1761
+ :param benchmark_id: The benchmark id. (required)
1762
+ :type benchmark_id: str
1763
+ :param submit_prompt_model:
1764
+ :type submit_prompt_model: SubmitPromptModel
1765
+ :param _request_timeout: timeout setting for this request. If one
1766
+ number provided, it will be total request
1767
+ timeout. It can also be a pair (tuple) of
1768
+ (connection, read) timeouts.
1769
+ :type _request_timeout: int, tuple(int, int), optional
1770
+ :param _request_auth: set to override the auth_settings for an a single
1771
+ request; this effectively ignores the
1772
+ authentication in the spec for a single request.
1773
+ :type _request_auth: dict, optional
1774
+ :param _content_type: force content-type for the request.
1775
+ :type _content_type: str, Optional
1776
+ :param _headers: set to override the headers for a single
1777
+ request; this effectively ignores the headers
1778
+ in the spec for a single request.
1779
+ :type _headers: dict, optional
1780
+ :param _host_index: set to override the host_index for a single
1781
+ request; this effectively ignores the host_index
1782
+ in the spec for a single request.
1783
+ :type _host_index: int, optional
1784
+ :return: Returns the result object.
1785
+ """ # noqa: E501
1786
+
1787
+ _param = self._benchmark_benchmark_id_prompt_post_serialize(
1788
+ benchmark_id=benchmark_id,
1789
+ submit_prompt_model=submit_prompt_model,
1790
+ _request_auth=_request_auth,
1791
+ _content_type=_content_type,
1792
+ _headers=_headers,
1793
+ _host_index=_host_index
1794
+ )
1795
+
1796
+ _response_types_map: Dict[str, Optional[str]] = {
1797
+ '204': None,
1798
+ }
1799
+ response_data = self.api_client.call_api(
1800
+ *_param,
1801
+ _request_timeout=_request_timeout
1802
+ )
1803
+ response_data.read()
1804
+ return self.api_client.response_deserialize(
1805
+ response_data=response_data,
1806
+ response_types_map=_response_types_map,
1807
+ )
1808
+
1809
+
1810
+ @validate_call
1811
+ def benchmark_benchmark_id_prompt_post_without_preload_content(
1812
+ self,
1813
+ benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
1814
+ submit_prompt_model: Optional[SubmitPromptModel] = None,
1815
+ _request_timeout: Union[
1816
+ None,
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Tuple[
1819
+ Annotated[StrictFloat, Field(gt=0)],
1820
+ Annotated[StrictFloat, Field(gt=0)]
1821
+ ]
1822
+ ] = None,
1823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1824
+ _content_type: Optional[StrictStr] = None,
1825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1827
+ ) -> RESTResponseType:
1828
+ """Adds a new prompt to a benchmark.
1829
+
1830
+
1831
+ :param benchmark_id: The benchmark id. (required)
1832
+ :type benchmark_id: str
1833
+ :param submit_prompt_model:
1834
+ :type submit_prompt_model: SubmitPromptModel
1835
+ :param _request_timeout: timeout setting for this request. If one
1836
+ number provided, it will be total request
1837
+ timeout. It can also be a pair (tuple) of
1838
+ (connection, read) timeouts.
1839
+ :type _request_timeout: int, tuple(int, int), optional
1840
+ :param _request_auth: set to override the auth_settings for an a single
1841
+ request; this effectively ignores the
1842
+ authentication in the spec for a single request.
1843
+ :type _request_auth: dict, optional
1844
+ :param _content_type: force content-type for the request.
1845
+ :type _content_type: str, Optional
1846
+ :param _headers: set to override the headers for a single
1847
+ request; this effectively ignores the headers
1848
+ in the spec for a single request.
1849
+ :type _headers: dict, optional
1850
+ :param _host_index: set to override the host_index for a single
1851
+ request; this effectively ignores the host_index
1852
+ in the spec for a single request.
1853
+ :type _host_index: int, optional
1854
+ :return: Returns the result object.
1855
+ """ # noqa: E501
1856
+
1857
+ _param = self._benchmark_benchmark_id_prompt_post_serialize(
1858
+ benchmark_id=benchmark_id,
1859
+ submit_prompt_model=submit_prompt_model,
1860
+ _request_auth=_request_auth,
1861
+ _content_type=_content_type,
1862
+ _headers=_headers,
1863
+ _host_index=_host_index
1864
+ )
1865
+
1866
+ _response_types_map: Dict[str, Optional[str]] = {
1867
+ '204': None,
1868
+ }
1869
+ response_data = self.api_client.call_api(
1870
+ *_param,
1871
+ _request_timeout=_request_timeout
1872
+ )
1873
+ return response_data.response
1874
+
1875
+
1876
+ def _benchmark_benchmark_id_prompt_post_serialize(
1877
+ self,
1878
+ benchmark_id,
1879
+ submit_prompt_model,
1880
+ _request_auth,
1881
+ _content_type,
1882
+ _headers,
1883
+ _host_index,
1884
+ ) -> RequestSerialized:
1885
+
1886
+ _host = None
1887
+
1888
+ _collection_formats: Dict[str, str] = {
1889
+ }
1890
+
1891
+ _path_params: Dict[str, str] = {}
1892
+ _query_params: List[Tuple[str, str]] = []
1893
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1894
+ _form_params: List[Tuple[str, str]] = []
1895
+ _files: Dict[
1896
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1897
+ ] = {}
1898
+ _body_params: Optional[bytes] = None
1899
+
1900
+ # process the path parameters
1901
+ if benchmark_id is not None:
1902
+ _path_params['benchmarkId'] = benchmark_id
1903
+ # process the query parameters
1904
+ # process the header parameters
1905
+ # process the form parameters
1906
+ # process the body parameter
1907
+ if submit_prompt_model is not None:
1908
+ _body_params = submit_prompt_model
1909
+
1910
+
1911
+
1912
+ # set the HTTP header `Content-Type`
1913
+ if _content_type:
1914
+ _header_params['Content-Type'] = _content_type
1915
+ else:
1916
+ _default_content_type = (
1917
+ self.api_client.select_header_content_type(
1918
+ [
1919
+ 'application/json',
1920
+ 'text/json',
1921
+ 'application/*+json'
1922
+ ]
1923
+ )
1924
+ )
1925
+ if _default_content_type is not None:
1926
+ _header_params['Content-Type'] = _default_content_type
1927
+
1928
+ # authentication setting
1929
+ _auth_settings: List[str] = [
1930
+ 'bearer',
1931
+ 'oauth2'
1932
+ ]
1933
+
1934
+ return self.api_client.param_serialize(
1935
+ method='POST',
1936
+ resource_path='/benchmark/{benchmarkId}/prompt',
1937
+ path_params=_path_params,
1938
+ query_params=_query_params,
1939
+ header_params=_header_params,
1940
+ body=_body_params,
1941
+ post_params=_form_params,
1942
+ files=_files,
1943
+ auth_settings=_auth_settings,
1944
+ collection_formats=_collection_formats,
1945
+ _host=_host,
1946
+ _request_auth=_request_auth
1947
+ )
1948
+
1949
+
1950
+
1951
+
1952
+ @validate_call
1953
+ def benchmark_benchmark_id_prompts_get(
1954
+ self,
1955
+ benchmark_id: StrictStr,
1956
+ request: Optional[QueryModel] = None,
1957
+ _request_timeout: Union[
1958
+ None,
1959
+ Annotated[StrictFloat, Field(gt=0)],
1960
+ Tuple[
1961
+ Annotated[StrictFloat, Field(gt=0)],
1962
+ Annotated[StrictFloat, Field(gt=0)]
1963
+ ]
1964
+ ] = None,
1965
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1966
+ _content_type: Optional[StrictStr] = None,
1967
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1968
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1969
+ ) -> PromptByBenchmarkResultPagedResult:
1970
+ """Returns the paged prompts of a benchmark by its ID.
1971
+
1972
+
1973
+ :param benchmark_id: (required)
1974
+ :type benchmark_id: str
1975
+ :param request:
1976
+ :type request: QueryModel
1977
+ :param _request_timeout: timeout setting for this request. If one
1978
+ number provided, it will be total request
1979
+ timeout. It can also be a pair (tuple) of
1980
+ (connection, read) timeouts.
1981
+ :type _request_timeout: int, tuple(int, int), optional
1982
+ :param _request_auth: set to override the auth_settings for an a single
1983
+ request; this effectively ignores the
1984
+ authentication in the spec for a single request.
1985
+ :type _request_auth: dict, optional
1986
+ :param _content_type: force content-type for the request.
1987
+ :type _content_type: str, Optional
1988
+ :param _headers: set to override the headers for a single
1989
+ request; this effectively ignores the headers
1990
+ in the spec for a single request.
1991
+ :type _headers: dict, optional
1992
+ :param _host_index: set to override the host_index for a single
1993
+ request; this effectively ignores the host_index
1994
+ in the spec for a single request.
1995
+ :type _host_index: int, optional
1996
+ :return: Returns the result object.
1997
+ """ # noqa: E501
1998
+
1999
+ _param = self._benchmark_benchmark_id_prompts_get_serialize(
2000
+ benchmark_id=benchmark_id,
2001
+ request=request,
2002
+ _request_auth=_request_auth,
2003
+ _content_type=_content_type,
2004
+ _headers=_headers,
2005
+ _host_index=_host_index
2006
+ )
2007
+
2008
+ _response_types_map: Dict[str, Optional[str]] = {
2009
+ '200': "PromptByBenchmarkResultPagedResult",
2010
+ }
2011
+ response_data = self.api_client.call_api(
2012
+ *_param,
2013
+ _request_timeout=_request_timeout
2014
+ )
2015
+ response_data.read()
2016
+ return self.api_client.response_deserialize(
2017
+ response_data=response_data,
2018
+ response_types_map=_response_types_map,
2019
+ ).data
2020
+
2021
+
2022
+ @validate_call
2023
+ def benchmark_benchmark_id_prompts_get_with_http_info(
2024
+ self,
2025
+ benchmark_id: StrictStr,
2026
+ request: Optional[QueryModel] = None,
2027
+ _request_timeout: Union[
2028
+ None,
2029
+ Annotated[StrictFloat, Field(gt=0)],
2030
+ Tuple[
2031
+ Annotated[StrictFloat, Field(gt=0)],
2032
+ Annotated[StrictFloat, Field(gt=0)]
2033
+ ]
2034
+ ] = None,
2035
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2036
+ _content_type: Optional[StrictStr] = None,
2037
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2038
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2039
+ ) -> ApiResponse[PromptByBenchmarkResultPagedResult]:
2040
+ """Returns the paged prompts of a benchmark by its ID.
2041
+
2042
+
2043
+ :param benchmark_id: (required)
2044
+ :type benchmark_id: str
2045
+ :param request:
2046
+ :type request: QueryModel
2047
+ :param _request_timeout: timeout setting for this request. If one
2048
+ number provided, it will be total request
2049
+ timeout. It can also be a pair (tuple) of
2050
+ (connection, read) timeouts.
2051
+ :type _request_timeout: int, tuple(int, int), optional
2052
+ :param _request_auth: set to override the auth_settings for an a single
2053
+ request; this effectively ignores the
2054
+ authentication in the spec for a single request.
2055
+ :type _request_auth: dict, optional
2056
+ :param _content_type: force content-type for the request.
2057
+ :type _content_type: str, Optional
2058
+ :param _headers: set to override the headers for a single
2059
+ request; this effectively ignores the headers
2060
+ in the spec for a single request.
2061
+ :type _headers: dict, optional
2062
+ :param _host_index: set to override the host_index for a single
2063
+ request; this effectively ignores the host_index
2064
+ in the spec for a single request.
2065
+ :type _host_index: int, optional
2066
+ :return: Returns the result object.
2067
+ """ # noqa: E501
2068
+
2069
+ _param = self._benchmark_benchmark_id_prompts_get_serialize(
2070
+ benchmark_id=benchmark_id,
2071
+ request=request,
2072
+ _request_auth=_request_auth,
2073
+ _content_type=_content_type,
2074
+ _headers=_headers,
2075
+ _host_index=_host_index
2076
+ )
2077
+
2078
+ _response_types_map: Dict[str, Optional[str]] = {
2079
+ '200': "PromptByBenchmarkResultPagedResult",
2080
+ }
2081
+ response_data = self.api_client.call_api(
2082
+ *_param,
2083
+ _request_timeout=_request_timeout
2084
+ )
2085
+ response_data.read()
2086
+ return self.api_client.response_deserialize(
2087
+ response_data=response_data,
2088
+ response_types_map=_response_types_map,
2089
+ )
2090
+
2091
+
2092
+ @validate_call
2093
+ def benchmark_benchmark_id_prompts_get_without_preload_content(
2094
+ self,
2095
+ benchmark_id: StrictStr,
2096
+ request: Optional[QueryModel] = None,
2097
+ _request_timeout: Union[
2098
+ None,
2099
+ Annotated[StrictFloat, Field(gt=0)],
2100
+ Tuple[
2101
+ Annotated[StrictFloat, Field(gt=0)],
2102
+ Annotated[StrictFloat, Field(gt=0)]
2103
+ ]
2104
+ ] = None,
2105
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2106
+ _content_type: Optional[StrictStr] = None,
2107
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2108
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2109
+ ) -> RESTResponseType:
2110
+ """Returns the paged prompts of a benchmark by its ID.
2111
+
2112
+
2113
+ :param benchmark_id: (required)
2114
+ :type benchmark_id: str
2115
+ :param request:
2116
+ :type request: QueryModel
2117
+ :param _request_timeout: timeout setting for this request. If one
2118
+ number provided, it will be total request
2119
+ timeout. It can also be a pair (tuple) of
2120
+ (connection, read) timeouts.
2121
+ :type _request_timeout: int, tuple(int, int), optional
2122
+ :param _request_auth: set to override the auth_settings for an a single
2123
+ request; this effectively ignores the
2124
+ authentication in the spec for a single request.
2125
+ :type _request_auth: dict, optional
2126
+ :param _content_type: force content-type for the request.
2127
+ :type _content_type: str, Optional
2128
+ :param _headers: set to override the headers for a single
2129
+ request; this effectively ignores the headers
2130
+ in the spec for a single request.
2131
+ :type _headers: dict, optional
2132
+ :param _host_index: set to override the host_index for a single
2133
+ request; this effectively ignores the host_index
2134
+ in the spec for a single request.
2135
+ :type _host_index: int, optional
2136
+ :return: Returns the result object.
2137
+ """ # noqa: E501
2138
+
2139
+ _param = self._benchmark_benchmark_id_prompts_get_serialize(
2140
+ benchmark_id=benchmark_id,
2141
+ request=request,
2142
+ _request_auth=_request_auth,
2143
+ _content_type=_content_type,
2144
+ _headers=_headers,
2145
+ _host_index=_host_index
2146
+ )
2147
+
2148
+ _response_types_map: Dict[str, Optional[str]] = {
2149
+ '200': "PromptByBenchmarkResultPagedResult",
2150
+ }
2151
+ response_data = self.api_client.call_api(
2152
+ *_param,
2153
+ _request_timeout=_request_timeout
2154
+ )
2155
+ return response_data.response
2156
+
2157
+
2158
+ def _benchmark_benchmark_id_prompts_get_serialize(
2159
+ self,
2160
+ benchmark_id,
2161
+ request,
2162
+ _request_auth,
2163
+ _content_type,
2164
+ _headers,
2165
+ _host_index,
2166
+ ) -> RequestSerialized:
2167
+
2168
+ _host = None
2169
+
2170
+ _collection_formats: Dict[str, str] = {
2171
+ }
2172
+
2173
+ _path_params: Dict[str, str] = {}
2174
+ _query_params: List[Tuple[str, str]] = []
2175
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2176
+ _form_params: List[Tuple[str, str]] = []
2177
+ _files: Dict[
2178
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2179
+ ] = {}
2180
+ _body_params: Optional[bytes] = None
2181
+
2182
+ # process the path parameters
2183
+ if benchmark_id is not None:
2184
+ _path_params['benchmarkId'] = benchmark_id
2185
+ # process the query parameters
2186
+ if request is not None:
2187
+
2188
+ _query_params.append(('request', request))
2189
+
2190
+ # process the header parameters
2191
+ # process the form parameters
2192
+ # process the body parameter
2193
+
2194
+
2195
+ # set the HTTP header `Accept`
2196
+ if 'Accept' not in _header_params:
2197
+ _header_params['Accept'] = self.api_client.select_header_accept(
2198
+ [
2199
+ 'text/plain',
2200
+ 'application/json',
2201
+ 'text/json'
2202
+ ]
2203
+ )
2204
+
2205
+
2206
+ # authentication setting
2207
+ _auth_settings: List[str] = [
2208
+ 'bearer',
2209
+ 'oauth2'
2210
+ ]
2211
+
2212
+ return self.api_client.param_serialize(
2213
+ method='GET',
2214
+ resource_path='/benchmark/{benchmarkId}/prompts',
2215
+ path_params=_path_params,
2216
+ query_params=_query_params,
2217
+ header_params=_header_params,
2218
+ body=_body_params,
2219
+ post_params=_form_params,
2220
+ files=_files,
2221
+ auth_settings=_auth_settings,
2222
+ collection_formats=_collection_formats,
2223
+ _host=_host,
2224
+ _request_auth=_request_auth
2225
+ )
2226
+
2227
+
2228
+
2229
+
2230
+ @validate_call
2231
+ def benchmark_post(
2232
+ self,
2233
+ create_benchmark_model: Optional[CreateBenchmarkModel] = None,
2234
+ _request_timeout: Union[
2235
+ None,
2236
+ Annotated[StrictFloat, Field(gt=0)],
2237
+ Tuple[
2238
+ Annotated[StrictFloat, Field(gt=0)],
2239
+ Annotated[StrictFloat, Field(gt=0)]
2240
+ ]
2241
+ ] = None,
2242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2243
+ _content_type: Optional[StrictStr] = None,
2244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2246
+ ) -> CreateBenchmarkResult:
2247
+ """Creates a benchmark
2248
+
2249
+
2250
+ :param create_benchmark_model:
2251
+ :type create_benchmark_model: CreateBenchmarkModel
2252
+ :param _request_timeout: timeout setting for this request. If one
2253
+ number provided, it will be total request
2254
+ timeout. It can also be a pair (tuple) of
2255
+ (connection, read) timeouts.
2256
+ :type _request_timeout: int, tuple(int, int), optional
2257
+ :param _request_auth: set to override the auth_settings for an a single
2258
+ request; this effectively ignores the
2259
+ authentication in the spec for a single request.
2260
+ :type _request_auth: dict, optional
2261
+ :param _content_type: force content-type for the request.
2262
+ :type _content_type: str, Optional
2263
+ :param _headers: set to override the headers for a single
2264
+ request; this effectively ignores the headers
2265
+ in the spec for a single request.
2266
+ :type _headers: dict, optional
2267
+ :param _host_index: set to override the host_index for a single
2268
+ request; this effectively ignores the host_index
2269
+ in the spec for a single request.
2270
+ :type _host_index: int, optional
2271
+ :return: Returns the result object.
2272
+ """ # noqa: E501
2273
+
2274
+ _param = self._benchmark_post_serialize(
2275
+ create_benchmark_model=create_benchmark_model,
2276
+ _request_auth=_request_auth,
2277
+ _content_type=_content_type,
2278
+ _headers=_headers,
2279
+ _host_index=_host_index
2280
+ )
2281
+
2282
+ _response_types_map: Dict[str, Optional[str]] = {
2283
+ '200': "CreateBenchmarkResult",
2284
+ }
2285
+ response_data = self.api_client.call_api(
2286
+ *_param,
2287
+ _request_timeout=_request_timeout
2288
+ )
2289
+ response_data.read()
2290
+ return self.api_client.response_deserialize(
2291
+ response_data=response_data,
2292
+ response_types_map=_response_types_map,
2293
+ ).data
2294
+
2295
+
2296
+ @validate_call
2297
+ def benchmark_post_with_http_info(
2298
+ self,
2299
+ create_benchmark_model: Optional[CreateBenchmarkModel] = None,
2300
+ _request_timeout: Union[
2301
+ None,
2302
+ Annotated[StrictFloat, Field(gt=0)],
2303
+ Tuple[
2304
+ Annotated[StrictFloat, Field(gt=0)],
2305
+ Annotated[StrictFloat, Field(gt=0)]
2306
+ ]
2307
+ ] = None,
2308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2309
+ _content_type: Optional[StrictStr] = None,
2310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2312
+ ) -> ApiResponse[CreateBenchmarkResult]:
2313
+ """Creates a benchmark
2314
+
2315
+
2316
+ :param create_benchmark_model:
2317
+ :type create_benchmark_model: CreateBenchmarkModel
2318
+ :param _request_timeout: timeout setting for this request. If one
2319
+ number provided, it will be total request
2320
+ timeout. It can also be a pair (tuple) of
2321
+ (connection, read) timeouts.
2322
+ :type _request_timeout: int, tuple(int, int), optional
2323
+ :param _request_auth: set to override the auth_settings for an a single
2324
+ request; this effectively ignores the
2325
+ authentication in the spec for a single request.
2326
+ :type _request_auth: dict, optional
2327
+ :param _content_type: force content-type for the request.
2328
+ :type _content_type: str, Optional
2329
+ :param _headers: set to override the headers for a single
2330
+ request; this effectively ignores the headers
2331
+ in the spec for a single request.
2332
+ :type _headers: dict, optional
2333
+ :param _host_index: set to override the host_index for a single
2334
+ request; this effectively ignores the host_index
2335
+ in the spec for a single request.
2336
+ :type _host_index: int, optional
2337
+ :return: Returns the result object.
2338
+ """ # noqa: E501
2339
+
2340
+ _param = self._benchmark_post_serialize(
2341
+ create_benchmark_model=create_benchmark_model,
2342
+ _request_auth=_request_auth,
2343
+ _content_type=_content_type,
2344
+ _headers=_headers,
2345
+ _host_index=_host_index
2346
+ )
2347
+
2348
+ _response_types_map: Dict[str, Optional[str]] = {
2349
+ '200': "CreateBenchmarkResult",
2350
+ }
2351
+ response_data = self.api_client.call_api(
2352
+ *_param,
2353
+ _request_timeout=_request_timeout
2354
+ )
2355
+ response_data.read()
2356
+ return self.api_client.response_deserialize(
2357
+ response_data=response_data,
2358
+ response_types_map=_response_types_map,
2359
+ )
2360
+
2361
+
2362
+ @validate_call
2363
+ def benchmark_post_without_preload_content(
2364
+ self,
2365
+ create_benchmark_model: Optional[CreateBenchmarkModel] = None,
2366
+ _request_timeout: Union[
2367
+ None,
2368
+ Annotated[StrictFloat, Field(gt=0)],
2369
+ Tuple[
2370
+ Annotated[StrictFloat, Field(gt=0)],
2371
+ Annotated[StrictFloat, Field(gt=0)]
2372
+ ]
2373
+ ] = None,
2374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2375
+ _content_type: Optional[StrictStr] = None,
2376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2378
+ ) -> RESTResponseType:
2379
+ """Creates a benchmark
2380
+
2381
+
2382
+ :param create_benchmark_model:
2383
+ :type create_benchmark_model: CreateBenchmarkModel
2384
+ :param _request_timeout: timeout setting for this request. If one
2385
+ number provided, it will be total request
2386
+ timeout. It can also be a pair (tuple) of
2387
+ (connection, read) timeouts.
2388
+ :type _request_timeout: int, tuple(int, int), optional
2389
+ :param _request_auth: set to override the auth_settings for an a single
2390
+ request; this effectively ignores the
2391
+ authentication in the spec for a single request.
2392
+ :type _request_auth: dict, optional
2393
+ :param _content_type: force content-type for the request.
2394
+ :type _content_type: str, Optional
2395
+ :param _headers: set to override the headers for a single
2396
+ request; this effectively ignores the headers
2397
+ in the spec for a single request.
2398
+ :type _headers: dict, optional
2399
+ :param _host_index: set to override the host_index for a single
2400
+ request; this effectively ignores the host_index
2401
+ in the spec for a single request.
2402
+ :type _host_index: int, optional
2403
+ :return: Returns the result object.
2404
+ """ # noqa: E501
2405
+
2406
+ _param = self._benchmark_post_serialize(
2407
+ create_benchmark_model=create_benchmark_model,
2408
+ _request_auth=_request_auth,
2409
+ _content_type=_content_type,
2410
+ _headers=_headers,
2411
+ _host_index=_host_index
2412
+ )
2413
+
2414
+ _response_types_map: Dict[str, Optional[str]] = {
2415
+ '200': "CreateBenchmarkResult",
2416
+ }
2417
+ response_data = self.api_client.call_api(
2418
+ *_param,
2419
+ _request_timeout=_request_timeout
2420
+ )
2421
+ return response_data.response
2422
+
2423
+
2424
+ def _benchmark_post_serialize(
2425
+ self,
2426
+ create_benchmark_model,
2427
+ _request_auth,
2428
+ _content_type,
2429
+ _headers,
2430
+ _host_index,
2431
+ ) -> RequestSerialized:
2432
+
2433
+ _host = None
2434
+
2435
+ _collection_formats: Dict[str, str] = {
2436
+ }
2437
+
2438
+ _path_params: Dict[str, str] = {}
2439
+ _query_params: List[Tuple[str, str]] = []
2440
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2441
+ _form_params: List[Tuple[str, str]] = []
2442
+ _files: Dict[
2443
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2444
+ ] = {}
2445
+ _body_params: Optional[bytes] = None
2446
+
2447
+ # process the path parameters
2448
+ # process the query parameters
2449
+ # process the header parameters
2450
+ # process the form parameters
2451
+ # process the body parameter
2452
+ if create_benchmark_model is not None:
2453
+ _body_params = create_benchmark_model
2454
+
2455
+
2456
+ # set the HTTP header `Accept`
2457
+ if 'Accept' not in _header_params:
2458
+ _header_params['Accept'] = self.api_client.select_header_accept(
2459
+ [
2460
+ 'text/plain',
2461
+ 'application/json',
2462
+ 'text/json'
2463
+ ]
2464
+ )
2465
+
2466
+ # set the HTTP header `Content-Type`
2467
+ if _content_type:
2468
+ _header_params['Content-Type'] = _content_type
2469
+ else:
2470
+ _default_content_type = (
2471
+ self.api_client.select_header_content_type(
2472
+ [
2473
+ 'application/json',
2474
+ 'text/json',
2475
+ 'application/*+json'
2476
+ ]
2477
+ )
2478
+ )
2479
+ if _default_content_type is not None:
2480
+ _header_params['Content-Type'] = _default_content_type
2481
+
2482
+ # authentication setting
2483
+ _auth_settings: List[str] = [
2484
+ 'bearer',
2485
+ 'oauth2'
2486
+ ]
2487
+
2488
+ return self.api_client.param_serialize(
2489
+ method='POST',
2490
+ resource_path='/benchmark',
2491
+ path_params=_path_params,
2492
+ query_params=_query_params,
2493
+ header_params=_header_params,
2494
+ body=_body_params,
2495
+ post_params=_form_params,
2496
+ files=_files,
2497
+ auth_settings=_auth_settings,
2498
+ collection_formats=_collection_formats,
2499
+ _host=_host,
2500
+ _request_auth=_request_auth
2501
+ )
2502
+
2503
+
2504
+
2505
+
2506
+ @validate_call
2507
+ def benchmarks_get(
2508
+ self,
2509
+ request: Optional[QueryModel] = None,
2510
+ _request_timeout: Union[
2511
+ None,
2512
+ Annotated[StrictFloat, Field(gt=0)],
2513
+ Tuple[
2514
+ Annotated[StrictFloat, Field(gt=0)],
2515
+ Annotated[StrictFloat, Field(gt=0)]
2516
+ ]
2517
+ ] = None,
2518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2519
+ _content_type: Optional[StrictStr] = None,
2520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2522
+ ) -> BenchmarkQueryResultPagedResult:
2523
+ """Queries all benchmarks of the user.
2524
+
2525
+
2526
+ :param request:
2527
+ :type request: QueryModel
2528
+ :param _request_timeout: timeout setting for this request. If one
2529
+ number provided, it will be total request
2530
+ timeout. It can also be a pair (tuple) of
2531
+ (connection, read) timeouts.
2532
+ :type _request_timeout: int, tuple(int, int), optional
2533
+ :param _request_auth: set to override the auth_settings for an a single
2534
+ request; this effectively ignores the
2535
+ authentication in the spec for a single request.
2536
+ :type _request_auth: dict, optional
2537
+ :param _content_type: force content-type for the request.
2538
+ :type _content_type: str, Optional
2539
+ :param _headers: set to override the headers for a single
2540
+ request; this effectively ignores the headers
2541
+ in the spec for a single request.
2542
+ :type _headers: dict, optional
2543
+ :param _host_index: set to override the host_index for a single
2544
+ request; this effectively ignores the host_index
2545
+ in the spec for a single request.
2546
+ :type _host_index: int, optional
2547
+ :return: Returns the result object.
2548
+ """ # noqa: E501
2549
+
2550
+ _param = self._benchmarks_get_serialize(
2551
+ request=request,
2552
+ _request_auth=_request_auth,
2553
+ _content_type=_content_type,
2554
+ _headers=_headers,
2555
+ _host_index=_host_index
2556
+ )
2557
+
2558
+ _response_types_map: Dict[str, Optional[str]] = {
2559
+ '200': "BenchmarkQueryResultPagedResult",
2560
+ }
2561
+ response_data = self.api_client.call_api(
2562
+ *_param,
2563
+ _request_timeout=_request_timeout
2564
+ )
2565
+ response_data.read()
2566
+ return self.api_client.response_deserialize(
2567
+ response_data=response_data,
2568
+ response_types_map=_response_types_map,
2569
+ ).data
2570
+
2571
+
2572
+ @validate_call
2573
+ def benchmarks_get_with_http_info(
2574
+ self,
2575
+ request: Optional[QueryModel] = None,
2576
+ _request_timeout: Union[
2577
+ None,
2578
+ Annotated[StrictFloat, Field(gt=0)],
2579
+ Tuple[
2580
+ Annotated[StrictFloat, Field(gt=0)],
2581
+ Annotated[StrictFloat, Field(gt=0)]
2582
+ ]
2583
+ ] = None,
2584
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2585
+ _content_type: Optional[StrictStr] = None,
2586
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2587
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2588
+ ) -> ApiResponse[BenchmarkQueryResultPagedResult]:
2589
+ """Queries all benchmarks of the user.
2590
+
2591
+
2592
+ :param request:
2593
+ :type request: QueryModel
2594
+ :param _request_timeout: timeout setting for this request. If one
2595
+ number provided, it will be total request
2596
+ timeout. It can also be a pair (tuple) of
2597
+ (connection, read) timeouts.
2598
+ :type _request_timeout: int, tuple(int, int), optional
2599
+ :param _request_auth: set to override the auth_settings for an a single
2600
+ request; this effectively ignores the
2601
+ authentication in the spec for a single request.
2602
+ :type _request_auth: dict, optional
2603
+ :param _content_type: force content-type for the request.
2604
+ :type _content_type: str, Optional
2605
+ :param _headers: set to override the headers for a single
2606
+ request; this effectively ignores the headers
2607
+ in the spec for a single request.
2608
+ :type _headers: dict, optional
2609
+ :param _host_index: set to override the host_index for a single
2610
+ request; this effectively ignores the host_index
2611
+ in the spec for a single request.
2612
+ :type _host_index: int, optional
2613
+ :return: Returns the result object.
2614
+ """ # noqa: E501
2615
+
2616
+ _param = self._benchmarks_get_serialize(
2617
+ request=request,
2618
+ _request_auth=_request_auth,
2619
+ _content_type=_content_type,
2620
+ _headers=_headers,
2621
+ _host_index=_host_index
2622
+ )
2623
+
2624
+ _response_types_map: Dict[str, Optional[str]] = {
2625
+ '200': "BenchmarkQueryResultPagedResult",
2626
+ }
2627
+ response_data = self.api_client.call_api(
2628
+ *_param,
2629
+ _request_timeout=_request_timeout
2630
+ )
2631
+ response_data.read()
2632
+ return self.api_client.response_deserialize(
2633
+ response_data=response_data,
2634
+ response_types_map=_response_types_map,
2635
+ )
2636
+
2637
+
2638
+ @validate_call
2639
+ def benchmarks_get_without_preload_content(
2640
+ self,
2641
+ request: Optional[QueryModel] = None,
2642
+ _request_timeout: Union[
2643
+ None,
2644
+ Annotated[StrictFloat, Field(gt=0)],
2645
+ Tuple[
2646
+ Annotated[StrictFloat, Field(gt=0)],
2647
+ Annotated[StrictFloat, Field(gt=0)]
2648
+ ]
2649
+ ] = None,
2650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2651
+ _content_type: Optional[StrictStr] = None,
2652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2654
+ ) -> RESTResponseType:
2655
+ """Queries all benchmarks of the user.
2656
+
2657
+
2658
+ :param request:
2659
+ :type request: QueryModel
2660
+ :param _request_timeout: timeout setting for this request. If one
2661
+ number provided, it will be total request
2662
+ timeout. It can also be a pair (tuple) of
2663
+ (connection, read) timeouts.
2664
+ :type _request_timeout: int, tuple(int, int), optional
2665
+ :param _request_auth: set to override the auth_settings for an a single
2666
+ request; this effectively ignores the
2667
+ authentication in the spec for a single request.
2668
+ :type _request_auth: dict, optional
2669
+ :param _content_type: force content-type for the request.
2670
+ :type _content_type: str, Optional
2671
+ :param _headers: set to override the headers for a single
2672
+ request; this effectively ignores the headers
2673
+ in the spec for a single request.
2674
+ :type _headers: dict, optional
2675
+ :param _host_index: set to override the host_index for a single
2676
+ request; this effectively ignores the host_index
2677
+ in the spec for a single request.
2678
+ :type _host_index: int, optional
2679
+ :return: Returns the result object.
2680
+ """ # noqa: E501
2681
+
2682
+ _param = self._benchmarks_get_serialize(
2683
+ request=request,
2684
+ _request_auth=_request_auth,
2685
+ _content_type=_content_type,
2686
+ _headers=_headers,
2687
+ _host_index=_host_index
2688
+ )
2689
+
2690
+ _response_types_map: Dict[str, Optional[str]] = {
2691
+ '200': "BenchmarkQueryResultPagedResult",
2692
+ }
2693
+ response_data = self.api_client.call_api(
2694
+ *_param,
2695
+ _request_timeout=_request_timeout
2696
+ )
2697
+ return response_data.response
2698
+
2699
+
2700
+ def _benchmarks_get_serialize(
2701
+ self,
2702
+ request,
2703
+ _request_auth,
2704
+ _content_type,
2705
+ _headers,
2706
+ _host_index,
2707
+ ) -> RequestSerialized:
2708
+
2709
+ _host = None
2710
+
2711
+ _collection_formats: Dict[str, str] = {
2712
+ }
2713
+
2714
+ _path_params: Dict[str, str] = {}
2715
+ _query_params: List[Tuple[str, str]] = []
2716
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2717
+ _form_params: List[Tuple[str, str]] = []
2718
+ _files: Dict[
2719
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2720
+ ] = {}
2721
+ _body_params: Optional[bytes] = None
2722
+
2723
+ # process the path parameters
2724
+ # process the query parameters
2725
+ if request is not None:
2726
+
2727
+ _query_params.append(('request', request))
2728
+
2729
+ # process the header parameters
2730
+ # process the form parameters
2731
+ # process the body parameter
2732
+
2733
+
2734
+ # set the HTTP header `Accept`
2735
+ if 'Accept' not in _header_params:
2736
+ _header_params['Accept'] = self.api_client.select_header_accept(
2737
+ [
2738
+ 'text/plain',
2739
+ 'application/json',
2740
+ 'text/json'
2741
+ ]
2742
+ )
2743
+
2744
+
2745
+ # authentication setting
2746
+ _auth_settings: List[str] = [
2747
+ 'bearer',
2748
+ 'oauth2'
2749
+ ]
2750
+
2751
+ return self.api_client.param_serialize(
2752
+ method='GET',
2753
+ resource_path='/benchmarks',
2754
+ path_params=_path_params,
2755
+ query_params=_query_params,
2756
+ header_params=_header_params,
2757
+ body=_body_params,
2758
+ post_params=_form_params,
2759
+ files=_files,
2760
+ auth_settings=_auth_settings,
2761
+ collection_formats=_collection_formats,
2762
+ _host=_host,
2763
+ _request_auth=_request_auth
2764
+ )
2765
+
2766
+