lusid-sdk 2.1.748__py3-none-any.whl → 2.1.750__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. lusid/configuration.py +1 -1
  2. lusid/models/access_metadata_operation.py +52 -0
  3. lusid/models/account.py +52 -0
  4. lusid/models/accumulation_event.py +52 -0
  5. lusid/models/address_definition.py +52 -0
  6. lusid/models/address_key_compliance_parameter.py +52 -0
  7. lusid/models/address_key_list.py +52 -0
  8. lusid/models/address_key_list_compliance_parameter.py +52 -0
  9. lusid/models/adjust_global_commitment_event.py +52 -0
  10. lusid/models/aggregate_spec.py +53 -1
  11. lusid/models/aggregation_query.py +104 -0
  12. lusid/models/amortisation_event.py +52 -0
  13. lusid/models/append_fx_forward_curve_by_quote_reference.py +52 -0
  14. lusid/models/append_fx_forward_curve_data.py +52 -0
  15. lusid/models/append_fx_forward_pips_curve_data.py +52 -0
  16. lusid/models/append_fx_forward_tenor_curve_data.py +52 -0
  17. lusid/models/append_fx_forward_tenor_pips_curve_data.py +52 -0
  18. lusid/models/append_market_data.py +52 -0
  19. lusid/models/basket.py +52 -0
  20. lusid/models/bond.py +52 -0
  21. lusid/models/bond_conversion_schedule.py +52 -0
  22. lusid/models/bond_coupon_event.py +52 -0
  23. lusid/models/bond_default_event.py +52 -0
  24. lusid/models/bond_principal_event.py +52 -0
  25. lusid/models/bonus_issue_event.py +52 -0
  26. lusid/models/bool_compliance_parameter.py +52 -0
  27. lusid/models/bool_list_compliance_parameter.py +52 -0
  28. lusid/models/branch_step.py +52 -0
  29. lusid/models/branch_step_request.py +52 -0
  30. lusid/models/calendar_dependency.py +52 -0
  31. lusid/models/call_on_intermediate_securities_event.py +52 -0
  32. lusid/models/cap_floor.py +52 -0
  33. lusid/models/capital_distribution_event.py +52 -0
  34. lusid/models/cash.py +52 -0
  35. lusid/models/cash_dependency.py +52 -0
  36. lusid/models/cash_dividend_event.py +52 -0
  37. lusid/models/cash_flow_event.py +52 -0
  38. lusid/models/cash_flow_value.py +52 -0
  39. lusid/models/cash_flow_value_set.py +52 -0
  40. lusid/models/cash_perpetual.py +52 -0
  41. lusid/models/cds_credit_event.py +52 -0
  42. lusid/models/cds_index.py +52 -0
  43. lusid/models/cdx_credit_event.py +52 -0
  44. lusid/models/change_history.py +52 -0
  45. lusid/models/check_step.py +52 -0
  46. lusid/models/check_step_request.py +52 -0
  47. lusid/models/close_event.py +52 -0
  48. lusid/models/complete_portfolio.py +52 -0
  49. lusid/models/complex_bond.py +52 -0
  50. lusid/models/complex_market_data.py +52 -0
  51. lusid/models/compliance_parameter.py +52 -0
  52. lusid/models/compliance_step.py +52 -0
  53. lusid/models/compliance_step_request.py +52 -0
  54. lusid/models/constant_volatility_surface.py +52 -0
  55. lusid/models/contract_for_difference.py +52 -0
  56. lusid/models/contract_initialisation_event.py +52 -0
  57. lusid/models/create_data_type_request.py +156 -0
  58. lusid/models/create_derived_property_definition_request.py +52 -0
  59. lusid/models/create_derived_transaction_portfolio_request.py +52 -0
  60. lusid/models/create_identifier_definition_request.py +104 -0
  61. lusid/models/create_property_definition_request.py +104 -0
  62. lusid/models/create_simple_position_portfolio_request.py +52 -0
  63. lusid/models/create_transaction_portfolio_request.py +52 -0
  64. lusid/models/credit_default_swap.py +52 -0
  65. lusid/models/credit_premium_cash_flow_event.py +52 -0
  66. lusid/models/credit_spread_curve_data.py +52 -0
  67. lusid/models/curve_options.py +52 -0
  68. lusid/models/data_type.py +156 -0
  69. lusid/models/data_type_summary.py +156 -0
  70. lusid/models/date_time_compliance_parameter.py +52 -0
  71. lusid/models/date_time_list_compliance_parameter.py +52 -0
  72. lusid/models/decimal_compliance_parameter.py +52 -0
  73. lusid/models/decimal_list.py +52 -0
  74. lusid/models/decimal_list_compliance_parameter.py +52 -0
  75. lusid/models/deposit_close_event.py +52 -0
  76. lusid/models/deposit_interest_payment_event.py +52 -0
  77. lusid/models/discount_factor_curve_data.py +52 -0
  78. lusid/models/discounting_dependency.py +52 -0
  79. lusid/models/dividend_option_event.py +52 -0
  80. lusid/models/dividend_reinvestment_event.py +52 -0
  81. lusid/models/drawdown_event.py +52 -0
  82. lusid/models/early_redemption_event.py +52 -0
  83. lusid/models/economic_dependency.py +52 -0
  84. lusid/models/empty_model_options.py +52 -0
  85. lusid/models/equity.py +52 -0
  86. lusid/models/equity_curve_by_prices_data.py +52 -0
  87. lusid/models/equity_curve_dependency.py +52 -0
  88. lusid/models/equity_model_options.py +52 -0
  89. lusid/models/equity_option.py +52 -0
  90. lusid/models/equity_swap.py +52 -0
  91. lusid/models/equity_vol_dependency.py +52 -0
  92. lusid/models/equity_vol_surface_data.py +52 -0
  93. lusid/models/exchange_traded_option.py +52 -0
  94. lusid/models/exercise_event.py +52 -0
  95. lusid/models/exotic_instrument.py +52 -0
  96. lusid/models/expiry_event.py +52 -0
  97. lusid/models/field_schema.py +52 -0
  98. lusid/models/filter_predicate_compliance_parameter.py +52 -0
  99. lusid/models/filter_step.py +52 -0
  100. lusid/models/filter_step_request.py +52 -0
  101. lusid/models/fixed_leg.py +52 -0
  102. lusid/models/fixed_schedule.py +52 -0
  103. lusid/models/flexible_deposit.py +52 -0
  104. lusid/models/flexible_loan.py +52 -0
  105. lusid/models/float_schedule.py +52 -0
  106. lusid/models/floating_leg.py +52 -0
  107. lusid/models/forward_rate_agreement.py +52 -0
  108. lusid/models/fund_id_list.py +52 -0
  109. lusid/models/fund_share_class.py +52 -0
  110. lusid/models/funding_leg.py +52 -0
  111. lusid/models/funding_leg_options.py +52 -0
  112. lusid/models/future.py +52 -0
  113. lusid/models/future_expiry_event.py +52 -0
  114. lusid/models/future_mark_to_market_event.py +52 -0
  115. lusid/models/fx_dependency.py +52 -0
  116. lusid/models/fx_forward.py +52 -0
  117. lusid/models/fx_forward_curve_by_quote_reference.py +52 -0
  118. lusid/models/fx_forward_curve_data.py +52 -0
  119. lusid/models/fx_forward_model_options.py +156 -0
  120. lusid/models/fx_forward_pips_curve_data.py +52 -0
  121. lusid/models/fx_forward_settlement_event.py +52 -0
  122. lusid/models/fx_forward_tenor_curve_data.py +52 -0
  123. lusid/models/fx_forward_tenor_pips_curve_data.py +52 -0
  124. lusid/models/fx_forwards_dependency.py +52 -0
  125. lusid/models/fx_linked_notional_schedule.py +52 -0
  126. lusid/models/fx_option.py +52 -0
  127. lusid/models/fx_rate_schedule.py +52 -0
  128. lusid/models/fx_swap.py +52 -0
  129. lusid/models/fx_vol_dependency.py +52 -0
  130. lusid/models/fx_vol_surface_data.py +52 -0
  131. lusid/models/get_reference_portfolio_constituents_response.py +104 -0
  132. lusid/models/group_by_selector_compliance_parameter.py +52 -0
  133. lusid/models/group_by_step.py +52 -0
  134. lusid/models/group_by_step_request.py +52 -0
  135. lusid/models/group_calculation_compliance_parameter.py +52 -0
  136. lusid/models/group_filter_predicate_compliance_parameter.py +52 -0
  137. lusid/models/group_filter_step.py +52 -0
  138. lusid/models/group_filter_step_request.py +52 -0
  139. lusid/models/holdings_adjustment.py +52 -0
  140. lusid/models/holdings_adjustment_header.py +52 -0
  141. lusid/models/i_unit_definition_dto.py +52 -0
  142. lusid/models/identifier_definition.py +104 -0
  143. lusid/models/index_model_options.py +104 -0
  144. lusid/models/index_projection_dependency.py +52 -0
  145. lusid/models/inflation_fixing_dependency.py +52 -0
  146. lusid/models/inflation_leg.py +52 -0
  147. lusid/models/inflation_linked_bond.py +52 -0
  148. lusid/models/inflation_swap.py +52 -0
  149. lusid/models/informational_error_event.py +52 -0
  150. lusid/models/informational_event.py +52 -0
  151. lusid/models/instrument.py +104 -0
  152. lusid/models/instrument_event.py +52 -0
  153. lusid/models/instrument_leg.py +52 -0
  154. lusid/models/instrument_list.py +52 -0
  155. lusid/models/instrument_list_compliance_parameter.py +52 -0
  156. lusid/models/interest_rate_swap.py +52 -0
  157. lusid/models/interest_rate_swaption.py +52 -0
  158. lusid/models/intermediate_compliance_step.py +52 -0
  159. lusid/models/intermediate_compliance_step_request.py +52 -0
  160. lusid/models/intermediate_securities_distribution_event.py +52 -0
  161. lusid/models/ir_vol_cube_data.py +52 -0
  162. lusid/models/ir_vol_dependency.py +52 -0
  163. lusid/models/life_cycle_event_value.py +52 -0
  164. lusid/models/loan_facility.py +52 -0
  165. lusid/models/loan_interest_repayment_event.py +52 -0
  166. lusid/models/loan_principal_repayment_event.py +52 -0
  167. lusid/models/lusid_instrument.py +52 -0
  168. lusid/models/lusid_trade_ticket.py +52 -0
  169. lusid/models/market_data_key_rule.py +52 -0
  170. lusid/models/market_data_options.py +52 -0
  171. lusid/models/market_data_specific_rule.py +52 -0
  172. lusid/models/market_quote.py +52 -0
  173. lusid/models/mastered_instrument.py +52 -0
  174. lusid/models/match_criterion.py +52 -0
  175. lusid/models/maturity_event.py +52 -0
  176. lusid/models/mbs_coupon_event.py +52 -0
  177. lusid/models/mbs_interest_deferral_event.py +52 -0
  178. lusid/models/mbs_interest_shortfall_event.py +52 -0
  179. lusid/models/mbs_principal_event.py +52 -0
  180. lusid/models/mbs_principal_write_off_event.py +52 -0
  181. lusid/models/merger_event.py +52 -0
  182. lusid/models/model_options.py +52 -0
  183. lusid/models/model_selection.py +104 -0
  184. lusid/models/opaque_dependency.py +52 -0
  185. lusid/models/opaque_market_data.py +52 -0
  186. lusid/models/opaque_model_options.py +53 -1
  187. lusid/models/open_event.py +52 -0
  188. lusid/models/option_exercise_cash_event.py +52 -0
  189. lusid/models/option_exercise_physical_event.py +52 -0
  190. lusid/models/optionality_schedule.py +52 -0
  191. lusid/models/order_by_spec.py +52 -0
  192. lusid/models/output_transaction.py +52 -0
  193. lusid/models/percent_check_step.py +52 -0
  194. lusid/models/percent_check_step_request.py +52 -0
  195. lusid/models/portfolio.py +104 -0
  196. lusid/models/portfolio_details.py +52 -0
  197. lusid/models/portfolio_group_id_compliance_parameter.py +52 -0
  198. lusid/models/portfolio_group_id_list.py +52 -0
  199. lusid/models/portfolio_group_id_list_compliance_parameter.py +52 -0
  200. lusid/models/portfolio_id_compliance_parameter.py +52 -0
  201. lusid/models/portfolio_id_list.py +52 -0
  202. lusid/models/portfolio_id_list_compliance_parameter.py +52 -0
  203. lusid/models/portfolio_result_data_key_rule.py +52 -0
  204. lusid/models/portfolio_search_result.py +52 -0
  205. lusid/models/portfolio_without_href.py +104 -0
  206. lusid/models/property_definition.py +312 -0
  207. lusid/models/property_definition_search_result.py +312 -0
  208. lusid/models/property_filter.py +104 -0
  209. lusid/models/property_key_compliance_parameter.py +52 -0
  210. lusid/models/property_key_list_compliance_parameter.py +52 -0
  211. lusid/models/property_list.py +52 -0
  212. lusid/models/property_list_compliance_parameter.py +52 -0
  213. lusid/models/property_value_equals.py +52 -0
  214. lusid/models/property_value_in.py +52 -0
  215. lusid/models/protection_payout_cash_flow_event.py +52 -0
  216. lusid/models/quote_dependency.py +52 -0
  217. lusid/models/quote_series_id.py +104 -0
  218. lusid/models/raw_vendor_event.py +52 -0
  219. lusid/models/recombine_step.py +52 -0
  220. lusid/models/reconcile_date_time_rule.py +104 -0
  221. lusid/models/reconcile_numeric_rule.py +104 -0
  222. lusid/models/reconcile_string_rule.py +104 -0
  223. lusid/models/reconciliation_line.py +4 -4
  224. lusid/models/reconciliation_rule.py +52 -0
  225. lusid/models/reference_instrument.py +52 -0
  226. lusid/models/reference_list.py +52 -0
  227. lusid/models/repo.py +52 -0
  228. lusid/models/reset_event.py +52 -0
  229. lusid/models/resource_list_of_value_type.py +1 -1
  230. lusid/models/result_data_key_rule.py +52 -0
  231. lusid/models/result_key_rule.py +52 -0
  232. lusid/models/result_value.py +52 -0
  233. lusid/models/result_value0_d.py +52 -0
  234. lusid/models/result_value_bool.py +52 -0
  235. lusid/models/result_value_currency.py +52 -0
  236. lusid/models/result_value_date_time_offset.py +52 -0
  237. lusid/models/result_value_decimal.py +52 -0
  238. lusid/models/result_value_dictionary.py +52 -0
  239. lusid/models/result_value_int.py +52 -0
  240. lusid/models/result_value_string.py +52 -0
  241. lusid/models/reverse_stock_split_event.py +52 -0
  242. lusid/models/schedule.py +52 -0
  243. lusid/models/scrip_dividend_event.py +52 -0
  244. lusid/models/simple_cash_flow_loan.py +52 -0
  245. lusid/models/simple_instrument.py +104 -0
  246. lusid/models/spin_off_event.py +52 -0
  247. lusid/models/step_schedule.py +52 -0
  248. lusid/models/stock_dividend_event.py +52 -0
  249. lusid/models/stock_split_event.py +52 -0
  250. lusid/models/string_compliance_parameter.py +52 -0
  251. lusid/models/string_list.py +52 -0
  252. lusid/models/string_list_compliance_parameter.py +52 -0
  253. lusid/models/sub_holding_key_value_equals.py +52 -0
  254. lusid/models/swap_cash_flow_event.py +52 -0
  255. lusid/models/swap_principal_event.py +52 -0
  256. lusid/models/tender_event.py +52 -0
  257. lusid/models/term_deposit.py +52 -0
  258. lusid/models/term_deposit_interest_event.py +52 -0
  259. lusid/models/term_deposit_principal_event.py +52 -0
  260. lusid/models/total_return_swap.py +52 -0
  261. lusid/models/trade_ticket.py +52 -0
  262. lusid/models/transaction.py +52 -0
  263. lusid/models/transaction_configuration_movement_data.py +52 -0
  264. lusid/models/transaction_configuration_movement_data_request.py +52 -0
  265. lusid/models/transaction_configuration_type_alias.py +52 -0
  266. lusid/models/transaction_price.py +52 -0
  267. lusid/models/transaction_query_parameters.py +52 -0
  268. lusid/models/transition_event.py +52 -0
  269. lusid/models/trigger_event.py +52 -0
  270. lusid/models/update_deposit_amount_event.py +52 -0
  271. lusid/models/upsert_reference_portfolio_constituents_request.py +104 -0
  272. lusid/models/vendor_dependency.py +52 -0
  273. lusid/models/vendor_model_rule.py +52 -0
  274. lusid/models/weekend_mask.py +1 -1
  275. lusid/models/yield_curve_data.py +52 -0
  276. {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.750.dist-info}/METADATA +1 -1
  277. {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.750.dist-info}/RECORD +278 -278
  278. {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.750.dist-info}/WHEEL +0 -0
