lusid-sdk 2.1.110__py3-none-any.whl → 2.1.137__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.

Files changed (57) hide show
  1. lusid/__init__.py +58 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/amortisation_rule_sets_api.py +175 -0
  4. lusid/api/compliance_api.py +502 -0
  5. lusid/api/fee_types_api.py +909 -0
  6. lusid/api/funds_api.py +1148 -198
  7. lusid/api/instrument_events_api.py +189 -0
  8. lusid/api/portfolio_groups_api.py +16 -8
  9. lusid/api/portfolios_api.py +212 -0
  10. lusid/api/transaction_portfolios_api.py +32 -16
  11. lusid/configuration.py +1 -1
  12. lusid/models/__init__.py +56 -0
  13. lusid/models/amortisation_rule_set.py +7 -11
  14. lusid/models/applicable_instrument_event.py +106 -0
  15. lusid/models/branch_step_request.py +91 -0
  16. lusid/models/check_step_request.py +91 -0
  17. lusid/models/compliance_rule_template.py +153 -0
  18. lusid/models/compliance_step_request.py +98 -0
  19. lusid/models/compliance_step_type_request.py +41 -0
  20. lusid/models/compliance_template_variation_dto.py +112 -0
  21. lusid/models/compliance_template_variation_request.py +112 -0
  22. lusid/models/create_compliance_template_request.py +95 -0
  23. lusid/models/create_derived_property_definition_request.py +3 -3
  24. lusid/models/create_property_definition_request.py +3 -3
  25. lusid/models/diary_entry_request.py +1 -1
  26. lusid/models/fee.py +217 -0
  27. lusid/models/fee_accrual.py +83 -0
  28. lusid/models/fee_request.py +163 -0
  29. lusid/models/fee_type.py +115 -0
  30. lusid/models/fee_type_request.py +105 -0
  31. lusid/models/filter_step_request.py +91 -0
  32. lusid/models/flow_conventions.py +1 -1
  33. lusid/models/group_by_step_request.py +91 -0
  34. lusid/models/group_filter_step_request.py +91 -0
  35. lusid/models/intermediate_compliance_step_request.py +91 -0
  36. lusid/models/operation.py +2 -2
  37. lusid/models/paged_resource_list_of_fee.py +113 -0
  38. lusid/models/paged_resource_list_of_fee_type.py +113 -0
  39. lusid/models/paged_resource_list_of_instrument_event_instruction.py +113 -0
  40. lusid/models/portfolio_entity_id.py +2 -18
  41. lusid/models/portfolio_holding.py +19 -4
  42. lusid/models/property_definition.py +3 -3
  43. lusid/models/property_definition_search_result.py +3 -3
  44. lusid/models/property_domain.py +1 -0
  45. lusid/models/query_applicable_instrument_events_request.py +89 -0
  46. lusid/models/quote_access_metadata_rule_id.py +1 -1
  47. lusid/models/quote_series_id.py +1 -1
  48. lusid/models/resource_list_of_applicable_instrument_event.py +113 -0
  49. lusid/models/rules_interval.py +83 -0
  50. lusid/models/set_amortisation_rules_request.py +73 -0
  51. lusid/models/settlement_schedule.py +78 -0
  52. lusid/models/update_compliance_template_request.py +95 -0
  53. lusid/models/update_fee_type_request.py +96 -0
  54. lusid/models/valuation_point_data_response.py +15 -2
  55. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.137.dist-info}/METADATA +48 -4
  56. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.137.dist-info}/RECORD +57 -28
  57. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.137.dist-info}/WHEEL +0 -0
@@ -28,13 +28,16 @@ from typing import Optional
28
28
 
29
29
  from lusid.models.compliance_rule_response import ComplianceRuleResponse
30
30
  from lusid.models.compliance_rule_result_v2 import ComplianceRuleResultV2
31
+ from lusid.models.compliance_rule_template import ComplianceRuleTemplate
31
32
  from lusid.models.compliance_run_info_v2 import ComplianceRunInfoV2
32
33
  from lusid.models.compliance_template import ComplianceTemplate
