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

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

Potentially problematic release.


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

Files changed (317) hide show
  1. lusid/__init__.py +92 -13
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/abor_api.py +513 -179
  4. lusid/api/abor_configuration_api.py +25 -24
  5. lusid/api/allocations_api.py +12 -20
  6. lusid/api/blocks_api.py +6 -6
  7. lusid/api/calendars_api.py +16 -24
  8. lusid/api/chart_of_accounts_api.py +1745 -441
  9. lusid/api/compliance_api.py +71 -62
  10. lusid/api/configuration_recipe_api.py +1198 -56
  11. lusid/api/corporate_action_sources_api.py +8 -8
  12. lusid/api/custom_entities_api.py +6 -6
  13. lusid/api/cut_label_definitions_api.py +9 -17
  14. lusid/api/data_types_api.py +16 -32
  15. lusid/api/executions_api.py +6 -6
  16. lusid/api/funds_api.py +944 -0
  17. lusid/api/instrument_event_types_api.py +1287 -0
  18. lusid/api/instruments_api.py +12 -20
  19. lusid/api/legacy_compliance_api.py +12 -12
  20. lusid/api/legal_entities_api.py +12 -12
  21. lusid/api/order_graph_api.py +12 -12
  22. lusid/api/order_instructions_api.py +6 -6
  23. lusid/api/order_management_api.py +495 -14
  24. lusid/api/orders_api.py +16 -24
  25. lusid/api/packages_api.py +6 -6
  26. lusid/api/persons_api.py +16 -24
  27. lusid/api/placements_api.py +12 -12
  28. lusid/api/portfolio_groups_api.py +6 -6
  29. lusid/api/portfolios_api.py +23 -39
  30. lusid/api/property_definitions_api.py +205 -0
  31. lusid/api/quotes_api.py +20 -36
  32. lusid/api/reconciliations_api.py +410 -1978
  33. lusid/api/schemas_api.py +7 -15
  34. lusid/api/scopes_api.py +151 -0
  35. lusid/api/scripted_translation_api.py +30 -28
  36. lusid/api/transaction_configuration_api.py +22 -22
  37. lusid/api/transaction_portfolios_api.py +282 -577
  38. lusid/api_client.py +5 -3
  39. lusid/configuration.py +1 -1
  40. lusid/extensions/__init__.py +1 -9
  41. lusid/extensions/api_client.py +3 -1
  42. lusid/extensions/api_client_factory.py +156 -45
  43. lusid/extensions/api_configuration.py +124 -15
  44. lusid/extensions/configuration_loaders.py +2 -4
  45. lusid/extensions/proxy_config.py +8 -5
  46. lusid/extensions/socket_keep_alive.py +14 -15
  47. lusid/extensions/tcp_keep_alive_connector.py +93 -46
  48. lusid/models/__init__.py +90 -13
  49. lusid/models/abor.py +9 -2
  50. lusid/models/abor_configuration.py +8 -8
  51. lusid/models/abor_configuration_request.py +9 -9
  52. lusid/models/abor_request.py +1 -1
  53. lusid/models/account.py +6 -1
  54. lusid/models/accumulation_event.py +104 -0
  55. lusid/models/address_key_compliance_parameter.py +5 -12
  56. lusid/models/address_key_list_compliance_parameter.py +3 -3
  57. lusid/models/address_key_option_definition.py +3 -1
  58. lusid/models/amortisation_event.py +4 -6
  59. lusid/models/{underlying_leg.py → asset_leg.py} +15 -15
  60. lusid/models/basket.py +3 -3
  61. lusid/models/block_and_order_id_request.py +78 -0
  62. lusid/models/block_and_orders.py +83 -0
  63. lusid/models/block_and_orders_create_request.py +77 -0
  64. lusid/models/block_and_orders_request.py +134 -0
  65. lusid/models/blocked_order_request.py +130 -0
  66. lusid/models/bond.py +13 -6
  67. lusid/models/bond_coupon_event.py +97 -0
  68. lusid/models/bond_default_event.py +8 -18
  69. lusid/models/bond_principal_event.py +97 -0
  70. lusid/models/book_transactions_request.py +97 -0
  71. lusid/models/bool_compliance_parameter.py +3 -3
  72. lusid/models/bool_list_compliance_parameter.py +3 -3
  73. lusid/models/branch_step.py +101 -0
  74. lusid/models/cap_floor.py +3 -3
  75. lusid/models/cash_dividend_event.py +32 -10
  76. lusid/models/cash_election.py +91 -0
  77. lusid/models/cash_flow_event.py +5 -7
  78. lusid/models/cash_perpetual.py +3 -3
  79. lusid/models/cds_flow_conventions.py +1 -1
  80. lusid/models/cds_index.py +4 -4
  81. lusid/models/check_step.py +110 -0
  82. lusid/models/cleardown_module_details.py +95 -0
  83. lusid/models/cleardown_module_request.py +117 -0
  84. lusid/models/cleardown_module_response.py +139 -0
  85. lusid/models/cleardown_module_rule.py +94 -0
  86. lusid/models/{reconciliation_run_break.py → cleardown_module_rules_updated_response.py} +30 -36
  87. lusid/models/close_event.py +3 -3
  88. lusid/models/close_period_diary_entry_request.py +149 -0
  89. lusid/models/complete_portfolio.py +8 -1
  90. lusid/models/complex_bond.py +4 -4
  91. lusid/models/complex_market_data.py +6 -5
  92. lusid/models/compliance_parameter.py +8 -5
  93. lusid/models/compliance_parameter_type.py +3 -0
  94. lusid/models/compliance_rule_breakdown.py +16 -8
  95. lusid/models/compliance_rule_breakdown_request.py +12 -4
  96. lusid/models/compliance_rule_result_v2.py +85 -0
  97. lusid/models/compliance_step.py +99 -0
  98. lusid/models/compliance_step_type.py +42 -0
  99. lusid/models/compliance_summary_rule_result.py +12 -15
  100. lusid/models/compliance_summary_rule_result_request.py +12 -15
  101. lusid/models/compliance_template_variation.py +12 -2
  102. lusid/models/component_transaction.py +92 -0
  103. lusid/models/composite_dispersion.py +30 -5
  104. lusid/models/compounding.py +4 -4
  105. lusid/models/configuration_recipe.py +10 -19
  106. lusid/models/constant_volatility_surface.py +102 -0
  107. lusid/models/contract_for_difference.py +3 -3
  108. lusid/models/create_derived_property_definition_request.py +3 -3
  109. lusid/models/create_derived_transaction_portfolio_request.py +10 -3
  110. lusid/models/create_property_definition_request.py +12 -5
  111. lusid/models/create_trade_tickets_response.py +87 -0
  112. lusid/models/create_transaction_portfolio_request.py +16 -3
  113. lusid/models/credit_default_swap.py +4 -4
  114. lusid/models/credit_spread_curve_data.py +4 -4
  115. lusid/models/custom_entity_definition.py +8 -2
  116. lusid/models/custom_entity_type.py +8 -2
  117. lusid/models/cut_label_definition.py +7 -1
  118. lusid/models/data_type.py +7 -1
  119. lusid/models/data_type_summary.py +8 -2
  120. lusid/models/date_time_compliance_parameter.py +3 -3
  121. lusid/models/date_time_list_compliance_parameter.py +3 -3
  122. lusid/models/{upsert_reconciliation_run_request.py → day_month.py} +15 -15
  123. lusid/models/decimal_compliance_parameter.py +3 -3
  124. lusid/models/decimal_list_compliance_parameter.py +3 -3
  125. lusid/models/dialect.py +9 -3
  126. lusid/models/diary_entry.py +1 -1
  127. lusid/models/diary_entry_request.py +1 -1
  128. lusid/models/discount_factor_curve_data.py +3 -3
  129. lusid/models/dividend_option_event.py +129 -0
  130. lusid/models/dividend_reinvestment_event.py +122 -0
  131. lusid/models/election_specification.py +73 -0
  132. lusid/models/eligibility_calculation.py +71 -0
  133. lusid/models/empty_model_options.py +3 -3
  134. lusid/models/equity.py +8 -6
  135. lusid/models/equity_curve_by_prices_data.py +3 -3
  136. lusid/models/equity_model_options.py +3 -3
  137. lusid/models/equity_option.py +3 -3
  138. lusid/models/equity_swap.py +4 -4
  139. lusid/models/equity_vol_surface_data.py +3 -3
  140. lusid/models/exchange_traded_option.py +3 -3
  141. lusid/models/exercise_event.py +5 -7
  142. lusid/models/exotic_instrument.py +3 -3
  143. lusid/models/filter_predicate_compliance_parameter.py +91 -0
  144. lusid/models/filter_step.py +101 -0
  145. lusid/models/fixed_leg.py +3 -3
  146. lusid/models/fixed_schedule.py +4 -9
  147. lusid/models/flexible_loan.py +105 -0
  148. lusid/models/float_schedule.py +20 -12
  149. lusid/models/floating_leg.py +3 -3
  150. lusid/models/flow_convention_name.py +1 -1
  151. lusid/models/flow_conventions.py +1 -1
  152. lusid/models/forward_rate_agreement.py +3 -3
  153. lusid/models/from_recipe.py +81 -0
  154. lusid/models/fund.py +182 -0
  155. lusid/models/fund_properties.py +115 -0
  156. lusid/models/fund_request.py +165 -0
  157. lusid/models/fund_share_class.py +99 -0
  158. lusid/models/funding_leg.py +3 -3
  159. lusid/models/funding_leg_options.py +3 -3
  160. lusid/models/future.py +3 -3
  161. lusid/models/fx_conventions.py +73 -0
  162. lusid/models/fx_forward.py +8 -6
  163. lusid/models/fx_forward_curve_by_quote_reference.py +4 -4
  164. lusid/models/fx_forward_curve_data.py +3 -3
  165. lusid/models/fx_forward_model_options.py +3 -3
  166. lusid/models/fx_forward_pips_curve_data.py +3 -3
  167. lusid/models/fx_forward_settlement_event.py +136 -0
  168. lusid/models/fx_forward_tenor_curve_data.py +4 -4
  169. lusid/models/fx_forward_tenor_pips_curve_data.py +4 -4
  170. lusid/models/fx_linked_notional_schedule.py +108 -0
  171. lusid/models/fx_option.py +3 -3
  172. lusid/models/fx_rate_schedule.py +3 -3
  173. lusid/models/fx_swap.py +4 -4
  174. lusid/models/fx_vol_surface_data.py +3 -3
  175. lusid/models/{reconciliation_run.py → get_recipe_composer_response.py} +15 -15
  176. lusid/models/group_by_selector_compliance_parameter.py +91 -0
  177. lusid/models/group_by_step.py +101 -0
  178. lusid/models/group_filter_predicate_compliance_parameter.py +91 -0
  179. lusid/models/group_filter_step.py +110 -0
  180. lusid/models/group_of_market_data_key_rules.py +79 -0
  181. lusid/models/index_convention.py +1 -1
  182. lusid/models/index_model_options.py +3 -3
  183. lusid/models/inflation_index_conventions.py +2 -2
  184. lusid/models/inflation_leg.py +3 -3
  185. lusid/models/inflation_linked_bond.py +3 -3
  186. lusid/models/inflation_swap.py +4 -4
  187. lusid/models/informational_error_event.py +3 -3
  188. lusid/models/informational_event.py +4 -6
  189. lusid/models/instrument_event.py +12 -5
  190. lusid/models/instrument_event_configuration.py +74 -0
  191. lusid/models/instrument_event_holder.py +12 -3
  192. lusid/models/instrument_event_type.py +7 -0
  193. lusid/models/instrument_leg.py +3 -3
  194. lusid/models/instrument_list_compliance_parameter.py +3 -3
  195. lusid/models/instrument_payment_diary_leg.py +5 -3
  196. lusid/models/instrument_resolution_detail.py +105 -0
  197. lusid/models/instrument_type.py +2 -0
  198. lusid/models/interest_rate_swap.py +4 -4
  199. lusid/models/interest_rate_swaption.py +3 -3
  200. lusid/models/intermediate_compliance_step.py +110 -0
  201. lusid/models/ir_vol_cube_data.py +3 -3
  202. lusid/models/journal_entry_line.py +34 -3
  203. lusid/models/journal_entry_lines_query_parameters.py +1 -1
  204. lusid/models/label_value_set.py +1 -1
  205. lusid/models/leg_definition.py +16 -3
  206. lusid/models/lineage_member.py +87 -0
  207. lusid/models/lock_period_diary_entry_request.py +91 -0
  208. lusid/models/lusid_instrument.py +7 -5
  209. lusid/models/lusid_trade_ticket.py +8 -1
  210. lusid/models/market_context.py +17 -2
  211. lusid/models/market_data_type.py +1 -0
  212. lusid/models/maturity_event.py +91 -0
  213. lusid/models/model_options.py +5 -6
  214. lusid/models/model_options_type.py +0 -1
  215. lusid/models/model_selection.py +3 -3
  216. lusid/models/move_orders_to_different_blocks_request.py +77 -0
  217. lusid/models/moved_order_to_different_block_response.py +85 -0
  218. lusid/models/movement_type.py +2 -0
  219. lusid/models/multi_currency_amounts.py +71 -0
  220. lusid/models/opaque_market_data.py +3 -3
  221. lusid/models/opaque_model_options.py +3 -3
  222. lusid/models/open_event.py +3 -3
  223. lusid/models/optionality_schedule.py +3 -3
  224. lusid/models/order_graph_block.py +4 -2
  225. lusid/models/order_graph_block_order_detail.py +16 -2
  226. lusid/models/paged_resource_list_of_cleardown_module_response.py +113 -0
  227. lusid/models/{paged_resource_list_of_reconciliation_run_break.py → paged_resource_list_of_cleardown_module_rule.py} +11 -11
  228. lusid/models/{paged_resource_list_of_reconciliation_run.py → paged_resource_list_of_fund.py} +11 -11
  229. lusid/models/paged_resource_list_of_property_definition.py +113 -0
  230. lusid/models/paged_resource_list_of_transaction_template.py +113 -0
  231. lusid/models/paged_resource_list_of_transaction_template_specification.py +113 -0
  232. lusid/models/participation_request.py +3 -9
  233. lusid/models/performance_returns_metric.py +1 -1
  234. lusid/models/period_diary_entries_reopened_response.py +104 -0
  235. lusid/models/place_blocks_request.py +77 -0
  236. lusid/models/portfolio.py +15 -2
  237. lusid/models/portfolio_details.py +15 -2
  238. lusid/models/portfolio_group_id_compliance_parameter.py +3 -3
  239. lusid/models/portfolio_group_id_list_compliance_parameter.py +3 -3
  240. lusid/models/portfolio_holding.py +27 -2
  241. lusid/models/portfolio_id_compliance_parameter.py +3 -3
  242. lusid/models/portfolio_id_list_compliance_parameter.py +3 -3
  243. lusid/models/posting_module_rule.py +29 -4
  244. lusid/models/pricing_model.py +2 -1
  245. lusid/models/property_definition.py +17 -4
  246. lusid/models/property_definition_search_result.py +3 -3
  247. lusid/models/property_domain.py +2 -0
  248. lusid/models/property_key_compliance_parameter.py +3 -3
  249. lusid/models/property_key_list_compliance_parameter.py +3 -3
  250. lusid/models/raw_vendor_event.py +5 -7
  251. lusid/models/re_open_period_diary_entry_request.py +84 -0
  252. lusid/models/recipe_block.py +87 -0
  253. lusid/models/recipe_composer.py +100 -0
  254. lusid/models/{reconciliation_break_id.py → recipe_value.py} +22 -23
  255. lusid/models/recombine_step.py +101 -0
  256. lusid/models/reference_instrument.py +3 -3
  257. lusid/models/relative_date_offset.py +71 -0
  258. lusid/models/repo.py +3 -3
  259. lusid/models/reset_event.py +4 -6
  260. lusid/models/resource_list_of_block_and_orders.py +113 -0
  261. lusid/models/resource_list_of_get_recipe_composer_response.py +113 -0
  262. lusid/models/resource_list_of_moved_order_to_different_block_response.py +113 -0
  263. lusid/models/schedule.py +6 -5
  264. lusid/models/schedule_type.py +1 -0
  265. lusid/models/script_map_reference.py +94 -0
  266. lusid/models/security_election.py +86 -0
  267. lusid/models/side_definition.py +1 -8
  268. lusid/models/sides_definition_request.py +1 -8
  269. lusid/models/simple_cash_flow_loan.py +3 -3
  270. lusid/models/simple_instrument.py +3 -3
  271. lusid/models/step_schedule.py +3 -3
  272. lusid/models/stock_split_event.py +3 -3
  273. lusid/models/string_compliance_parameter.py +3 -3
  274. lusid/models/string_list_compliance_parameter.py +3 -3
  275. lusid/models/template_field.py +77 -0
  276. lusid/models/term_deposit.py +3 -3
  277. lusid/models/total_return_swap.py +16 -16
  278. lusid/models/transaction_configuration_movement_data.py +3 -3
  279. lusid/models/transaction_configuration_movement_data_request.py +3 -3
  280. lusid/models/transaction_currency_and_amount.py +81 -0
  281. lusid/models/transaction_field_map.py +97 -0
  282. lusid/models/transaction_price.py +3 -3
  283. lusid/models/transaction_price_and_type.py +81 -0
  284. lusid/models/transaction_price_type.py +1 -0
  285. lusid/models/transaction_property_map.py +80 -0
  286. lusid/models/transaction_template.py +100 -0
  287. lusid/models/transaction_template_request.py +79 -0
  288. lusid/models/transaction_template_specification.py +99 -0
  289. lusid/models/transaction_type_alias.py +0 -7
  290. lusid/models/transaction_type_calculation.py +1 -1
  291. lusid/models/transition_event.py +3 -3
  292. lusid/models/translation_context.py +75 -0
  293. lusid/models/translation_script.py +9 -3
  294. lusid/models/trial_balance.py +46 -11
  295. lusid/models/trial_balance_query_parameters.py +15 -6
  296. lusid/models/trigger_event.py +3 -3
  297. lusid/models/units_ratio.py +71 -0
  298. lusid/models/{compliance_run_summary.py → upsert_compliance_run_summary_result.py} +8 -8
  299. lusid/models/upsert_dialect_request.py +79 -0
  300. lusid/models/upsert_instrument_event_request.py +12 -3
  301. lusid/models/upsert_quote_request.py +1 -1
  302. lusid/models/upsert_recipe_composer_request.py +73 -0
  303. lusid/models/upsert_recipe_request.py +3 -9
  304. lusid/models/upsert_translation_script_request.py +75 -0
  305. lusid/models/valuation_schedule.py +10 -3
  306. lusid/models/weighted_instrument.py +13 -2
  307. lusid/models/weighted_instrument_in_line_lookup_identifiers.py +89 -0
  308. lusid/models/yield_curve_data.py +3 -3
  309. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/METADATA +227 -48
  310. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/RECORD +311 -233
  311. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/WHEEL +1 -1
  312. lusid/extensions/api_client_builder.py +0 -138
  313. lusid/models/configuration_recipe_snippet.py +0 -139
  314. lusid/models/je_lines_query_parameters.py +0 -105
  315. lusid/models/look_up_pricing_model_options.py +0 -93
  316. lusid/models/reconciliation_run_id.py +0 -85
  317. lusid/models/upsert_reconciliation_break_request.py +0 -98