@@ -43,6 +43,58 @@ class FxForwardCurveByQuoteReference(ComplexMarketData):
43
43
  @validator('market_data_type')
44
44
  def market_data_type_validate_enum(cls, value):
45
45
  """Validates the enum"""
46
+
47
+ # Finbourne have removed enum validation on all models, except for this use case:
48
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
49
+ # During instantiation, the value of 'type' is checked against the enum values,
50
+
51
+
52
+ # check it's a class that uses the 'type' property as a discriminator
53
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
54
+ if 'FxForwardCurveByQuoteReference' not in [
55
+ # For notification application classes
56
+ 'AmazonSqsNotificationType',
57
+ 'AmazonSqsNotificationTypeResponse',
58
+ 'AmazonSqsPrincipalAuthNotificationType',
59
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
60
+ 'AzureServiceBusTypeResponse',
61
+ 'AzureServiceBusNotificationType',
62
+ 'EmailNotificationType',
63
+ 'EmailNotificationTypeResponse',
64
+ 'SmsNotificationType',
65
+ 'SmsNotificationTypeResponse',
66
+ 'WebhookNotificationType',
67
+ 'WebhookNotificationTypeResponse',
68
+
69
+ # For workflow application classes
70
+ 'CreateChildTasksAction',
71
+ 'RunWorkerAction',
72
+ 'TriggerParentTaskAction',
73
+ 'CreateChildTasksActionResponse',
74
+ 'RunWorkerActionResponse',
75
+ 'TriggerParentTaskActionResponse',
76
+ 'CreateNewTaskActivity',
77
+ 'UpdateMatchingTasksActivity',
78
+ 'CreateNewTaskActivityResponse',
79
+ 'UpdateMatchingTasksActivityResponse',
80
+ 'Fail',
81
+ 'GroupReconciliation',
82
+ 'HealthCheck',
83
+ 'LuminesceView',
84
+ 'SchedulerJob',
85
+ 'Sleep',
86
+ 'FailResponse',
87
+ 'GroupReconciliationResponse',
88
+ 'HealthCheckResponse',
89
+ 'LuminesceViewResponse',
90
+ 'SchedulerJobResponse',
91
+ 'SleepResponse']:
92
+ return value
93
+
94
+ # Only validate the 'type' property of the class
95
+ if "market_data_type" != "type":
96
+ return value
97
+
46
98
  if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
