rapidata 2.28.5__py3-none-any.whl → 2.29.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -1
- rapidata/api_client/__init__.py +45 -8
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/benchmark_api.py +3033 -0
- rapidata/api_client/api/customer_rapid_api.py +332 -1
- rapidata/api_client/api/dataset_api.py +16 -0
- rapidata/api_client/api/leaderboard_api.py +1392 -270
- rapidata/api_client/models/__init__.py +44 -8
- rapidata/api_client/models/add_campaign_model.py +3 -3
- rapidata/api_client/models/and_user_filter_model.py +106 -0
- rapidata/api_client/models/and_user_filter_model_filters_inner.py +282 -0
- rapidata/api_client/models/benchmark_query_result.py +94 -0
- rapidata/api_client/models/benchmark_query_result_paged_result.py +105 -0
- rapidata/api_client/models/boost_leaderboard_model.py +89 -0
- rapidata/api_client/models/create_benchmark_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_result.py +89 -0
- rapidata/api_client/models/create_benchmark_result.py +87 -0
- rapidata/api_client/models/create_datapoint_result.py +4 -16
- rapidata/api_client/models/create_leaderboard_model.py +20 -2
- rapidata/api_client/models/create_leaderboard_result.py +15 -3
- rapidata/api_client/models/create_order_model.py +3 -3
- rapidata/api_client/models/file_asset_input.py +104 -0
- rapidata/api_client/models/file_asset_input1.py +104 -0
- rapidata/api_client/models/file_asset_input1_file.py +168 -0
- rapidata/api_client/models/file_asset_input2.py +104 -0
- rapidata/api_client/models/file_asset_input3.py +104 -0
- rapidata/api_client/models/file_asset_input_file.py +182 -0
- rapidata/api_client/models/form_file_wrapper.py +120 -0
- rapidata/api_client/models/get_benchmark_by_id_query.py +96 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result.py +94 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result_paged_result.py +105 -0
- rapidata/api_client/models/get_benchmark_by_id_result.py +94 -0
- rapidata/api_client/models/get_leaderboard_by_id_result.py +11 -3
- rapidata/api_client/models/get_participant_by_id_result.py +6 -26
- rapidata/api_client/models/get_standing_by_id_result.py +113 -0
- rapidata/api_client/models/leaderboard_query_result.py +11 -3
- rapidata/api_client/models/local_file_wrapper.py +120 -0
- rapidata/api_client/models/multi_asset_input.py +110 -0
- rapidata/api_client/models/multi_asset_input1.py +110 -0
- rapidata/api_client/models/multi_asset_input1_assets_inner.py +170 -0
- rapidata/api_client/models/multi_asset_input2.py +110 -0
- rapidata/api_client/models/multi_asset_input3.py +110 -0
- rapidata/api_client/models/multi_asset_input3_assets_inner.py +170 -0
- rapidata/api_client/models/multi_asset_input_assets_inner.py +170 -0
- rapidata/api_client/models/not_user_filter_model.py +3 -3
- rapidata/api_client/models/or_user_filter_model.py +3 -3
- rapidata/api_client/models/participant_by_benchmark.py +102 -0
- rapidata/api_client/models/participant_by_benchmark_paged_result.py +105 -0
- rapidata/api_client/models/participant_status.py +1 -4
- rapidata/api_client/models/potential_validation_rapid.py +103 -0
- rapidata/api_client/models/potential_validation_rapid_paged_result.py +105 -0
- rapidata/api_client/models/potential_validation_rapid_truth.py +280 -0
- rapidata/api_client/models/prompt_asset_metadata_input.py +3 -3
- rapidata/api_client/models/prompt_asset_metadata_input_asset.py +170 -0
- rapidata/api_client/models/prompt_by_benchmark_result.py +92 -0
- rapidata/api_client/models/prompt_by_benchmark_result_paged_result.py +105 -0
- rapidata/api_client/models/prompt_metadata_input.py +5 -3
- rapidata/api_client/models/proxy_file_wrapper.py +114 -0
- rapidata/api_client/models/query_validation_model.py +97 -0
- rapidata/api_client/models/standing_by_leaderboard.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard_paged_result.py +105 -0
- rapidata/api_client/models/standing_status.py +38 -0
- rapidata/api_client/models/stream_file_wrapper.py +116 -0
- rapidata/api_client/models/submit_prompt_model.py +105 -0
- rapidata/api_client/models/submit_prompt_model_prompt_asset.py +174 -0
- rapidata/api_client/models/text_asset_input.py +100 -0
- rapidata/api_client/models/transcription_metadata_input.py +5 -3
- rapidata/api_client/models/zip_entry_file_wrapper.py +120 -0
- rapidata/api_client_README.md +67 -16
- rapidata/rapidata_client/benchmark/leaderboard/__init__.py +0 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +115 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +256 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +83 -0
- rapidata/rapidata_client/filter/not_filter.py +2 -2
- rapidata/rapidata_client/filter/or_filter.py +2 -2
- rapidata/rapidata_client/metadata/__init__.py +1 -0
- rapidata/rapidata_client/metadata/_media_asset_metadata.py +8 -1
- rapidata/rapidata_client/metadata/_prompt_identifier_metadata.py +15 -0
- rapidata/rapidata_client/order/_rapidata_dataset.py +6 -6
- rapidata/rapidata_client/order/_rapidata_order_builder.py +4 -4
- rapidata/rapidata_client/rapidata_client.py +3 -3
- rapidata/service/openapi_service.py +5 -0
- {rapidata-2.28.5.dist-info → rapidata-2.29.1.dist-info}/METADATA +1 -1
- {rapidata-2.28.5.dist-info → rapidata-2.29.1.dist-info}/RECORD +88 -37
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard.py +0 -127
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py +0 -92
- /rapidata/rapidata_client/{leaderboard → benchmark}/__init__.py +0 -0
- {rapidata-2.28.5.dist-info → rapidata-2.29.1.dist-info}/LICENSE +0 -0
- {rapidata-2.28.5.dist-info → rapidata-2.29.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,3033 @@
|
|
|
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_delete(
|
|
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
|
+
) -> None:
|
|
584
|
+
"""Deletes a participant on a benchmark.
|
|
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_delete_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
|
+
'204': None,
|
|
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_delete_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[None]:
|
|
654
|
+
"""Deletes a participant on a benchmark.
|
|
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_delete_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
|
+
'204': None,
|
|
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_delete_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
|
+
"""Deletes a participant on a benchmark.
|
|
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_delete_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
|
+
'204': None,
|
|
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_delete_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
|
+
|
|
808
|
+
|
|
809
|
+
# authentication setting
|
|
810
|
+
_auth_settings: List[str] = [
|
|
811
|
+
'bearer',
|
|
812
|
+
'oauth2'
|
|
813
|
+
]
|
|
814
|
+
|
|
815
|
+
return self.api_client.param_serialize(
|
|
816
|
+
method='DELETE',
|
|
817
|
+
resource_path='/benchmark/{benchmarkId}/participant/{participantId}',
|
|
818
|
+
path_params=_path_params,
|
|
819
|
+
query_params=_query_params,
|
|
820
|
+
header_params=_header_params,
|
|
821
|
+
body=_body_params,
|
|
822
|
+
post_params=_form_params,
|
|
823
|
+
files=_files,
|
|
824
|
+
auth_settings=_auth_settings,
|
|
825
|
+
collection_formats=_collection_formats,
|
|
826
|
+
_host=_host,
|
|
827
|
+
_request_auth=_request_auth
|
|
828
|
+
)
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
@validate_call
|
|
834
|
+
def benchmark_benchmark_id_participant_participant_id_get(
|
|
835
|
+
self,
|
|
836
|
+
benchmark_id: StrictStr,
|
|
837
|
+
participant_id: StrictStr,
|
|
838
|
+
_request_timeout: Union[
|
|
839
|
+
None,
|
|
840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
841
|
+
Tuple[
|
|
842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
843
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
844
|
+
]
|
|
845
|
+
] = None,
|
|
846
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
847
|
+
_content_type: Optional[StrictStr] = None,
|
|
848
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
849
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
850
|
+
) -> GetParticipantByIdResult:
|
|
851
|
+
"""Gets a participant by it's Id.
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
:param benchmark_id: (required)
|
|
855
|
+
:type benchmark_id: str
|
|
856
|
+
:param participant_id: (required)
|
|
857
|
+
:type participant_id: str
|
|
858
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
859
|
+
number provided, it will be total request
|
|
860
|
+
timeout. It can also be a pair (tuple) of
|
|
861
|
+
(connection, read) timeouts.
|
|
862
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
863
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
864
|
+
request; this effectively ignores the
|
|
865
|
+
authentication in the spec for a single request.
|
|
866
|
+
:type _request_auth: dict, optional
|
|
867
|
+
:param _content_type: force content-type for the request.
|
|
868
|
+
:type _content_type: str, Optional
|
|
869
|
+
:param _headers: set to override the headers for a single
|
|
870
|
+
request; this effectively ignores the headers
|
|
871
|
+
in the spec for a single request.
|
|
872
|
+
:type _headers: dict, optional
|
|
873
|
+
:param _host_index: set to override the host_index for a single
|
|
874
|
+
request; this effectively ignores the host_index
|
|
875
|
+
in the spec for a single request.
|
|
876
|
+
:type _host_index: int, optional
|
|
877
|
+
:return: Returns the result object.
|
|
878
|
+
""" # noqa: E501
|
|
879
|
+
|
|
880
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_get_serialize(
|
|
881
|
+
benchmark_id=benchmark_id,
|
|
882
|
+
participant_id=participant_id,
|
|
883
|
+
_request_auth=_request_auth,
|
|
884
|
+
_content_type=_content_type,
|
|
885
|
+
_headers=_headers,
|
|
886
|
+
_host_index=_host_index
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
890
|
+
'200': "GetParticipantByIdResult",
|
|
891
|
+
}
|
|
892
|
+
response_data = self.api_client.call_api(
|
|
893
|
+
*_param,
|
|
894
|
+
_request_timeout=_request_timeout
|
|
895
|
+
)
|
|
896
|
+
response_data.read()
|
|
897
|
+
return self.api_client.response_deserialize(
|
|
898
|
+
response_data=response_data,
|
|
899
|
+
response_types_map=_response_types_map,
|
|
900
|
+
).data
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
@validate_call
|
|
904
|
+
def benchmark_benchmark_id_participant_participant_id_get_with_http_info(
|
|
905
|
+
self,
|
|
906
|
+
benchmark_id: StrictStr,
|
|
907
|
+
participant_id: StrictStr,
|
|
908
|
+
_request_timeout: Union[
|
|
909
|
+
None,
|
|
910
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
911
|
+
Tuple[
|
|
912
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
913
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
914
|
+
]
|
|
915
|
+
] = None,
|
|
916
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
917
|
+
_content_type: Optional[StrictStr] = None,
|
|
918
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
919
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
920
|
+
) -> ApiResponse[GetParticipantByIdResult]:
|
|
921
|
+
"""Gets a participant by it's Id.
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
:param benchmark_id: (required)
|
|
925
|
+
:type benchmark_id: str
|
|
926
|
+
:param participant_id: (required)
|
|
927
|
+
:type participant_id: str
|
|
928
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
929
|
+
number provided, it will be total request
|
|
930
|
+
timeout. It can also be a pair (tuple) of
|
|
931
|
+
(connection, read) timeouts.
|
|
932
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
933
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
934
|
+
request; this effectively ignores the
|
|
935
|
+
authentication in the spec for a single request.
|
|
936
|
+
:type _request_auth: dict, optional
|
|
937
|
+
:param _content_type: force content-type for the request.
|
|
938
|
+
:type _content_type: str, Optional
|
|
939
|
+
:param _headers: set to override the headers for a single
|
|
940
|
+
request; this effectively ignores the headers
|
|
941
|
+
in the spec for a single request.
|
|
942
|
+
:type _headers: dict, optional
|
|
943
|
+
:param _host_index: set to override the host_index for a single
|
|
944
|
+
request; this effectively ignores the host_index
|
|
945
|
+
in the spec for a single request.
|
|
946
|
+
:type _host_index: int, optional
|
|
947
|
+
:return: Returns the result object.
|
|
948
|
+
""" # noqa: E501
|
|
949
|
+
|
|
950
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_get_serialize(
|
|
951
|
+
benchmark_id=benchmark_id,
|
|
952
|
+
participant_id=participant_id,
|
|
953
|
+
_request_auth=_request_auth,
|
|
954
|
+
_content_type=_content_type,
|
|
955
|
+
_headers=_headers,
|
|
956
|
+
_host_index=_host_index
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
960
|
+
'200': "GetParticipantByIdResult",
|
|
961
|
+
}
|
|
962
|
+
response_data = self.api_client.call_api(
|
|
963
|
+
*_param,
|
|
964
|
+
_request_timeout=_request_timeout
|
|
965
|
+
)
|
|
966
|
+
response_data.read()
|
|
967
|
+
return self.api_client.response_deserialize(
|
|
968
|
+
response_data=response_data,
|
|
969
|
+
response_types_map=_response_types_map,
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
@validate_call
|
|
974
|
+
def benchmark_benchmark_id_participant_participant_id_get_without_preload_content(
|
|
975
|
+
self,
|
|
976
|
+
benchmark_id: StrictStr,
|
|
977
|
+
participant_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
|
+
"""Gets a participant by it's Id.
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
:param benchmark_id: (required)
|
|
995
|
+
:type benchmark_id: str
|
|
996
|
+
:param participant_id: (required)
|
|
997
|
+
:type participant_id: str
|
|
998
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
999
|
+
number provided, it will be total request
|
|
1000
|
+
timeout. It can also be a pair (tuple) of
|
|
1001
|
+
(connection, read) timeouts.
|
|
1002
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1003
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1004
|
+
request; this effectively ignores the
|
|
1005
|
+
authentication in the spec for a single request.
|
|
1006
|
+
:type _request_auth: dict, optional
|
|
1007
|
+
:param _content_type: force content-type for the request.
|
|
1008
|
+
:type _content_type: str, Optional
|
|
1009
|
+
:param _headers: set to override the headers for a single
|
|
1010
|
+
request; this effectively ignores the headers
|
|
1011
|
+
in the spec for a single request.
|
|
1012
|
+
:type _headers: dict, optional
|
|
1013
|
+
:param _host_index: set to override the host_index for a single
|
|
1014
|
+
request; this effectively ignores the host_index
|
|
1015
|
+
in the spec for a single request.
|
|
1016
|
+
:type _host_index: int, optional
|
|
1017
|
+
:return: Returns the result object.
|
|
1018
|
+
""" # noqa: E501
|
|
1019
|
+
|
|
1020
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_get_serialize(
|
|
1021
|
+
benchmark_id=benchmark_id,
|
|
1022
|
+
participant_id=participant_id,
|
|
1023
|
+
_request_auth=_request_auth,
|
|
1024
|
+
_content_type=_content_type,
|
|
1025
|
+
_headers=_headers,
|
|
1026
|
+
_host_index=_host_index
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1030
|
+
'200': "GetParticipantByIdResult",
|
|
1031
|
+
}
|
|
1032
|
+
response_data = self.api_client.call_api(
|
|
1033
|
+
*_param,
|
|
1034
|
+
_request_timeout=_request_timeout
|
|
1035
|
+
)
|
|
1036
|
+
return response_data.response
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
def _benchmark_benchmark_id_participant_participant_id_get_serialize(
|
|
1040
|
+
self,
|
|
1041
|
+
benchmark_id,
|
|
1042
|
+
participant_id,
|
|
1043
|
+
_request_auth,
|
|
1044
|
+
_content_type,
|
|
1045
|
+
_headers,
|
|
1046
|
+
_host_index,
|
|
1047
|
+
) -> RequestSerialized:
|
|
1048
|
+
|
|
1049
|
+
_host = None
|
|
1050
|
+
|
|
1051
|
+
_collection_formats: Dict[str, str] = {
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
_path_params: Dict[str, str] = {}
|
|
1055
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1056
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1057
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1058
|
+
_files: Dict[
|
|
1059
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1060
|
+
] = {}
|
|
1061
|
+
_body_params: Optional[bytes] = None
|
|
1062
|
+
|
|
1063
|
+
# process the path parameters
|
|
1064
|
+
if benchmark_id is not None:
|
|
1065
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
1066
|
+
if participant_id is not None:
|
|
1067
|
+
_path_params['participantId'] = participant_id
|
|
1068
|
+
# process the query parameters
|
|
1069
|
+
# process the header parameters
|
|
1070
|
+
# process the form parameters
|
|
1071
|
+
# process the body parameter
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
# set the HTTP header `Accept`
|
|
1075
|
+
if 'Accept' not in _header_params:
|
|
1076
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1077
|
+
[
|
|
1078
|
+
'text/plain',
|
|
1079
|
+
'application/json',
|
|
1080
|
+
'text/json'
|
|
1081
|
+
]
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
# authentication setting
|
|
1086
|
+
_auth_settings: List[str] = [
|
|
1087
|
+
'bearer',
|
|
1088
|
+
'oauth2'
|
|
1089
|
+
]
|
|
1090
|
+
|
|
1091
|
+
return self.api_client.param_serialize(
|
|
1092
|
+
method='GET',
|
|
1093
|
+
resource_path='/benchmark/{benchmarkId}/participant/{participantId}',
|
|
1094
|
+
path_params=_path_params,
|
|
1095
|
+
query_params=_query_params,
|
|
1096
|
+
header_params=_header_params,
|
|
1097
|
+
body=_body_params,
|
|
1098
|
+
post_params=_form_params,
|
|
1099
|
+
files=_files,
|
|
1100
|
+
auth_settings=_auth_settings,
|
|
1101
|
+
collection_formats=_collection_formats,
|
|
1102
|
+
_host=_host,
|
|
1103
|
+
_request_auth=_request_auth
|
|
1104
|
+
)
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
@validate_call
|
|
1110
|
+
def benchmark_benchmark_id_participants_get(
|
|
1111
|
+
self,
|
|
1112
|
+
benchmark_id: StrictStr,
|
|
1113
|
+
_request_timeout: Union[
|
|
1114
|
+
None,
|
|
1115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1116
|
+
Tuple[
|
|
1117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1119
|
+
]
|
|
1120
|
+
] = None,
|
|
1121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1122
|
+
_content_type: Optional[StrictStr] = None,
|
|
1123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1125
|
+
) -> ParticipantByBenchmarkPagedResult:
|
|
1126
|
+
"""Query all participants within a benchmark
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
:param benchmark_id: (required)
|
|
1130
|
+
:type benchmark_id: str
|
|
1131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1132
|
+
number provided, it will be total request
|
|
1133
|
+
timeout. It can also be a pair (tuple) of
|
|
1134
|
+
(connection, read) timeouts.
|
|
1135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1137
|
+
request; this effectively ignores the
|
|
1138
|
+
authentication in the spec for a single request.
|
|
1139
|
+
:type _request_auth: dict, optional
|
|
1140
|
+
:param _content_type: force content-type for the request.
|
|
1141
|
+
:type _content_type: str, Optional
|
|
1142
|
+
:param _headers: set to override the headers for a single
|
|
1143
|
+
request; this effectively ignores the headers
|
|
1144
|
+
in the spec for a single request.
|
|
1145
|
+
:type _headers: dict, optional
|
|
1146
|
+
:param _host_index: set to override the host_index for a single
|
|
1147
|
+
request; this effectively ignores the host_index
|
|
1148
|
+
in the spec for a single request.
|
|
1149
|
+
:type _host_index: int, optional
|
|
1150
|
+
:return: Returns the result object.
|
|
1151
|
+
""" # noqa: E501
|
|
1152
|
+
|
|
1153
|
+
_param = self._benchmark_benchmark_id_participants_get_serialize(
|
|
1154
|
+
benchmark_id=benchmark_id,
|
|
1155
|
+
_request_auth=_request_auth,
|
|
1156
|
+
_content_type=_content_type,
|
|
1157
|
+
_headers=_headers,
|
|
1158
|
+
_host_index=_host_index
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1162
|
+
'200': "ParticipantByBenchmarkPagedResult",
|
|
1163
|
+
}
|
|
1164
|
+
response_data = self.api_client.call_api(
|
|
1165
|
+
*_param,
|
|
1166
|
+
_request_timeout=_request_timeout
|
|
1167
|
+
)
|
|
1168
|
+
response_data.read()
|
|
1169
|
+
return self.api_client.response_deserialize(
|
|
1170
|
+
response_data=response_data,
|
|
1171
|
+
response_types_map=_response_types_map,
|
|
1172
|
+
).data
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
@validate_call
|
|
1176
|
+
def benchmark_benchmark_id_participants_get_with_http_info(
|
|
1177
|
+
self,
|
|
1178
|
+
benchmark_id: StrictStr,
|
|
1179
|
+
_request_timeout: Union[
|
|
1180
|
+
None,
|
|
1181
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1182
|
+
Tuple[
|
|
1183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1184
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1185
|
+
]
|
|
1186
|
+
] = None,
|
|
1187
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1188
|
+
_content_type: Optional[StrictStr] = None,
|
|
1189
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1190
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1191
|
+
) -> ApiResponse[ParticipantByBenchmarkPagedResult]:
|
|
1192
|
+
"""Query all participants within a benchmark
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
:param benchmark_id: (required)
|
|
1196
|
+
:type benchmark_id: str
|
|
1197
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1198
|
+
number provided, it will be total request
|
|
1199
|
+
timeout. It can also be a pair (tuple) of
|
|
1200
|
+
(connection, read) timeouts.
|
|
1201
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1202
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1203
|
+
request; this effectively ignores the
|
|
1204
|
+
authentication in the spec for a single request.
|
|
1205
|
+
:type _request_auth: dict, optional
|
|
1206
|
+
:param _content_type: force content-type for the request.
|
|
1207
|
+
:type _content_type: str, Optional
|
|
1208
|
+
:param _headers: set to override the headers for a single
|
|
1209
|
+
request; this effectively ignores the headers
|
|
1210
|
+
in the spec for a single request.
|
|
1211
|
+
:type _headers: dict, optional
|
|
1212
|
+
:param _host_index: set to override the host_index for a single
|
|
1213
|
+
request; this effectively ignores the host_index
|
|
1214
|
+
in the spec for a single request.
|
|
1215
|
+
:type _host_index: int, optional
|
|
1216
|
+
:return: Returns the result object.
|
|
1217
|
+
""" # noqa: E501
|
|
1218
|
+
|
|
1219
|
+
_param = self._benchmark_benchmark_id_participants_get_serialize(
|
|
1220
|
+
benchmark_id=benchmark_id,
|
|
1221
|
+
_request_auth=_request_auth,
|
|
1222
|
+
_content_type=_content_type,
|
|
1223
|
+
_headers=_headers,
|
|
1224
|
+
_host_index=_host_index
|
|
1225
|
+
)
|
|
1226
|
+
|
|
1227
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1228
|
+
'200': "ParticipantByBenchmarkPagedResult",
|
|
1229
|
+
}
|
|
1230
|
+
response_data = self.api_client.call_api(
|
|
1231
|
+
*_param,
|
|
1232
|
+
_request_timeout=_request_timeout
|
|
1233
|
+
)
|
|
1234
|
+
response_data.read()
|
|
1235
|
+
return self.api_client.response_deserialize(
|
|
1236
|
+
response_data=response_data,
|
|
1237
|
+
response_types_map=_response_types_map,
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
@validate_call
|
|
1242
|
+
def benchmark_benchmark_id_participants_get_without_preload_content(
|
|
1243
|
+
self,
|
|
1244
|
+
benchmark_id: StrictStr,
|
|
1245
|
+
_request_timeout: Union[
|
|
1246
|
+
None,
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1248
|
+
Tuple[
|
|
1249
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1250
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1251
|
+
]
|
|
1252
|
+
] = None,
|
|
1253
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1254
|
+
_content_type: Optional[StrictStr] = None,
|
|
1255
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1256
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1257
|
+
) -> RESTResponseType:
|
|
1258
|
+
"""Query all participants within a benchmark
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
:param benchmark_id: (required)
|
|
1262
|
+
:type benchmark_id: str
|
|
1263
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1264
|
+
number provided, it will be total request
|
|
1265
|
+
timeout. It can also be a pair (tuple) of
|
|
1266
|
+
(connection, read) timeouts.
|
|
1267
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1268
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1269
|
+
request; this effectively ignores the
|
|
1270
|
+
authentication in the spec for a single request.
|
|
1271
|
+
:type _request_auth: dict, optional
|
|
1272
|
+
:param _content_type: force content-type for the request.
|
|
1273
|
+
:type _content_type: str, Optional
|
|
1274
|
+
:param _headers: set to override the headers for a single
|
|
1275
|
+
request; this effectively ignores the headers
|
|
1276
|
+
in the spec for a single request.
|
|
1277
|
+
:type _headers: dict, optional
|
|
1278
|
+
:param _host_index: set to override the host_index for a single
|
|
1279
|
+
request; this effectively ignores the host_index
|
|
1280
|
+
in the spec for a single request.
|
|
1281
|
+
:type _host_index: int, optional
|
|
1282
|
+
:return: Returns the result object.
|
|
1283
|
+
""" # noqa: E501
|
|
1284
|
+
|
|
1285
|
+
_param = self._benchmark_benchmark_id_participants_get_serialize(
|
|
1286
|
+
benchmark_id=benchmark_id,
|
|
1287
|
+
_request_auth=_request_auth,
|
|
1288
|
+
_content_type=_content_type,
|
|
1289
|
+
_headers=_headers,
|
|
1290
|
+
_host_index=_host_index
|
|
1291
|
+
)
|
|
1292
|
+
|
|
1293
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1294
|
+
'200': "ParticipantByBenchmarkPagedResult",
|
|
1295
|
+
}
|
|
1296
|
+
response_data = self.api_client.call_api(
|
|
1297
|
+
*_param,
|
|
1298
|
+
_request_timeout=_request_timeout
|
|
1299
|
+
)
|
|
1300
|
+
return response_data.response
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
def _benchmark_benchmark_id_participants_get_serialize(
|
|
1304
|
+
self,
|
|
1305
|
+
benchmark_id,
|
|
1306
|
+
_request_auth,
|
|
1307
|
+
_content_type,
|
|
1308
|
+
_headers,
|
|
1309
|
+
_host_index,
|
|
1310
|
+
) -> RequestSerialized:
|
|
1311
|
+
|
|
1312
|
+
_host = None
|
|
1313
|
+
|
|
1314
|
+
_collection_formats: Dict[str, str] = {
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
_path_params: Dict[str, str] = {}
|
|
1318
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1319
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1320
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1321
|
+
_files: Dict[
|
|
1322
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1323
|
+
] = {}
|
|
1324
|
+
_body_params: Optional[bytes] = None
|
|
1325
|
+
|
|
1326
|
+
# process the path parameters
|
|
1327
|
+
if benchmark_id is not None:
|
|
1328
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
1329
|
+
# process the query parameters
|
|
1330
|
+
# process the header parameters
|
|
1331
|
+
# process the form parameters
|
|
1332
|
+
# process the body parameter
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
# set the HTTP header `Accept`
|
|
1336
|
+
if 'Accept' not in _header_params:
|
|
1337
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1338
|
+
[
|
|
1339
|
+
'text/plain',
|
|
1340
|
+
'application/json',
|
|
1341
|
+
'text/json'
|
|
1342
|
+
]
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
# authentication setting
|
|
1347
|
+
_auth_settings: List[str] = [
|
|
1348
|
+
'bearer',
|
|
1349
|
+
'oauth2'
|
|
1350
|
+
]
|
|
1351
|
+
|
|
1352
|
+
return self.api_client.param_serialize(
|
|
1353
|
+
method='GET',
|
|
1354
|
+
resource_path='/benchmark/{benchmarkId}/participants',
|
|
1355
|
+
path_params=_path_params,
|
|
1356
|
+
query_params=_query_params,
|
|
1357
|
+
header_params=_header_params,
|
|
1358
|
+
body=_body_params,
|
|
1359
|
+
post_params=_form_params,
|
|
1360
|
+
files=_files,
|
|
1361
|
+
auth_settings=_auth_settings,
|
|
1362
|
+
collection_formats=_collection_formats,
|
|
1363
|
+
_host=_host,
|
|
1364
|
+
_request_auth=_request_auth
|
|
1365
|
+
)
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
@validate_call
|
|
1371
|
+
def benchmark_benchmark_id_participants_participant_id_submit_post(
|
|
1372
|
+
self,
|
|
1373
|
+
benchmark_id: StrictStr,
|
|
1374
|
+
participant_id: StrictStr,
|
|
1375
|
+
_request_timeout: Union[
|
|
1376
|
+
None,
|
|
1377
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1378
|
+
Tuple[
|
|
1379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1380
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1381
|
+
]
|
|
1382
|
+
] = None,
|
|
1383
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1384
|
+
_content_type: Optional[StrictStr] = None,
|
|
1385
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1386
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1387
|
+
) -> SubmitParticipantResult:
|
|
1388
|
+
"""Submits a participant to a benchmark.
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
:param benchmark_id: (required)
|
|
1392
|
+
:type benchmark_id: str
|
|
1393
|
+
:param participant_id: (required)
|
|
1394
|
+
:type participant_id: str
|
|
1395
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1396
|
+
number provided, it will be total request
|
|
1397
|
+
timeout. It can also be a pair (tuple) of
|
|
1398
|
+
(connection, read) timeouts.
|
|
1399
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1400
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1401
|
+
request; this effectively ignores the
|
|
1402
|
+
authentication in the spec for a single request.
|
|
1403
|
+
:type _request_auth: dict, optional
|
|
1404
|
+
:param _content_type: force content-type for the request.
|
|
1405
|
+
:type _content_type: str, Optional
|
|
1406
|
+
:param _headers: set to override the headers for a single
|
|
1407
|
+
request; this effectively ignores the headers
|
|
1408
|
+
in the spec for a single request.
|
|
1409
|
+
:type _headers: dict, optional
|
|
1410
|
+
:param _host_index: set to override the host_index for a single
|
|
1411
|
+
request; this effectively ignores the host_index
|
|
1412
|
+
in the spec for a single request.
|
|
1413
|
+
:type _host_index: int, optional
|
|
1414
|
+
:return: Returns the result object.
|
|
1415
|
+
""" # noqa: E501
|
|
1416
|
+
|
|
1417
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
|
|
1418
|
+
benchmark_id=benchmark_id,
|
|
1419
|
+
participant_id=participant_id,
|
|
1420
|
+
_request_auth=_request_auth,
|
|
1421
|
+
_content_type=_content_type,
|
|
1422
|
+
_headers=_headers,
|
|
1423
|
+
_host_index=_host_index
|
|
1424
|
+
)
|
|
1425
|
+
|
|
1426
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1427
|
+
'200': "SubmitParticipantResult",
|
|
1428
|
+
}
|
|
1429
|
+
response_data = self.api_client.call_api(
|
|
1430
|
+
*_param,
|
|
1431
|
+
_request_timeout=_request_timeout
|
|
1432
|
+
)
|
|
1433
|
+
response_data.read()
|
|
1434
|
+
return self.api_client.response_deserialize(
|
|
1435
|
+
response_data=response_data,
|
|
1436
|
+
response_types_map=_response_types_map,
|
|
1437
|
+
).data
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
@validate_call
|
|
1441
|
+
def benchmark_benchmark_id_participants_participant_id_submit_post_with_http_info(
|
|
1442
|
+
self,
|
|
1443
|
+
benchmark_id: StrictStr,
|
|
1444
|
+
participant_id: StrictStr,
|
|
1445
|
+
_request_timeout: Union[
|
|
1446
|
+
None,
|
|
1447
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1448
|
+
Tuple[
|
|
1449
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1450
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1451
|
+
]
|
|
1452
|
+
] = None,
|
|
1453
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1454
|
+
_content_type: Optional[StrictStr] = None,
|
|
1455
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1456
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1457
|
+
) -> ApiResponse[SubmitParticipantResult]:
|
|
1458
|
+
"""Submits a participant to a benchmark.
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
:param benchmark_id: (required)
|
|
1462
|
+
:type benchmark_id: str
|
|
1463
|
+
:param participant_id: (required)
|
|
1464
|
+
:type participant_id: str
|
|
1465
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1466
|
+
number provided, it will be total request
|
|
1467
|
+
timeout. It can also be a pair (tuple) of
|
|
1468
|
+
(connection, read) timeouts.
|
|
1469
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1470
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1471
|
+
request; this effectively ignores the
|
|
1472
|
+
authentication in the spec for a single request.
|
|
1473
|
+
:type _request_auth: dict, optional
|
|
1474
|
+
:param _content_type: force content-type for the request.
|
|
1475
|
+
:type _content_type: str, Optional
|
|
1476
|
+
:param _headers: set to override the headers for a single
|
|
1477
|
+
request; this effectively ignores the headers
|
|
1478
|
+
in the spec for a single request.
|
|
1479
|
+
:type _headers: dict, optional
|
|
1480
|
+
:param _host_index: set to override the host_index for a single
|
|
1481
|
+
request; this effectively ignores the host_index
|
|
1482
|
+
in the spec for a single request.
|
|
1483
|
+
:type _host_index: int, optional
|
|
1484
|
+
:return: Returns the result object.
|
|
1485
|
+
""" # noqa: E501
|
|
1486
|
+
|
|
1487
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
|
|
1488
|
+
benchmark_id=benchmark_id,
|
|
1489
|
+
participant_id=participant_id,
|
|
1490
|
+
_request_auth=_request_auth,
|
|
1491
|
+
_content_type=_content_type,
|
|
1492
|
+
_headers=_headers,
|
|
1493
|
+
_host_index=_host_index
|
|
1494
|
+
)
|
|
1495
|
+
|
|
1496
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1497
|
+
'200': "SubmitParticipantResult",
|
|
1498
|
+
}
|
|
1499
|
+
response_data = self.api_client.call_api(
|
|
1500
|
+
*_param,
|
|
1501
|
+
_request_timeout=_request_timeout
|
|
1502
|
+
)
|
|
1503
|
+
response_data.read()
|
|
1504
|
+
return self.api_client.response_deserialize(
|
|
1505
|
+
response_data=response_data,
|
|
1506
|
+
response_types_map=_response_types_map,
|
|
1507
|
+
)
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
@validate_call
|
|
1511
|
+
def benchmark_benchmark_id_participants_participant_id_submit_post_without_preload_content(
|
|
1512
|
+
self,
|
|
1513
|
+
benchmark_id: StrictStr,
|
|
1514
|
+
participant_id: StrictStr,
|
|
1515
|
+
_request_timeout: Union[
|
|
1516
|
+
None,
|
|
1517
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1518
|
+
Tuple[
|
|
1519
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1520
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1521
|
+
]
|
|
1522
|
+
] = None,
|
|
1523
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1524
|
+
_content_type: Optional[StrictStr] = None,
|
|
1525
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1527
|
+
) -> RESTResponseType:
|
|
1528
|
+
"""Submits a participant to a benchmark.
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
:param benchmark_id: (required)
|
|
1532
|
+
:type benchmark_id: str
|
|
1533
|
+
:param participant_id: (required)
|
|
1534
|
+
:type participant_id: str
|
|
1535
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1536
|
+
number provided, it will be total request
|
|
1537
|
+
timeout. It can also be a pair (tuple) of
|
|
1538
|
+
(connection, read) timeouts.
|
|
1539
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1540
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1541
|
+
request; this effectively ignores the
|
|
1542
|
+
authentication in the spec for a single request.
|
|
1543
|
+
:type _request_auth: dict, optional
|
|
1544
|
+
:param _content_type: force content-type for the request.
|
|
1545
|
+
:type _content_type: str, Optional
|
|
1546
|
+
:param _headers: set to override the headers for a single
|
|
1547
|
+
request; this effectively ignores the headers
|
|
1548
|
+
in the spec for a single request.
|
|
1549
|
+
:type _headers: dict, optional
|
|
1550
|
+
:param _host_index: set to override the host_index for a single
|
|
1551
|
+
request; this effectively ignores the host_index
|
|
1552
|
+
in the spec for a single request.
|
|
1553
|
+
:type _host_index: int, optional
|
|
1554
|
+
:return: Returns the result object.
|
|
1555
|
+
""" # noqa: E501
|
|
1556
|
+
|
|
1557
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
|
|
1558
|
+
benchmark_id=benchmark_id,
|
|
1559
|
+
participant_id=participant_id,
|
|
1560
|
+
_request_auth=_request_auth,
|
|
1561
|
+
_content_type=_content_type,
|
|
1562
|
+
_headers=_headers,
|
|
1563
|
+
_host_index=_host_index
|
|
1564
|
+
)
|
|
1565
|
+
|
|
1566
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1567
|
+
'200': "SubmitParticipantResult",
|
|
1568
|
+
}
|
|
1569
|
+
response_data = self.api_client.call_api(
|
|
1570
|
+
*_param,
|
|
1571
|
+
_request_timeout=_request_timeout
|
|
1572
|
+
)
|
|
1573
|
+
return response_data.response
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
def _benchmark_benchmark_id_participants_participant_id_submit_post_serialize(
|
|
1577
|
+
self,
|
|
1578
|
+
benchmark_id,
|
|
1579
|
+
participant_id,
|
|
1580
|
+
_request_auth,
|
|
1581
|
+
_content_type,
|
|
1582
|
+
_headers,
|
|
1583
|
+
_host_index,
|
|
1584
|
+
) -> RequestSerialized:
|
|
1585
|
+
|
|
1586
|
+
_host = None
|
|
1587
|
+
|
|
1588
|
+
_collection_formats: Dict[str, str] = {
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
_path_params: Dict[str, str] = {}
|
|
1592
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1593
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1594
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1595
|
+
_files: Dict[
|
|
1596
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1597
|
+
] = {}
|
|
1598
|
+
_body_params: Optional[bytes] = None
|
|
1599
|
+
|
|
1600
|
+
# process the path parameters
|
|
1601
|
+
if benchmark_id is not None:
|
|
1602
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
1603
|
+
if participant_id is not None:
|
|
1604
|
+
_path_params['participantId'] = participant_id
|
|
1605
|
+
# process the query parameters
|
|
1606
|
+
# process the header parameters
|
|
1607
|
+
# process the form parameters
|
|
1608
|
+
# process the body parameter
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
# set the HTTP header `Accept`
|
|
1612
|
+
if 'Accept' not in _header_params:
|
|
1613
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1614
|
+
[
|
|
1615
|
+
'text/plain',
|
|
1616
|
+
'application/json',
|
|
1617
|
+
'text/json'
|
|
1618
|
+
]
|
|
1619
|
+
)
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
# authentication setting
|
|
1623
|
+
_auth_settings: List[str] = [
|
|
1624
|
+
'bearer',
|
|
1625
|
+
'oauth2'
|
|
1626
|
+
]
|
|
1627
|
+
|
|
1628
|
+
return self.api_client.param_serialize(
|
|
1629
|
+
method='POST',
|
|
1630
|
+
resource_path='/benchmark/{benchmarkId}/participants/{participantId}/submit',
|
|
1631
|
+
path_params=_path_params,
|
|
1632
|
+
query_params=_query_params,
|
|
1633
|
+
header_params=_header_params,
|
|
1634
|
+
body=_body_params,
|
|
1635
|
+
post_params=_form_params,
|
|
1636
|
+
files=_files,
|
|
1637
|
+
auth_settings=_auth_settings,
|
|
1638
|
+
collection_formats=_collection_formats,
|
|
1639
|
+
_host=_host,
|
|
1640
|
+
_request_auth=_request_auth
|
|
1641
|
+
)
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
@validate_call
|
|
1647
|
+
def benchmark_benchmark_id_participants_post(
|
|
1648
|
+
self,
|
|
1649
|
+
benchmark_id: StrictStr,
|
|
1650
|
+
create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
|
|
1651
|
+
_request_timeout: Union[
|
|
1652
|
+
None,
|
|
1653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1654
|
+
Tuple[
|
|
1655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1656
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1657
|
+
]
|
|
1658
|
+
] = None,
|
|
1659
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1660
|
+
_content_type: Optional[StrictStr] = None,
|
|
1661
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1662
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1663
|
+
) -> CreateBenchmarkParticipantResult:
|
|
1664
|
+
"""Creates a participant in a benchmark.
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
:param benchmark_id: (required)
|
|
1668
|
+
:type benchmark_id: str
|
|
1669
|
+
:param create_benchmark_participant_model:
|
|
1670
|
+
:type create_benchmark_participant_model: CreateBenchmarkParticipantModel
|
|
1671
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1672
|
+
number provided, it will be total request
|
|
1673
|
+
timeout. It can also be a pair (tuple) of
|
|
1674
|
+
(connection, read) timeouts.
|
|
1675
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1676
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1677
|
+
request; this effectively ignores the
|
|
1678
|
+
authentication in the spec for a single request.
|
|
1679
|
+
:type _request_auth: dict, optional
|
|
1680
|
+
:param _content_type: force content-type for the request.
|
|
1681
|
+
:type _content_type: str, Optional
|
|
1682
|
+
:param _headers: set to override the headers for a single
|
|
1683
|
+
request; this effectively ignores the headers
|
|
1684
|
+
in the spec for a single request.
|
|
1685
|
+
:type _headers: dict, optional
|
|
1686
|
+
:param _host_index: set to override the host_index for a single
|
|
1687
|
+
request; this effectively ignores the host_index
|
|
1688
|
+
in the spec for a single request.
|
|
1689
|
+
:type _host_index: int, optional
|
|
1690
|
+
:return: Returns the result object.
|
|
1691
|
+
""" # noqa: E501
|
|
1692
|
+
|
|
1693
|
+
_param = self._benchmark_benchmark_id_participants_post_serialize(
|
|
1694
|
+
benchmark_id=benchmark_id,
|
|
1695
|
+
create_benchmark_participant_model=create_benchmark_participant_model,
|
|
1696
|
+
_request_auth=_request_auth,
|
|
1697
|
+
_content_type=_content_type,
|
|
1698
|
+
_headers=_headers,
|
|
1699
|
+
_host_index=_host_index
|
|
1700
|
+
)
|
|
1701
|
+
|
|
1702
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1703
|
+
'200': "CreateBenchmarkParticipantResult",
|
|
1704
|
+
}
|
|
1705
|
+
response_data = self.api_client.call_api(
|
|
1706
|
+
*_param,
|
|
1707
|
+
_request_timeout=_request_timeout
|
|
1708
|
+
)
|
|
1709
|
+
response_data.read()
|
|
1710
|
+
return self.api_client.response_deserialize(
|
|
1711
|
+
response_data=response_data,
|
|
1712
|
+
response_types_map=_response_types_map,
|
|
1713
|
+
).data
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
@validate_call
|
|
1717
|
+
def benchmark_benchmark_id_participants_post_with_http_info(
|
|
1718
|
+
self,
|
|
1719
|
+
benchmark_id: StrictStr,
|
|
1720
|
+
create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
|
|
1721
|
+
_request_timeout: Union[
|
|
1722
|
+
None,
|
|
1723
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1724
|
+
Tuple[
|
|
1725
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1726
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1727
|
+
]
|
|
1728
|
+
] = None,
|
|
1729
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1730
|
+
_content_type: Optional[StrictStr] = None,
|
|
1731
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1732
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1733
|
+
) -> ApiResponse[CreateBenchmarkParticipantResult]:
|
|
1734
|
+
"""Creates a participant in a benchmark.
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
:param benchmark_id: (required)
|
|
1738
|
+
:type benchmark_id: str
|
|
1739
|
+
:param create_benchmark_participant_model:
|
|
1740
|
+
:type create_benchmark_participant_model: CreateBenchmarkParticipantModel
|
|
1741
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1742
|
+
number provided, it will be total request
|
|
1743
|
+
timeout. It can also be a pair (tuple) of
|
|
1744
|
+
(connection, read) timeouts.
|
|
1745
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1746
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1747
|
+
request; this effectively ignores the
|
|
1748
|
+
authentication in the spec for a single request.
|
|
1749
|
+
:type _request_auth: dict, optional
|
|
1750
|
+
:param _content_type: force content-type for the request.
|
|
1751
|
+
:type _content_type: str, Optional
|
|
1752
|
+
:param _headers: set to override the headers for a single
|
|
1753
|
+
request; this effectively ignores the headers
|
|
1754
|
+
in the spec for a single request.
|
|
1755
|
+
:type _headers: dict, optional
|
|
1756
|
+
:param _host_index: set to override the host_index for a single
|
|
1757
|
+
request; this effectively ignores the host_index
|
|
1758
|
+
in the spec for a single request.
|
|
1759
|
+
:type _host_index: int, optional
|
|
1760
|
+
:return: Returns the result object.
|
|
1761
|
+
""" # noqa: E501
|
|
1762
|
+
|
|
1763
|
+
_param = self._benchmark_benchmark_id_participants_post_serialize(
|
|
1764
|
+
benchmark_id=benchmark_id,
|
|
1765
|
+
create_benchmark_participant_model=create_benchmark_participant_model,
|
|
1766
|
+
_request_auth=_request_auth,
|
|
1767
|
+
_content_type=_content_type,
|
|
1768
|
+
_headers=_headers,
|
|
1769
|
+
_host_index=_host_index
|
|
1770
|
+
)
|
|
1771
|
+
|
|
1772
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1773
|
+
'200': "CreateBenchmarkParticipantResult",
|
|
1774
|
+
}
|
|
1775
|
+
response_data = self.api_client.call_api(
|
|
1776
|
+
*_param,
|
|
1777
|
+
_request_timeout=_request_timeout
|
|
1778
|
+
)
|
|
1779
|
+
response_data.read()
|
|
1780
|
+
return self.api_client.response_deserialize(
|
|
1781
|
+
response_data=response_data,
|
|
1782
|
+
response_types_map=_response_types_map,
|
|
1783
|
+
)
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
@validate_call
|
|
1787
|
+
def benchmark_benchmark_id_participants_post_without_preload_content(
|
|
1788
|
+
self,
|
|
1789
|
+
benchmark_id: StrictStr,
|
|
1790
|
+
create_benchmark_participant_model: Optional[CreateBenchmarkParticipantModel] = None,
|
|
1791
|
+
_request_timeout: Union[
|
|
1792
|
+
None,
|
|
1793
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1794
|
+
Tuple[
|
|
1795
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1796
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1797
|
+
]
|
|
1798
|
+
] = None,
|
|
1799
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1800
|
+
_content_type: Optional[StrictStr] = None,
|
|
1801
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1802
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1803
|
+
) -> RESTResponseType:
|
|
1804
|
+
"""Creates a participant in a benchmark.
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
:param benchmark_id: (required)
|
|
1808
|
+
:type benchmark_id: str
|
|
1809
|
+
:param create_benchmark_participant_model:
|
|
1810
|
+
:type create_benchmark_participant_model: CreateBenchmarkParticipantModel
|
|
1811
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1812
|
+
number provided, it will be total request
|
|
1813
|
+
timeout. It can also be a pair (tuple) of
|
|
1814
|
+
(connection, read) timeouts.
|
|
1815
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1816
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1817
|
+
request; this effectively ignores the
|
|
1818
|
+
authentication in the spec for a single request.
|
|
1819
|
+
:type _request_auth: dict, optional
|
|
1820
|
+
:param _content_type: force content-type for the request.
|
|
1821
|
+
:type _content_type: str, Optional
|
|
1822
|
+
:param _headers: set to override the headers for a single
|
|
1823
|
+
request; this effectively ignores the headers
|
|
1824
|
+
in the spec for a single request.
|
|
1825
|
+
:type _headers: dict, optional
|
|
1826
|
+
:param _host_index: set to override the host_index for a single
|
|
1827
|
+
request; this effectively ignores the host_index
|
|
1828
|
+
in the spec for a single request.
|
|
1829
|
+
:type _host_index: int, optional
|
|
1830
|
+
:return: Returns the result object.
|
|
1831
|
+
""" # noqa: E501
|
|
1832
|
+
|
|
1833
|
+
_param = self._benchmark_benchmark_id_participants_post_serialize(
|
|
1834
|
+
benchmark_id=benchmark_id,
|
|
1835
|
+
create_benchmark_participant_model=create_benchmark_participant_model,
|
|
1836
|
+
_request_auth=_request_auth,
|
|
1837
|
+
_content_type=_content_type,
|
|
1838
|
+
_headers=_headers,
|
|
1839
|
+
_host_index=_host_index
|
|
1840
|
+
)
|
|
1841
|
+
|
|
1842
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1843
|
+
'200': "CreateBenchmarkParticipantResult",
|
|
1844
|
+
}
|
|
1845
|
+
response_data = self.api_client.call_api(
|
|
1846
|
+
*_param,
|
|
1847
|
+
_request_timeout=_request_timeout
|
|
1848
|
+
)
|
|
1849
|
+
return response_data.response
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
def _benchmark_benchmark_id_participants_post_serialize(
|
|
1853
|
+
self,
|
|
1854
|
+
benchmark_id,
|
|
1855
|
+
create_benchmark_participant_model,
|
|
1856
|
+
_request_auth,
|
|
1857
|
+
_content_type,
|
|
1858
|
+
_headers,
|
|
1859
|
+
_host_index,
|
|
1860
|
+
) -> RequestSerialized:
|
|
1861
|
+
|
|
1862
|
+
_host = None
|
|
1863
|
+
|
|
1864
|
+
_collection_formats: Dict[str, str] = {
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
_path_params: Dict[str, str] = {}
|
|
1868
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1869
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1870
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1871
|
+
_files: Dict[
|
|
1872
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1873
|
+
] = {}
|
|
1874
|
+
_body_params: Optional[bytes] = None
|
|
1875
|
+
|
|
1876
|
+
# process the path parameters
|
|
1877
|
+
if benchmark_id is not None:
|
|
1878
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
1879
|
+
# process the query parameters
|
|
1880
|
+
# process the header parameters
|
|
1881
|
+
# process the form parameters
|
|
1882
|
+
# process the body parameter
|
|
1883
|
+
if create_benchmark_participant_model is not None:
|
|
1884
|
+
_body_params = create_benchmark_participant_model
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
# set the HTTP header `Accept`
|
|
1888
|
+
if 'Accept' not in _header_params:
|
|
1889
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1890
|
+
[
|
|
1891
|
+
'text/plain',
|
|
1892
|
+
'application/json',
|
|
1893
|
+
'text/json'
|
|
1894
|
+
]
|
|
1895
|
+
)
|
|
1896
|
+
|
|
1897
|
+
# set the HTTP header `Content-Type`
|
|
1898
|
+
if _content_type:
|
|
1899
|
+
_header_params['Content-Type'] = _content_type
|
|
1900
|
+
else:
|
|
1901
|
+
_default_content_type = (
|
|
1902
|
+
self.api_client.select_header_content_type(
|
|
1903
|
+
[
|
|
1904
|
+
'application/json',
|
|
1905
|
+
'text/json',
|
|
1906
|
+
'application/*+json'
|
|
1907
|
+
]
|
|
1908
|
+
)
|
|
1909
|
+
)
|
|
1910
|
+
if _default_content_type is not None:
|
|
1911
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1912
|
+
|
|
1913
|
+
# authentication setting
|
|
1914
|
+
_auth_settings: List[str] = [
|
|
1915
|
+
'bearer',
|
|
1916
|
+
'oauth2'
|
|
1917
|
+
]
|
|
1918
|
+
|
|
1919
|
+
return self.api_client.param_serialize(
|
|
1920
|
+
method='POST',
|
|
1921
|
+
resource_path='/benchmark/{benchmarkId}/participants',
|
|
1922
|
+
path_params=_path_params,
|
|
1923
|
+
query_params=_query_params,
|
|
1924
|
+
header_params=_header_params,
|
|
1925
|
+
body=_body_params,
|
|
1926
|
+
post_params=_form_params,
|
|
1927
|
+
files=_files,
|
|
1928
|
+
auth_settings=_auth_settings,
|
|
1929
|
+
collection_formats=_collection_formats,
|
|
1930
|
+
_host=_host,
|
|
1931
|
+
_request_auth=_request_auth
|
|
1932
|
+
)
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
@validate_call
|
|
1938
|
+
def benchmark_benchmark_id_prompt_post(
|
|
1939
|
+
self,
|
|
1940
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
|
|
1941
|
+
submit_prompt_model: Optional[SubmitPromptModel] = None,
|
|
1942
|
+
_request_timeout: Union[
|
|
1943
|
+
None,
|
|
1944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1945
|
+
Tuple[
|
|
1946
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1947
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1948
|
+
]
|
|
1949
|
+
] = None,
|
|
1950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1951
|
+
_content_type: Optional[StrictStr] = None,
|
|
1952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1954
|
+
) -> None:
|
|
1955
|
+
"""Adds a new prompt to a benchmark.
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
:param benchmark_id: The benchmark id. (required)
|
|
1959
|
+
:type benchmark_id: str
|
|
1960
|
+
:param submit_prompt_model:
|
|
1961
|
+
:type submit_prompt_model: SubmitPromptModel
|
|
1962
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1963
|
+
number provided, it will be total request
|
|
1964
|
+
timeout. It can also be a pair (tuple) of
|
|
1965
|
+
(connection, read) timeouts.
|
|
1966
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1967
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1968
|
+
request; this effectively ignores the
|
|
1969
|
+
authentication in the spec for a single request.
|
|
1970
|
+
:type _request_auth: dict, optional
|
|
1971
|
+
:param _content_type: force content-type for the request.
|
|
1972
|
+
:type _content_type: str, Optional
|
|
1973
|
+
:param _headers: set to override the headers for a single
|
|
1974
|
+
request; this effectively ignores the headers
|
|
1975
|
+
in the spec for a single request.
|
|
1976
|
+
:type _headers: dict, optional
|
|
1977
|
+
:param _host_index: set to override the host_index for a single
|
|
1978
|
+
request; this effectively ignores the host_index
|
|
1979
|
+
in the spec for a single request.
|
|
1980
|
+
:type _host_index: int, optional
|
|
1981
|
+
:return: Returns the result object.
|
|
1982
|
+
""" # noqa: E501
|
|
1983
|
+
|
|
1984
|
+
_param = self._benchmark_benchmark_id_prompt_post_serialize(
|
|
1985
|
+
benchmark_id=benchmark_id,
|
|
1986
|
+
submit_prompt_model=submit_prompt_model,
|
|
1987
|
+
_request_auth=_request_auth,
|
|
1988
|
+
_content_type=_content_type,
|
|
1989
|
+
_headers=_headers,
|
|
1990
|
+
_host_index=_host_index
|
|
1991
|
+
)
|
|
1992
|
+
|
|
1993
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1994
|
+
'204': None,
|
|
1995
|
+
}
|
|
1996
|
+
response_data = self.api_client.call_api(
|
|
1997
|
+
*_param,
|
|
1998
|
+
_request_timeout=_request_timeout
|
|
1999
|
+
)
|
|
2000
|
+
response_data.read()
|
|
2001
|
+
return self.api_client.response_deserialize(
|
|
2002
|
+
response_data=response_data,
|
|
2003
|
+
response_types_map=_response_types_map,
|
|
2004
|
+
).data
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
@validate_call
|
|
2008
|
+
def benchmark_benchmark_id_prompt_post_with_http_info(
|
|
2009
|
+
self,
|
|
2010
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
|
|
2011
|
+
submit_prompt_model: Optional[SubmitPromptModel] = None,
|
|
2012
|
+
_request_timeout: Union[
|
|
2013
|
+
None,
|
|
2014
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2015
|
+
Tuple[
|
|
2016
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2017
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2018
|
+
]
|
|
2019
|
+
] = None,
|
|
2020
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2021
|
+
_content_type: Optional[StrictStr] = None,
|
|
2022
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2023
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2024
|
+
) -> ApiResponse[None]:
|
|
2025
|
+
"""Adds a new prompt to a benchmark.
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
:param benchmark_id: The benchmark id. (required)
|
|
2029
|
+
:type benchmark_id: str
|
|
2030
|
+
:param submit_prompt_model:
|
|
2031
|
+
:type submit_prompt_model: SubmitPromptModel
|
|
2032
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2033
|
+
number provided, it will be total request
|
|
2034
|
+
timeout. It can also be a pair (tuple) of
|
|
2035
|
+
(connection, read) timeouts.
|
|
2036
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2037
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2038
|
+
request; this effectively ignores the
|
|
2039
|
+
authentication in the spec for a single request.
|
|
2040
|
+
:type _request_auth: dict, optional
|
|
2041
|
+
:param _content_type: force content-type for the request.
|
|
2042
|
+
:type _content_type: str, Optional
|
|
2043
|
+
:param _headers: set to override the headers for a single
|
|
2044
|
+
request; this effectively ignores the headers
|
|
2045
|
+
in the spec for a single request.
|
|
2046
|
+
:type _headers: dict, optional
|
|
2047
|
+
:param _host_index: set to override the host_index for a single
|
|
2048
|
+
request; this effectively ignores the host_index
|
|
2049
|
+
in the spec for a single request.
|
|
2050
|
+
:type _host_index: int, optional
|
|
2051
|
+
:return: Returns the result object.
|
|
2052
|
+
""" # noqa: E501
|
|
2053
|
+
|
|
2054
|
+
_param = self._benchmark_benchmark_id_prompt_post_serialize(
|
|
2055
|
+
benchmark_id=benchmark_id,
|
|
2056
|
+
submit_prompt_model=submit_prompt_model,
|
|
2057
|
+
_request_auth=_request_auth,
|
|
2058
|
+
_content_type=_content_type,
|
|
2059
|
+
_headers=_headers,
|
|
2060
|
+
_host_index=_host_index
|
|
2061
|
+
)
|
|
2062
|
+
|
|
2063
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2064
|
+
'204': None,
|
|
2065
|
+
}
|
|
2066
|
+
response_data = self.api_client.call_api(
|
|
2067
|
+
*_param,
|
|
2068
|
+
_request_timeout=_request_timeout
|
|
2069
|
+
)
|
|
2070
|
+
response_data.read()
|
|
2071
|
+
return self.api_client.response_deserialize(
|
|
2072
|
+
response_data=response_data,
|
|
2073
|
+
response_types_map=_response_types_map,
|
|
2074
|
+
)
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
@validate_call
|
|
2078
|
+
def benchmark_benchmark_id_prompt_post_without_preload_content(
|
|
2079
|
+
self,
|
|
2080
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark id.")],
|
|
2081
|
+
submit_prompt_model: Optional[SubmitPromptModel] = None,
|
|
2082
|
+
_request_timeout: Union[
|
|
2083
|
+
None,
|
|
2084
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2085
|
+
Tuple[
|
|
2086
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2087
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2088
|
+
]
|
|
2089
|
+
] = None,
|
|
2090
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2091
|
+
_content_type: Optional[StrictStr] = None,
|
|
2092
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2093
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2094
|
+
) -> RESTResponseType:
|
|
2095
|
+
"""Adds a new prompt to a benchmark.
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
:param benchmark_id: The benchmark id. (required)
|
|
2099
|
+
:type benchmark_id: str
|
|
2100
|
+
:param submit_prompt_model:
|
|
2101
|
+
:type submit_prompt_model: SubmitPromptModel
|
|
2102
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2103
|
+
number provided, it will be total request
|
|
2104
|
+
timeout. It can also be a pair (tuple) of
|
|
2105
|
+
(connection, read) timeouts.
|
|
2106
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2107
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2108
|
+
request; this effectively ignores the
|
|
2109
|
+
authentication in the spec for a single request.
|
|
2110
|
+
:type _request_auth: dict, optional
|
|
2111
|
+
:param _content_type: force content-type for the request.
|
|
2112
|
+
:type _content_type: str, Optional
|
|
2113
|
+
:param _headers: set to override the headers for a single
|
|
2114
|
+
request; this effectively ignores the headers
|
|
2115
|
+
in the spec for a single request.
|
|
2116
|
+
:type _headers: dict, optional
|
|
2117
|
+
:param _host_index: set to override the host_index for a single
|
|
2118
|
+
request; this effectively ignores the host_index
|
|
2119
|
+
in the spec for a single request.
|
|
2120
|
+
:type _host_index: int, optional
|
|
2121
|
+
:return: Returns the result object.
|
|
2122
|
+
""" # noqa: E501
|
|
2123
|
+
|
|
2124
|
+
_param = self._benchmark_benchmark_id_prompt_post_serialize(
|
|
2125
|
+
benchmark_id=benchmark_id,
|
|
2126
|
+
submit_prompt_model=submit_prompt_model,
|
|
2127
|
+
_request_auth=_request_auth,
|
|
2128
|
+
_content_type=_content_type,
|
|
2129
|
+
_headers=_headers,
|
|
2130
|
+
_host_index=_host_index
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2133
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2134
|
+
'204': None,
|
|
2135
|
+
}
|
|
2136
|
+
response_data = self.api_client.call_api(
|
|
2137
|
+
*_param,
|
|
2138
|
+
_request_timeout=_request_timeout
|
|
2139
|
+
)
|
|
2140
|
+
return response_data.response
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
def _benchmark_benchmark_id_prompt_post_serialize(
|
|
2144
|
+
self,
|
|
2145
|
+
benchmark_id,
|
|
2146
|
+
submit_prompt_model,
|
|
2147
|
+
_request_auth,
|
|
2148
|
+
_content_type,
|
|
2149
|
+
_headers,
|
|
2150
|
+
_host_index,
|
|
2151
|
+
) -> RequestSerialized:
|
|
2152
|
+
|
|
2153
|
+
_host = None
|
|
2154
|
+
|
|
2155
|
+
_collection_formats: Dict[str, str] = {
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
_path_params: Dict[str, str] = {}
|
|
2159
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2160
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2161
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2162
|
+
_files: Dict[
|
|
2163
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2164
|
+
] = {}
|
|
2165
|
+
_body_params: Optional[bytes] = None
|
|
2166
|
+
|
|
2167
|
+
# process the path parameters
|
|
2168
|
+
if benchmark_id is not None:
|
|
2169
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
2170
|
+
# process the query parameters
|
|
2171
|
+
# process the header parameters
|
|
2172
|
+
# process the form parameters
|
|
2173
|
+
# process the body parameter
|
|
2174
|
+
if submit_prompt_model is not None:
|
|
2175
|
+
_body_params = submit_prompt_model
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
# set the HTTP header `Content-Type`
|
|
2180
|
+
if _content_type:
|
|
2181
|
+
_header_params['Content-Type'] = _content_type
|
|
2182
|
+
else:
|
|
2183
|
+
_default_content_type = (
|
|
2184
|
+
self.api_client.select_header_content_type(
|
|
2185
|
+
[
|
|
2186
|
+
'application/json',
|
|
2187
|
+
'text/json',
|
|
2188
|
+
'application/*+json'
|
|
2189
|
+
]
|
|
2190
|
+
)
|
|
2191
|
+
)
|
|
2192
|
+
if _default_content_type is not None:
|
|
2193
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2194
|
+
|
|
2195
|
+
# authentication setting
|
|
2196
|
+
_auth_settings: List[str] = [
|
|
2197
|
+
'bearer',
|
|
2198
|
+
'oauth2'
|
|
2199
|
+
]
|
|
2200
|
+
|
|
2201
|
+
return self.api_client.param_serialize(
|
|
2202
|
+
method='POST',
|
|
2203
|
+
resource_path='/benchmark/{benchmarkId}/prompt',
|
|
2204
|
+
path_params=_path_params,
|
|
2205
|
+
query_params=_query_params,
|
|
2206
|
+
header_params=_header_params,
|
|
2207
|
+
body=_body_params,
|
|
2208
|
+
post_params=_form_params,
|
|
2209
|
+
files=_files,
|
|
2210
|
+
auth_settings=_auth_settings,
|
|
2211
|
+
collection_formats=_collection_formats,
|
|
2212
|
+
_host=_host,
|
|
2213
|
+
_request_auth=_request_auth
|
|
2214
|
+
)
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
@validate_call
|
|
2220
|
+
def benchmark_benchmark_id_prompts_get(
|
|
2221
|
+
self,
|
|
2222
|
+
benchmark_id: StrictStr,
|
|
2223
|
+
request: Optional[QueryModel] = None,
|
|
2224
|
+
_request_timeout: Union[
|
|
2225
|
+
None,
|
|
2226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2227
|
+
Tuple[
|
|
2228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2229
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2230
|
+
]
|
|
2231
|
+
] = None,
|
|
2232
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2233
|
+
_content_type: Optional[StrictStr] = None,
|
|
2234
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2235
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2236
|
+
) -> PromptByBenchmarkResultPagedResult:
|
|
2237
|
+
"""Returns the paged prompts of a benchmark by its ID.
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
:param benchmark_id: (required)
|
|
2241
|
+
:type benchmark_id: str
|
|
2242
|
+
:param request:
|
|
2243
|
+
:type request: QueryModel
|
|
2244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2245
|
+
number provided, it will be total request
|
|
2246
|
+
timeout. It can also be a pair (tuple) of
|
|
2247
|
+
(connection, read) timeouts.
|
|
2248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2250
|
+
request; this effectively ignores the
|
|
2251
|
+
authentication in the spec for a single request.
|
|
2252
|
+
:type _request_auth: dict, optional
|
|
2253
|
+
:param _content_type: force content-type for the request.
|
|
2254
|
+
:type _content_type: str, Optional
|
|
2255
|
+
:param _headers: set to override the headers for a single
|
|
2256
|
+
request; this effectively ignores the headers
|
|
2257
|
+
in the spec for a single request.
|
|
2258
|
+
:type _headers: dict, optional
|
|
2259
|
+
:param _host_index: set to override the host_index for a single
|
|
2260
|
+
request; this effectively ignores the host_index
|
|
2261
|
+
in the spec for a single request.
|
|
2262
|
+
:type _host_index: int, optional
|
|
2263
|
+
:return: Returns the result object.
|
|
2264
|
+
""" # noqa: E501
|
|
2265
|
+
|
|
2266
|
+
_param = self._benchmark_benchmark_id_prompts_get_serialize(
|
|
2267
|
+
benchmark_id=benchmark_id,
|
|
2268
|
+
request=request,
|
|
2269
|
+
_request_auth=_request_auth,
|
|
2270
|
+
_content_type=_content_type,
|
|
2271
|
+
_headers=_headers,
|
|
2272
|
+
_host_index=_host_index
|
|
2273
|
+
)
|
|
2274
|
+
|
|
2275
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2276
|
+
'200': "PromptByBenchmarkResultPagedResult",
|
|
2277
|
+
}
|
|
2278
|
+
response_data = self.api_client.call_api(
|
|
2279
|
+
*_param,
|
|
2280
|
+
_request_timeout=_request_timeout
|
|
2281
|
+
)
|
|
2282
|
+
response_data.read()
|
|
2283
|
+
return self.api_client.response_deserialize(
|
|
2284
|
+
response_data=response_data,
|
|
2285
|
+
response_types_map=_response_types_map,
|
|
2286
|
+
).data
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
@validate_call
|
|
2290
|
+
def benchmark_benchmark_id_prompts_get_with_http_info(
|
|
2291
|
+
self,
|
|
2292
|
+
benchmark_id: StrictStr,
|
|
2293
|
+
request: Optional[QueryModel] = None,
|
|
2294
|
+
_request_timeout: Union[
|
|
2295
|
+
None,
|
|
2296
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2297
|
+
Tuple[
|
|
2298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2299
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2300
|
+
]
|
|
2301
|
+
] = None,
|
|
2302
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2303
|
+
_content_type: Optional[StrictStr] = None,
|
|
2304
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2305
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2306
|
+
) -> ApiResponse[PromptByBenchmarkResultPagedResult]:
|
|
2307
|
+
"""Returns the paged prompts of a benchmark by its ID.
|
|
2308
|
+
|
|
2309
|
+
|
|
2310
|
+
:param benchmark_id: (required)
|
|
2311
|
+
:type benchmark_id: str
|
|
2312
|
+
:param request:
|
|
2313
|
+
:type request: QueryModel
|
|
2314
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2315
|
+
number provided, it will be total request
|
|
2316
|
+
timeout. It can also be a pair (tuple) of
|
|
2317
|
+
(connection, read) timeouts.
|
|
2318
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2319
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2320
|
+
request; this effectively ignores the
|
|
2321
|
+
authentication in the spec for a single request.
|
|
2322
|
+
:type _request_auth: dict, optional
|
|
2323
|
+
:param _content_type: force content-type for the request.
|
|
2324
|
+
:type _content_type: str, Optional
|
|
2325
|
+
:param _headers: set to override the headers for a single
|
|
2326
|
+
request; this effectively ignores the headers
|
|
2327
|
+
in the spec for a single request.
|
|
2328
|
+
:type _headers: dict, optional
|
|
2329
|
+
:param _host_index: set to override the host_index for a single
|
|
2330
|
+
request; this effectively ignores the host_index
|
|
2331
|
+
in the spec for a single request.
|
|
2332
|
+
:type _host_index: int, optional
|
|
2333
|
+
:return: Returns the result object.
|
|
2334
|
+
""" # noqa: E501
|
|
2335
|
+
|
|
2336
|
+
_param = self._benchmark_benchmark_id_prompts_get_serialize(
|
|
2337
|
+
benchmark_id=benchmark_id,
|
|
2338
|
+
request=request,
|
|
2339
|
+
_request_auth=_request_auth,
|
|
2340
|
+
_content_type=_content_type,
|
|
2341
|
+
_headers=_headers,
|
|
2342
|
+
_host_index=_host_index
|
|
2343
|
+
)
|
|
2344
|
+
|
|
2345
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2346
|
+
'200': "PromptByBenchmarkResultPagedResult",
|
|
2347
|
+
}
|
|
2348
|
+
response_data = self.api_client.call_api(
|
|
2349
|
+
*_param,
|
|
2350
|
+
_request_timeout=_request_timeout
|
|
2351
|
+
)
|
|
2352
|
+
response_data.read()
|
|
2353
|
+
return self.api_client.response_deserialize(
|
|
2354
|
+
response_data=response_data,
|
|
2355
|
+
response_types_map=_response_types_map,
|
|
2356
|
+
)
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
@validate_call
|
|
2360
|
+
def benchmark_benchmark_id_prompts_get_without_preload_content(
|
|
2361
|
+
self,
|
|
2362
|
+
benchmark_id: StrictStr,
|
|
2363
|
+
request: Optional[QueryModel] = None,
|
|
2364
|
+
_request_timeout: Union[
|
|
2365
|
+
None,
|
|
2366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2367
|
+
Tuple[
|
|
2368
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2369
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2370
|
+
]
|
|
2371
|
+
] = None,
|
|
2372
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2373
|
+
_content_type: Optional[StrictStr] = None,
|
|
2374
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2375
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2376
|
+
) -> RESTResponseType:
|
|
2377
|
+
"""Returns the paged prompts of a benchmark by its ID.
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
:param benchmark_id: (required)
|
|
2381
|
+
:type benchmark_id: str
|
|
2382
|
+
:param request:
|
|
2383
|
+
:type request: QueryModel
|
|
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_benchmark_id_prompts_get_serialize(
|
|
2407
|
+
benchmark_id=benchmark_id,
|
|
2408
|
+
request=request,
|
|
2409
|
+
_request_auth=_request_auth,
|
|
2410
|
+
_content_type=_content_type,
|
|
2411
|
+
_headers=_headers,
|
|
2412
|
+
_host_index=_host_index
|
|
2413
|
+
)
|
|
2414
|
+
|
|
2415
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2416
|
+
'200': "PromptByBenchmarkResultPagedResult",
|
|
2417
|
+
}
|
|
2418
|
+
response_data = self.api_client.call_api(
|
|
2419
|
+
*_param,
|
|
2420
|
+
_request_timeout=_request_timeout
|
|
2421
|
+
)
|
|
2422
|
+
return response_data.response
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
def _benchmark_benchmark_id_prompts_get_serialize(
|
|
2426
|
+
self,
|
|
2427
|
+
benchmark_id,
|
|
2428
|
+
request,
|
|
2429
|
+
_request_auth,
|
|
2430
|
+
_content_type,
|
|
2431
|
+
_headers,
|
|
2432
|
+
_host_index,
|
|
2433
|
+
) -> RequestSerialized:
|
|
2434
|
+
|
|
2435
|
+
_host = None
|
|
2436
|
+
|
|
2437
|
+
_collection_formats: Dict[str, str] = {
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
_path_params: Dict[str, str] = {}
|
|
2441
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2442
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2443
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2444
|
+
_files: Dict[
|
|
2445
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2446
|
+
] = {}
|
|
2447
|
+
_body_params: Optional[bytes] = None
|
|
2448
|
+
|
|
2449
|
+
# process the path parameters
|
|
2450
|
+
if benchmark_id is not None:
|
|
2451
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
2452
|
+
# process the query parameters
|
|
2453
|
+
if request is not None:
|
|
2454
|
+
|
|
2455
|
+
_query_params.append(('request', request))
|
|
2456
|
+
|
|
2457
|
+
# process the header parameters
|
|
2458
|
+
# process the form parameters
|
|
2459
|
+
# process the body parameter
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
# set the HTTP header `Accept`
|
|
2463
|
+
if 'Accept' not in _header_params:
|
|
2464
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2465
|
+
[
|
|
2466
|
+
'text/plain',
|
|
2467
|
+
'application/json',
|
|
2468
|
+
'text/json'
|
|
2469
|
+
]
|
|
2470
|
+
)
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
# authentication setting
|
|
2474
|
+
_auth_settings: List[str] = [
|
|
2475
|
+
'bearer',
|
|
2476
|
+
'oauth2'
|
|
2477
|
+
]
|
|
2478
|
+
|
|
2479
|
+
return self.api_client.param_serialize(
|
|
2480
|
+
method='GET',
|
|
2481
|
+
resource_path='/benchmark/{benchmarkId}/prompts',
|
|
2482
|
+
path_params=_path_params,
|
|
2483
|
+
query_params=_query_params,
|
|
2484
|
+
header_params=_header_params,
|
|
2485
|
+
body=_body_params,
|
|
2486
|
+
post_params=_form_params,
|
|
2487
|
+
files=_files,
|
|
2488
|
+
auth_settings=_auth_settings,
|
|
2489
|
+
collection_formats=_collection_formats,
|
|
2490
|
+
_host=_host,
|
|
2491
|
+
_request_auth=_request_auth
|
|
2492
|
+
)
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
@validate_call
|
|
2498
|
+
def benchmark_post(
|
|
2499
|
+
self,
|
|
2500
|
+
create_benchmark_model: Optional[CreateBenchmarkModel] = None,
|
|
2501
|
+
_request_timeout: Union[
|
|
2502
|
+
None,
|
|
2503
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2504
|
+
Tuple[
|
|
2505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2506
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2507
|
+
]
|
|
2508
|
+
] = None,
|
|
2509
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2510
|
+
_content_type: Optional[StrictStr] = None,
|
|
2511
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2512
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2513
|
+
) -> CreateBenchmarkResult:
|
|
2514
|
+
"""Creates a benchmark
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
:param create_benchmark_model:
|
|
2518
|
+
:type create_benchmark_model: CreateBenchmarkModel
|
|
2519
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2520
|
+
number provided, it will be total request
|
|
2521
|
+
timeout. It can also be a pair (tuple) of
|
|
2522
|
+
(connection, read) timeouts.
|
|
2523
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2524
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2525
|
+
request; this effectively ignores the
|
|
2526
|
+
authentication in the spec for a single request.
|
|
2527
|
+
:type _request_auth: dict, optional
|
|
2528
|
+
:param _content_type: force content-type for the request.
|
|
2529
|
+
:type _content_type: str, Optional
|
|
2530
|
+
:param _headers: set to override the headers for a single
|
|
2531
|
+
request; this effectively ignores the headers
|
|
2532
|
+
in the spec for a single request.
|
|
2533
|
+
:type _headers: dict, optional
|
|
2534
|
+
:param _host_index: set to override the host_index for a single
|
|
2535
|
+
request; this effectively ignores the host_index
|
|
2536
|
+
in the spec for a single request.
|
|
2537
|
+
:type _host_index: int, optional
|
|
2538
|
+
:return: Returns the result object.
|
|
2539
|
+
""" # noqa: E501
|
|
2540
|
+
|
|
2541
|
+
_param = self._benchmark_post_serialize(
|
|
2542
|
+
create_benchmark_model=create_benchmark_model,
|
|
2543
|
+
_request_auth=_request_auth,
|
|
2544
|
+
_content_type=_content_type,
|
|
2545
|
+
_headers=_headers,
|
|
2546
|
+
_host_index=_host_index
|
|
2547
|
+
)
|
|
2548
|
+
|
|
2549
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2550
|
+
'200': "CreateBenchmarkResult",
|
|
2551
|
+
}
|
|
2552
|
+
response_data = self.api_client.call_api(
|
|
2553
|
+
*_param,
|
|
2554
|
+
_request_timeout=_request_timeout
|
|
2555
|
+
)
|
|
2556
|
+
response_data.read()
|
|
2557
|
+
return self.api_client.response_deserialize(
|
|
2558
|
+
response_data=response_data,
|
|
2559
|
+
response_types_map=_response_types_map,
|
|
2560
|
+
).data
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
@validate_call
|
|
2564
|
+
def benchmark_post_with_http_info(
|
|
2565
|
+
self,
|
|
2566
|
+
create_benchmark_model: Optional[CreateBenchmarkModel] = None,
|
|
2567
|
+
_request_timeout: Union[
|
|
2568
|
+
None,
|
|
2569
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2570
|
+
Tuple[
|
|
2571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2572
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2573
|
+
]
|
|
2574
|
+
] = None,
|
|
2575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2576
|
+
_content_type: Optional[StrictStr] = None,
|
|
2577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2579
|
+
) -> ApiResponse[CreateBenchmarkResult]:
|
|
2580
|
+
"""Creates a benchmark
|
|
2581
|
+
|
|
2582
|
+
|
|
2583
|
+
:param create_benchmark_model:
|
|
2584
|
+
:type create_benchmark_model: CreateBenchmarkModel
|
|
2585
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2586
|
+
number provided, it will be total request
|
|
2587
|
+
timeout. It can also be a pair (tuple) of
|
|
2588
|
+
(connection, read) timeouts.
|
|
2589
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2590
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2591
|
+
request; this effectively ignores the
|
|
2592
|
+
authentication in the spec for a single request.
|
|
2593
|
+
:type _request_auth: dict, optional
|
|
2594
|
+
:param _content_type: force content-type for the request.
|
|
2595
|
+
:type _content_type: str, Optional
|
|
2596
|
+
:param _headers: set to override the headers for a single
|
|
2597
|
+
request; this effectively ignores the headers
|
|
2598
|
+
in the spec for a single request.
|
|
2599
|
+
:type _headers: dict, optional
|
|
2600
|
+
:param _host_index: set to override the host_index for a single
|
|
2601
|
+
request; this effectively ignores the host_index
|
|
2602
|
+
in the spec for a single request.
|
|
2603
|
+
:type _host_index: int, optional
|
|
2604
|
+
:return: Returns the result object.
|
|
2605
|
+
""" # noqa: E501
|
|
2606
|
+
|
|
2607
|
+
_param = self._benchmark_post_serialize(
|
|
2608
|
+
create_benchmark_model=create_benchmark_model,
|
|
2609
|
+
_request_auth=_request_auth,
|
|
2610
|
+
_content_type=_content_type,
|
|
2611
|
+
_headers=_headers,
|
|
2612
|
+
_host_index=_host_index
|
|
2613
|
+
)
|
|
2614
|
+
|
|
2615
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2616
|
+
'200': "CreateBenchmarkResult",
|
|
2617
|
+
}
|
|
2618
|
+
response_data = self.api_client.call_api(
|
|
2619
|
+
*_param,
|
|
2620
|
+
_request_timeout=_request_timeout
|
|
2621
|
+
)
|
|
2622
|
+
response_data.read()
|
|
2623
|
+
return self.api_client.response_deserialize(
|
|
2624
|
+
response_data=response_data,
|
|
2625
|
+
response_types_map=_response_types_map,
|
|
2626
|
+
)
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
@validate_call
|
|
2630
|
+
def benchmark_post_without_preload_content(
|
|
2631
|
+
self,
|
|
2632
|
+
create_benchmark_model: Optional[CreateBenchmarkModel] = None,
|
|
2633
|
+
_request_timeout: Union[
|
|
2634
|
+
None,
|
|
2635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2636
|
+
Tuple[
|
|
2637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2638
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2639
|
+
]
|
|
2640
|
+
] = None,
|
|
2641
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2642
|
+
_content_type: Optional[StrictStr] = None,
|
|
2643
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2644
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2645
|
+
) -> RESTResponseType:
|
|
2646
|
+
"""Creates a benchmark
|
|
2647
|
+
|
|
2648
|
+
|
|
2649
|
+
:param create_benchmark_model:
|
|
2650
|
+
:type create_benchmark_model: CreateBenchmarkModel
|
|
2651
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2652
|
+
number provided, it will be total request
|
|
2653
|
+
timeout. It can also be a pair (tuple) of
|
|
2654
|
+
(connection, read) timeouts.
|
|
2655
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2656
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2657
|
+
request; this effectively ignores the
|
|
2658
|
+
authentication in the spec for a single request.
|
|
2659
|
+
:type _request_auth: dict, optional
|
|
2660
|
+
:param _content_type: force content-type for the request.
|
|
2661
|
+
:type _content_type: str, Optional
|
|
2662
|
+
:param _headers: set to override the headers for a single
|
|
2663
|
+
request; this effectively ignores the headers
|
|
2664
|
+
in the spec for a single request.
|
|
2665
|
+
:type _headers: dict, optional
|
|
2666
|
+
:param _host_index: set to override the host_index for a single
|
|
2667
|
+
request; this effectively ignores the host_index
|
|
2668
|
+
in the spec for a single request.
|
|
2669
|
+
:type _host_index: int, optional
|
|
2670
|
+
:return: Returns the result object.
|
|
2671
|
+
""" # noqa: E501
|
|
2672
|
+
|
|
2673
|
+
_param = self._benchmark_post_serialize(
|
|
2674
|
+
create_benchmark_model=create_benchmark_model,
|
|
2675
|
+
_request_auth=_request_auth,
|
|
2676
|
+
_content_type=_content_type,
|
|
2677
|
+
_headers=_headers,
|
|
2678
|
+
_host_index=_host_index
|
|
2679
|
+
)
|
|
2680
|
+
|
|
2681
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2682
|
+
'200': "CreateBenchmarkResult",
|
|
2683
|
+
}
|
|
2684
|
+
response_data = self.api_client.call_api(
|
|
2685
|
+
*_param,
|
|
2686
|
+
_request_timeout=_request_timeout
|
|
2687
|
+
)
|
|
2688
|
+
return response_data.response
|
|
2689
|
+
|
|
2690
|
+
|
|
2691
|
+
def _benchmark_post_serialize(
|
|
2692
|
+
self,
|
|
2693
|
+
create_benchmark_model,
|
|
2694
|
+
_request_auth,
|
|
2695
|
+
_content_type,
|
|
2696
|
+
_headers,
|
|
2697
|
+
_host_index,
|
|
2698
|
+
) -> RequestSerialized:
|
|
2699
|
+
|
|
2700
|
+
_host = None
|
|
2701
|
+
|
|
2702
|
+
_collection_formats: Dict[str, str] = {
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
_path_params: Dict[str, str] = {}
|
|
2706
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2707
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2708
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2709
|
+
_files: Dict[
|
|
2710
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2711
|
+
] = {}
|
|
2712
|
+
_body_params: Optional[bytes] = None
|
|
2713
|
+
|
|
2714
|
+
# process the path parameters
|
|
2715
|
+
# process the query parameters
|
|
2716
|
+
# process the header parameters
|
|
2717
|
+
# process the form parameters
|
|
2718
|
+
# process the body parameter
|
|
2719
|
+
if create_benchmark_model is not None:
|
|
2720
|
+
_body_params = create_benchmark_model
|
|
2721
|
+
|
|
2722
|
+
|
|
2723
|
+
# set the HTTP header `Accept`
|
|
2724
|
+
if 'Accept' not in _header_params:
|
|
2725
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2726
|
+
[
|
|
2727
|
+
'text/plain',
|
|
2728
|
+
'application/json',
|
|
2729
|
+
'text/json'
|
|
2730
|
+
]
|
|
2731
|
+
)
|
|
2732
|
+
|
|
2733
|
+
# set the HTTP header `Content-Type`
|
|
2734
|
+
if _content_type:
|
|
2735
|
+
_header_params['Content-Type'] = _content_type
|
|
2736
|
+
else:
|
|
2737
|
+
_default_content_type = (
|
|
2738
|
+
self.api_client.select_header_content_type(
|
|
2739
|
+
[
|
|
2740
|
+
'application/json',
|
|
2741
|
+
'text/json',
|
|
2742
|
+
'application/*+json'
|
|
2743
|
+
]
|
|
2744
|
+
)
|
|
2745
|
+
)
|
|
2746
|
+
if _default_content_type is not None:
|
|
2747
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2748
|
+
|
|
2749
|
+
# authentication setting
|
|
2750
|
+
_auth_settings: List[str] = [
|
|
2751
|
+
'bearer',
|
|
2752
|
+
'oauth2'
|
|
2753
|
+
]
|
|
2754
|
+
|
|
2755
|
+
return self.api_client.param_serialize(
|
|
2756
|
+
method='POST',
|
|
2757
|
+
resource_path='/benchmark',
|
|
2758
|
+
path_params=_path_params,
|
|
2759
|
+
query_params=_query_params,
|
|
2760
|
+
header_params=_header_params,
|
|
2761
|
+
body=_body_params,
|
|
2762
|
+
post_params=_form_params,
|
|
2763
|
+
files=_files,
|
|
2764
|
+
auth_settings=_auth_settings,
|
|
2765
|
+
collection_formats=_collection_formats,
|
|
2766
|
+
_host=_host,
|
|
2767
|
+
_request_auth=_request_auth
|
|
2768
|
+
)
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
@validate_call
|
|
2774
|
+
def benchmarks_get(
|
|
2775
|
+
self,
|
|
2776
|
+
request: Optional[QueryModel] = None,
|
|
2777
|
+
_request_timeout: Union[
|
|
2778
|
+
None,
|
|
2779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2780
|
+
Tuple[
|
|
2781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2783
|
+
]
|
|
2784
|
+
] = None,
|
|
2785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2786
|
+
_content_type: Optional[StrictStr] = None,
|
|
2787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2789
|
+
) -> BenchmarkQueryResultPagedResult:
|
|
2790
|
+
"""Queries all benchmarks of the user.
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
:param request:
|
|
2794
|
+
:type request: QueryModel
|
|
2795
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2796
|
+
number provided, it will be total request
|
|
2797
|
+
timeout. It can also be a pair (tuple) of
|
|
2798
|
+
(connection, read) timeouts.
|
|
2799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2801
|
+
request; this effectively ignores the
|
|
2802
|
+
authentication in the spec for a single request.
|
|
2803
|
+
:type _request_auth: dict, optional
|
|
2804
|
+
:param _content_type: force content-type for the request.
|
|
2805
|
+
:type _content_type: str, Optional
|
|
2806
|
+
:param _headers: set to override the headers for a single
|
|
2807
|
+
request; this effectively ignores the headers
|
|
2808
|
+
in the spec for a single request.
|
|
2809
|
+
:type _headers: dict, optional
|
|
2810
|
+
:param _host_index: set to override the host_index for a single
|
|
2811
|
+
request; this effectively ignores the host_index
|
|
2812
|
+
in the spec for a single request.
|
|
2813
|
+
:type _host_index: int, optional
|
|
2814
|
+
:return: Returns the result object.
|
|
2815
|
+
""" # noqa: E501
|
|
2816
|
+
|
|
2817
|
+
_param = self._benchmarks_get_serialize(
|
|
2818
|
+
request=request,
|
|
2819
|
+
_request_auth=_request_auth,
|
|
2820
|
+
_content_type=_content_type,
|
|
2821
|
+
_headers=_headers,
|
|
2822
|
+
_host_index=_host_index
|
|
2823
|
+
)
|
|
2824
|
+
|
|
2825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2826
|
+
'200': "BenchmarkQueryResultPagedResult",
|
|
2827
|
+
}
|
|
2828
|
+
response_data = self.api_client.call_api(
|
|
2829
|
+
*_param,
|
|
2830
|
+
_request_timeout=_request_timeout
|
|
2831
|
+
)
|
|
2832
|
+
response_data.read()
|
|
2833
|
+
return self.api_client.response_deserialize(
|
|
2834
|
+
response_data=response_data,
|
|
2835
|
+
response_types_map=_response_types_map,
|
|
2836
|
+
).data
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
@validate_call
|
|
2840
|
+
def benchmarks_get_with_http_info(
|
|
2841
|
+
self,
|
|
2842
|
+
request: Optional[QueryModel] = None,
|
|
2843
|
+
_request_timeout: Union[
|
|
2844
|
+
None,
|
|
2845
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2846
|
+
Tuple[
|
|
2847
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2848
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2849
|
+
]
|
|
2850
|
+
] = None,
|
|
2851
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2852
|
+
_content_type: Optional[StrictStr] = None,
|
|
2853
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2854
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2855
|
+
) -> ApiResponse[BenchmarkQueryResultPagedResult]:
|
|
2856
|
+
"""Queries all benchmarks of the user.
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
:param request:
|
|
2860
|
+
:type request: QueryModel
|
|
2861
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2862
|
+
number provided, it will be total request
|
|
2863
|
+
timeout. It can also be a pair (tuple) of
|
|
2864
|
+
(connection, read) timeouts.
|
|
2865
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2866
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2867
|
+
request; this effectively ignores the
|
|
2868
|
+
authentication in the spec for a single request.
|
|
2869
|
+
:type _request_auth: dict, optional
|
|
2870
|
+
:param _content_type: force content-type for the request.
|
|
2871
|
+
:type _content_type: str, Optional
|
|
2872
|
+
:param _headers: set to override the headers for a single
|
|
2873
|
+
request; this effectively ignores the headers
|
|
2874
|
+
in the spec for a single request.
|
|
2875
|
+
:type _headers: dict, optional
|
|
2876
|
+
:param _host_index: set to override the host_index for a single
|
|
2877
|
+
request; this effectively ignores the host_index
|
|
2878
|
+
in the spec for a single request.
|
|
2879
|
+
:type _host_index: int, optional
|
|
2880
|
+
:return: Returns the result object.
|
|
2881
|
+
""" # noqa: E501
|
|
2882
|
+
|
|
2883
|
+
_param = self._benchmarks_get_serialize(
|
|
2884
|
+
request=request,
|
|
2885
|
+
_request_auth=_request_auth,
|
|
2886
|
+
_content_type=_content_type,
|
|
2887
|
+
_headers=_headers,
|
|
2888
|
+
_host_index=_host_index
|
|
2889
|
+
)
|
|
2890
|
+
|
|
2891
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2892
|
+
'200': "BenchmarkQueryResultPagedResult",
|
|
2893
|
+
}
|
|
2894
|
+
response_data = self.api_client.call_api(
|
|
2895
|
+
*_param,
|
|
2896
|
+
_request_timeout=_request_timeout
|
|
2897
|
+
)
|
|
2898
|
+
response_data.read()
|
|
2899
|
+
return self.api_client.response_deserialize(
|
|
2900
|
+
response_data=response_data,
|
|
2901
|
+
response_types_map=_response_types_map,
|
|
2902
|
+
)
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
@validate_call
|
|
2906
|
+
def benchmarks_get_without_preload_content(
|
|
2907
|
+
self,
|
|
2908
|
+
request: Optional[QueryModel] = None,
|
|
2909
|
+
_request_timeout: Union[
|
|
2910
|
+
None,
|
|
2911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2912
|
+
Tuple[
|
|
2913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2915
|
+
]
|
|
2916
|
+
] = None,
|
|
2917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2918
|
+
_content_type: Optional[StrictStr] = None,
|
|
2919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2921
|
+
) -> RESTResponseType:
|
|
2922
|
+
"""Queries all benchmarks of the user.
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
:param request:
|
|
2926
|
+
:type request: QueryModel
|
|
2927
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2928
|
+
number provided, it will be total request
|
|
2929
|
+
timeout. It can also be a pair (tuple) of
|
|
2930
|
+
(connection, read) timeouts.
|
|
2931
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2932
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2933
|
+
request; this effectively ignores the
|
|
2934
|
+
authentication in the spec for a single request.
|
|
2935
|
+
:type _request_auth: dict, optional
|
|
2936
|
+
:param _content_type: force content-type for the request.
|
|
2937
|
+
:type _content_type: str, Optional
|
|
2938
|
+
:param _headers: set to override the headers for a single
|
|
2939
|
+
request; this effectively ignores the headers
|
|
2940
|
+
in the spec for a single request.
|
|
2941
|
+
:type _headers: dict, optional
|
|
2942
|
+
:param _host_index: set to override the host_index for a single
|
|
2943
|
+
request; this effectively ignores the host_index
|
|
2944
|
+
in the spec for a single request.
|
|
2945
|
+
:type _host_index: int, optional
|
|
2946
|
+
:return: Returns the result object.
|
|
2947
|
+
""" # noqa: E501
|
|
2948
|
+
|
|
2949
|
+
_param = self._benchmarks_get_serialize(
|
|
2950
|
+
request=request,
|
|
2951
|
+
_request_auth=_request_auth,
|
|
2952
|
+
_content_type=_content_type,
|
|
2953
|
+
_headers=_headers,
|
|
2954
|
+
_host_index=_host_index
|
|
2955
|
+
)
|
|
2956
|
+
|
|
2957
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2958
|
+
'200': "BenchmarkQueryResultPagedResult",
|
|
2959
|
+
}
|
|
2960
|
+
response_data = self.api_client.call_api(
|
|
2961
|
+
*_param,
|
|
2962
|
+
_request_timeout=_request_timeout
|
|
2963
|
+
)
|
|
2964
|
+
return response_data.response
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
def _benchmarks_get_serialize(
|
|
2968
|
+
self,
|
|
2969
|
+
request,
|
|
2970
|
+
_request_auth,
|
|
2971
|
+
_content_type,
|
|
2972
|
+
_headers,
|
|
2973
|
+
_host_index,
|
|
2974
|
+
) -> RequestSerialized:
|
|
2975
|
+
|
|
2976
|
+
_host = None
|
|
2977
|
+
|
|
2978
|
+
_collection_formats: Dict[str, str] = {
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
_path_params: Dict[str, str] = {}
|
|
2982
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2983
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2984
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2985
|
+
_files: Dict[
|
|
2986
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2987
|
+
] = {}
|
|
2988
|
+
_body_params: Optional[bytes] = None
|
|
2989
|
+
|
|
2990
|
+
# process the path parameters
|
|
2991
|
+
# process the query parameters
|
|
2992
|
+
if request is not None:
|
|
2993
|
+
|
|
2994
|
+
_query_params.append(('request', request))
|
|
2995
|
+
|
|
2996
|
+
# process the header parameters
|
|
2997
|
+
# process the form parameters
|
|
2998
|
+
# process the body parameter
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
# set the HTTP header `Accept`
|
|
3002
|
+
if 'Accept' not in _header_params:
|
|
3003
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3004
|
+
[
|
|
3005
|
+
'text/plain',
|
|
3006
|
+
'application/json',
|
|
3007
|
+
'text/json'
|
|
3008
|
+
]
|
|
3009
|
+
)
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
# authentication setting
|
|
3013
|
+
_auth_settings: List[str] = [
|
|
3014
|
+
'bearer',
|
|
3015
|
+
'oauth2'
|
|
3016
|
+
]
|
|
3017
|
+
|
|
3018
|
+
return self.api_client.param_serialize(
|
|
3019
|
+
method='GET',
|
|
3020
|
+
resource_path='/benchmarks',
|
|
3021
|
+
path_params=_path_params,
|
|
3022
|
+
query_params=_query_params,
|
|
3023
|
+
header_params=_header_params,
|
|
3024
|
+
body=_body_params,
|
|
3025
|
+
post_params=_form_params,
|
|
3026
|
+
files=_files,
|
|
3027
|
+
auth_settings=_auth_settings,
|
|
3028
|
+
collection_formats=_collection_formats,
|
|
3029
|
+
_host=_host,
|
|
3030
|
+
_request_auth=_request_auth
|
|
3031
|
+
)
|
|
3032
|
+
|
|
3033
|
+
|