lusid-sdk 1.1.118__py3-none-any.whl → 2.0.50b0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1100) hide show
  1. lusid/__init__.py +247 -180
  2. lusid/api/__init__.py +14 -2
  3. lusid/api/abor_api.py +1963 -0
  4. lusid/api/abor_configuration_api.py +943 -0
  5. lusid/api/address_key_definition_api.py +296 -269
  6. lusid/api/aggregation_api.py +469 -260
  7. lusid/api/allocations_api.py +419 -404
  8. lusid/api/application_metadata_api.py +266 -244
  9. lusid/api/blocks_api.py +409 -402
  10. lusid/api/calendars_api.py +1185 -1262
  11. lusid/api/chart_of_accounts_api.py +4087 -0
  12. lusid/api/complex_market_data_api.py +469 -308
  13. lusid/api/compliance_api.py +1081 -1169
  14. lusid/api/configuration_recipe_api.py +381 -375
  15. lusid/api/conventions_api.py +1982 -0
  16. lusid/api/corporate_action_sources_api.py +961 -885
  17. lusid/api/counterparties_api.py +729 -711
  18. lusid/api/custom_entities_api.py +1186 -1465
  19. lusid/api/custom_entity_definitions_api.py +387 -364
  20. lusid/api/custom_entity_types_api.py +393 -369
  21. lusid/api/cut_label_definitions_api.py +492 -453
  22. lusid/api/data_types_api.py +726 -734
  23. lusid/api/derived_transaction_portfolios_api.py +204 -213
  24. lusid/api/entities_api.py +113 -113
  25. lusid/api/executions_api.py +409 -402
  26. lusid/api/instrument_events_api.py +734 -0
  27. lusid/api/instruments_api.py +2407 -1721
  28. lusid/api/legacy_compliance_api.py +1449 -0
  29. lusid/api/legal_entities_api.py +1982 -2102
  30. lusid/api/order_graph_api.py +357 -364
  31. lusid/api/order_instructions_api.py +745 -0
  32. lusid/api/order_management_api.py +240 -342
  33. lusid/api/orders_api.py +423 -408
  34. lusid/api/packages_api.py +745 -0
  35. lusid/api/participations_api.py +407 -400
  36. lusid/api/persons_api.py +1791 -1945
  37. lusid/api/placements_api.py +411 -404
  38. lusid/api/portfolio_groups_api.py +2810 -2975
  39. lusid/api/portfolios_api.py +3022 -2898
  40. lusid/api/property_definitions_api.py +981 -1267
  41. lusid/api/quotes_api.py +1314 -517
  42. lusid/api/reconciliations_api.py +3548 -855
  43. lusid/api/reference_lists_api.py +388 -388
  44. lusid/api/reference_portfolio_api.py +409 -432
  45. lusid/api/relation_definitions_api.py +538 -0
  46. lusid/api/relations_api.py +414 -0
  47. lusid/api/relationship_definitions_api.py +484 -494
  48. lusid/api/relationships_api.py +204 -222
  49. lusid/api/schemas_api.py +374 -322
  50. lusid/api/scopes_api.py +100 -241
  51. lusid/api/scripted_translation_api.py +784 -795
  52. lusid/api/search_api.py +408 -423
  53. lusid/api/sequences_api.py +376 -404
  54. lusid/api/structured_result_data_api.py +1472 -325
  55. lusid/api/system_configuration_api.py +979 -143
  56. lusid/api/tax_rule_sets_api.py +900 -0
  57. lusid/api/transaction_configuration_api.py +1066 -1104
  58. lusid/api/transaction_fees_api.py +935 -0
  59. lusid/api/transaction_portfolios_api.py +5285 -3517
  60. lusid/api/translation_api.py +364 -0
  61. lusid/api_client.py +195 -124
  62. lusid/api_response.py +25 -0
  63. lusid/configuration.py +58 -81
  64. lusid/exceptions.py +17 -15
  65. lusid/extensions/__init__.py +15 -0
  66. lusid/extensions/api_client.py +764 -0
  67. lusid/extensions/api_client_builder.py +138 -0
  68. lusid/extensions/api_client_factory.py +137 -0
  69. lusid/{utilities → extensions}/api_configuration.py +4 -5
  70. lusid/extensions/configuration_loaders.py +203 -0
  71. lusid/{utilities → extensions}/proxy_config.py +21 -6
  72. lusid/{utilities → extensions}/refreshing_token.py +82 -35
  73. lusid/extensions/rest.py +300 -0
  74. lusid/extensions/retry.py +357 -0
  75. lusid/extensions/socket_keep_alive.py +53 -0
  76. lusid/extensions/tcp_keep_alive_connector.py +66 -0
  77. lusid/models/__init__.py +232 -172
  78. lusid/models/a2_b_breakdown.py +65 -187
  79. lusid/models/a2_b_category.py +60 -154
  80. lusid/models/a2_b_data_record.py +178 -540
  81. lusid/models/a2_b_movement_record.py +192 -635
  82. lusid/models/abor.py +150 -0
  83. lusid/models/abor_configuration.py +159 -0
  84. lusid/models/abor_configuration_properties.py +115 -0
  85. lusid/models/abor_configuration_request.py +145 -0
  86. lusid/models/abor_properties.py +115 -0
  87. lusid/models/abor_request.py +131 -0
  88. lusid/models/access_controlled_action.py +87 -221
  89. lusid/models/access_controlled_resource.py +105 -283
  90. lusid/models/access_metadata_operation.py +84 -234
  91. lusid/models/access_metadata_value.py +58 -166
  92. lusid/models/account.py +126 -0
  93. lusid/models/account_properties.py +115 -0
  94. lusid/models/accounting_method.py +42 -0
  95. lusid/models/accounts_upsert_response.py +110 -0
  96. lusid/models/action_id.py +55 -204
  97. lusid/models/action_result_of_portfolio.py +57 -154
  98. lusid/models/add_business_days_to_date_request.py +63 -214
  99. lusid/models/add_business_days_to_date_response.py +52 -127
  100. lusid/models/additional_payment.py +58 -228
  101. lusid/models/address_definition.py +97 -284
  102. lusid/models/address_key_compliance_parameter.py +80 -166
  103. lusid/models/address_key_definition.py +74 -222
  104. lusid/models/address_key_filter.py +69 -191
  105. lusid/models/address_key_list.py +73 -170
  106. lusid/models/address_key_list_compliance_parameter.py +77 -164
  107. lusid/models/address_key_option_definition.py +69 -293
  108. lusid/models/adjust_holding.py +101 -216
  109. lusid/models/adjust_holding_for_date_request.py +109 -285
  110. lusid/models/adjust_holding_request.py +107 -250
  111. lusid/models/aggregate_spec.py +67 -196
  112. lusid/models/aggregated_return.py +106 -373
  113. lusid/models/aggregated_returns_dispersion_request.py +102 -291
  114. lusid/models/aggregated_returns_request.py +128 -403
  115. lusid/models/aggregated_returns_response.py +95 -186
  116. lusid/models/aggregated_transactions_request.py +131 -0
  117. lusid/models/aggregation_context.py +55 -125
  118. lusid/models/aggregation_measure_failure_detail.py +80 -238
  119. lusid/models/aggregation_op.py +49 -0
  120. lusid/models/aggregation_options.py +55 -189
  121. lusid/models/aggregation_query.py +106 -439
  122. lusid/models/aggregation_type.py +44 -0
  123. lusid/models/allocation.py +207 -737
  124. lusid/models/allocation_request.py +175 -611
  125. lusid/models/allocation_service_run_response.py +102 -0
  126. lusid/models/allocation_set_request.py +64 -126
  127. lusid/models/amortisation_event.py +82 -266
  128. lusid/models/annul_quotes_response.py +99 -217
  129. lusid/models/annul_single_structured_data_response.py +74 -188
  130. lusid/models/annul_structured_data_response.py +99 -217
  131. lusid/models/asset_class.py +44 -0
  132. lusid/models/barrier.py +62 -228
  133. lusid/models/basket.py +85 -229
  134. lusid/models/basket_identifier.py +57 -224
  135. lusid/models/batch_adjust_holdings_response.py +128 -216
  136. lusid/models/batch_upsert_instrument_properties_response.py +101 -223
  137. lusid/models/batch_upsert_portfolio_transactions_response.py +128 -216
  138. lusid/models/batch_upsert_property_definition_properties_response.py +97 -223
  139. lusid/models/block.py +133 -544
  140. lusid/models/block_request.py +108 -448
  141. lusid/models/block_set_request.py +64 -126
  142. lusid/models/bond.py +144 -564
  143. lusid/models/bond_default_event.py +84 -167
  144. lusid/models/book_transactions_response.py +107 -0
  145. lusid/models/bool_compliance_parameter.py +73 -164
  146. lusid/models/bool_list_compliance_parameter.py +77 -164
  147. lusid/models/bucketed_cash_flow_request.py +172 -0
  148. lusid/models/bucketed_cash_flow_response.py +129 -0
  149. lusid/models/bucketing_schedule.py +74 -0
  150. lusid/models/calculation_info.py +73 -0
  151. lusid/models/calendar.py +88 -309
  152. lusid/models/calendar_date.py +84 -407
  153. lusid/models/calendar_dependency.py +73 -166
  154. lusid/models/cap_floor.py +85 -295
  155. lusid/models/cash_dependency.py +76 -199
  156. lusid/models/cash_dividend_event.py +78 -291
  157. lusid/models/cash_flow_event.py +82 -199
  158. lusid/models/cash_flow_lineage.py +91 -276
  159. lusid/models/cash_flow_value.py +90 -289
  160. lusid/models/cash_flow_value_set.py +86 -164
  161. lusid/models/cash_ladder_record.py +58 -216
  162. lusid/models/cash_perpetual.py +78 -231
  163. lusid/models/cds_flow_conventions.py +113 -514
  164. lusid/models/cds_index.py +100 -382
  165. lusid/models/cds_protection_detail_specification.py +57 -230
  166. lusid/models/change.py +110 -357
  167. lusid/models/change_history.py +90 -299
  168. lusid/models/change_history_action.py +39 -0
  169. lusid/models/change_item.py +80 -252
  170. lusid/models/chart_of_accounts.py +135 -0
  171. lusid/models/chart_of_accounts_properties.py +115 -0
  172. lusid/models/chart_of_accounts_request.py +120 -0
  173. lusid/models/client.py +75 -0
  174. lusid/models/close_event.py +76 -197
  175. lusid/models/complete_portfolio.py +142 -495
  176. lusid/models/complete_relation.py +96 -0
  177. lusid/models/complete_relationship.py +88 -378
  178. lusid/models/complex_bond.py +129 -320
  179. lusid/models/complex_market_data.py +81 -151
  180. lusid/models/complex_market_data_id.py +74 -274
  181. lusid/models/compliance_breached_order_info.py +83 -0
  182. lusid/models/compliance_parameter.py +83 -155
  183. lusid/models/compliance_parameter_type.py +53 -0
  184. lusid/models/compliance_rule.py +137 -0
  185. lusid/models/compliance_rule_breakdown.py +76 -257
  186. lusid/models/compliance_rule_breakdown_request.py +76 -252
  187. lusid/models/compliance_rule_response.py +149 -411
  188. lusid/models/compliance_rule_result.py +91 -0
  189. lusid/models/compliance_rule_result_detail.py +91 -414
  190. lusid/models/compliance_rule_result_portfolio_detail.py +57 -159
  191. lusid/models/compliance_rule_upsert_request.py +178 -0
  192. lusid/models/compliance_rule_upsert_response.py +82 -0
  193. lusid/models/compliance_run_info.py +81 -0
  194. lusid/models/compliance_run_info_v2.py +64 -253
  195. lusid/models/compliance_run_summary.py +72 -250
  196. lusid/models/compliance_summary_rule_result.py +97 -342
  197. lusid/models/compliance_summary_rule_result_request.py +97 -348
  198. lusid/models/compliance_template.py +89 -253
  199. lusid/models/compliance_template_parameter.py +55 -201
  200. lusid/models/compliance_template_variation.py +84 -292
  201. lusid/models/composite_breakdown.py +72 -188
  202. lusid/models/composite_breakdown_request.py +97 -281
  203. lusid/models/composite_breakdown_response.py +90 -188
  204. lusid/models/composite_dispersion.py +91 -339
  205. lusid/models/composite_dispersion_response.py +95 -186
  206. lusid/models/compounding.py +76 -299
  207. lusid/models/configuration_recipe.py +123 -362
  208. lusid/models/configuration_recipe_snippet.py +121 -354
  209. lusid/models/constituents_adjustment_header.py +73 -187
  210. lusid/models/contract_for_difference.py +90 -430
  211. lusid/models/corporate_action.py +82 -313
  212. lusid/models/corporate_action_source.py +104 -304
  213. lusid/models/corporate_action_transition.py +69 -155
  214. lusid/models/corporate_action_transition_component.py +59 -262
  215. lusid/models/corporate_action_transition_component_request.py +55 -192
  216. lusid/models/corporate_action_transition_request.py +69 -153
  217. lusid/models/counterparty_agreement.py +73 -292
  218. lusid/models/counterparty_risk_information.py +78 -197
  219. lusid/models/counterparty_signatory.py +57 -161
  220. lusid/models/create_address_key_definition_request.py +53 -163
  221. lusid/models/create_calendar_request.py +94 -262
  222. lusid/models/create_corporate_action_source_request.py +100 -291
  223. lusid/models/create_custom_entity_type_request.py +79 -242
  224. lusid/models/create_cut_label_definition_request.py +85 -256
  225. lusid/models/create_data_map_request.py +79 -0
  226. lusid/models/create_data_type_request.py +143 -462
  227. lusid/models/create_date_request.py +111 -368
  228. lusid/models/create_derived_property_definition_request.py +79 -331
  229. lusid/models/create_derived_transaction_portfolio_request.py +153 -506
  230. lusid/models/create_portfolio_details.py +55 -125
  231. lusid/models/create_portfolio_group_request.py +117 -314
  232. lusid/models/create_property_definition_request.py +98 -424
  233. lusid/models/create_recipe_request.py +90 -0
  234. lusid/models/create_reconciliation_request.py +140 -0
  235. lusid/models/create_reference_portfolio_request.py +102 -317
  236. lusid/models/create_relation_definition_request.py +95 -0
  237. lusid/models/create_relation_request.py +71 -0
  238. lusid/models/create_relationship_definition_request.py +112 -437
  239. lusid/models/create_relationship_request.py +87 -238
  240. lusid/models/create_sequence_request.py +105 -327
  241. lusid/models/create_tax_rule_set_request.py +103 -0
  242. lusid/models/create_transaction_portfolio_request.py +145 -545
  243. lusid/models/create_unit_definition.py +83 -241
  244. lusid/models/credit_default_swap.py +105 -384
  245. lusid/models/credit_rating.py +67 -178
  246. lusid/models/credit_spread_curve_data.py +109 -420
  247. lusid/models/credit_support_annex.py +73 -432
  248. lusid/models/criterion_type.py +39 -0
  249. lusid/models/currency_and_amount.py +58 -153
  250. lusid/models/curve_options.py +110 -0
  251. lusid/models/custodian_account.py +93 -396
  252. lusid/models/custodian_account_properties.py +115 -0
  253. lusid/models/custodian_account_request.py +148 -0
  254. lusid/models/custodian_accounts_upsert_response.py +110 -0
  255. lusid/models/custom_entity_definition.py +79 -323
  256. lusid/models/custom_entity_definition_request.py +79 -242
  257. lusid/models/custom_entity_field.py +73 -222
  258. lusid/models/custom_entity_field_definition.py +71 -296
  259. lusid/models/custom_entity_id.py +91 -280
  260. lusid/models/custom_entity_request.py +78 -228
  261. lusid/models/custom_entity_response.py +118 -382
  262. lusid/models/custom_entity_type.py +79 -323
  263. lusid/models/cut_label_definition.py +105 -324
  264. lusid/models/cut_local_time.py +53 -154
  265. lusid/models/data_definition.py +104 -0
  266. lusid/models/data_map_key.py +101 -0
  267. lusid/models/data_mapping.py +82 -0
  268. lusid/models/data_scope.py +80 -0
  269. lusid/models/data_type.py +139 -477
  270. lusid/models/data_type_summary.py +111 -398
  271. lusid/models/data_type_value_range.py +38 -0
  272. lusid/models/date_attributes.py +140 -371
  273. lusid/models/date_or_diary_entry.py +91 -0
  274. lusid/models/date_range.py +59 -155
  275. lusid/models/date_time_comparison_type.py +38 -0
  276. lusid/models/date_time_compliance_parameter.py +74 -165
  277. lusid/models/date_time_list_compliance_parameter.py +77 -164
  278. lusid/models/day_of_week.py +20 -102
  279. lusid/models/decimal_compliance_parameter.py +73 -164
  280. lusid/models/decimal_list.py +73 -170
  281. lusid/models/decimal_list_compliance_parameter.py +77 -164
  282. lusid/models/decorated_compliance_run_summary.py +65 -156
  283. lusid/models/delete_accounts_response.py +95 -0
  284. lusid/models/delete_custodian_accounts_response.py +103 -0
  285. lusid/models/delete_instrument_properties_response.py +67 -159
  286. lusid/models/delete_instrument_response.py +74 -189
  287. lusid/models/delete_instruments_response.py +74 -189
  288. lusid/models/delete_modes.py +38 -0
  289. lusid/models/delete_relation_request.py +71 -0
  290. lusid/models/delete_relationship_request.py +87 -238
  291. lusid/models/deleted_entity_response.py +81 -219
  292. lusid/models/dependency_source_filter.py +70 -198
  293. lusid/models/described_address_key.py +81 -0
  294. lusid/models/dialect.py +61 -185
  295. lusid/models/dialect_id.py +89 -330
  296. lusid/models/dialect_schema.py +58 -167
  297. lusid/models/diary_entry.py +155 -0
  298. lusid/models/diary_entry_request.py +120 -0
  299. lusid/models/discount_factor_curve_data.py +91 -296
  300. lusid/models/discounting_dependency.py +76 -199
  301. lusid/models/discounting_method.py +39 -0
  302. lusid/models/economic_dependency.py +82 -150
  303. lusid/models/economic_dependency_type.py +50 -0
  304. lusid/models/economic_dependency_with_complex_market_data.py +61 -156
  305. lusid/models/economic_dependency_with_quote.py +68 -186
  306. lusid/models/empty_model_options.py +71 -134
  307. lusid/models/entity_identifier.py +60 -190
  308. lusid/models/equity.py +84 -225
  309. lusid/models/equity_all_of_identifiers.py +83 -415
  310. lusid/models/equity_curve_by_prices_data.py +91 -296
  311. lusid/models/equity_curve_dependency.py +80 -281
  312. lusid/models/equity_model_options.py +73 -169
  313. lusid/models/equity_option.py +117 -554
  314. lusid/models/equity_swap.py +107 -487
  315. lusid/models/equity_vol_dependency.py +80 -275
  316. lusid/models/equity_vol_surface_data.py +101 -267
  317. lusid/models/error_detail.py +77 -216
  318. lusid/models/event_date_range.py +54 -155
  319. lusid/models/ex_dividend_configuration.py +57 -221
  320. lusid/models/exchange_traded_option.py +84 -261
  321. lusid/models/exchange_traded_option_contract_details.py +80 -535
  322. lusid/models/execution.py +144 -673
  323. lusid/models/execution_request.py +119 -577
  324. lusid/models/execution_set_request.py +64 -126
  325. lusid/models/exercise_event.py +85 -228
  326. lusid/models/exotic_instrument.py +79 -199
  327. lusid/models/expanded_group.py +121 -340
  328. lusid/models/fee_rule.py +138 -0
  329. lusid/models/fee_rule_upsert_request.py +142 -0
  330. lusid/models/fee_rule_upsert_response.py +97 -0
  331. lusid/models/field_definition.py +62 -195
  332. lusid/models/field_schema.py +83 -247
  333. lusid/models/field_value.py +60 -165
  334. lusid/models/file_response.py +69 -181
  335. lusid/models/fixed_leg.py +95 -287
  336. lusid/models/fixed_leg_all_of_overrides.py +65 -154
  337. lusid/models/fixed_schedule.py +136 -0
  338. lusid/models/float_schedule.py +147 -0
  339. lusid/models/floating_leg.py +109 -349
  340. lusid/models/flow_convention_name.py +60 -193
  341. lusid/models/flow_conventions.py +120 -542
  342. lusid/models/forward_rate_agreement.py +90 -356
  343. lusid/models/funding_leg.py +89 -259
  344. lusid/models/funding_leg_options.py +91 -0
  345. lusid/models/future.py +100 -388
  346. lusid/models/futures_contract_details.py +112 -537
  347. lusid/models/fx_dependency.py +78 -231
  348. lusid/models/fx_forward.py +97 -481
  349. lusid/models/fx_forward_curve_by_quote_reference.py +114 -387
  350. lusid/models/fx_forward_curve_data.py +95 -360
  351. lusid/models/fx_forward_model_options.py +91 -242
  352. lusid/models/fx_forward_pips_curve_data.py +95 -360
  353. lusid/models/fx_forward_tenor_curve_data.py +117 -420
  354. lusid/models/fx_forward_tenor_pips_curve_data.py +117 -420
  355. lusid/models/fx_forwards_dependency.py +80 -269
  356. lusid/models/fx_option.py +159 -629
  357. lusid/models/fx_rate_schedule.py +111 -0
  358. lusid/models/fx_swap.py +89 -224
  359. lusid/models/fx_tenor_convention.py +53 -166
  360. lusid/models/fx_vol_dependency.py +80 -269
  361. lusid/models/fx_vol_surface_data.py +101 -267
  362. lusid/models/general_ledger_profile_mapping.py +78 -0
  363. lusid/models/general_ledger_profile_request.py +112 -0
  364. lusid/models/general_ledger_profile_response.py +146 -0
  365. lusid/models/get_cds_flow_conventions_response.py +115 -0
  366. lusid/models/get_complex_market_data_response.py +111 -216
  367. lusid/models/get_counterparty_agreement_response.py +97 -215
  368. lusid/models/get_credit_support_annex_response.py +97 -215
  369. lusid/models/get_data_map_response.py +129 -0
  370. lusid/models/get_flow_conventions_response.py +115 -0
  371. lusid/models/get_index_convention_response.py +115 -0
  372. lusid/models/get_instruments_response.py +111 -216
  373. lusid/models/get_quotes_response.py +130 -246
  374. lusid/models/get_recipe_response.py +77 -185
  375. lusid/models/get_reference_portfolio_constituents_response.py +117 -321
  376. lusid/models/get_structured_result_data_response.py +129 -0
  377. lusid/models/get_virtual_document_response.py +129 -0
  378. lusid/models/grouped_result_of_address_key.py +89 -0
  379. lusid/models/holding_adjustment.py +121 -313
  380. lusid/models/holding_adjustment_with_date.py +124 -345
  381. lusid/models/holding_context.py +51 -127
  382. lusid/models/holding_contributor.py +55 -126
  383. lusid/models/holdings_adjustment.py +92 -259
  384. lusid/models/holdings_adjustment_header.py +82 -227
  385. lusid/models/i_unit_definition_dto.py +85 -217
  386. lusid/models/id_selector_definition.py +75 -227
  387. lusid/models/identifier_part_schema.py +74 -295
  388. lusid/models/index_convention.py +100 -388
  389. lusid/models/index_model_options.py +80 -172
  390. lusid/models/index_projection_dependency.py +80 -275
  391. lusid/models/industry_classifier.py +60 -172
  392. lusid/models/inflation_fixing_dependency.py +78 -237
  393. lusid/models/inflation_index_conventions.py +71 -307
  394. lusid/models/inflation_leg.py +120 -455
  395. lusid/models/inflation_linked_bond.py +153 -595
  396. lusid/models/inflation_swap.py +88 -259
  397. lusid/models/informational_error_event.py +78 -237
  398. lusid/models/informational_event.py +88 -262
  399. lusid/models/inline_valuation_request.py +150 -497
  400. lusid/models/inline_valuations_reconciliation_request.py +82 -216
  401. lusid/models/input_transition.py +53 -160
  402. lusid/models/instrument.py +160 -541
  403. lusid/models/instrument_capabilities.py +133 -0
  404. lusid/models/instrument_cash_flow.py +107 -0
  405. lusid/models/instrument_definition.py +93 -251
  406. lusid/models/instrument_definition_format.py +55 -201
  407. lusid/models/instrument_delete_modes.py +38 -0
  408. lusid/models/instrument_event.py +81 -157
  409. lusid/models/instrument_event_holder.py +106 -460
  410. lusid/models/instrument_event_type.py +50 -0
  411. lusid/models/instrument_id_type_descriptor.py +55 -195
  412. lusid/models/instrument_id_value.py +54 -163
  413. lusid/models/instrument_leg.py +82 -143
  414. lusid/models/instrument_list.py +73 -170
  415. lusid/models/instrument_list_compliance_parameter.py +77 -164
  416. lusid/models/instrument_match.py +78 -156
  417. lusid/models/instrument_models.py +78 -186
  418. lusid/models/instrument_payment_diary.py +131 -0
  419. lusid/models/instrument_payment_diary_leg.py +89 -0
  420. lusid/models/instrument_payment_diary_row.py +132 -0
  421. lusid/models/instrument_properties.py +97 -215
  422. lusid/models/instrument_search_property.py +53 -163
  423. lusid/models/instrument_type.py +72 -0
  424. lusid/models/interest_rate_swap.py +110 -322
  425. lusid/models/interest_rate_swaption.py +90 -296
  426. lusid/models/ir_vol_cube_data.py +101 -267
  427. lusid/models/ir_vol_dependency.py +78 -237
  428. lusid/models/is_business_day_response.py +54 -157
  429. lusid/models/je_lines_query_parameters.py +105 -0
  430. lusid/models/journal_entry_line.py +193 -0
  431. lusid/models/journal_entry_lines_query_parameters.py +109 -0
  432. lusid/models/label_value_set.py +51 -129
  433. lusid/models/leg_definition.py +130 -619
  434. lusid/models/legal_entity.py +158 -394
  435. lusid/models/level_step.py +54 -161
  436. lusid/models/life_cycle_event_lineage.py +84 -246
  437. lusid/models/life_cycle_event_value.py +86 -224
  438. lusid/models/link.py +62 -222
  439. lusid/models/list_aggregation_reconciliation.py +73 -211
  440. lusid/models/list_aggregation_response.py +111 -326
  441. lusid/models/list_complex_market_data_with_meta_data_response.py +86 -0
  442. lusid/models/loan_period.py +56 -187
  443. lusid/models/look_up_pricing_model_options.py +75 -198
  444. lusid/models/lusid_instrument.py +98 -166
  445. lusid/models/lusid_problem_details.py +95 -333
  446. lusid/models/lusid_trade_ticket.py +148 -639
  447. lusid/models/lusid_unique_id.py +53 -166
  448. lusid/models/lusid_validation_problem_details.py +106 -362
  449. lusid/models/mapped_string.py +72 -209
  450. lusid/models/mapping.py +93 -281
  451. lusid/models/mapping_rule.py +96 -308
  452. lusid/models/market_context.py +96 -243
  453. lusid/models/market_context_suppliers.py +59 -241
  454. lusid/models/market_data_key_rule.py +114 -462
  455. lusid/models/market_data_options.py +73 -141
  456. lusid/models/market_data_options_type.py +37 -0
  457. lusid/models/market_data_overrides.py +79 -156
  458. lusid/models/market_data_specific_rule.py +115 -494
  459. lusid/models/market_data_type.py +49 -0
  460. lusid/models/market_observable_type.py +41 -0
  461. lusid/models/market_options.py +108 -318
  462. lusid/models/market_quote.py +60 -166
  463. lusid/models/match_criterion.py +95 -0
  464. lusid/models/metric_value.py +58 -155
  465. lusid/models/model_options.py +77 -144
  466. lusid/models/model_options_type.py +44 -0
  467. lusid/models/model_property.py +72 -218
  468. lusid/models/model_schema.py +116 -0
  469. lusid/models/model_selection.py +67 -172
  470. lusid/models/movement_type.py +54 -0
  471. lusid/models/next_value_in_sequence_response.py +66 -158
  472. lusid/models/numeric_comparison_type.py +39 -0
  473. lusid/models/opaque_dependency.py +71 -134
  474. lusid/models/opaque_market_data.py +84 -275
  475. lusid/models/opaque_model_options.py +73 -164
  476. lusid/models/open_event.py +74 -166
  477. lusid/models/operand_type.py +38 -0
  478. lusid/models/operation.py +67 -227
  479. lusid/models/operation_type.py +37 -0
  480. lusid/models/operator.py +43 -0
  481. lusid/models/option_entry.py +71 -0
  482. lusid/models/optionality_schedule.py +118 -0
  483. lusid/models/order.py +173 -706
  484. lusid/models/order_by_spec.py +60 -166
  485. lusid/models/order_flow_configuration.py +51 -129
  486. lusid/models/order_graph_block.py +83 -351
  487. lusid/models/order_graph_block_allocation_detail.py +55 -126
  488. lusid/models/order_graph_block_allocation_synopsis.py +61 -160
  489. lusid/models/order_graph_block_execution_detail.py +55 -126
  490. lusid/models/order_graph_block_execution_synopsis.py +61 -160
  491. lusid/models/order_graph_block_order_detail.py +69 -314
  492. lusid/models/order_graph_block_order_synopsis.py +61 -160
  493. lusid/models/order_graph_block_placement_detail.py +55 -126
  494. lusid/models/order_graph_block_placement_synopsis.py +61 -160
  495. lusid/models/order_graph_placement.py +94 -341
  496. lusid/models/order_graph_placement_allocation_detail.py +55 -126
  497. lusid/models/order_graph_placement_allocation_synopsis.py +61 -160
  498. lusid/models/order_graph_placement_child_placement_detail.py +55 -126
  499. lusid/models/order_graph_placement_execution_detail.py +55 -126
  500. lusid/models/order_graph_placement_execution_synopsis.py +61 -160
  501. lusid/models/order_graph_placement_order_detail.py +55 -126
  502. lusid/models/order_graph_placement_order_synopsis.py +59 -128
  503. lusid/models/order_graph_placement_placement_synopsis.py +61 -160
  504. lusid/models/order_instruction.py +157 -0
  505. lusid/models/order_instruction_request.py +127 -0
  506. lusid/models/order_instruction_set_request.py +82 -0
  507. lusid/models/order_request.py +141 -580
  508. lusid/models/order_set_request.py +64 -126
  509. lusid/models/otc_confirmation.py +55 -125
  510. lusid/models/output_transaction.py +189 -815
  511. lusid/models/output_transition.py +77 -281
  512. lusid/models/package.py +132 -0
  513. lusid/models/package_request.py +111 -0
  514. lusid/models/package_set_request.py +82 -0
  515. lusid/models/paged_resource_list_of_abor.py +113 -0
  516. lusid/models/paged_resource_list_of_abor_configuration.py +113 -0
  517. lusid/models/paged_resource_list_of_account.py +113 -0
  518. lusid/models/paged_resource_list_of_address_key_definition.py +95 -248
  519. lusid/models/paged_resource_list_of_allocation.py +95 -248
  520. lusid/models/paged_resource_list_of_block.py +95 -248
  521. lusid/models/paged_resource_list_of_calendar.py +95 -248
  522. lusid/models/paged_resource_list_of_chart_of_accounts.py +113 -0
  523. lusid/models/paged_resource_list_of_compliance_rule_response.py +95 -248
  524. lusid/models/paged_resource_list_of_compliance_run_info_v2.py +95 -248
  525. lusid/models/paged_resource_list_of_compliance_template.py +95 -248
  526. lusid/models/paged_resource_list_of_corporate_action_source.py +95 -248
  527. lusid/models/paged_resource_list_of_custodian_account.py +113 -0
  528. lusid/models/paged_resource_list_of_custom_entity_definition.py +95 -248
  529. lusid/models/paged_resource_list_of_custom_entity_response.py +95 -248
  530. lusid/models/paged_resource_list_of_custom_entity_type.py +95 -248
  531. lusid/models/paged_resource_list_of_cut_label_definition.py +95 -248
  532. lusid/models/paged_resource_list_of_data_type_summary.py +95 -248
  533. lusid/models/paged_resource_list_of_dialect_id.py +95 -248
  534. lusid/models/paged_resource_list_of_diary_entry.py +113 -0
  535. lusid/models/paged_resource_list_of_execution.py +95 -248
  536. lusid/models/paged_resource_list_of_general_ledger_profile_response.py +113 -0
  537. lusid/models/paged_resource_list_of_instrument.py +95 -248
  538. lusid/models/paged_resource_list_of_instrument_event_holder.py +95 -248
  539. lusid/models/paged_resource_list_of_legal_entity.py +95 -248
  540. lusid/models/paged_resource_list_of_order.py +95 -248
  541. lusid/models/paged_resource_list_of_order_graph_block.py +95 -248
  542. lusid/models/paged_resource_list_of_order_graph_placement.py +95 -248
  543. lusid/models/paged_resource_list_of_order_instruction.py +113 -0
  544. lusid/models/paged_resource_list_of_package.py +113 -0
  545. lusid/models/paged_resource_list_of_participation.py +95 -248
  546. lusid/models/paged_resource_list_of_person.py +95 -248
  547. lusid/models/paged_resource_list_of_placement.py +95 -248
  548. lusid/models/paged_resource_list_of_portfolio_group.py +95 -248
  549. lusid/models/paged_resource_list_of_portfolio_group_search_result.py +95 -248
  550. lusid/models/paged_resource_list_of_portfolio_search_result.py +95 -248
  551. lusid/models/paged_resource_list_of_posting_module_response.py +113 -0
  552. lusid/models/paged_resource_list_of_posting_module_rule.py +113 -0
  553. lusid/models/paged_resource_list_of_property_definition_search_result.py +95 -248
  554. lusid/models/paged_resource_list_of_reconciliation.py +113 -0
  555. lusid/models/paged_resource_list_of_reconciliation_run.py +113 -0
  556. lusid/models/paged_resource_list_of_reconciliation_run_break.py +113 -0
  557. lusid/models/paged_resource_list_of_reference_list_response.py +95 -248
  558. lusid/models/paged_resource_list_of_relationship_definition.py +95 -248
  559. lusid/models/paged_resource_list_of_sequence_definition.py +95 -248
  560. lusid/models/paged_resource_list_of_translation_script_id.py +95 -248
  561. lusid/models/paged_resource_list_of_virtual_row.py +95 -248
  562. lusid/models/participation.py +86 -245
  563. lusid/models/participation_request.py +71 -186
  564. lusid/models/participation_set_request.py +64 -126
  565. lusid/models/performance_return.py +75 -251
  566. lusid/models/performance_returns_metric.py +83 -309
  567. lusid/models/period_type.py +41 -0
  568. lusid/models/perpetual_entity_state.py +39 -0
  569. lusid/models/perpetual_property.py +57 -157
  570. lusid/models/person.py +137 -335
  571. lusid/models/placement.py +161 -698
  572. lusid/models/placement_request.py +136 -614
  573. lusid/models/placement_set_request.py +64 -126
  574. lusid/models/portfolio.py +187 -688
  575. lusid/models/portfolio_cash_flow.py +139 -593
  576. lusid/models/portfolio_cash_ladder.py +116 -250
  577. lusid/models/portfolio_details.py +130 -491
  578. lusid/models/portfolio_entity_id.py +90 -210
  579. lusid/models/portfolio_group.py +138 -402
  580. lusid/models/portfolio_group_id_compliance_parameter.py +77 -164
  581. lusid/models/portfolio_group_id_list.py +81 -167
  582. lusid/models/portfolio_group_id_list_compliance_parameter.py +77 -164
  583. lusid/models/portfolio_group_properties.py +97 -215
  584. lusid/models/portfolio_group_search_result.py +123 -372
  585. lusid/models/portfolio_holding.py +142 -644
  586. lusid/models/portfolio_id_compliance_parameter.py +77 -164
  587. lusid/models/portfolio_id_list.py +81 -167
  588. lusid/models/portfolio_id_list_compliance_parameter.py +77 -164
  589. lusid/models/portfolio_properties.py +97 -215
  590. lusid/models/portfolio_reconciliation_request.py +65 -192
  591. lusid/models/portfolio_result_data_key_rule.py +133 -392
  592. lusid/models/portfolio_return_breakdown.py +109 -492
  593. lusid/models/portfolio_search_result.py +128 -442
  594. lusid/models/portfolio_trade_ticket.py +79 -0
  595. lusid/models/portfolio_type.py +39 -0
  596. lusid/models/portfolios_reconciliation_request.py +62 -188
  597. lusid/models/posting_module_details.py +95 -0
  598. lusid/models/posting_module_request.py +117 -0
  599. lusid/models/posting_module_response.py +139 -0
  600. lusid/models/posting_module_rule.py +94 -0
  601. lusid/models/posting_module_rules_updated_response.py +110 -0
  602. lusid/models/premium.py +56 -193
  603. lusid/models/pricing_context.py +105 -215
  604. lusid/models/pricing_model.py +54 -0
  605. lusid/models/pricing_options.py +80 -434
  606. lusid/models/processed_command.py +67 -224
  607. lusid/models/property_definition.py +221 -736
  608. lusid/models/property_definition_search_result.py +202 -648
  609. lusid/models/property_definition_type.py +38 -0
  610. lusid/models/property_domain.py +73 -0
  611. lusid/models/property_filter.py +87 -228
  612. lusid/models/property_interval.py +68 -221
  613. lusid/models/property_key_compliance_parameter.py +73 -166
  614. lusid/models/property_key_list_compliance_parameter.py +77 -164
  615. lusid/models/property_life_time.py +38 -0
  616. lusid/models/property_schema.py +91 -182
  617. lusid/models/property_type.py +39 -0
  618. lusid/models/property_value.py +68 -184
  619. lusid/models/property_value_equals.py +93 -0
  620. lusid/models/property_value_in.py +93 -0
  621. lusid/models/query_bucketed_cash_flows_request.py +162 -0
  622. lusid/models/query_cash_flows_request.py +96 -0
  623. lusid/models/query_instrument_events_request.py +113 -0
  624. lusid/models/query_trade_tickets_request.py +96 -0
  625. lusid/models/quote.py +87 -313
  626. lusid/models/quote_access_metadata_rule.py +92 -0
  627. lusid/models/quote_access_metadata_rule_id.py +129 -0
  628. lusid/models/quote_dependency.py +78 -240
  629. lusid/models/quote_id.py +57 -161
  630. lusid/models/quote_instrument_id_type.py +45 -0
  631. lusid/models/quote_series_id.py +96 -303
  632. lusid/models/quote_type.py +50 -0
  633. lusid/models/raw_vendor_event.py +84 -232
  634. lusid/models/realised_gain_loss.py +115 -462
  635. lusid/models/reconcile_date_time_rule.py +88 -233
  636. lusid/models/reconcile_numeric_rule.py +88 -233
  637. lusid/models/reconcile_string_rule.py +102 -232
  638. lusid/models/reconciled_transaction.py +69 -215
  639. lusid/models/reconciliation.py +165 -0
  640. lusid/models/reconciliation_break.py +105 -411
  641. lusid/models/reconciliation_break_id.py +88 -0
  642. lusid/models/reconciliation_configuration.py +84 -0
  643. lusid/models/reconciliation_id.py +80 -0
  644. lusid/models/reconciliation_left_right_address_key_pair.py +53 -160
  645. lusid/models/reconciliation_line.py +77 -216
  646. lusid/models/reconciliation_request.py +97 -246
  647. lusid/models/reconciliation_response.py +70 -155
  648. lusid/models/reconciliation_rule.py +74 -143
  649. lusid/models/reconciliation_rule_type.py +40 -0
  650. lusid/models/reconciliation_run.py +95 -0
  651. lusid/models/reconciliation_run_break.py +116 -0
  652. lusid/models/reconciliation_run_id.py +85 -0
  653. lusid/models/reconciliation_side_configuration.py +94 -0
  654. lusid/models/reconciliation_transactions.py +79 -0
  655. lusid/models/reference_data.py +69 -156
  656. lusid/models/reference_instrument.py +77 -239
  657. lusid/models/reference_list.py +77 -146
  658. lusid/models/reference_list_request.py +77 -251
  659. lusid/models/reference_list_response.py +98 -311
  660. lusid/models/reference_list_type.py +42 -0
  661. lusid/models/reference_portfolio_constituent.py +96 -307
  662. lusid/models/reference_portfolio_constituent_request.py +80 -214
  663. lusid/models/reference_portfolio_weight_type.py +39 -0
  664. lusid/models/related_entity.py +105 -349
  665. lusid/models/relation.py +70 -281
  666. lusid/models/relation_definition.py +143 -0
  667. lusid/models/relationship.py +76 -318
  668. lusid/models/relationship_definition.py +111 -448
  669. lusid/models/repo.py +136 -476
  670. lusid/models/reset_event.py +92 -262
  671. lusid/models/resource_id.py +53 -172
  672. lusid/models/resource_list_of_access_controlled_resource.py +95 -248
  673. lusid/models/resource_list_of_access_metadata_value_of.py +100 -248
  674. lusid/models/resource_list_of_address_key_definition.py +95 -248
  675. lusid/models/resource_list_of_aggregated_return.py +113 -0
  676. lusid/models/resource_list_of_aggregation_query.py +95 -248
  677. lusid/models/resource_list_of_allocation.py +95 -248
  678. lusid/models/resource_list_of_block.py +95 -248
  679. lusid/models/resource_list_of_calendar_date.py +95 -248
  680. lusid/models/resource_list_of_change.py +95 -248
  681. lusid/models/resource_list_of_change_history.py +95 -248
  682. lusid/models/resource_list_of_compliance_breached_order_info.py +113 -0
  683. lusid/models/resource_list_of_compliance_rule.py +113 -0
  684. lusid/models/resource_list_of_compliance_rule_result.py +113 -0
  685. lusid/models/resource_list_of_compliance_run_info.py +113 -0
  686. lusid/models/resource_list_of_constituents_adjustment_header.py +95 -248
  687. lusid/models/resource_list_of_corporate_action.py +95 -248
  688. lusid/models/resource_list_of_data_type.py +95 -248
  689. lusid/models/resource_list_of_execution.py +95 -248
  690. lusid/models/resource_list_of_fee_rule.py +113 -0
  691. lusid/models/resource_list_of_get_cds_flow_conventions_response.py +113 -0
  692. lusid/models/resource_list_of_get_counterparty_agreement_response.py +95 -248
  693. lusid/models/resource_list_of_get_credit_support_annex_response.py +95 -248
  694. lusid/models/resource_list_of_get_flow_conventions_response.py +113 -0
  695. lusid/models/resource_list_of_get_index_convention_response.py +113 -0
  696. lusid/models/resource_list_of_get_recipe_response.py +95 -248
  697. lusid/models/resource_list_of_holdings_adjustment_header.py +95 -248
  698. lusid/models/resource_list_of_i_unit_definition_dto.py +95 -248
  699. lusid/models/resource_list_of_instrument_cash_flow.py +113 -0
  700. lusid/models/resource_list_of_instrument_event_holder.py +113 -0
  701. lusid/models/resource_list_of_instrument_id_type_descriptor.py +95 -248
  702. lusid/models/resource_list_of_legal_entity.py +95 -248
  703. lusid/models/resource_list_of_list_complex_market_data_with_meta_data_response.py +113 -0
  704. lusid/models/resource_list_of_mapping.py +95 -248
  705. lusid/models/resource_list_of_order.py +95 -248
  706. lusid/models/resource_list_of_order_instruction.py +113 -0
  707. lusid/models/resource_list_of_package.py +113 -0
  708. lusid/models/resource_list_of_participation.py +95 -248
  709. lusid/models/resource_list_of_performance_return.py +95 -248
  710. lusid/models/resource_list_of_person.py +95 -248
  711. lusid/models/resource_list_of_placement.py +95 -248
  712. lusid/models/resource_list_of_portfolio.py +95 -248
  713. lusid/models/resource_list_of_portfolio_cash_flow.py +95 -248
  714. lusid/models/resource_list_of_portfolio_cash_ladder.py +95 -248
  715. lusid/models/resource_list_of_portfolio_trade_ticket.py +113 -0
  716. lusid/models/resource_list_of_processed_command.py +95 -248
  717. lusid/models/resource_list_of_property.py +95 -248
  718. lusid/models/resource_list_of_property_definition.py +95 -248
  719. lusid/models/resource_list_of_property_interval.py +95 -248
  720. lusid/models/resource_list_of_quote.py +95 -248
  721. lusid/models/resource_list_of_quote_access_metadata_rule.py +113 -0
  722. lusid/models/resource_list_of_reconciliation_break.py +95 -248
  723. lusid/models/resource_list_of_relation.py +95 -248
  724. lusid/models/resource_list_of_relationship.py +95 -248
  725. lusid/models/resource_list_of_scope_definition.py +95 -248
  726. lusid/models/resource_list_of_side_definition.py +95 -248
  727. lusid/models/resource_list_of_string.py +87 -248
  728. lusid/models/resource_list_of_tax_rule_set.py +113 -0
  729. lusid/models/resource_list_of_transaction.py +113 -0
  730. lusid/models/resource_list_of_transaction_type.py +95 -248
  731. lusid/models/resource_list_of_value_type.py +88 -248
  732. lusid/models/response_meta_data.py +77 -216
  733. lusid/models/result_data_key_rule.py +103 -389
  734. lusid/models/result_data_schema.py +108 -184
  735. lusid/models/result_key_rule.py +74 -143
  736. lusid/models/result_key_rule_type.py +39 -0
  737. lusid/models/result_value.py +80 -149
  738. lusid/models/result_value0_d.py +87 -225
  739. lusid/models/result_value_bool.py +73 -165
  740. lusid/models/result_value_currency.py +78 -164
  741. lusid/models/result_value_date_time_offset.py +81 -196
  742. lusid/models/result_value_decimal.py +80 -195
  743. lusid/models/result_value_dictionary.py +89 -163
  744. lusid/models/result_value_int.py +80 -195
  745. lusid/models/result_value_string.py +78 -164
  746. lusid/models/result_value_type.py +48 -0
  747. lusid/models/rounding_configuration.py +55 -125
  748. lusid/models/rounding_configuration_component.py +51 -131
  749. lusid/models/rounding_convention.py +67 -218
  750. lusid/models/scaling_methodology.py +39 -0
  751. lusid/models/schedule.py +77 -143
  752. lusid/models/schedule_type.py +43 -0
  753. lusid/models/scope_definition.py +51 -131
  754. lusid/models/sequence_definition.py +94 -376
  755. lusid/models/set_legal_entity_identifiers_request.py +69 -126
  756. lusid/models/set_legal_entity_properties_request.py +69 -126
  757. lusid/models/set_person_identifiers_request.py +69 -126
  758. lusid/models/set_person_properties_request.py +64 -128
  759. lusid/models/set_transaction_configuration_alias.py +84 -0
  760. lusid/models/set_transaction_configuration_source_request.py +107 -0
  761. lusid/models/side_configuration_data.py +76 -336
  762. lusid/models/side_configuration_data_request.py +79 -0
  763. lusid/models/side_definition.py +90 -390
  764. lusid/models/side_definition_request.py +66 -322
  765. lusid/models/sides_definition_request.py +64 -164
  766. lusid/models/simple_cash_flow_loan.py +88 -263
  767. lusid/models/simple_instrument.py +94 -301
  768. lusid/models/sort_order.py +38 -0
  769. lusid/models/step_schedule.py +85 -236
  770. lusid/models/stock_split_event.py +78 -231
  771. lusid/models/stream.py +70 -328
  772. lusid/models/string_comparison_type.py +41 -0
  773. lusid/models/string_compliance_parameter.py +73 -167
  774. lusid/models/string_list.py +73 -170
  775. lusid/models/string_list_compliance_parameter.py +77 -164
  776. lusid/models/structured_result_data.py +91 -0
  777. lusid/models/structured_result_data_id.py +107 -0
  778. lusid/models/sub_holding_key_value_equals.py +93 -0
  779. lusid/models/target_tax_lot.py +86 -278
  780. lusid/models/target_tax_lot_request.py +86 -278
  781. lusid/models/tax_rule.py +97 -0
  782. lusid/models/tax_rule_set.py +124 -0
  783. lusid/models/term_deposit.py +93 -323
  784. lusid/models/total_return_swap.py +88 -259
  785. lusid/models/touch.py +62 -228
  786. lusid/models/trade_ticket.py +76 -0
  787. lusid/models/trade_ticket_type.py +38 -0
  788. lusid/models/transaction.py +181 -782
  789. lusid/models/transaction_configuration_data.py +89 -190
  790. lusid/models/transaction_configuration_data_request.py +89 -190
  791. lusid/models/transaction_configuration_movement_data.py +110 -320
  792. lusid/models/transaction_configuration_movement_data_request.py +110 -320
  793. lusid/models/transaction_configuration_type_alias.py +90 -339
  794. lusid/models/transaction_price.py +63 -162
  795. lusid/models/transaction_price_type.py +39 -0
  796. lusid/models/transaction_property_mapping.py +65 -188
  797. lusid/models/transaction_property_mapping_request.py +65 -188
  798. lusid/models/transaction_query_mode.py +38 -0
  799. lusid/models/transaction_query_parameters.py +67 -234
  800. lusid/models/transaction_reconciliation_request.py +84 -302
  801. lusid/models/transaction_reconciliation_request_v2.py +115 -0
  802. lusid/models/transaction_request.py +143 -625
  803. lusid/models/transaction_roles.py +44 -0
  804. lusid/models/transaction_set_configuration_data.py +89 -188
  805. lusid/models/transaction_set_configuration_data_request.py +92 -0
  806. lusid/models/transaction_status.py +39 -0
  807. lusid/models/transaction_type.py +119 -250
  808. lusid/models/transaction_type_alias.py +80 -282
  809. lusid/models/transaction_type_calculation.py +60 -172
  810. lusid/models/transaction_type_movement.py +128 -366
  811. lusid/models/transaction_type_property_mapping.py +75 -197
  812. lusid/models/transaction_type_request.py +104 -220
  813. lusid/models/transactions_reconciliations_response.py +70 -155
  814. lusid/models/transition_event.py +101 -318
  815. lusid/models/translate_entities_inlined_request.py +72 -195
  816. lusid/models/translate_entities_request.py +76 -187
  817. lusid/models/translate_entities_response.py +104 -186
  818. lusid/models/translate_instrument_definitions_request.py +91 -0
  819. lusid/models/translate_instrument_definitions_response.py +129 -0
  820. lusid/models/translate_trade_ticket_request.py +91 -0
  821. lusid/models/translate_trade_tickets_response.py +129 -0
  822. lusid/models/translation_input.py +51 -134
  823. lusid/models/translation_result.py +66 -163
  824. lusid/models/translation_script.py +57 -193
  825. lusid/models/translation_script_id.py +76 -219
  826. lusid/models/trial_balance.py +103 -0
  827. lusid/models/trial_balance_query_parameters.py +102 -0
  828. lusid/models/trigger_event.py +82 -301
  829. lusid/models/typed_resource_id.py +76 -219
  830. lusid/models/underlying_leg.py +75 -0
  831. lusid/models/unit_schema.py +39 -0
  832. lusid/models/unmatched_holding_method.py +38 -0
  833. lusid/models/update_calendar_request.py +74 -195
  834. lusid/models/update_custom_entity_definition_request.py +77 -204
  835. lusid/models/update_custom_entity_type_request.py +77 -204
  836. lusid/models/update_cut_label_definition_request.py +83 -226
  837. lusid/models/update_data_type_request.py +105 -234
  838. lusid/models/update_derived_property_definition_request.py +66 -229
  839. lusid/models/update_instrument_identifier_request.py +65 -191
  840. lusid/models/update_portfolio_group_request.py +58 -161
  841. lusid/models/update_portfolio_request.py +58 -161
  842. lusid/models/update_property_definition_request.py +58 -164
  843. lusid/models/update_reconciliation_request.py +131 -0
  844. lusid/models/update_relationship_definition_request.py +76 -219
  845. lusid/models/update_tax_rule_set_request.py +95 -0
  846. lusid/models/update_unit_request.py +100 -207
  847. lusid/models/upsert_cds_flow_conventions_request.py +73 -0
  848. lusid/models/upsert_complex_market_data_request.py +61 -156
  849. lusid/models/upsert_compliance_rule_request.py +113 -380
  850. lusid/models/upsert_compliance_run_summary_request.py +72 -250
  851. lusid/models/upsert_corporate_action_request.py +94 -337
  852. lusid/models/upsert_corporate_actions_response.py +111 -216
  853. lusid/models/upsert_counterparty_agreement_request.py +55 -126
  854. lusid/models/upsert_credit_support_annex_request.py +55 -125
  855. lusid/models/upsert_custom_entities_response.py +111 -216
  856. lusid/models/upsert_custom_entity_access_metadata_request.py +64 -126
  857. lusid/models/upsert_flow_conventions_request.py +73 -0
  858. lusid/models/upsert_index_convention_request.py +73 -0
  859. lusid/models/upsert_instrument_event_request.py +98 -329
  860. lusid/models/upsert_instrument_events_response.py +111 -216
  861. lusid/models/upsert_instrument_properties_response.py +67 -159
  862. lusid/models/upsert_instrument_property_request.py +68 -196
  863. lusid/models/upsert_instruments_response.py +135 -246
  864. lusid/models/upsert_legal_entities_response.py +111 -216
  865. lusid/models/upsert_legal_entity_access_metadata_request.py +64 -126
  866. lusid/models/upsert_legal_entity_request.py +115 -267
  867. lusid/models/upsert_person_access_metadata_request.py +64 -126
  868. lusid/models/upsert_person_request.py +92 -232
  869. lusid/models/upsert_portfolio_access_metadata_request.py +59 -128
  870. lusid/models/upsert_portfolio_group_access_metadata_request.py +59 -128
  871. lusid/models/upsert_portfolio_transactions_response.py +101 -216
  872. lusid/models/upsert_quote_access_metadata_rule_request.py +92 -0
  873. lusid/models/upsert_quote_request.py +75 -215
  874. lusid/models/upsert_quotes_response.py +111 -216
  875. lusid/models/upsert_recipe_request.py +61 -125
  876. lusid/models/upsert_reconciliation_break_request.py +98 -0
  877. lusid/models/upsert_reconciliation_run_request.py +71 -0
  878. lusid/models/upsert_reference_portfolio_constituents_request.py +94 -265
  879. lusid/models/upsert_reference_portfolio_constituents_response.py +77 -183
  880. lusid/models/upsert_result_values_data_request.py +93 -0
  881. lusid/models/upsert_returns_response.py +100 -247
  882. lusid/models/upsert_single_structured_data_response.py +74 -188
  883. lusid/models/upsert_structured_data_response.py +99 -217
  884. lusid/models/upsert_structured_result_data_request.py +79 -0
  885. lusid/models/upsert_transaction_properties_response.py +97 -213
  886. lusid/models/user.py +56 -126
  887. lusid/models/valuation_request.py +156 -528
  888. lusid/models/valuation_schedule.py +86 -329
  889. lusid/models/valuations_reconciliation_request.py +82 -216
  890. lusid/models/value_type.py +34 -116
  891. lusid/models/vendor_dependency.py +95 -0
  892. lusid/models/vendor_library.py +43 -0
  893. lusid/models/vendor_model_rule.py +97 -335
  894. lusid/models/version.py +110 -371
  895. lusid/models/version_summary_dto.py +85 -210
  896. lusid/models/versioned_resource_list_of_a2_b_data_record.py +101 -278
  897. lusid/models/versioned_resource_list_of_a2_b_movement_record.py +101 -278
  898. lusid/models/versioned_resource_list_of_holding_contributor.py +101 -278
  899. lusid/models/versioned_resource_list_of_journal_entry_line.py +119 -0
  900. lusid/models/versioned_resource_list_of_output_transaction.py +101 -278
  901. lusid/models/versioned_resource_list_of_portfolio_holding.py +101 -278
  902. lusid/models/versioned_resource_list_of_transaction.py +101 -278
  903. lusid/models/versioned_resource_list_of_trial_balance.py +119 -0
  904. lusid/models/versioned_resource_list_with_warnings_of_portfolio_holding.py +134 -0
  905. lusid/models/virtual_document.py +88 -0
  906. lusid/models/virtual_document_row.py +80 -0
  907. lusid/models/virtual_row.py +76 -156
  908. lusid/models/warning.py +71 -0
  909. lusid/models/weekend_mask.py +61 -165
  910. lusid/models/weighted_instrument.py +64 -220
  911. lusid/models/weighted_instruments.py +59 -128
  912. lusid/models/yield_curve_data.py +107 -296
  913. lusid/py.typed +0 -0
  914. lusid/rest.py +171 -237
  915. lusid_sdk-2.0.50b0.dist-info/METADATA +1460 -0
  916. lusid_sdk-2.0.50b0.dist-info/RECORD +917 -0
  917. {lusid_sdk-1.1.118.dist-info → lusid_sdk-2.0.50b0.dist-info}/WHEEL +1 -2
  918. lusid/__version__.py +0 -1
  919. lusid/models/accumulation_event.py +0 -310
  920. lusid/models/accumulation_event_all_of.py +0 -310
  921. lusid/models/address_key_compliance_parameter_all_of.py +0 -184
  922. lusid/models/address_key_list_all_of.py +0 -188
  923. lusid/models/address_key_list_compliance_parameter_all_of.py +0 -182
  924. lusid/models/amortisation_event_all_of.py +0 -283
  925. lusid/models/asset_leg.py +0 -179
  926. lusid/models/basket_all_of.py +0 -247
  927. lusid/models/block_and_order_id_request.py +0 -174
  928. lusid/models/block_and_orders.py +0 -174
  929. lusid/models/block_and_orders_create_request.py +0 -152
  930. lusid/models/block_and_orders_request.py +0 -422
  931. lusid/models/blocked_order_request.py +0 -412
  932. lusid/models/bond_all_of.py +0 -581
  933. lusid/models/bond_coupon_event.py +0 -280
  934. lusid/models/bond_coupon_event_all_of.py +0 -280
  935. lusid/models/bond_default_event_all_of.py +0 -184
  936. lusid/models/bond_principal_event.py +0 -280
  937. lusid/models/bond_principal_event_all_of.py +0 -280
  938. lusid/models/bool_compliance_parameter_all_of.py +0 -182
  939. lusid/models/branch_step.py +0 -219
  940. lusid/models/branch_step_all_of.py +0 -219
  941. lusid/models/calendar_dependency_all_of.py +0 -184
  942. lusid/models/cap_floor_all_of.py +0 -313
  943. lusid/models/cash_dependency_all_of.py +0 -216
  944. lusid/models/cash_dividend_event_all_of.py +0 -308
  945. lusid/models/cash_election.py +0 -334
  946. lusid/models/cash_flow_event_all_of.py +0 -217
  947. lusid/models/cash_flow_value_all_of.py +0 -306
  948. lusid/models/cash_flow_value_set_all_of.py +0 -182
  949. lusid/models/cash_perpetual_all_of.py +0 -248
  950. lusid/models/cds_index_all_of.py +0 -399
  951. lusid/models/check_step.py +0 -251
  952. lusid/models/check_step_all_of.py +0 -251
  953. lusid/models/close_event_all_of.py +0 -214
  954. lusid/models/complex_bond_all_of.py +0 -338
  955. lusid/models/compliance_rule_result_v2.py +0 -267
  956. lusid/models/compliance_step.py +0 -167
  957. lusid/models/constant_volatility_surface.py +0 -285
  958. lusid/models/constant_volatility_surface_all_of.py +0 -285
  959. lusid/models/contract_for_difference_all_of.py +0 -447
  960. lusid/models/create_trade_tickets_response.py +0 -174
  961. lusid/models/credit_default_swap_all_of.py +0 -401
  962. lusid/models/credit_spread_curve_data_all_of.py +0 -437
  963. lusid/models/date_time_compliance_parameter_all_of.py +0 -182
  964. lusid/models/decimal_compliance_parameter_all_of.py +0 -182
  965. lusid/models/decimal_list_all_of.py +0 -188
  966. lusid/models/discount_factor_curve_data_all_of.py +0 -313
  967. lusid/models/discounting_dependency_all_of.py +0 -216
  968. lusid/models/dividend_option_event.py +0 -371
  969. lusid/models/dividend_option_event_all_of.py +0 -371
  970. lusid/models/dividend_reinvestment_event.py +0 -342
  971. lusid/models/dividend_reinvestment_event_all_of.py +0 -342
  972. lusid/models/empty_model_options_all_of.py +0 -152
  973. lusid/models/equity_all_of.py +0 -243
  974. lusid/models/equity_curve_by_prices_data_all_of.py +0 -313
  975. lusid/models/equity_curve_dependency_all_of.py +0 -298
  976. lusid/models/equity_model_options_all_of.py +0 -187
  977. lusid/models/equity_option_all_of.py +0 -571
  978. lusid/models/equity_swap_all_of.py +0 -504
  979. lusid/models/equity_vol_dependency_all_of.py +0 -292
  980. lusid/models/equity_vol_surface_data_all_of.py +0 -284
  981. lusid/models/exchange_traded_option_all_of.py +0 -278
  982. lusid/models/exercise_event_all_of.py +0 -245
  983. lusid/models/exotic_instrument_all_of.py +0 -217
  984. lusid/models/filter_predicate_compliance_parameter.py +0 -185
  985. lusid/models/filter_predicate_compliance_parameter_all_of.py +0 -185
  986. lusid/models/filter_step.py +0 -219
  987. lusid/models/fixed_leg_all_of.py +0 -304
  988. lusid/models/flexible_loan.py +0 -280
  989. lusid/models/flexible_loan_all_of.py +0 -280
  990. lusid/models/floating_leg_all_of.py +0 -366
  991. lusid/models/forward_rate_agreement_all_of.py +0 -373
  992. lusid/models/fund_share_class.py +0 -324
  993. lusid/models/fund_share_class_all_of.py +0 -324
  994. lusid/models/funding_leg_all_of.py +0 -276
  995. lusid/models/future_all_of.py +0 -405
  996. lusid/models/fx_conventions.py +0 -216
  997. lusid/models/fx_dependency_all_of.py +0 -248
  998. lusid/models/fx_forward_all_of.py +0 -498
  999. lusid/models/fx_forward_curve_by_quote_reference_all_of.py +0 -405
  1000. lusid/models/fx_forward_curve_data_all_of.py +0 -377
  1001. lusid/models/fx_forward_model_options_all_of.py +0 -260
  1002. lusid/models/fx_forward_pips_curve_data_all_of.py +0 -377
  1003. lusid/models/fx_forward_settlement_event.py +0 -494
  1004. lusid/models/fx_forward_settlement_event_all_of.py +0 -494
  1005. lusid/models/fx_forward_tenor_curve_data_all_of.py +0 -437
  1006. lusid/models/fx_forward_tenor_pips_curve_data_all_of.py +0 -437
  1007. lusid/models/fx_forwards_dependency_all_of.py +0 -286
  1008. lusid/models/fx_linked_notional_schedule.py +0 -273
  1009. lusid/models/fx_linked_notional_schedule_all_of.py +0 -273
  1010. lusid/models/fx_option_all_of.py +0 -646
  1011. lusid/models/fx_swap_all_of.py +0 -242
  1012. lusid/models/fx_vol_dependency_all_of.py +0 -286
  1013. lusid/models/group_by_selector_compliance_parameter.py +0 -185
  1014. lusid/models/group_by_step.py +0 -219
  1015. lusid/models/group_filter_predicate_compliance_parameter.py +0 -185
  1016. lusid/models/group_filter_step.py +0 -251
  1017. lusid/models/group_of_market_data_key_rules.py +0 -181
  1018. lusid/models/index_model_options_all_of.py +0 -190
  1019. lusid/models/index_projection_dependency_all_of.py +0 -292
  1020. lusid/models/inflation_fixing_dependency_all_of.py +0 -254
  1021. lusid/models/inflation_leg_all_of.py +0 -472
  1022. lusid/models/inflation_linked_bond_all_of.py +0 -612
  1023. lusid/models/inflation_swap_all_of.py +0 -276
  1024. lusid/models/informational_error_event_all_of.py +0 -254
  1025. lusid/models/informational_event_all_of.py +0 -279
  1026. lusid/models/instrument_event_configuration.py +0 -142
  1027. lusid/models/instrument_leg_all_of.py +0 -152
  1028. lusid/models/instrument_list_all_of.py +0 -188
  1029. lusid/models/interest_rate_swap_all_of.py +0 -339
  1030. lusid/models/interest_rate_swaption_all_of.py +0 -313
  1031. lusid/models/ir_vol_cube_data_all_of.py +0 -284
  1032. lusid/models/ir_vol_dependency_all_of.py +0 -254
  1033. lusid/models/life_cycle_event_value_all_of.py +0 -241
  1034. lusid/models/lineage_member.py +0 -294
  1035. lusid/models/look_up_pricing_model_options_all_of.py +0 -216
  1036. lusid/models/maturity_event.py +0 -184
  1037. lusid/models/maturity_event_all_of.py +0 -184
  1038. lusid/models/move_orders_to_different_blocks_request.py +0 -152
  1039. lusid/models/moved_order_to_different_block_response.py +0 -201
  1040. lusid/models/opaque_dependency_all_of.py +0 -152
  1041. lusid/models/opaque_market_data_all_of.py +0 -293
  1042. lusid/models/opaque_model_options_all_of.py +0 -182
  1043. lusid/models/open_event_all_of.py +0 -183
  1044. lusid/models/paged_resource_list_of_property_definition.py +0 -266
  1045. lusid/models/place_blocks_request.py +0 -152
  1046. lusid/models/portfolio_group_id_list_all_of.py +0 -185
  1047. lusid/models/portfolio_result_data_key_rule_all_of.py +0 -409
  1048. lusid/models/property_key_compliance_parameter_all_of.py +0 -184
  1049. lusid/models/quote_dependency_all_of.py +0 -257
  1050. lusid/models/raw_vendor_event_all_of.py +0 -249
  1051. lusid/models/recombine_step.py +0 -219
  1052. lusid/models/reconcile_date_time_rule_all_of.py +0 -251
  1053. lusid/models/reconcile_numeric_rule_all_of.py +0 -251
  1054. lusid/models/reconcile_string_rule_all_of.py +0 -250
  1055. lusid/models/reference_instrument_all_of.py +0 -257
  1056. lusid/models/relative_date_offset.py +0 -181
  1057. lusid/models/repo_all_of.py +0 -493
  1058. lusid/models/reset_event_all_of.py +0 -279
  1059. lusid/models/resource_list_of_block_and_orders.py +0 -266
  1060. lusid/models/resource_list_of_moved_order_to_different_block_response.py +0 -266
  1061. lusid/models/result_data_key_rule_all_of.py +0 -406
  1062. lusid/models/result_value0_d_all_of.py +0 -243
  1063. lusid/models/result_value_bool_all_of.py +0 -183
  1064. lusid/models/result_value_currency_all_of.py +0 -182
  1065. lusid/models/result_value_date_time_offset_all_of.py +0 -213
  1066. lusid/models/result_value_decimal_all_of.py +0 -213
  1067. lusid/models/result_value_dictionary_all_of.py +0 -182
  1068. lusid/models/result_value_int_all_of.py +0 -213
  1069. lusid/models/result_value_string_all_of.py +0 -182
  1070. lusid/models/schema.py +0 -228
  1071. lusid/models/script_map_reference.py +0 -237
  1072. lusid/models/security_election.py +0 -270
  1073. lusid/models/simple_cash_flow_loan_all_of.py +0 -280
  1074. lusid/models/simple_instrument_all_of.py +0 -318
  1075. lusid/models/step_schedule_all_of.py +0 -254
  1076. lusid/models/stock_split_event_all_of.py +0 -248
  1077. lusid/models/string_compliance_parameter_all_of.py +0 -185
  1078. lusid/models/term_deposit_all_of.py +0 -340
  1079. lusid/models/total_return_swap_all_of.py +0 -276
  1080. lusid/models/transition_event_all_of.py +0 -335
  1081. lusid/models/translation_context.py +0 -172
  1082. lusid/models/trigger_event_all_of.py +0 -318
  1083. lusid/models/units_ratio.py +0 -178
  1084. lusid/models/upsert_compliance_run_summary_result.py +0 -267
  1085. lusid/models/upsert_dialect_request.py +0 -174
  1086. lusid/models/upsert_translation_script_request.py +0 -182
  1087. lusid/models/weighted_instrument_in_line_lookup_identifiers.py +0 -433
  1088. lusid/models/yield_curve_data_all_of.py +0 -313
  1089. lusid/tcp/__init__.py +0 -1
  1090. lusid/tcp/tcp_keep_alive_probes.py +0 -110
  1091. lusid/utilities/__init__.py +0 -8
  1092. lusid/utilities/api_client_builder.py +0 -145
  1093. lusid/utilities/api_client_factory.py +0 -132
  1094. lusid/utilities/api_configuration_loader.py +0 -87
  1095. lusid/utilities/config_keys.json +0 -50
  1096. lusid/utilities/config_keys.py +0 -13
  1097. lusid/utilities/lusid_retry.py +0 -47
  1098. lusid_sdk-1.1.118.dist-info/METADATA +0 -21
  1099. lusid_sdk-1.1.118.dist-info/RECORD +0 -848
  1100. lusid_sdk-1.1.118.dist-info/top_level.txt +0 -1