47
99
  raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
48
100
  return value
@@ -41,6 +41,58 @@ class FxForwardCurveData(ComplexMarketData):
41
41
  @validator('market_data_type')
42
42
  def market_data_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
+
45
+ # Finbourne have removed enum validation on all models, except for this use case:
46
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
47
+ # During instantiation, the value of 'type' is checked against the enum values,
48
+
49
+
50
+ # check it's a class that uses the 'type' property as a discriminator
51
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
52
+ if 'FxForwardCurveData' not in [
53
+ # For notification application classes
54
+ 'AmazonSqsNotificationType',
55
+ 'AmazonSqsNotificationTypeResponse',
56
+ 'AmazonSqsPrincipalAuthNotificationType',
57
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
58
+ 'AzureServiceBusTypeResponse',
59
+ 'AzureServiceBusNotificationType',
60
+ 'EmailNotificationType',
61
+ 'EmailNotificationTypeResponse',
62
+ 'SmsNotificationType',
63
+ 'SmsNotificationTypeResponse',
64
+ 'WebhookNotificationType',
65
+ 'WebhookNotificationTypeResponse',
66
+
67
+ # For workflow application classes
68
+ 'CreateChildTasksAction',
69
+ 'RunWorkerAction',
70
+ 'TriggerParentTaskAction',
71
+ 'CreateChildTasksActionResponse',
72
+ 'RunWorkerActionResponse',
73
+ 'TriggerParentTaskActionResponse',
74
+ 'CreateNewTaskActivity',
75
+ 'UpdateMatchingTasksActivity',
76
+ 'CreateNewTaskActivityResponse',
77
+ 'UpdateMatchingTasksActivityResponse',
78
+ 'Fail',
79
+ 'GroupReconciliation',
80
+ 'HealthCheck',
81
+ 'LuminesceView',
82
+ 'SchedulerJob',
83
+ 'Sleep',
84
+ 'FailResponse',
85
+ 'GroupReconciliationResponse',
86
+ 'HealthCheckResponse',
87
+ 'LuminesceViewResponse',
88
+ 'SchedulerJobResponse',
89
+ 'SleepResponse']:
90
+ return value
91
+
92
+ # Only validate the 'type' property of the class
93
+ if "market_data_type" != "type":
94
+ return value
95
+
44
96
  if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
