lusid-sdk 2.1.861__py3-none-any.whl → 2.1.866__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 (62) hide show
  1. lusid/__init__.py +12 -0
  2. lusid/api/funds_api.py +205 -0
  3. lusid/api/investment_accounts_api.py +210 -2
  4. lusid/configuration.py +1 -1
  5. lusid/models/__init__.py +12 -0
  6. lusid/models/basket.py +3 -3
  7. lusid/models/bond.py +3 -3
  8. lusid/models/cap_floor.py +3 -3
  9. lusid/models/cash.py +3 -3
  10. lusid/models/cash_perpetual.py +3 -3
  11. lusid/models/cds_index.py +3 -3
  12. lusid/models/collateral.py +101 -0
  13. lusid/models/collateral_instrument.py +83 -0
  14. lusid/models/complex_bond.py +3 -3
  15. lusid/models/contract_for_difference.py +3 -3
  16. lusid/models/credit_default_swap.py +3 -3
  17. lusid/models/equity.py +3 -3
  18. lusid/models/equity_option.py +3 -3
  19. lusid/models/equity_swap.py +3 -3
  20. lusid/models/exchange_traded_option.py +3 -3
  21. lusid/models/exotic_instrument.py +3 -3
  22. lusid/models/fixed_leg.py +3 -3
  23. lusid/models/flexible_deposit.py +3 -3
  24. lusid/models/flexible_loan.py +3 -3
  25. lusid/models/flexible_repo.py +239 -0
  26. lusid/models/floating_leg.py +3 -3
  27. lusid/models/forward_rate_agreement.py +3 -3
  28. lusid/models/fund_calendar_entry.py +162 -0
  29. lusid/models/fund_calendar_entry_type.py +37 -0
  30. lusid/models/fund_definition_request.py +1 -6
  31. lusid/models/fund_share_class.py +3 -3
  32. lusid/models/funding_leg.py +3 -3
  33. lusid/models/future.py +3 -3
  34. lusid/models/fx_forward.py +3 -3
  35. lusid/models/fx_option.py +3 -3
  36. lusid/models/fx_swap.py +3 -3
  37. lusid/models/inflation_leg.py +3 -3
  38. lusid/models/inflation_linked_bond.py +3 -3
  39. lusid/models/inflation_swap.py +3 -3
  40. lusid/models/instrument_leg.py +3 -3
  41. lusid/models/instrument_type.py +1 -0
  42. lusid/models/interest_rate_swap.py +3 -3
  43. lusid/models/interest_rate_swaption.py +3 -3
  44. lusid/models/investment_portfolio.py +3 -3
  45. lusid/models/loan_facility.py +3 -3
  46. lusid/models/lusid_instrument.py +6 -5
  47. lusid/models/mastered_instrument.py +3 -3
  48. lusid/models/movement_type.py +0 -1
  49. lusid/models/nav_type_definition.py +21 -21
  50. lusid/models/paged_resource_list_of_fund_calendar_entry.py +121 -0
  51. lusid/models/reference_instrument.py +3 -3
  52. lusid/models/repo.py +3 -3
  53. lusid/models/simple_cash_flow_loan.py +3 -3
  54. lusid/models/simple_instrument.py +3 -3
  55. lusid/models/term_deposit.py +3 -3
  56. lusid/models/total_return_swap.py +3 -3
  57. lusid/models/transaction_configuration_movement_data.py +3 -3
  58. lusid/models/transaction_configuration_movement_data_request.py +3 -3
  59. lusid/models/transaction_type_movement.py +1 -1
  60. {lusid_sdk-2.1.861.dist-info → lusid_sdk-2.1.866.dist-info}/METADATA +9 -1
  61. {lusid_sdk-2.1.861.dist-info → lusid_sdk-2.1.866.dist-info}/RECORD +62 -56
  62. {lusid_sdk-2.1.861.dist-info → lusid_sdk-2.1.866.dist-info}/WHEEL +0 -0