@@ -0,0 +1,357 @@
1
+ import time
2
+ from typing import overload
3
+
4
+ from lusid import ApiException
5
+ import asyncio
6
+
7
+
8
+ class RetryingRestWrapper:
9
+ """Wrapper for HTTP requests
10
+ Which retries on failure
11
+ And waits the amount of time specified in the Retry After header.
12
+ """
13
+ def __init__(self, rest_object, retries: int = 3):
14
+ if not isinstance(retries, int):
15
+ raise ValueError(f"retries should be an int, found {type(self.retries)}")
16
+ self.retries: int = retries
17
+ self.rest_object = rest_object
18
+
19
+ def request(
20
+ self,
21
+ method,
22
+ url,
23
+ query_params=None,
24
+ headers=None,
25
+ body=None,
26
+ post_params=None,
27
+ _preload_content=True,
28
+ _request_timeout=None,
29
+ ):
30
+ tries = 0
31
+ while tries < self.retries + 1:
32
+ try:
33
+ return self.rest_object.request(
34
+ method,
35
+ url,
36
+ query_params,
37
+ headers,
38
+ body,
39
+ post_params,
40
+ _preload_content,
41
+ _request_timeout,
42
+ )
43
+ except ApiException as ex:
44
+
45
+ retry_after = ex.headers.get("Retry-After")
46
+
47
+ # have done max number of retries
48
+ if tries >= self.retries:
49
+ raise
50
+
51
+ # try after delay
52
+ elif retry_after is not None:
53
+ if not isinstance(retry_after, float):
54
+ try:
55
+ retry_after = float(retry_after)
56
+ except ValueError:
57
+ raise ValueError(
58
+ f"invalid Retry-After header value: {retry_after}"
59
+ )
60
+ time.sleep(retry_after)
61
+ # no retry header
62
+ else:
63
+ raise
64
+ tries += 1
65
+
66
+ def get_request(
67
+ self,
68
+ url,
69
+ headers=None,
70
+ query_params=None,
71
+ _preload_content=True,
72
+ _request_timeout=None,
73
+ ):
74
+ return self.request("GET", url,
75
+ headers=headers,
76
+ _preload_content=_preload_content,
77
+ _request_timeout=_request_timeout,
78
+ query_params=query_params)
79
+
80
+ def head_request(
81
+ self,
82
+ url,
83
+ headers=None,
84
+ query_params=None,
85
+ _preload_content=True,
86
+ _request_timeout=None,
87
+ ):
88
+ return self.request("HEAD", url,
89
+ headers=headers,
90
+ _preload_content=_preload_content,
91
+ _request_timeout=_request_timeout,
92
+ query_params=query_params)
93
+
94
+ def options_request(
95
+ self,
96
+ url,
97
+ headers=None,
98
+ query_params=None,
99
+ post_params=None,
100
+ body=None,
101
+ _preload_content=True,
102
+ _request_timeout=None,
103
+ ):
104
+ return self.request("OPTIONS", url,
105
+ headers=headers,
106
+ query_params=query_params,
107
+ post_params=post_params,
108
+ _preload_content=_preload_content,
109
+ _request_timeout=_request_timeout,
110
+ body=body)
111
+
112
+ def delete_request(
113
+ self,
114
+ url,
115
+ headers=None,
116
+ query_params=None,
117
+ body=None,
118
+ _preload_content=True,
119
+ _request_timeout=None,
120
+ ):
121
+ return self.request("DELETE", url,
122
+ headers=headers,
123
+ query_params=query_params,
124
+ _preload_content=_preload_content,
125
+ _request_timeout=_request_timeout,
126
+ body=body)
127
+
128
+ def post_request(
129
+ self,
130
+ url,
131
+ headers=None,
132
+ query_params=None,
133
+ post_params=None,
134
+ body=None,
135
+ _preload_content=True,
136
+ _request_timeout=None,
137
+ ):
138
+ return self.request("POST", url,
139
+ headers=headers,
140
+ query_params=query_params,
141
+ post_params=post_params,
142
+ _preload_content=_preload_content,
143
+ _request_timeout=_request_timeout,
144
+ body=body)
145
+
146
+ def put_request(
147
+ self,
148
+ url,
149
+ headers=None,
150
+ query_params=None,
151
+ post_params=None,
152
+ body=None,
153
+ _preload_content=True,
154
+ _request_timeout=None,
155
+ ):
156
+ return self.request("PUT", url,
157
+ headers=headers,
158
+ query_params=query_params,
159
+ post_params=post_params,
160
+ _preload_content=_preload_content,
161
+ _request_timeout=_request_timeout,
162
+ body=body)
163
+
164
+ def patch_request(
165
+ self,
166
+ url,
167
+ headers=None,
168
+ query_params=None,
169
+ post_params=None,
170
+ body=None,
171
+ _preload_content=True,
172
+ _request_timeout=None,
173
+ ):
174
+ return self.request("PATCH", url,
175
+ headers=headers,
176
+ query_params=query_params,
177
+ post_params=post_params,
178
+ _preload_content=_preload_content,
179
+ _request_timeout=_request_timeout,
180
+ body=body)
181
+
182
+
183
+ class RetryingRestWrapperAsync:
184
+ """Wrapper for HTTP requests
185
+ Which retries on failure
186
+ And waits the amount of time specified in the Retry After header.
187
+ """
188
+ def __init__(self, rest_object, retries: int = 3):
189
+ if not isinstance(retries, int):
190
+ raise ValueError(f"retries should be an int, found {type(self.retries)}")
191
+ self.retries: int = retries
192
+ self.rest_object = rest_object
193
+
194
+ async def close(self):
195
+ await self.rest_object.close()
196
+
197
+ async def request(
198
+ self,
199
+ method,
200
+ url,
201
+ query_params=None,
202
+ headers=None,
203
+ body=None,
204
+ post_params=None,
205
+ _preload_content=True,
206
+ _request_timeout=None,
207
+ ):
208
+ tries = 0
209
+ while tries < self.retries + 1:
210
+ try:
211
+ return await self.rest_object.request(
212
+ method,
213
+ url,
214
+ query_params,
215
+ headers,
216
+ body,
217
+ post_params,
218
+ _preload_content,
219
+ _request_timeout,
220
+ )
221
+ except ApiException as ex:
222
+ retry_after = ex.headers.get("Retry-After")
223
+
224
+ # have done max number of retries
225
+ if tries >= self.retries:
226
+ raise
227
+
228
+ # try after delay
229
+ elif retry_after is not None:
230
+ if not isinstance(retry_after, float):
231
+ try:
232
+ retry_after = float(retry_after)
233
+ except ValueError:
234
+ raise ValueError(
235
+ f"invalid Retry-After header value: {retry_after}"
236
+ )
237
+ await asyncio.sleep(retry_after)
238
+ # no retry header
239
+ else:
240
+ raise
241
+ tries += 1
242
+
243
+ async def get_request(
244
+ self,
245
+ url,
246
+ headers=None,
247
+ query_params=None,
248
+ _preload_content=True,
249
+ _request_timeout=None,
250
+ ):
251
+ return (await self.request("GET", url,
252
+ headers=headers,
253
+ _preload_content=_preload_content,
254
+ _request_timeout=_request_timeout,
255
+ query_params=query_params))
256
+
257
+ async def head_request(
258
+ self,
259
+ url,
260
+ headers=None,
261
+ query_params=None,
262
+ _preload_content=True,
263
+ _request_timeout=None,
264
+ ):
265
+ return (await self.request("HEAD", url,
266
+ headers=headers,
267
+ _preload_content=_preload_content,
268
+ _request_timeout=_request_timeout,
269
+ query_params=query_params))
270
+
271
+ async def options_request(
272
+ self,
273
+ url,
274
+ headers=None,
275
+ query_params=None,
276
+ post_params=None,
277
+ body=None,
278
+ _preload_content=True,
279
+ _request_timeout=None,
280
+ ):
281
+ return (await self.request("OPTIONS", url,
282
+ headers=headers,
283
+ query_params=query_params,
284
+ post_params=post_params,
285
+ _preload_content=_preload_content,
286
+ _request_timeout=_request_timeout,
287
+ body=body))
288
+
289
+ async def delete_request(
290
+ self,
291
+ url,
292
+ headers=None,
293
+ query_params=None,
294
+ body=None,
295
+ _preload_content=True,
296
+ _request_timeout=None,
297
+ ):
298
+ return (await self.request("DELETE", url,
299
+ headers=headers,
300
+ query_params=query_params,
301
+ _preload_content=_preload_content,
302
+ _request_timeout=_request_timeout,
303
+ body=body))
304
+
305
+ async def post_request(
306
+ self,
307
+ url,
308
+ headers=None,
309
+ query_params=None,
310
+ post_params=None,
311
+ body=None,
312
+ _preload_content=True,
313
+ _request_timeout=None,
314
+ ):
315
+ return (await self.request("POST", url,
316
+ headers=headers,
317
+ query_params=query_params,
318
+ post_params=post_params,
319
+ _preload_content=_preload_content,
320
+ _request_timeout=_request_timeout,
321
+ body=body))
322
+
323
+ async def put_request(
324
+ self,
325
+ url,
326
+ headers=None,
327
+ query_params=None,
328
+ post_params=None,
329
+ body=None,
330
+ _preload_content=True,
331
+ _request_timeout=None,
332
+ ):
333
+ return (await self.request("PUT", url,
334
+ headers=headers,
335
+ query_params=query_params,
336
+ post_params=post_params,
337
+ _preload_content=_preload_content,
338
+ _request_timeout=_request_timeout,
339
+ body=body))
340
+
341
+ async def patch_request(
342
+ self,
343
+ url,
344
+ headers=None,
345
+ query_params=None,
346
+ post_params=None,
347
+ body=None,
348
+ _preload_content=True,
349
+ _request_timeout=None,
350
+ ):
351
+ return (await self.request("PATCH", url,
352
+ headers=headers,
353
+ query_params=query_params,
354
+ post_params=post_params,
355
+ _preload_content=_preload_content,
356
+ _request_timeout=_request_timeout,
357
+ body=body))
@@ -0,0 +1,53 @@
1
+ from typing import Sequence
2
+ import socket
3
+ import logging
4
+ from urllib3.connection import HTTPConnection
5
+
6
+ __logger__ = logging.getLogger(__name__)
7
+
8
+
9
+ def keep_alive_socket_options() -> Sequence:
10
+ """Returns default socket options for all platforms for
11
+ setting keep alives on tcp connections.
12
+
13
+ Returns
14
+ -------
15
+ Sequence
16
+ Set of socket options.
17
+ """
18
+ # The content to send on Mac OS in the TCP Keep Alive probe
19
+ TCP_KEEPALIVE = 0x10
20
+ # The maximum time to keep the connection idle before sending probes
21
+ TCP_KEEP_IDLE = 60
22
+ # The interval between probes
23
+ TCP_KEEPALIVE_INTERVAL = 60
24
+ # The maximum number of failed probes before terminating the connection
25
+ TCP_KEEP_CNT = 3
26
+
27
+ try:
28
+ # linux and some windows runtimes
29
+ return HTTPConnection.default_socket_options + [
30
+ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
31
+ (socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, TCP_KEEP_IDLE),
32
+ (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, TCP_KEEPALIVE_INTERVAL),
33
+ (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, TCP_KEEP_CNT),
34
+ ]
35
+ except AttributeError:
36
+ pass
37
+ try:
38
+ # other windows runtimes
39
+ return HTTPConnection.default_socket_options + [
40
+ socket.SIO_KEEPALIVE_VALS,
41
+ (1, TCP_KEEP_IDLE * 1000, TCP_KEEPALIVE_INTERVAL * 1000),
42
+ ]
43
+ except AttributeError:
44
+ pass
45
+ try:
46
+ # darwin
47
+ return HTTPConnection.default_socket_options + [
48
+ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
49
+ (socket.IPPROTO_TCP, TCP_KEEPALIVE, TCP_KEEPALIVE_INTERVAL),
50
+ ]
51
+ except AttributeError:
52
+ __logger__.exception("Unable to set TCP Keep-alive socket options")
53
+ raise
@@ -0,0 +1,66 @@
1
+ from ssl import SSLContext
2
+ import aiohttp
3
+ import asyncio
4
+ from typing import List, Tuple, Any, Union, Optional
5
+
6
+
7
+ class TcpKeepAliveConnector(aiohttp.TCPConnector):
8
+ """Replacement for aiohttp.TCPConnector
9
+ which sets socket options on each connection.
10
+ So we can use tcp keep alives which aiohttp has limited support for.
11
+ """
12
+ def __init__(
13
+ self,
14
+ *,
15
+ verify_ssl: bool = True,
16
+ fingerprint: Optional[bytes] = None,
17
+ use_dns_cache: bool = True,
18
+ ttl_dns_cache: Optional[int] = 10,
19
+ family: int = 0,
20
+ ssl_context: Optional[SSLContext] = None,
21
+ ssl: Union[None, bool, aiohttp.Fingerprint, SSLContext] = None,
22
+ local_addr: Optional[Tuple[str, int]] = None,
23
+ resolver: Optional[aiohttp.abc.AbstractResolver] = None,
24
+ keepalive_timeout: Union[None, float, object] = aiohttp.helpers.sentinel,
25
+ force_close: bool = False,
26
+ limit: int = 100,
27
+ limit_per_host: int = 0,
28
+ enable_cleanup_closed: bool = False,
29
+ loop: Optional[asyncio.AbstractEventLoop] = None,
30
+ socket_options: Union[Tuple[Any, Any, Any], Tuple[Any, Any, None, int]]
31
+ ) -> None:
32
+ super().__init__(
33
+ verify_ssl=verify_ssl,
34
+ fingerprint=fingerprint,
35
+ use_dns_cache=use_dns_cache,
36
+ ttl_dns_cache=ttl_dns_cache,
37
+ family=family,
38
+ ssl_context=ssl_context,
39
+ ssl=ssl,
40
+ local_addr=local_addr,
41
+ resolver=resolver,
42
+ keepalive_timeout=keepalive_timeout,
43
+ force_close=force_close,
44
+ limit=limit,
45
+ limit_per_host=limit_per_host,
46
+ enable_cleanup_closed=enable_cleanup_closed,
47
+ loop=loop,
48
+ )
49
+ self.socket_options = socket_options or []
50
+
51
+ async def _create_connection(
52
+ self,
53
+ req: aiohttp.ClientRequest,
54
+ traces: List[aiohttp.tracing.Trace],
55
+ timeout: aiohttp.ClientTimeout,
56
+ ) -> aiohttp.client_proto.ResponseHandler:
57
+ if req.proxy:
58
+ transport, proto = await self._create_proxy_connection(req, traces, timeout)
59
+ else:
60
+ transport, proto = await self._create_direct_connection(
61
+ req, traces, timeout
62
+ )
63
+ sock = transport.get_extra_info("socket")
64
+ for option in self.socket_options:
65
+ sock.setsockopt(*option)
66
+ return proto