lusid-sdk 2.1.599__py3-none-any.whl → 2.1.642__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 (148) hide show
  1. lusid/__init__.py +36 -0
  2. lusid/api/corporate_action_sources_api.py +6 -6
  3. lusid/api/entities_api.py +24 -24
  4. lusid/api/funds_api.py +438 -1
  5. lusid/api/order_management_api.py +16 -8
  6. lusid/api/staged_modifications_api.py +12 -12
  7. lusid/api/timelines_api.py +579 -3
  8. lusid/api/transaction_portfolios_api.py +183 -0
  9. lusid/api/workspace_api.py +96 -48
  10. lusid/configuration.py +1 -1
  11. lusid/models/__init__.py +36 -0
  12. lusid/models/accounted_transaction.py +88 -0
  13. lusid/models/accumulation_event.py +3 -3
  14. lusid/models/adjust_global_commitment_event.py +93 -0
  15. lusid/models/amortisation_event.py +3 -3
  16. lusid/models/basket.py +3 -3
  17. lusid/models/bond.py +11 -5
  18. lusid/models/bond_coupon_event.py +3 -3
  19. lusid/models/bond_default_event.py +3 -3
  20. lusid/models/bond_principal_event.py +3 -3
  21. lusid/models/bonus_issue_event.py +3 -3
  22. lusid/models/call_on_intermediate_securities_event.py +3 -3
  23. lusid/models/cancel_single_holding_adjustment_request.py +96 -0
  24. lusid/models/cap_floor.py +22 -7
  25. lusid/models/capital_distribution_event.py +3 -3
  26. lusid/models/cash.py +3 -3
  27. lusid/models/cash_dividend_event.py +3 -3
  28. lusid/models/cash_flow_event.py +3 -3
  29. lusid/models/cash_perpetual.py +3 -3
  30. lusid/models/cds_credit_event.py +3 -3
  31. lusid/models/cds_index.py +3 -3
  32. lusid/models/cdx_credit_event.py +3 -3
  33. lusid/models/close_event.py +3 -3
  34. lusid/models/closed_period.py +128 -0
  35. lusid/models/complete_portfolio.py +3 -3
  36. lusid/models/complex_bond.py +20 -7
  37. lusid/models/contract_details.py +101 -0
  38. lusid/models/contract_for_difference.py +3 -3
  39. lusid/models/contract_initialisation_event.py +99 -0
  40. lusid/models/create_closed_period_request.py +96 -0
  41. lusid/models/create_derived_property_definition_request.py +3 -3
  42. lusid/models/create_derived_transaction_portfolio_request.py +8 -2
  43. lusid/models/create_property_definition_request.py +3 -3
  44. lusid/models/credit_default_swap.py +3 -3
  45. lusid/models/credit_premium_cash_flow_event.py +3 -3
  46. lusid/models/dependency_source_filter.py +19 -4
  47. lusid/models/dividend_option_event.py +3 -3
  48. lusid/models/dividend_reinvestment_event.py +3 -3
  49. lusid/models/drawdown_event.py +99 -0
  50. lusid/models/early_redemption_event.py +3 -3
  51. lusid/models/eligibility_calculation.py +6 -4
  52. lusid/models/equity.py +3 -3
  53. lusid/models/equity_option.py +23 -7
  54. lusid/models/equity_swap.py +3 -3
  55. lusid/models/exchange_traded_option.py +12 -6
  56. lusid/models/exercise_event.py +3 -3
  57. lusid/models/exotic_instrument.py +3 -3
  58. lusid/models/expiry_event.py +3 -3
  59. lusid/models/fee_accrual.py +3 -1
  60. lusid/models/fixed_leg.py +3 -3
  61. lusid/models/flexible_deposit.py +105 -0
  62. lusid/models/flexible_loan.py +3 -3
  63. lusid/models/floating_leg.py +3 -3
  64. lusid/models/forward_rate_agreement.py +3 -3
  65. lusid/models/fund_share_class.py +3 -3
  66. lusid/models/funding_leg.py +3 -3
  67. lusid/models/future.py +19 -7
  68. lusid/models/future_expiry_event.py +3 -3
  69. lusid/models/future_mark_to_market_event.py +100 -0
  70. lusid/models/fx_forward.py +3 -3
  71. lusid/models/fx_forward_settlement_event.py +3 -3
  72. lusid/models/fx_option.py +3 -3
  73. lusid/models/fx_swap.py +3 -3
  74. lusid/models/group_reconciliation_summary.py +2 -2
  75. lusid/models/inflation_leg.py +3 -3
  76. lusid/models/inflation_linked_bond.py +11 -5
  77. lusid/models/inflation_swap.py +3 -3
  78. lusid/models/informational_error_event.py +3 -3
  79. lusid/models/informational_event.py +3 -3
  80. lusid/models/instrument_event.py +10 -5
  81. lusid/models/instrument_event_instruction.py +9 -2
  82. lusid/models/instrument_event_instruction_request.py +10 -3
  83. lusid/models/instrument_event_type.py +5 -0
  84. lusid/models/instrument_leg.py +3 -3
  85. lusid/models/instrument_type.py +1 -0
  86. lusid/models/interest_rate_swap.py +3 -3
  87. lusid/models/interest_rate_swaption.py +3 -3
  88. lusid/models/intermediate_securities_distribution_event.py +3 -3
  89. lusid/models/loan_facility.py +3 -3
  90. lusid/models/loan_interest_repayment_event.py +97 -0
  91. lusid/models/lusid_instrument.py +6 -5
  92. lusid/models/mark_to_market_conventions.py +74 -0
  93. lusid/models/market_data_key_rule.py +1 -1
  94. lusid/models/market_data_specific_rule.py +1 -1
  95. lusid/models/mastered_instrument.py +3 -3
  96. lusid/models/maturity_event.py +3 -3
  97. lusid/models/mbs_coupon_event.py +3 -3
  98. lusid/models/mbs_interest_deferral_event.py +3 -3
  99. lusid/models/mbs_interest_shortfall_event.py +3 -3
  100. lusid/models/mbs_principal_event.py +3 -3
  101. lusid/models/mbs_principal_write_off_event.py +3 -3
  102. lusid/models/merger_event.py +3 -3
  103. lusid/models/open_event.py +3 -3
  104. lusid/models/option_exercise_cash_event.py +3 -3
  105. lusid/models/option_exercise_physical_event.py +3 -3
  106. lusid/models/paged_resource_list_of_closed_period.py +113 -0
  107. lusid/models/pnl_journal_entry_line.py +95 -0
  108. lusid/models/portfolio.py +3 -3
  109. lusid/models/portfolio_id.py +80 -0
  110. lusid/models/portfolio_search_result.py +3 -3
  111. lusid/models/portfolio_type.py +1 -0
  112. lusid/models/portfolio_without_href.py +3 -3
  113. lusid/models/property_definition.py +3 -3
  114. lusid/models/property_definition_search_result.py +3 -3
  115. lusid/models/property_domain.py +1 -0
  116. lusid/models/protection_payout_cash_flow_event.py +3 -3
  117. lusid/models/raw_vendor_event.py +3 -3
  118. lusid/models/reference_instrument.py +3 -3
  119. lusid/models/repo.py +3 -3
  120. lusid/models/reset_event.py +3 -3
  121. lusid/models/reverse_stock_split_event.py +3 -3
  122. lusid/models/scrip_dividend_event.py +3 -3
  123. lusid/models/side_definition.py +8 -1
  124. lusid/models/side_definition_request.py +9 -2
  125. lusid/models/simple_cash_flow_loan.py +3 -3
  126. lusid/models/simple_instrument.py +3 -3
  127. lusid/models/spin_off_event.py +3 -3
  128. lusid/models/stock_dividend_event.py +3 -3
  129. lusid/models/stock_split_event.py +3 -3
  130. lusid/models/swap_cash_flow_event.py +3 -3
  131. lusid/models/swap_principal_event.py +3 -3
  132. lusid/models/tender_event.py +3 -3
  133. lusid/models/term_deposit.py +3 -3
  134. lusid/models/term_deposit_interest_event.py +3 -3
  135. lusid/models/term_deposit_principal_event.py +3 -3
  136. lusid/models/total_return_swap.py +3 -3
  137. lusid/models/trading_conventions.py +73 -0
  138. lusid/models/transition_event.py +3 -3
  139. lusid/models/trigger_event.py +3 -3
  140. lusid/models/valuation_point_resource_list_of_accounted_transaction.py +125 -0
  141. lusid/models/valuation_point_resource_list_of_pnl_journal_entry_line.py +125 -0
  142. lusid/models/workspace.py +1 -1
  143. lusid/models/workspace_creation_request.py +1 -1
  144. lusid/models/workspace_item.py +4 -2
  145. lusid/models/workspace_item_creation_request.py +11 -2
  146. {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/METADATA +34 -10
  147. {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/RECORD +148 -130
  148. {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/WHEEL +0 -0
@@ -29,15 +29,15 @@ class TermDepositPrincipalEvent(InstrumentEvent):
29
29
  currency: StrictStr = Field(..., description="Currency of the principal payment.")
30
30
  payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the principal payment.")
31
31
  principal_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="principalPerUnit", description="The principal payment made per unit of the held .")
32
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
32
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
33
33
  additional_properties: Dict[str, Any] = {}
34
34
  __properties = ["instrumentEventType", "currency", "paymentDate", "principalPerUnit"]
35
35
 
36
36
  @validator('instrument_event_type')
37
37
  def instrument_event_type_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
- 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'):
40
- 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')")
39
+ 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'):
40
+ 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')")
41
41
  return value
42
42
 
43
43
  class Config:
@@ -34,15 +34,15 @@ class TotalReturnSwap(LusidInstrument):
34
34
  asset_leg: AssetLeg = Field(..., alias="assetLeg")
35
35
  funding_leg: InstrumentLeg = Field(..., alias="fundingLeg")
36
36
  additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven total return swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
37
- 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")
37
+ 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
38
  additional_properties: Dict[str, Any] = {}
39
39
  __properties = ["instrumentType", "startDate", "maturityDate", "assetLeg", "fundingLeg", "additionalPayments"]
40
40
 
41
41
  @validator('instrument_type')
42
42
  def instrument_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- 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'):
45
- 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')")
44
+ 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'):
45
+ 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')")
46
46
  return value
47
47
 
48
48
  class Config:
@@ -0,0 +1,73 @@
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, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class TradingConventions(BaseModel):
25
+ """
26
+ Common Trading details for exchange traded instruments like Futures and Bonds # noqa: E501
27
+ """
28
+ price_scale_factor: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="priceScaleFactor", description="The factor used to scale prices for the instrument. Currently used by LUSID when calculating cost and notional amounts on transactions. Note this factor does not yet impact Valuation, PV, exposure, all of which use the scale factor attached to the price quotes in the QuoteStore. Must be positive and defaults to 1 if not set.")
29
+ minimum_order_size: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumOrderSize", description="The Minimum Order Size Must be non-negative and defaults to 0 if not set.")
30
+ minimum_order_increment: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumOrderIncrement", description="The Minimum Order Increment Must be non-negative and defaults to 0 if not set.")
31
+ __properties = ["priceScaleFactor", "minimumOrderSize", "minimumOrderIncrement"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> TradingConventions:
48
+ """Create an instance of TradingConventions from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ return _dict
58
+
59
+ @classmethod
60
+ def from_dict(cls, obj: dict) -> TradingConventions:
61
+ """Create an instance of TradingConventions from a dict"""
62
+ if obj is None:
63
+ return None
64
+
65
+ if not isinstance(obj, dict):
66
+ return TradingConventions.parse_obj(obj)
67
+
68
+ _obj = TradingConventions.parse_obj({
69
+ "price_scale_factor": obj.get("priceScaleFactor"),
70
+ "minimum_order_size": obj.get("minimumOrderSize"),
71
+ "minimum_order_increment": obj.get("minimumOrderIncrement")
72
+ })
73
+ return _obj
@@ -34,15 +34,15 @@ class TransitionEvent(InstrumentEvent):
34
34
  payment_date: Optional[datetime] = Field(None, alias="paymentDate", description="The payment date of the corporate action")
35
35
  input_transition: Optional[InputTransition] = Field(None, alias="inputTransition")
36
36
  output_transitions: Optional[conlist(OutputTransition)] = Field(None, alias="outputTransitions", description="The resulting transitions from this event")
37
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
37
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
38
38
  additional_properties: Dict[str, Any] = {}
39
39
  __properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "inputTransition", "outputTransitions"]
40
40
 
41
41
  @validator('instrument_event_type')
42
42
  def instrument_event_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- 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'):
45
- 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')")
44
+ 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'):
45
+ 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')")
46
46
  return value
47
47
 
48
48
  class Config:
@@ -31,15 +31,15 @@ class TriggerEvent(InstrumentEvent):
31
31
  trigger_direction: constr(strict=True, min_length=1) = Field(..., alias="triggerDirection", description="The direction of the trigger; valid options are Up and Down")
32
32
  trigger_date: datetime = Field(..., alias="triggerDate", description="The date the trigger happens at.")
33
33
  maturity_date: datetime = Field(..., alias="maturityDate", description="The date the trigger takes effect.")
34
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
34
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: 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")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties = ["instrumentEventType", "level", "triggerType", "triggerDirection", "triggerDate", "maturityDate"]
37
37
 
38
38
  @validator('instrument_event_type')
39
39
  def instrument_event_type_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- 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'):
42
- 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')")
41
+ 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'):
42
+ 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')")
43
43
  return value
44
44
 
45
45
  class Config:
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.accounted_transaction import AccountedTransaction
24
+ from lusid.models.diary_entry import DiaryEntry
25
+ from lusid.models.link import Link
26
+ from lusid.models.version import Version
27
+
28
+ class ValuationPointResourceListOfAccountedTransaction(BaseModel):
29
+ """
30
+ ResourceList with extra header fields used by the various ValuationPoint endpoints for returning additional context related to the list of results. # noqa: E501
31
+ """
32
+ start_valuation_point: Optional[DiaryEntry] = Field(None, alias="startValuationPoint")
33
+ version: Version = Field(...)
34
+ values: conlist(AccountedTransaction) = Field(...)
35
+ href: Optional[StrictStr] = None
36
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
37
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
38
+ links: Optional[conlist(Link)] = None
39
+ __properties = ["startValuationPoint", "version", "values", "href", "nextPage", "previousPage", "links"]
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> ValuationPointResourceListOfAccountedTransaction:
56
+ """Create an instance of ValuationPointResourceListOfAccountedTransaction from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # override the default output from pydantic by calling `to_dict()` of start_valuation_point
66
+ if self.start_valuation_point:
67
+ _dict['startValuationPoint'] = self.start_valuation_point.to_dict()
68
+ # override the default output from pydantic by calling `to_dict()` of version
69
+ if self.version:
70
+ _dict['version'] = self.version.to_dict()
71
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
72
+ _items = []
73
+ if self.values:
74
+ for _item in self.values:
75
+ if _item:
76
+ _items.append(_item.to_dict())
77
+ _dict['values'] = _items
78
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
79
+ _items = []
80
+ if self.links:
81
+ for _item in self.links:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['links'] = _items
85
+ # set to None if href (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.href is None and "href" in self.__fields_set__:
88
+ _dict['href'] = None
89
+
90
+ # set to None if next_page (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.next_page is None and "next_page" in self.__fields_set__:
93
+ _dict['nextPage'] = None
94
+
95
+ # set to None if previous_page (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
98
+ _dict['previousPage'] = None
99
+
100
+ # set to None if links (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.links is None and "links" in self.__fields_set__:
103
+ _dict['links'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: dict) -> ValuationPointResourceListOfAccountedTransaction:
109
+ """Create an instance of ValuationPointResourceListOfAccountedTransaction from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return ValuationPointResourceListOfAccountedTransaction.parse_obj(obj)
115
+
116
+ _obj = ValuationPointResourceListOfAccountedTransaction.parse_obj({
117
+ "start_valuation_point": DiaryEntry.from_dict(obj.get("startValuationPoint")) if obj.get("startValuationPoint") is not None else None,
118
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
119
+ "values": [AccountedTransaction.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
120
+ "href": obj.get("href"),
121
+ "next_page": obj.get("nextPage"),
122
+ "previous_page": obj.get("previousPage"),
123
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
124
+ })
125
+ return _obj
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.diary_entry import DiaryEntry
24
+ from lusid.models.link import Link
25
+ from lusid.models.pnl_journal_entry_line import PnlJournalEntryLine
26
+ from lusid.models.version import Version
27
+
28
+ class ValuationPointResourceListOfPnlJournalEntryLine(BaseModel):
29
+ """
30
+ ResourceList with extra header fields used by the various ValuationPoint endpoints for returning additional context related to the list of results. # noqa: E501
31
+ """
32
+ start_valuation_point: Optional[DiaryEntry] = Field(None, alias="startValuationPoint")
33
+ version: Version = Field(...)
34
+ values: conlist(PnlJournalEntryLine) = Field(...)
35
+ href: Optional[StrictStr] = None
36
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
37
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
38
+ links: Optional[conlist(Link)] = None
39
+ __properties = ["startValuationPoint", "version", "values", "href", "nextPage", "previousPage", "links"]
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> ValuationPointResourceListOfPnlJournalEntryLine:
56
+ """Create an instance of ValuationPointResourceListOfPnlJournalEntryLine from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # override the default output from pydantic by calling `to_dict()` of start_valuation_point
66
+ if self.start_valuation_point:
67
+ _dict['startValuationPoint'] = self.start_valuation_point.to_dict()
68
+ # override the default output from pydantic by calling `to_dict()` of version
69
+ if self.version:
70
+ _dict['version'] = self.version.to_dict()
71
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
72
+ _items = []
73
+ if self.values:
74
+ for _item in self.values:
75
+ if _item:
76
+ _items.append(_item.to_dict())
77
+ _dict['values'] = _items
78
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
79
+ _items = []
80
+ if self.links:
81
+ for _item in self.links:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['links'] = _items
85
+ # set to None if href (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.href is None and "href" in self.__fields_set__:
88
+ _dict['href'] = None
89
+
90
+ # set to None if next_page (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.next_page is None and "next_page" in self.__fields_set__:
93
+ _dict['nextPage'] = None
94
+
95
+ # set to None if previous_page (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
98
+ _dict['previousPage'] = None
99
+
100
+ # set to None if links (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.links is None and "links" in self.__fields_set__:
103
+ _dict['links'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: dict) -> ValuationPointResourceListOfPnlJournalEntryLine:
109
+ """Create an instance of ValuationPointResourceListOfPnlJournalEntryLine from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return ValuationPointResourceListOfPnlJournalEntryLine.parse_obj(obj)
115
+
116
+ _obj = ValuationPointResourceListOfPnlJournalEntryLine.parse_obj({
117
+ "start_valuation_point": DiaryEntry.from_dict(obj.get("startValuationPoint")) if obj.get("startValuationPoint") is not None else None,
118
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
119
+ "values": [PnlJournalEntryLine.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
120
+ "href": obj.get("href"),
121
+ "next_page": obj.get("nextPage"),
122
+ "previous_page": obj.get("previousPage"),
123
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
124
+ })
125
+ return _obj
lusid/models/workspace.py CHANGED
@@ -27,7 +27,7 @@ class Workspace(BaseModel):
27
27
  """
28
28
  A workspace. # noqa: E501
29
29
  """
30
- name: constr(strict=True, min_length=1) = Field(..., description="A workspace's name; a unique identifier.")
30
+ name: constr(strict=True, min_length=1) = Field(..., description="A workspace's name.")
31
31
  description: constr(strict=True, max_length=6000, min_length=0) = Field(..., description="A friendly description for the workspace.")
32
32
  version: Optional[Version] = None
33
33
  links: Optional[conlist(Link)] = None
@@ -25,7 +25,7 @@ class WorkspaceCreationRequest(BaseModel):
25
25
  """
26
26
  A request to create an empty workspace. # noqa: E501
27
27
  """
28
- name: constr(strict=True, max_length=64, min_length=1) = Field(..., description="A workspace's name; a unique identifier.")
28
+ name: constr(strict=True, max_length=64, min_length=1) = Field(..., description="A workspace's name.")
29
29
  description: constr(strict=True, max_length=6000, min_length=0) = Field(..., description="A friendly description for the workspace.")
30
30
  __properties = ["name", "description"]
31
31
 
@@ -29,12 +29,13 @@ class WorkspaceItem(BaseModel):
29
29
  """
30
30
  type: constr(strict=True, min_length=1) = Field(..., description="The type of the workspace item.")
31
31
  format: StrictInt = Field(..., description="A simple integer format identifier.")
32
- name: constr(strict=True, min_length=1) = Field(..., description="A workspace item's name; a unique identifier.")
32
+ name: constr(strict=True, min_length=1) = Field(..., description="A workspace item's name.")
33
+ group: constr(strict=True, min_length=1) = Field(..., description="The group containing a workspace item.")
33
34
  description: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The description of a workspace item.")
34
35
  content: Optional[Any] = Field(..., description="The content associated with a workspace item.")
35
36
  version: Optional[Version] = None
36
37
  links: Optional[conlist(Link)] = None
37
- __properties = ["type", "format", "name", "description", "content", "version", "links"]
38
+ __properties = ["type", "format", "name", "group", "description", "content", "version", "links"]
38
39
 
39
40
  @validator('description')
40
41
  def description_validate_regular_expression(cls, value):
@@ -102,6 +103,7 @@ class WorkspaceItem(BaseModel):
102
103
  "type": obj.get("type"),
103
104
  "format": obj.get("format"),
104
105
  "name": obj.get("name"),
106
+ "group": obj.get("group"),
105
107
  "description": obj.get("description"),
106
108
  "content": obj.get("content"),
107
109
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
@@ -26,11 +26,12 @@ class WorkspaceItemCreationRequest(BaseModel):
26
26
  A request to create an item in a workspace. # noqa: E501
27
27
  """
28
28
  format: StrictInt = Field(..., description="A simple integer format identifier.")
29
- name: constr(strict=True, max_length=64, min_length=1) = Field(..., description="A workspace item's name; a unique identifier.")
29
+ name: constr(strict=True, max_length=64, min_length=1) = Field(..., description="A workspace item's name.")
30
+ group: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The group containing a workspace item.")
30
31
  description: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The description of a workspace item.")
31
32
  content: Optional[Any] = Field(..., description="The content associated with a workspace item.")
32
33
  type: constr(strict=True, max_length=6000, min_length=0) = Field(..., description="The type of the workspace item.")
33
- __properties = ["format", "name", "description", "content", "type"]
34
+ __properties = ["format", "name", "group", "description", "content", "type"]
34
35
 
35
36
  @validator('name')
36
37
  def name_validate_regular_expression(cls, value):
@@ -39,6 +40,13 @@ class WorkspaceItemCreationRequest(BaseModel):
39
40
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
40
41
  return value
41
42
 
43
+ @validator('group')
44
+ def group_validate_regular_expression(cls, value):
45
+ """Validates the regular expression"""
46
+ if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
47
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
48
+ return value
49
+
42
50
  @validator('description')
43
51
  def description_validate_regular_expression(cls, value):
44
52
  """Validates the regular expression"""
@@ -89,6 +97,7 @@ class WorkspaceItemCreationRequest(BaseModel):
89
97
  _obj = WorkspaceItemCreationRequest.parse_obj({
90
98
  "format": obj.get("format"),
91
99
  "name": obj.get("name"),
100
+ "group": obj.get("group"),
92
101
  "description": obj.get("description"),
93
102
  "content": obj.get("content"),
94
103
  "type": obj.get("type")