elastly 0.1.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.
- elastly/__init__.py +117 -0
- elastly/api/__init__.py +7 -0
- elastly/api/ingest_api.py +1167 -0
- elastly/api/prices_api.py +349 -0
- elastly/api/writebacks_api.py +618 -0
- elastly/api_client.py +805 -0
- elastly/api_response.py +21 -0
- elastly/configuration.py +606 -0
- elastly/exceptions.py +219 -0
- elastly/models/__init__.py +49 -0
- elastly/models/ack_writebacks_response.py +94 -0
- elastly/models/api_error.py +93 -0
- elastly/models/api_error_error.py +102 -0
- elastly/models/batch_created_response.py +91 -0
- elastly/models/batch_status_response.py +110 -0
- elastly/models/claim_writebacks_request.py +90 -0
- elastly/models/claim_writebacks_response.py +97 -0
- elastly/models/claim_writebacks_response_tasks_inner.py +122 -0
- elastly/models/commit_batch_response.py +89 -0
- elastly/models/prices_request.py +98 -0
- elastly/models/prices_request_lines_inner.py +114 -0
- elastly/models/prices_response.py +97 -0
- elastly/models/prices_response_lines_inner.py +138 -0
- elastly/models/prices_response_lines_inner_one_of.py +131 -0
- elastly/models/prices_response_lines_inner_one_of1.py +105 -0
- elastly/models/prices_response_lines_inner_one_of_explanation.py +121 -0
- elastly/models/prices_response_lines_inner_one_of_explanation_drivers_inner.py +102 -0
- elastly/models/prices_response_lines_inner_one_of_reason_inner.py +95 -0
- elastly/models/stage_records_request.py +166 -0
- elastly/models/stage_records_request_one_of.py +107 -0
- elastly/models/stage_records_request_one_of1.py +107 -0
- elastly/models/stage_records_request_one_of1_records_inner.py +126 -0
- elastly/models/stage_records_request_one_of2.py +107 -0
- elastly/models/stage_records_request_one_of2_records_inner.py +160 -0
- elastly/models/stage_records_request_one_of2_records_inner_lines_inner.py +119 -0
- elastly/models/stage_records_request_one_of3.py +107 -0
- elastly/models/stage_records_request_one_of3_records_inner.py +131 -0
- elastly/models/stage_records_request_one_of3_records_inner_lines_inner.py +98 -0
- elastly/models/stage_records_request_one_of_records_inner.py +118 -0
- elastly/models/stage_records_response.py +90 -0
- elastly/models/writeback_ack_request.py +98 -0
- elastly/models/writeback_ack_request_results_inner.py +93 -0
- elastly/py.typed +0 -0
- elastly/rest.py +264 -0
- elastly-0.1.0.dist-info/METADATA +100 -0
- elastly-0.1.0.dist-info/RECORD +49 -0
- elastly-0.1.0.dist-info/WHEEL +5 -0
- elastly-0.1.0.dist-info/licenses/LICENSE +21 -0
- elastly-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1167 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Elastly API
|
|
3
|
+
|
|
4
|
+
Elastly public API v1: price serving, canonical ingest, write-back claims and webhooks. Authenticate every request with an API key: Authorization: Bearer elastly_live_...
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@elastly.io
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
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 uuid import UUID
|
|
20
|
+
from elastly.models.batch_created_response import BatchCreatedResponse
|
|
21
|
+
from elastly.models.batch_status_response import BatchStatusResponse
|
|
22
|
+
from elastly.models.commit_batch_response import CommitBatchResponse
|
|
23
|
+
from elastly.models.stage_records_request import StageRecordsRequest
|
|
24
|
+
from elastly.models.stage_records_response import StageRecordsResponse
|
|
25
|
+
|
|
26
|
+
from elastly.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from elastly.api_response import ApiResponse
|
|
28
|
+
from elastly.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class IngestApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def commit_ingest_batch(
|
|
46
|
+
self,
|
|
47
|
+
batch_id: UUID,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> CommitBatchResponse:
|
|
61
|
+
"""Commit a batch; the sync engine drains it
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param batch_id: (required)
|
|
65
|
+
:type batch_id: UUID
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._commit_ingest_batch_serialize(
|
|
89
|
+
batch_id=batch_id,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'202': "CommitBatchResponse",
|
|
98
|
+
'401': "ApiError",
|
|
99
|
+
'402': "ApiError",
|
|
100
|
+
'403': "ApiError",
|
|
101
|
+
'404': "ApiError",
|
|
102
|
+
'409': "ApiError",
|
|
103
|
+
'429': "ApiError",
|
|
104
|
+
'500': "ApiError",
|
|
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 commit_ingest_batch_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
batch_id: UUID,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[CommitBatchResponse]:
|
|
134
|
+
"""Commit a batch; the sync engine drains it
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param batch_id: (required)
|
|
138
|
+
:type batch_id: UUID
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._commit_ingest_batch_serialize(
|
|
162
|
+
batch_id=batch_id,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'202': "CommitBatchResponse",
|
|
171
|
+
'401': "ApiError",
|
|
172
|
+
'402': "ApiError",
|
|
173
|
+
'403': "ApiError",
|
|
174
|
+
'404': "ApiError",
|
|
175
|
+
'409': "ApiError",
|
|
176
|
+
'429': "ApiError",
|
|
177
|
+
'500': "ApiError",
|
|
178
|
+
}
|
|
179
|
+
response_data = self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
def commit_ingest_batch_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
batch_id: UUID,
|
|
194
|
+
_request_timeout: Union[
|
|
195
|
+
None,
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Tuple[
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
200
|
+
]
|
|
201
|
+
] = None,
|
|
202
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_content_type: Optional[StrictStr] = None,
|
|
204
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
206
|
+
) -> RESTResponseType:
|
|
207
|
+
"""Commit a batch; the sync engine drains it
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
:param batch_id: (required)
|
|
211
|
+
:type batch_id: UUID
|
|
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._commit_ingest_batch_serialize(
|
|
235
|
+
batch_id=batch_id,
|
|
236
|
+
_request_auth=_request_auth,
|
|
237
|
+
_content_type=_content_type,
|
|
238
|
+
_headers=_headers,
|
|
239
|
+
_host_index=_host_index
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
243
|
+
'202': "CommitBatchResponse",
|
|
244
|
+
'401': "ApiError",
|
|
245
|
+
'402': "ApiError",
|
|
246
|
+
'403': "ApiError",
|
|
247
|
+
'404': "ApiError",
|
|
248
|
+
'409': "ApiError",
|
|
249
|
+
'429': "ApiError",
|
|
250
|
+
'500': "ApiError",
|
|
251
|
+
}
|
|
252
|
+
response_data = self.api_client.call_api(
|
|
253
|
+
*_param,
|
|
254
|
+
_request_timeout=_request_timeout
|
|
255
|
+
)
|
|
256
|
+
return response_data.response
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _commit_ingest_batch_serialize(
|
|
260
|
+
self,
|
|
261
|
+
batch_id,
|
|
262
|
+
_request_auth,
|
|
263
|
+
_content_type,
|
|
264
|
+
_headers,
|
|
265
|
+
_host_index,
|
|
266
|
+
) -> RequestSerialized:
|
|
267
|
+
|
|
268
|
+
_host = None
|
|
269
|
+
|
|
270
|
+
_collection_formats: Dict[str, str] = {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[
|
|
278
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
279
|
+
] = {}
|
|
280
|
+
_body_params: Optional[bytes] = None
|
|
281
|
+
|
|
282
|
+
# process the path parameters
|
|
283
|
+
if batch_id is not None:
|
|
284
|
+
_path_params['batchId'] = batch_id
|
|
285
|
+
# process the query parameters
|
|
286
|
+
# process the header parameters
|
|
287
|
+
# process the form parameters
|
|
288
|
+
# process the body parameter
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
# set the HTTP header `Accept`
|
|
292
|
+
if 'Accept' not in _header_params:
|
|
293
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
294
|
+
[
|
|
295
|
+
'application/json'
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# authentication setting
|
|
301
|
+
_auth_settings: List[str] = [
|
|
302
|
+
'apiKey'
|
|
303
|
+
]
|
|
304
|
+
|
|
305
|
+
return self.api_client.param_serialize(
|
|
306
|
+
method='POST',
|
|
307
|
+
resource_path='/api/v1/ingest/batches/{batchId}/commit',
|
|
308
|
+
path_params=_path_params,
|
|
309
|
+
query_params=_query_params,
|
|
310
|
+
header_params=_header_params,
|
|
311
|
+
body=_body_params,
|
|
312
|
+
post_params=_form_params,
|
|
313
|
+
files=_files,
|
|
314
|
+
auth_settings=_auth_settings,
|
|
315
|
+
collection_formats=_collection_formats,
|
|
316
|
+
_host=_host,
|
|
317
|
+
_request_auth=_request_auth
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
@validate_call
|
|
324
|
+
def create_ingest_batch(
|
|
325
|
+
self,
|
|
326
|
+
_request_timeout: Union[
|
|
327
|
+
None,
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
329
|
+
Tuple[
|
|
330
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
331
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
332
|
+
]
|
|
333
|
+
] = None,
|
|
334
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
335
|
+
_content_type: Optional[StrictStr] = None,
|
|
336
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
337
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
338
|
+
) -> BatchCreatedResponse:
|
|
339
|
+
"""Open a staged ingest batch
|
|
340
|
+
|
|
341
|
+
Requires a connector-scope key and a connected push connector.
|
|
342
|
+
|
|
343
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
344
|
+
number provided, it will be total request
|
|
345
|
+
timeout. It can also be a pair (tuple) of
|
|
346
|
+
(connection, read) timeouts.
|
|
347
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
348
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
349
|
+
request; this effectively ignores the
|
|
350
|
+
authentication in the spec for a single request.
|
|
351
|
+
:type _request_auth: dict, optional
|
|
352
|
+
:param _content_type: force content-type for the request.
|
|
353
|
+
:type _content_type: str, Optional
|
|
354
|
+
:param _headers: set to override the headers for a single
|
|
355
|
+
request; this effectively ignores the headers
|
|
356
|
+
in the spec for a single request.
|
|
357
|
+
:type _headers: dict, optional
|
|
358
|
+
:param _host_index: set to override the host_index for a single
|
|
359
|
+
request; this effectively ignores the host_index
|
|
360
|
+
in the spec for a single request.
|
|
361
|
+
:type _host_index: int, optional
|
|
362
|
+
:return: Returns the result object.
|
|
363
|
+
""" # noqa: E501
|
|
364
|
+
|
|
365
|
+
_param = self._create_ingest_batch_serialize(
|
|
366
|
+
_request_auth=_request_auth,
|
|
367
|
+
_content_type=_content_type,
|
|
368
|
+
_headers=_headers,
|
|
369
|
+
_host_index=_host_index
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
373
|
+
'201': "BatchCreatedResponse",
|
|
374
|
+
'401': "ApiError",
|
|
375
|
+
'402': "ApiError",
|
|
376
|
+
'403': "ApiError",
|
|
377
|
+
'429': "ApiError",
|
|
378
|
+
'500': "ApiError",
|
|
379
|
+
}
|
|
380
|
+
response_data = self.api_client.call_api(
|
|
381
|
+
*_param,
|
|
382
|
+
_request_timeout=_request_timeout
|
|
383
|
+
)
|
|
384
|
+
response_data.read()
|
|
385
|
+
return self.api_client.response_deserialize(
|
|
386
|
+
response_data=response_data,
|
|
387
|
+
response_types_map=_response_types_map,
|
|
388
|
+
).data
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
@validate_call
|
|
392
|
+
def create_ingest_batch_with_http_info(
|
|
393
|
+
self,
|
|
394
|
+
_request_timeout: Union[
|
|
395
|
+
None,
|
|
396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
397
|
+
Tuple[
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
400
|
+
]
|
|
401
|
+
] = None,
|
|
402
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
403
|
+
_content_type: Optional[StrictStr] = None,
|
|
404
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
406
|
+
) -> ApiResponse[BatchCreatedResponse]:
|
|
407
|
+
"""Open a staged ingest batch
|
|
408
|
+
|
|
409
|
+
Requires a connector-scope key and a connected push connector.
|
|
410
|
+
|
|
411
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
412
|
+
number provided, it will be total request
|
|
413
|
+
timeout. It can also be a pair (tuple) of
|
|
414
|
+
(connection, read) timeouts.
|
|
415
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
416
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
417
|
+
request; this effectively ignores the
|
|
418
|
+
authentication in the spec for a single request.
|
|
419
|
+
:type _request_auth: dict, optional
|
|
420
|
+
:param _content_type: force content-type for the request.
|
|
421
|
+
:type _content_type: str, Optional
|
|
422
|
+
:param _headers: set to override the headers for a single
|
|
423
|
+
request; this effectively ignores the headers
|
|
424
|
+
in the spec for a single request.
|
|
425
|
+
:type _headers: dict, optional
|
|
426
|
+
:param _host_index: set to override the host_index for a single
|
|
427
|
+
request; this effectively ignores the host_index
|
|
428
|
+
in the spec for a single request.
|
|
429
|
+
:type _host_index: int, optional
|
|
430
|
+
:return: Returns the result object.
|
|
431
|
+
""" # noqa: E501
|
|
432
|
+
|
|
433
|
+
_param = self._create_ingest_batch_serialize(
|
|
434
|
+
_request_auth=_request_auth,
|
|
435
|
+
_content_type=_content_type,
|
|
436
|
+
_headers=_headers,
|
|
437
|
+
_host_index=_host_index
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
441
|
+
'201': "BatchCreatedResponse",
|
|
442
|
+
'401': "ApiError",
|
|
443
|
+
'402': "ApiError",
|
|
444
|
+
'403': "ApiError",
|
|
445
|
+
'429': "ApiError",
|
|
446
|
+
'500': "ApiError",
|
|
447
|
+
}
|
|
448
|
+
response_data = self.api_client.call_api(
|
|
449
|
+
*_param,
|
|
450
|
+
_request_timeout=_request_timeout
|
|
451
|
+
)
|
|
452
|
+
response_data.read()
|
|
453
|
+
return self.api_client.response_deserialize(
|
|
454
|
+
response_data=response_data,
|
|
455
|
+
response_types_map=_response_types_map,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
@validate_call
|
|
460
|
+
def create_ingest_batch_without_preload_content(
|
|
461
|
+
self,
|
|
462
|
+
_request_timeout: Union[
|
|
463
|
+
None,
|
|
464
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
465
|
+
Tuple[
|
|
466
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
467
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
468
|
+
]
|
|
469
|
+
] = None,
|
|
470
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
471
|
+
_content_type: Optional[StrictStr] = None,
|
|
472
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
473
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
474
|
+
) -> RESTResponseType:
|
|
475
|
+
"""Open a staged ingest batch
|
|
476
|
+
|
|
477
|
+
Requires a connector-scope key and a connected push connector.
|
|
478
|
+
|
|
479
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
480
|
+
number provided, it will be total request
|
|
481
|
+
timeout. It can also be a pair (tuple) of
|
|
482
|
+
(connection, read) timeouts.
|
|
483
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
484
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
485
|
+
request; this effectively ignores the
|
|
486
|
+
authentication in the spec for a single request.
|
|
487
|
+
:type _request_auth: dict, optional
|
|
488
|
+
:param _content_type: force content-type for the request.
|
|
489
|
+
:type _content_type: str, Optional
|
|
490
|
+
:param _headers: set to override the headers for a single
|
|
491
|
+
request; this effectively ignores the headers
|
|
492
|
+
in the spec for a single request.
|
|
493
|
+
:type _headers: dict, optional
|
|
494
|
+
:param _host_index: set to override the host_index for a single
|
|
495
|
+
request; this effectively ignores the host_index
|
|
496
|
+
in the spec for a single request.
|
|
497
|
+
:type _host_index: int, optional
|
|
498
|
+
:return: Returns the result object.
|
|
499
|
+
""" # noqa: E501
|
|
500
|
+
|
|
501
|
+
_param = self._create_ingest_batch_serialize(
|
|
502
|
+
_request_auth=_request_auth,
|
|
503
|
+
_content_type=_content_type,
|
|
504
|
+
_headers=_headers,
|
|
505
|
+
_host_index=_host_index
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
509
|
+
'201': "BatchCreatedResponse",
|
|
510
|
+
'401': "ApiError",
|
|
511
|
+
'402': "ApiError",
|
|
512
|
+
'403': "ApiError",
|
|
513
|
+
'429': "ApiError",
|
|
514
|
+
'500': "ApiError",
|
|
515
|
+
}
|
|
516
|
+
response_data = self.api_client.call_api(
|
|
517
|
+
*_param,
|
|
518
|
+
_request_timeout=_request_timeout
|
|
519
|
+
)
|
|
520
|
+
return response_data.response
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
def _create_ingest_batch_serialize(
|
|
524
|
+
self,
|
|
525
|
+
_request_auth,
|
|
526
|
+
_content_type,
|
|
527
|
+
_headers,
|
|
528
|
+
_host_index,
|
|
529
|
+
) -> RequestSerialized:
|
|
530
|
+
|
|
531
|
+
_host = None
|
|
532
|
+
|
|
533
|
+
_collection_formats: Dict[str, str] = {
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
_path_params: Dict[str, str] = {}
|
|
537
|
+
_query_params: List[Tuple[str, str]] = []
|
|
538
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
539
|
+
_form_params: List[Tuple[str, str]] = []
|
|
540
|
+
_files: Dict[
|
|
541
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
542
|
+
] = {}
|
|
543
|
+
_body_params: Optional[bytes] = None
|
|
544
|
+
|
|
545
|
+
# process the path parameters
|
|
546
|
+
# process the query parameters
|
|
547
|
+
# process the header parameters
|
|
548
|
+
# process the form parameters
|
|
549
|
+
# process the body parameter
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
# set the HTTP header `Accept`
|
|
553
|
+
if 'Accept' not in _header_params:
|
|
554
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
555
|
+
[
|
|
556
|
+
'application/json'
|
|
557
|
+
]
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
# authentication setting
|
|
562
|
+
_auth_settings: List[str] = [
|
|
563
|
+
'apiKey'
|
|
564
|
+
]
|
|
565
|
+
|
|
566
|
+
return self.api_client.param_serialize(
|
|
567
|
+
method='POST',
|
|
568
|
+
resource_path='/api/v1/ingest/batches',
|
|
569
|
+
path_params=_path_params,
|
|
570
|
+
query_params=_query_params,
|
|
571
|
+
header_params=_header_params,
|
|
572
|
+
body=_body_params,
|
|
573
|
+
post_params=_form_params,
|
|
574
|
+
files=_files,
|
|
575
|
+
auth_settings=_auth_settings,
|
|
576
|
+
collection_formats=_collection_formats,
|
|
577
|
+
_host=_host,
|
|
578
|
+
_request_auth=_request_auth
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
@validate_call
|
|
585
|
+
def get_ingest_batch_status(
|
|
586
|
+
self,
|
|
587
|
+
batch_id: UUID,
|
|
588
|
+
_request_timeout: Union[
|
|
589
|
+
None,
|
|
590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
591
|
+
Tuple[
|
|
592
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
593
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
594
|
+
]
|
|
595
|
+
] = None,
|
|
596
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
597
|
+
_content_type: Optional[StrictStr] = None,
|
|
598
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
599
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
600
|
+
) -> BatchStatusResponse:
|
|
601
|
+
"""Batch status, including skippedOverCap
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
:param batch_id: (required)
|
|
605
|
+
:type batch_id: UUID
|
|
606
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
607
|
+
number provided, it will be total request
|
|
608
|
+
timeout. It can also be a pair (tuple) of
|
|
609
|
+
(connection, read) timeouts.
|
|
610
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
611
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
612
|
+
request; this effectively ignores the
|
|
613
|
+
authentication in the spec for a single request.
|
|
614
|
+
:type _request_auth: dict, optional
|
|
615
|
+
:param _content_type: force content-type for the request.
|
|
616
|
+
:type _content_type: str, Optional
|
|
617
|
+
:param _headers: set to override the headers for a single
|
|
618
|
+
request; this effectively ignores the headers
|
|
619
|
+
in the spec for a single request.
|
|
620
|
+
:type _headers: dict, optional
|
|
621
|
+
:param _host_index: set to override the host_index for a single
|
|
622
|
+
request; this effectively ignores the host_index
|
|
623
|
+
in the spec for a single request.
|
|
624
|
+
:type _host_index: int, optional
|
|
625
|
+
:return: Returns the result object.
|
|
626
|
+
""" # noqa: E501
|
|
627
|
+
|
|
628
|
+
_param = self._get_ingest_batch_status_serialize(
|
|
629
|
+
batch_id=batch_id,
|
|
630
|
+
_request_auth=_request_auth,
|
|
631
|
+
_content_type=_content_type,
|
|
632
|
+
_headers=_headers,
|
|
633
|
+
_host_index=_host_index
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
637
|
+
'200': "BatchStatusResponse",
|
|
638
|
+
'401': "ApiError",
|
|
639
|
+
'402': "ApiError",
|
|
640
|
+
'403': "ApiError",
|
|
641
|
+
'404': "ApiError",
|
|
642
|
+
'429': "ApiError",
|
|
643
|
+
'500': "ApiError",
|
|
644
|
+
}
|
|
645
|
+
response_data = self.api_client.call_api(
|
|
646
|
+
*_param,
|
|
647
|
+
_request_timeout=_request_timeout
|
|
648
|
+
)
|
|
649
|
+
response_data.read()
|
|
650
|
+
return self.api_client.response_deserialize(
|
|
651
|
+
response_data=response_data,
|
|
652
|
+
response_types_map=_response_types_map,
|
|
653
|
+
).data
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
@validate_call
|
|
657
|
+
def get_ingest_batch_status_with_http_info(
|
|
658
|
+
self,
|
|
659
|
+
batch_id: UUID,
|
|
660
|
+
_request_timeout: Union[
|
|
661
|
+
None,
|
|
662
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
663
|
+
Tuple[
|
|
664
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
666
|
+
]
|
|
667
|
+
] = None,
|
|
668
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
669
|
+
_content_type: Optional[StrictStr] = None,
|
|
670
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
671
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
672
|
+
) -> ApiResponse[BatchStatusResponse]:
|
|
673
|
+
"""Batch status, including skippedOverCap
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
:param batch_id: (required)
|
|
677
|
+
:type batch_id: UUID
|
|
678
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
679
|
+
number provided, it will be total request
|
|
680
|
+
timeout. It can also be a pair (tuple) of
|
|
681
|
+
(connection, read) timeouts.
|
|
682
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
683
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
684
|
+
request; this effectively ignores the
|
|
685
|
+
authentication in the spec for a single request.
|
|
686
|
+
:type _request_auth: dict, optional
|
|
687
|
+
:param _content_type: force content-type for the request.
|
|
688
|
+
:type _content_type: str, Optional
|
|
689
|
+
:param _headers: set to override the headers for a single
|
|
690
|
+
request; this effectively ignores the headers
|
|
691
|
+
in the spec for a single request.
|
|
692
|
+
:type _headers: dict, optional
|
|
693
|
+
:param _host_index: set to override the host_index for a single
|
|
694
|
+
request; this effectively ignores the host_index
|
|
695
|
+
in the spec for a single request.
|
|
696
|
+
:type _host_index: int, optional
|
|
697
|
+
:return: Returns the result object.
|
|
698
|
+
""" # noqa: E501
|
|
699
|
+
|
|
700
|
+
_param = self._get_ingest_batch_status_serialize(
|
|
701
|
+
batch_id=batch_id,
|
|
702
|
+
_request_auth=_request_auth,
|
|
703
|
+
_content_type=_content_type,
|
|
704
|
+
_headers=_headers,
|
|
705
|
+
_host_index=_host_index
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
709
|
+
'200': "BatchStatusResponse",
|
|
710
|
+
'401': "ApiError",
|
|
711
|
+
'402': "ApiError",
|
|
712
|
+
'403': "ApiError",
|
|
713
|
+
'404': "ApiError",
|
|
714
|
+
'429': "ApiError",
|
|
715
|
+
'500': "ApiError",
|
|
716
|
+
}
|
|
717
|
+
response_data = self.api_client.call_api(
|
|
718
|
+
*_param,
|
|
719
|
+
_request_timeout=_request_timeout
|
|
720
|
+
)
|
|
721
|
+
response_data.read()
|
|
722
|
+
return self.api_client.response_deserialize(
|
|
723
|
+
response_data=response_data,
|
|
724
|
+
response_types_map=_response_types_map,
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
@validate_call
|
|
729
|
+
def get_ingest_batch_status_without_preload_content(
|
|
730
|
+
self,
|
|
731
|
+
batch_id: UUID,
|
|
732
|
+
_request_timeout: Union[
|
|
733
|
+
None,
|
|
734
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
735
|
+
Tuple[
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
738
|
+
]
|
|
739
|
+
] = None,
|
|
740
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
741
|
+
_content_type: Optional[StrictStr] = None,
|
|
742
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
743
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
744
|
+
) -> RESTResponseType:
|
|
745
|
+
"""Batch status, including skippedOverCap
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
:param batch_id: (required)
|
|
749
|
+
:type batch_id: UUID
|
|
750
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
751
|
+
number provided, it will be total request
|
|
752
|
+
timeout. It can also be a pair (tuple) of
|
|
753
|
+
(connection, read) timeouts.
|
|
754
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
755
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
756
|
+
request; this effectively ignores the
|
|
757
|
+
authentication in the spec for a single request.
|
|
758
|
+
:type _request_auth: dict, optional
|
|
759
|
+
:param _content_type: force content-type for the request.
|
|
760
|
+
:type _content_type: str, Optional
|
|
761
|
+
:param _headers: set to override the headers for a single
|
|
762
|
+
request; this effectively ignores the headers
|
|
763
|
+
in the spec for a single request.
|
|
764
|
+
:type _headers: dict, optional
|
|
765
|
+
:param _host_index: set to override the host_index for a single
|
|
766
|
+
request; this effectively ignores the host_index
|
|
767
|
+
in the spec for a single request.
|
|
768
|
+
:type _host_index: int, optional
|
|
769
|
+
:return: Returns the result object.
|
|
770
|
+
""" # noqa: E501
|
|
771
|
+
|
|
772
|
+
_param = self._get_ingest_batch_status_serialize(
|
|
773
|
+
batch_id=batch_id,
|
|
774
|
+
_request_auth=_request_auth,
|
|
775
|
+
_content_type=_content_type,
|
|
776
|
+
_headers=_headers,
|
|
777
|
+
_host_index=_host_index
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
781
|
+
'200': "BatchStatusResponse",
|
|
782
|
+
'401': "ApiError",
|
|
783
|
+
'402': "ApiError",
|
|
784
|
+
'403': "ApiError",
|
|
785
|
+
'404': "ApiError",
|
|
786
|
+
'429': "ApiError",
|
|
787
|
+
'500': "ApiError",
|
|
788
|
+
}
|
|
789
|
+
response_data = self.api_client.call_api(
|
|
790
|
+
*_param,
|
|
791
|
+
_request_timeout=_request_timeout
|
|
792
|
+
)
|
|
793
|
+
return response_data.response
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
def _get_ingest_batch_status_serialize(
|
|
797
|
+
self,
|
|
798
|
+
batch_id,
|
|
799
|
+
_request_auth,
|
|
800
|
+
_content_type,
|
|
801
|
+
_headers,
|
|
802
|
+
_host_index,
|
|
803
|
+
) -> RequestSerialized:
|
|
804
|
+
|
|
805
|
+
_host = None
|
|
806
|
+
|
|
807
|
+
_collection_formats: Dict[str, str] = {
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
_path_params: Dict[str, str] = {}
|
|
811
|
+
_query_params: List[Tuple[str, str]] = []
|
|
812
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
813
|
+
_form_params: List[Tuple[str, str]] = []
|
|
814
|
+
_files: Dict[
|
|
815
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
816
|
+
] = {}
|
|
817
|
+
_body_params: Optional[bytes] = None
|
|
818
|
+
|
|
819
|
+
# process the path parameters
|
|
820
|
+
if batch_id is not None:
|
|
821
|
+
_path_params['batchId'] = batch_id
|
|
822
|
+
# process the query parameters
|
|
823
|
+
# process the header parameters
|
|
824
|
+
# process the form parameters
|
|
825
|
+
# process the body parameter
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
# set the HTTP header `Accept`
|
|
829
|
+
if 'Accept' not in _header_params:
|
|
830
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
831
|
+
[
|
|
832
|
+
'application/json'
|
|
833
|
+
]
|
|
834
|
+
)
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
# authentication setting
|
|
838
|
+
_auth_settings: List[str] = [
|
|
839
|
+
'apiKey'
|
|
840
|
+
]
|
|
841
|
+
|
|
842
|
+
return self.api_client.param_serialize(
|
|
843
|
+
method='GET',
|
|
844
|
+
resource_path='/api/v1/ingest/batches/{batchId}',
|
|
845
|
+
path_params=_path_params,
|
|
846
|
+
query_params=_query_params,
|
|
847
|
+
header_params=_header_params,
|
|
848
|
+
body=_body_params,
|
|
849
|
+
post_params=_form_params,
|
|
850
|
+
files=_files,
|
|
851
|
+
auth_settings=_auth_settings,
|
|
852
|
+
collection_formats=_collection_formats,
|
|
853
|
+
_host=_host,
|
|
854
|
+
_request_auth=_request_auth
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
@validate_call
|
|
861
|
+
def stage_ingest_records(
|
|
862
|
+
self,
|
|
863
|
+
batch_id: UUID,
|
|
864
|
+
stage_records_request: StageRecordsRequest,
|
|
865
|
+
_request_timeout: Union[
|
|
866
|
+
None,
|
|
867
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
868
|
+
Tuple[
|
|
869
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
870
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
871
|
+
]
|
|
872
|
+
] = None,
|
|
873
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
874
|
+
_content_type: Optional[StrictStr] = None,
|
|
875
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
876
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
877
|
+
) -> StageRecordsResponse:
|
|
878
|
+
"""Stage up to 1000 canonical records into an open batch
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
:param batch_id: (required)
|
|
882
|
+
:type batch_id: UUID
|
|
883
|
+
:param stage_records_request: (required)
|
|
884
|
+
:type stage_records_request: StageRecordsRequest
|
|
885
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
886
|
+
number provided, it will be total request
|
|
887
|
+
timeout. It can also be a pair (tuple) of
|
|
888
|
+
(connection, read) timeouts.
|
|
889
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
890
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
891
|
+
request; this effectively ignores the
|
|
892
|
+
authentication in the spec for a single request.
|
|
893
|
+
:type _request_auth: dict, optional
|
|
894
|
+
:param _content_type: force content-type for the request.
|
|
895
|
+
:type _content_type: str, Optional
|
|
896
|
+
:param _headers: set to override the headers for a single
|
|
897
|
+
request; this effectively ignores the headers
|
|
898
|
+
in the spec for a single request.
|
|
899
|
+
:type _headers: dict, optional
|
|
900
|
+
:param _host_index: set to override the host_index for a single
|
|
901
|
+
request; this effectively ignores the host_index
|
|
902
|
+
in the spec for a single request.
|
|
903
|
+
:type _host_index: int, optional
|
|
904
|
+
:return: Returns the result object.
|
|
905
|
+
""" # noqa: E501
|
|
906
|
+
|
|
907
|
+
_param = self._stage_ingest_records_serialize(
|
|
908
|
+
batch_id=batch_id,
|
|
909
|
+
stage_records_request=stage_records_request,
|
|
910
|
+
_request_auth=_request_auth,
|
|
911
|
+
_content_type=_content_type,
|
|
912
|
+
_headers=_headers,
|
|
913
|
+
_host_index=_host_index
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
917
|
+
'202': "StageRecordsResponse",
|
|
918
|
+
'401': "ApiError",
|
|
919
|
+
'402': "ApiError",
|
|
920
|
+
'403': "ApiError",
|
|
921
|
+
'404': "ApiError",
|
|
922
|
+
'409': "ApiError",
|
|
923
|
+
'422': "ApiError",
|
|
924
|
+
'429': "ApiError",
|
|
925
|
+
'500': "ApiError",
|
|
926
|
+
}
|
|
927
|
+
response_data = self.api_client.call_api(
|
|
928
|
+
*_param,
|
|
929
|
+
_request_timeout=_request_timeout
|
|
930
|
+
)
|
|
931
|
+
response_data.read()
|
|
932
|
+
return self.api_client.response_deserialize(
|
|
933
|
+
response_data=response_data,
|
|
934
|
+
response_types_map=_response_types_map,
|
|
935
|
+
).data
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
@validate_call
|
|
939
|
+
def stage_ingest_records_with_http_info(
|
|
940
|
+
self,
|
|
941
|
+
batch_id: UUID,
|
|
942
|
+
stage_records_request: StageRecordsRequest,
|
|
943
|
+
_request_timeout: Union[
|
|
944
|
+
None,
|
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
946
|
+
Tuple[
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
948
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
949
|
+
]
|
|
950
|
+
] = None,
|
|
951
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
952
|
+
_content_type: Optional[StrictStr] = None,
|
|
953
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
954
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
955
|
+
) -> ApiResponse[StageRecordsResponse]:
|
|
956
|
+
"""Stage up to 1000 canonical records into an open batch
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
:param batch_id: (required)
|
|
960
|
+
:type batch_id: UUID
|
|
961
|
+
:param stage_records_request: (required)
|
|
962
|
+
:type stage_records_request: StageRecordsRequest
|
|
963
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
964
|
+
number provided, it will be total request
|
|
965
|
+
timeout. It can also be a pair (tuple) of
|
|
966
|
+
(connection, read) timeouts.
|
|
967
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
968
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
969
|
+
request; this effectively ignores the
|
|
970
|
+
authentication in the spec for a single request.
|
|
971
|
+
:type _request_auth: dict, optional
|
|
972
|
+
:param _content_type: force content-type for the request.
|
|
973
|
+
:type _content_type: str, Optional
|
|
974
|
+
:param _headers: set to override the headers for a single
|
|
975
|
+
request; this effectively ignores the headers
|
|
976
|
+
in the spec for a single request.
|
|
977
|
+
:type _headers: dict, optional
|
|
978
|
+
:param _host_index: set to override the host_index for a single
|
|
979
|
+
request; this effectively ignores the host_index
|
|
980
|
+
in the spec for a single request.
|
|
981
|
+
:type _host_index: int, optional
|
|
982
|
+
:return: Returns the result object.
|
|
983
|
+
""" # noqa: E501
|
|
984
|
+
|
|
985
|
+
_param = self._stage_ingest_records_serialize(
|
|
986
|
+
batch_id=batch_id,
|
|
987
|
+
stage_records_request=stage_records_request,
|
|
988
|
+
_request_auth=_request_auth,
|
|
989
|
+
_content_type=_content_type,
|
|
990
|
+
_headers=_headers,
|
|
991
|
+
_host_index=_host_index
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
995
|
+
'202': "StageRecordsResponse",
|
|
996
|
+
'401': "ApiError",
|
|
997
|
+
'402': "ApiError",
|
|
998
|
+
'403': "ApiError",
|
|
999
|
+
'404': "ApiError",
|
|
1000
|
+
'409': "ApiError",
|
|
1001
|
+
'422': "ApiError",
|
|
1002
|
+
'429': "ApiError",
|
|
1003
|
+
'500': "ApiError",
|
|
1004
|
+
}
|
|
1005
|
+
response_data = self.api_client.call_api(
|
|
1006
|
+
*_param,
|
|
1007
|
+
_request_timeout=_request_timeout
|
|
1008
|
+
)
|
|
1009
|
+
response_data.read()
|
|
1010
|
+
return self.api_client.response_deserialize(
|
|
1011
|
+
response_data=response_data,
|
|
1012
|
+
response_types_map=_response_types_map,
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
@validate_call
|
|
1017
|
+
def stage_ingest_records_without_preload_content(
|
|
1018
|
+
self,
|
|
1019
|
+
batch_id: UUID,
|
|
1020
|
+
stage_records_request: StageRecordsRequest,
|
|
1021
|
+
_request_timeout: Union[
|
|
1022
|
+
None,
|
|
1023
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1024
|
+
Tuple[
|
|
1025
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1027
|
+
]
|
|
1028
|
+
] = None,
|
|
1029
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1030
|
+
_content_type: Optional[StrictStr] = None,
|
|
1031
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1032
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1033
|
+
) -> RESTResponseType:
|
|
1034
|
+
"""Stage up to 1000 canonical records into an open batch
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
:param batch_id: (required)
|
|
1038
|
+
:type batch_id: UUID
|
|
1039
|
+
:param stage_records_request: (required)
|
|
1040
|
+
:type stage_records_request: StageRecordsRequest
|
|
1041
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1042
|
+
number provided, it will be total request
|
|
1043
|
+
timeout. It can also be a pair (tuple) of
|
|
1044
|
+
(connection, read) timeouts.
|
|
1045
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1046
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1047
|
+
request; this effectively ignores the
|
|
1048
|
+
authentication in the spec for a single request.
|
|
1049
|
+
:type _request_auth: dict, optional
|
|
1050
|
+
:param _content_type: force content-type for the request.
|
|
1051
|
+
:type _content_type: str, Optional
|
|
1052
|
+
:param _headers: set to override the headers for a single
|
|
1053
|
+
request; this effectively ignores the headers
|
|
1054
|
+
in the spec for a single request.
|
|
1055
|
+
:type _headers: dict, optional
|
|
1056
|
+
:param _host_index: set to override the host_index for a single
|
|
1057
|
+
request; this effectively ignores the host_index
|
|
1058
|
+
in the spec for a single request.
|
|
1059
|
+
:type _host_index: int, optional
|
|
1060
|
+
:return: Returns the result object.
|
|
1061
|
+
""" # noqa: E501
|
|
1062
|
+
|
|
1063
|
+
_param = self._stage_ingest_records_serialize(
|
|
1064
|
+
batch_id=batch_id,
|
|
1065
|
+
stage_records_request=stage_records_request,
|
|
1066
|
+
_request_auth=_request_auth,
|
|
1067
|
+
_content_type=_content_type,
|
|
1068
|
+
_headers=_headers,
|
|
1069
|
+
_host_index=_host_index
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1073
|
+
'202': "StageRecordsResponse",
|
|
1074
|
+
'401': "ApiError",
|
|
1075
|
+
'402': "ApiError",
|
|
1076
|
+
'403': "ApiError",
|
|
1077
|
+
'404': "ApiError",
|
|
1078
|
+
'409': "ApiError",
|
|
1079
|
+
'422': "ApiError",
|
|
1080
|
+
'429': "ApiError",
|
|
1081
|
+
'500': "ApiError",
|
|
1082
|
+
}
|
|
1083
|
+
response_data = self.api_client.call_api(
|
|
1084
|
+
*_param,
|
|
1085
|
+
_request_timeout=_request_timeout
|
|
1086
|
+
)
|
|
1087
|
+
return response_data.response
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
def _stage_ingest_records_serialize(
|
|
1091
|
+
self,
|
|
1092
|
+
batch_id,
|
|
1093
|
+
stage_records_request,
|
|
1094
|
+
_request_auth,
|
|
1095
|
+
_content_type,
|
|
1096
|
+
_headers,
|
|
1097
|
+
_host_index,
|
|
1098
|
+
) -> RequestSerialized:
|
|
1099
|
+
|
|
1100
|
+
_host = None
|
|
1101
|
+
|
|
1102
|
+
_collection_formats: Dict[str, str] = {
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
_path_params: Dict[str, str] = {}
|
|
1106
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1107
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1108
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1109
|
+
_files: Dict[
|
|
1110
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1111
|
+
] = {}
|
|
1112
|
+
_body_params: Optional[bytes] = None
|
|
1113
|
+
|
|
1114
|
+
# process the path parameters
|
|
1115
|
+
if batch_id is not None:
|
|
1116
|
+
_path_params['batchId'] = batch_id
|
|
1117
|
+
# process the query parameters
|
|
1118
|
+
# process the header parameters
|
|
1119
|
+
# process the form parameters
|
|
1120
|
+
# process the body parameter
|
|
1121
|
+
if stage_records_request is not None:
|
|
1122
|
+
_body_params = stage_records_request
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
# set the HTTP header `Accept`
|
|
1126
|
+
if 'Accept' not in _header_params:
|
|
1127
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1128
|
+
[
|
|
1129
|
+
'application/json'
|
|
1130
|
+
]
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
# set the HTTP header `Content-Type`
|
|
1134
|
+
if _content_type:
|
|
1135
|
+
_header_params['Content-Type'] = _content_type
|
|
1136
|
+
else:
|
|
1137
|
+
_default_content_type = (
|
|
1138
|
+
self.api_client.select_header_content_type(
|
|
1139
|
+
[
|
|
1140
|
+
'application/json'
|
|
1141
|
+
]
|
|
1142
|
+
)
|
|
1143
|
+
)
|
|
1144
|
+
if _default_content_type is not None:
|
|
1145
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1146
|
+
|
|
1147
|
+
# authentication setting
|
|
1148
|
+
_auth_settings: List[str] = [
|
|
1149
|
+
'apiKey'
|
|
1150
|
+
]
|
|
1151
|
+
|
|
1152
|
+
return self.api_client.param_serialize(
|
|
1153
|
+
method='POST',
|
|
1154
|
+
resource_path='/api/v1/ingest/batches/{batchId}/records',
|
|
1155
|
+
path_params=_path_params,
|
|
1156
|
+
query_params=_query_params,
|
|
1157
|
+
header_params=_header_params,
|
|
1158
|
+
body=_body_params,
|
|
1159
|
+
post_params=_form_params,
|
|
1160
|
+
files=_files,
|
|
1161
|
+
auth_settings=_auth_settings,
|
|
1162
|
+
collection_formats=_collection_formats,
|
|
1163
|
+
_host=_host,
|
|
1164
|
+
_request_auth=_request_auth
|
|
1165
|
+
)
|
|
1166
|
+
|
|
1167
|
+
|