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,618 @@
|
|
|
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 typing import Optional
|
|
20
|
+
from elastly.models.ack_writebacks_response import AckWritebacksResponse
|
|
21
|
+
from elastly.models.claim_writebacks_request import ClaimWritebacksRequest
|
|
22
|
+
from elastly.models.claim_writebacks_response import ClaimWritebacksResponse
|
|
23
|
+
from elastly.models.writeback_ack_request import WritebackAckRequest
|
|
24
|
+
|
|
25
|
+
from elastly.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from elastly.api_response import ApiResponse
|
|
27
|
+
from elastly.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class WritebacksApi:
|
|
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 ack_writebacks(
|
|
45
|
+
self,
|
|
46
|
+
writeback_ack_request: WritebackAckRequest,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> AckWritebacksResponse:
|
|
60
|
+
"""Acknowledge applied or failed write-backs
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param writeback_ack_request: (required)
|
|
64
|
+
:type writeback_ack_request: WritebackAckRequest
|
|
65
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
66
|
+
number provided, it will be total request
|
|
67
|
+
timeout. It can also be a pair (tuple) of
|
|
68
|
+
(connection, read) timeouts.
|
|
69
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
70
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
71
|
+
request; this effectively ignores the
|
|
72
|
+
authentication in the spec for a single request.
|
|
73
|
+
:type _request_auth: dict, optional
|
|
74
|
+
:param _content_type: force content-type for the request.
|
|
75
|
+
:type _content_type: str, Optional
|
|
76
|
+
:param _headers: set to override the headers for a single
|
|
77
|
+
request; this effectively ignores the headers
|
|
78
|
+
in the spec for a single request.
|
|
79
|
+
:type _headers: dict, optional
|
|
80
|
+
:param _host_index: set to override the host_index for a single
|
|
81
|
+
request; this effectively ignores the host_index
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _host_index: int, optional
|
|
84
|
+
:return: Returns the result object.
|
|
85
|
+
""" # noqa: E501
|
|
86
|
+
|
|
87
|
+
_param = self._ack_writebacks_serialize(
|
|
88
|
+
writeback_ack_request=writeback_ack_request,
|
|
89
|
+
_request_auth=_request_auth,
|
|
90
|
+
_content_type=_content_type,
|
|
91
|
+
_headers=_headers,
|
|
92
|
+
_host_index=_host_index
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
|
+
'200': "AckWritebacksResponse",
|
|
97
|
+
'401': "ApiError",
|
|
98
|
+
'402': "ApiError",
|
|
99
|
+
'403': "ApiError",
|
|
100
|
+
'422': "ApiError",
|
|
101
|
+
'429': "ApiError",
|
|
102
|
+
'500': "ApiError",
|
|
103
|
+
}
|
|
104
|
+
response_data = self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
def ack_writebacks_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
writeback_ack_request: WritebackAckRequest,
|
|
119
|
+
_request_timeout: Union[
|
|
120
|
+
None,
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Tuple[
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
|
+
) -> ApiResponse[AckWritebacksResponse]:
|
|
132
|
+
"""Acknowledge applied or failed write-backs
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param writeback_ack_request: (required)
|
|
136
|
+
:type writeback_ack_request: WritebackAckRequest
|
|
137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
138
|
+
number provided, it will be total request
|
|
139
|
+
timeout. It can also be a pair (tuple) of
|
|
140
|
+
(connection, read) timeouts.
|
|
141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
143
|
+
request; this effectively ignores the
|
|
144
|
+
authentication in the spec for a single request.
|
|
145
|
+
:type _request_auth: dict, optional
|
|
146
|
+
:param _content_type: force content-type for the request.
|
|
147
|
+
:type _content_type: str, Optional
|
|
148
|
+
:param _headers: set to override the headers for a single
|
|
149
|
+
request; this effectively ignores the headers
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _headers: dict, optional
|
|
152
|
+
:param _host_index: set to override the host_index for a single
|
|
153
|
+
request; this effectively ignores the host_index
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _host_index: int, optional
|
|
156
|
+
:return: Returns the result object.
|
|
157
|
+
""" # noqa: E501
|
|
158
|
+
|
|
159
|
+
_param = self._ack_writebacks_serialize(
|
|
160
|
+
writeback_ack_request=writeback_ack_request,
|
|
161
|
+
_request_auth=_request_auth,
|
|
162
|
+
_content_type=_content_type,
|
|
163
|
+
_headers=_headers,
|
|
164
|
+
_host_index=_host_index
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
|
+
'200': "AckWritebacksResponse",
|
|
169
|
+
'401': "ApiError",
|
|
170
|
+
'402': "ApiError",
|
|
171
|
+
'403': "ApiError",
|
|
172
|
+
'422': "ApiError",
|
|
173
|
+
'429': "ApiError",
|
|
174
|
+
'500': "ApiError",
|
|
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 ack_writebacks_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
writeback_ack_request: WritebackAckRequest,
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Acknowledge applied or failed write-backs
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
:param writeback_ack_request: (required)
|
|
208
|
+
:type writeback_ack_request: WritebackAckRequest
|
|
209
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
210
|
+
number provided, it will be total request
|
|
211
|
+
timeout. It can also be a pair (tuple) of
|
|
212
|
+
(connection, read) timeouts.
|
|
213
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
214
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
215
|
+
request; this effectively ignores the
|
|
216
|
+
authentication in the spec for a single request.
|
|
217
|
+
:type _request_auth: dict, optional
|
|
218
|
+
:param _content_type: force content-type for the request.
|
|
219
|
+
:type _content_type: str, Optional
|
|
220
|
+
:param _headers: set to override the headers for a single
|
|
221
|
+
request; this effectively ignores the headers
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _headers: dict, optional
|
|
224
|
+
:param _host_index: set to override the host_index for a single
|
|
225
|
+
request; this effectively ignores the host_index
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _host_index: int, optional
|
|
228
|
+
:return: Returns the result object.
|
|
229
|
+
""" # noqa: E501
|
|
230
|
+
|
|
231
|
+
_param = self._ack_writebacks_serialize(
|
|
232
|
+
writeback_ack_request=writeback_ack_request,
|
|
233
|
+
_request_auth=_request_auth,
|
|
234
|
+
_content_type=_content_type,
|
|
235
|
+
_headers=_headers,
|
|
236
|
+
_host_index=_host_index
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
240
|
+
'200': "AckWritebacksResponse",
|
|
241
|
+
'401': "ApiError",
|
|
242
|
+
'402': "ApiError",
|
|
243
|
+
'403': "ApiError",
|
|
244
|
+
'422': "ApiError",
|
|
245
|
+
'429': "ApiError",
|
|
246
|
+
'500': "ApiError",
|
|
247
|
+
}
|
|
248
|
+
response_data = self.api_client.call_api(
|
|
249
|
+
*_param,
|
|
250
|
+
_request_timeout=_request_timeout
|
|
251
|
+
)
|
|
252
|
+
return response_data.response
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _ack_writebacks_serialize(
|
|
256
|
+
self,
|
|
257
|
+
writeback_ack_request,
|
|
258
|
+
_request_auth,
|
|
259
|
+
_content_type,
|
|
260
|
+
_headers,
|
|
261
|
+
_host_index,
|
|
262
|
+
) -> RequestSerialized:
|
|
263
|
+
|
|
264
|
+
_host = None
|
|
265
|
+
|
|
266
|
+
_collection_formats: Dict[str, str] = {
|
|
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
|
+
# process the body parameter
|
|
283
|
+
if writeback_ack_request is not None:
|
|
284
|
+
_body_params = writeback_ack_request
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
# set the HTTP header `Accept`
|
|
288
|
+
if 'Accept' not in _header_params:
|
|
289
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
290
|
+
[
|
|
291
|
+
'application/json'
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# set the HTTP header `Content-Type`
|
|
296
|
+
if _content_type:
|
|
297
|
+
_header_params['Content-Type'] = _content_type
|
|
298
|
+
else:
|
|
299
|
+
_default_content_type = (
|
|
300
|
+
self.api_client.select_header_content_type(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
if _default_content_type is not None:
|
|
307
|
+
_header_params['Content-Type'] = _default_content_type
|
|
308
|
+
|
|
309
|
+
# authentication setting
|
|
310
|
+
_auth_settings: List[str] = [
|
|
311
|
+
'apiKey'
|
|
312
|
+
]
|
|
313
|
+
|
|
314
|
+
return self.api_client.param_serialize(
|
|
315
|
+
method='POST',
|
|
316
|
+
resource_path='/api/v1/writebacks/ack',
|
|
317
|
+
path_params=_path_params,
|
|
318
|
+
query_params=_query_params,
|
|
319
|
+
header_params=_header_params,
|
|
320
|
+
body=_body_params,
|
|
321
|
+
post_params=_form_params,
|
|
322
|
+
files=_files,
|
|
323
|
+
auth_settings=_auth_settings,
|
|
324
|
+
collection_formats=_collection_formats,
|
|
325
|
+
_host=_host,
|
|
326
|
+
_request_auth=_request_auth
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@validate_call
|
|
333
|
+
def claim_writebacks(
|
|
334
|
+
self,
|
|
335
|
+
claim_writebacks_request: Optional[ClaimWritebacksRequest] = None,
|
|
336
|
+
_request_timeout: Union[
|
|
337
|
+
None,
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
+
Tuple[
|
|
340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
342
|
+
]
|
|
343
|
+
] = None,
|
|
344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
+
_content_type: Optional[StrictStr] = None,
|
|
346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
348
|
+
) -> ClaimWritebacksResponse:
|
|
349
|
+
"""Lease pending price write-backs for this connector
|
|
350
|
+
|
|
351
|
+
Requires a connector-scope key. Each task carries leaseUntil; acks after the lease are counted as expired, never applied.
|
|
352
|
+
|
|
353
|
+
:param claim_writebacks_request:
|
|
354
|
+
:type claim_writebacks_request: ClaimWritebacksRequest
|
|
355
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
356
|
+
number provided, it will be total request
|
|
357
|
+
timeout. It can also be a pair (tuple) of
|
|
358
|
+
(connection, read) timeouts.
|
|
359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
361
|
+
request; this effectively ignores the
|
|
362
|
+
authentication in the spec for a single request.
|
|
363
|
+
:type _request_auth: dict, optional
|
|
364
|
+
:param _content_type: force content-type for the request.
|
|
365
|
+
:type _content_type: str, Optional
|
|
366
|
+
:param _headers: set to override the headers for a single
|
|
367
|
+
request; this effectively ignores the headers
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _headers: dict, optional
|
|
370
|
+
:param _host_index: set to override the host_index for a single
|
|
371
|
+
request; this effectively ignores the host_index
|
|
372
|
+
in the spec for a single request.
|
|
373
|
+
:type _host_index: int, optional
|
|
374
|
+
:return: Returns the result object.
|
|
375
|
+
""" # noqa: E501
|
|
376
|
+
|
|
377
|
+
_param = self._claim_writebacks_serialize(
|
|
378
|
+
claim_writebacks_request=claim_writebacks_request,
|
|
379
|
+
_request_auth=_request_auth,
|
|
380
|
+
_content_type=_content_type,
|
|
381
|
+
_headers=_headers,
|
|
382
|
+
_host_index=_host_index
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
386
|
+
'200': "ClaimWritebacksResponse",
|
|
387
|
+
'401': "ApiError",
|
|
388
|
+
'402': "ApiError",
|
|
389
|
+
'403': "ApiError",
|
|
390
|
+
'429': "ApiError",
|
|
391
|
+
'500': "ApiError",
|
|
392
|
+
}
|
|
393
|
+
response_data = self.api_client.call_api(
|
|
394
|
+
*_param,
|
|
395
|
+
_request_timeout=_request_timeout
|
|
396
|
+
)
|
|
397
|
+
response_data.read()
|
|
398
|
+
return self.api_client.response_deserialize(
|
|
399
|
+
response_data=response_data,
|
|
400
|
+
response_types_map=_response_types_map,
|
|
401
|
+
).data
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
@validate_call
|
|
405
|
+
def claim_writebacks_with_http_info(
|
|
406
|
+
self,
|
|
407
|
+
claim_writebacks_request: Optional[ClaimWritebacksRequest] = None,
|
|
408
|
+
_request_timeout: Union[
|
|
409
|
+
None,
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
411
|
+
Tuple[
|
|
412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
413
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
414
|
+
]
|
|
415
|
+
] = None,
|
|
416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
417
|
+
_content_type: Optional[StrictStr] = None,
|
|
418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
420
|
+
) -> ApiResponse[ClaimWritebacksResponse]:
|
|
421
|
+
"""Lease pending price write-backs for this connector
|
|
422
|
+
|
|
423
|
+
Requires a connector-scope key. Each task carries leaseUntil; acks after the lease are counted as expired, never applied.
|
|
424
|
+
|
|
425
|
+
:param claim_writebacks_request:
|
|
426
|
+
:type claim_writebacks_request: ClaimWritebacksRequest
|
|
427
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
428
|
+
number provided, it will be total request
|
|
429
|
+
timeout. It can also be a pair (tuple) of
|
|
430
|
+
(connection, read) timeouts.
|
|
431
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
432
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
433
|
+
request; this effectively ignores the
|
|
434
|
+
authentication in the spec for a single request.
|
|
435
|
+
:type _request_auth: dict, optional
|
|
436
|
+
:param _content_type: force content-type for the request.
|
|
437
|
+
:type _content_type: str, Optional
|
|
438
|
+
:param _headers: set to override the headers for a single
|
|
439
|
+
request; this effectively ignores the headers
|
|
440
|
+
in the spec for a single request.
|
|
441
|
+
:type _headers: dict, optional
|
|
442
|
+
:param _host_index: set to override the host_index for a single
|
|
443
|
+
request; this effectively ignores the host_index
|
|
444
|
+
in the spec for a single request.
|
|
445
|
+
:type _host_index: int, optional
|
|
446
|
+
:return: Returns the result object.
|
|
447
|
+
""" # noqa: E501
|
|
448
|
+
|
|
449
|
+
_param = self._claim_writebacks_serialize(
|
|
450
|
+
claim_writebacks_request=claim_writebacks_request,
|
|
451
|
+
_request_auth=_request_auth,
|
|
452
|
+
_content_type=_content_type,
|
|
453
|
+
_headers=_headers,
|
|
454
|
+
_host_index=_host_index
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
458
|
+
'200': "ClaimWritebacksResponse",
|
|
459
|
+
'401': "ApiError",
|
|
460
|
+
'402': "ApiError",
|
|
461
|
+
'403': "ApiError",
|
|
462
|
+
'429': "ApiError",
|
|
463
|
+
'500': "ApiError",
|
|
464
|
+
}
|
|
465
|
+
response_data = self.api_client.call_api(
|
|
466
|
+
*_param,
|
|
467
|
+
_request_timeout=_request_timeout
|
|
468
|
+
)
|
|
469
|
+
response_data.read()
|
|
470
|
+
return self.api_client.response_deserialize(
|
|
471
|
+
response_data=response_data,
|
|
472
|
+
response_types_map=_response_types_map,
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
@validate_call
|
|
477
|
+
def claim_writebacks_without_preload_content(
|
|
478
|
+
self,
|
|
479
|
+
claim_writebacks_request: Optional[ClaimWritebacksRequest] = None,
|
|
480
|
+
_request_timeout: Union[
|
|
481
|
+
None,
|
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
483
|
+
Tuple[
|
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
485
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
486
|
+
]
|
|
487
|
+
] = None,
|
|
488
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
489
|
+
_content_type: Optional[StrictStr] = None,
|
|
490
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
491
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
492
|
+
) -> RESTResponseType:
|
|
493
|
+
"""Lease pending price write-backs for this connector
|
|
494
|
+
|
|
495
|
+
Requires a connector-scope key. Each task carries leaseUntil; acks after the lease are counted as expired, never applied.
|
|
496
|
+
|
|
497
|
+
:param claim_writebacks_request:
|
|
498
|
+
:type claim_writebacks_request: ClaimWritebacksRequest
|
|
499
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
500
|
+
number provided, it will be total request
|
|
501
|
+
timeout. It can also be a pair (tuple) of
|
|
502
|
+
(connection, read) timeouts.
|
|
503
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
504
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
505
|
+
request; this effectively ignores the
|
|
506
|
+
authentication in the spec for a single request.
|
|
507
|
+
:type _request_auth: dict, optional
|
|
508
|
+
:param _content_type: force content-type for the request.
|
|
509
|
+
:type _content_type: str, Optional
|
|
510
|
+
:param _headers: set to override the headers for a single
|
|
511
|
+
request; this effectively ignores the headers
|
|
512
|
+
in the spec for a single request.
|
|
513
|
+
:type _headers: dict, optional
|
|
514
|
+
:param _host_index: set to override the host_index for a single
|
|
515
|
+
request; this effectively ignores the host_index
|
|
516
|
+
in the spec for a single request.
|
|
517
|
+
:type _host_index: int, optional
|
|
518
|
+
:return: Returns the result object.
|
|
519
|
+
""" # noqa: E501
|
|
520
|
+
|
|
521
|
+
_param = self._claim_writebacks_serialize(
|
|
522
|
+
claim_writebacks_request=claim_writebacks_request,
|
|
523
|
+
_request_auth=_request_auth,
|
|
524
|
+
_content_type=_content_type,
|
|
525
|
+
_headers=_headers,
|
|
526
|
+
_host_index=_host_index
|
|
527
|
+
)
|
|
528
|
+
|
|
529
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
530
|
+
'200': "ClaimWritebacksResponse",
|
|
531
|
+
'401': "ApiError",
|
|
532
|
+
'402': "ApiError",
|
|
533
|
+
'403': "ApiError",
|
|
534
|
+
'429': "ApiError",
|
|
535
|
+
'500': "ApiError",
|
|
536
|
+
}
|
|
537
|
+
response_data = self.api_client.call_api(
|
|
538
|
+
*_param,
|
|
539
|
+
_request_timeout=_request_timeout
|
|
540
|
+
)
|
|
541
|
+
return response_data.response
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
def _claim_writebacks_serialize(
|
|
545
|
+
self,
|
|
546
|
+
claim_writebacks_request,
|
|
547
|
+
_request_auth,
|
|
548
|
+
_content_type,
|
|
549
|
+
_headers,
|
|
550
|
+
_host_index,
|
|
551
|
+
) -> RequestSerialized:
|
|
552
|
+
|
|
553
|
+
_host = None
|
|
554
|
+
|
|
555
|
+
_collection_formats: Dict[str, str] = {
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
_path_params: Dict[str, str] = {}
|
|
559
|
+
_query_params: List[Tuple[str, str]] = []
|
|
560
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
561
|
+
_form_params: List[Tuple[str, str]] = []
|
|
562
|
+
_files: Dict[
|
|
563
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
564
|
+
] = {}
|
|
565
|
+
_body_params: Optional[bytes] = None
|
|
566
|
+
|
|
567
|
+
# process the path parameters
|
|
568
|
+
# process the query parameters
|
|
569
|
+
# process the header parameters
|
|
570
|
+
# process the form parameters
|
|
571
|
+
# process the body parameter
|
|
572
|
+
if claim_writebacks_request is not None:
|
|
573
|
+
_body_params = claim_writebacks_request
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
# set the HTTP header `Accept`
|
|
577
|
+
if 'Accept' not in _header_params:
|
|
578
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
579
|
+
[
|
|
580
|
+
'application/json'
|
|
581
|
+
]
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
# set the HTTP header `Content-Type`
|
|
585
|
+
if _content_type:
|
|
586
|
+
_header_params['Content-Type'] = _content_type
|
|
587
|
+
else:
|
|
588
|
+
_default_content_type = (
|
|
589
|
+
self.api_client.select_header_content_type(
|
|
590
|
+
[
|
|
591
|
+
'application/json'
|
|
592
|
+
]
|
|
593
|
+
)
|
|
594
|
+
)
|
|
595
|
+
if _default_content_type is not None:
|
|
596
|
+
_header_params['Content-Type'] = _default_content_type
|
|
597
|
+
|
|
598
|
+
# authentication setting
|
|
599
|
+
_auth_settings: List[str] = [
|
|
600
|
+
'apiKey'
|
|
601
|
+
]
|
|
602
|
+
|
|
603
|
+
return self.api_client.param_serialize(
|
|
604
|
+
method='POST',
|
|
605
|
+
resource_path='/api/v1/writebacks/claim',
|
|
606
|
+
path_params=_path_params,
|
|
607
|
+
query_params=_query_params,
|
|
608
|
+
header_params=_header_params,
|
|
609
|
+
body=_body_params,
|
|
610
|
+
post_params=_form_params,
|
|
611
|
+
files=_files,
|
|
612
|
+
auth_settings=_auth_settings,
|
|
613
|
+
collection_formats=_collection_formats,
|
|
614
|
+
_host=_host,
|
|
615
|
+
_request_auth=_request_auth
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
|