45
97
  raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
46
98
  return value
@@ -36,6 +36,58 @@ class FxForwardModelOptions(ModelOptions):
36
36
  @validator('forward_rate_observable_type')
37
37
  def forward_rate_observable_type_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
+
40
+ # Finbourne have removed enum validation on all models, except for this use case:
41
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
42
+ # During instantiation, the value of 'type' is checked against the enum values,
43
+
44
+
45
+ # check it's a class that uses the 'type' property as a discriminator
46
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
47
+ if 'FxForwardModelOptions' not in [
48
+ # For notification application classes
49
+ 'AmazonSqsNotificationType',
50
+ 'AmazonSqsNotificationTypeResponse',
51
+ 'AmazonSqsPrincipalAuthNotificationType',
52
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
53
+ 'AzureServiceBusTypeResponse',
54
+ 'AzureServiceBusNotificationType',
55
+ 'EmailNotificationType',
56
+ 'EmailNotificationTypeResponse',
57
+ 'SmsNotificationType',
58
+ 'SmsNotificationTypeResponse',
59
+ 'WebhookNotificationType',
60
+ 'WebhookNotificationTypeResponse',
61
+
62
+ # For workflow application classes
63
+ 'CreateChildTasksAction',
64
+ 'RunWorkerAction',
65
+ 'TriggerParentTaskAction',
66
+ 'CreateChildTasksActionResponse',
67
+ 'RunWorkerActionResponse',
68
+ 'TriggerParentTaskActionResponse',
69
+ 'CreateNewTaskActivity',
70
+ 'UpdateMatchingTasksActivity',
71
+ 'CreateNewTaskActivityResponse',
72
+ 'UpdateMatchingTasksActivityResponse',
73
+ 'Fail',
74
+ 'GroupReconciliation',
75
+ 'HealthCheck',
76
+ 'LuminesceView',
77
+ 'SchedulerJob',
78
+ 'Sleep',
79
+ 'FailResponse',
80
+ 'GroupReconciliationResponse',
81
+ 'HealthCheckResponse',
82
+ 'LuminesceViewResponse',
83
+ 'SchedulerJobResponse',
84
+ 'SleepResponse']:
85
+ return value
86
+
87
+ # Only validate the 'type' property of the class
88
+ if "forward_rate_observable_type" != "type":
89
+ return value
90
+
39
91
  if value not in ('ForwardPoints', 'ForwardRate', 'RatesCurve', 'FxForwardCurve', 'Invalid'):
