lusid-sdk 2.1.590__py3-none-any.whl → 2.1.637__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. lusid/__init__.py +42 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/chart_of_accounts_api.py +6 -6
  4. lusid/api/corporate_action_sources_api.py +6 -6
  5. lusid/api/entities_api.py +24 -24
  6. lusid/api/funds_api.py +438 -1
  7. lusid/api/order_management_api.py +16 -8
  8. lusid/api/staged_modifications_api.py +12 -12
  9. lusid/api/timelines_api.py +1094 -0
  10. lusid/api/transaction_portfolios_api.py +189 -6
  11. lusid/api/workspace_api.py +96 -48
  12. lusid/configuration.py +1 -1
  13. lusid/models/__init__.py +40 -0
  14. lusid/models/accounted_transaction.py +88 -0
  15. lusid/models/accumulation_event.py +3 -3
  16. lusid/models/adjust_global_commitment_event.py +93 -0
  17. lusid/models/amortisation_event.py +3 -3
  18. lusid/models/basket.py +3 -3
  19. lusid/models/bond.py +11 -5
  20. lusid/models/bond_coupon_event.py +3 -3
  21. lusid/models/bond_default_event.py +3 -3
  22. lusid/models/bond_principal_event.py +3 -3
  23. lusid/models/bonus_issue_event.py +3 -3
  24. lusid/models/call_on_intermediate_securities_event.py +3 -3
  25. lusid/models/cancel_single_holding_adjustment_request.py +96 -0
  26. lusid/models/cap_floor.py +22 -7
  27. lusid/models/capital_distribution_event.py +3 -3
  28. lusid/models/cash.py +3 -3
  29. lusid/models/cash_dividend_event.py +3 -3
  30. lusid/models/cash_flow_event.py +3 -3
  31. lusid/models/cash_perpetual.py +3 -3
  32. lusid/models/cds_credit_event.py +3 -3
  33. lusid/models/cds_index.py +3 -3
  34. lusid/models/cdx_credit_event.py +3 -3
  35. lusid/models/close_event.py +3 -3
  36. lusid/models/closed_period.py +128 -0
  37. lusid/models/complete_portfolio.py +3 -3
  38. lusid/models/complex_bond.py +20 -7
  39. lusid/models/contract_details.py +101 -0
  40. lusid/models/contract_for_difference.py +3 -3
  41. lusid/models/contract_initialisation_event.py +99 -0
  42. lusid/models/create_closed_period_request.py +96 -0
  43. lusid/models/create_derived_property_definition_request.py +8 -6
  44. lusid/models/create_derived_transaction_portfolio_request.py +8 -2
  45. lusid/models/create_property_definition_request.py +3 -3
  46. lusid/models/create_timeline_request.py +102 -0
  47. lusid/models/credit_default_swap.py +3 -3
  48. lusid/models/credit_premium_cash_flow_event.py +3 -3
  49. lusid/models/dependency_source_filter.py +19 -4
  50. lusid/models/dividend_option_event.py +3 -3
  51. lusid/models/dividend_reinvestment_event.py +3 -3
  52. lusid/models/drawdown_event.py +99 -0
  53. lusid/models/early_redemption_event.py +3 -3
  54. lusid/models/eligibility_calculation.py +6 -4
  55. lusid/models/equity.py +3 -3
  56. lusid/models/equity_option.py +29 -8
  57. lusid/models/equity_swap.py +3 -3
  58. lusid/models/exchange_traded_option.py +12 -6
  59. lusid/models/exercise_event.py +3 -3
  60. lusid/models/exotic_instrument.py +3 -3
  61. lusid/models/expiry_event.py +3 -3
  62. lusid/models/fee_accrual.py +3 -1
  63. lusid/models/fixed_leg.py +3 -3
  64. lusid/models/flexible_deposit.py +105 -0
  65. lusid/models/flexible_loan.py +3 -3
  66. lusid/models/floating_leg.py +3 -3
  67. lusid/models/forward_rate_agreement.py +3 -3
  68. lusid/models/fund_share_class.py +3 -3
  69. lusid/models/funding_leg.py +3 -3
  70. lusid/models/future.py +19 -7
  71. lusid/models/future_expiry_event.py +3 -3
  72. lusid/models/future_mark_to_market_event.py +100 -0
  73. lusid/models/fx_forward.py +3 -3
  74. lusid/models/fx_forward_settlement_event.py +3 -3
  75. lusid/models/fx_option.py +3 -3
  76. lusid/models/fx_swap.py +3 -3
  77. lusid/models/group_reconciliation_summary.py +2 -2
  78. lusid/models/inflation_leg.py +3 -3
  79. lusid/models/inflation_linked_bond.py +11 -5
  80. lusid/models/inflation_swap.py +3 -3
  81. lusid/models/informational_error_event.py +3 -3
  82. lusid/models/informational_event.py +3 -3
  83. lusid/models/instrument_event.py +10 -5
  84. lusid/models/instrument_event_instruction.py +9 -2
  85. lusid/models/instrument_event_instruction_request.py +10 -3
  86. lusid/models/instrument_event_type.py +5 -0
  87. lusid/models/instrument_leg.py +3 -3
  88. lusid/models/instrument_type.py +1 -0
  89. lusid/models/interest_rate_swap.py +3 -3
  90. lusid/models/interest_rate_swaption.py +4 -4
  91. lusid/models/intermediate_securities_distribution_event.py +3 -3
  92. lusid/models/loan_facility.py +3 -3
  93. lusid/models/loan_interest_repayment_event.py +97 -0
  94. lusid/models/lusid_instrument.py +6 -5
  95. lusid/models/mark_to_market_conventions.py +74 -0
  96. lusid/models/market_data_key_rule.py +1 -1
  97. lusid/models/market_data_specific_rule.py +1 -1
  98. lusid/models/mastered_instrument.py +3 -3
  99. lusid/models/maturity_event.py +3 -3
  100. lusid/models/mbs_coupon_event.py +3 -3
  101. lusid/models/mbs_interest_deferral_event.py +3 -3
  102. lusid/models/mbs_interest_shortfall_event.py +3 -3
  103. lusid/models/mbs_principal_event.py +3 -3
  104. lusid/models/mbs_principal_write_off_event.py +3 -3
  105. lusid/models/merger_event.py +3 -3
  106. lusid/models/open_event.py +3 -3
  107. lusid/models/option_exercise_cash_event.py +3 -3
  108. lusid/models/option_exercise_physical_event.py +3 -3
  109. lusid/models/output_transaction.py +7 -1
  110. lusid/models/pnl_journal_entry_line.py +95 -0
  111. lusid/models/portfolio.py +3 -3
  112. lusid/models/portfolio_id.py +80 -0
  113. lusid/models/portfolio_search_result.py +3 -3
  114. lusid/models/portfolio_type.py +1 -0
  115. lusid/models/portfolio_without_href.py +3 -3
  116. lusid/models/property_definition.py +6 -4
  117. lusid/models/property_definition_search_result.py +6 -4
  118. lusid/models/property_domain.py +1 -0
  119. lusid/models/protection_payout_cash_flow_event.py +3 -3
  120. lusid/models/raw_vendor_event.py +3 -3
  121. lusid/models/reference_instrument.py +3 -3
  122. lusid/models/repo.py +3 -3
  123. lusid/models/reset_event.py +3 -3
  124. lusid/models/reverse_stock_split_event.py +3 -3
  125. lusid/models/scrip_dividend_event.py +3 -3
  126. lusid/models/side_definition.py +8 -1
  127. lusid/models/side_definition_request.py +9 -2
  128. lusid/models/simple_cash_flow_loan.py +3 -3
  129. lusid/models/simple_instrument.py +3 -3
  130. lusid/models/spin_off_event.py +3 -3
  131. lusid/models/stock_dividend_event.py +3 -3
  132. lusid/models/stock_split_event.py +3 -3
  133. lusid/models/swap_cash_flow_event.py +3 -3
  134. lusid/models/swap_principal_event.py +3 -3
  135. lusid/models/tender_event.py +3 -3
  136. lusid/models/term_deposit.py +3 -3
  137. lusid/models/term_deposit_interest_event.py +3 -3
  138. lusid/models/term_deposit_principal_event.py +3 -3
  139. lusid/models/timeline.py +135 -0
  140. lusid/models/total_return_swap.py +3 -3
  141. lusid/models/trading_conventions.py +73 -0
  142. lusid/models/transition_event.py +3 -3
  143. lusid/models/trigger_event.py +3 -3
  144. lusid/models/update_derived_property_definition_request.py +5 -3
  145. lusid/models/update_timeline_request.py +96 -0
  146. lusid/models/valuation_point_resource_list_of_accounted_transaction.py +125 -0
  147. lusid/models/valuation_point_resource_list_of_pnl_journal_entry_line.py +125 -0
  148. lusid/models/workspace.py +1 -1
  149. lusid/models/workspace_creation_request.py +1 -1
  150. lusid/models/workspace_item.py +4 -2
  151. lusid/models/workspace_item_creation_request.py +11 -2
  152. {lusid_sdk-2.1.590.dist-info → lusid_sdk-2.1.637.dist-info}/METADATA +40 -10
  153. {lusid_sdk-2.1.590.dist-info → lusid_sdk-2.1.637.dist-info}/RECORD +154 -133
  154. {lusid_sdk-2.1.590.dist-info → lusid_sdk-2.1.637.dist-info}/WHEEL +1 -1
