rapidata 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. rapidata/__init__.py +4 -3
  2. rapidata/api_client/__init__.py +51 -15
  3. rapidata/api_client/api/__init__.py +5 -0
  4. rapidata/api_client/api/campaign_api.py +1044 -0
  5. rapidata/api_client/api/compare_workflow_api.py +316 -0
  6. rapidata/api_client/api/dataset_api.py +24 -24
  7. rapidata/api_client/api/order_api.py +206 -536
  8. rapidata/api_client/api/pipeline_api.py +843 -0
  9. rapidata/api_client/api/rapid_api.py +6 -6
  10. rapidata/api_client/api/simple_workflow_api.py +350 -0
  11. rapidata/api_client/api/validation_api.py +6 -6
  12. rapidata/api_client/api/workflow_api.py +2386 -0
  13. rapidata/api_client/api_client.py +2 -2
  14. rapidata/api_client/models/__init__.py +46 -15
  15. rapidata/api_client/models/add_campaign_artifact_result.py +87 -0
  16. rapidata/api_client/models/add_campaign_model.py +149 -0
  17. rapidata/api_client/models/admin_order_model.py +8 -1
  18. rapidata/api_client/models/age_group.py +1 -1
  19. rapidata/api_client/models/age_user_filter_model.py +2 -2
  20. rapidata/api_client/models/campaign_artifact_model.py +98 -0
  21. rapidata/api_client/models/campaign_query_model.py +105 -0
  22. rapidata/api_client/models/campaign_query_model_paged_result.py +105 -0
  23. rapidata/api_client/models/campaign_status.py +39 -0
  24. rapidata/api_client/models/campaign_user_filter_model.py +2 -2
  25. rapidata/api_client/models/compare_workflow_config.py +2 -12
  26. rapidata/api_client/models/compare_workflow_config_model.py +138 -0
  27. rapidata/api_client/models/compare_workflow_get_result_overview_get200_response.py +137 -0
  28. rapidata/api_client/models/compare_workflow_model1.py +146 -0
  29. rapidata/api_client/models/completed_rapid_model.py +103 -0
  30. rapidata/api_client/models/conditional_validation_selection.py +106 -0
  31. rapidata/api_client/models/country_user_filter_model.py +2 -2
  32. rapidata/api_client/models/create_demographic_rapid_model.py +3 -3
  33. rapidata/api_client/models/create_independent_workflow_model.py +93 -0
  34. rapidata/api_client/models/create_independent_workflow_model_workflow_config.py +140 -0
  35. rapidata/api_client/models/create_independent_workflow_result.py +89 -0
  36. rapidata/api_client/models/create_order_model.py +40 -31
  37. rapidata/api_client/models/create_order_model_selections_inner.py +40 -12
  38. rapidata/api_client/models/create_order_model_user_filters_inner.py +35 -35
  39. rapidata/api_client/models/customer_order_model.py +8 -1
  40. rapidata/api_client/models/dataset_artifact_model.py +98 -0
  41. rapidata/api_client/models/demographic_rapid_selection_config.py +7 -5
  42. rapidata/api_client/models/demographic_selection.py +8 -6
  43. rapidata/api_client/models/feedback_model.py +1 -1
  44. rapidata/api_client/models/file_artifact_model.py +98 -0
  45. rapidata/api_client/models/gender.py +1 -1
  46. rapidata/api_client/models/gender_user_filter_model.py +2 -2
  47. rapidata/api_client/models/get_attach_category_workflow_result_overview_result.py +144 -0
  48. rapidata/api_client/models/get_compare_workflow_result_overview_result.py +125 -0
  49. rapidata/api_client/models/get_compare_workflow_result_overview_small_result.py +114 -0
  50. rapidata/api_client/models/get_pipeline_by_id_result.py +100 -0
  51. rapidata/api_client/models/get_pipeline_by_id_result_artifacts_value.py +182 -0
  52. rapidata/api_client/models/get_simple_workflow_result_overview_result.py +142 -0
  53. rapidata/api_client/models/get_workflow_by_id_result.py +91 -0
  54. rapidata/api_client/models/get_workflow_by_id_result_workflow.py +140 -0
  55. rapidata/api_client/models/get_workflow_progress_result.py +100 -0
  56. rapidata/api_client/models/get_workflow_result_overview_result.py +104 -0
  57. rapidata/api_client/models/i_workflow_model_paged_result.py +105 -0
  58. rapidata/api_client/models/in_progress_rapid_model.py +103 -0
  59. rapidata/api_client/models/labeling_selection.py +2 -2
  60. rapidata/api_client/models/language_user_filter_model.py +2 -2
  61. rapidata/api_client/models/not_started_rapid_model.py +93 -0
  62. rapidata/api_client/models/order_state.py +43 -0
  63. rapidata/api_client/models/query_campaigns_model.py +112 -0
  64. rapidata/api_client/models/query_workflows_model.py +112 -0
  65. rapidata/api_client/models/ranked_datapoint_model.py +95 -0
  66. rapidata/api_client/models/rapid_answer.py +97 -0
  67. rapidata/api_client/models/rapid_answer_result.py +252 -0
  68. rapidata/api_client/models/simple_workflow_config.py +2 -12
  69. rapidata/api_client/models/simple_workflow_config_model.py +132 -0
  70. rapidata/api_client/models/simple_workflow_config_model_blueprint.py +238 -0
  71. rapidata/api_client/models/simple_workflow_get_result_overview_get200_response.py +137 -0
  72. rapidata/api_client/models/simple_workflow_model1.py +140 -0
  73. rapidata/api_client/models/static_selection.py +96 -0
  74. rapidata/api_client/models/update_workflow_config_request.py +107 -0
  75. rapidata/api_client/models/update_workflow_config_request_config.py +140 -0
  76. rapidata/api_client/models/user_score_user_filter_model.py +3 -3
  77. rapidata/api_client/models/validation_selection.py +3 -3
  78. rapidata/api_client/models/workflow_artifact_model.py +98 -0
  79. rapidata/api_client/models/workflow_config_artifact_model.py +102 -0
  80. rapidata/api_client/models/workflow_config_artifact_model_workflow_config.py +140 -0
  81. rapidata/api_client/models/workflow_state.py +41 -0
  82. rapidata/api_client/rest.py +1 -1
  83. rapidata/api_client_README.md +75 -29
  84. rapidata/rapidata_client/__init__.py +6 -1
  85. rapidata/rapidata_client/order/rapidata_order_builder.py +2 -1
  86. rapidata/rapidata_client/selection/__init__.py +1 -0
  87. rapidata/rapidata_client/selection/conditional_validation_rapid_selection.py +41 -0
  88. rapidata/rapidata_client/selection/demographic_selection.py +3 -5
  89. {rapidata-0.4.0.dist-info → rapidata-0.5.0.dist-info}/METADATA +1 -1
  90. {rapidata-0.4.0.dist-info → rapidata-0.5.0.dist-info}/RECORD +92 -40
  91. {rapidata-0.4.0.dist-info → rapidata-0.5.0.dist-info}/LICENSE +0 -0
  92. {rapidata-0.4.0.dist-info → rapidata-0.5.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,1044 @@
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.campaign_query_model_paged_result import CampaignQueryModelPagedResult
23
+ from rapidata.api_client.models.query_campaigns_model import QueryCampaignsModel
24
+
25
+ from rapidata.api_client.api_client import ApiClient, RequestSerialized
26
+ from rapidata.api_client.api_response import ApiResponse
27
+ from rapidata.api_client.rest import RESTResponseType
28
+
29
+
30
+ class CampaignApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def campaign_monitor_get(
45
+ self,
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> None:
59
+ """The monitor endpoint is used to monitor the health of the service
60
+
61
+
62
+ :param _request_timeout: timeout setting for this request. If one
63
+ number provided, it will be total request
64
+ timeout. It can also be a pair (tuple) of
65
+ (connection, read) timeouts.
66
+ :type _request_timeout: int, tuple(int, int), optional
67
+ :param _request_auth: set to override the auth_settings for an a single
68
+ request; this effectively ignores the
69
+ authentication in the spec for a single request.
70
+ :type _request_auth: dict, optional
71
+ :param _content_type: force content-type for the request.
72
+ :type _content_type: str, Optional
73
+ :param _headers: set to override the headers for a single
74
+ request; this effectively ignores the headers
75
+ in the spec for a single request.
76
+ :type _headers: dict, optional
77
+ :param _host_index: set to override the host_index for a single
78
+ request; this effectively ignores the host_index
79
+ in the spec for a single request.
80
+ :type _host_index: int, optional
81
+ :return: Returns the result object.
82
+ """ # noqa: E501
83
+
84
+ _param = self._campaign_monitor_get_serialize(
85
+ _request_auth=_request_auth,
86
+ _content_type=_content_type,
87
+ _headers=_headers,
88
+ _host_index=_host_index
89
+ )
90
+
91
+ _response_types_map: Dict[str, Optional[str]] = {
92
+ '200': None,
93
+ }
94
+ response_data = self.api_client.call_api(
95
+ *_param,
96
+ _request_timeout=_request_timeout
97
+ )
98
+ response_data.read()
99
+ return self.api_client.response_deserialize(
100
+ response_data=response_data,
101
+ response_types_map=_response_types_map,
102
+ ).data
103
+
104
+
105
+ @validate_call
106
+ def campaign_monitor_get_with_http_info(
107
+ self,
108
+ _request_timeout: Union[
109
+ None,
110
+ Annotated[StrictFloat, Field(gt=0)],
111
+ Tuple[
112
+ Annotated[StrictFloat, Field(gt=0)],
113
+ Annotated[StrictFloat, Field(gt=0)]
114
+ ]
115
+ ] = None,
116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
117
+ _content_type: Optional[StrictStr] = None,
118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
120
+ ) -> ApiResponse[None]:
121
+ """The monitor endpoint is used to monitor the health of the service
122
+
123
+
124
+ :param _request_timeout: timeout setting for this request. If one
125
+ number provided, it will be total request
126
+ timeout. It can also be a pair (tuple) of
127
+ (connection, read) timeouts.
128
+ :type _request_timeout: int, tuple(int, int), optional
129
+ :param _request_auth: set to override the auth_settings for an a single
130
+ request; this effectively ignores the
131
+ authentication in the spec for a single request.
132
+ :type _request_auth: dict, optional
133
+ :param _content_type: force content-type for the request.
134
+ :type _content_type: str, Optional
135
+ :param _headers: set to override the headers for a single
136
+ request; this effectively ignores the headers
137
+ in the spec for a single request.
138
+ :type _headers: dict, optional
139
+ :param _host_index: set to override the host_index for a single
140
+ request; this effectively ignores the host_index
141
+ in the spec for a single request.
142
+ :type _host_index: int, optional
143
+ :return: Returns the result object.
144
+ """ # noqa: E501
145
+
146
+ _param = self._campaign_monitor_get_serialize(
147
+ _request_auth=_request_auth,
148
+ _content_type=_content_type,
149
+ _headers=_headers,
150
+ _host_index=_host_index
151
+ )
152
+
153
+ _response_types_map: Dict[str, Optional[str]] = {
154
+ '200': None,
155
+ }
156
+ response_data = self.api_client.call_api(
157
+ *_param,
158
+ _request_timeout=_request_timeout
159
+ )
160
+ response_data.read()
161
+ return self.api_client.response_deserialize(
162
+ response_data=response_data,
163
+ response_types_map=_response_types_map,
164
+ )
165
+
166
+
167
+ @validate_call
168
+ def campaign_monitor_get_without_preload_content(
169
+ self,
170
+ _request_timeout: Union[
171
+ None,
172
+ Annotated[StrictFloat, Field(gt=0)],
173
+ Tuple[
174
+ Annotated[StrictFloat, Field(gt=0)],
175
+ Annotated[StrictFloat, Field(gt=0)]
176
+ ]
177
+ ] = None,
178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
179
+ _content_type: Optional[StrictStr] = None,
180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
182
+ ) -> RESTResponseType:
183
+ """The monitor endpoint is used to monitor the health of the service
184
+
185
+
186
+ :param _request_timeout: timeout setting for this request. If one
187
+ number provided, it will be total request
188
+ timeout. It can also be a pair (tuple) of
189
+ (connection, read) timeouts.
190
+ :type _request_timeout: int, tuple(int, int), optional
191
+ :param _request_auth: set to override the auth_settings for an a single
192
+ request; this effectively ignores the
193
+ authentication in the spec for a single request.
194
+ :type _request_auth: dict, optional
195
+ :param _content_type: force content-type for the request.
196
+ :type _content_type: str, Optional
197
+ :param _headers: set to override the headers for a single
198
+ request; this effectively ignores the headers
199
+ in the spec for a single request.
200
+ :type _headers: dict, optional
201
+ :param _host_index: set to override the host_index for a single
202
+ request; this effectively ignores the host_index
203
+ in the spec for a single request.
204
+ :type _host_index: int, optional
205
+ :return: Returns the result object.
206
+ """ # noqa: E501
207
+
208
+ _param = self._campaign_monitor_get_serialize(
209
+ _request_auth=_request_auth,
210
+ _content_type=_content_type,
211
+ _headers=_headers,
212
+ _host_index=_host_index
213
+ )
214
+
215
+ _response_types_map: Dict[str, Optional[str]] = {
216
+ '200': None,
217
+ }
218
+ response_data = self.api_client.call_api(
219
+ *_param,
220
+ _request_timeout=_request_timeout
221
+ )
222
+ return response_data.response
223
+
224
+
225
+ def _campaign_monitor_get_serialize(
226
+ self,
227
+ _request_auth,
228
+ _content_type,
229
+ _headers,
230
+ _host_index,
231
+ ) -> RequestSerialized:
232
+
233
+ _host = None
234
+
235
+ _collection_formats: Dict[str, str] = {
236
+ }
237
+
238
+ _path_params: Dict[str, str] = {}
239
+ _query_params: List[Tuple[str, str]] = []
240
+ _header_params: Dict[str, Optional[str]] = _headers or {}
241
+ _form_params: List[Tuple[str, str]] = []
242
+ _files: Dict[
243
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
244
+ ] = {}
245
+ _body_params: Optional[bytes] = None
246
+
247
+ # process the path parameters
248
+ # process the query parameters
249
+ # process the header parameters
250
+ # process the form parameters
251
+ # process the body parameter
252
+
253
+
254
+
255
+
256
+ # authentication setting
257
+ _auth_settings: List[str] = [
258
+ 'bearer'
259
+ ]
260
+
261
+ return self.api_client.param_serialize(
262
+ method='GET',
263
+ resource_path='/Campaign/Monitor',
264
+ path_params=_path_params,
265
+ query_params=_query_params,
266
+ header_params=_header_params,
267
+ body=_body_params,
268
+ post_params=_form_params,
269
+ files=_files,
270
+ auth_settings=_auth_settings,
271
+ collection_formats=_collection_formats,
272
+ _host=_host,
273
+ _request_auth=_request_auth
274
+ )
275
+
276
+
277
+
278
+
279
+ @validate_call
280
+ def campaign_pause_post(
281
+ self,
282
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
283
+ _request_timeout: Union[
284
+ None,
285
+ Annotated[StrictFloat, Field(gt=0)],
286
+ Tuple[
287
+ Annotated[StrictFloat, Field(gt=0)],
288
+ Annotated[StrictFloat, Field(gt=0)]
289
+ ]
290
+ ] = None,
291
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
292
+ _content_type: Optional[StrictStr] = None,
293
+ _headers: Optional[Dict[StrictStr, Any]] = None,
294
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
295
+ ) -> None:
296
+ """Pauses a campaign.
297
+
298
+
299
+ :param campaign_id: id of the campaign that should be paused
300
+ :type campaign_id: str
301
+ :param _request_timeout: timeout setting for this request. If one
302
+ number provided, it will be total request
303
+ timeout. It can also be a pair (tuple) of
304
+ (connection, read) timeouts.
305
+ :type _request_timeout: int, tuple(int, int), optional
306
+ :param _request_auth: set to override the auth_settings for an a single
307
+ request; this effectively ignores the
308
+ authentication in the spec for a single request.
309
+ :type _request_auth: dict, optional
310
+ :param _content_type: force content-type for the request.
311
+ :type _content_type: str, Optional
312
+ :param _headers: set to override the headers for a single
313
+ request; this effectively ignores the headers
314
+ in the spec for a single request.
315
+ :type _headers: dict, optional
316
+ :param _host_index: set to override the host_index for a single
317
+ request; this effectively ignores the host_index
318
+ in the spec for a single request.
319
+ :type _host_index: int, optional
320
+ :return: Returns the result object.
321
+ """ # noqa: E501
322
+
323
+ _param = self._campaign_pause_post_serialize(
324
+ campaign_id=campaign_id,
325
+ _request_auth=_request_auth,
326
+ _content_type=_content_type,
327
+ _headers=_headers,
328
+ _host_index=_host_index
329
+ )
330
+
331
+ _response_types_map: Dict[str, Optional[str]] = {
332
+ '200': None,
333
+ }
334
+ response_data = self.api_client.call_api(
335
+ *_param,
336
+ _request_timeout=_request_timeout
337
+ )
338
+ response_data.read()
339
+ return self.api_client.response_deserialize(
340
+ response_data=response_data,
341
+ response_types_map=_response_types_map,
342
+ ).data
343
+
344
+
345
+ @validate_call
346
+ def campaign_pause_post_with_http_info(
347
+ self,
348
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
349
+ _request_timeout: Union[
350
+ None,
351
+ Annotated[StrictFloat, Field(gt=0)],
352
+ Tuple[
353
+ Annotated[StrictFloat, Field(gt=0)],
354
+ Annotated[StrictFloat, Field(gt=0)]
355
+ ]
356
+ ] = None,
357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
358
+ _content_type: Optional[StrictStr] = None,
359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
361
+ ) -> ApiResponse[None]:
362
+ """Pauses a campaign.
363
+
364
+
365
+ :param campaign_id: id of the campaign that should be paused
366
+ :type campaign_id: str
367
+ :param _request_timeout: timeout setting for this request. If one
368
+ number provided, it will be total request
369
+ timeout. It can also be a pair (tuple) of
370
+ (connection, read) timeouts.
371
+ :type _request_timeout: int, tuple(int, int), optional
372
+ :param _request_auth: set to override the auth_settings for an a single
373
+ request; this effectively ignores the
374
+ authentication in the spec for a single request.
375
+ :type _request_auth: dict, optional
376
+ :param _content_type: force content-type for the request.
377
+ :type _content_type: str, Optional
378
+ :param _headers: set to override the headers for a single
379
+ request; this effectively ignores the headers
380
+ in the spec for a single request.
381
+ :type _headers: dict, optional
382
+ :param _host_index: set to override the host_index for a single
383
+ request; this effectively ignores the host_index
384
+ in the spec for a single request.
385
+ :type _host_index: int, optional
386
+ :return: Returns the result object.
387
+ """ # noqa: E501
388
+
389
+ _param = self._campaign_pause_post_serialize(
390
+ campaign_id=campaign_id,
391
+ _request_auth=_request_auth,
392
+ _content_type=_content_type,
393
+ _headers=_headers,
394
+ _host_index=_host_index
395
+ )
396
+
397
+ _response_types_map: Dict[str, Optional[str]] = {
398
+ '200': None,
399
+ }
400
+ response_data = self.api_client.call_api(
401
+ *_param,
402
+ _request_timeout=_request_timeout
403
+ )
404
+ response_data.read()
405
+ return self.api_client.response_deserialize(
406
+ response_data=response_data,
407
+ response_types_map=_response_types_map,
408
+ )
409
+
410
+
411
+ @validate_call
412
+ def campaign_pause_post_without_preload_content(
413
+ self,
414
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
415
+ _request_timeout: Union[
416
+ None,
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Tuple[
419
+ Annotated[StrictFloat, Field(gt=0)],
420
+ Annotated[StrictFloat, Field(gt=0)]
421
+ ]
422
+ ] = None,
423
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
424
+ _content_type: Optional[StrictStr] = None,
425
+ _headers: Optional[Dict[StrictStr, Any]] = None,
426
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
427
+ ) -> RESTResponseType:
428
+ """Pauses a campaign.
429
+
430
+
431
+ :param campaign_id: id of the campaign that should be paused
432
+ :type campaign_id: str
433
+ :param _request_timeout: timeout setting for this request. If one
434
+ number provided, it will be total request
435
+ timeout. It can also be a pair (tuple) of
436
+ (connection, read) timeouts.
437
+ :type _request_timeout: int, tuple(int, int), optional
438
+ :param _request_auth: set to override the auth_settings for an a single
439
+ request; this effectively ignores the
440
+ authentication in the spec for a single request.
441
+ :type _request_auth: dict, optional
442
+ :param _content_type: force content-type for the request.
443
+ :type _content_type: str, Optional
444
+ :param _headers: set to override the headers for a single
445
+ request; this effectively ignores the headers
446
+ in the spec for a single request.
447
+ :type _headers: dict, optional
448
+ :param _host_index: set to override the host_index for a single
449
+ request; this effectively ignores the host_index
450
+ in the spec for a single request.
451
+ :type _host_index: int, optional
452
+ :return: Returns the result object.
453
+ """ # noqa: E501
454
+
455
+ _param = self._campaign_pause_post_serialize(
456
+ campaign_id=campaign_id,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ '200': None,
465
+ }
466
+ response_data = self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ return response_data.response
471
+
472
+
473
+ def _campaign_pause_post_serialize(
474
+ self,
475
+ campaign_id,
476
+ _request_auth,
477
+ _content_type,
478
+ _headers,
479
+ _host_index,
480
+ ) -> RequestSerialized:
481
+
482
+ _host = None
483
+
484
+ _collection_formats: Dict[str, str] = {
485
+ }
486
+
487
+ _path_params: Dict[str, str] = {}
488
+ _query_params: List[Tuple[str, str]] = []
489
+ _header_params: Dict[str, Optional[str]] = _headers or {}
490
+ _form_params: List[Tuple[str, str]] = []
491
+ _files: Dict[
492
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
493
+ ] = {}
494
+ _body_params: Optional[bytes] = None
495
+
496
+ # process the path parameters
497
+ # process the query parameters
498
+ if campaign_id is not None:
499
+
500
+ _query_params.append(('campaignId', campaign_id))
501
+
502
+ # process the header parameters
503
+ # process the form parameters
504
+ # process the body parameter
505
+
506
+
507
+
508
+
509
+ # authentication setting
510
+ _auth_settings: List[str] = [
511
+ 'bearer'
512
+ ]
513
+
514
+ return self.api_client.param_serialize(
515
+ method='POST',
516
+ resource_path='/Campaign/Pause',
517
+ path_params=_path_params,
518
+ query_params=_query_params,
519
+ header_params=_header_params,
520
+ body=_body_params,
521
+ post_params=_form_params,
522
+ files=_files,
523
+ auth_settings=_auth_settings,
524
+ collection_formats=_collection_formats,
525
+ _host=_host,
526
+ _request_auth=_request_auth
527
+ )
528
+
529
+
530
+
531
+
532
+ @validate_call
533
+ def campaign_query_get(
534
+ self,
535
+ request: Annotated[Optional[QueryCampaignsModel], Field(description="The parameters for filtering, paging, and sorting")] = None,
536
+ _request_timeout: Union[
537
+ None,
538
+ Annotated[StrictFloat, Field(gt=0)],
539
+ Tuple[
540
+ Annotated[StrictFloat, Field(gt=0)],
541
+ Annotated[StrictFloat, Field(gt=0)]
542
+ ]
543
+ ] = None,
544
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
545
+ _content_type: Optional[StrictStr] = None,
546
+ _headers: Optional[Dict[StrictStr, Any]] = None,
547
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
548
+ ) -> CampaignQueryModelPagedResult:
549
+ """Queries orders based on a filter, page, and sort criteria.
550
+
551
+
552
+ :param request: The parameters for filtering, paging, and sorting
553
+ :type request: QueryCampaignsModel
554
+ :param _request_timeout: timeout setting for this request. If one
555
+ number provided, it will be total request
556
+ timeout. It can also be a pair (tuple) of
557
+ (connection, read) timeouts.
558
+ :type _request_timeout: int, tuple(int, int), optional
559
+ :param _request_auth: set to override the auth_settings for an a single
560
+ request; this effectively ignores the
561
+ authentication in the spec for a single request.
562
+ :type _request_auth: dict, optional
563
+ :param _content_type: force content-type for the request.
564
+ :type _content_type: str, Optional
565
+ :param _headers: set to override the headers for a single
566
+ request; this effectively ignores the headers
567
+ in the spec for a single request.
568
+ :type _headers: dict, optional
569
+ :param _host_index: set to override the host_index for a single
570
+ request; this effectively ignores the host_index
571
+ in the spec for a single request.
572
+ :type _host_index: int, optional
573
+ :return: Returns the result object.
574
+ """ # noqa: E501
575
+
576
+ _param = self._campaign_query_get_serialize(
577
+ request=request,
578
+ _request_auth=_request_auth,
579
+ _content_type=_content_type,
580
+ _headers=_headers,
581
+ _host_index=_host_index
582
+ )
583
+
584
+ _response_types_map: Dict[str, Optional[str]] = {
585
+ '200': "CampaignQueryModelPagedResult",
586
+ }
587
+ response_data = self.api_client.call_api(
588
+ *_param,
589
+ _request_timeout=_request_timeout
590
+ )
591
+ response_data.read()
592
+ return self.api_client.response_deserialize(
593
+ response_data=response_data,
594
+ response_types_map=_response_types_map,
595
+ ).data
596
+
597
+
598
+ @validate_call
599
+ def campaign_query_get_with_http_info(
600
+ self,
601
+ request: Annotated[Optional[QueryCampaignsModel], Field(description="The parameters for filtering, paging, and sorting")] = None,
602
+ _request_timeout: Union[
603
+ None,
604
+ Annotated[StrictFloat, Field(gt=0)],
605
+ Tuple[
606
+ Annotated[StrictFloat, Field(gt=0)],
607
+ Annotated[StrictFloat, Field(gt=0)]
608
+ ]
609
+ ] = None,
610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
611
+ _content_type: Optional[StrictStr] = None,
612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
614
+ ) -> ApiResponse[CampaignQueryModelPagedResult]:
615
+ """Queries orders based on a filter, page, and sort criteria.
616
+
617
+
618
+ :param request: The parameters for filtering, paging, and sorting
619
+ :type request: QueryCampaignsModel
620
+ :param _request_timeout: timeout setting for this request. If one
621
+ number provided, it will be total request
622
+ timeout. It can also be a pair (tuple) of
623
+ (connection, read) timeouts.
624
+ :type _request_timeout: int, tuple(int, int), optional
625
+ :param _request_auth: set to override the auth_settings for an a single
626
+ request; this effectively ignores the
627
+ authentication in the spec for a single request.
628
+ :type _request_auth: dict, optional
629
+ :param _content_type: force content-type for the request.
630
+ :type _content_type: str, Optional
631
+ :param _headers: set to override the headers for a single
632
+ request; this effectively ignores the headers
633
+ in the spec for a single request.
634
+ :type _headers: dict, optional
635
+ :param _host_index: set to override the host_index for a single
636
+ request; this effectively ignores the host_index
637
+ in the spec for a single request.
638
+ :type _host_index: int, optional
639
+ :return: Returns the result object.
640
+ """ # noqa: E501
641
+
642
+ _param = self._campaign_query_get_serialize(
643
+ request=request,
644
+ _request_auth=_request_auth,
645
+ _content_type=_content_type,
646
+ _headers=_headers,
647
+ _host_index=_host_index
648
+ )
649
+
650
+ _response_types_map: Dict[str, Optional[str]] = {
651
+ '200': "CampaignQueryModelPagedResult",
652
+ }
653
+ response_data = self.api_client.call_api(
654
+ *_param,
655
+ _request_timeout=_request_timeout
656
+ )
657
+ response_data.read()
658
+ return self.api_client.response_deserialize(
659
+ response_data=response_data,
660
+ response_types_map=_response_types_map,
661
+ )
662
+
663
+
664
+ @validate_call
665
+ def campaign_query_get_without_preload_content(
666
+ self,
667
+ request: Annotated[Optional[QueryCampaignsModel], Field(description="The parameters for filtering, paging, and sorting")] = None,
668
+ _request_timeout: Union[
669
+ None,
670
+ Annotated[StrictFloat, Field(gt=0)],
671
+ Tuple[
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Annotated[StrictFloat, Field(gt=0)]
674
+ ]
675
+ ] = None,
676
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
677
+ _content_type: Optional[StrictStr] = None,
678
+ _headers: Optional[Dict[StrictStr, Any]] = None,
679
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
680
+ ) -> RESTResponseType:
681
+ """Queries orders based on a filter, page, and sort criteria.
682
+
683
+
684
+ :param request: The parameters for filtering, paging, and sorting
685
+ :type request: QueryCampaignsModel
686
+ :param _request_timeout: timeout setting for this request. If one
687
+ number provided, it will be total request
688
+ timeout. It can also be a pair (tuple) of
689
+ (connection, read) timeouts.
690
+ :type _request_timeout: int, tuple(int, int), optional
691
+ :param _request_auth: set to override the auth_settings for an a single
692
+ request; this effectively ignores the
693
+ authentication in the spec for a single request.
694
+ :type _request_auth: dict, optional
695
+ :param _content_type: force content-type for the request.
696
+ :type _content_type: str, Optional
697
+ :param _headers: set to override the headers for a single
698
+ request; this effectively ignores the headers
699
+ in the spec for a single request.
700
+ :type _headers: dict, optional
701
+ :param _host_index: set to override the host_index for a single
702
+ request; this effectively ignores the host_index
703
+ in the spec for a single request.
704
+ :type _host_index: int, optional
705
+ :return: Returns the result object.
706
+ """ # noqa: E501
707
+
708
+ _param = self._campaign_query_get_serialize(
709
+ request=request,
710
+ _request_auth=_request_auth,
711
+ _content_type=_content_type,
712
+ _headers=_headers,
713
+ _host_index=_host_index
714
+ )
715
+
716
+ _response_types_map: Dict[str, Optional[str]] = {
717
+ '200': "CampaignQueryModelPagedResult",
718
+ }
719
+ response_data = self.api_client.call_api(
720
+ *_param,
721
+ _request_timeout=_request_timeout
722
+ )
723
+ return response_data.response
724
+
725
+
726
+ def _campaign_query_get_serialize(
727
+ self,
728
+ request,
729
+ _request_auth,
730
+ _content_type,
731
+ _headers,
732
+ _host_index,
733
+ ) -> RequestSerialized:
734
+
735
+ _host = None
736
+
737
+ _collection_formats: Dict[str, str] = {
738
+ }
739
+
740
+ _path_params: Dict[str, str] = {}
741
+ _query_params: List[Tuple[str, str]] = []
742
+ _header_params: Dict[str, Optional[str]] = _headers or {}
743
+ _form_params: List[Tuple[str, str]] = []
744
+ _files: Dict[
745
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
746
+ ] = {}
747
+ _body_params: Optional[bytes] = None
748
+
749
+ # process the path parameters
750
+ # process the query parameters
751
+ if request is not None:
752
+
753
+ _query_params.append(('request', request))
754
+
755
+ # process the header parameters
756
+ # process the form parameters
757
+ # process the body parameter
758
+
759
+
760
+ # set the HTTP header `Accept`
761
+ if 'Accept' not in _header_params:
762
+ _header_params['Accept'] = self.api_client.select_header_accept(
763
+ [
764
+ 'text/plain',
765
+ 'application/json',
766
+ 'text/json'
767
+ ]
768
+ )
769
+
770
+
771
+ # authentication setting
772
+ _auth_settings: List[str] = [
773
+ 'bearer'
774
+ ]
775
+
776
+ return self.api_client.param_serialize(
777
+ method='GET',
778
+ resource_path='/Campaign/Query',
779
+ path_params=_path_params,
780
+ query_params=_query_params,
781
+ header_params=_header_params,
782
+ body=_body_params,
783
+ post_params=_form_params,
784
+ files=_files,
785
+ auth_settings=_auth_settings,
786
+ collection_formats=_collection_formats,
787
+ _host=_host,
788
+ _request_auth=_request_auth
789
+ )
790
+
791
+
792
+
793
+
794
+ @validate_call
795
+ def campaign_resume_post(
796
+ self,
797
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
798
+ _request_timeout: Union[
799
+ None,
800
+ Annotated[StrictFloat, Field(gt=0)],
801
+ Tuple[
802
+ Annotated[StrictFloat, Field(gt=0)],
803
+ Annotated[StrictFloat, Field(gt=0)]
804
+ ]
805
+ ] = None,
806
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
807
+ _content_type: Optional[StrictStr] = None,
808
+ _headers: Optional[Dict[StrictStr, Any]] = None,
809
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
810
+ ) -> None:
811
+ """Resumes a campaign.
812
+
813
+
814
+ :param campaign_id: id of the campaign that should be paused
815
+ :type campaign_id: str
816
+ :param _request_timeout: timeout setting for this request. If one
817
+ number provided, it will be total request
818
+ timeout. It can also be a pair (tuple) of
819
+ (connection, read) timeouts.
820
+ :type _request_timeout: int, tuple(int, int), optional
821
+ :param _request_auth: set to override the auth_settings for an a single
822
+ request; this effectively ignores the
823
+ authentication in the spec for a single request.
824
+ :type _request_auth: dict, optional
825
+ :param _content_type: force content-type for the request.
826
+ :type _content_type: str, Optional
827
+ :param _headers: set to override the headers for a single
828
+ request; this effectively ignores the headers
829
+ in the spec for a single request.
830
+ :type _headers: dict, optional
831
+ :param _host_index: set to override the host_index for a single
832
+ request; this effectively ignores the host_index
833
+ in the spec for a single request.
834
+ :type _host_index: int, optional
835
+ :return: Returns the result object.
836
+ """ # noqa: E501
837
+
838
+ _param = self._campaign_resume_post_serialize(
839
+ campaign_id=campaign_id,
840
+ _request_auth=_request_auth,
841
+ _content_type=_content_type,
842
+ _headers=_headers,
843
+ _host_index=_host_index
844
+ )
845
+
846
+ _response_types_map: Dict[str, Optional[str]] = {
847
+ '200': None,
848
+ }
849
+ response_data = self.api_client.call_api(
850
+ *_param,
851
+ _request_timeout=_request_timeout
852
+ )
853
+ response_data.read()
854
+ return self.api_client.response_deserialize(
855
+ response_data=response_data,
856
+ response_types_map=_response_types_map,
857
+ ).data
858
+
859
+
860
+ @validate_call
861
+ def campaign_resume_post_with_http_info(
862
+ self,
863
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
864
+ _request_timeout: Union[
865
+ None,
866
+ Annotated[StrictFloat, Field(gt=0)],
867
+ Tuple[
868
+ Annotated[StrictFloat, Field(gt=0)],
869
+ Annotated[StrictFloat, Field(gt=0)]
870
+ ]
871
+ ] = None,
872
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
873
+ _content_type: Optional[StrictStr] = None,
874
+ _headers: Optional[Dict[StrictStr, Any]] = None,
875
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
876
+ ) -> ApiResponse[None]:
877
+ """Resumes a campaign.
878
+
879
+
880
+ :param campaign_id: id of the campaign that should be paused
881
+ :type campaign_id: str
882
+ :param _request_timeout: timeout setting for this request. If one
883
+ number provided, it will be total request
884
+ timeout. It can also be a pair (tuple) of
885
+ (connection, read) timeouts.
886
+ :type _request_timeout: int, tuple(int, int), optional
887
+ :param _request_auth: set to override the auth_settings for an a single
888
+ request; this effectively ignores the
889
+ authentication in the spec for a single request.
890
+ :type _request_auth: dict, optional
891
+ :param _content_type: force content-type for the request.
892
+ :type _content_type: str, Optional
893
+ :param _headers: set to override the headers for a single
894
+ request; this effectively ignores the headers
895
+ in the spec for a single request.
896
+ :type _headers: dict, optional
897
+ :param _host_index: set to override the host_index for a single
898
+ request; this effectively ignores the host_index
899
+ in the spec for a single request.
900
+ :type _host_index: int, optional
901
+ :return: Returns the result object.
902
+ """ # noqa: E501
903
+
904
+ _param = self._campaign_resume_post_serialize(
905
+ campaign_id=campaign_id,
906
+ _request_auth=_request_auth,
907
+ _content_type=_content_type,
908
+ _headers=_headers,
909
+ _host_index=_host_index
910
+ )
911
+
912
+ _response_types_map: Dict[str, Optional[str]] = {
913
+ '200': None,
914
+ }
915
+ response_data = self.api_client.call_api(
916
+ *_param,
917
+ _request_timeout=_request_timeout
918
+ )
919
+ response_data.read()
920
+ return self.api_client.response_deserialize(
921
+ response_data=response_data,
922
+ response_types_map=_response_types_map,
923
+ )
924
+
925
+
926
+ @validate_call
927
+ def campaign_resume_post_without_preload_content(
928
+ self,
929
+ campaign_id: Annotated[Optional[StrictStr], Field(description="id of the campaign that should be paused")] = None,
930
+ _request_timeout: Union[
931
+ None,
932
+ Annotated[StrictFloat, Field(gt=0)],
933
+ Tuple[
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Annotated[StrictFloat, Field(gt=0)]
936
+ ]
937
+ ] = None,
938
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
939
+ _content_type: Optional[StrictStr] = None,
940
+ _headers: Optional[Dict[StrictStr, Any]] = None,
941
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
942
+ ) -> RESTResponseType:
943
+ """Resumes a campaign.
944
+
945
+
946
+ :param campaign_id: id of the campaign that should be paused
947
+ :type campaign_id: str
948
+ :param _request_timeout: timeout setting for this request. If one
949
+ number provided, it will be total request
950
+ timeout. It can also be a pair (tuple) of
951
+ (connection, read) timeouts.
952
+ :type _request_timeout: int, tuple(int, int), optional
953
+ :param _request_auth: set to override the auth_settings for an a single
954
+ request; this effectively ignores the
955
+ authentication in the spec for a single request.
956
+ :type _request_auth: dict, optional
957
+ :param _content_type: force content-type for the request.
958
+ :type _content_type: str, Optional
959
+ :param _headers: set to override the headers for a single
960
+ request; this effectively ignores the headers
961
+ in the spec for a single request.
962
+ :type _headers: dict, optional
963
+ :param _host_index: set to override the host_index for a single
964
+ request; this effectively ignores the host_index
965
+ in the spec for a single request.
966
+ :type _host_index: int, optional
967
+ :return: Returns the result object.
968
+ """ # noqa: E501
969
+
970
+ _param = self._campaign_resume_post_serialize(
971
+ campaign_id=campaign_id,
972
+ _request_auth=_request_auth,
973
+ _content_type=_content_type,
974
+ _headers=_headers,
975
+ _host_index=_host_index
976
+ )
977
+
978
+ _response_types_map: Dict[str, Optional[str]] = {
979
+ '200': None,
980
+ }
981
+ response_data = self.api_client.call_api(
982
+ *_param,
983
+ _request_timeout=_request_timeout
984
+ )
985
+ return response_data.response
986
+
987
+
988
+ def _campaign_resume_post_serialize(
989
+ self,
990
+ campaign_id,
991
+ _request_auth,
992
+ _content_type,
993
+ _headers,
994
+ _host_index,
995
+ ) -> RequestSerialized:
996
+
997
+ _host = None
998
+
999
+ _collection_formats: Dict[str, str] = {
1000
+ }
1001
+
1002
+ _path_params: Dict[str, str] = {}
1003
+ _query_params: List[Tuple[str, str]] = []
1004
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1005
+ _form_params: List[Tuple[str, str]] = []
1006
+ _files: Dict[
1007
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1008
+ ] = {}
1009
+ _body_params: Optional[bytes] = None
1010
+
1011
+ # process the path parameters
1012
+ # process the query parameters
1013
+ if campaign_id is not None:
1014
+
1015
+ _query_params.append(('campaignId', campaign_id))
1016
+
1017
+ # process the header parameters
1018
+ # process the form parameters
1019
+ # process the body parameter
1020
+
1021
+
1022
+
1023
+
1024
+ # authentication setting
1025
+ _auth_settings: List[str] = [
1026
+ 'bearer'
1027
+ ]
1028
+
1029
+ return self.api_client.param_serialize(
1030
+ method='POST',
1031
+ resource_path='/Campaign/Resume',
1032
+ path_params=_path_params,
1033
+ query_params=_query_params,
1034
+ header_params=_header_params,
1035
+ body=_body_params,
1036
+ post_params=_form_params,
1037
+ files=_files,
1038
+ auth_settings=_auth_settings,
1039
+ collection_formats=_collection_formats,
1040
+ _host=_host,
1041
+ _request_auth=_request_auth
1042
+ )
1043
+
1044
+