rapidata 2.26.1__py3-none-any.whl → 2.27.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.

Files changed (65) hide show
  1. rapidata/__init__.py +2 -2
  2. rapidata/api_client/__init__.py +11 -3
  3. rapidata/api_client/api/__init__.py +2 -1
  4. rapidata/api_client/api/client_api.py +0 -257
  5. rapidata/api_client/api/customer_rapid_api.py +1644 -0
  6. rapidata/api_client/api/dataset_api.py +358 -1
  7. rapidata/api_client/api/newsletter_api.py +11 -299
  8. rapidata/api_client/api/user_rapid_api.py +1385 -0
  9. rapidata/api_client/api/validation_set_api.py +6 -6
  10. rapidata/api_client/models/__init__.py +9 -2
  11. rapidata/api_client/models/add_campaign_model.py +5 -0
  12. rapidata/api_client/models/add_validation_rapid_model.py +3 -3
  13. rapidata/api_client/models/add_validation_rapid_model_truth.py +25 -11
  14. rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
  15. rapidata/api_client/models/asset_metadata_model.py +2 -8
  16. rapidata/api_client/models/compare_result.py +1 -10
  17. rapidata/api_client/models/compare_workflow_model.py +3 -3
  18. rapidata/api_client/models/create_datapoint_from_files_model.py +3 -3
  19. rapidata/api_client/models/create_datapoint_from_text_sources_model.py +3 -3
  20. rapidata/api_client/models/create_datapoint_from_urls_model.py +3 -3
  21. rapidata/api_client/models/create_order_model.py +2 -4
  22. rapidata/api_client/models/datapoint.py +3 -3
  23. rapidata/api_client/models/datapoint_metadata_model.py +3 -3
  24. rapidata/api_client/models/datapoint_model.py +3 -3
  25. rapidata/api_client/models/dataset_dataset_id_datapoints_post_request_metadata_inner.py +182 -0
  26. rapidata/api_client/models/file_asset_model.py +1 -3
  27. rapidata/api_client/models/file_asset_model_metadata_value.py +1 -3
  28. rapidata/api_client/models/get_compare_workflow_results_result.py +3 -3
  29. rapidata/api_client/models/get_datapoint_by_id_result.py +3 -3
  30. rapidata/api_client/models/get_rapid_responses_result.py +5 -5
  31. rapidata/api_client/models/get_validation_rapids_result.py +12 -3
  32. rapidata/api_client/models/get_validation_rapids_result_truth.py +25 -11
  33. rapidata/api_client/models/get_workflow_results_result.py +5 -5
  34. rapidata/api_client/models/multi_asset_model.py +4 -4
  35. rapidata/api_client/models/multi_compare_truth.py +96 -0
  36. rapidata/api_client/models/naive_referee_info.py +96 -0
  37. rapidata/api_client/models/never_ending_referee_info.py +94 -0
  38. rapidata/api_client/models/null_asset_model.py +1 -3
  39. rapidata/api_client/models/probabilistic_attach_category_referee_info.py +98 -0
  40. rapidata/api_client/models/rapid_model.py +173 -0
  41. rapidata/api_client/models/rapid_model_paged_result.py +105 -0
  42. rapidata/api_client/models/rapid_model_referee.py +154 -0
  43. rapidata/api_client/models/rapid_state.py +1 -0
  44. rapidata/api_client/models/text_asset_model.py +1 -3
  45. rapidata/api_client/models/update_access_model.py +1 -1
  46. rapidata/api_client/models/update_validation_rapid_model.py +3 -8
  47. rapidata/api_client/models/update_validation_rapid_model_truth.py +26 -12
  48. rapidata/api_client/models/upload_files_from_s3_bucket_model.py +12 -2
  49. rapidata/api_client/models/upload_text_sources_to_dataset_model.py +3 -3
  50. rapidata/api_client_README.md +21 -13
  51. rapidata/rapidata_client/__init__.py +1 -1
  52. rapidata/rapidata_client/assets/_multi_asset.py +0 -5
  53. rapidata/rapidata_client/logging/__init__.py +1 -1
  54. rapidata/rapidata_client/logging/output_manager.py +2 -2
  55. rapidata/rapidata_client/order/_rapidata_dataset.py +16 -39
  56. rapidata/rapidata_client/order/rapidata_order.py +20 -15
  57. rapidata/rapidata_client/order/rapidata_order_manager.py +5 -2
  58. rapidata/rapidata_client/validation/rapids/rapids.py +3 -4
  59. rapidata/rapidata_client/validation/validation_set_manager.py +2 -2
  60. rapidata/rapidata_client/workflow/_ranking_workflow.py +2 -6
  61. rapidata/service/credential_manager.py +6 -6
  62. {rapidata-2.26.1.dist-info → rapidata-2.27.1.dist-info}/METADATA +1 -1
  63. {rapidata-2.26.1.dist-info → rapidata-2.27.1.dist-info}/RECORD +65 -55
  64. {rapidata-2.26.1.dist-info → rapidata-2.27.1.dist-info}/LICENSE +0 -0
  65. {rapidata-2.26.1.dist-info → rapidata-2.27.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,1644 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictStr
20
+ from typing import List, Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from rapidata.api_client.models.create_demographic_rapid_model import CreateDemographicRapidModel
23
+ from rapidata.api_client.models.create_rapid_result import CreateRapidResult
24
+ from rapidata.api_client.models.get_rapid_responses_result import GetRapidResponsesResult
25
+ from rapidata.api_client.models.query_model import QueryModel
26
+ from rapidata.api_client.models.rapid_model_paged_result import RapidModelPagedResult
27
+ from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
28
+
29
+ from rapidata.api_client.api_client import ApiClient, RequestSerialized
30
+ from rapidata.api_client.api_response import ApiResponse
31
+ from rapidata.api_client.rest import RESTResponseType
32
+
33
+
34
+ class CustomerRapidApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def rapid_demographic_post(
49
+ self,
50
+ model: Optional[CreateDemographicRapidModel] = None,
51
+ file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> CreateRapidResult:
65
+ """Creates a new Demographic Rapid.
66
+
67
+
68
+ :param model:
69
+ :type model: CreateDemographicRapidModel
70
+ :param file:
71
+ :type file: List[bytearray]
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._rapid_demographic_post_serialize(
95
+ model=model,
96
+ file=file,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index
101
+ )
102
+
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '200': "CreateRapidResult",
105
+ }
106
+ response_data = self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ def rapid_demographic_post_with_http_info(
119
+ self,
120
+ model: Optional[CreateDemographicRapidModel] = None,
121
+ file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[CreateRapidResult]:
135
+ """Creates a new Demographic Rapid.
136
+
137
+
138
+ :param model:
139
+ :type model: CreateDemographicRapidModel
140
+ :param file:
141
+ :type file: List[bytearray]
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._rapid_demographic_post_serialize(
165
+ model=model,
166
+ file=file,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "CreateRapidResult",
175
+ }
176
+ response_data = self.api_client.call_api(
177
+ *_param,
178
+ _request_timeout=_request_timeout
179
+ )
180
+ response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+
187
+ @validate_call
188
+ def rapid_demographic_post_without_preload_content(
189
+ self,
190
+ model: Optional[CreateDemographicRapidModel] = None,
191
+ file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """Creates a new Demographic Rapid.
206
+
207
+
208
+ :param model:
209
+ :type model: CreateDemographicRapidModel
210
+ :param file:
211
+ :type file: List[bytearray]
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._rapid_demographic_post_serialize(
235
+ model=model,
236
+ file=file,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "CreateRapidResult",
245
+ }
246
+ response_data = self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _rapid_demographic_post_serialize(
254
+ self,
255
+ model,
256
+ file,
257
+ _request_auth,
258
+ _content_type,
259
+ _headers,
260
+ _host_index,
261
+ ) -> RequestSerialized:
262
+
263
+ _host = None
264
+
265
+ _collection_formats: Dict[str, str] = {
266
+ 'file': 'multi',
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ # process the query parameters
280
+ # process the header parameters
281
+ # process the form parameters
282
+ if model is not None:
283
+ _form_params.append(('model', model))
284
+ if file is not None:
285
+ _files['file'] = file
286
+ # process the body parameter
287
+
288
+
289
+ # set the HTTP header `Accept`
290
+ if 'Accept' not in _header_params:
291
+ _header_params['Accept'] = self.api_client.select_header_accept(
292
+ [
293
+ 'text/plain',
294
+ 'application/json',
295
+ 'text/json'
296
+ ]
297
+ )
298
+
299
+ # set the HTTP header `Content-Type`
300
+ if _content_type:
301
+ _header_params['Content-Type'] = _content_type
302
+ else:
303
+ _default_content_type = (
304
+ self.api_client.select_header_content_type(
305
+ [
306
+ 'multipart/form-data'
307
+ ]
308
+ )
309
+ )
310
+ if _default_content_type is not None:
311
+ _header_params['Content-Type'] = _default_content_type
312
+
313
+ # authentication setting
314
+ _auth_settings: List[str] = [
315
+ 'bearer',
316
+ 'oauth2'
317
+ ]
318
+
319
+ return self.api_client.param_serialize(
320
+ method='POST',
321
+ resource_path='/rapid/demographic',
322
+ path_params=_path_params,
323
+ query_params=_query_params,
324
+ header_params=_header_params,
325
+ body=_body_params,
326
+ post_params=_form_params,
327
+ files=_files,
328
+ auth_settings=_auth_settings,
329
+ collection_formats=_collection_formats,
330
+ _host=_host,
331
+ _request_auth=_request_auth
332
+ )
333
+
334
+
335
+
336
+
337
+ @validate_call
338
+ def rapid_rapid_id_delete(
339
+ self,
340
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to be deleted")],
341
+ _request_timeout: Union[
342
+ None,
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Tuple[
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Annotated[StrictFloat, Field(gt=0)]
347
+ ]
348
+ ] = None,
349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
350
+ _content_type: Optional[StrictStr] = None,
351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
353
+ ) -> None:
354
+ """Deletes a rapid.
355
+
356
+
357
+ :param rapid_id: The rapid to be deleted (required)
358
+ :type rapid_id: str
359
+ :param _request_timeout: timeout setting for this request. If one
360
+ number provided, it will be total request
361
+ timeout. It can also be a pair (tuple) of
362
+ (connection, read) timeouts.
363
+ :type _request_timeout: int, tuple(int, int), optional
364
+ :param _request_auth: set to override the auth_settings for an a single
365
+ request; this effectively ignores the
366
+ authentication in the spec for a single request.
367
+ :type _request_auth: dict, optional
368
+ :param _content_type: force content-type for the request.
369
+ :type _content_type: str, Optional
370
+ :param _headers: set to override the headers for a single
371
+ request; this effectively ignores the headers
372
+ in the spec for a single request.
373
+ :type _headers: dict, optional
374
+ :param _host_index: set to override the host_index for a single
375
+ request; this effectively ignores the host_index
376
+ in the spec for a single request.
377
+ :type _host_index: int, optional
378
+ :return: Returns the result object.
379
+ """ # noqa: E501
380
+
381
+ _param = self._rapid_rapid_id_delete_serialize(
382
+ rapid_id=rapid_id,
383
+ _request_auth=_request_auth,
384
+ _content_type=_content_type,
385
+ _headers=_headers,
386
+ _host_index=_host_index
387
+ )
388
+
389
+ _response_types_map: Dict[str, Optional[str]] = {
390
+ '204': None,
391
+ }
392
+ response_data = self.api_client.call_api(
393
+ *_param,
394
+ _request_timeout=_request_timeout
395
+ )
396
+ response_data.read()
397
+ return self.api_client.response_deserialize(
398
+ response_data=response_data,
399
+ response_types_map=_response_types_map,
400
+ ).data
401
+
402
+
403
+ @validate_call
404
+ def rapid_rapid_id_delete_with_http_info(
405
+ self,
406
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to be deleted")],
407
+ _request_timeout: Union[
408
+ None,
409
+ Annotated[StrictFloat, Field(gt=0)],
410
+ Tuple[
411
+ Annotated[StrictFloat, Field(gt=0)],
412
+ Annotated[StrictFloat, Field(gt=0)]
413
+ ]
414
+ ] = None,
415
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
416
+ _content_type: Optional[StrictStr] = None,
417
+ _headers: Optional[Dict[StrictStr, Any]] = None,
418
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
419
+ ) -> ApiResponse[None]:
420
+ """Deletes a rapid.
421
+
422
+
423
+ :param rapid_id: The rapid to be deleted (required)
424
+ :type rapid_id: str
425
+ :param _request_timeout: timeout setting for this request. If one
426
+ number provided, it will be total request
427
+ timeout. It can also be a pair (tuple) of
428
+ (connection, read) timeouts.
429
+ :type _request_timeout: int, tuple(int, int), optional
430
+ :param _request_auth: set to override the auth_settings for an a single
431
+ request; this effectively ignores the
432
+ authentication in the spec for a single request.
433
+ :type _request_auth: dict, optional
434
+ :param _content_type: force content-type for the request.
435
+ :type _content_type: str, Optional
436
+ :param _headers: set to override the headers for a single
437
+ request; this effectively ignores the headers
438
+ in the spec for a single request.
439
+ :type _headers: dict, optional
440
+ :param _host_index: set to override the host_index for a single
441
+ request; this effectively ignores the host_index
442
+ in the spec for a single request.
443
+ :type _host_index: int, optional
444
+ :return: Returns the result object.
445
+ """ # noqa: E501
446
+
447
+ _param = self._rapid_rapid_id_delete_serialize(
448
+ rapid_id=rapid_id,
449
+ _request_auth=_request_auth,
450
+ _content_type=_content_type,
451
+ _headers=_headers,
452
+ _host_index=_host_index
453
+ )
454
+
455
+ _response_types_map: Dict[str, Optional[str]] = {
456
+ '204': None,
457
+ }
458
+ response_data = self.api_client.call_api(
459
+ *_param,
460
+ _request_timeout=_request_timeout
461
+ )
462
+ response_data.read()
463
+ return self.api_client.response_deserialize(
464
+ response_data=response_data,
465
+ response_types_map=_response_types_map,
466
+ )
467
+
468
+
469
+ @validate_call
470
+ def rapid_rapid_id_delete_without_preload_content(
471
+ self,
472
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to be deleted")],
473
+ _request_timeout: Union[
474
+ None,
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Tuple[
477
+ Annotated[StrictFloat, Field(gt=0)],
478
+ Annotated[StrictFloat, Field(gt=0)]
479
+ ]
480
+ ] = None,
481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
482
+ _content_type: Optional[StrictStr] = None,
483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
485
+ ) -> RESTResponseType:
486
+ """Deletes a rapid.
487
+
488
+
489
+ :param rapid_id: The rapid to be deleted (required)
490
+ :type rapid_id: str
491
+ :param _request_timeout: timeout setting for this request. If one
492
+ number provided, it will be total request
493
+ timeout. It can also be a pair (tuple) of
494
+ (connection, read) timeouts.
495
+ :type _request_timeout: int, tuple(int, int), optional
496
+ :param _request_auth: set to override the auth_settings for an a single
497
+ request; this effectively ignores the
498
+ authentication in the spec for a single request.
499
+ :type _request_auth: dict, optional
500
+ :param _content_type: force content-type for the request.
501
+ :type _content_type: str, Optional
502
+ :param _headers: set to override the headers for a single
503
+ request; this effectively ignores the headers
504
+ in the spec for a single request.
505
+ :type _headers: dict, optional
506
+ :param _host_index: set to override the host_index for a single
507
+ request; this effectively ignores the host_index
508
+ in the spec for a single request.
509
+ :type _host_index: int, optional
510
+ :return: Returns the result object.
511
+ """ # noqa: E501
512
+
513
+ _param = self._rapid_rapid_id_delete_serialize(
514
+ rapid_id=rapid_id,
515
+ _request_auth=_request_auth,
516
+ _content_type=_content_type,
517
+ _headers=_headers,
518
+ _host_index=_host_index
519
+ )
520
+
521
+ _response_types_map: Dict[str, Optional[str]] = {
522
+ '204': None,
523
+ }
524
+ response_data = self.api_client.call_api(
525
+ *_param,
526
+ _request_timeout=_request_timeout
527
+ )
528
+ return response_data.response
529
+
530
+
531
+ def _rapid_rapid_id_delete_serialize(
532
+ self,
533
+ rapid_id,
534
+ _request_auth,
535
+ _content_type,
536
+ _headers,
537
+ _host_index,
538
+ ) -> RequestSerialized:
539
+
540
+ _host = None
541
+
542
+ _collection_formats: Dict[str, str] = {
543
+ }
544
+
545
+ _path_params: Dict[str, str] = {}
546
+ _query_params: List[Tuple[str, str]] = []
547
+ _header_params: Dict[str, Optional[str]] = _headers or {}
548
+ _form_params: List[Tuple[str, str]] = []
549
+ _files: Dict[
550
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
551
+ ] = {}
552
+ _body_params: Optional[bytes] = None
553
+
554
+ # process the path parameters
555
+ if rapid_id is not None:
556
+ _path_params['rapidId'] = rapid_id
557
+ # process the query parameters
558
+ # process the header parameters
559
+ # process the form parameters
560
+ # process the body parameter
561
+
562
+
563
+
564
+
565
+ # authentication setting
566
+ _auth_settings: List[str] = [
567
+ 'bearer',
568
+ 'oauth2'
569
+ ]
570
+
571
+ return self.api_client.param_serialize(
572
+ method='DELETE',
573
+ resource_path='/rapid/{rapidId}',
574
+ path_params=_path_params,
575
+ query_params=_query_params,
576
+ header_params=_header_params,
577
+ body=_body_params,
578
+ post_params=_form_params,
579
+ files=_files,
580
+ auth_settings=_auth_settings,
581
+ collection_formats=_collection_formats,
582
+ _host=_host,
583
+ _request_auth=_request_auth
584
+ )
585
+
586
+
587
+
588
+
589
+ @validate_call
590
+ def rapid_rapid_id_responses_get(
591
+ self,
592
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> GetRapidResponsesResult:
606
+ """Gets all responses for a given rapid.
607
+
608
+
609
+ :param rapid_id: The rapid to get the responses for. (required)
610
+ :type rapid_id: str
611
+ :param _request_timeout: timeout setting for this request. If one
612
+ number provided, it will be total request
613
+ timeout. It can also be a pair (tuple) of
614
+ (connection, read) timeouts.
615
+ :type _request_timeout: int, tuple(int, int), optional
616
+ :param _request_auth: set to override the auth_settings for an a single
617
+ request; this effectively ignores the
618
+ authentication in the spec for a single request.
619
+ :type _request_auth: dict, optional
620
+ :param _content_type: force content-type for the request.
621
+ :type _content_type: str, Optional
622
+ :param _headers: set to override the headers for a single
623
+ request; this effectively ignores the headers
624
+ in the spec for a single request.
625
+ :type _headers: dict, optional
626
+ :param _host_index: set to override the host_index for a single
627
+ request; this effectively ignores the host_index
628
+ in the spec for a single request.
629
+ :type _host_index: int, optional
630
+ :return: Returns the result object.
631
+ """ # noqa: E501
632
+
633
+ _param = self._rapid_rapid_id_responses_get_serialize(
634
+ rapid_id=rapid_id,
635
+ _request_auth=_request_auth,
636
+ _content_type=_content_type,
637
+ _headers=_headers,
638
+ _host_index=_host_index
639
+ )
640
+
641
+ _response_types_map: Dict[str, Optional[str]] = {
642
+ '200': "GetRapidResponsesResult",
643
+ }
644
+ response_data = self.api_client.call_api(
645
+ *_param,
646
+ _request_timeout=_request_timeout
647
+ )
648
+ response_data.read()
649
+ return self.api_client.response_deserialize(
650
+ response_data=response_data,
651
+ response_types_map=_response_types_map,
652
+ ).data
653
+
654
+
655
+ @validate_call
656
+ def rapid_rapid_id_responses_get_with_http_info(
657
+ self,
658
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
659
+ _request_timeout: Union[
660
+ None,
661
+ Annotated[StrictFloat, Field(gt=0)],
662
+ Tuple[
663
+ Annotated[StrictFloat, Field(gt=0)],
664
+ Annotated[StrictFloat, Field(gt=0)]
665
+ ]
666
+ ] = None,
667
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
668
+ _content_type: Optional[StrictStr] = None,
669
+ _headers: Optional[Dict[StrictStr, Any]] = None,
670
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
671
+ ) -> ApiResponse[GetRapidResponsesResult]:
672
+ """Gets all responses for a given rapid.
673
+
674
+
675
+ :param rapid_id: The rapid to get the responses for. (required)
676
+ :type rapid_id: str
677
+ :param _request_timeout: timeout setting for this request. If one
678
+ number provided, it will be total request
679
+ timeout. It can also be a pair (tuple) of
680
+ (connection, read) timeouts.
681
+ :type _request_timeout: int, tuple(int, int), optional
682
+ :param _request_auth: set to override the auth_settings for an a single
683
+ request; this effectively ignores the
684
+ authentication in the spec for a single request.
685
+ :type _request_auth: dict, optional
686
+ :param _content_type: force content-type for the request.
687
+ :type _content_type: str, Optional
688
+ :param _headers: set to override the headers for a single
689
+ request; this effectively ignores the headers
690
+ in the spec for a single request.
691
+ :type _headers: dict, optional
692
+ :param _host_index: set to override the host_index for a single
693
+ request; this effectively ignores the host_index
694
+ in the spec for a single request.
695
+ :type _host_index: int, optional
696
+ :return: Returns the result object.
697
+ """ # noqa: E501
698
+
699
+ _param = self._rapid_rapid_id_responses_get_serialize(
700
+ rapid_id=rapid_id,
701
+ _request_auth=_request_auth,
702
+ _content_type=_content_type,
703
+ _headers=_headers,
704
+ _host_index=_host_index
705
+ )
706
+
707
+ _response_types_map: Dict[str, Optional[str]] = {
708
+ '200': "GetRapidResponsesResult",
709
+ }
710
+ response_data = self.api_client.call_api(
711
+ *_param,
712
+ _request_timeout=_request_timeout
713
+ )
714
+ response_data.read()
715
+ return self.api_client.response_deserialize(
716
+ response_data=response_data,
717
+ response_types_map=_response_types_map,
718
+ )
719
+
720
+
721
+ @validate_call
722
+ def rapid_rapid_id_responses_get_without_preload_content(
723
+ self,
724
+ rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
725
+ _request_timeout: Union[
726
+ None,
727
+ Annotated[StrictFloat, Field(gt=0)],
728
+ Tuple[
729
+ Annotated[StrictFloat, Field(gt=0)],
730
+ Annotated[StrictFloat, Field(gt=0)]
731
+ ]
732
+ ] = None,
733
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
734
+ _content_type: Optional[StrictStr] = None,
735
+ _headers: Optional[Dict[StrictStr, Any]] = None,
736
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
737
+ ) -> RESTResponseType:
738
+ """Gets all responses for a given rapid.
739
+
740
+
741
+ :param rapid_id: The rapid to get the responses for. (required)
742
+ :type rapid_id: str
743
+ :param _request_timeout: timeout setting for this request. If one
744
+ number provided, it will be total request
745
+ timeout. It can also be a pair (tuple) of
746
+ (connection, read) timeouts.
747
+ :type _request_timeout: int, tuple(int, int), optional
748
+ :param _request_auth: set to override the auth_settings for an a single
749
+ request; this effectively ignores the
750
+ authentication in the spec for a single request.
751
+ :type _request_auth: dict, optional
752
+ :param _content_type: force content-type for the request.
753
+ :type _content_type: str, Optional
754
+ :param _headers: set to override the headers for a single
755
+ request; this effectively ignores the headers
756
+ in the spec for a single request.
757
+ :type _headers: dict, optional
758
+ :param _host_index: set to override the host_index for a single
759
+ request; this effectively ignores the host_index
760
+ in the spec for a single request.
761
+ :type _host_index: int, optional
762
+ :return: Returns the result object.
763
+ """ # noqa: E501
764
+
765
+ _param = self._rapid_rapid_id_responses_get_serialize(
766
+ rapid_id=rapid_id,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "GetRapidResponsesResult",
775
+ }
776
+ response_data = self.api_client.call_api(
777
+ *_param,
778
+ _request_timeout=_request_timeout
779
+ )
780
+ return response_data.response
781
+
782
+
783
+ def _rapid_rapid_id_responses_get_serialize(
784
+ self,
785
+ rapid_id,
786
+ _request_auth,
787
+ _content_type,
788
+ _headers,
789
+ _host_index,
790
+ ) -> RequestSerialized:
791
+
792
+ _host = None
793
+
794
+ _collection_formats: Dict[str, str] = {
795
+ }
796
+
797
+ _path_params: Dict[str, str] = {}
798
+ _query_params: List[Tuple[str, str]] = []
799
+ _header_params: Dict[str, Optional[str]] = _headers or {}
800
+ _form_params: List[Tuple[str, str]] = []
801
+ _files: Dict[
802
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
803
+ ] = {}
804
+ _body_params: Optional[bytes] = None
805
+
806
+ # process the path parameters
807
+ if rapid_id is not None:
808
+ _path_params['rapidId'] = rapid_id
809
+ # process the query parameters
810
+ # process the header parameters
811
+ # process the form parameters
812
+ # process the body parameter
813
+
814
+
815
+ # set the HTTP header `Accept`
816
+ if 'Accept' not in _header_params:
817
+ _header_params['Accept'] = self.api_client.select_header_accept(
818
+ [
819
+ 'text/plain',
820
+ 'application/json',
821
+ 'text/json'
822
+ ]
823
+ )
824
+
825
+
826
+ # authentication setting
827
+ _auth_settings: List[str] = [
828
+ 'bearer',
829
+ 'oauth2'
830
+ ]
831
+
832
+ return self.api_client.param_serialize(
833
+ method='GET',
834
+ resource_path='/rapid/{rapidId}/responses',
835
+ path_params=_path_params,
836
+ query_params=_query_params,
837
+ header_params=_header_params,
838
+ body=_body_params,
839
+ post_params=_form_params,
840
+ files=_files,
841
+ auth_settings=_auth_settings,
842
+ collection_formats=_collection_formats,
843
+ _host=_host,
844
+ _request_auth=_request_auth
845
+ )
846
+
847
+
848
+
849
+
850
+ @validate_call
851
+ def rapid_rapid_id_unflag_post(
852
+ self,
853
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to unflag")],
854
+ _request_timeout: Union[
855
+ None,
856
+ Annotated[StrictFloat, Field(gt=0)],
857
+ Tuple[
858
+ Annotated[StrictFloat, Field(gt=0)],
859
+ Annotated[StrictFloat, Field(gt=0)]
860
+ ]
861
+ ] = None,
862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
863
+ _content_type: Optional[StrictStr] = None,
864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
866
+ ) -> None:
867
+ """Unflags a flagged rapid. This will add the rapid back to the active labeling pool and prevent it from being flagged again.
868
+
869
+
870
+ :param rapid_id: The id of the rapid to unflag (required)
871
+ :type rapid_id: str
872
+ :param _request_timeout: timeout setting for this request. If one
873
+ number provided, it will be total request
874
+ timeout. It can also be a pair (tuple) of
875
+ (connection, read) timeouts.
876
+ :type _request_timeout: int, tuple(int, int), optional
877
+ :param _request_auth: set to override the auth_settings for an a single
878
+ request; this effectively ignores the
879
+ authentication in the spec for a single request.
880
+ :type _request_auth: dict, optional
881
+ :param _content_type: force content-type for the request.
882
+ :type _content_type: str, Optional
883
+ :param _headers: set to override the headers for a single
884
+ request; this effectively ignores the headers
885
+ in the spec for a single request.
886
+ :type _headers: dict, optional
887
+ :param _host_index: set to override the host_index for a single
888
+ request; this effectively ignores the host_index
889
+ in the spec for a single request.
890
+ :type _host_index: int, optional
891
+ :return: Returns the result object.
892
+ """ # noqa: E501
893
+
894
+ _param = self._rapid_rapid_id_unflag_post_serialize(
895
+ rapid_id=rapid_id,
896
+ _request_auth=_request_auth,
897
+ _content_type=_content_type,
898
+ _headers=_headers,
899
+ _host_index=_host_index
900
+ )
901
+
902
+ _response_types_map: Dict[str, Optional[str]] = {
903
+ '204': None,
904
+ }
905
+ response_data = self.api_client.call_api(
906
+ *_param,
907
+ _request_timeout=_request_timeout
908
+ )
909
+ response_data.read()
910
+ return self.api_client.response_deserialize(
911
+ response_data=response_data,
912
+ response_types_map=_response_types_map,
913
+ ).data
914
+
915
+
916
+ @validate_call
917
+ def rapid_rapid_id_unflag_post_with_http_info(
918
+ self,
919
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to unflag")],
920
+ _request_timeout: Union[
921
+ None,
922
+ Annotated[StrictFloat, Field(gt=0)],
923
+ Tuple[
924
+ Annotated[StrictFloat, Field(gt=0)],
925
+ Annotated[StrictFloat, Field(gt=0)]
926
+ ]
927
+ ] = None,
928
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
929
+ _content_type: Optional[StrictStr] = None,
930
+ _headers: Optional[Dict[StrictStr, Any]] = None,
931
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
932
+ ) -> ApiResponse[None]:
933
+ """Unflags a flagged rapid. This will add the rapid back to the active labeling pool and prevent it from being flagged again.
934
+
935
+
936
+ :param rapid_id: The id of the rapid to unflag (required)
937
+ :type rapid_id: str
938
+ :param _request_timeout: timeout setting for this request. If one
939
+ number provided, it will be total request
940
+ timeout. It can also be a pair (tuple) of
941
+ (connection, read) timeouts.
942
+ :type _request_timeout: int, tuple(int, int), optional
943
+ :param _request_auth: set to override the auth_settings for an a single
944
+ request; this effectively ignores the
945
+ authentication in the spec for a single request.
946
+ :type _request_auth: dict, optional
947
+ :param _content_type: force content-type for the request.
948
+ :type _content_type: str, Optional
949
+ :param _headers: set to override the headers for a single
950
+ request; this effectively ignores the headers
951
+ in the spec for a single request.
952
+ :type _headers: dict, optional
953
+ :param _host_index: set to override the host_index for a single
954
+ request; this effectively ignores the host_index
955
+ in the spec for a single request.
956
+ :type _host_index: int, optional
957
+ :return: Returns the result object.
958
+ """ # noqa: E501
959
+
960
+ _param = self._rapid_rapid_id_unflag_post_serialize(
961
+ rapid_id=rapid_id,
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index
966
+ )
967
+
968
+ _response_types_map: Dict[str, Optional[str]] = {
969
+ '204': None,
970
+ }
971
+ response_data = self.api_client.call_api(
972
+ *_param,
973
+ _request_timeout=_request_timeout
974
+ )
975
+ response_data.read()
976
+ return self.api_client.response_deserialize(
977
+ response_data=response_data,
978
+ response_types_map=_response_types_map,
979
+ )
980
+
981
+
982
+ @validate_call
983
+ def rapid_rapid_id_unflag_post_without_preload_content(
984
+ self,
985
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to unflag")],
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)],
991
+ Annotated[StrictFloat, Field(gt=0)]
992
+ ]
993
+ ] = None,
994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
995
+ _content_type: Optional[StrictStr] = None,
996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
998
+ ) -> RESTResponseType:
999
+ """Unflags a flagged rapid. This will add the rapid back to the active labeling pool and prevent it from being flagged again.
1000
+
1001
+
1002
+ :param rapid_id: The id of the rapid to unflag (required)
1003
+ :type rapid_id: str
1004
+ :param _request_timeout: timeout setting for this request. If one
1005
+ number provided, it will be total request
1006
+ timeout. It can also be a pair (tuple) of
1007
+ (connection, read) timeouts.
1008
+ :type _request_timeout: int, tuple(int, int), optional
1009
+ :param _request_auth: set to override the auth_settings for an a single
1010
+ request; this effectively ignores the
1011
+ authentication in the spec for a single request.
1012
+ :type _request_auth: dict, optional
1013
+ :param _content_type: force content-type for the request.
1014
+ :type _content_type: str, Optional
1015
+ :param _headers: set to override the headers for a single
1016
+ request; this effectively ignores the headers
1017
+ in the spec for a single request.
1018
+ :type _headers: dict, optional
1019
+ :param _host_index: set to override the host_index for a single
1020
+ request; this effectively ignores the host_index
1021
+ in the spec for a single request.
1022
+ :type _host_index: int, optional
1023
+ :return: Returns the result object.
1024
+ """ # noqa: E501
1025
+
1026
+ _param = self._rapid_rapid_id_unflag_post_serialize(
1027
+ rapid_id=rapid_id,
1028
+ _request_auth=_request_auth,
1029
+ _content_type=_content_type,
1030
+ _headers=_headers,
1031
+ _host_index=_host_index
1032
+ )
1033
+
1034
+ _response_types_map: Dict[str, Optional[str]] = {
1035
+ '204': None,
1036
+ }
1037
+ response_data = self.api_client.call_api(
1038
+ *_param,
1039
+ _request_timeout=_request_timeout
1040
+ )
1041
+ return response_data.response
1042
+
1043
+
1044
+ def _rapid_rapid_id_unflag_post_serialize(
1045
+ self,
1046
+ rapid_id,
1047
+ _request_auth,
1048
+ _content_type,
1049
+ _headers,
1050
+ _host_index,
1051
+ ) -> RequestSerialized:
1052
+
1053
+ _host = None
1054
+
1055
+ _collection_formats: Dict[str, str] = {
1056
+ }
1057
+
1058
+ _path_params: Dict[str, str] = {}
1059
+ _query_params: List[Tuple[str, str]] = []
1060
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1061
+ _form_params: List[Tuple[str, str]] = []
1062
+ _files: Dict[
1063
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1064
+ ] = {}
1065
+ _body_params: Optional[bytes] = None
1066
+
1067
+ # process the path parameters
1068
+ if rapid_id is not None:
1069
+ _path_params['rapidId'] = rapid_id
1070
+ # process the query parameters
1071
+ # process the header parameters
1072
+ # process the form parameters
1073
+ # process the body parameter
1074
+
1075
+
1076
+
1077
+
1078
+ # authentication setting
1079
+ _auth_settings: List[str] = [
1080
+ 'bearer',
1081
+ 'oauth2'
1082
+ ]
1083
+
1084
+ return self.api_client.param_serialize(
1085
+ method='POST',
1086
+ resource_path='/rapid/{rapidId}/unflag',
1087
+ path_params=_path_params,
1088
+ query_params=_query_params,
1089
+ header_params=_header_params,
1090
+ body=_body_params,
1091
+ post_params=_form_params,
1092
+ files=_files,
1093
+ auth_settings=_auth_settings,
1094
+ collection_formats=_collection_formats,
1095
+ _host=_host,
1096
+ _request_auth=_request_auth
1097
+ )
1098
+
1099
+
1100
+
1101
+
1102
+ @validate_call
1103
+ def rapid_validation_rapid_id_patch(
1104
+ self,
1105
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to update")],
1106
+ update_validation_rapid_model: Annotated[Optional[UpdateValidationRapidModel], Field(description="The body request")] = None,
1107
+ _request_timeout: Union[
1108
+ None,
1109
+ Annotated[StrictFloat, Field(gt=0)],
1110
+ Tuple[
1111
+ Annotated[StrictFloat, Field(gt=0)],
1112
+ Annotated[StrictFloat, Field(gt=0)]
1113
+ ]
1114
+ ] = None,
1115
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1116
+ _content_type: Optional[StrictStr] = None,
1117
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1118
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1119
+ ) -> None:
1120
+ """Updates the validation information of a Rapid.
1121
+
1122
+
1123
+ :param rapid_id: The id of the rapid to update (required)
1124
+ :type rapid_id: str
1125
+ :param update_validation_rapid_model: The body request
1126
+ :type update_validation_rapid_model: UpdateValidationRapidModel
1127
+ :param _request_timeout: timeout setting for this request. If one
1128
+ number provided, it will be total request
1129
+ timeout. It can also be a pair (tuple) of
1130
+ (connection, read) timeouts.
1131
+ :type _request_timeout: int, tuple(int, int), optional
1132
+ :param _request_auth: set to override the auth_settings for an a single
1133
+ request; this effectively ignores the
1134
+ authentication in the spec for a single request.
1135
+ :type _request_auth: dict, optional
1136
+ :param _content_type: force content-type for the request.
1137
+ :type _content_type: str, Optional
1138
+ :param _headers: set to override the headers for a single
1139
+ request; this effectively ignores the headers
1140
+ in the spec for a single request.
1141
+ :type _headers: dict, optional
1142
+ :param _host_index: set to override the host_index for a single
1143
+ request; this effectively ignores the host_index
1144
+ in the spec for a single request.
1145
+ :type _host_index: int, optional
1146
+ :return: Returns the result object.
1147
+ """ # noqa: E501
1148
+
1149
+ _param = self._rapid_validation_rapid_id_patch_serialize(
1150
+ rapid_id=rapid_id,
1151
+ update_validation_rapid_model=update_validation_rapid_model,
1152
+ _request_auth=_request_auth,
1153
+ _content_type=_content_type,
1154
+ _headers=_headers,
1155
+ _host_index=_host_index
1156
+ )
1157
+
1158
+ _response_types_map: Dict[str, Optional[str]] = {
1159
+ '204': None,
1160
+ }
1161
+ response_data = self.api_client.call_api(
1162
+ *_param,
1163
+ _request_timeout=_request_timeout
1164
+ )
1165
+ response_data.read()
1166
+ return self.api_client.response_deserialize(
1167
+ response_data=response_data,
1168
+ response_types_map=_response_types_map,
1169
+ ).data
1170
+
1171
+
1172
+ @validate_call
1173
+ def rapid_validation_rapid_id_patch_with_http_info(
1174
+ self,
1175
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to update")],
1176
+ update_validation_rapid_model: Annotated[Optional[UpdateValidationRapidModel], Field(description="The body request")] = None,
1177
+ _request_timeout: Union[
1178
+ None,
1179
+ Annotated[StrictFloat, Field(gt=0)],
1180
+ Tuple[
1181
+ Annotated[StrictFloat, Field(gt=0)],
1182
+ Annotated[StrictFloat, Field(gt=0)]
1183
+ ]
1184
+ ] = None,
1185
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1186
+ _content_type: Optional[StrictStr] = None,
1187
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1188
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1189
+ ) -> ApiResponse[None]:
1190
+ """Updates the validation information of a Rapid.
1191
+
1192
+
1193
+ :param rapid_id: The id of the rapid to update (required)
1194
+ :type rapid_id: str
1195
+ :param update_validation_rapid_model: The body request
1196
+ :type update_validation_rapid_model: UpdateValidationRapidModel
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._rapid_validation_rapid_id_patch_serialize(
1220
+ rapid_id=rapid_id,
1221
+ update_validation_rapid_model=update_validation_rapid_model,
1222
+ _request_auth=_request_auth,
1223
+ _content_type=_content_type,
1224
+ _headers=_headers,
1225
+ _host_index=_host_index
1226
+ )
1227
+
1228
+ _response_types_map: Dict[str, Optional[str]] = {
1229
+ '204': None,
1230
+ }
1231
+ response_data = self.api_client.call_api(
1232
+ *_param,
1233
+ _request_timeout=_request_timeout
1234
+ )
1235
+ response_data.read()
1236
+ return self.api_client.response_deserialize(
1237
+ response_data=response_data,
1238
+ response_types_map=_response_types_map,
1239
+ )
1240
+
1241
+
1242
+ @validate_call
1243
+ def rapid_validation_rapid_id_patch_without_preload_content(
1244
+ self,
1245
+ rapid_id: Annotated[StrictStr, Field(description="The id of the rapid to update")],
1246
+ update_validation_rapid_model: Annotated[Optional[UpdateValidationRapidModel], Field(description="The body request")] = None,
1247
+ _request_timeout: Union[
1248
+ None,
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Tuple[
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Annotated[StrictFloat, Field(gt=0)]
1253
+ ]
1254
+ ] = None,
1255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1256
+ _content_type: Optional[StrictStr] = None,
1257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> RESTResponseType:
1260
+ """Updates the validation information of a Rapid.
1261
+
1262
+
1263
+ :param rapid_id: The id of the rapid to update (required)
1264
+ :type rapid_id: str
1265
+ :param update_validation_rapid_model: The body request
1266
+ :type update_validation_rapid_model: UpdateValidationRapidModel
1267
+ :param _request_timeout: timeout setting for this request. If one
1268
+ number provided, it will be total request
1269
+ timeout. It can also be a pair (tuple) of
1270
+ (connection, read) timeouts.
1271
+ :type _request_timeout: int, tuple(int, int), optional
1272
+ :param _request_auth: set to override the auth_settings for an a single
1273
+ request; this effectively ignores the
1274
+ authentication in the spec for a single request.
1275
+ :type _request_auth: dict, optional
1276
+ :param _content_type: force content-type for the request.
1277
+ :type _content_type: str, Optional
1278
+ :param _headers: set to override the headers for a single
1279
+ request; this effectively ignores the headers
1280
+ in the spec for a single request.
1281
+ :type _headers: dict, optional
1282
+ :param _host_index: set to override the host_index for a single
1283
+ request; this effectively ignores the host_index
1284
+ in the spec for a single request.
1285
+ :type _host_index: int, optional
1286
+ :return: Returns the result object.
1287
+ """ # noqa: E501
1288
+
1289
+ _param = self._rapid_validation_rapid_id_patch_serialize(
1290
+ rapid_id=rapid_id,
1291
+ update_validation_rapid_model=update_validation_rapid_model,
1292
+ _request_auth=_request_auth,
1293
+ _content_type=_content_type,
1294
+ _headers=_headers,
1295
+ _host_index=_host_index
1296
+ )
1297
+
1298
+ _response_types_map: Dict[str, Optional[str]] = {
1299
+ '204': None,
1300
+ }
1301
+ response_data = self.api_client.call_api(
1302
+ *_param,
1303
+ _request_timeout=_request_timeout
1304
+ )
1305
+ return response_data.response
1306
+
1307
+
1308
+ def _rapid_validation_rapid_id_patch_serialize(
1309
+ self,
1310
+ rapid_id,
1311
+ update_validation_rapid_model,
1312
+ _request_auth,
1313
+ _content_type,
1314
+ _headers,
1315
+ _host_index,
1316
+ ) -> RequestSerialized:
1317
+
1318
+ _host = None
1319
+
1320
+ _collection_formats: Dict[str, str] = {
1321
+ }
1322
+
1323
+ _path_params: Dict[str, str] = {}
1324
+ _query_params: List[Tuple[str, str]] = []
1325
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1326
+ _form_params: List[Tuple[str, str]] = []
1327
+ _files: Dict[
1328
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1329
+ ] = {}
1330
+ _body_params: Optional[bytes] = None
1331
+
1332
+ # process the path parameters
1333
+ if rapid_id is not None:
1334
+ _path_params['rapidId'] = rapid_id
1335
+ # process the query parameters
1336
+ # process the header parameters
1337
+ # process the form parameters
1338
+ # process the body parameter
1339
+ if update_validation_rapid_model is not None:
1340
+ _body_params = update_validation_rapid_model
1341
+
1342
+
1343
+
1344
+ # set the HTTP header `Content-Type`
1345
+ if _content_type:
1346
+ _header_params['Content-Type'] = _content_type
1347
+ else:
1348
+ _default_content_type = (
1349
+ self.api_client.select_header_content_type(
1350
+ [
1351
+ 'application/json',
1352
+ 'text/json',
1353
+ 'application/*+json'
1354
+ ]
1355
+ )
1356
+ )
1357
+ if _default_content_type is not None:
1358
+ _header_params['Content-Type'] = _default_content_type
1359
+
1360
+ # authentication setting
1361
+ _auth_settings: List[str] = [
1362
+ 'bearer',
1363
+ 'oauth2'
1364
+ ]
1365
+
1366
+ return self.api_client.param_serialize(
1367
+ method='PATCH',
1368
+ resource_path='/rapid/validation/{rapidId}',
1369
+ path_params=_path_params,
1370
+ query_params=_query_params,
1371
+ header_params=_header_params,
1372
+ body=_body_params,
1373
+ post_params=_form_params,
1374
+ files=_files,
1375
+ auth_settings=_auth_settings,
1376
+ collection_formats=_collection_formats,
1377
+ _host=_host,
1378
+ _request_auth=_request_auth
1379
+ )
1380
+
1381
+
1382
+
1383
+
1384
+ @validate_call
1385
+ def rapids_flagged_get(
1386
+ self,
1387
+ request: Annotated[Optional[QueryModel], Field(description="The request to use to filter, sort and page the results")] = None,
1388
+ _request_timeout: Union[
1389
+ None,
1390
+ Annotated[StrictFloat, Field(gt=0)],
1391
+ Tuple[
1392
+ Annotated[StrictFloat, Field(gt=0)],
1393
+ Annotated[StrictFloat, Field(gt=0)]
1394
+ ]
1395
+ ] = None,
1396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1397
+ _content_type: Optional[StrictStr] = None,
1398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1400
+ ) -> RapidModelPagedResult:
1401
+ """Allows querying all rapids that have been flagged.
1402
+
1403
+
1404
+ :param request: The request to use to filter, sort and page the results
1405
+ :type request: QueryModel
1406
+ :param _request_timeout: timeout setting for this request. If one
1407
+ number provided, it will be total request
1408
+ timeout. It can also be a pair (tuple) of
1409
+ (connection, read) timeouts.
1410
+ :type _request_timeout: int, tuple(int, int), optional
1411
+ :param _request_auth: set to override the auth_settings for an a single
1412
+ request; this effectively ignores the
1413
+ authentication in the spec for a single request.
1414
+ :type _request_auth: dict, optional
1415
+ :param _content_type: force content-type for the request.
1416
+ :type _content_type: str, Optional
1417
+ :param _headers: set to override the headers for a single
1418
+ request; this effectively ignores the headers
1419
+ in the spec for a single request.
1420
+ :type _headers: dict, optional
1421
+ :param _host_index: set to override the host_index for a single
1422
+ request; this effectively ignores the host_index
1423
+ in the spec for a single request.
1424
+ :type _host_index: int, optional
1425
+ :return: Returns the result object.
1426
+ """ # noqa: E501
1427
+
1428
+ _param = self._rapids_flagged_get_serialize(
1429
+ request=request,
1430
+ _request_auth=_request_auth,
1431
+ _content_type=_content_type,
1432
+ _headers=_headers,
1433
+ _host_index=_host_index
1434
+ )
1435
+
1436
+ _response_types_map: Dict[str, Optional[str]] = {
1437
+ '200': "RapidModelPagedResult",
1438
+ }
1439
+ response_data = self.api_client.call_api(
1440
+ *_param,
1441
+ _request_timeout=_request_timeout
1442
+ )
1443
+ response_data.read()
1444
+ return self.api_client.response_deserialize(
1445
+ response_data=response_data,
1446
+ response_types_map=_response_types_map,
1447
+ ).data
1448
+
1449
+
1450
+ @validate_call
1451
+ def rapids_flagged_get_with_http_info(
1452
+ self,
1453
+ request: Annotated[Optional[QueryModel], Field(description="The request to use to filter, sort and page the results")] = None,
1454
+ _request_timeout: Union[
1455
+ None,
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Tuple[
1458
+ Annotated[StrictFloat, Field(gt=0)],
1459
+ Annotated[StrictFloat, Field(gt=0)]
1460
+ ]
1461
+ ] = None,
1462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1463
+ _content_type: Optional[StrictStr] = None,
1464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1466
+ ) -> ApiResponse[RapidModelPagedResult]:
1467
+ """Allows querying all rapids that have been flagged.
1468
+
1469
+
1470
+ :param request: The request to use to filter, sort and page the results
1471
+ :type request: QueryModel
1472
+ :param _request_timeout: timeout setting for this request. If one
1473
+ number provided, it will be total request
1474
+ timeout. It can also be a pair (tuple) of
1475
+ (connection, read) timeouts.
1476
+ :type _request_timeout: int, tuple(int, int), optional
1477
+ :param _request_auth: set to override the auth_settings for an a single
1478
+ request; this effectively ignores the
1479
+ authentication in the spec for a single request.
1480
+ :type _request_auth: dict, optional
1481
+ :param _content_type: force content-type for the request.
1482
+ :type _content_type: str, Optional
1483
+ :param _headers: set to override the headers for a single
1484
+ request; this effectively ignores the headers
1485
+ in the spec for a single request.
1486
+ :type _headers: dict, optional
1487
+ :param _host_index: set to override the host_index for a single
1488
+ request; this effectively ignores the host_index
1489
+ in the spec for a single request.
1490
+ :type _host_index: int, optional
1491
+ :return: Returns the result object.
1492
+ """ # noqa: E501
1493
+
1494
+ _param = self._rapids_flagged_get_serialize(
1495
+ request=request,
1496
+ _request_auth=_request_auth,
1497
+ _content_type=_content_type,
1498
+ _headers=_headers,
1499
+ _host_index=_host_index
1500
+ )
1501
+
1502
+ _response_types_map: Dict[str, Optional[str]] = {
1503
+ '200': "RapidModelPagedResult",
1504
+ }
1505
+ response_data = self.api_client.call_api(
1506
+ *_param,
1507
+ _request_timeout=_request_timeout
1508
+ )
1509
+ response_data.read()
1510
+ return self.api_client.response_deserialize(
1511
+ response_data=response_data,
1512
+ response_types_map=_response_types_map,
1513
+ )
1514
+
1515
+
1516
+ @validate_call
1517
+ def rapids_flagged_get_without_preload_content(
1518
+ self,
1519
+ request: Annotated[Optional[QueryModel], Field(description="The request to use to filter, sort and page the results")] = None,
1520
+ _request_timeout: Union[
1521
+ None,
1522
+ Annotated[StrictFloat, Field(gt=0)],
1523
+ Tuple[
1524
+ Annotated[StrictFloat, Field(gt=0)],
1525
+ Annotated[StrictFloat, Field(gt=0)]
1526
+ ]
1527
+ ] = None,
1528
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1529
+ _content_type: Optional[StrictStr] = None,
1530
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1531
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1532
+ ) -> RESTResponseType:
1533
+ """Allows querying all rapids that have been flagged.
1534
+
1535
+
1536
+ :param request: The request to use to filter, sort and page the results
1537
+ :type request: QueryModel
1538
+ :param _request_timeout: timeout setting for this request. If one
1539
+ number provided, it will be total request
1540
+ timeout. It can also be a pair (tuple) of
1541
+ (connection, read) timeouts.
1542
+ :type _request_timeout: int, tuple(int, int), optional
1543
+ :param _request_auth: set to override the auth_settings for an a single
1544
+ request; this effectively ignores the
1545
+ authentication in the spec for a single request.
1546
+ :type _request_auth: dict, optional
1547
+ :param _content_type: force content-type for the request.
1548
+ :type _content_type: str, Optional
1549
+ :param _headers: set to override the headers for a single
1550
+ request; this effectively ignores the headers
1551
+ in the spec for a single request.
1552
+ :type _headers: dict, optional
1553
+ :param _host_index: set to override the host_index for a single
1554
+ request; this effectively ignores the host_index
1555
+ in the spec for a single request.
1556
+ :type _host_index: int, optional
1557
+ :return: Returns the result object.
1558
+ """ # noqa: E501
1559
+
1560
+ _param = self._rapids_flagged_get_serialize(
1561
+ request=request,
1562
+ _request_auth=_request_auth,
1563
+ _content_type=_content_type,
1564
+ _headers=_headers,
1565
+ _host_index=_host_index
1566
+ )
1567
+
1568
+ _response_types_map: Dict[str, Optional[str]] = {
1569
+ '200': "RapidModelPagedResult",
1570
+ }
1571
+ response_data = self.api_client.call_api(
1572
+ *_param,
1573
+ _request_timeout=_request_timeout
1574
+ )
1575
+ return response_data.response
1576
+
1577
+
1578
+ def _rapids_flagged_get_serialize(
1579
+ self,
1580
+ request,
1581
+ _request_auth,
1582
+ _content_type,
1583
+ _headers,
1584
+ _host_index,
1585
+ ) -> RequestSerialized:
1586
+
1587
+ _host = None
1588
+
1589
+ _collection_formats: Dict[str, str] = {
1590
+ }
1591
+
1592
+ _path_params: Dict[str, str] = {}
1593
+ _query_params: List[Tuple[str, str]] = []
1594
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1595
+ _form_params: List[Tuple[str, str]] = []
1596
+ _files: Dict[
1597
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1598
+ ] = {}
1599
+ _body_params: Optional[bytes] = None
1600
+
1601
+ # process the path parameters
1602
+ # process the query parameters
1603
+ if request is not None:
1604
+
1605
+ _query_params.append(('request', request))
1606
+
1607
+ # process the header parameters
1608
+ # process the form parameters
1609
+ # process the body parameter
1610
+
1611
+
1612
+ # set the HTTP header `Accept`
1613
+ if 'Accept' not in _header_params:
1614
+ _header_params['Accept'] = self.api_client.select_header_accept(
1615
+ [
1616
+ 'text/plain',
1617
+ 'application/json',
1618
+ 'text/json'
1619
+ ]
1620
+ )
1621
+
1622
+
1623
+ # authentication setting
1624
+ _auth_settings: List[str] = [
1625
+ 'bearer',
1626
+ 'oauth2'
1627
+ ]
1628
+
1629
+ return self.api_client.param_serialize(
1630
+ method='GET',
1631
+ resource_path='/rapids/flagged',
1632
+ path_params=_path_params,
1633
+ query_params=_query_params,
1634
+ header_params=_header_params,
1635
+ body=_body_params,
1636
+ post_params=_form_params,
1637
+ files=_files,
1638
+ auth_settings=_auth_settings,
1639
+ collection_formats=_collection_formats,
1640
+ _host=_host,
1641
+ _request_auth=_request_auth
1642
+ )
1643
+
1644
+