@@ -0,0 +1,1094 @@
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.v1 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.v1 import Field, StrictStr, conlist, constr, validator
26
+
27
+ from typing import Optional
28
+
29
+ from lusid.models.closed_period import ClosedPeriod
30
+ from lusid.models.create_closed_period_request import CreateClosedPeriodRequest
31
+ from lusid.models.create_timeline_request import CreateTimelineRequest
32
+ from lusid.models.deleted_entity_response import DeletedEntityResponse
33
+ from lusid.models.timeline import Timeline
34
+ from lusid.models.update_timeline_request import UpdateTimelineRequest
35
+
36
+ from lusid.api_client import ApiClient
37
+ from lusid.api_response import ApiResponse
38
+ from lusid.exceptions import ( # noqa: F401
39
+ ApiTypeError,
40
+ ApiValueError
41
+ )
42
+ from lusid.extensions.configuration_options import ConfigurationOptions
43
+
44
+
45
+ class TimelinesApi:
46
+ """NOTE: This class is auto generated by OpenAPI Generator
47
+ Ref: https://openapi-generator.tech
48
+
49
+ Do not edit the class manually.
50
+ """
51
+
52
+ def __init__(self, api_client=None) -> None:
53
+ if api_client is None:
54
+ api_client = ApiClient.get_default()
55
+ self.api_client = api_client
56
+
57
+ @overload
58
+ async def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, **kwargs) -> ClosedPeriod: # noqa: E501
59
+ ...
60
+
61
+ @overload
62
+ def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, async_req: Optional[bool]=True, **kwargs) -> ClosedPeriod: # noqa: E501
63
+ ...
64
+
65
+ @validate_arguments
66
+ def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ClosedPeriod, Awaitable[ClosedPeriod]]: # noqa: E501
67
+ """[EXPERIMENTAL] CreateClosedPeriod: Create a new closed period against a timeline entity # noqa: E501
68
+
69
+ Creates a new closed period against a timeline entity Returns the newly created closed period entity with properties # noqa: E501
70
+ This method makes a synchronous HTTP request by default. To make an
71
+ asynchronous HTTP request, please pass async_req=True
72
+
73
+ >>> thread = api.create_closed_period(scope, code, create_closed_period_request, async_req=True)
74
+ >>> result = thread.get()
75
+
76
+ :param scope: The scope of the specified Timeline. (required)
77
+ :type scope: str
78
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
79
+ :type code: str
80
+ :param create_closed_period_request: The request containing the details of the Closed Period
81
+ :type create_closed_period_request: CreateClosedPeriodRequest
82
+ :param async_req: Whether to execute the request asynchronously.
83
+ :type async_req: bool, optional
84
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
85
+ :param opts: Configuration options for this request
86
+ :type opts: ConfigurationOptions, optional
87
+ :return: Returns the result object.
88
+ If the method is called asynchronously,
89
+ returns the request thread.
90
+ :rtype: ClosedPeriod
91
+ """
92
+ kwargs['_return_http_data_only'] = True
93
+ if '_preload_content' in kwargs:
94
+ message = "Error! Please call the create_closed_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
95
+ raise ValueError(message)
96
+ if async_req is not None:
97
+ kwargs['async_req'] = async_req
98
+ return self.create_closed_period_with_http_info(scope, code, create_closed_period_request, **kwargs) # noqa: E501
99
+
100
+ @validate_arguments
101
+ def create_closed_period_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, **kwargs) -> ApiResponse: # noqa: E501
102
+ """[EXPERIMENTAL] CreateClosedPeriod: Create a new closed period against a timeline entity # noqa: E501
103
+
104
+ Creates a new closed period against a timeline entity Returns the newly created closed period entity with properties # noqa: E501
105
+ This method makes a synchronous HTTP request by default. To make an
106
+ asynchronous HTTP request, please pass async_req=True
107
+
108
+ >>> thread = api.create_closed_period_with_http_info(scope, code, create_closed_period_request, async_req=True)
109
+ >>> result = thread.get()
110
+
111
+ :param scope: The scope of the specified Timeline. (required)
112
+ :type scope: str
113
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
114
+ :type code: str
115
+ :param create_closed_period_request: The request containing the details of the Closed Period
116
+ :type create_closed_period_request: CreateClosedPeriodRequest
117
+ :param async_req: Whether to execute the request asynchronously.
118
+ :type async_req: bool, optional
119
+ :param _preload_content: if False, the ApiResponse.data will
120
+ be set to none and raw_data will store the
121
+ HTTP response body without reading/decoding.
122
+ Default is True.
123
+ :type _preload_content: bool, optional
124
+ :param _return_http_data_only: response data instead of ApiResponse
125
+ object with status code, headers, etc
126
+ :type _return_http_data_only: bool, optional
127
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
128
+ :param opts: Configuration options for this request
129
+ :type opts: ConfigurationOptions, optional
130
+ :param _request_auth: set to override the auth_settings for an a single
131
+ request; this effectively ignores the authentication
132
+ in the spec for a single request.
133
+ :type _request_auth: dict, optional
134
+ :type _content_type: string, optional: force content-type for the request
135
+ :return: Returns the result object.
136
+ If the method is called asynchronously,
137
+ returns the request thread.
138
+ :rtype: tuple(ClosedPeriod, status_code(int), headers(HTTPHeaderDict))
139
+ """
140
+
141
+ _params = locals()
142
+
143
+ _all_params = [
144
+ 'scope',
145
+ 'code',
146
+ 'create_closed_period_request'
147
+ ]
148
+ _all_params.extend(
149
+ [
150
+ 'async_req',
151
+ '_return_http_data_only',
152
+ '_preload_content',
153
+ '_request_timeout',
154
+ '_request_auth',
155
+ '_content_type',
156
+ '_headers',
157
+ 'opts'
158
+ ]
159
+ )
160
+
161
+ # validate the arguments
162
+ for _key, _val in _params['kwargs'].items():
163
+ if _key not in _all_params:
164
+ raise ApiTypeError(
165
+ "Got an unexpected keyword argument '%s'"
166
+ " to method create_closed_period" % _key
167
+ )
168
+ _params[_key] = _val
169
+ del _params['kwargs']
170
+
171
+ _collection_formats = {}
172
+
173
+ # process the path parameters
174
+ _path_params = {}
175
+ if _params['scope']:
176
+ _path_params['scope'] = _params['scope']
177
+
178
+ if _params['code']:
179
+ _path_params['code'] = _params['code']
180
+
181
+
182
+ # process the query parameters
183
+ _query_params = []
184
+ # process the header parameters
185
+ _header_params = dict(_params.get('_headers', {}))
186
+ # process the form parameters
187
+ _form_params = []
188
+ _files = {}
189
+ # process the body parameter
190
+ _body_params = None
191
+ if _params['create_closed_period_request'] is not None:
192
+ _body_params = _params['create_closed_period_request']
193
+
194
+ # set the HTTP header `Accept`
195
+ _header_params['Accept'] = self.api_client.select_header_accept(
196
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
197
+
198
+ # set the HTTP header `Content-Type`
199
+ _content_types_list = _params.get('_content_type',
200
+ self.api_client.select_header_content_type(
201
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
202
+ if _content_types_list:
203
+ _header_params['Content-Type'] = _content_types_list
204
+
205
+ # authentication setting
206
+ _auth_settings = ['oauth2'] # noqa: E501
207
+
208
+ _response_types_map = {
209
+ '201': "ClosedPeriod",
210
+ '400': "LusidValidationProblemDetails",
211
+ }
212
+
213
+ return self.api_client.call_api(
214
+ '/api/timelines/{scope}/{code}/closedperiods', 'POST',
215
+ _path_params,
216
+ _query_params,
217
+ _header_params,
218
+ body=_body_params,
219
+ post_params=_form_params,
220
+ files=_files,
221
+ response_types_map=_response_types_map,
222
+ auth_settings=_auth_settings,
223
+ async_req=_params.get('async_req'),
224
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
225
+ _preload_content=_params.get('_preload_content', True),
226
+ _request_timeout=_params.get('_request_timeout'),
227
+ opts=_params.get('opts'),
228
+ collection_formats=_collection_formats,
229
+ _request_auth=_params.get('_request_auth'))
230
+
231
+ @overload
232
+ async def create_timeline(self, create_timeline_request : Annotated[Optional[CreateTimelineRequest], Field(description="The request containing the details of the Timeline")] = None, **kwargs) -> Timeline: # noqa: E501
233
+ ...
234
+
235
+ @overload
236
+ def create_timeline(self, create_timeline_request : Annotated[Optional[CreateTimelineRequest], Field(description="The request containing the details of the Timeline")] = None, async_req: Optional[bool]=True, **kwargs) -> Timeline: # noqa: E501
237
+ ...
238
+
239
+ @validate_arguments
240
+ def create_timeline(self, create_timeline_request : Annotated[Optional[CreateTimelineRequest], Field(description="The request containing the details of the Timeline")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[Timeline, Awaitable[Timeline]]: # noqa: E501
241
+ """[EXPERIMENTAL] CreateTimeline: Create a Timeline # noqa: E501
242
+
243
+ Creates a Timeline. Returns the created Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Upserted Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
244
+ This method makes a synchronous HTTP request by default. To make an
245
+ asynchronous HTTP request, please pass async_req=True
246
+
247
+ >>> thread = api.create_timeline(create_timeline_request, async_req=True)
248
+ >>> result = thread.get()
249
+
250
+ :param create_timeline_request: The request containing the details of the Timeline
251
+ :type create_timeline_request: CreateTimelineRequest
252
+ :param async_req: Whether to execute the request asynchronously.
253
+ :type async_req: bool, optional
254
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
255
+ :param opts: Configuration options for this request
256
+ :type opts: ConfigurationOptions, optional
257
+ :return: Returns the result object.
258
+ If the method is called asynchronously,
259
+ returns the request thread.
260
+ :rtype: Timeline
261
+ """
262
+ kwargs['_return_http_data_only'] = True
263
+ if '_preload_content' in kwargs:
264
+ message = "Error! Please call the create_timeline_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
265
+ raise ValueError(message)
266
+ if async_req is not None:
267
+ kwargs['async_req'] = async_req
268
+ return self.create_timeline_with_http_info(create_timeline_request, **kwargs) # noqa: E501
269
+
270
+ @validate_arguments
271
+ def create_timeline_with_http_info(self, create_timeline_request : Annotated[Optional[CreateTimelineRequest], Field(description="The request containing the details of the Timeline")] = None, **kwargs) -> ApiResponse: # noqa: E501
272
+ """[EXPERIMENTAL] CreateTimeline: Create a Timeline # noqa: E501
273
+
274
+ Creates a Timeline. Returns the created Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Upserted Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
275
+ This method makes a synchronous HTTP request by default. To make an
276
+ asynchronous HTTP request, please pass async_req=True
277
+
278
+ >>> thread = api.create_timeline_with_http_info(create_timeline_request, async_req=True)
279
+ >>> result = thread.get()
280
+
281
+ :param create_timeline_request: The request containing the details of the Timeline
282
+ :type create_timeline_request: CreateTimelineRequest
283
+ :param async_req: Whether to execute the request asynchronously.
284
+ :type async_req: bool, optional
285
+ :param _preload_content: if False, the ApiResponse.data will
286
+ be set to none and raw_data will store the
287
+ HTTP response body without reading/decoding.
288
+ Default is True.
289
+ :type _preload_content: bool, optional
290
+ :param _return_http_data_only: response data instead of ApiResponse
291
+ object with status code, headers, etc
292
+ :type _return_http_data_only: bool, optional
293
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
294
+ :param opts: Configuration options for this request
295
+ :type opts: ConfigurationOptions, optional
296
+ :param _request_auth: set to override the auth_settings for an a single
297
+ request; this effectively ignores the authentication
298
+ in the spec for a single request.
299
+ :type _request_auth: dict, optional
300
+ :type _content_type: string, optional: force content-type for the request
301
+ :return: Returns the result object.
302
+ If the method is called asynchronously,
303
+ returns the request thread.
304
+ :rtype: tuple(Timeline, status_code(int), headers(HTTPHeaderDict))
305
+ """
306
+
307
+ _params = locals()
308
+
309
+ _all_params = [
310
+ 'create_timeline_request'
311
+ ]
312
+ _all_params.extend(
313
+ [
314
+ 'async_req',
315
+ '_return_http_data_only',
316
+ '_preload_content',
317
+ '_request_timeout',
318
+ '_request_auth',
319
+ '_content_type',
320
+ '_headers',
321
+ 'opts'
322
+ ]
323
+ )
324
+
325
+ # validate the arguments
326
+ for _key, _val in _params['kwargs'].items():
327
+ if _key not in _all_params:
328
+ raise ApiTypeError(
329
+ "Got an unexpected keyword argument '%s'"
330
+ " to method create_timeline" % _key
331
+ )
332
+ _params[_key] = _val
333
+ del _params['kwargs']
334
+
335
+ _collection_formats = {}
336
+
337
+ # process the path parameters
338
+ _path_params = {}
339
+
340
+ # process the query parameters
341
+ _query_params = []
342
+ # process the header parameters
343
+ _header_params = dict(_params.get('_headers', {}))
344
+ # process the form parameters
345
+ _form_params = []
346
+ _files = {}
347
+ # process the body parameter
348
+ _body_params = None
349
+ if _params['create_timeline_request'] is not None:
350
+ _body_params = _params['create_timeline_request']
351
+
352
+ # set the HTTP header `Accept`
353
+ _header_params['Accept'] = self.api_client.select_header_accept(
354
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
355
+
356
+ # set the HTTP header `Content-Type`
357
+ _content_types_list = _params.get('_content_type',
358
+ self.api_client.select_header_content_type(
359
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
360
+ if _content_types_list:
361
+ _header_params['Content-Type'] = _content_types_list
362
+
363
+ # authentication setting
364
+ _auth_settings = ['oauth2'] # noqa: E501
365
+
366
+ _response_types_map = {
367
+ '201': "Timeline",
368
+ '400': "LusidValidationProblemDetails",
369
+ }
370
+
371
+ return self.api_client.call_api(
372
+ '/api/timelines', 'POST',
373
+ _path_params,
374
+ _query_params,
375
+ _header_params,
376
+ body=_body_params,
377
+ post_params=_form_params,
378
+ files=_files,
379
+ response_types_map=_response_types_map,
380
+ auth_settings=_auth_settings,
381
+ async_req=_params.get('async_req'),
382
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
383
+ _preload_content=_params.get('_preload_content', True),
384
+ _request_timeout=_params.get('_request_timeout'),
385
+ opts=_params.get('opts'),
386
+ collection_formats=_collection_formats,
387
+ _request_auth=_params.get('_request_auth'))
388
+
389
+ @overload
390
+ async def delete_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
391
+ ...
392
+
393
+ @overload
394
+ def delete_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501
395
+ ...
396
+
397
+ @validate_arguments
398
+ def delete_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], async_req: Optional[bool]=None, **kwargs) -> Union[DeletedEntityResponse, Awaitable[DeletedEntityResponse]]: # noqa: E501
399
+ """[EXPERIMENTAL] DeleteTimeline: Deletes a particular Timeline # noqa: E501
400
+
401
+ The deletion will take effect from the Timeline deletion datetime. i.e. will no longer exist at any asAt datetime after the asAt datetime of deletion. # noqa: E501
402
+ This method makes a synchronous HTTP request by default. To make an
403
+ asynchronous HTTP request, please pass async_req=True
404
+
405
+ >>> thread = api.delete_timeline(scope, code, async_req=True)
406
+ >>> result = thread.get()
407
+
408
+ :param scope: The scope of the specified Timeline. (required)
409
+ :type scope: str
410
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
411
+ :type code: str
412
+ :param async_req: Whether to execute the request asynchronously.
413
+ :type async_req: bool, optional
414
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
415
+ :param opts: Configuration options for this request
416
+ :type opts: ConfigurationOptions, optional
417
+ :return: Returns the result object.
418
+ If the method is called asynchronously,
419
+ returns the request thread.
420
+ :rtype: DeletedEntityResponse
421
+ """
422
+ kwargs['_return_http_data_only'] = True
423
+ if '_preload_content' in kwargs:
424
+ message = "Error! Please call the delete_timeline_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
425
+ raise ValueError(message)
426
+ if async_req is not None:
427
+ kwargs['async_req'] = async_req
428
+ return self.delete_timeline_with_http_info(scope, code, **kwargs) # noqa: E501
429
+
430
+ @validate_arguments
431
+ def delete_timeline_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], **kwargs) -> ApiResponse: # noqa: E501
432
+ """[EXPERIMENTAL] DeleteTimeline: Deletes a particular Timeline # noqa: E501
433
+
434
+ The deletion will take effect from the Timeline deletion datetime. i.e. will no longer exist at any asAt datetime after the asAt datetime of deletion. # noqa: E501
435
+ This method makes a synchronous HTTP request by default. To make an
436
+ asynchronous HTTP request, please pass async_req=True
437
+
438
+ >>> thread = api.delete_timeline_with_http_info(scope, code, async_req=True)
439
+ >>> result = thread.get()
440
+
441
+ :param scope: The scope of the specified Timeline. (required)
442
+ :type scope: str
443
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
444
+ :type code: str
445
+ :param async_req: Whether to execute the request asynchronously.
446
+ :type async_req: bool, optional
447
+ :param _preload_content: if False, the ApiResponse.data will
448
+ be set to none and raw_data will store the
449
+ HTTP response body without reading/decoding.
450
+ Default is True.
451
+ :type _preload_content: bool, optional
452
+ :param _return_http_data_only: response data instead of ApiResponse
453
+ object with status code, headers, etc
454
+ :type _return_http_data_only: bool, optional
455
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
456
+ :param opts: Configuration options for this request
457
+ :type opts: ConfigurationOptions, optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the authentication
460
+ in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :type _content_type: string, optional: force content-type for the request
463
+ :return: Returns the result object.
464
+ If the method is called asynchronously,
465
+ returns the request thread.
466
+ :rtype: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
467
+ """
468
+
469
+ _params = locals()
470
+
471
+ _all_params = [
472
+ 'scope',
473
+ 'code'
474
+ ]
475
+ _all_params.extend(
476
+ [
477
+ 'async_req',
478
+ '_return_http_data_only',
479
+ '_preload_content',
480
+ '_request_timeout',
481
+ '_request_auth',
482
+ '_content_type',
483
+ '_headers',
484
+ 'opts'
485
+ ]
486
+ )
487
+
488
+ # validate the arguments
489
+ for _key, _val in _params['kwargs'].items():
490
+ if _key not in _all_params:
491
+ raise ApiTypeError(
492
+ "Got an unexpected keyword argument '%s'"
493
+ " to method delete_timeline" % _key
494
+ )
495
+ _params[_key] = _val
496
+ del _params['kwargs']
497
+
498
+ _collection_formats = {}
499
+
500
+ # process the path parameters
501
+ _path_params = {}
502
+ if _params['scope']:
503
+ _path_params['scope'] = _params['scope']
504
+
505
+ if _params['code']:
506
+ _path_params['code'] = _params['code']
507
+
508
+
509
+ # process the query parameters
510
+ _query_params = []
511
+ # process the header parameters
512
+ _header_params = dict(_params.get('_headers', {}))
513
+ # process the form parameters
514
+ _form_params = []
515
+ _files = {}
516
+ # process the body parameter
517
+ _body_params = None
518
+ # set the HTTP header `Accept`
519
+ _header_params['Accept'] = self.api_client.select_header_accept(
520
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
521
+
522
+ # authentication setting
523
+ _auth_settings = ['oauth2'] # noqa: E501
524
+
525
+ _response_types_map = {
526
+ '200': "DeletedEntityResponse",
527
+ '400': "LusidValidationProblemDetails",
528
+ }
529
+
530
+ return self.api_client.call_api(
531
+ '/api/timelines/{scope}/{code}', 'DELETE',
532
+ _path_params,
533
+ _query_params,
534
+ _header_params,
535
+ body=_body_params,
536
+ post_params=_form_params,
537
+ files=_files,
538
+ response_types_map=_response_types_map,
539
+ auth_settings=_auth_settings,
540
+ async_req=_params.get('async_req'),
541
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
542
+ _preload_content=_params.get('_preload_content', True),
543
+ _request_timeout=_params.get('_request_timeout'),
544
+ opts=_params.get('opts'),
545
+ collection_formats=_collection_formats,
546
+ _request_auth=_params.get('_request_auth'))
547
+
548
+ @overload
549
+ async def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, **kwargs) -> ClosedPeriod: # noqa: E501
550
+ ...
551
+
552
+ @overload
553
+ def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, async_req: Optional[bool]=True, **kwargs) -> ClosedPeriod: # noqa: E501
554
+ ...
555
+
556
+ @validate_arguments
557
+ def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ClosedPeriod, Awaitable[ClosedPeriod]]: # noqa: E501
558
+ """[EXPERIMENTAL] GetClosedPeriod: Gets a Closed Period entity. # noqa: E501
559
+
560
+ Retrieves one ClosedPeriod uniquely defined by the Timelines Scope/Code and a ClosedPeriodId. # noqa: E501
561
+ This method makes a synchronous HTTP request by default. To make an
562
+ asynchronous HTTP request, please pass async_req=True
563
+
564
+ >>> thread = api.get_closed_period(scope, code, closed_period_id, as_at, property_keys, async_req=True)
565
+ >>> result = thread.get()
566
+
567
+ :param scope: The scope of the Timeline. (required)
568
+ :type scope: str
569
+ :param code: The code of the Timeline. Together with the scope this uniquely identifies the Timeline. (required)
570
+ :type code: str
571
+ :param closed_period_id: The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod (required)
572
+ :type closed_period_id: str
573
+ :param as_at: The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.
574
+ :type as_at: datetime
575
+ :param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.
576
+ :type property_keys: List[str]
577
+ :param async_req: Whether to execute the request asynchronously.
578
+ :type async_req: bool, optional
579
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
580
+ :param opts: Configuration options for this request
581
+ :type opts: ConfigurationOptions, optional
582
+ :return: Returns the result object.
583
+ If the method is called asynchronously,
584
+ returns the request thread.
585
+ :rtype: ClosedPeriod
586
+ """
587
+ kwargs['_return_http_data_only'] = True
588
+ if '_preload_content' in kwargs:
589
+ message = "Error! Please call the get_closed_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
590
+ raise ValueError(message)
591
+ if async_req is not None:
592
+ kwargs['async_req'] = async_req
593
+ return self.get_closed_period_with_http_info(scope, code, closed_period_id, as_at, property_keys, **kwargs) # noqa: E501
594
+
595
+ @validate_arguments
596
+ def get_closed_period_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
597
+ """[EXPERIMENTAL] GetClosedPeriod: Gets a Closed Period entity. # noqa: E501
598
+
599
+ Retrieves one ClosedPeriod uniquely defined by the Timelines Scope/Code and a ClosedPeriodId. # noqa: E501
600
+ This method makes a synchronous HTTP request by default. To make an
601
+ asynchronous HTTP request, please pass async_req=True
602
+
603
+ >>> thread = api.get_closed_period_with_http_info(scope, code, closed_period_id, as_at, property_keys, async_req=True)
604
+ >>> result = thread.get()
605
+
606
+ :param scope: The scope of the Timeline. (required)
607
+ :type scope: str
608
+ :param code: The code of the Timeline. Together with the scope this uniquely identifies the Timeline. (required)
609
+ :type code: str
610
+ :param closed_period_id: The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod (required)
611
+ :type closed_period_id: str
612
+ :param as_at: The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.
613
+ :type as_at: datetime
614
+ :param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.
615
+ :type property_keys: List[str]
616
+ :param async_req: Whether to execute the request asynchronously.
617
+ :type async_req: bool, optional
618
+ :param _preload_content: if False, the ApiResponse.data will
619
+ be set to none and raw_data will store the
620
+ HTTP response body without reading/decoding.
621
+ Default is True.
622
+ :type _preload_content: bool, optional
623
+ :param _return_http_data_only: response data instead of ApiResponse
624
+ object with status code, headers, etc
625
+ :type _return_http_data_only: bool, optional
626
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
627
+ :param opts: Configuration options for this request
628
+ :type opts: ConfigurationOptions, optional
629
+ :param _request_auth: set to override the auth_settings for an a single
630
+ request; this effectively ignores the authentication
631
+ in the spec for a single request.
632
+ :type _request_auth: dict, optional
633
+ :type _content_type: string, optional: force content-type for the request
634
+ :return: Returns the result object.
635
+ If the method is called asynchronously,
636
+ returns the request thread.
637
+ :rtype: tuple(ClosedPeriod, status_code(int), headers(HTTPHeaderDict))
638
+ """
639
+
640
+ _params = locals()
641
+
642
+ _all_params = [
643
+ 'scope',
644
+ 'code',
645
+ 'closed_period_id',
646
+ 'as_at',
647
+ 'property_keys'
648
+ ]
649
+ _all_params.extend(
650
+ [
651
+ 'async_req',
652
+ '_return_http_data_only',
653
+ '_preload_content',
654
+ '_request_timeout',
655
+ '_request_auth',
656
+ '_content_type',
657
+ '_headers',
658
+ 'opts'
659
+ ]
660
+ )
661
+
662
+ # validate the arguments
663
+ for _key, _val in _params['kwargs'].items():
664
+ if _key not in _all_params:
665
+ raise ApiTypeError(
666
+ "Got an unexpected keyword argument '%s'"
667
+ " to method get_closed_period" % _key
668
+ )
669
+ _params[_key] = _val
670
+ del _params['kwargs']
671
+
672
+ _collection_formats = {}
673
+
674
+ # process the path parameters
675
+ _path_params = {}
676
+ if _params['scope']:
677
+ _path_params['scope'] = _params['scope']
678
+
679
+ if _params['code']:
680
+ _path_params['code'] = _params['code']
681
+
682
+ if _params['closed_period_id']:
683
+ _path_params['closedPeriodId'] = _params['closed_period_id']
684
+
685
+
686
+ # process the query parameters
687
+ _query_params = []
688
+ if _params.get('as_at') is not None: # noqa: E501
689
+ if isinstance(_params['as_at'], datetime):
690
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
691
+ else:
692
+ _query_params.append(('asAt', _params['as_at']))
693
+
694
+ if _params.get('property_keys') is not None: # noqa: E501
695
+ _query_params.append(('propertyKeys', _params['property_keys']))
696
+ _collection_formats['propertyKeys'] = 'multi'
697
+
698
+ # process the header parameters
699
+ _header_params = dict(_params.get('_headers', {}))
700
+ # process the form parameters
701
+ _form_params = []
702
+ _files = {}
703
+ # process the body parameter
704
+ _body_params = None
705
+ # set the HTTP header `Accept`
706
+ _header_params['Accept'] = self.api_client.select_header_accept(
707
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
708
+
709
+ # authentication setting
710
+ _auth_settings = ['oauth2'] # noqa: E501
711
+
712
+ _response_types_map = {
713
+ '200': "ClosedPeriod",
714
+ '400': "LusidValidationProblemDetails",
715
+ }
716
+
717
+ return self.api_client.call_api(
718
+ '/api/timelines/{scope}/{code}/closedperiods/{closedPeriodId}', 'GET',
719
+ _path_params,
720
+ _query_params,
721
+ _header_params,
722
+ body=_body_params,
723
+ post_params=_form_params,
724
+ files=_files,
725
+ response_types_map=_response_types_map,
726
+ auth_settings=_auth_settings,
727
+ async_req=_params.get('async_req'),
728
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
729
+ _preload_content=_params.get('_preload_content', True),
730
+ _request_timeout=_params.get('_request_timeout'),
731
+ opts=_params.get('opts'),
732
+ collection_formats=_collection_formats,
733
+ _request_auth=_params.get('_request_auth'))
734
+
735
+ @overload
736
+ async def get_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.")] = None, **kwargs) -> Timeline: # noqa: E501
737
+ ...
738
+
739
+ @overload
740
+ def get_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.")] = None, async_req: Optional[bool]=True, **kwargs) -> Timeline: # noqa: E501
741
+ ...
742
+
743
+ @validate_arguments
744
+ def get_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[Timeline, Awaitable[Timeline]]: # noqa: E501
745
+ """[EXPERIMENTAL] GetTimeline: Get a single Timeline by scope and code. # noqa: E501
746
+
747
+ Retrieves one Timeline by scope and code. Timelines are mono-temporal. The EffectiveAt is only applied to Time-Variant Properties. # noqa: E501
748
+ This method makes a synchronous HTTP request by default. To make an
749
+ asynchronous HTTP request, please pass async_req=True
750
+
751
+ >>> thread = api.get_timeline(scope, code, as_at, effective_at, property_keys, async_req=True)
752
+ >>> result = thread.get()
753
+
754
+ :param scope: The scope of the specified Timeline. (required)
755
+ :type scope: str
756
+ :param code: The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. (required)
757
+ :type code: str
758
+ :param as_at: The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.
759
+ :type as_at: datetime
760
+ :param effective_at: The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.
761
+ :type effective_at: str
762
+ :param property_keys: A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.
763
+ :type property_keys: List[str]
764
+ :param async_req: Whether to execute the request asynchronously.
765
+ :type async_req: bool, optional
766
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
767
+ :param opts: Configuration options for this request
768
+ :type opts: ConfigurationOptions, optional
769
+ :return: Returns the result object.
770
+ If the method is called asynchronously,
771
+ returns the request thread.
772
+ :rtype: Timeline
773
+ """
774
+ kwargs['_return_http_data_only'] = True
775
+ if '_preload_content' in kwargs:
776
+ message = "Error! Please call the get_timeline_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
777
+ raise ValueError(message)
778
+ if async_req is not None:
779
+ kwargs['async_req'] = async_req
780
+ return self.get_timeline_with_http_info(scope, code, as_at, effective_at, property_keys, **kwargs) # noqa: E501
781
+
782
+ @validate_arguments
783
+ def get_timeline_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
784
+ """[EXPERIMENTAL] GetTimeline: Get a single Timeline by scope and code. # noqa: E501
785
+
786
+ Retrieves one Timeline by scope and code. Timelines are mono-temporal. The EffectiveAt is only applied to Time-Variant Properties. # noqa: E501
787
+ This method makes a synchronous HTTP request by default. To make an
788
+ asynchronous HTTP request, please pass async_req=True
789
+
790
+ >>> thread = api.get_timeline_with_http_info(scope, code, as_at, effective_at, property_keys, async_req=True)
791
+ >>> result = thread.get()
792
+
793
+ :param scope: The scope of the specified Timeline. (required)
794
+ :type scope: str
795
+ :param code: The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. (required)
796
+ :type code: str
797
+ :param as_at: The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.
798
+ :type as_at: datetime
799
+ :param effective_at: The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.
800
+ :type effective_at: str
801
+ :param property_keys: A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.
802
+ :type property_keys: List[str]
803
+ :param async_req: Whether to execute the request asynchronously.
804
+ :type async_req: bool, optional
805
+ :param _preload_content: if False, the ApiResponse.data will
806
+ be set to none and raw_data will store the
807
+ HTTP response body without reading/decoding.
808
+ Default is True.
809
+ :type _preload_content: bool, optional
810
+ :param _return_http_data_only: response data instead of ApiResponse
811
+ object with status code, headers, etc
812
+ :type _return_http_data_only: bool, optional
813
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
814
+ :param opts: Configuration options for this request
815
+ :type opts: ConfigurationOptions, optional
816
+ :param _request_auth: set to override the auth_settings for an a single
817
+ request; this effectively ignores the authentication
818
+ in the spec for a single request.
819
+ :type _request_auth: dict, optional
820
+ :type _content_type: string, optional: force content-type for the request
821
+ :return: Returns the result object.
822
+ If the method is called asynchronously,
823
+ returns the request thread.
824
+ :rtype: tuple(Timeline, status_code(int), headers(HTTPHeaderDict))
825
+ """
826
+
827
+ _params = locals()
828
+
829
+ _all_params = [
830
+ 'scope',
831
+ 'code',
832
+ 'as_at',
833
+ 'effective_at',
834
+ 'property_keys'
835
+ ]
836
+ _all_params.extend(
837
+ [
838
+ 'async_req',
839
+ '_return_http_data_only',
840
+ '_preload_content',
841
+ '_request_timeout',
842
+ '_request_auth',
843
+ '_content_type',
844
+ '_headers',
845
+ 'opts'
846
+ ]
847
+ )
848
+
849
+ # validate the arguments
850
+ for _key, _val in _params['kwargs'].items():
851
+ if _key not in _all_params:
852
+ raise ApiTypeError(
853
+ "Got an unexpected keyword argument '%s'"
854
+ " to method get_timeline" % _key
855
+ )
856
+ _params[_key] = _val
857
+ del _params['kwargs']
858
+
859
+ _collection_formats = {}
860
+
861
+ # process the path parameters
862
+ _path_params = {}
863
+ if _params['scope']:
864
+ _path_params['scope'] = _params['scope']
865
+
866
+ if _params['code']:
867
+ _path_params['code'] = _params['code']
868
+
869
+
870
+ # process the query parameters
871
+ _query_params = []
872
+ if _params.get('as_at') is not None: # noqa: E501
873
+ if isinstance(_params['as_at'], datetime):
874
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
875
+ else:
876
+ _query_params.append(('asAt', _params['as_at']))
877
+
878
+ if _params.get('effective_at') is not None: # noqa: E501
879
+ _query_params.append(('effectiveAt', _params['effective_at']))
880
+
881
+ if _params.get('property_keys') is not None: # noqa: E501
882
+ _query_params.append(('propertyKeys', _params['property_keys']))
883
+ _collection_formats['propertyKeys'] = 'multi'
884
+
885
+ # process the header parameters
886
+ _header_params = dict(_params.get('_headers', {}))
887
+ # process the form parameters
888
+ _form_params = []
889
+ _files = {}
890
+ # process the body parameter
891
+ _body_params = None
892
+ # set the HTTP header `Accept`
893
+ _header_params['Accept'] = self.api_client.select_header_accept(
894
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
895
+
896
+ # authentication setting
897
+ _auth_settings = ['oauth2'] # noqa: E501
898
+
899
+ _response_types_map = {
900
+ '200': "Timeline",
901
+ '400': "LusidValidationProblemDetails",
902
+ }
903
+
904
+ return self.api_client.call_api(
905
+ '/api/timelines/{scope}/{code}', 'GET',
906
+ _path_params,
907
+ _query_params,
908
+ _header_params,
909
+ body=_body_params,
910
+ post_params=_form_params,
911
+ files=_files,
912
+ response_types_map=_response_types_map,
913
+ auth_settings=_auth_settings,
914
+ async_req=_params.get('async_req'),
915
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
916
+ _preload_content=_params.get('_preload_content', True),
917
+ _request_timeout=_params.get('_request_timeout'),
918
+ opts=_params.get('opts'),
919
+ collection_formats=_collection_formats,
920
+ _request_auth=_params.get('_request_auth'))
921
+
922
+ @overload
923
+ async def update_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, **kwargs) -> Timeline: # noqa: E501
924
+ ...
925
+
926
+ @overload
927
+ def update_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, async_req: Optional[bool]=True, **kwargs) -> Timeline: # noqa: E501
928
+ ...
929
+
930
+ @validate_arguments
931
+ def update_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[Timeline, Awaitable[Timeline]]: # noqa: E501
932
+ """[EXPERIMENTAL] UpdateTimeline: Update Timeline defined by scope and code # noqa: E501
933
+
934
+ Overwrites an existing Timeline Update request has the same required fields as Create apart from the Id. Returns the updated Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
935
+ This method makes a synchronous HTTP request by default. To make an
936
+ asynchronous HTTP request, please pass async_req=True
937
+
938
+ >>> thread = api.update_timeline(scope, code, update_timeline_request, async_req=True)
939
+ >>> result = thread.get()
940
+
941
+ :param scope: The scope of the specified Timeline. (required)
942
+ :type scope: str
943
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
944
+ :type code: str
945
+ :param update_timeline_request: The request containing the updated details of the Timeline
946
+ :type update_timeline_request: UpdateTimelineRequest
947
+ :param async_req: Whether to execute the request asynchronously.
948
+ :type async_req: bool, optional
949
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
950
+ :param opts: Configuration options for this request
951
+ :type opts: ConfigurationOptions, optional
952
+ :return: Returns the result object.
953
+ If the method is called asynchronously,
954
+ returns the request thread.
955
+ :rtype: Timeline
956
+ """
957
+ kwargs['_return_http_data_only'] = True
958
+ if '_preload_content' in kwargs:
959
+ message = "Error! Please call the update_timeline_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
960
+ raise ValueError(message)
961
+ if async_req is not None:
962
+ kwargs['async_req'] = async_req
963
+ return self.update_timeline_with_http_info(scope, code, update_timeline_request, **kwargs) # noqa: E501
964
+
965
+ @validate_arguments
966
+ def update_timeline_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, **kwargs) -> ApiResponse: # noqa: E501
967
+ """[EXPERIMENTAL] UpdateTimeline: Update Timeline defined by scope and code # noqa: E501
968
+
969
+ Overwrites an existing Timeline Update request has the same required fields as Create apart from the Id. Returns the updated Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
970
+ This method makes a synchronous HTTP request by default. To make an
971
+ asynchronous HTTP request, please pass async_req=True
972
+
973
+ >>> thread = api.update_timeline_with_http_info(scope, code, update_timeline_request, async_req=True)
974
+ >>> result = thread.get()
975
+
976
+ :param scope: The scope of the specified Timeline. (required)
977
+ :type scope: str
978
+ :param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
979
+ :type code: str
980
+ :param update_timeline_request: The request containing the updated details of the Timeline
981
+ :type update_timeline_request: UpdateTimelineRequest
982
+ :param async_req: Whether to execute the request asynchronously.
983
+ :type async_req: bool, optional
984
+ :param _preload_content: if False, the ApiResponse.data will
985
+ be set to none and raw_data will store the
986
+ HTTP response body without reading/decoding.
987
+ Default is True.
988
+ :type _preload_content: bool, optional
989
+ :param _return_http_data_only: response data instead of ApiResponse
990
+ object with status code, headers, etc
991
+ :type _return_http_data_only: bool, optional
992
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
993
+ :param opts: Configuration options for this request
994
+ :type opts: ConfigurationOptions, optional
995
+ :param _request_auth: set to override the auth_settings for an a single
996
+ request; this effectively ignores the authentication
997
+ in the spec for a single request.
998
+ :type _request_auth: dict, optional
999
+ :type _content_type: string, optional: force content-type for the request
1000
+ :return: Returns the result object.
1001
+ If the method is called asynchronously,
1002
+ returns the request thread.
1003
+ :rtype: tuple(Timeline, status_code(int), headers(HTTPHeaderDict))
1004
+ """
1005
+
1006
+ _params = locals()
1007
+
1008
+ _all_params = [
1009
+ 'scope',
1010
+ 'code',
1011
+ 'update_timeline_request'
1012
+ ]
1013
+ _all_params.extend(
1014
+ [
1015
+ 'async_req',
1016
+ '_return_http_data_only',
1017
+ '_preload_content',
1018
+ '_request_timeout',
1019
+ '_request_auth',
1020
+ '_content_type',
1021
+ '_headers',
1022
+ 'opts'
1023
+ ]
1024
+ )
1025
+
1026
+ # validate the arguments
1027
+ for _key, _val in _params['kwargs'].items():
1028
+ if _key not in _all_params:
1029
+ raise ApiTypeError(
1030
+ "Got an unexpected keyword argument '%s'"
1031
+ " to method update_timeline" % _key
1032
+ )
1033
+ _params[_key] = _val
1034
+ del _params['kwargs']
1035
+
1036
+ _collection_formats = {}
1037
+
1038
+ # process the path parameters
1039
+ _path_params = {}
1040
+ if _params['scope']:
1041
+ _path_params['scope'] = _params['scope']
1042
+
1043
+ if _params['code']:
1044
+ _path_params['code'] = _params['code']
1045
+
1046
+
1047
+ # process the query parameters
1048
+ _query_params = []
1049
+ # process the header parameters
1050
+ _header_params = dict(_params.get('_headers', {}))
1051
+ # process the form parameters
1052
+ _form_params = []
1053
+ _files = {}
1054
+ # process the body parameter
1055
+ _body_params = None
1056
+ if _params['update_timeline_request'] is not None:
1057
+ _body_params = _params['update_timeline_request']
1058
+
1059
+ # set the HTTP header `Accept`
1060
+ _header_params['Accept'] = self.api_client.select_header_accept(
1061
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1062
+
1063
+ # set the HTTP header `Content-Type`
1064
+ _content_types_list = _params.get('_content_type',
1065
+ self.api_client.select_header_content_type(
1066
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1067
+ if _content_types_list:
1068
+ _header_params['Content-Type'] = _content_types_list
1069
+
1070
+ # authentication setting
1071
+ _auth_settings = ['oauth2'] # noqa: E501
1072
+
1073
+ _response_types_map = {
1074
+ '200': "Timeline",
1075
+ '400': "LusidValidationProblemDetails",
1076
+ }
1077
+
1078
+ return self.api_client.call_api(
1079
+ '/api/timelines/{scope}/{code}', 'PUT',
1080
+ _path_params,
1081
+ _query_params,
1082
+ _header_params,
1083
+ body=_body_params,
1084
+ post_params=_form_params,
1085
+ files=_files,
1086
+ response_types_map=_response_types_map,
1087
+ auth_settings=_auth_settings,
1088
+ async_req=_params.get('async_req'),
1089
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1090
+ _preload_content=_params.get('_preload_content', True),
1091
+ _request_timeout=_params.get('_request_timeout'),
1092
+ opts=_params.get('opts'),
1093
+ collection_formats=_collection_formats,
1094
+ _request_auth=_params.get('_request_auth'))