40
92
  raise ValueError("must be one of enum values ('ForwardPoints', 'ForwardRate', 'RatesCurve', 'FxForwardCurve', 'Invalid')")
41
93
  return value
@@ -43,6 +95,58 @@ class FxForwardModelOptions(ModelOptions):
43
95
  @validator('discounting_method')
44
96
  def discounting_method_validate_enum(cls, value):
45
97
  """Validates the enum"""
98
+
99
+ # Finbourne have removed enum validation on all models, except for this use case:
100
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
101
+ # During instantiation, the value of 'type' is checked against the enum values,
102
+
103
+
104
+ # check it's a class that uses the 'type' property as a discriminator
105
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
106
+ if 'FxForwardModelOptions' not in [
107
+ # For notification application classes
108
+ 'AmazonSqsNotificationType',
109
+ 'AmazonSqsNotificationTypeResponse',
110
+ 'AmazonSqsPrincipalAuthNotificationType',
111
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
112
+ 'AzureServiceBusTypeResponse',
113
+ 'AzureServiceBusNotificationType',
114
+ 'EmailNotificationType',
115
+ 'EmailNotificationTypeResponse',
116
+ 'SmsNotificationType',
117
+ 'SmsNotificationTypeResponse',
118
+ 'WebhookNotificationType',
119
+ 'WebhookNotificationTypeResponse',
120
+
121
+ # For workflow application classes
122
+ 'CreateChildTasksAction',
123
+ 'RunWorkerAction',
124
+ 'TriggerParentTaskAction',
125
+ 'CreateChildTasksActionResponse',
126
+ 'RunWorkerActionResponse',
127
+ 'TriggerParentTaskActionResponse',
128
+ 'CreateNewTaskActivity',
129
+ 'UpdateMatchingTasksActivity',
130
+ 'CreateNewTaskActivityResponse',
131
+ 'UpdateMatchingTasksActivityResponse',
132
+ 'Fail',
133
+ 'GroupReconciliation',
134
+ 'HealthCheck',
135
+ 'LuminesceView',
136
+ 'SchedulerJob',
137
+ 'Sleep',
138
+ 'FailResponse',
139
+ 'GroupReconciliationResponse',
140
+ 'HealthCheckResponse',
141
+ 'LuminesceViewResponse',
142
+ 'SchedulerJobResponse',
143
+ 'SleepResponse']:
144
+ return value
145
+
146
+ # Only validate the 'type' property of the class
147
+ if "discounting_method" != "type":
148
+ return value
149
+
46
150
  if value not in ('Standard', 'ConstantTimeValueOfMoney', 'Invalid'):
