lusid-sdk 2.0.455__py3-none-any.whl → 2.0.468__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lusid-sdk might be problematic. Click here for more details.

@@ -0,0 +1,885 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic import validate_arguments, ValidationError
20
+ from typing import overload, Optional, Union, Awaitable
21
+
22
+ from typing_extensions import Annotated
23
+ from datetime import datetime
24
+
25
+ from pydantic import Field, StrictStr, conint, conlist, constr, validator
26
+
27
+ from typing import Optional
28
+
29
+ from lusid.models.create_staging_rule_set_request import CreateStagingRuleSetRequest
30
+ from lusid.models.deleted_entity_response import DeletedEntityResponse
31
+ from lusid.models.paged_resource_list_of_staging_rule_set import PagedResourceListOfStagingRuleSet
32
+ from lusid.models.staging_rule_set import StagingRuleSet
33
+ from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
34
+
35
+ from lusid.api_client import ApiClient
36
+ from lusid.api_response import ApiResponse
37
+ from lusid.exceptions import ( # noqa: F401
38
+ ApiTypeError,
39
+ ApiValueError
40
+ )
41
+
42
+
43
+ class StagingRuleSetApi:
44
+ """NOTE: This class is auto generated by OpenAPI Generator
45
+ Ref: https://openapi-generator.tech
46
+
47
+ Do not edit the class manually.
48
+ """
49
+
50
+ def __init__(self, api_client=None) -> None:
51
+ if api_client is None:
52
+ api_client = ApiClient.get_default()
53
+ self.api_client = api_client
54
+
55
+ @overload
56
+ async def create_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to create the staging rule set.")], create_staging_rule_set_request : Annotated[CreateStagingRuleSetRequest, Field(..., description="Request to create a staging rule set.")], **kwargs) -> StagingRuleSet: # noqa: E501
57
+ ...
58
+
59
+ @overload
60
+ def create_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to create the staging rule set.")], create_staging_rule_set_request : Annotated[CreateStagingRuleSetRequest, Field(..., description="Request to create a staging rule set.")], async_req: Optional[bool]=True, **kwargs) -> StagingRuleSet: # noqa: E501
61
+ ...
62
+
63
+ @validate_arguments
64
+ def create_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to create the staging rule set.")], create_staging_rule_set_request : Annotated[CreateStagingRuleSetRequest, Field(..., description="Request to create a staging rule set.")], async_req: Optional[bool]=None, **kwargs) -> Union[StagingRuleSet, Awaitable[StagingRuleSet]]: # noqa: E501
65
+ """[EXPERIMENTAL] CreateStagingRuleSet: Create a StagingRuleSet # noqa: E501
66
+
67
+ Create a new staging rule set. # noqa: E501
68
+ This method makes a synchronous HTTP request by default. To make an
69
+ asynchronous HTTP request, please pass async_req=True
70
+
71
+ >>> thread = api.create_staging_rule_set(entity_type, create_staging_rule_set_request, async_req=True)
72
+ >>> result = thread.get()
73
+
74
+ :param entity_type: The entity type for which to create the staging rule set. (required)
75
+ :type entity_type: str
76
+ :param create_staging_rule_set_request: Request to create a staging rule set. (required)
77
+ :type create_staging_rule_set_request: CreateStagingRuleSetRequest
78
+ :param async_req: Whether to execute the request asynchronously.
79
+ :type async_req: bool, optional
80
+ :param _request_timeout: timeout setting for this request.
81
+ If one number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :return: Returns the result object.
85
+ If the method is called asynchronously,
86
+ returns the request thread.
87
+ :rtype: StagingRuleSet
88
+ """
89
+ kwargs['_return_http_data_only'] = True
90
+ if '_preload_content' in kwargs:
91
+ message = "Error! Please call the create_staging_rule_set_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
92
+ raise ValueError(message)
93
+ if async_req is not None:
94
+ kwargs['async_req'] = async_req
95
+ return self.create_staging_rule_set_with_http_info(entity_type, create_staging_rule_set_request, **kwargs) # noqa: E501
96
+
97
+ @validate_arguments
98
+ def create_staging_rule_set_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to create the staging rule set.")], create_staging_rule_set_request : Annotated[CreateStagingRuleSetRequest, Field(..., description="Request to create a staging rule set.")], **kwargs) -> ApiResponse: # noqa: E501
99
+ """[EXPERIMENTAL] CreateStagingRuleSet: Create a StagingRuleSet # noqa: E501
100
+
101
+ Create a new staging rule set. # noqa: E501
102
+ This method makes a synchronous HTTP request by default. To make an
103
+ asynchronous HTTP request, please pass async_req=True
104
+
105
+ >>> thread = api.create_staging_rule_set_with_http_info(entity_type, create_staging_rule_set_request, async_req=True)
106
+ >>> result = thread.get()
107
+
108
+ :param entity_type: The entity type for which to create the staging rule set. (required)
109
+ :type entity_type: str
110
+ :param create_staging_rule_set_request: Request to create a staging rule set. (required)
111
+ :type create_staging_rule_set_request: CreateStagingRuleSetRequest
112
+ :param async_req: Whether to execute the request asynchronously.
113
+ :type async_req: bool, optional
114
+ :param _preload_content: if False, the ApiResponse.data will
115
+ be set to none and raw_data will store the
116
+ HTTP response body without reading/decoding.
117
+ Default is True.
118
+ :type _preload_content: bool, optional
119
+ :param _return_http_data_only: response data instead of ApiResponse
120
+ object with status code, headers, etc
121
+ :type _return_http_data_only: bool, optional
122
+ :param _request_timeout: timeout setting for this request. If one
123
+ number provided, it will be total request
124
+ timeout. It can also be a pair (tuple) of
125
+ (connection, read) timeouts.
126
+ :param _request_auth: set to override the auth_settings for an a single
127
+ request; this effectively ignores the authentication
128
+ in the spec for a single request.
129
+ :type _request_auth: dict, optional
130
+ :type _content_type: string, optional: force content-type for the request
131
+ :return: Returns the result object.
132
+ If the method is called asynchronously,
133
+ returns the request thread.
134
+ :rtype: tuple(StagingRuleSet, status_code(int), headers(HTTPHeaderDict))
135
+ """
136
+
137
+ _params = locals()
138
+
139
+ _all_params = [
140
+ 'entity_type',
141
+ 'create_staging_rule_set_request'
142
+ ]
143
+ _all_params.extend(
144
+ [
145
+ 'async_req',
146
+ '_return_http_data_only',
147
+ '_preload_content',
148
+ '_request_timeout',
149
+ '_request_auth',
150
+ '_content_type',
151
+ '_headers'
152
+ ]
153
+ )
154
+
155
+ # validate the arguments
156
+ for _key, _val in _params['kwargs'].items():
157
+ if _key not in _all_params:
158
+ raise ApiTypeError(
159
+ "Got an unexpected keyword argument '%s'"
160
+ " to method create_staging_rule_set" % _key
161
+ )
162
+ _params[_key] = _val
163
+ del _params['kwargs']
164
+
165
+ _collection_formats = {}
166
+
167
+ # process the path parameters
168
+ _path_params = {}
169
+ if _params['entity_type']:
170
+ _path_params['entityType'] = _params['entity_type']
171
+
172
+
173
+ # process the query parameters
174
+ _query_params = []
175
+ # process the header parameters
176
+ _header_params = dict(_params.get('_headers', {}))
177
+ # process the form parameters
178
+ _form_params = []
179
+ _files = {}
180
+ # process the body parameter
181
+ _body_params = None
182
+ if _params['create_staging_rule_set_request'] is not None:
183
+ _body_params = _params['create_staging_rule_set_request']
184
+
185
+ # set the HTTP header `Accept`
186
+ _header_params['Accept'] = self.api_client.select_header_accept(
187
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
188
+
189
+ # set the HTTP header `Content-Type`
190
+ _content_types_list = _params.get('_content_type',
191
+ self.api_client.select_header_content_type(
192
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
193
+ if _content_types_list:
194
+ _header_params['Content-Type'] = _content_types_list
195
+
196
+ # authentication setting
197
+ _auth_settings = ['oauth2'] # noqa: E501
198
+
199
+ _response_types_map = {
200
+ '201': "StagingRuleSet",
201
+ '400': "LusidValidationProblemDetails",
202
+ }
203
+
204
+ return self.api_client.call_api(
205
+ '/api/stagingrulesets/{entityType}', 'POST',
206
+ _path_params,
207
+ _query_params,
208
+ _header_params,
209
+ body=_body_params,
210
+ post_params=_form_params,
211
+ files=_files,
212
+ response_types_map=_response_types_map,
213
+ auth_settings=_auth_settings,
214
+ async_req=_params.get('async_req'),
215
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
216
+ _preload_content=_params.get('_preload_content', True),
217
+ _request_timeout=_params.get('_request_timeout'),
218
+ collection_formats=_collection_formats,
219
+ _request_auth=_params.get('_request_auth'))
220
+
221
+ @overload
222
+ async def delete_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to delete the staging rule set.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
223
+ ...
224
+
225
+ @overload
226
+ def delete_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to delete the staging rule set.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501
227
+ ...
228
+
229
+ @validate_arguments
230
+ def delete_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to delete the staging rule set.")], async_req: Optional[bool]=None, **kwargs) -> Union[DeletedEntityResponse, Awaitable[DeletedEntityResponse]]: # noqa: E501
231
+ """[EXPERIMENTAL] DeleteStagingRuleSet: Delete a StagingRuleSet # noqa: E501
232
+
233
+ Delete a staging rule set of a specific entity type. Deletion will be valid from the staging rule set's creation datetime. This means that the staging rule set will no longer exist at any effective datetime from the asAt datetime of deletion. # noqa: E501
234
+ This method makes a synchronous HTTP request by default. To make an
235
+ asynchronous HTTP request, please pass async_req=True
236
+
237
+ >>> thread = api.delete_staging_rule_set(entity_type, async_req=True)
238
+ >>> result = thread.get()
239
+
240
+ :param entity_type: The entity type for which to delete the staging rule set. (required)
241
+ :type entity_type: str
242
+ :param async_req: Whether to execute the request asynchronously.
243
+ :type async_req: bool, optional
244
+ :param _request_timeout: timeout setting for this request.
245
+ If one number provided, it will be total request
246
+ timeout. It can also be a pair (tuple) of
247
+ (connection, read) timeouts.
248
+ :return: Returns the result object.
249
+ If the method is called asynchronously,
250
+ returns the request thread.
251
+ :rtype: DeletedEntityResponse
252
+ """
253
+ kwargs['_return_http_data_only'] = True
254
+ if '_preload_content' in kwargs:
255
+ message = "Error! Please call the delete_staging_rule_set_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
256
+ raise ValueError(message)
257
+ if async_req is not None:
258
+ kwargs['async_req'] = async_req
259
+ return self.delete_staging_rule_set_with_http_info(entity_type, **kwargs) # noqa: E501
260
+
261
+ @validate_arguments
262
+ def delete_staging_rule_set_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to delete the staging rule set.")], **kwargs) -> ApiResponse: # noqa: E501
263
+ """[EXPERIMENTAL] DeleteStagingRuleSet: Delete a StagingRuleSet # noqa: E501
264
+
265
+ Delete a staging rule set of a specific entity type. Deletion will be valid from the staging rule set's creation datetime. This means that the staging rule set will no longer exist at any effective datetime from the asAt datetime of deletion. # noqa: E501
266
+ This method makes a synchronous HTTP request by default. To make an
267
+ asynchronous HTTP request, please pass async_req=True
268
+
269
+ >>> thread = api.delete_staging_rule_set_with_http_info(entity_type, async_req=True)
270
+ >>> result = thread.get()
271
+
272
+ :param entity_type: The entity type for which to delete the staging rule set. (required)
273
+ :type entity_type: str
274
+ :param async_req: Whether to execute the request asynchronously.
275
+ :type async_req: bool, optional
276
+ :param _preload_content: if False, the ApiResponse.data will
277
+ be set to none and raw_data will store the
278
+ HTTP response body without reading/decoding.
279
+ Default is True.
280
+ :type _preload_content: bool, optional
281
+ :param _return_http_data_only: response data instead of ApiResponse
282
+ object with status code, headers, etc
283
+ :type _return_http_data_only: bool, optional
284
+ :param _request_timeout: timeout setting for this request. If one
285
+ number provided, it will be total request
286
+ timeout. It can also be a pair (tuple) of
287
+ (connection, read) timeouts.
288
+ :param _request_auth: set to override the auth_settings for an a single
289
+ request; this effectively ignores the authentication
290
+ in the spec for a single request.
291
+ :type _request_auth: dict, optional
292
+ :type _content_type: string, optional: force content-type for the request
293
+ :return: Returns the result object.
294
+ If the method is called asynchronously,
295
+ returns the request thread.
296
+ :rtype: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
297
+ """
298
+
299
+ _params = locals()
300
+
301
+ _all_params = [
302
+ 'entity_type'
303
+ ]
304
+ _all_params.extend(
305
+ [
306
+ 'async_req',
307
+ '_return_http_data_only',
308
+ '_preload_content',
309
+ '_request_timeout',
310
+ '_request_auth',
311
+ '_content_type',
312
+ '_headers'
313
+ ]
314
+ )
315
+
316
+ # validate the arguments
317
+ for _key, _val in _params['kwargs'].items():
318
+ if _key not in _all_params:
319
+ raise ApiTypeError(
320
+ "Got an unexpected keyword argument '%s'"
321
+ " to method delete_staging_rule_set" % _key
322
+ )
323
+ _params[_key] = _val
324
+ del _params['kwargs']
325
+
326
+ _collection_formats = {}
327
+
328
+ # process the path parameters
329
+ _path_params = {}
330
+ if _params['entity_type']:
331
+ _path_params['entityType'] = _params['entity_type']
332
+
333
+
334
+ # process the query parameters
335
+ _query_params = []
336
+ # process the header parameters
337
+ _header_params = dict(_params.get('_headers', {}))
338
+ # process the form parameters
339
+ _form_params = []
340
+ _files = {}
341
+ # process the body parameter
342
+ _body_params = None
343
+ # set the HTTP header `Accept`
344
+ _header_params['Accept'] = self.api_client.select_header_accept(
345
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
346
+
347
+ # authentication setting
348
+ _auth_settings = ['oauth2'] # noqa: E501
349
+
350
+ _response_types_map = {
351
+ '200': "DeletedEntityResponse",
352
+ '400': "LusidValidationProblemDetails",
353
+ }
354
+
355
+ return self.api_client.call_api(
356
+ '/api/stagingrulesets/{entityType}', 'DELETE',
357
+ _path_params,
358
+ _query_params,
359
+ _header_params,
360
+ body=_body_params,
361
+ post_params=_form_params,
362
+ files=_files,
363
+ response_types_map=_response_types_map,
364
+ auth_settings=_auth_settings,
365
+ async_req=_params.get('async_req'),
366
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
367
+ _preload_content=_params.get('_preload_content', True),
368
+ _request_timeout=_params.get('_request_timeout'),
369
+ collection_formats=_collection_formats,
370
+ _request_auth=_params.get('_request_auth'))
371
+
372
+ @overload
373
+ async def get_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to retrieve the staging rule set.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.")] = None, **kwargs) -> StagingRuleSet: # noqa: E501
374
+ ...
375
+
376
+ @overload
377
+ def get_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to retrieve the staging rule set.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> StagingRuleSet: # noqa: E501
378
+ ...
379
+
380
+ @validate_arguments
381
+ def get_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to retrieve the staging rule set.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[StagingRuleSet, Awaitable[StagingRuleSet]]: # noqa: E501
382
+ """[EXPERIMENTAL] GetStagingRuleSet: Get a StagingRuleSet # noqa: E501
383
+
384
+ Get the staging rule set for the given entity type at the specific asAt time. # noqa: E501
385
+ This method makes a synchronous HTTP request by default. To make an
386
+ asynchronous HTTP request, please pass async_req=True
387
+
388
+ >>> thread = api.get_staging_rule_set(entity_type, as_at, async_req=True)
389
+ >>> result = thread.get()
390
+
391
+ :param entity_type: The entity type for which to retrieve the staging rule set. (required)
392
+ :type entity_type: str
393
+ :param as_at: The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.
394
+ :type as_at: datetime
395
+ :param async_req: Whether to execute the request asynchronously.
396
+ :type async_req: bool, optional
397
+ :param _request_timeout: timeout setting for this request.
398
+ If one number provided, it will be total request
399
+ timeout. It can also be a pair (tuple) of
400
+ (connection, read) timeouts.
401
+ :return: Returns the result object.
402
+ If the method is called asynchronously,
403
+ returns the request thread.
404
+ :rtype: StagingRuleSet
405
+ """
406
+ kwargs['_return_http_data_only'] = True
407
+ if '_preload_content' in kwargs:
408
+ message = "Error! Please call the get_staging_rule_set_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
409
+ raise ValueError(message)
410
+ if async_req is not None:
411
+ kwargs['async_req'] = async_req
412
+ return self.get_staging_rule_set_with_http_info(entity_type, as_at, **kwargs) # noqa: E501
413
+
414
+ @validate_arguments
415
+ def get_staging_rule_set_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to retrieve the staging rule set.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
416
+ """[EXPERIMENTAL] GetStagingRuleSet: Get a StagingRuleSet # noqa: E501
417
+
418
+ Get the staging rule set for the given entity type at the specific asAt time. # noqa: E501
419
+ This method makes a synchronous HTTP request by default. To make an
420
+ asynchronous HTTP request, please pass async_req=True
421
+
422
+ >>> thread = api.get_staging_rule_set_with_http_info(entity_type, as_at, async_req=True)
423
+ >>> result = thread.get()
424
+
425
+ :param entity_type: The entity type for which to retrieve the staging rule set. (required)
426
+ :type entity_type: str
427
+ :param as_at: The asAt datetime at which to retrieve the staging rule set. Defaults to return the latest version of the staging rule set if not specified.
428
+ :type as_at: datetime
429
+ :param async_req: Whether to execute the request asynchronously.
430
+ :type async_req: bool, optional
431
+ :param _preload_content: if False, the ApiResponse.data will
432
+ be set to none and raw_data will store the
433
+ HTTP response body without reading/decoding.
434
+ Default is True.
435
+ :type _preload_content: bool, optional
436
+ :param _return_http_data_only: response data instead of ApiResponse
437
+ object with status code, headers, etc
438
+ :type _return_http_data_only: bool, optional
439
+ :param _request_timeout: timeout setting for this request. If one
440
+ number provided, it will be total request
441
+ timeout. It can also be a pair (tuple) of
442
+ (connection, read) timeouts.
443
+ :param _request_auth: set to override the auth_settings for an a single
444
+ request; this effectively ignores the authentication
445
+ in the spec for a single request.
446
+ :type _request_auth: dict, optional
447
+ :type _content_type: string, optional: force content-type for the request
448
+ :return: Returns the result object.
449
+ If the method is called asynchronously,
450
+ returns the request thread.
451
+ :rtype: tuple(StagingRuleSet, status_code(int), headers(HTTPHeaderDict))
452
+ """
453
+
454
+ _params = locals()
455
+
456
+ _all_params = [
457
+ 'entity_type',
458
+ 'as_at'
459
+ ]
460
+ _all_params.extend(
461
+ [
462
+ 'async_req',
463
+ '_return_http_data_only',
464
+ '_preload_content',
465
+ '_request_timeout',
466
+ '_request_auth',
467
+ '_content_type',
468
+ '_headers'
469
+ ]
470
+ )
471
+
472
+ # validate the arguments
473
+ for _key, _val in _params['kwargs'].items():
474
+ if _key not in _all_params:
475
+ raise ApiTypeError(
476
+ "Got an unexpected keyword argument '%s'"
477
+ " to method get_staging_rule_set" % _key
478
+ )
479
+ _params[_key] = _val
480
+ del _params['kwargs']
481
+
482
+ _collection_formats = {}
483
+
484
+ # process the path parameters
485
+ _path_params = {}
486
+ if _params['entity_type']:
487
+ _path_params['entityType'] = _params['entity_type']
488
+
489
+
490
+ # process the query parameters
491
+ _query_params = []
492
+ if _params.get('as_at') is not None: # noqa: E501
493
+ if isinstance(_params['as_at'], datetime):
494
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
495
+ else:
496
+ _query_params.append(('asAt', _params['as_at']))
497
+
498
+ # process the header parameters
499
+ _header_params = dict(_params.get('_headers', {}))
500
+ # process the form parameters
501
+ _form_params = []
502
+ _files = {}
503
+ # process the body parameter
504
+ _body_params = None
505
+ # set the HTTP header `Accept`
506
+ _header_params['Accept'] = self.api_client.select_header_accept(
507
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
508
+
509
+ # authentication setting
510
+ _auth_settings = ['oauth2'] # noqa: E501
511
+
512
+ _response_types_map = {
513
+ '200': "StagingRuleSet",
514
+ '400': "LusidValidationProblemDetails",
515
+ }
516
+
517
+ return self.api_client.call_api(
518
+ '/api/stagingrulesets/{entityType}', 'GET',
519
+ _path_params,
520
+ _query_params,
521
+ _header_params,
522
+ body=_body_params,
523
+ post_params=_form_params,
524
+ files=_files,
525
+ response_types_map=_response_types_map,
526
+ auth_settings=_auth_settings,
527
+ async_req=_params.get('async_req'),
528
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
529
+ _preload_content=_params.get('_preload_content', True),
530
+ _request_timeout=_params.get('_request_timeout'),
531
+ collection_formats=_collection_formats,
532
+ _request_auth=_params.get('_request_auth'))
533
+
534
+ @overload
535
+ async def list_staging_rule_sets(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.")] = None, **kwargs) -> PagedResourceListOfStagingRuleSet: # noqa: E501
536
+ ...
537
+
538
+ @overload
539
+ def list_staging_rule_sets(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.")] = None, async_req: Optional[bool]=True, **kwargs) -> PagedResourceListOfStagingRuleSet: # noqa: E501
540
+ ...
541
+
542
+ @validate_arguments
543
+ def list_staging_rule_sets(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PagedResourceListOfStagingRuleSet, Awaitable[PagedResourceListOfStagingRuleSet]]: # noqa: E501
544
+ """[EXPERIMENTAL] ListStagingRuleSets: List StagingRuleSets # noqa: E501
545
+
546
+ List all the staging rule sets matching particular criteria. # noqa: E501
547
+ This method makes a synchronous HTTP request by default. To make an
548
+ asynchronous HTTP request, please pass async_req=True
549
+
550
+ >>> thread = api.list_staging_rule_sets(as_at, page, sort_by, limit, filter, async_req=True)
551
+ >>> result = thread.get()
552
+
553
+ :param as_at: The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.
554
+ :type as_at: datetime
555
+ :param page: The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.
556
+ :type page: str
557
+ :param sort_by: A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"
558
+ :type sort_by: List[str]
559
+ :param limit: When paginating, limit the number of returned results to this many.
560
+ :type limit: int
561
+ :param filter: Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.
562
+ :type filter: str
563
+ :param async_req: Whether to execute the request asynchronously.
564
+ :type async_req: bool, optional
565
+ :param _request_timeout: timeout setting for this request.
566
+ If one number provided, it will be total request
567
+ timeout. It can also be a pair (tuple) of
568
+ (connection, read) timeouts.
569
+ :return: Returns the result object.
570
+ If the method is called asynchronously,
571
+ returns the request thread.
572
+ :rtype: PagedResourceListOfStagingRuleSet
573
+ """
574
+ kwargs['_return_http_data_only'] = True
575
+ if '_preload_content' in kwargs:
576
+ message = "Error! Please call the list_staging_rule_sets_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
577
+ raise ValueError(message)
578
+ if async_req is not None:
579
+ kwargs['async_req'] = async_req
580
+ return self.list_staging_rule_sets_with_http_info(as_at, page, sort_by, limit, filter, **kwargs) # noqa: E501
581
+
582
+ @validate_arguments
583
+ def list_staging_rule_sets_with_http_info(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.")] = None, **kwargs) -> ApiResponse: # noqa: E501
584
+ """[EXPERIMENTAL] ListStagingRuleSets: List StagingRuleSets # noqa: E501
585
+
586
+ List all the staging rule sets matching particular criteria. # noqa: E501
587
+ This method makes a synchronous HTTP request by default. To make an
588
+ asynchronous HTTP request, please pass async_req=True
589
+
590
+ >>> thread = api.list_staging_rule_sets_with_http_info(as_at, page, sort_by, limit, filter, async_req=True)
591
+ >>> result = thread.get()
592
+
593
+ :param as_at: The asAt datetime at which to retrieve the staging rule sets. Defaults to return the latest version of the staging rule sets if not specified.
594
+ :type as_at: datetime
595
+ :param page: The pagination token to use to continue listing staging rule sets from a previous call to list staging rule sets. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.
596
+ :type page: str
597
+ :param sort_by: A list of field names to sort by, each suffixed by \" ASC\" or \" DESC\"
598
+ :type sort_by: List[str]
599
+ :param limit: When paginating, limit the number of returned results to this many.
600
+ :type limit: int
601
+ :param filter: Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.
602
+ :type filter: str
603
+ :param async_req: Whether to execute the request asynchronously.
604
+ :type async_req: bool, optional
605
+ :param _preload_content: if False, the ApiResponse.data will
606
+ be set to none and raw_data will store the
607
+ HTTP response body without reading/decoding.
608
+ Default is True.
609
+ :type _preload_content: bool, optional
610
+ :param _return_http_data_only: response data instead of ApiResponse
611
+ object with status code, headers, etc
612
+ :type _return_http_data_only: bool, optional
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :param _request_auth: set to override the auth_settings for an a single
618
+ request; this effectively ignores the authentication
619
+ in the spec for a single request.
620
+ :type _request_auth: dict, optional
621
+ :type _content_type: string, optional: force content-type for the request
622
+ :return: Returns the result object.
623
+ If the method is called asynchronously,
624
+ returns the request thread.
625
+ :rtype: tuple(PagedResourceListOfStagingRuleSet, status_code(int), headers(HTTPHeaderDict))
626
+ """
627
+
628
+ _params = locals()
629
+
630
+ _all_params = [
631
+ 'as_at',
632
+ 'page',
633
+ 'sort_by',
634
+ 'limit',
635
+ 'filter'
636
+ ]
637
+ _all_params.extend(
638
+ [
639
+ 'async_req',
640
+ '_return_http_data_only',
641
+ '_preload_content',
642
+ '_request_timeout',
643
+ '_request_auth',
644
+ '_content_type',
645
+ '_headers'
646
+ ]
647
+ )
648
+
649
+ # validate the arguments
650
+ for _key, _val in _params['kwargs'].items():
651
+ if _key not in _all_params:
652
+ raise ApiTypeError(
653
+ "Got an unexpected keyword argument '%s'"
654
+ " to method list_staging_rule_sets" % _key
655
+ )
656
+ _params[_key] = _val
657
+ del _params['kwargs']
658
+
659
+ _collection_formats = {}
660
+
661
+ # process the path parameters
662
+ _path_params = {}
663
+
664
+ # process the query parameters
665
+ _query_params = []
666
+ if _params.get('as_at') is not None: # noqa: E501
667
+ if isinstance(_params['as_at'], datetime):
668
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
669
+ else:
670
+ _query_params.append(('asAt', _params['as_at']))
671
+
672
+ if _params.get('page') is not None: # noqa: E501
673
+ _query_params.append(('page', _params['page']))
674
+
675
+ if _params.get('sort_by') is not None: # noqa: E501
676
+ _query_params.append(('sortBy', _params['sort_by']))
677
+ _collection_formats['sortBy'] = 'multi'
678
+
679
+ if _params.get('limit') is not None: # noqa: E501
680
+ _query_params.append(('limit', _params['limit']))
681
+
682
+ if _params.get('filter') is not None: # noqa: E501
683
+ _query_params.append(('filter', _params['filter']))
684
+
685
+ # process the header parameters
686
+ _header_params = dict(_params.get('_headers', {}))
687
+ # process the form parameters
688
+ _form_params = []
689
+ _files = {}
690
+ # process the body parameter
691
+ _body_params = None
692
+ # set the HTTP header `Accept`
693
+ _header_params['Accept'] = self.api_client.select_header_accept(
694
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
695
+
696
+ # authentication setting
697
+ _auth_settings = ['oauth2'] # noqa: E501
698
+
699
+ _response_types_map = {
700
+ '200': "PagedResourceListOfStagingRuleSet",
701
+ '400': "LusidValidationProblemDetails",
702
+ }
703
+
704
+ return self.api_client.call_api(
705
+ '/api/stagingrulesets', 'GET',
706
+ _path_params,
707
+ _query_params,
708
+ _header_params,
709
+ body=_body_params,
710
+ post_params=_form_params,
711
+ files=_files,
712
+ response_types_map=_response_types_map,
713
+ auth_settings=_auth_settings,
714
+ async_req=_params.get('async_req'),
715
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
716
+ _preload_content=_params.get('_preload_content', True),
717
+ _request_timeout=_params.get('_request_timeout'),
718
+ collection_formats=_collection_formats,
719
+ _request_auth=_params.get('_request_auth'))
720
+
721
+ @overload
722
+ async def update_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to update the staging rule set.")], update_staging_rule_set_request : Annotated[UpdateStagingRuleSetRequest, Field(..., description="Request to update a staging rule set.")], **kwargs) -> StagingRuleSet: # noqa: E501
723
+ ...
724
+
725
+ @overload
726
+ def update_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to update the staging rule set.")], update_staging_rule_set_request : Annotated[UpdateStagingRuleSetRequest, Field(..., description="Request to update a staging rule set.")], async_req: Optional[bool]=True, **kwargs) -> StagingRuleSet: # noqa: E501
727
+ ...
728
+
729
+ @validate_arguments
730
+ def update_staging_rule_set(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to update the staging rule set.")], update_staging_rule_set_request : Annotated[UpdateStagingRuleSetRequest, Field(..., description="Request to update a staging rule set.")], async_req: Optional[bool]=None, **kwargs) -> Union[StagingRuleSet, Awaitable[StagingRuleSet]]: # noqa: E501
731
+ """[EXPERIMENTAL] UpdateStagingRuleSet: Update a StagingRuleSet # noqa: E501
732
+
733
+ Update an existing staging rule set. # noqa: E501
734
+ This method makes a synchronous HTTP request by default. To make an
735
+ asynchronous HTTP request, please pass async_req=True
736
+
737
+ >>> thread = api.update_staging_rule_set(entity_type, update_staging_rule_set_request, async_req=True)
738
+ >>> result = thread.get()
739
+
740
+ :param entity_type: The entity type for which to update the staging rule set. (required)
741
+ :type entity_type: str
742
+ :param update_staging_rule_set_request: Request to update a staging rule set. (required)
743
+ :type update_staging_rule_set_request: UpdateStagingRuleSetRequest
744
+ :param async_req: Whether to execute the request asynchronously.
745
+ :type async_req: bool, optional
746
+ :param _request_timeout: timeout setting for this request.
747
+ If one number provided, it will be total request
748
+ timeout. It can also be a pair (tuple) of
749
+ (connection, read) timeouts.
750
+ :return: Returns the result object.
751
+ If the method is called asynchronously,
752
+ returns the request thread.
753
+ :rtype: StagingRuleSet
754
+ """
755
+ kwargs['_return_http_data_only'] = True
756
+ if '_preload_content' in kwargs:
757
+ message = "Error! Please call the update_staging_rule_set_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
758
+ raise ValueError(message)
759
+ if async_req is not None:
760
+ kwargs['async_req'] = async_req
761
+ return self.update_staging_rule_set_with_http_info(entity_type, update_staging_rule_set_request, **kwargs) # noqa: E501
762
+
763
+ @validate_arguments
764
+ def update_staging_rule_set_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The entity type for which to update the staging rule set.")], update_staging_rule_set_request : Annotated[UpdateStagingRuleSetRequest, Field(..., description="Request to update a staging rule set.")], **kwargs) -> ApiResponse: # noqa: E501
765
+ """[EXPERIMENTAL] UpdateStagingRuleSet: Update a StagingRuleSet # noqa: E501
766
+
767
+ Update an existing staging rule set. # noqa: E501
768
+ This method makes a synchronous HTTP request by default. To make an
769
+ asynchronous HTTP request, please pass async_req=True
770
+
771
+ >>> thread = api.update_staging_rule_set_with_http_info(entity_type, update_staging_rule_set_request, async_req=True)
772
+ >>> result = thread.get()
773
+
774
+ :param entity_type: The entity type for which to update the staging rule set. (required)
775
+ :type entity_type: str
776
+ :param update_staging_rule_set_request: Request to update a staging rule set. (required)
777
+ :type update_staging_rule_set_request: UpdateStagingRuleSetRequest
778
+ :param async_req: Whether to execute the request asynchronously.
779
+ :type async_req: bool, optional
780
+ :param _preload_content: if False, the ApiResponse.data will
781
+ be set to none and raw_data will store the
782
+ HTTP response body without reading/decoding.
783
+ Default is True.
784
+ :type _preload_content: bool, optional
785
+ :param _return_http_data_only: response data instead of ApiResponse
786
+ object with status code, headers, etc
787
+ :type _return_http_data_only: bool, optional
788
+ :param _request_timeout: timeout setting for this request. If one
789
+ number provided, it will be total request
790
+ timeout. It can also be a pair (tuple) of
791
+ (connection, read) timeouts.
792
+ :param _request_auth: set to override the auth_settings for an a single
793
+ request; this effectively ignores the authentication
794
+ in the spec for a single request.
795
+ :type _request_auth: dict, optional
796
+ :type _content_type: string, optional: force content-type for the request
797
+ :return: Returns the result object.
798
+ If the method is called asynchronously,
799
+ returns the request thread.
800
+ :rtype: tuple(StagingRuleSet, status_code(int), headers(HTTPHeaderDict))
801
+ """
802
+
803
+ _params = locals()
804
+
805
+ _all_params = [
806
+ 'entity_type',
807
+ 'update_staging_rule_set_request'
808
+ ]
809
+ _all_params.extend(
810
+ [
811
+ 'async_req',
812
+ '_return_http_data_only',
813
+ '_preload_content',
814
+ '_request_timeout',
815
+ '_request_auth',
816
+ '_content_type',
817
+ '_headers'
818
+ ]
819
+ )
820
+
821
+ # validate the arguments
822
+ for _key, _val in _params['kwargs'].items():
823
+ if _key not in _all_params:
824
+ raise ApiTypeError(
825
+ "Got an unexpected keyword argument '%s'"
826
+ " to method update_staging_rule_set" % _key
827
+ )
828
+ _params[_key] = _val
829
+ del _params['kwargs']
830
+
831
+ _collection_formats = {}
832
+
833
+ # process the path parameters
834
+ _path_params = {}
835
+ if _params['entity_type']:
836
+ _path_params['entityType'] = _params['entity_type']
837
+
838
+
839
+ # process the query parameters
840
+ _query_params = []
841
+ # process the header parameters
842
+ _header_params = dict(_params.get('_headers', {}))
843
+ # process the form parameters
844
+ _form_params = []
845
+ _files = {}
846
+ # process the body parameter
847
+ _body_params = None
848
+ if _params['update_staging_rule_set_request'] is not None:
849
+ _body_params = _params['update_staging_rule_set_request']
850
+
851
+ # set the HTTP header `Accept`
852
+ _header_params['Accept'] = self.api_client.select_header_accept(
853
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
854
+
855
+ # set the HTTP header `Content-Type`
856
+ _content_types_list = _params.get('_content_type',
857
+ self.api_client.select_header_content_type(
858
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
859
+ if _content_types_list:
860
+ _header_params['Content-Type'] = _content_types_list
861
+
862
+ # authentication setting
863
+ _auth_settings = ['oauth2'] # noqa: E501
864
+
865
+ _response_types_map = {
866
+ '200': "StagingRuleSet",
867
+ '400': "LusidValidationProblemDetails",
868
+ }
869
+
870
+ return self.api_client.call_api(
871
+ '/api/stagingrulesets/{entityType}', 'PUT',
872
+ _path_params,
873
+ _query_params,
874
+ _header_params,
875
+ body=_body_params,
876
+ post_params=_form_params,
877
+ files=_files,
878
+ response_types_map=_response_types_map,
879
+ auth_settings=_auth_settings,
880
+ async_req=_params.get('async_req'),
881
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
882
+ _preload_content=_params.get('_preload_content', True),
883
+ _request_timeout=_params.get('_request_timeout'),
884
+ collection_formats=_collection_formats,
885
+ _request_auth=_params.get('_request_auth'))