lusid-sdk 2.1.748__py3-none-any.whl → 2.1.749__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.
- lusid/configuration.py +1 -1
- lusid/models/access_metadata_operation.py +52 -0
- lusid/models/account.py +52 -0
- lusid/models/accumulation_event.py +52 -0
- lusid/models/address_definition.py +52 -0
- lusid/models/address_key_compliance_parameter.py +52 -0
- lusid/models/address_key_list.py +52 -0
- lusid/models/address_key_list_compliance_parameter.py +52 -0
- lusid/models/adjust_global_commitment_event.py +52 -0
- lusid/models/aggregate_spec.py +52 -0
- lusid/models/aggregation_query.py +104 -0
- lusid/models/amortisation_event.py +52 -0
- lusid/models/append_fx_forward_curve_by_quote_reference.py +52 -0
- lusid/models/append_fx_forward_curve_data.py +52 -0
- lusid/models/append_fx_forward_pips_curve_data.py +52 -0
- lusid/models/append_fx_forward_tenor_curve_data.py +52 -0
- lusid/models/append_fx_forward_tenor_pips_curve_data.py +52 -0
- lusid/models/append_market_data.py +52 -0
- lusid/models/basket.py +52 -0
- lusid/models/bond.py +52 -0
- lusid/models/bond_conversion_schedule.py +52 -0
- lusid/models/bond_coupon_event.py +52 -0
- lusid/models/bond_default_event.py +52 -0
- lusid/models/bond_principal_event.py +52 -0
- lusid/models/bonus_issue_event.py +52 -0
- lusid/models/bool_compliance_parameter.py +52 -0
- lusid/models/bool_list_compliance_parameter.py +52 -0
- lusid/models/branch_step.py +52 -0
- lusid/models/branch_step_request.py +52 -0
- lusid/models/calendar_dependency.py +52 -0
- lusid/models/call_on_intermediate_securities_event.py +52 -0
- lusid/models/cap_floor.py +52 -0
- lusid/models/capital_distribution_event.py +52 -0
- lusid/models/cash.py +52 -0
- lusid/models/cash_dependency.py +52 -0
- lusid/models/cash_dividend_event.py +52 -0
- lusid/models/cash_flow_event.py +52 -0
- lusid/models/cash_flow_value.py +52 -0
- lusid/models/cash_flow_value_set.py +52 -0
- lusid/models/cash_perpetual.py +52 -0
- lusid/models/cds_credit_event.py +52 -0
- lusid/models/cds_index.py +52 -0
- lusid/models/cdx_credit_event.py +52 -0
- lusid/models/change_history.py +52 -0
- lusid/models/check_step.py +52 -0
- lusid/models/check_step_request.py +52 -0
- lusid/models/close_event.py +52 -0
- lusid/models/complete_portfolio.py +52 -0
- lusid/models/complex_bond.py +52 -0
- lusid/models/complex_market_data.py +52 -0
- lusid/models/compliance_parameter.py +52 -0
- lusid/models/compliance_step.py +52 -0
- lusid/models/compliance_step_request.py +52 -0
- lusid/models/constant_volatility_surface.py +52 -0
- lusid/models/contract_for_difference.py +52 -0
- lusid/models/contract_initialisation_event.py +52 -0
- lusid/models/create_data_type_request.py +156 -0
- lusid/models/create_derived_property_definition_request.py +52 -0
- lusid/models/create_derived_transaction_portfolio_request.py +52 -0
- lusid/models/create_identifier_definition_request.py +104 -0
- lusid/models/create_property_definition_request.py +104 -0
- lusid/models/create_simple_position_portfolio_request.py +52 -0
- lusid/models/create_transaction_portfolio_request.py +52 -0
- lusid/models/credit_default_swap.py +52 -0
- lusid/models/credit_premium_cash_flow_event.py +52 -0
- lusid/models/credit_spread_curve_data.py +52 -0
- lusid/models/curve_options.py +52 -0
- lusid/models/data_type.py +156 -0
- lusid/models/data_type_summary.py +156 -0
- lusid/models/date_time_compliance_parameter.py +52 -0
- lusid/models/date_time_list_compliance_parameter.py +52 -0
- lusid/models/decimal_compliance_parameter.py +52 -0
- lusid/models/decimal_list.py +52 -0
- lusid/models/decimal_list_compliance_parameter.py +52 -0
- lusid/models/deposit_close_event.py +52 -0
- lusid/models/deposit_interest_payment_event.py +52 -0
- lusid/models/discount_factor_curve_data.py +52 -0
- lusid/models/discounting_dependency.py +52 -0
- lusid/models/dividend_option_event.py +52 -0
- lusid/models/dividend_reinvestment_event.py +52 -0
- lusid/models/drawdown_event.py +52 -0
- lusid/models/early_redemption_event.py +52 -0
- lusid/models/economic_dependency.py +52 -0
- lusid/models/empty_model_options.py +52 -0
- lusid/models/equity.py +52 -0
- lusid/models/equity_curve_by_prices_data.py +52 -0
- lusid/models/equity_curve_dependency.py +52 -0
- lusid/models/equity_model_options.py +52 -0
- lusid/models/equity_option.py +52 -0
- lusid/models/equity_swap.py +52 -0
- lusid/models/equity_vol_dependency.py +52 -0
- lusid/models/equity_vol_surface_data.py +52 -0
- lusid/models/exchange_traded_option.py +52 -0
- lusid/models/exercise_event.py +52 -0
- lusid/models/exotic_instrument.py +52 -0
- lusid/models/expiry_event.py +52 -0
- lusid/models/field_schema.py +52 -0
- lusid/models/filter_predicate_compliance_parameter.py +52 -0
- lusid/models/filter_step.py +52 -0
- lusid/models/filter_step_request.py +52 -0
- lusid/models/fixed_leg.py +52 -0
- lusid/models/fixed_schedule.py +52 -0
- lusid/models/flexible_deposit.py +52 -0
- lusid/models/flexible_loan.py +52 -0
- lusid/models/float_schedule.py +52 -0
- lusid/models/floating_leg.py +52 -0
- lusid/models/forward_rate_agreement.py +52 -0
- lusid/models/fund_id_list.py +52 -0
- lusid/models/fund_share_class.py +52 -0
- lusid/models/funding_leg.py +52 -0
- lusid/models/funding_leg_options.py +52 -0
- lusid/models/future.py +52 -0
- lusid/models/future_expiry_event.py +52 -0
- lusid/models/future_mark_to_market_event.py +52 -0
- lusid/models/fx_dependency.py +52 -0
- lusid/models/fx_forward.py +52 -0
- lusid/models/fx_forward_curve_by_quote_reference.py +52 -0
- lusid/models/fx_forward_curve_data.py +52 -0
- lusid/models/fx_forward_model_options.py +156 -0
- lusid/models/fx_forward_pips_curve_data.py +52 -0
- lusid/models/fx_forward_settlement_event.py +52 -0
- lusid/models/fx_forward_tenor_curve_data.py +52 -0
- lusid/models/fx_forward_tenor_pips_curve_data.py +52 -0
- lusid/models/fx_forwards_dependency.py +52 -0
- lusid/models/fx_linked_notional_schedule.py +52 -0
- lusid/models/fx_option.py +52 -0
- lusid/models/fx_rate_schedule.py +52 -0
- lusid/models/fx_swap.py +52 -0
- lusid/models/fx_vol_dependency.py +52 -0
- lusid/models/fx_vol_surface_data.py +52 -0
- lusid/models/get_reference_portfolio_constituents_response.py +104 -0
- lusid/models/group_by_selector_compliance_parameter.py +52 -0
- lusid/models/group_by_step.py +52 -0
- lusid/models/group_by_step_request.py +52 -0
- lusid/models/group_calculation_compliance_parameter.py +52 -0
- lusid/models/group_filter_predicate_compliance_parameter.py +52 -0
- lusid/models/group_filter_step.py +52 -0
- lusid/models/group_filter_step_request.py +52 -0
- lusid/models/holdings_adjustment.py +52 -0
- lusid/models/holdings_adjustment_header.py +52 -0
- lusid/models/i_unit_definition_dto.py +52 -0
- lusid/models/identifier_definition.py +104 -0
- lusid/models/index_model_options.py +104 -0
- lusid/models/index_projection_dependency.py +52 -0
- lusid/models/inflation_fixing_dependency.py +52 -0
- lusid/models/inflation_leg.py +52 -0
- lusid/models/inflation_linked_bond.py +52 -0
- lusid/models/inflation_swap.py +52 -0
- lusid/models/informational_error_event.py +52 -0
- lusid/models/informational_event.py +52 -0
- lusid/models/instrument.py +104 -0
- lusid/models/instrument_event.py +52 -0
- lusid/models/instrument_leg.py +52 -0
- lusid/models/instrument_list.py +52 -0
- lusid/models/instrument_list_compliance_parameter.py +52 -0
- lusid/models/interest_rate_swap.py +52 -0
- lusid/models/interest_rate_swaption.py +52 -0
- lusid/models/intermediate_compliance_step.py +52 -0
- lusid/models/intermediate_compliance_step_request.py +52 -0
- lusid/models/intermediate_securities_distribution_event.py +52 -0
- lusid/models/ir_vol_cube_data.py +52 -0
- lusid/models/ir_vol_dependency.py +52 -0
- lusid/models/life_cycle_event_value.py +52 -0
- lusid/models/loan_facility.py +52 -0
- lusid/models/loan_interest_repayment_event.py +52 -0
- lusid/models/loan_principal_repayment_event.py +52 -0
- lusid/models/lusid_instrument.py +52 -0
- lusid/models/lusid_trade_ticket.py +52 -0
- lusid/models/market_data_key_rule.py +52 -0
- lusid/models/market_data_options.py +52 -0
- lusid/models/market_data_specific_rule.py +52 -0
- lusid/models/market_quote.py +52 -0
- lusid/models/mastered_instrument.py +52 -0
- lusid/models/match_criterion.py +52 -0
- lusid/models/maturity_event.py +52 -0
- lusid/models/mbs_coupon_event.py +52 -0
- lusid/models/mbs_interest_deferral_event.py +52 -0
- lusid/models/mbs_interest_shortfall_event.py +52 -0
- lusid/models/mbs_principal_event.py +52 -0
- lusid/models/mbs_principal_write_off_event.py +52 -0
- lusid/models/merger_event.py +52 -0
- lusid/models/model_options.py +52 -0
- lusid/models/model_selection.py +104 -0
- lusid/models/opaque_dependency.py +52 -0
- lusid/models/opaque_market_data.py +52 -0
- lusid/models/opaque_model_options.py +52 -0
- lusid/models/open_event.py +52 -0
- lusid/models/option_exercise_cash_event.py +52 -0
- lusid/models/option_exercise_physical_event.py +52 -0
- lusid/models/optionality_schedule.py +52 -0
- lusid/models/order_by_spec.py +52 -0
- lusid/models/output_transaction.py +52 -0
- lusid/models/percent_check_step.py +52 -0
- lusid/models/percent_check_step_request.py +52 -0
- lusid/models/portfolio.py +104 -0
- lusid/models/portfolio_details.py +52 -0
- lusid/models/portfolio_group_id_compliance_parameter.py +52 -0
- lusid/models/portfolio_group_id_list.py +52 -0
- lusid/models/portfolio_group_id_list_compliance_parameter.py +52 -0
- lusid/models/portfolio_id_compliance_parameter.py +52 -0
- lusid/models/portfolio_id_list.py +52 -0
- lusid/models/portfolio_id_list_compliance_parameter.py +52 -0
- lusid/models/portfolio_result_data_key_rule.py +52 -0
- lusid/models/portfolio_search_result.py +52 -0
- lusid/models/portfolio_without_href.py +104 -0
- lusid/models/property_definition.py +312 -0
- lusid/models/property_definition_search_result.py +312 -0
- lusid/models/property_filter.py +104 -0
- lusid/models/property_key_compliance_parameter.py +52 -0
- lusid/models/property_key_list_compliance_parameter.py +52 -0
- lusid/models/property_list.py +52 -0
- lusid/models/property_list_compliance_parameter.py +52 -0
- lusid/models/property_value_equals.py +52 -0
- lusid/models/property_value_in.py +52 -0
- lusid/models/protection_payout_cash_flow_event.py +52 -0
- lusid/models/quote_dependency.py +52 -0
- lusid/models/quote_series_id.py +104 -0
- lusid/models/raw_vendor_event.py +52 -0
- lusid/models/recombine_step.py +52 -0
- lusid/models/reconcile_date_time_rule.py +104 -0
- lusid/models/reconcile_numeric_rule.py +104 -0
- lusid/models/reconcile_string_rule.py +104 -0
- lusid/models/reconciliation_rule.py +52 -0
- lusid/models/reference_instrument.py +52 -0
- lusid/models/reference_list.py +52 -0
- lusid/models/repo.py +52 -0
- lusid/models/reset_event.py +52 -0
- lusid/models/resource_list_of_value_type.py +1 -1
- lusid/models/result_data_key_rule.py +52 -0
- lusid/models/result_key_rule.py +52 -0
- lusid/models/result_value.py +52 -0
- lusid/models/result_value0_d.py +52 -0
- lusid/models/result_value_bool.py +52 -0
- lusid/models/result_value_currency.py +52 -0
- lusid/models/result_value_date_time_offset.py +52 -0
- lusid/models/result_value_decimal.py +52 -0
- lusid/models/result_value_dictionary.py +52 -0
- lusid/models/result_value_int.py +52 -0
- lusid/models/result_value_string.py +52 -0
- lusid/models/reverse_stock_split_event.py +52 -0
- lusid/models/schedule.py +52 -0
- lusid/models/scrip_dividend_event.py +52 -0
- lusid/models/simple_cash_flow_loan.py +52 -0
- lusid/models/simple_instrument.py +104 -0
- lusid/models/spin_off_event.py +52 -0
- lusid/models/step_schedule.py +52 -0
- lusid/models/stock_dividend_event.py +52 -0
- lusid/models/stock_split_event.py +52 -0
- lusid/models/string_compliance_parameter.py +52 -0
- lusid/models/string_list.py +52 -0
- lusid/models/string_list_compliance_parameter.py +52 -0
- lusid/models/sub_holding_key_value_equals.py +52 -0
- lusid/models/swap_cash_flow_event.py +52 -0
- lusid/models/swap_principal_event.py +52 -0
- lusid/models/tender_event.py +52 -0
- lusid/models/term_deposit.py +52 -0
- lusid/models/term_deposit_interest_event.py +52 -0
- lusid/models/term_deposit_principal_event.py +52 -0
- lusid/models/total_return_swap.py +52 -0
- lusid/models/trade_ticket.py +52 -0
- lusid/models/transaction.py +52 -0
- lusid/models/transaction_configuration_movement_data.py +52 -0
- lusid/models/transaction_configuration_movement_data_request.py +52 -0
- lusid/models/transaction_configuration_type_alias.py +52 -0
- lusid/models/transaction_price.py +52 -0
- lusid/models/transaction_query_parameters.py +52 -0
- lusid/models/transition_event.py +52 -0
- lusid/models/trigger_event.py +52 -0
- lusid/models/update_deposit_amount_event.py +52 -0
- lusid/models/upsert_reference_portfolio_constituents_request.py +104 -0
- lusid/models/vendor_dependency.py +52 -0
- lusid/models/vendor_model_rule.py +52 -0
- lusid/models/weekend_mask.py +1 -1
- lusid/models/yield_curve_data.py +52 -0
- {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.749.dist-info}/METADATA +1 -1
- {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.749.dist-info}/RECORD +277 -277
- {lusid_sdk-2.1.748.dist-info → lusid_sdk-2.1.749.dist-info}/WHEEL +0 -0
@@ -46,6 +46,58 @@ class OptionExerciseCashEvent(InstrumentEvent):
|
|
46
46
|
@validator('instrument_event_type')
|
47
47
|
def instrument_event_type_validate_enum(cls, value):
|
48
48
|
"""Validates the enum"""
|
49
|
+
|
50
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
51
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
52
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
53
|
+
|
54
|
+
|
55
|
+
# check it's a class that uses the 'type' property as a discriminator
|
56
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
57
|
+
if 'OptionExerciseCashEvent' not in [
|
58
|
+
# For notification application classes
|
59
|
+
'AmazonSqsNotificationType',
|
60
|
+
'AmazonSqsNotificationTypeResponse',
|
61
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
62
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
63
|
+
'AzureServiceBusTypeResponse',
|
64
|
+
'AzureServiceBusNotificationType',
|
65
|
+
'EmailNotificationType',
|
66
|
+
'EmailNotificationTypeResponse',
|
67
|
+
'SmsNotificationType',
|
68
|
+
'SmsNotificationTypeResponse',
|
69
|
+
'WebhookNotificationType',
|
70
|
+
'WebhookNotificationTypeResponse',
|
71
|
+
|
72
|
+
# For workflow application classes
|
73
|
+
'CreateChildTasksAction',
|
74
|
+
'RunWorkerAction',
|
75
|
+
'TriggerParentTaskAction',
|
76
|
+
'CreateChildTasksActionResponse',
|
77
|
+
'RunWorkerActionResponse',
|
78
|
+
'TriggerParentTaskActionResponse',
|
79
|
+
'CreateNewTaskActivity',
|
80
|
+
'UpdateMatchingTasksActivity',
|
81
|
+
'CreateNewTaskActivityResponse',
|
82
|
+
'UpdateMatchingTasksActivityResponse',
|
83
|
+
'Fail',
|
84
|
+
'GroupReconciliation',
|
85
|
+
'HealthCheck',
|
86
|
+
'LuminesceView',
|
87
|
+
'SchedulerJob',
|
88
|
+
'Sleep',
|
89
|
+
'FailResponse',
|
90
|
+
'GroupReconciliationResponse',
|
91
|
+
'HealthCheckResponse',
|
92
|
+
'LuminesceViewResponse',
|
93
|
+
'SchedulerJobResponse',
|
94
|
+
'SleepResponse']:
|
95
|
+
return value
|
96
|
+
|
97
|
+
# Only validate the 'type' property of the class
|
98
|
+
if "instrument_event_type" != "type":
|
99
|
+
return value
|
100
|
+
|
49
101
|
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'):
|
50
102
|
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')")
|
51
103
|
return value
|
@@ -49,6 +49,58 @@ class OptionExercisePhysicalEvent(InstrumentEvent):
|
|
49
49
|
@validator('instrument_event_type')
|
50
50
|
def instrument_event_type_validate_enum(cls, value):
|
51
51
|
"""Validates the enum"""
|
52
|
+
|
53
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
54
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
55
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
56
|
+
|
57
|
+
|
58
|
+
# check it's a class that uses the 'type' property as a discriminator
|
59
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
60
|
+
if 'OptionExercisePhysicalEvent' not in [
|
61
|
+
# For notification application classes
|
62
|
+
'AmazonSqsNotificationType',
|
63
|
+
'AmazonSqsNotificationTypeResponse',
|
64
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
65
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
66
|
+
'AzureServiceBusTypeResponse',
|
67
|
+
'AzureServiceBusNotificationType',
|
68
|
+
'EmailNotificationType',
|
69
|
+
'EmailNotificationTypeResponse',
|
70
|
+
'SmsNotificationType',
|
71
|
+
'SmsNotificationTypeResponse',
|
72
|
+
'WebhookNotificationType',
|
73
|
+
'WebhookNotificationTypeResponse',
|
74
|
+
|
75
|
+
# For workflow application classes
|
76
|
+
'CreateChildTasksAction',
|
77
|
+
'RunWorkerAction',
|
78
|
+
'TriggerParentTaskAction',
|
79
|
+
'CreateChildTasksActionResponse',
|
80
|
+
'RunWorkerActionResponse',
|
81
|
+
'TriggerParentTaskActionResponse',
|
82
|
+
'CreateNewTaskActivity',
|
83
|
+
'UpdateMatchingTasksActivity',
|
84
|
+
'CreateNewTaskActivityResponse',
|
85
|
+
'UpdateMatchingTasksActivityResponse',
|
86
|
+
'Fail',
|
87
|
+
'GroupReconciliation',
|
88
|
+
'HealthCheck',
|
89
|
+
'LuminesceView',
|
90
|
+
'SchedulerJob',
|
91
|
+
'Sleep',
|
92
|
+
'FailResponse',
|
93
|
+
'GroupReconciliationResponse',
|
94
|
+
'HealthCheckResponse',
|
95
|
+
'LuminesceViewResponse',
|
96
|
+
'SchedulerJobResponse',
|
97
|
+
'SleepResponse']:
|
98
|
+
return value
|
99
|
+
|
100
|
+
# Only validate the 'type' property of the class
|
101
|
+
if "instrument_event_type" != "type":
|
102
|
+
return value
|
103
|
+
|
52
104
|
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'):
|
53
105
|
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')")
|
54
106
|
return value
|
@@ -37,6 +37,58 @@ class OptionalitySchedule(Schedule):
|
|
37
37
|
@validator('schedule_type')
|
38
38
|
def schedule_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 'OptionalitySchedule' 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 "schedule_type" != "type":
|
90
|
+
return value
|
91
|
+
|
40
92
|
if value not in ('FixedSchedule', 'FloatSchedule', 'OptionalitySchedule', 'StepSchedule', 'Exercise', 'FxRateSchedule', 'FxLinkedNotionalSchedule', 'BondConversionSchedule', 'Invalid'):
|
41
93
|
raise ValueError("must be one of enum values ('FixedSchedule', 'FloatSchedule', 'OptionalitySchedule', 'StepSchedule', 'Exercise', 'FxRateSchedule', 'FxLinkedNotionalSchedule', 'BondConversionSchedule', 'Invalid')")
|
42
94
|
return value
|
lusid/models/order_by_spec.py
CHANGED
@@ -32,6 +32,58 @@ class OrderBySpec(BaseModel):
|
|
32
32
|
@validator('sort_order')
|
33
33
|
def sort_order_validate_enum(cls, value):
|
34
34
|
"""Validates the enum"""
|
35
|
+
|
36
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
37
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
38
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
39
|
+
|
40
|
+
|
41
|
+
# check it's a class that uses the 'type' property as a discriminator
|
42
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
43
|
+
if 'OrderBySpec' not in [
|
44
|
+
# For notification application classes
|
45
|
+
'AmazonSqsNotificationType',
|
46
|
+
'AmazonSqsNotificationTypeResponse',
|
47
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
48
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
49
|
+
'AzureServiceBusTypeResponse',
|
50
|
+
'AzureServiceBusNotificationType',
|
51
|
+
'EmailNotificationType',
|
52
|
+
'EmailNotificationTypeResponse',
|
53
|
+
'SmsNotificationType',
|
54
|
+
'SmsNotificationTypeResponse',
|
55
|
+
'WebhookNotificationType',
|
56
|
+
'WebhookNotificationTypeResponse',
|
57
|
+
|
58
|
+
# For workflow application classes
|
59
|
+
'CreateChildTasksAction',
|
60
|
+
'RunWorkerAction',
|
61
|
+
'TriggerParentTaskAction',
|
62
|
+
'CreateChildTasksActionResponse',
|
63
|
+
'RunWorkerActionResponse',
|
64
|
+
'TriggerParentTaskActionResponse',
|
65
|
+
'CreateNewTaskActivity',
|
66
|
+
'UpdateMatchingTasksActivity',
|
67
|
+
'CreateNewTaskActivityResponse',
|
68
|
+
'UpdateMatchingTasksActivityResponse',
|
69
|
+
'Fail',
|
70
|
+
'GroupReconciliation',
|
71
|
+
'HealthCheck',
|
72
|
+
'LuminesceView',
|
73
|
+
'SchedulerJob',
|
74
|
+
'Sleep',
|
75
|
+
'FailResponse',
|
76
|
+
'GroupReconciliationResponse',
|
77
|
+
'HealthCheckResponse',
|
78
|
+
'LuminesceViewResponse',
|
79
|
+
'SchedulerJobResponse',
|
80
|
+
'SleepResponse']:
|
81
|
+
return value
|
82
|
+
|
83
|
+
# Only validate the 'type' property of the class
|
84
|
+
if "sort_order" != "type":
|
85
|
+
return value
|
86
|
+
|
35
87
|
if value not in ('Ascending', 'Descending'):
|
36
88
|
raise ValueError("must be one of enum values ('Ascending', 'Descending')")
|
37
89
|
return value
|
@@ -70,6 +70,58 @@ class OutputTransaction(BaseModel):
|
|
70
70
|
@validator('transaction_status')
|
71
71
|
def transaction_status_validate_enum(cls, value):
|
72
72
|
"""Validates the enum"""
|
73
|
+
|
74
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
75
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
76
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
77
|
+
|
78
|
+
|
79
|
+
# check it's a class that uses the 'type' property as a discriminator
|
80
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
81
|
+
if 'OutputTransaction' not in [
|
82
|
+
# For notification application classes
|
83
|
+
'AmazonSqsNotificationType',
|
84
|
+
'AmazonSqsNotificationTypeResponse',
|
85
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
86
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
87
|
+
'AzureServiceBusTypeResponse',
|
88
|
+
'AzureServiceBusNotificationType',
|
89
|
+
'EmailNotificationType',
|
90
|
+
'EmailNotificationTypeResponse',
|
91
|
+
'SmsNotificationType',
|
92
|
+
'SmsNotificationTypeResponse',
|
93
|
+
'WebhookNotificationType',
|
94
|
+
'WebhookNotificationTypeResponse',
|
95
|
+
|
96
|
+
# For workflow application classes
|
97
|
+
'CreateChildTasksAction',
|
98
|
+
'RunWorkerAction',
|
99
|
+
'TriggerParentTaskAction',
|
100
|
+
'CreateChildTasksActionResponse',
|
101
|
+
'RunWorkerActionResponse',
|
102
|
+
'TriggerParentTaskActionResponse',
|
103
|
+
'CreateNewTaskActivity',
|
104
|
+
'UpdateMatchingTasksActivity',
|
105
|
+
'CreateNewTaskActivityResponse',
|
106
|
+
'UpdateMatchingTasksActivityResponse',
|
107
|
+
'Fail',
|
108
|
+
'GroupReconciliation',
|
109
|
+
'HealthCheck',
|
110
|
+
'LuminesceView',
|
111
|
+
'SchedulerJob',
|
112
|
+
'Sleep',
|
113
|
+
'FailResponse',
|
114
|
+
'GroupReconciliationResponse',
|
115
|
+
'HealthCheckResponse',
|
116
|
+
'LuminesceViewResponse',
|
117
|
+
'SchedulerJobResponse',
|
118
|
+
'SleepResponse']:
|
119
|
+
return value
|
120
|
+
|
121
|
+
# Only validate the 'type' property of the class
|
122
|
+
if "transaction_status" != "type":
|
123
|
+
return value
|
124
|
+
|
73
125
|
if value is None:
|
74
126
|
return value
|
75
127
|
|
@@ -37,6 +37,58 @@ class PercentCheckStep(ComplianceStep):
|
|
37
37
|
@validator('compliance_step_type')
|
38
38
|
def compliance_step_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 'PercentCheckStep' 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 "compliance_step_type" != "type":
|
90
|
+
return value
|
91
|
+
|
40
92
|
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep'):
|
41
93
|
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep')")
|
42
94
|
return value
|
@@ -34,6 +34,58 @@ class PercentCheckStepRequest(ComplianceStepRequest):
|
|
34
34
|
@validator('compliance_step_type_request')
|
35
35
|
def compliance_step_type_request_validate_enum(cls, value):
|
36
36
|
"""Validates the enum"""
|
37
|
+
|
38
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
39
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
40
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
41
|
+
|
42
|
+
|
43
|
+
# check it's a class that uses the 'type' property as a discriminator
|
44
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
45
|
+
if 'PercentCheckStepRequest' not in [
|
46
|
+
# For notification application classes
|
47
|
+
'AmazonSqsNotificationType',
|
48
|
+
'AmazonSqsNotificationTypeResponse',
|
49
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
50
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
51
|
+
'AzureServiceBusTypeResponse',
|
52
|
+
'AzureServiceBusNotificationType',
|
53
|
+
'EmailNotificationType',
|
54
|
+
'EmailNotificationTypeResponse',
|
55
|
+
'SmsNotificationType',
|
56
|
+
'SmsNotificationTypeResponse',
|
57
|
+
'WebhookNotificationType',
|
58
|
+
'WebhookNotificationTypeResponse',
|
59
|
+
|
60
|
+
# For workflow application classes
|
61
|
+
'CreateChildTasksAction',
|
62
|
+
'RunWorkerAction',
|
63
|
+
'TriggerParentTaskAction',
|
64
|
+
'CreateChildTasksActionResponse',
|
65
|
+
'RunWorkerActionResponse',
|
66
|
+
'TriggerParentTaskActionResponse',
|
67
|
+
'CreateNewTaskActivity',
|
68
|
+
'UpdateMatchingTasksActivity',
|
69
|
+
'CreateNewTaskActivityResponse',
|
70
|
+
'UpdateMatchingTasksActivityResponse',
|
71
|
+
'Fail',
|
72
|
+
'GroupReconciliation',
|
73
|
+
'HealthCheck',
|
74
|
+
'LuminesceView',
|
75
|
+
'SchedulerJob',
|
76
|
+
'Sleep',
|
77
|
+
'FailResponse',
|
78
|
+
'GroupReconciliationResponse',
|
79
|
+
'HealthCheckResponse',
|
80
|
+
'LuminesceViewResponse',
|
81
|
+
'SchedulerJobResponse',
|
82
|
+
'SleepResponse']:
|
83
|
+
return value
|
84
|
+
|
85
|
+
# Only validate the 'type' property of the class
|
86
|
+
if "compliance_step_type_request" != "type":
|
87
|
+
return value
|
88
|
+
|
37
89
|
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest'):
|
38
90
|
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest')")
|
39
91
|
return value
|
lusid/models/portfolio.py
CHANGED
@@ -58,6 +58,58 @@ class Portfolio(BaseModel):
|
|
58
58
|
@validator('type')
|
59
59
|
def type_validate_enum(cls, value):
|
60
60
|
"""Validates the enum"""
|
61
|
+
|
62
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
63
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
64
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
65
|
+
|
66
|
+
|
67
|
+
# check it's a class that uses the 'type' property as a discriminator
|
68
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
69
|
+
if 'Portfolio' not in [
|
70
|
+
# For notification application classes
|
71
|
+
'AmazonSqsNotificationType',
|
72
|
+
'AmazonSqsNotificationTypeResponse',
|
73
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
74
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
75
|
+
'AzureServiceBusTypeResponse',
|
76
|
+
'AzureServiceBusNotificationType',
|
77
|
+
'EmailNotificationType',
|
78
|
+
'EmailNotificationTypeResponse',
|
79
|
+
'SmsNotificationType',
|
80
|
+
'SmsNotificationTypeResponse',
|
81
|
+
'WebhookNotificationType',
|
82
|
+
'WebhookNotificationTypeResponse',
|
83
|
+
|
84
|
+
# For workflow application classes
|
85
|
+
'CreateChildTasksAction',
|
86
|
+
'RunWorkerAction',
|
87
|
+
'TriggerParentTaskAction',
|
88
|
+
'CreateChildTasksActionResponse',
|
89
|
+
'RunWorkerActionResponse',
|
90
|
+
'TriggerParentTaskActionResponse',
|
91
|
+
'CreateNewTaskActivity',
|
92
|
+
'UpdateMatchingTasksActivity',
|
93
|
+
'CreateNewTaskActivityResponse',
|
94
|
+
'UpdateMatchingTasksActivityResponse',
|
95
|
+
'Fail',
|
96
|
+
'GroupReconciliation',
|
97
|
+
'HealthCheck',
|
98
|
+
'LuminesceView',
|
99
|
+
'SchedulerJob',
|
100
|
+
'Sleep',
|
101
|
+
'FailResponse',
|
102
|
+
'GroupReconciliationResponse',
|
103
|
+
'HealthCheckResponse',
|
104
|
+
'LuminesceViewResponse',
|
105
|
+
'SchedulerJobResponse',
|
106
|
+
'SleepResponse']:
|
107
|
+
return value
|
108
|
+
|
109
|
+
# Only validate the 'type' property of the class
|
110
|
+
if "type" != "type":
|
111
|
+
return value
|
112
|
+
|
61
113
|
if value not in ('Transaction', 'Reference', 'DerivedTransaction', 'SimplePosition'):
|
62
114
|
raise ValueError("must be one of enum values ('Transaction', 'Reference', 'DerivedTransaction', 'SimplePosition')")
|
63
115
|
return value
|
@@ -65,6 +117,58 @@ class Portfolio(BaseModel):
|
|
65
117
|
@validator('accounting_method')
|
66
118
|
def accounting_method_validate_enum(cls, value):
|
67
119
|
"""Validates the enum"""
|
120
|
+
|
121
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
122
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
123
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
124
|
+
|
125
|
+
|
126
|
+
# check it's a class that uses the 'type' property as a discriminator
|
127
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
128
|
+
if 'Portfolio' not in [
|
129
|
+
# For notification application classes
|
130
|
+
'AmazonSqsNotificationType',
|
131
|
+
'AmazonSqsNotificationTypeResponse',
|
132
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
133
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
134
|
+
'AzureServiceBusTypeResponse',
|
135
|
+
'AzureServiceBusNotificationType',
|
136
|
+
'EmailNotificationType',
|
137
|
+
'EmailNotificationTypeResponse',
|
138
|
+
'SmsNotificationType',
|
139
|
+
'SmsNotificationTypeResponse',
|
140
|
+
'WebhookNotificationType',
|
141
|
+
'WebhookNotificationTypeResponse',
|
142
|
+
|
143
|
+
# For workflow application classes
|
144
|
+
'CreateChildTasksAction',
|
145
|
+
'RunWorkerAction',
|
146
|
+
'TriggerParentTaskAction',
|
147
|
+
'CreateChildTasksActionResponse',
|
148
|
+
'RunWorkerActionResponse',
|
149
|
+
'TriggerParentTaskActionResponse',
|
150
|
+
'CreateNewTaskActivity',
|
151
|
+
'UpdateMatchingTasksActivity',
|
152
|
+
'CreateNewTaskActivityResponse',
|
153
|
+
'UpdateMatchingTasksActivityResponse',
|
154
|
+
'Fail',
|
155
|
+
'GroupReconciliation',
|
156
|
+
'HealthCheck',
|
157
|
+
'LuminesceView',
|
158
|
+
'SchedulerJob',
|
159
|
+
'Sleep',
|
160
|
+
'FailResponse',
|
161
|
+
'GroupReconciliationResponse',
|
162
|
+
'HealthCheckResponse',
|
163
|
+
'LuminesceViewResponse',
|
164
|
+
'SchedulerJobResponse',
|
165
|
+
'SleepResponse']:
|
166
|
+
return value
|
167
|
+
|
168
|
+
# Only validate the 'type' property of the class
|
169
|
+
if "accounting_method" != "type":
|
170
|
+
return value
|
171
|
+
|
68
172
|
if value is None:
|
69
173
|
return value
|
70
174
|
|
@@ -50,6 +50,58 @@ class PortfolioDetails(BaseModel):
|
|
50
50
|
@validator('accounting_method')
|
51
51
|
def accounting_method_validate_enum(cls, value):
|
52
52
|
"""Validates the enum"""
|
53
|
+
|
54
|
+
# Finbourne have removed enum validation on all models, except for this use case:
|
55
|
+
# Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
|
56
|
+
# During instantiation, the value of 'type' is checked against the enum values,
|
57
|
+
|
58
|
+
|
59
|
+
# check it's a class that uses the 'type' property as a discriminator
|
60
|
+
# list of classes can be found by searching for 'actual_instance: Union[' in the generated code
|
61
|
+
if 'PortfolioDetails' not in [
|
62
|
+
# For notification application classes
|
63
|
+
'AmazonSqsNotificationType',
|
64
|
+
'AmazonSqsNotificationTypeResponse',
|
65
|
+
'AmazonSqsPrincipalAuthNotificationType',
|
66
|
+
'AmazonSqsPrincipalAuthNotificationTypeResponse',
|
67
|
+
'AzureServiceBusTypeResponse',
|
68
|
+
'AzureServiceBusNotificationType',
|
69
|
+
'EmailNotificationType',
|
70
|
+
'EmailNotificationTypeResponse',
|
71
|
+
'SmsNotificationType',
|
72
|
+
'SmsNotificationTypeResponse',
|
73
|
+
'WebhookNotificationType',
|
74
|
+
'WebhookNotificationTypeResponse',
|
75
|
+
|
76
|
+
# For workflow application classes
|
77
|
+
'CreateChildTasksAction',
|
78
|
+
'RunWorkerAction',
|
79
|
+
'TriggerParentTaskAction',
|
80
|
+
'CreateChildTasksActionResponse',
|
81
|
+
'RunWorkerActionResponse',
|
82
|
+
'TriggerParentTaskActionResponse',
|
83
|
+
'CreateNewTaskActivity',
|
84
|
+
'UpdateMatchingTasksActivity',
|
85
|
+
'CreateNewTaskActivityResponse',
|
86
|
+
'UpdateMatchingTasksActivityResponse',
|
87
|
+
'Fail',
|
88
|
+
'GroupReconciliation',
|
89
|
+
'HealthCheck',
|
90
|
+
'LuminesceView',
|
91
|
+
'SchedulerJob',
|
92
|
+
'Sleep',
|
93
|
+
'FailResponse',
|
94
|
+
'GroupReconciliationResponse',
|
95
|
+
'HealthCheckResponse',
|
96
|
+
'LuminesceViewResponse',
|
97
|
+
'SchedulerJobResponse',
|
98
|
+
'SleepResponse']:
|
99
|
+
return value
|
100
|
+
|
101
|
+
# Only validate the 'type' property of the class
|
102
|
+
if "accounting_method" != "type":
|
103
|
+
return value
|
104
|
+
|
53
105
|
if value is None:
|
54
106
|
return value
|
55
107
|
|