47
151
  raise ValueError("must be one of enum values ('Standard', 'ConstantTimeValueOfMoney', 'Invalid')")
48
152
  return value
@@ -50,6 +154,58 @@ class FxForwardModelOptions(ModelOptions):
50
154
  @validator('model_options_type')
51
155
  def model_options_type_validate_enum(cls, value):
52
156
  """Validates the enum"""
157
+
158
+ # Finbourne have removed enum validation on all models, except for this use case:
159
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
160
+ # During instantiation, the value of 'type' is checked against the enum values,
161
+
162
+
163
+ # check it's a class that uses the 'type' property as a discriminator
164
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
165
+ if 'FxForwardModelOptions' not in [
166
+ # For notification application classes
167
+ 'AmazonSqsNotificationType',
168
+ 'AmazonSqsNotificationTypeResponse',
169
+ 'AmazonSqsPrincipalAuthNotificationType',
170
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
171
+ 'AzureServiceBusTypeResponse',
172
+ 'AzureServiceBusNotificationType',
173
+ 'EmailNotificationType',
174
+ 'EmailNotificationTypeResponse',
175
+ 'SmsNotificationType',
176
+ 'SmsNotificationTypeResponse',
177
+ 'WebhookNotificationType',
178
+ 'WebhookNotificationTypeResponse',
179
+
180
+ # For workflow application classes
181
+ 'CreateChildTasksAction',
182
+ 'RunWorkerAction',
183
+ 'TriggerParentTaskAction',
184
+ 'CreateChildTasksActionResponse',
185
+ 'RunWorkerActionResponse',
186
+ 'TriggerParentTaskActionResponse',
187
+ 'CreateNewTaskActivity',
188
+ 'UpdateMatchingTasksActivity',
189
+ 'CreateNewTaskActivityResponse',
190
+ 'UpdateMatchingTasksActivityResponse',
191
+ 'Fail',
192
+ 'GroupReconciliation',
193
+ 'HealthCheck',
194
+ 'LuminesceView',
195
+ 'SchedulerJob',
196
+ 'Sleep',
197
+ 'FailResponse',
198
+ 'GroupReconciliationResponse',
199
+ 'HealthCheckResponse',
200
+ 'LuminesceViewResponse',
201
+ 'SchedulerJobResponse',
202
+ 'SleepResponse']:
203
+ return value
204
+
205
+ # Only validate the 'type' property of the class
206
+ if "model_options_type" != "type":
207
+ return value
208
+
53
209
  if value not in ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions'):
54
210
  raise ValueError("must be one of enum values ('Invalid', 'OpaqueModelOptions', 'EmptyModelOptions', 'IndexModelOptions', 'FxForwardModelOptions', 'FundingLegModelOptions', 'EquityModelOptions')")
55
211
  return value
@@ -41,6 +41,58 @@ class FxForwardPipsCurveData(ComplexMarketData):
41
41
  @validator('market_data_type')
42
42
  def market_data_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
+
45
+ # Finbourne have removed enum validation on all models, except for this use case:
46
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
47
+ # During instantiation, the value of 'type' is checked against the enum values,
48
+
49
+
50
+ # check it's a class that uses the 'type' property as a discriminator
51
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
52
+ if 'FxForwardPipsCurveData' not in [
53
+ # For notification application classes
54
+ 'AmazonSqsNotificationType',
55
+ 'AmazonSqsNotificationTypeResponse',
56
+ 'AmazonSqsPrincipalAuthNotificationType',
57
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
58
+ 'AzureServiceBusTypeResponse',
59
+ 'AzureServiceBusNotificationType',
60
+ 'EmailNotificationType',
61
+ 'EmailNotificationTypeResponse',
62
+ 'SmsNotificationType',
63
+ 'SmsNotificationTypeResponse',
64
+ 'WebhookNotificationType',
65
+ 'WebhookNotificationTypeResponse',
66
+
67
+ # For workflow application classes
68
+ 'CreateChildTasksAction',
69
+ 'RunWorkerAction',
70
+ 'TriggerParentTaskAction',
71
+ 'CreateChildTasksActionResponse',
72
+ 'RunWorkerActionResponse',
73
+ 'TriggerParentTaskActionResponse',
74
+ 'CreateNewTaskActivity',
75
+ 'UpdateMatchingTasksActivity',
76
+ 'CreateNewTaskActivityResponse',
77
+ 'UpdateMatchingTasksActivityResponse',
78
+ 'Fail',
79
+ 'GroupReconciliation',
80
+ 'HealthCheck',
81
+ 'LuminesceView',
82
+ 'SchedulerJob',
83
+ 'Sleep',
84
+ 'FailResponse',
85
+ 'GroupReconciliationResponse',
86
+ 'HealthCheckResponse',
87
+ 'LuminesceViewResponse',
88
+ 'SchedulerJobResponse',
89
+ 'SleepResponse']:
90
+ return value
91
+
92
+ # Only validate the 'type' property of the class
93
+ if "market_data_type" != "type":
94
+ return value
95
+
44
96
  if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
45
97
  raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
46
98
  return value
@@ -45,6 +45,58 @@ class FxForwardSettlementEvent(InstrumentEvent):
45
45
  @validator('instrument_event_type')
46
46
  def instrument_event_type_validate_enum(cls, value):
47
47
  """Validates the enum"""