34
+ from lusid.models.create_compliance_template_request import CreateComplianceTemplateRequest
33
35
  from lusid.models.decorated_compliance_run_summary import DecoratedComplianceRunSummary
34
36
  from lusid.models.deleted_entity_response import DeletedEntityResponse
35
37
  from lusid.models.paged_resource_list_of_compliance_rule_response import PagedResourceListOfComplianceRuleResponse
36
38
  from lusid.models.paged_resource_list_of_compliance_run_info_v2 import PagedResourceListOfComplianceRunInfoV2
37
39
  from lusid.models.paged_resource_list_of_compliance_template import PagedResourceListOfComplianceTemplate
40
+ from lusid.models.update_compliance_template_request import UpdateComplianceTemplateRequest
38
41
  from lusid.models.upsert_compliance_rule_request import UpsertComplianceRuleRequest
39
42
  from lusid.models.upsert_compliance_run_summary_request import UpsertComplianceRunSummaryRequest
40
43
  from lusid.models.upsert_compliance_run_summary_result import UpsertComplianceRunSummaryResult
@@ -59,6 +62,172 @@ class ComplianceApi:
59
62
  api_client = ApiClient.get_default()
60
63
  self.api_client = api_client
61
64
 
65
+ @overload
66
+ async def create_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], create_compliance_template_request : Annotated[CreateComplianceTemplateRequest, Field(..., description="Request to create a compliance rule template.")], **kwargs) -> ComplianceRuleTemplate: # noqa: E501
67
+ ...
68
+
69
+ @overload
70
+ def create_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], create_compliance_template_request : Annotated[CreateComplianceTemplateRequest, Field(..., description="Request to create a compliance rule template.")], async_req: Optional[bool]=True, **kwargs) -> ComplianceRuleTemplate: # noqa: E501
71
+ ...
72
+
73
+ @validate_arguments
74
+ def create_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], create_compliance_template_request : Annotated[CreateComplianceTemplateRequest, Field(..., description="Request to create a compliance rule template.")], async_req: Optional[bool]=None, **kwargs) -> Union[ComplianceRuleTemplate, Awaitable[ComplianceRuleTemplate]]: # noqa: E501
75
+ """[EARLY ACCESS] CreateComplianceTemplate: Create a Compliance Rule Template # noqa: E501
76
+
77
+ Use this endpoint to create a compliance template. # noqa: E501
78
+ This method makes a synchronous HTTP request by default. To make an
79
+ asynchronous HTTP request, please pass async_req=True
80
+
81
+ >>> thread = api.create_compliance_template(scope, create_compliance_template_request, async_req=True)
82
+ >>> result = thread.get()
83
+
84
+ :param scope: The scope of the Compliance Rule Template. (required)
85
+ :type scope: str
86
+ :param create_compliance_template_request: Request to create a compliance rule template. (required)
87
+ :type create_compliance_template_request: CreateComplianceTemplateRequest
88
+ :param async_req: Whether to execute the request asynchronously.
89
+ :type async_req: bool, optional
90
+ :param _request_timeout: timeout setting for this request.
91
+ If one number provided, it will be total request
92
+ timeout. It can also be a pair (tuple) of
93
+ (connection, read) timeouts.
94
+ :return: Returns the result object.
95
+ If the method is called asynchronously,
96
+ returns the request thread.
97
+ :rtype: ComplianceRuleTemplate
98
+ """
99
+ kwargs['_return_http_data_only'] = True
100
+ if '_preload_content' in kwargs:
101
+ message = "Error! Please call the create_compliance_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
102
+ raise ValueError(message)
103
+ if async_req is not None:
104
+ kwargs['async_req'] = async_req
105
+ return self.create_compliance_template_with_http_info(scope, create_compliance_template_request, **kwargs) # noqa: E501
106
+
107
+ @validate_arguments
108
+ def create_compliance_template_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], create_compliance_template_request : Annotated[CreateComplianceTemplateRequest, Field(..., description="Request to create a compliance rule template.")], **kwargs) -> ApiResponse: # noqa: E501
109
+ """[EARLY ACCESS] CreateComplianceTemplate: Create a Compliance Rule Template # noqa: E501
110
+
111
+ Use this endpoint to create a compliance template. # noqa: E501
112
+ This method makes a synchronous HTTP request by default. To make an
113
+ asynchronous HTTP request, please pass async_req=True
114
+
115
+ >>> thread = api.create_compliance_template_with_http_info(scope, create_compliance_template_request, async_req=True)
116
+ >>> result = thread.get()
117
+
118
+ :param scope: The scope of the Compliance Rule Template. (required)
119
+ :type scope: str
120
+ :param create_compliance_template_request: Request to create a compliance rule template. (required)
121
+ :type create_compliance_template_request: CreateComplianceTemplateRequest
122
+ :param async_req: Whether to execute the request asynchronously.
123
+ :type async_req: bool, optional
124
+ :param _preload_content: if False, the ApiResponse.data will
125
+ be set to none and raw_data will store the
126
+ HTTP response body without reading/decoding.
127
+ Default is True.
128
+ :type _preload_content: bool, optional
129
+ :param _return_http_data_only: response data instead of ApiResponse
130
+ object with status code, headers, etc
131
+ :type _return_http_data_only: bool, optional
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the authentication
138
+ in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :type _content_type: string, optional: force content-type for the request
141
+ :return: Returns the result object.
142
+ If the method is called asynchronously,
143
+ returns the request thread.
144
+ :rtype: tuple(ComplianceRuleTemplate, status_code(int), headers(HTTPHeaderDict))
145
+ """
146
+
147
+ _params = locals()
148
+
149
+ _all_params = [
150
+ 'scope',
151
+ 'create_compliance_template_request'
152
+ ]
153
+ _all_params.extend(
154
+ [
155
+ 'async_req',
156
+ '_return_http_data_only',
157
+ '_preload_content',
158
+ '_request_timeout',
159
+ '_request_auth',
160
+ '_content_type',
161
+ '_headers'
162
+ ]
163
+ )
164
+
165
+ # validate the arguments
166
+ for _key, _val in _params['kwargs'].items():
167
+ if _key not in _all_params:
168
+ raise ApiTypeError(
169
+ "Got an unexpected keyword argument '%s'"
170
+ " to method create_compliance_template" % _key
171
+ )
172
+ _params[_key] = _val
173
+ del _params['kwargs']
174
+
175
+ _collection_formats = {}
176
+
177
+ # process the path parameters
178
+ _path_params = {}
179
+ if _params['scope']:
180
+ _path_params['scope'] = _params['scope']
181
+
182
+
183
+ # process the query parameters
184
+ _query_params = []
185
+ # process the header parameters
186
+ _header_params = dict(_params.get('_headers', {}))
187
+ # process the form parameters
188
+ _form_params = []
189
+ _files = {}
190
+ # process the body parameter
191
+ _body_params = None
192
+ if _params['create_compliance_template_request'] is not None:
193
+ _body_params = _params['create_compliance_template_request']
194
+
195
+ # set the HTTP header `Accept`
196
+ _header_params['Accept'] = self.api_client.select_header_accept(
197
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
198
+
199
+ # set the HTTP header `Content-Type`
200
+ _content_types_list = _params.get('_content_type',
201
+ self.api_client.select_header_content_type(
202
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
203
+ if _content_types_list:
204
+ _header_params['Content-Type'] = _content_types_list
205
+
206
+ # authentication setting
207
+ _auth_settings = ['oauth2'] # noqa: E501
208
+
209
+ _response_types_map = {
210
+ '201': "ComplianceRuleTemplate",
211
+ '400': "LusidValidationProblemDetails",
212
+ }
213
+
214
+ return self.api_client.call_api(
215
+ '/api/compliance/templates/{scope}', 'POST',
216
+ _path_params,
217
+ _query_params,
218
+ _header_params,
219
+ body=_body_params,
220
+ post_params=_form_params,
221
+ files=_files,
222
+ response_types_map=_response_types_map,
223
+ auth_settings=_auth_settings,
224
+ async_req=_params.get('async_req'),
225
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
226
+ _preload_content=_params.get('_preload_content', True),
227
+ _request_timeout=_params.get('_request_timeout'),
228
+ collection_formats=_collection_formats,
229
+ _request_auth=_params.get('_request_auth'))
230
+
62
231
  @overload
63
232
  async def delete_compliance_rule(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The compliance rule's scope.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The compliance rule's code.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
64
233
  ...
@@ -218,6 +387,165 @@ class ComplianceApi:
218
387
  collection_formats=_collection_formats,
219
388
  _request_auth=_params.get('_request_auth'))
220
389
 
390
+ @overload
391
+ async def delete_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the template to be deleted.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the template to be deleted.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
392
+ ...
393
+
394
+ @overload
395
+ def delete_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the template to be deleted.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the template to be deleted.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501
396
+ ...
397
+
398
+ @validate_arguments
399
+ def delete_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the template to be deleted.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the template to be deleted.")], async_req: Optional[bool]=None, **kwargs) -> Union[DeletedEntityResponse, Awaitable[DeletedEntityResponse]]: # noqa: E501
400
+ """[EARLY ACCESS] DeleteComplianceTemplate: Delete a ComplianceRuleTemplate # noqa: E501
401
+
402
+ Delete the compliance rule template uniquely defined by the scope and code. # noqa: E501
403
+ This method makes a synchronous HTTP request by default. To make an
404
+ asynchronous HTTP request, please pass async_req=True
405
+
406
+ >>> thread = api.delete_compliance_template(scope, code, async_req=True)
407
+ >>> result = thread.get()
408
+
409
+ :param scope: The scope of the template to be deleted. (required)
410
+ :type scope: str
411
+ :param code: The code of the template to be deleted. (required)
412
+ :type code: str
413
+ :param async_req: Whether to execute the request asynchronously.
414
+ :type async_req: bool, optional
415
+ :param _request_timeout: timeout setting for this request.
416
+ If one number provided, it will be total request
417
+ timeout. It can also be a pair (tuple) of
418
+ (connection, read) timeouts.
419
+ :return: Returns the result object.
420
+ If the method is called asynchronously,
421
+ returns the request thread.
422
+ :rtype: DeletedEntityResponse
423
+ """
424
+ kwargs['_return_http_data_only'] = True
425
+ if '_preload_content' in kwargs:
426
+ message = "Error! Please call the delete_compliance_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
427
+ raise ValueError(message)
428
+ if async_req is not None:
429
+ kwargs['async_req'] = async_req
430
+ return self.delete_compliance_template_with_http_info(scope, code, **kwargs) # noqa: E501
431
+
432
+ @validate_arguments
433
+ def delete_compliance_template_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the template to be deleted.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the template to be deleted.")], **kwargs) -> ApiResponse: # noqa: E501
434
+ """[EARLY ACCESS] DeleteComplianceTemplate: Delete a ComplianceRuleTemplate # noqa: E501
435
+
436
+ Delete the compliance rule template uniquely defined by the scope and code. # noqa: E501
437
+ This method makes a synchronous HTTP request by default. To make an
438
+ asynchronous HTTP request, please pass async_req=True
439
+
440
+ >>> thread = api.delete_compliance_template_with_http_info(scope, code, async_req=True)
441
+ >>> result = thread.get()
442
+
443
+ :param scope: The scope of the template to be deleted. (required)
444
+ :type scope: str
445
+ :param code: The code of the template to be deleted. (required)
446
+ :type code: str
447
+ :param async_req: Whether to execute the request asynchronously.
448
+ :type async_req: bool, optional
449
+ :param _preload_content: if False, the ApiResponse.data will
450
+ be set to none and raw_data will store the
451
+ HTTP response body without reading/decoding.
452
+ Default is True.
453
+ :type _preload_content: bool, optional
454
+ :param _return_http_data_only: response data instead of ApiResponse
455
+ object with status code, headers, etc
456
+ :type _return_http_data_only: bool, optional
457
+ :param _request_timeout: timeout setting for this request. If one
458
+ number provided, it will be total request
459
+ timeout. It can also be a pair (tuple) of
460
+ (connection, read) timeouts.
461
+ :param _request_auth: set to override the auth_settings for an a single
462
+ request; this effectively ignores the authentication
463
+ in the spec for a single request.
464
+ :type _request_auth: dict, optional
465
+ :type _content_type: string, optional: force content-type for the request
466
+ :return: Returns the result object.
467
+ If the method is called asynchronously,
468
+ returns the request thread.
469
+ :rtype: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
470
+ """
471
+
472
+ _params = locals()
473
+
474
+ _all_params = [
475
+ 'scope',
476
+ 'code'
477
+ ]
478
+ _all_params.extend(
479
+ [
480
+ 'async_req',
481
+ '_return_http_data_only',
482
+ '_preload_content',
483
+ '_request_timeout',
484
+ '_request_auth',
485
+ '_content_type',
486
+ '_headers'
487
+ ]
488
+ )
489
+
490
+ # validate the arguments
491
+ for _key, _val in _params['kwargs'].items():
492
+ if _key not in _all_params:
493
+ raise ApiTypeError(
494
+ "Got an unexpected keyword argument '%s'"
495
+ " to method delete_compliance_template" % _key
496
+ )
497
+ _params[_key] = _val
498
+ del _params['kwargs']
499
+
500
+ _collection_formats = {}
501
+
502
+ # process the path parameters
503
+ _path_params = {}
504
+ if _params['scope']:
505
+ _path_params['scope'] = _params['scope']
506
+
507
+ if _params['code']:
508
+ _path_params['code'] = _params['code']
509
+
510
+
511
+ # process the query parameters
512
+ _query_params = []
513
+ # process the header parameters
514
+ _header_params = dict(_params.get('_headers', {}))
515
+ # process the form parameters
516
+ _form_params = []
517
+ _files = {}
518
+ # process the body parameter
519
+ _body_params = None
520
+ # set the HTTP header `Accept`
521
+ _header_params['Accept'] = self.api_client.select_header_accept(
522
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
523
+
524
+ # authentication setting
525
+ _auth_settings = ['oauth2'] # noqa: E501
526
+
527
+ _response_types_map = {
528
+ '200': "DeletedEntityResponse",
529
+ '400': "LusidValidationProblemDetails",
530
+ }
531
+
532
+ return self.api_client.call_api(
533
+ '/api/compliance/templates/{scope}/{code}', 'DELETE',
534
+ _path_params,
535
+ _query_params,
536
+ _header_params,
537
+ body=_body_params,
538
+ post_params=_form_params,
539
+ files=_files,
540
+ response_types_map=_response_types_map,
541
+ auth_settings=_auth_settings,
542
+ async_req=_params.get('async_req'),
543
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
544
+ _preload_content=_params.get('_preload_content', True),
545
+ _request_timeout=_params.get('_request_timeout'),
546
+ collection_formats=_collection_formats,
547
+ _request_auth=_params.get('_request_auth'))
548
+
221
549
  @overload
222
550
  async def get_compliance_rule(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The compliance rule's scope.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The compliance rule's code.")], as_at : Annotated[Optional[datetime], Field(description="Optional. Asat time for query.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Compliance' domain to decorate onto the rule. These must take the format {domain}/{scope}/{code}, for example 'Compliance/live/UCITS'.")] = None, **kwargs) -> ComplianceRuleResponse: # noqa: E501
223
551
  ...
@@ -1636,6 +1964,180 @@ class ComplianceApi:
1636
1964
  collection_formats=_collection_formats,
1637
1965
  _request_auth=_params.get('_request_auth'))
1638
1966
 
1967
+ @overload
1968
+ async def update_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Compliance Rule Template.")], update_compliance_template_request : Annotated[UpdateComplianceTemplateRequest, Field(..., description="Request to update a compliance rule template.")], **kwargs) -> ComplianceRuleTemplate: # noqa: E501
1969
+ ...
1970
+
1971
+ @overload
1972
+ def update_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Compliance Rule Template.")], update_compliance_template_request : Annotated[UpdateComplianceTemplateRequest, Field(..., description="Request to update a compliance rule template.")], async_req: Optional[bool]=True, **kwargs) -> ComplianceRuleTemplate: # noqa: E501
1973
+ ...
1974
+
1975
+ @validate_arguments
1976
+ def update_compliance_template(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Compliance Rule Template.")], update_compliance_template_request : Annotated[UpdateComplianceTemplateRequest, Field(..., description="Request to update a compliance rule template.")], async_req: Optional[bool]=None, **kwargs) -> Union[ComplianceRuleTemplate, Awaitable[ComplianceRuleTemplate]]: # noqa: E501
1977
+ """[EARLY ACCESS] UpdateComplianceTemplate: Update a ComplianceRuleTemplate # noqa: E501
1978
+
1979
+ Use this endpoint to update a specified compliance template. # noqa: E501
1980
+ This method makes a synchronous HTTP request by default. To make an
1981
+ asynchronous HTTP request, please pass async_req=True
1982
+
1983
+ >>> thread = api.update_compliance_template(scope, code, update_compliance_template_request, async_req=True)
1984
+ >>> result = thread.get()
1985
+
1986
+ :param scope: The scope of the Compliance Rule Template. (required)
1987
+ :type scope: str
1988
+ :param code: The code of the Compliance Rule Template. (required)
1989
+ :type code: str
1990
+ :param update_compliance_template_request: Request to update a compliance rule template. (required)
1991
+ :type update_compliance_template_request: UpdateComplianceTemplateRequest
1992
+ :param async_req: Whether to execute the request asynchronously.
1993
+ :type async_req: bool, optional
1994
+ :param _request_timeout: timeout setting for this request.
1995
+ If one number provided, it will be total request
1996
+ timeout. It can also be a pair (tuple) of
1997
+ (connection, read) timeouts.
1998
+ :return: Returns the result object.
1999
+ If the method is called asynchronously,
2000
+ returns the request thread.
2001
+ :rtype: ComplianceRuleTemplate
2002
+ """
2003
+ kwargs['_return_http_data_only'] = True
2004
+ if '_preload_content' in kwargs:
2005
+ message = "Error! Please call the update_compliance_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
2006
+ raise ValueError(message)
2007
+ if async_req is not None:
2008
+ kwargs['async_req'] = async_req
2009
+ return self.update_compliance_template_with_http_info(scope, code, update_compliance_template_request, **kwargs) # noqa: E501
2010
+
2011
+ @validate_arguments
2012
+ def update_compliance_template_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Compliance Rule Template.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Compliance Rule Template.")], update_compliance_template_request : Annotated[UpdateComplianceTemplateRequest, Field(..., description="Request to update a compliance rule template.")], **kwargs) -> ApiResponse: # noqa: E501
2013
+ """[EARLY ACCESS] UpdateComplianceTemplate: Update a ComplianceRuleTemplate # noqa: E501
2014
+
2015
+ Use this endpoint to update a specified compliance template. # noqa: E501
2016
+ This method makes a synchronous HTTP request by default. To make an
2017
+ asynchronous HTTP request, please pass async_req=True
2018
+
2019
+ >>> thread = api.update_compliance_template_with_http_info(scope, code, update_compliance_template_request, async_req=True)
2020
+ >>> result = thread.get()
2021
+
2022
+ :param scope: The scope of the Compliance Rule Template. (required)
2023
+ :type scope: str
2024
+ :param code: The code of the Compliance Rule Template. (required)
2025
+ :type code: str
2026
+ :param update_compliance_template_request: Request to update a compliance rule template. (required)
2027
+ :type update_compliance_template_request: UpdateComplianceTemplateRequest
2028
+ :param async_req: Whether to execute the request asynchronously.
2029
+ :type async_req: bool, optional
2030
+ :param _preload_content: if False, the ApiResponse.data will
2031
+ be set to none and raw_data will store the
2032
+ HTTP response body without reading/decoding.
2033
+ Default is True.
2034
+ :type _preload_content: bool, optional
2035
+ :param _return_http_data_only: response data instead of ApiResponse
2036
+ object with status code, headers, etc
2037
+ :type _return_http_data_only: bool, optional
2038
+ :param _request_timeout: timeout setting for this request. If one
2039
+ number provided, it will be total request
2040
+ timeout. It can also be a pair (tuple) of
2041
+ (connection, read) timeouts.
2042
+ :param _request_auth: set to override the auth_settings for an a single
2043
+ request; this effectively ignores the authentication
2044
+ in the spec for a single request.
2045
+ :type _request_auth: dict, optional
2046
+ :type _content_type: string, optional: force content-type for the request
2047
+ :return: Returns the result object.
2048
+ If the method is called asynchronously,
2049
+ returns the request thread.
2050
+ :rtype: tuple(ComplianceRuleTemplate, status_code(int), headers(HTTPHeaderDict))
2051
+ """
2052
+
2053
+ _params = locals()
2054
+
2055
+ _all_params = [
2056
+ 'scope',
2057
+ 'code',
2058
+ 'update_compliance_template_request'
2059
+ ]
2060
+ _all_params.extend(
2061
+ [
2062
+ 'async_req',
2063
+ '_return_http_data_only',
2064
+ '_preload_content',
2065
+ '_request_timeout',
2066
+ '_request_auth',
2067
+ '_content_type',
2068
+ '_headers'
2069
+ ]
2070
+ )
2071
+
2072
+ # validate the arguments
2073
+ for _key, _val in _params['kwargs'].items():
2074
+ if _key not in _all_params:
2075
+ raise ApiTypeError(
2076
+ "Got an unexpected keyword argument '%s'"
2077
+ " to method update_compliance_template" % _key
2078
+ )
2079
+ _params[_key] = _val
2080
+ del _params['kwargs']
2081
+
2082
+ _collection_formats = {}
2083
+
2084
+ # process the path parameters
2085
+ _path_params = {}
2086
+ if _params['scope']:
2087
+ _path_params['scope'] = _params['scope']
2088
+
2089
+ if _params['code']:
2090
+ _path_params['code'] = _params['code']
2091
+
2092
+
2093
+ # process the query parameters
2094
+ _query_params = []
2095
+ # process the header parameters
2096
+ _header_params = dict(_params.get('_headers', {}))
2097
+ # process the form parameters
2098
+ _form_params = []
2099
+ _files = {}
2100
+ # process the body parameter
2101
+ _body_params = None
2102
+ if _params['update_compliance_template_request'] is not None:
2103
+ _body_params = _params['update_compliance_template_request']
2104
+
2105
+ # set the HTTP header `Accept`
2106
+ _header_params['Accept'] = self.api_client.select_header_accept(
2107
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
2108
+
2109
+ # set the HTTP header `Content-Type`
2110
+ _content_types_list = _params.get('_content_type',
2111
+ self.api_client.select_header_content_type(
2112
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
2113
+ if _content_types_list:
2114
+ _header_params['Content-Type'] = _content_types_list
2115
+
2116
+ # authentication setting
2117
+ _auth_settings = ['oauth2'] # noqa: E501
2118
+
2119
+ _response_types_map = {
2120
+ '200': "ComplianceRuleTemplate",
2121
+ '400': "LusidValidationProblemDetails",
2122
+ }
2123
+
2124
+ return self.api_client.call_api(
2125
+ '/api/compliance/templates/{scope}/{code}', 'PUT',
2126
+ _path_params,
2127
+ _query_params,
2128
+ _header_params,
2129
+ body=_body_params,
2130
+ post_params=_form_params,
2131
+ files=_files,
2132
+ response_types_map=_response_types_map,
2133
+ auth_settings=_auth_settings,
2134
+ async_req=_params.get('async_req'),
2135
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
2136
+ _preload_content=_params.get('_preload_content', True),
2137
+ _request_timeout=_params.get('_request_timeout'),
2138
+ collection_formats=_collection_formats,
2139
+ _request_auth=_params.get('_request_auth'))
2140
+
1639
2141
  @overload
1640
2142
  async def upsert_compliance_rule(self, upsert_compliance_rule_request : Optional[UpsertComplianceRuleRequest] = None, **kwargs) -> ComplianceRuleResponse: # noqa: E501
1641
2143
  ...