@@ -29,7 +29,7 @@ class ExoticInstrument(LusidInstrument):
29
29
  """
30
30
  instrument_format: InstrumentDefinitionFormat = Field(..., alias="instrumentFormat")
31
31
  content: StrictStr = Field(...,alias="content", description="The original document received into the system. This format could potentially be anything though is most likely to be either Json or Xml. In the case where no other interface is supported it is possible to fall back onto this. For example, a trade from an external client system. This may be recognized internally by Lusid or simply passed through to another vendor system.")
32
- 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
32
+ 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
33
33
  additional_properties: Dict[str, Any] = {}
34
34
  __properties = ["instrumentType", "instrumentFormat", "content"]
35
35
 
@@ -88,8 +88,8 @@ class ExoticInstrument(LusidInstrument):
88
88
  if "instrument_type" != "type":
89
89
  return value
90
90
 
91
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
92
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
91
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
92
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
93
93
  return value
94
94
 
95
95
  class Config:
lusid/models/fixed_leg.py CHANGED
@@ -35,7 +35,7 @@ class FixedLeg(InstrumentLeg):
35
35
  notional: Union[StrictFloat, StrictInt] = Field(...)
36
36
  overrides: Optional[FixedLegAllOfOverrides] = None
37
37
  time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
39
39
  additional_properties: Dict[str, Any] = {}
40
40
  __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides", "timeZoneConventions"]
41
41
 
@@ -94,8 +94,8 @@ class FixedLeg(InstrumentLeg):
94
94
  if "instrument_type" != "type":
95
95
  return value
96
96
 
97
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
98
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
97
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
98
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
99
99
  return value
100
100
 
101
101
  class Config:
@@ -35,7 +35,7 @@ class FlexibleDeposit(LusidInstrument):
35
35
  schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the deposit instrument.")
36
36
  trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
37
37
  time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
39
39
  additional_properties: Dict[str, Any] = {}
40
40
  __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "schedules", "tradingConventions", "timeZoneConventions"]
41
41
 
@@ -94,8 +94,8 @@ class FlexibleDeposit(LusidInstrument):
94
94
  if "instrument_type" != "type":
95
95
  return value
96
96
 
97
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
98
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
97
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
98
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
99
99
  return value
100
100
 
101
101
  class Config:
@@ -33,7 +33,7 @@ class FlexibleLoan(LusidInstrument):
33
33
  dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
34
34
  schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the loan.")
35
35
  time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
36
- 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
36
+ 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
37
37
  additional_properties: Dict[str, Any] = {}
38
38
  __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "schedules", "timeZoneConventions"]
39
39
 
@@ -92,8 +92,8 @@ class FlexibleLoan(LusidInstrument):
92
92
  if "instrument_type" != "type":
93
93
  return value
94
94
 
95
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
96
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
95
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
96
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
97
97
  return value
98
98
 
99
99
  class Config:
@@ -0,0 +1,239 @@
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, Union
22
+ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
23
+ from lusid.models.collateral import Collateral
24
+ from lusid.models.lusid_instrument import LusidInstrument
25
+ from lusid.models.schedule import Schedule
26
+ from lusid.models.time_zone_conventions import TimeZoneConventions
27
+ from lusid.models.trading_conventions import TradingConventions
28
+
29
+ class FlexibleRepo(LusidInstrument):
30
+ """
31
+ Lusid representation of a repurchase agreement, where one party sells some collateral and agrees to re-buy it at a later date for some given price. # noqa: E501
32
+ """
33
+ start_date: datetime = Field(..., alias="startDate", description="The start date of the instrument. This is normally synonymous with the trade-date.")
34
+ maturity_date: Optional[datetime] = Field(None, alias="maturityDate", description="The maturity date of the instrument. This is the date at which the repurchase will occur for a TermRepo. Optional for OpenRepo, but if not provided, defaults to the StartDate plus a long period (e.g. 2099-12-31).")
35
+ buyer_or_seller: StrictStr = Field(...,alias="buyerOrSeller", description="Is the user the Buyer or the Seller of this repo? Every repo agreement has two sides, a buyer and a seller. The Buyer pays the PurchasePrice to the Seller in exchange for legal ownership of the collateral. At Maturity, the Buyer then receives the RepurchasePrice in exchange for returning legal ownership of the collateral. Controls the direction of purchase and repurchase cashflows, as well as the recipient of cashflows from the collateral. Supported string (enumeration) values are: [Buyer, Seller].")
36
+ repo_ccy: StrictStr = Field(...,alias="repoCcy", description="Currency of the purchase and repurchase prices. May differ from the currencies on any collateral.")
37
+ repo_type: StrictStr = Field(...,alias="repoType", description="The type of the repurchase agreement, Open or Term. If Term, the repurchase automatically takes place at Maturity. If Open, the agreement is rolled by the given tenor, and an interest cashflow is paid out with each roll, unless manually triggered by a FlexibleRepoFullClosureEvent. Supported string (enumeration) values are: [OpenRepo, TermRepo].")
38
+ accrual_basis: Optional[StrictStr] = Field(None,alias="accrualBasis", description="For calculation of interest, the accrual day count to be used. Required if no RepoRateSchedules are provided. If both RepoRateSchedules and AccrualBasis are provided, then AccrualBasis will take precedence. Supported string (enumeration) values are: [Actual360, Act360, MoneyMarket, Actual365, Act365, Thirty360, ThirtyU360, Bond, ThirtyE360, EuroBond, ActualActual, ActAct, ActActIsda, ActActIsma, ActActIcma, OneOne, Act364, Act365F, Act365L, Act365_25, Act252, Bus252, NL360, NL365, ActActAFB, Act365Cad, ThirtyActIsda, Thirty365Isda, ThirtyEActIsda, ThirtyE360Isda, ThirtyE365Isda, ThirtyU360EOM].")
39
+ collateral: Optional[Collateral] = None
40
+ haircut: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Haircut on the value of the collateral, used to calculate PurchasePrice if not provided directly. Haircut or Margin should be specified if PurchasePrice is not specified.")
41
+ margin: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Initial margin on the value of the collateral, used to calculate PurchasePrice if not provided directly. Haircut or Margin should be specified if PurchasePrice is not specified.")
42
+ open_repo_rolling_period: Optional[StrictStr] = Field(None,alias="openRepoRollingPeriod", description="Required if the RepoType is Open. The tenor representing the mandatory roll period if the FlexibleRepo is not manually matured. If a user matures the FlexibleRepo via an instrument event, then the repurchase will delay until the end of this rolling period. Generally this is set to 1D (one day), i.e. the repurchase will occur on the same day as the instrument event, though any valid tenor is accepted with TenorUnit set to Day, Week, Month, or Year. Note that TenorUnit T is not accepted here.")
43
+ purchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="purchasePrice", description="The initial purchase price of the collateral. If provided directly in this field, then Collateral.CollateralValue, Haircut, and Margin should not be provided.")
44
+ repo_rate_schedules: Optional[conlist(Schedule)] = Field(None, alias="repoRateSchedules", description="Schedules used to calculate the repurchase price and any interest payments on the FlexibleRepo. Only one schedule may be provided, and must be of type FixedSchedule or FloatSchedule. If RepoType is OpenRepo, a FixedSchedule or FloatSchedule must be provided to calculate the expected Repo Rate, and RepurchasePrice must be omitted. If RepoType is TermRepo, only one of RepurchasePrice and RepoRateSchedules should be provided. If a RepoRateSchedule is provided on a TermRepo, the PaymentFrequency in the FlowConventions should be 1T. StubType must be set to None, and no ExDividend configuration should be provided.")
45
+ repurchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="repurchasePrice", description="The repurchase price of the repo, if known. Only one of RepurchasePrice and RepoRateSchedules should be provided. In the case of an OpenRepo, RepurchasePrice should not be provided, and RepoRateSchedules should be provided instead in order to calculate the RepoRate.")
46
+ time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
47
+ trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
48
+ 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
49
+ additional_properties: Dict[str, Any] = {}
50
+ __properties = ["instrumentType", "startDate", "maturityDate", "buyerOrSeller", "repoCcy", "repoType", "accrualBasis", "collateral", "haircut", "margin", "openRepoRollingPeriod", "purchasePrice", "repoRateSchedules", "repurchasePrice", "timeZoneConventions", "tradingConventions"]
51
+
52
+ @validator('instrument_type')
53
+ def instrument_type_validate_enum(cls, value):
54
+ """Validates the enum"""
55
+
56
+ # Finbourne have removed enum validation on all models, except for this use case:
57
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
58
+ # During instantiation, the value of 'type' is checked against the enum values,
59
+
60
+
61
+ # check it's a class that uses the 'type' property as a discriminator
62
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
63
+ if 'FlexibleRepo' not in [
64
+ # For notification application classes
65
+ 'AmazonSqsNotificationType',
66
+ 'AmazonSqsNotificationTypeResponse',
67
+ 'AmazonSqsPrincipalAuthNotificationType',
68
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
69
+ 'AzureServiceBusTypeResponse',
70
+ 'AzureServiceBusNotificationType',
71
+ 'EmailNotificationType',
72
+ 'EmailNotificationTypeResponse',
73
+ 'SmsNotificationType',
74
+ 'SmsNotificationTypeResponse',
75
+ 'WebhookNotificationType',
76
+ 'WebhookNotificationTypeResponse',
77
+
78
+ # For workflow application classes
79
+ 'CreateChildTasksAction',
80
+ 'RunWorkerAction',
81
+ 'TriggerParentTaskAction',
82
+ 'CreateChildTasksActionResponse',
83
+ 'RunWorkerActionResponse',
84
+ 'TriggerParentTaskActionResponse',
85
+ 'CreateNewTaskActivity',
86
+ 'UpdateMatchingTasksActivity',
87
+ 'CreateNewTaskActivityResponse',
88
+ 'UpdateMatchingTasksActivityResponse',
89
+ 'Fail',
90
+ 'GroupReconciliation',
91
+ 'HealthCheck',
92
+ 'LuminesceView',
93
+ 'SchedulerJob',
94
+ 'Sleep',
95
+ 'FailResponse',
96
+ 'GroupReconciliationResponse',
97
+ 'HealthCheckResponse',
98
+ 'LuminesceViewResponse',
99
+ 'SchedulerJobResponse',
100
+ 'SleepResponse']:
101
+ return value
102
+
103
+ # Only validate the 'type' property of the class
104
+ if "instrument_type" != "type":
105
+ return value
106
+
107
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
108
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
109
+ return value
110
+
111
+ class Config:
112
+ """Pydantic configuration"""
113
+ allow_population_by_field_name = True
114
+ validate_assignment = True
115
+
116
+ def __str__(self):
117
+ """For `print` and `pprint`"""
118
+ return pprint.pformat(self.dict(by_alias=False))
119
+
120
+ def __repr__(self):
121
+ """For `print` and `pprint`"""
122
+ return self.to_str()
123
+
124
+ def to_str(self) -> str:
125
+ """Returns the string representation of the model using alias"""
126
+ return pprint.pformat(self.dict(by_alias=True))
127
+
128
+ def to_json(self) -> str:
129
+ """Returns the JSON representation of the model using alias"""
130
+ return json.dumps(self.to_dict())
131
+
132
+ @classmethod
133
+ def from_json(cls, json_str: str) -> FlexibleRepo:
134
+ """Create an instance of FlexibleRepo from a JSON string"""
135
+ return cls.from_dict(json.loads(json_str))
136
+
137
+ def to_dict(self):
138
+ """Returns the dictionary representation of the model using alias"""
139
+ _dict = self.dict(by_alias=True,
140
+ exclude={
141
+ "additional_properties"
142
+ },
143
+ exclude_none=True)
144
+ # override the default output from pydantic by calling `to_dict()` of collateral
145
+ if self.collateral:
146
+ _dict['collateral'] = self.collateral.to_dict()
147
+ # override the default output from pydantic by calling `to_dict()` of each item in repo_rate_schedules (list)
148
+ _items = []
149
+ if self.repo_rate_schedules:
150
+ for _item in self.repo_rate_schedules:
151
+ if _item:
152
+ _items.append(_item.to_dict())
153
+ _dict['repoRateSchedules'] = _items
154
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
155
+ if self.time_zone_conventions:
156
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
157
+ # override the default output from pydantic by calling `to_dict()` of trading_conventions
158
+ if self.trading_conventions:
159
+ _dict['tradingConventions'] = self.trading_conventions.to_dict()
160
+ # puts key-value pairs in additional_properties in the top level
161
+ if self.additional_properties is not None:
162
+ for _key, _value in self.additional_properties.items():
163
+ _dict[_key] = _value
164
+
165
+ # set to None if maturity_date (nullable) is None
166
+ # and __fields_set__ contains the field
167
+ if self.maturity_date is None and "maturity_date" in self.__fields_set__:
168
+ _dict['maturityDate'] = None
169
+
170
+ # set to None if accrual_basis (nullable) is None
171
+ # and __fields_set__ contains the field
172
+ if self.accrual_basis is None and "accrual_basis" in self.__fields_set__:
173
+ _dict['accrualBasis'] = None
174
+
175
+ # set to None if haircut (nullable) is None
176
+ # and __fields_set__ contains the field
177
+ if self.haircut is None and "haircut" in self.__fields_set__:
178
+ _dict['haircut'] = None
179
+
180
+ # set to None if margin (nullable) is None
181
+ # and __fields_set__ contains the field
182
+ if self.margin is None and "margin" in self.__fields_set__:
183
+ _dict['margin'] = None
184
+
185
+ # set to None if open_repo_rolling_period (nullable) is None
186
+ # and __fields_set__ contains the field
187
+ if self.open_repo_rolling_period is None and "open_repo_rolling_period" in self.__fields_set__:
188
+ _dict['openRepoRollingPeriod'] = None
189
+
190
+ # set to None if purchase_price (nullable) is None
191
+ # and __fields_set__ contains the field
192
+ if self.purchase_price is None and "purchase_price" in self.__fields_set__:
193
+ _dict['purchasePrice'] = None
194
+
195
+ # set to None if repo_rate_schedules (nullable) is None
196
+ # and __fields_set__ contains the field
197
+ if self.repo_rate_schedules is None and "repo_rate_schedules" in self.__fields_set__:
198
+ _dict['repoRateSchedules'] = None
199
+
200
+ # set to None if repurchase_price (nullable) is None
201
+ # and __fields_set__ contains the field
202
+ if self.repurchase_price is None and "repurchase_price" in self.__fields_set__:
203
+ _dict['repurchasePrice'] = None
204
+
205
+ return _dict
206
+
207
+ @classmethod
208
+ def from_dict(cls, obj: dict) -> FlexibleRepo:
209
+ """Create an instance of FlexibleRepo from a dict"""
210
+ if obj is None:
211
+ return None
212
+
213
+ if not isinstance(obj, dict):
214
+ return FlexibleRepo.parse_obj(obj)
215
+
216
+ _obj = FlexibleRepo.parse_obj({
217
+ "instrument_type": obj.get("instrumentType"),
218
+ "start_date": obj.get("startDate"),
219
+ "maturity_date": obj.get("maturityDate"),
220
+ "buyer_or_seller": obj.get("buyerOrSeller"),
221
+ "repo_ccy": obj.get("repoCcy"),
222
+ "repo_type": obj.get("repoType"),
223
+ "accrual_basis": obj.get("accrualBasis"),
224
+ "collateral": Collateral.from_dict(obj.get("collateral")) if obj.get("collateral") is not None else None,
225
+ "haircut": obj.get("haircut"),
226
+ "margin": obj.get("margin"),
227
+ "open_repo_rolling_period": obj.get("openRepoRollingPeriod"),
228
+ "purchase_price": obj.get("purchasePrice"),
229
+ "repo_rate_schedules": [Schedule.from_dict(_item) for _item in obj.get("repoRateSchedules")] if obj.get("repoRateSchedules") is not None else None,
230
+ "repurchase_price": obj.get("repurchasePrice"),
231
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None,
232
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
233
+ })
234
+ # store additional fields in additional_properties
235
+ for _key in obj.keys():
236
+ if _key not in cls.__properties:
237
+ _obj.additional_properties[_key] = obj.get(_key)
238
+
239
+ return _obj
@@ -37,7 +37,7 @@ class FloatingLeg(InstrumentLeg):
37
37
  cap_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="capRate", description="The maximum floating rate which a cashflow can accrue.")
38
38
  floor_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="floorRate", description="The minimum floating rate which a cashflow can accrue.")
39
39
  time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
40
- 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
40
+ 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
41
41
  additional_properties: Dict[str, Any] = {}
42
42
  __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides", "capRate", "floorRate", "timeZoneConventions"]
43
43
 
@@ -96,8 +96,8 @@ class FloatingLeg(InstrumentLeg):
96
96
  if "instrument_type" != "type":
97
97
  return value
98
98
 
99
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
100
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
99
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
100
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
101
101
  return value
102
102
 
103
103
  class Config:
@@ -36,7 +36,7 @@ class ForwardRateAgreement(LusidInstrument):
36
36
  notional: Union[StrictFloat, StrictInt] = Field(..., description="The amount for which the FRA is traded.")
37
37
  index_convention: Optional[IndexConvention] = Field(None, alias="indexConvention")
38
38
  time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
39
- 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
39
+ 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, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
40
40
  additional_properties: Dict[str, Any] = {}
41
41
  __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "fixingDate", "fraRate", "notional", "indexConvention", "timeZoneConventions"]
42
42
 
@@ -95,8 +95,8 @@ class ForwardRateAgreement(LusidInstrument):
95
95
  if "instrument_type" != "type":
96
96
  return value
97
97
 
98
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit'):
99
- 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit')")
98
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo'):
99
+ 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', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility', 'FlexibleDeposit', 'FlexibleRepo')")
100
100
  return value
101
101
 
102
102
  class Config:
@@ -0,0 +1,162 @@
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, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, constr, validator
23
+ from lusid.models.version import Version
24
+
25
+ class FundCalendarEntry(BaseModel):
26
+ """
27
+ FundCalendarEntry
28
+ """
29
+ code: StrictStr = Field(...,alias="code", description="The unique Code of the Calendar Entry. The Calendar Entry, together with the Fund Scope and Code, uniquely identifies a Fund Calendar Entry")
30
+ display_name: StrictStr = Field(...,alias="displayName", description="The name of the Fund Calendar entry.")
31
+ description: Optional[StrictStr] = Field(None,alias="description", description="A description for the Fund Calendar entry.")
32
+ nav_type_code: StrictStr = Field(...,alias="navTypeCode", description="The navTypeCode of the Fund Calendar Entry. This is the code of the NAV type that this Calendar Entry is associated with.")
33
+ entry_type: StrictStr = Field(...,alias="entryType", description="The type of the Fund Calendar Entry. Only 'ValuationPoint' currently supported. The available values are: ValuationPointFundCalendarEntry")
34
+ version: Version = Field(...)
35
+ href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested asAt datetime.")
36
+ __properties = ["code", "displayName", "description", "navTypeCode", "entryType", "version", "href"]
37
+
38
+ @validator('entry_type')
39
+ def entry_type_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+
42
+ # Finbourne have removed enum validation on all models, except for this use case:
43
+ # Workflow and notification application SDK use the property name 'type' as the discriminator on a number of classes.
44
+ # During instantiation, the value of 'type' is checked against the enum values,
45
+
46
+
47
+ # check it's a class that uses the 'type' property as a discriminator
48
+ # list of classes can be found by searching for 'actual_instance: Union[' in the generated code
49
+ if 'FundCalendarEntry' not in [
50
+ # For notification application classes
51
+ 'AmazonSqsNotificationType',
52
+ 'AmazonSqsNotificationTypeResponse',
53
+ 'AmazonSqsPrincipalAuthNotificationType',
54
+ 'AmazonSqsPrincipalAuthNotificationTypeResponse',
55
+ 'AzureServiceBusTypeResponse',
56
+ 'AzureServiceBusNotificationType',
57
+ 'EmailNotificationType',
58
+ 'EmailNotificationTypeResponse',
59
+ 'SmsNotificationType',
60
+ 'SmsNotificationTypeResponse',
61
+ 'WebhookNotificationType',
62
+ 'WebhookNotificationTypeResponse',
63
+
64
+ # For workflow application classes
65
+ 'CreateChildTasksAction',
66
+ 'RunWorkerAction',
67
+ 'TriggerParentTaskAction',
68
+ 'CreateChildTasksActionResponse',
69
+ 'RunWorkerActionResponse',
70
+ 'TriggerParentTaskActionResponse',
71
+ 'CreateNewTaskActivity',
72
+ 'UpdateMatchingTasksActivity',
73
+ 'CreateNewTaskActivityResponse',
74
+ 'UpdateMatchingTasksActivityResponse',
75
+ 'Fail',
76
+ 'GroupReconciliation',
77
+ 'HealthCheck',
78
+ 'LuminesceView',
79
+ 'SchedulerJob',
80
+ 'Sleep',
81
+ 'FailResponse',
82
+ 'GroupReconciliationResponse',
83
+ 'HealthCheckResponse',
84
+ 'LuminesceViewResponse',
85
+ 'SchedulerJobResponse',
86
+ 'SleepResponse']:
87
+ return value
88
+
89
+ # Only validate the 'type' property of the class
90
+ if "entry_type" != "type":
91
+ return value
92
+
93
+ if value not in ('ValuationPointFundCalendarEntry'):
94
+ raise ValueError("must be one of enum values ('ValuationPointFundCalendarEntry')")
95
+ return value
96
+
97
+ class Config:
98
+ """Pydantic configuration"""
99
+ allow_population_by_field_name = True
100
+ validate_assignment = True
101
+
102
+ def __str__(self):
103
+ """For `print` and `pprint`"""
104
+ return pprint.pformat(self.dict(by_alias=False))
105
+
106
+ def __repr__(self):
107
+ """For `print` and `pprint`"""
108
+ return self.to_str()
109
+
110
+ def to_str(self) -> str:
111
+ """Returns the string representation of the model using alias"""
112
+ return pprint.pformat(self.dict(by_alias=True))
113
+
114
+ def to_json(self) -> str:
115
+ """Returns the JSON representation of the model using alias"""
116
+ return json.dumps(self.to_dict())
117
+
118
+ @classmethod
119
+ def from_json(cls, json_str: str) -> FundCalendarEntry:
120
+ """Create an instance of FundCalendarEntry from a JSON string"""
121
+ return cls.from_dict(json.loads(json_str))
122
+
123
+ def to_dict(self):
124
+ """Returns the dictionary representation of the model using alias"""
125
+ _dict = self.dict(by_alias=True,
126
+ exclude={
127
+ },
128
+ exclude_none=True)
129
+ # override the default output from pydantic by calling `to_dict()` of version
130
+ if self.version:
131
+ _dict['version'] = self.version.to_dict()
132
+ # set to None if description (nullable) is None
133
+ # and __fields_set__ contains the field
134
+ if self.description is None and "description" in self.__fields_set__:
135
+ _dict['description'] = None
136
+
137
+ # set to None if href (nullable) is None
138
+ # and __fields_set__ contains the field
139
+ if self.href is None and "href" in self.__fields_set__:
140
+ _dict['href'] = None
141
+
142
+ return _dict
143
+
144
+ @classmethod
145
+ def from_dict(cls, obj: dict) -> FundCalendarEntry:
146
+ """Create an instance of FundCalendarEntry from a dict"""
147
+ if obj is None:
148
+ return None
149
+
150
+ if not isinstance(obj, dict):
151
+ return FundCalendarEntry.parse_obj(obj)
152
+
153
+ _obj = FundCalendarEntry.parse_obj({
154
+ "code": obj.get("code"),
155
+ "display_name": obj.get("displayName"),
156
+ "description": obj.get("description"),
157
+ "nav_type_code": obj.get("navTypeCode"),
158
+ "entry_type": obj.get("entryType"),
159
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
160
+ "href": obj.get("href")
161
+ })
162
+ return _obj