48
+
49
+ # Finbourne have removed enum validation on all models, except for this use case:
50
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
51
+ # During instantiation, the value of 'type' is checked against the enum values,
52
+
53
+
54
+ # check it's a class that uses the 'type' property as a discriminator
55
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
56
+ if 'FxForwardSettlementEvent' not in [
57
+ # For notification application classes
58
+ 'AmazonSqsNotificationType',
59
+ 'AmazonSqsNotificationTypeResponse',
60
+ 'AmazonSqsPrincipalAuthNotificationType',
61
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
62
+ 'AzureServiceBusTypeResponse',
63
+ 'AzureServiceBusNotificationType',
64
+ 'EmailNotificationType',
65
+ 'EmailNotificationTypeResponse',
66
+ 'SmsNotificationType',
67
+ 'SmsNotificationTypeResponse',
68
+ 'WebhookNotificationType',
69
+ 'WebhookNotificationTypeResponse',
70
+
71
+ # For workflow application classes
72
+ 'CreateChildTasksAction',
73
+ 'RunWorkerAction',
74
+ 'TriggerParentTaskAction',
75
+ 'CreateChildTasksActionResponse',
76
+ 'RunWorkerActionResponse',
77
+ 'TriggerParentTaskActionResponse',
78
+ 'CreateNewTaskActivity',
79
+ 'UpdateMatchingTasksActivity',
80
+ 'CreateNewTaskActivityResponse',
81
+ 'UpdateMatchingTasksActivityResponse',
82
+ 'Fail',
83
+ 'GroupReconciliation',
84
+ 'HealthCheck',
85
+ 'LuminesceView',
86
+ 'SchedulerJob',
87
+ 'Sleep',
88
+ 'FailResponse',
89
+ 'GroupReconciliationResponse',
90
+ 'HealthCheckResponse',
91
+ 'LuminesceViewResponse',
92
+ 'SchedulerJobResponse',
93
+ 'SleepResponse']:
94
+ return value
95
+
96
+ # Only validate the 'type' property of the class
97
+ if "instrument_event_type" != "type":
98
+ return value
99
+
48
100
  if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent', 'TermDepositInterestEvent', 'TermDepositPrincipalEvent', 'EarlyRedemptionEvent', 'FutureMarkToMarketEvent', 'AdjustGlobalCommitmentEvent', 'ContractInitialisationEvent', 'DrawdownEvent', 'LoanInterestRepaymentEvent', 'UpdateDepositAmountEvent', 'LoanPrincipalRepaymentEvent', 'DepositInterestPaymentEvent', 'DepositCloseEvent'):
49
101
  raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent', 'TermDepositInterestEvent', 'TermDepositPrincipalEvent', 'EarlyRedemptionEvent', 'FutureMarkToMarketEvent', 'AdjustGlobalCommitmentEvent', 'ContractInitialisationEvent', 'DrawdownEvent', 'LoanInterestRepaymentEvent', 'UpdateDepositAmountEvent', 'LoanPrincipalRepaymentEvent', 'DepositInterestPaymentEvent', 'DepositCloseEvent')")
50
102
  return value
@@ -44,6 +44,58 @@ class FxForwardTenorCurveData(ComplexMarketData):
44
44
  @validator('market_data_type')
45
45
  def market_data_type_validate_enum(cls, value):
46
46
  """Validates the enum"""
47
+
48
+ # Finbourne have removed enum validation on all models, except for this use case:
49
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
50
+ # During instantiation, the value of 'type' is checked against the enum values,
51
+
52
+
53
+ # check it's a class that uses the 'type' property as a discriminator
54
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
55
+ if 'FxForwardTenorCurveData' not in [
56
+ # For notification application classes
57
+ 'AmazonSqsNotificationType',
58
+ 'AmazonSqsNotificationTypeResponse',
59
+ 'AmazonSqsPrincipalAuthNotificationType',
60
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
61
+ 'AzureServiceBusTypeResponse',
62
+ 'AzureServiceBusNotificationType',
63
+ 'EmailNotificationType',
64
+ 'EmailNotificationTypeResponse',
65
+ 'SmsNotificationType',
66
+ 'SmsNotificationTypeResponse',
67
+ 'WebhookNotificationType',
68
+ 'WebhookNotificationTypeResponse',
69
+
70
+ # For workflow application classes
71
+ 'CreateChildTasksAction',
72
+ 'RunWorkerAction',
73
+ 'TriggerParentTaskAction',
74
+ 'CreateChildTasksActionResponse',
75
+ 'RunWorkerActionResponse',
76
+ 'TriggerParentTaskActionResponse',
77
+ 'CreateNewTaskActivity',
78
+ 'UpdateMatchingTasksActivity',
79
+ 'CreateNewTaskActivityResponse',
80
+ 'UpdateMatchingTasksActivityResponse',
81
+ 'Fail',
82
+ 'GroupReconciliation',
83
+ 'HealthCheck',
84
+ 'LuminesceView',
85
+ 'SchedulerJob',
86
+ 'Sleep',
87
+ 'FailResponse',
88
+ 'GroupReconciliationResponse',
89
+ 'HealthCheckResponse',
90
+ 'LuminesceViewResponse',
91
+ 'SchedulerJobResponse',
92
+ 'SleepResponse']:
93
+ return value
94
+
95
+ # Only validate the 'type' property of the class
96
+ if "market_data_type" != "type":
97
+ return value
98
+
47
99
  if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
48
100
  raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
49
101
  return value
@@ -44,6 +44,58 @@ class FxForwardTenorPipsCurveData(ComplexMarketData):
44
44
  @validator('market_data_type')
45
45
  def market_data_type_validate_enum(cls, value):
46
46
  """Validates the enum"""
47
+
48
+ # Finbourne have removed enum validation on all models, except for this use case:
49
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
50
+ # During instantiation, the value of 'type' is checked against the enum values,
51
+
52
+
53
+ # check it's a class that uses the 'type' property as a discriminator
54
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
55
+ if 'FxForwardTenorPipsCurveData' not in [
56
+ # For notification application classes
57
+ 'AmazonSqsNotificationType',
58
+ 'AmazonSqsNotificationTypeResponse',
59
+ 'AmazonSqsPrincipalAuthNotificationType',
60
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
61
+ 'AzureServiceBusTypeResponse',
62
+ 'AzureServiceBusNotificationType',
63
+ 'EmailNotificationType',
64
+ 'EmailNotificationTypeResponse',
65
+ 'SmsNotificationType',
66
+ 'SmsNotificationTypeResponse',
67
+ 'WebhookNotificationType',
68
+ 'WebhookNotificationTypeResponse',
69
+
70
+ # For workflow application classes
71
+ 'CreateChildTasksAction',
72
+ 'RunWorkerAction',
73
+ 'TriggerParentTaskAction',
74
+ 'CreateChildTasksActionResponse',
75
+ 'RunWorkerActionResponse',
76
+ 'TriggerParentTaskActionResponse',
77
+ 'CreateNewTaskActivity',
78
+ 'UpdateMatchingTasksActivity',
79
+ 'CreateNewTaskActivityResponse',
80
+ 'UpdateMatchingTasksActivityResponse',
81
+ 'Fail',
82
+ 'GroupReconciliation',
83
+ 'HealthCheck',
84
+ 'LuminesceView',
85
+ 'SchedulerJob',
86
+ 'Sleep',
87
+ 'FailResponse',
88
+ 'GroupReconciliationResponse',
89
+ 'HealthCheckResponse',
90
+ 'LuminesceViewResponse',
91
+ 'SchedulerJobResponse',
92
+ 'SleepResponse']:
93
+ return value
94
+
95
+ # Only validate the 'type' property of the class
96
+ if "market_data_type" != "type":
97
+ return value
98
+
47
99
  if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
48
100
  raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
49
101
  return value
@@ -37,6 +37,58 @@ class FxForwardsDependency(EconomicDependency):
37
37
  @validator('dependency_type')
38
38
  def dependency_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
+
41
+ # Finbourne have removed enum validation on all models, except for this use case:
42
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
43
+ # During instantiation, the value of 'type' is checked against the enum values,
44
+
45
+
46
+ # check it's a class that uses the 'type' property as a discriminator
47
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
48
+ if 'FxForwardsDependency' not in [
49
+ # For notification application classes
50
+ 'AmazonSqsNotificationType',
51
+ 'AmazonSqsNotificationTypeResponse',
52
+ 'AmazonSqsPrincipalAuthNotificationType',
53
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
54
+ 'AzureServiceBusTypeResponse',
55
+ 'AzureServiceBusNotificationType',
56
+ 'EmailNotificationType',
57
+ 'EmailNotificationTypeResponse',
58
+ 'SmsNotificationType',
59
+ 'SmsNotificationTypeResponse',
60
+ 'WebhookNotificationType',
61
+ 'WebhookNotificationTypeResponse',
62
+
63
+ # For workflow application classes
64
+ 'CreateChildTasksAction',
65
+ 'RunWorkerAction',
66
+ 'TriggerParentTaskAction',
67
+ 'CreateChildTasksActionResponse',
68
+ 'RunWorkerActionResponse',
69
+ 'TriggerParentTaskActionResponse',
70
+ 'CreateNewTaskActivity',
71
+ 'UpdateMatchingTasksActivity',
72
+ 'CreateNewTaskActivityResponse',
73
+ 'UpdateMatchingTasksActivityResponse',
74
+ 'Fail',
75
+ 'GroupReconciliation',
76
+ 'HealthCheck',
77
+ 'LuminesceView',
78
+ 'SchedulerJob',
79
+ 'Sleep',
80
+ 'FailResponse',
81
+ 'GroupReconciliationResponse',
82
+ 'HealthCheckResponse',
83
+ 'LuminesceViewResponse',
84
+ 'SchedulerJobResponse',
85
+ 'SleepResponse']:
86
+ return value
87
+
88
+ # Only validate the 'type' property of the class
89
+ if "dependency_type" != "type":
90
+ return value
91
+
40
92
  if value not in ('OpaqueDependency', 'CashDependency', 'DiscountingDependency', 'EquityCurveDependency', 'EquityVolDependency', 'FxDependency', 'FxForwardsDependency', 'FxVolDependency', 'IndexProjectionDependency', 'IrVolDependency', 'QuoteDependency', 'Vendor', 'CalendarDependency', 'InflationFixingDependency'):
41
93
  raise ValueError("must be one of enum values ('OpaqueDependency', 'CashDependency', 'DiscountingDependency', 'EquityCurveDependency', 'EquityVolDependency', 'FxDependency', 'FxForwardsDependency', 'FxVolDependency', 'IndexProjectionDependency', 'IrVolDependency', 'QuoteDependency', 'Vendor', 'CalendarDependency', 'InflationFixingDependency')")
42
94
  return value