lusid/models/fund.py ADDED
@@ -0,0 +1,182 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic import BaseModel, Field, StrictStr, conint, conlist, constr, validator
23
+ from lusid.models.day_month import DayMonth
24
+ from lusid.models.instrument_resolution_detail import InstrumentResolutionDetail
25
+ from lusid.models.link import Link
26
+ from lusid.models.model_property import ModelProperty
27
+ from lusid.models.resource_id import ResourceId
28
+ from lusid.models.version import Version
29
+
30
+ class Fund(BaseModel):
31
+ """
32
+ A Fund entity. # noqa: E501
33
+ """
34
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
35
+ id: ResourceId = Field(...)
36
+ display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
37
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
38
+ abor_id: ResourceId = Field(..., alias="aborId")
39
+ share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
40
+ type: constr(strict=True, min_length=1) = Field(..., description="The type of fund; 'Standalone', 'Master' or 'Feeder'")
41
+ inception_date: datetime = Field(..., alias="inceptionDate", description="Inception date of the Fund")
42
+ decimal_places: Optional[conint(strict=True, le=30, ge=0)] = Field(None, alias="decimalPlaces", description="Number of decimal places for reporting")
43
+ year_end_date: DayMonth = Field(..., alias="yearEndDate")
44
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
45
+ version: Optional[Version] = None
46
+ links: Optional[conlist(Link)] = None
47
+ __properties = ["href", "id", "displayName", "description", "aborId", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties", "version", "links"]
48
+
49
+ @validator('description')
50
+ def description_validate_regular_expression(cls, value):
51
+ """Validates the regular expression"""
52
+ if value is None:
53
+ return value
54
+
55
+ if not re.match(r"^[\s\S]*$", value):
56
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
57
+ return value
58
+
59
+ class Config:
60
+ """Pydantic configuration"""
61
+ allow_population_by_field_name = True
62
+ validate_assignment = True
63
+
64
+ def to_str(self) -> str:
65
+ """Returns the string representation of the model using alias"""
66
+ return pprint.pformat(self.dict(by_alias=True))
67
+
68
+ def to_json(self) -> str:
69
+ """Returns the JSON representation of the model using alias"""
70
+ return json.dumps(self.to_dict())
71
+
72
+ @classmethod
73
+ def from_json(cls, json_str: str) -> Fund:
74
+ """Create an instance of Fund from a JSON string"""
75
+ return cls.from_dict(json.loads(json_str))
76
+
77
+ def to_dict(self):
78
+ """Returns the dictionary representation of the model using alias"""
79
+ _dict = self.dict(by_alias=True,
80
+ exclude={
81
+ },
82
+ exclude_none=True)
83
+ # override the default output from pydantic by calling `to_dict()` of id
84
+ if self.id:
85
+ _dict['id'] = self.id.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of abor_id
87
+ if self.abor_id:
88
+ _dict['aborId'] = self.abor_id.to_dict()
89
+ # override the default output from pydantic by calling `to_dict()` of each item in share_class_instruments (list)
90
+ _items = []
91
+ if self.share_class_instruments:
92
+ for _item in self.share_class_instruments:
93
+ if _item:
94
+ _items.append(_item.to_dict())
95
+ _dict['shareClassInstruments'] = _items
96
+ # override the default output from pydantic by calling `to_dict()` of year_end_date
97
+ if self.year_end_date:
98
+ _dict['yearEndDate'] = self.year_end_date.to_dict()
99
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
100
+ _field_dict = {}
101
+ if self.properties:
102
+ for _key in self.properties:
103
+ if self.properties[_key]:
104
+ _field_dict[_key] = self.properties[_key].to_dict()
105
+ _dict['properties'] = _field_dict
106
+ # override the default output from pydantic by calling `to_dict()` of version
107
+ if self.version:
108
+ _dict['version'] = self.version.to_dict()
109
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
110
+ _items = []
111
+ if self.links:
112
+ for _item in self.links:
113
+ if _item:
114
+ _items.append(_item.to_dict())
115
+ _dict['links'] = _items
116
+ # set to None if href (nullable) is None
117
+ # and __fields_set__ contains the field
118
+ if self.href is None and "href" in self.__fields_set__:
119
+ _dict['href'] = None
120
+
121
+ # set to None if display_name (nullable) is None
122
+ # and __fields_set__ contains the field
123
+ if self.display_name is None and "display_name" in self.__fields_set__:
124
+ _dict['displayName'] = None
125
+
126
+ # set to None if description (nullable) is None
127
+ # and __fields_set__ contains the field
128
+ if self.description is None and "description" in self.__fields_set__:
129
+ _dict['description'] = None
130
+
131
+ # set to None if share_class_instruments (nullable) is None
132
+ # and __fields_set__ contains the field
133
+ if self.share_class_instruments is None and "share_class_instruments" in self.__fields_set__:
134
+ _dict['shareClassInstruments'] = None
135
+
136
+ # set to None if decimal_places (nullable) is None
137
+ # and __fields_set__ contains the field
138
+ if self.decimal_places is None and "decimal_places" in self.__fields_set__:
139
+ _dict['decimalPlaces'] = None
140
+
141
+ # set to None if properties (nullable) is None
142
+ # and __fields_set__ contains the field
143
+ if self.properties is None and "properties" in self.__fields_set__:
144
+ _dict['properties'] = None
145
+
146
+ # set to None if links (nullable) is None
147
+ # and __fields_set__ contains the field
148
+ if self.links is None and "links" in self.__fields_set__:
149
+ _dict['links'] = None
150
+
151
+ return _dict
152
+
153
+ @classmethod
154
+ def from_dict(cls, obj: dict) -> Fund:
155
+ """Create an instance of Fund from a dict"""
156
+ if obj is None:
157
+ return None
158
+
159
+ if not isinstance(obj, dict):
160
+ return Fund.parse_obj(obj)
161
+
162
+ _obj = Fund.parse_obj({
163
+ "href": obj.get("href"),
164
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
165
+ "display_name": obj.get("displayName"),
166
+ "description": obj.get("description"),
167
+ "abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
168
+ "share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,
169
+ "type": obj.get("type"),
170
+ "inception_date": obj.get("inceptionDate"),
171
+ "decimal_places": obj.get("decimalPlaces"),
172
+ "year_end_date": DayMonth.from_dict(obj.get("yearEndDate")) if obj.get("yearEndDate") is not None else None,
173
+ "properties": dict(
174
+ (_k, ModelProperty.from_dict(_v))
175
+ for _k, _v in obj.get("properties").items()
176
+ )
177
+ if obj.get("properties") is not None
178
+ else None,
179
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
180
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
181
+ })
182
+ return _obj
@@ -0,0 +1,115 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.model_property import ModelProperty
25
+ from lusid.models.version import Version
26
+
27
+ class FundProperties(BaseModel):
28
+ """
29
+ FundProperties
30
+ """
31
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
32
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fund properties. These will be from the 'Fund' domain.")
33
+ version: Optional[Version] = None
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["href", "properties", "version", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> FundProperties:
52
+ """Create an instance of FundProperties from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
62
+ _field_dict = {}
63
+ if self.properties:
64
+ for _key in self.properties:
65
+ if self.properties[_key]:
66
+ _field_dict[_key] = self.properties[_key].to_dict()
67
+ _dict['properties'] = _field_dict
68
+ # override the default output from pydantic by calling `to_dict()` of version
69
+ if self.version:
70
+ _dict['version'] = self.version.to_dict()
71
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
72
+ _items = []
73
+ if self.links:
74
+ for _item in self.links:
75
+ if _item:
76
+ _items.append(_item.to_dict())
77
+ _dict['links'] = _items
78
+ # set to None if href (nullable) is None
79
+ # and __fields_set__ contains the field
80
+ if self.href is None and "href" in self.__fields_set__:
81
+ _dict['href'] = None
82
+
83
+ # set to None if properties (nullable) is None
84
+ # and __fields_set__ contains the field
85
+ if self.properties is None and "properties" in self.__fields_set__:
86
+ _dict['properties'] = None
87
+
88
+ # set to None if links (nullable) is None
89
+ # and __fields_set__ contains the field
90
+ if self.links is None and "links" in self.__fields_set__:
91
+ _dict['links'] = None
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: dict) -> FundProperties:
97
+ """Create an instance of FundProperties from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return FundProperties.parse_obj(obj)
103
+
104
+ _obj = FundProperties.parse_obj({
105
+ "href": obj.get("href"),
106
+ "properties": dict(
107
+ (_k, ModelProperty.from_dict(_v))
108
+ for _k, _v in obj.get("properties").items()
109
+ )
110
+ if obj.get("properties") is not None
111
+ else None,
112
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
113
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
114
+ })
115
+ return _obj
@@ -0,0 +1,165 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic import BaseModel, Field, StrictStr, conint, conlist, constr, validator
23
+ from lusid.models.day_month import DayMonth
24
+ from lusid.models.instrument_resolution_detail import InstrumentResolutionDetail
25
+ from lusid.models.model_property import ModelProperty
26
+ from lusid.models.resource_id import ResourceId
27
+
28
+ class FundRequest(BaseModel):
29
+ """
30
+ The request used to create a Fund. # noqa: E501
31
+ """
32
+ code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Fund.")
33
+ display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
34
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
35
+ abor_id: ResourceId = Field(..., alias="aborId")
36
+ share_class_instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="shareClassInstrumentScopes", description="The scopes in which the instruments lie.")
37
+ share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
38
+ type: constr(strict=True, min_length=1) = Field(..., description="The type of fund; 'Standalone', 'Master' or 'Feeder'")
39
+ inception_date: datetime = Field(..., alias="inceptionDate", description="Inception date of the Fund")
40
+ decimal_places: Optional[conint(strict=True, le=30, ge=0)] = Field(None, alias="decimalPlaces", description="Number of decimal places for reporting")
41
+ year_end_date: DayMonth = Field(..., alias="yearEndDate")
42
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
43
+ __properties = ["code", "displayName", "description", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
44
+
45
+ @validator('code')
46
+ def code_validate_regular_expression(cls, value):
47
+ """Validates the regular expression"""
48
+ if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
49
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
50
+ return value
51
+
52
+ @validator('description')
53
+ def description_validate_regular_expression(cls, value):
54
+ """Validates the regular expression"""
55
+ if value is None:
56
+ return value
57
+
58
+ if not re.match(r"^[\s\S]*$", value):
59
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
60
+ return value
61
+
62
+ class Config:
63
+ """Pydantic configuration"""
64
+ allow_population_by_field_name = True
65
+ validate_assignment = True
66
+
67
+ def to_str(self) -> str:
68
+ """Returns the string representation of the model using alias"""
69
+ return pprint.pformat(self.dict(by_alias=True))
70
+
71
+ def to_json(self) -> str:
72
+ """Returns the JSON representation of the model using alias"""
73
+ return json.dumps(self.to_dict())
74
+
75
+ @classmethod
76
+ def from_json(cls, json_str: str) -> FundRequest:
77
+ """Create an instance of FundRequest from a JSON string"""
78
+ return cls.from_dict(json.loads(json_str))
79
+
80
+ def to_dict(self):
81
+ """Returns the dictionary representation of the model using alias"""
82
+ _dict = self.dict(by_alias=True,
83
+ exclude={
84
+ },
85
+ exclude_none=True)
86
+ # override the default output from pydantic by calling `to_dict()` of abor_id
87
+ if self.abor_id:
88
+ _dict['aborId'] = self.abor_id.to_dict()
89
+ # override the default output from pydantic by calling `to_dict()` of each item in share_class_instruments (list)
90
+ _items = []
91
+ if self.share_class_instruments:
92
+ for _item in self.share_class_instruments:
93
+ if _item:
94
+ _items.append(_item.to_dict())
95
+ _dict['shareClassInstruments'] = _items
96
+ # override the default output from pydantic by calling `to_dict()` of year_end_date
97
+ if self.year_end_date:
98
+ _dict['yearEndDate'] = self.year_end_date.to_dict()
99
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
100
+ _field_dict = {}
101
+ if self.properties:
102
+ for _key in self.properties:
103
+ if self.properties[_key]:
104
+ _field_dict[_key] = self.properties[_key].to_dict()
105
+ _dict['properties'] = _field_dict
106
+ # set to None if display_name (nullable) is None
107
+ # and __fields_set__ contains the field
108
+ if self.display_name is None and "display_name" in self.__fields_set__:
109
+ _dict['displayName'] = None
110
+
111
+ # set to None if description (nullable) is None
112
+ # and __fields_set__ contains the field
113
+ if self.description is None and "description" in self.__fields_set__:
114
+ _dict['description'] = None
115
+
116
+ # set to None if share_class_instrument_scopes (nullable) is None
117
+ # and __fields_set__ contains the field
118
+ if self.share_class_instrument_scopes is None and "share_class_instrument_scopes" in self.__fields_set__:
119
+ _dict['shareClassInstrumentScopes'] = None
120
+
121
+ # set to None if share_class_instruments (nullable) is None
122
+ # and __fields_set__ contains the field
123
+ if self.share_class_instruments is None and "share_class_instruments" in self.__fields_set__:
124
+ _dict['shareClassInstruments'] = None
125
+
126
+ # set to None if decimal_places (nullable) is None
127
+ # and __fields_set__ contains the field
128
+ if self.decimal_places is None and "decimal_places" in self.__fields_set__:
129
+ _dict['decimalPlaces'] = None
130
+
131
+ # set to None if properties (nullable) is None
132
+ # and __fields_set__ contains the field
133
+ if self.properties is None and "properties" in self.__fields_set__:
134
+ _dict['properties'] = None
135
+
136
+ return _dict
137
+
138
+ @classmethod
139
+ def from_dict(cls, obj: dict) -> FundRequest:
140
+ """Create an instance of FundRequest from a dict"""
141
+ if obj is None:
142
+ return None
143
+
144
+ if not isinstance(obj, dict):
145
+ return FundRequest.parse_obj(obj)
146
+
147
+ _obj = FundRequest.parse_obj({
148
+ "code": obj.get("code"),
149
+ "display_name": obj.get("displayName"),
150
+ "description": obj.get("description"),
151
+ "abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
152
+ "share_class_instrument_scopes": obj.get("shareClassInstrumentScopes"),
153
+ "share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,
154
+ "type": obj.get("type"),
155
+ "inception_date": obj.get("inceptionDate"),
156
+ "decimal_places": obj.get("decimalPlaces"),
157
+ "year_end_date": DayMonth.from_dict(obj.get("yearEndDate")) if obj.get("yearEndDate") is not None else None,
158
+ "properties": dict(
159
+ (_k, ModelProperty.from_dict(_v))
160
+ for _k, _v in obj.get("properties").items()
161
+ )
162
+ if obj.get("properties") is not None
163
+ else None
164
+ })
165
+ return _obj
@@ -0,0 +1,99 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict
22
+ from pydantic import Field, StrictStr, constr, validator
23
+ from lusid.models.lusid_instrument import LusidInstrument
24
+
25
+ class FundShareClass(LusidInstrument):
26
+ """
27
+ LUSID representation of a FundShareClass. A ShareClass represents a pool of shares, held by investors, within a fund. A ShareClass can represent a differing investment approach by either Fees, Income, Currency Risk and Investor type. # noqa: E501
28
+ """
29
+ short_code: constr(strict=True, min_length=1) = Field(..., alias="shortCode", description="A short identifier, unique across a single fund, usually made up of the ShareClass components. Eg \"A Accumulation Euro Hedged Class\" could become \"A Acc H EUR\".")
30
+ fund_share_class_type: constr(strict=True, min_length=1) = Field(..., alias="fundShareClassType", description="The type of distribution that the ShareClass will calculate. Can be either 'Income' or 'Accumulation' - Income classes will pay out and Accumulation classes will retain their ShareClass attributable income. Supported string (enumeration) values are: [Income, Accumulation].")
31
+ distribution_payment_type: constr(strict=True, min_length=1) = Field(..., alias="distributionPaymentType", description="The tax treatment applied to any distributions calculated within the ShareClass. Can be either 'Net' (Distribution Calculated net of tax) or 'Gross' (Distribution calculated gross of tax). Supported string (enumeration) values are: [Gross, Net].")
32
+ hedging: constr(strict=True, min_length=1) = Field(..., description="A flag to indicate the ShareClass is operating currency hedging as a means to limit currency risk as part of it's investment strategy. Supported string (enumeration) values are: [Invalid, None, ApplyHedging].")
33
+ dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
34
+ instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy"]
37
+
38
+ @validator('instrument_type')
39
+ def instrument_type_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+ if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
42
+ raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
43
+ return value
44
+
45
+ class Config:
46
+ """Pydantic configuration"""
47
+ allow_population_by_field_name = True
48
+ validate_assignment = True
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> FundShareClass:
60
+ """Create an instance of FundShareClass from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ "additional_properties"
68
+ },
69
+ exclude_none=True)
70
+ # puts key-value pairs in additional_properties in the top level
71
+ if self.additional_properties is not None:
72
+ for _key, _value in self.additional_properties.items():
73
+ _dict[_key] = _value
74
+
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: dict) -> FundShareClass:
79
+ """Create an instance of FundShareClass from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return FundShareClass.parse_obj(obj)
85
+
86
+ _obj = FundShareClass.parse_obj({
87
+ "instrument_type": obj.get("instrumentType"),
88
+ "short_code": obj.get("shortCode"),
89
+ "fund_share_class_type": obj.get("fundShareClassType"),
90
+ "distribution_payment_type": obj.get("distributionPaymentType"),
91
+ "hedging": obj.get("hedging"),
92
+ "dom_ccy": obj.get("domCcy")
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
@@ -31,15 +31,15 @@ class FundingLeg(InstrumentLeg):
31
31
  maturity_date: datetime = Field(..., alias="maturityDate", description="The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date.")
32
32
  leg_definition: LegDefinition = Field(..., alias="legDefinition")
33
33
  notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/")
34
- instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg")
34
+ instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional"]
37
37
 
38
38
  @validator('instrument_type')
39
39
  def instrument_type_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg'):
42
- raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg')")
41
+ if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
42
+ raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
43
43
  return value
44
44
 
45
45
  class Config:
@@ -27,15 +27,15 @@ class FundingLegOptions(ModelOptions):
27
27
  FundingLegOptions
28
28
  """
29
29
  expected_funding_leg_notional: constr(strict=True, min_length=1) = Field(..., alias="expectedFundingLegNotional", description="Assumption made on future expected notional of the funding leg.")
30
- model_options_type: StrictStr = Field(..., alias="modelOptionsType", description="The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions, LookUpPricingModelOptions")
30
+ model_options_type: StrictStr = Field(..., alias="modelOptionsType", description="The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["modelOptionsType", "expectedFundingLegNotional"]
33
33
 
34
34
  @validator('model_options_type')
35
35
  def model_options_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions', 'LookUpPricingModelOptions'):
38
- raise ValueError("must be one of enum values ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions', 'LookUpPricingModelOptions')")
37
+ if value not in ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions'):
38
+ raise ValueError("must be one of enum values ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions')")
39
39
  return value
40
40
 
41
41
  class Config:
lusid/models/future.py CHANGED
@@ -35,15 +35,15 @@ class Future(LusidInstrument):
35
35
  ref_spot_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="refSpotPrice", description="The reference spot price for the future at which the contract was entered into.")
36
36
  underlying: Optional[LusidInstrument] = None
37
37
  calculation_type: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="calculationType", description="Calculation type for some Future instruments which have non-standard methodology. Optional, if not set defaults as follows: - If ExchangeCode is \"ASX\" and ContractCode is \"IR\" or \"BB\" set to ASX_BankBills - If ExchangeCode is \"ASX\" and ContractCode is \"YT\" set to ASX_3Year - If ExchangeCode is \"ASX\" and ContractCode is \"VT\" set to ASX_5Year - If ExchangeCode is \"ASX\" and ContractCode is \"XT\" set to ASX_10Year - If ExchangeCode is \"ASX\" and ContractCode is \"LT\" set to ASX_20Year - otherwise set to Standard Specific calculation types for bond and interest rate futures are: - [Standard] The default calculation type, which does not fit into any of the categories below. - [ASX_BankBills] Used for AUD and NZD futures “IR” and “BB” on ASX. 90D Bank Bills. - [ASX_3Year] Used for “YT” on ASX. 3YR semi-annual bond (6 coupons) @ 6%. - [ASX_5Year] Used for “VT” on ASX. 5yr semi-annual bond (10 coupons) @ 2%. - [ASX_10Year] Used for “XT” on ASX. 10yr semi-annual bond (20 coupons) @ 6%. - [ASX_20Year] Used for “LT” on ASX. 20yr semi-annual bond (40 coupons) @ 4%. - [B3_DI1] Used for “DI1” on B3. Average of 1D interbank deposit rates. - For futures with this calculation type, quote values are expected to be specified as a percentage. For example, a quoted rate of 13.205% should be specified as a quote of 13.205 with a face value of 100. Supported string (enumeration) values are: [Standard, ASX_BankBills, ASX_3Year, ASX_5Year, ASX_10Year, ASX_20Year, B3_DI1].")
38
- instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg")
38
+ instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
39
39
  additional_properties: Dict[str, Any] = {}
40
40
  __properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "refSpotPrice", "underlying", "calculationType"]
41
41
 
42
42
  @validator('instrument_type')
43
43
  def instrument_type_validate_enum(cls, value):
44
44
  """Validates the enum"""
45
- if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg'):
46
- raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg')")
45
+ if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
46
+ raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
47
47
  return value
48
48
 
49
49
  class Config: